21 #include <boost/bind.hpp>
22 #include <boost/mem_fn.hpp>
23 #ifdef GENOM_SERIALIZATION
24 #include <boost/archive/binary_iarchive.hpp>
25 #include <boost/archive/binary_oarchive.hpp>
26 #include <boost/serialization/base_object.hpp>
27 #include <boost/serialization/export.hpp>
28 #endif //GENOM_SERIALIZATION
32 #ifdef GENOM_SERIALIZATION
34 #endif //GENOM_SERIALIZATION
54 std::vector < size_t > limits;
55 limits.push_back(inSize);
56 return newVectorNetPtr(inName, inViewPtr, limits, inParentCollection, inFactory,
76 const ViewSharedPtr& inViewPtr,
const std::vector<size_t>& inLimits,
82 newVectorNet->setName(inName);
83 newVectorNet->constructChildren(inFactory, inLimits);
84 newVectorNet->setOriginalName(inOriginalName);
85 if(inParentCollection) {
86 inParentCollection->addChild(newVectorNet);
88 inViewPtr->addNet(newVectorNet);
109 std::for_each(children.begin(), children.end(),
129 if(inNet->getSize() != getSize()) {
156 BaseVectorType::List::iterator net = children.begin();
157 BaseVectorType::List::iterator nEnd = children.end();
158 for(; net != nEnd; ++net) {
160 (*net)->disconnect();
169 bool inSkipChildConnections)
const throw (
Error) {
171 if(!inSkipChildConnections) {
173 getCreatedChildren(children);
175 BaseVectorType::List::iterator net = children.begin();
176 BaseVectorType::List::iterator nEnd = children.end();
177 for(; net != nEnd; ++net) {
178 (*net)->getConnectedNets(outNets,
true);
185 bool inSkipChildConnections)
const {
187 if(!inSkipChildConnections) {
191 BaseVectorType::List::iterator net = children.begin();
192 BaseVectorType::List::iterator nEnd = children.end();
193 for(; net != nEnd; ++net) {
194 (*net)->getConnectedPorts(outPorts,
true);
200 bool inSkipChildConnections)
const {
202 if(!inSkipChildConnections) {
206 BaseVectorType::List::iterator net = children.begin();
207 BaseVectorType::List::iterator nEnd = children.end();
208 for(; net != nEnd; ++net) {
209 (*net)->getConnectedPortRefs(outPortRefs,
true);
216 const boost::shared_ptr<BaseVectorType::ChildType>& inCreatedChild)
const throw (
Error) {
217 inCreatedChild->setName(getName());
224 #ifdef GENOM_SERIALIZATION
225 template <
class Archive>
void VectorNet::serialize(Archive& ar,
unsigned int) {
226 ar & boost::serialization::base_object<Net>(*this);
227 ar & boost::serialization::base_object<BaseVectorType>(*this);
231 template void VectorNet::serialize<boost::archive::binary_iarchive>(
232 boost::archive::binary_iarchive& ar,
const unsigned int);
234 template void VectorNet::serialize<boost::archive::binary_oarchive>(
235 boost::archive::binary_oarchive& ar,
const unsigned int);
237 #endif //GENOM_SERIALIZATION
virtual void getCreatedChildren(List &outChildren) const
virtual Connection connect(const NetSharedPtr &inNet)=0
Represents a bit of a net array.
virtual void setParent(const ViewSharedPtr &inParent)
virtual void onChildCreate(const boost::shared_ptr< BaseVectorType::ChildType > &inCreatedChild) const
std::list< NetSharedPtr >::iterator Connection
virtual void getConnectedPorts(std::vector< PortSharedPtr > &outPort, bool inSkipChildConnections=false) const
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
virtual void getConnectedPortRefs(std::vector< PortReferenceSharedPtr > &outPortRefs, bool inSkipChildConnections=false) const
virtual void getConnectedPorts(std::vector< PortSharedPtr > &outPorts, bool inSkipChildConnections=false) const
virtual void disconnect()
boost::shared_ptr< VectorNet > VectorNetSharedPtr
The Error object thrown by different methods of EdifOM.
virtual void accept(BaseVisitor &inoutVisitor)
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
boost::shared_ptr< Net > NetSharedPtr
A base class for Visitor.
const boost::shared_ptr< View > getParent() const
void saveContextData(const std::string &inName, const boost::any &inSource)
virtual Connectable::Connection connect(const NetSharedPtr &inNet)
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
virtual void disconnect()
boost::shared_ptr< VectorNetBit::Factory > ChildFactorySharedPtr
boost::shared_ptr< View > ViewSharedPtr
virtual void setParent(const boost::shared_ptr< _ParentType > &inSource)
virtual void getConnectedPortRefs(std::vector< PortReferenceSharedPtr > &outPortRefs, bool inSkipChildConnections=false) const
boost::shared_ptr< NetBundle > NetBundleSharedPtr
virtual VectorNetSharedPtr newVectorNetPtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const size_t &inSize, const NetBundleSharedPtr &inParentCollection=NetBundleSharedPtr(), const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string())
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)
std::vector< Pointer > List