/* * Net.h * openChams * * Created by damien dupuis on 12/01/10. * Copyright 2010 UPMC / LIP6. All rights reserved. * */ #ifndef __OPENCHAMS_NET_H__ #define __OPENCHAMS_NET_H__ #include #include "Name.h" #include "Instance.h" namespace OpenChams { class Netlist; class Net { public: Net(Name netName, Name typeName, bool, Netlist*); void connectTo(Name instanceName, Name connectorName); inline Name getName(); inline Name getType(); inline bool isExternal(); inline Netlist* getNetlist(); inline bool hasNoConnectors(); //inline vector >::iterator getFirstConnectionIt(); //inline vector >::iterator getLastConnectionIt(); inline const std::vector >& getConnections(); private: Name _name; Name _typeName; bool _isExternal; Netlist* _netlist; std::vector > _connections; // }; inline Name Net::getName() { return _name; }; inline Name Net::getType() { return _typeName; }; inline bool Net::isExternal() { return _isExternal; }; inline Netlist* Net::getNetlist() { return _netlist; }; inline bool Net::hasNoConnectors() { return (_connections.size() == 0)? true : false; }; //inline vector >::iterator Net::getFirstConnectionIt() { return _connections.begin();}; //inline vector >::iterator Net::getLastConnectionIt() { return _connections.end();}; inline const std::vector >& Net::getConnections() { return _connections; }; } // namespace #endif