16 #ifndef TORC_GENERIC_PORTREFCREATOR_HPP
17 #define TORC_GENERIC_PORTREFCREATOR_HPP
36 template <
typename _ReturnType>
66 mFactory->create(scalarPortRef);
67 setupCreatedPort(port.getSharedThis(), scalarPortRef);
78 mFactory->create(vectorPortRef);
79 std::vector < size_t > limits;
80 port.getLimits(limits);
81 vectorPortRef->constructChildren(mFactory, limits);
82 setupCreatedPort(port.getSharedThis(), vectorPortRef);
93 mFactory->create(portBundleRef);
96 port.applyOnAllChildren(applier);
97 setupCreatedPort(port.getSharedThis(), portBundleRef);
98 mReturnValue = portBundleRef;
113 mFactory(inFactory), mInstance(inInstance), mBundle(inBundle), mReturnValue() {}
120 inPortRef->bindToMasterPort(port);
122 inPortRef->setParentCollection(mBundle);
123 mBundle->addChild(inPortRef);
125 inPortRef->setParent(mInstance);
126 mInstance->addPortReference(inPortRef);
137 #endif // TORC_GENERIC_PORTREFCREATOR_HPP
InstanceSharedPtr mInstance
An acyclic inoutVisitor implementation.
boost::shared_ptr< Instance > InstanceSharedPtr
void visit(ScalarPort &port)
_ReturnType getReturnValue() const
Represents a bundle of ports.
void setupCreatedPort(const PortSharedPtr &port, const PortReferenceSharedPtr &inPortRef)
boost::shared_ptr< ObjectFactory > ObjectFactorySharedPtr
boost::shared_ptr< ScalarPortReference > ScalarPortReferenceSharedPtr
ObjectFactorySharedPtr mFactory
PortBundleReferenceSharedPtr mBundle
The Error object thrown by different methods of EdifOM.
boost::shared_ptr< PortReference > PortReferenceSharedPtr
Represents a standalone port.
boost::shared_ptr< Port > PortSharedPtr
PortRefCreator(const ObjectFactorySharedPtr &inFactory, const InstanceSharedPtr &inInstance, const PortBundleReferenceSharedPtr &inBundle=PortBundleReferenceSharedPtr())
boost::shared_ptr< VectorPortReference > VectorPortReferenceSharedPtr
boost::shared_ptr< PortBundleReference > PortBundleReferenceSharedPtr
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)