16 #ifndef TORC_GENERIC_INTERNALUTILITYFUNCTIONS_HPP
17 #define TORC_GENERIC_INTERNALUTILITYFUNCTIONS_HPP
23 boost::shared_ptr<_Connectable>& conn)
throw (
Error) {
24 std::vector<std::string>::reverse_iterator name = nestedNames.rbegin();
25 std::vector<std::string>::reverse_iterator end = nestedNames.rend();
31 for(; name != end; ++name) {
38 std::vector < boost::shared_ptr<_Connectable> > children;
39 conn->getChildren(children);
41 for(
typename std::vector<boost::shared_ptr<_Connectable> >::iterator it = children.begin();
42 it != children.end(); ++it) {
43 if((*it)->getName() == *name) {
58 const boost::shared_ptr<_Connectable>& inConn,
const NetSharedPtr& inNet)
throw (
Error) {
60 if(inIndices.empty()) {
62 inConn->connect(inNet);
64 boost::shared_ptr<_Connectable> bit = inConn->get(inIndices);
73 template <
typename _Base,
typename _Derived>
struct IndexFinder : _Derived::Visitor {
74 std::vector<size_t>
operator()(
const boost::shared_ptr<_Base>& inPtr) {
99 #endif // TORC_GENERIC_INTERNALUTILITYFUNCTIONS_HPP
void findLeafConnectable(std::vector< std::string > &nestedNames, boost::shared_ptr< _Connectable > &conn)
void connectNetToElement(const std::vector< size_t > &inIndices, const boost::shared_ptr< _Connectable > &inConn, const NetSharedPtr &inNet)
std::vector< size_t > mIndices
std::vector< size_t > operator()(const boost::shared_ptr< _Base > &inPtr)
The Error object thrown by different methods of EdifOM.
boost::shared_ptr< Net > NetSharedPtr
void saveContextData(const std::string &inName, const boost::any &inSource)
void visit(_Derived &inObj)
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)