Go to the documentation of this file.
97 PortTable::const_iterator iter =
ports_.begin();
98 while (iter !=
ports_.end()) {
99 if ((*iter)->name() ==
name) {
117 PortTable::const_iterator iter =
ports_.begin();
118 while (iter !=
ports_.end()) {
119 if ((*iter)->name() ==
name) {
125 string procName =
"Unit::port";
197 string procName =
"Unit::port";
198 throw OutOfRange(__FILE__, __LINE__, procName);
223 string procName =
"Unit::addPort";
272 for (
int i = 0; i < ports; i++) {
313 for (
int i = 0; i < state->
childCount(); i++) {
335 const string procName =
"Unit::loadStateWithoutReferences";
344 for (
int i = 0; i < state->
childCount(); i++) {
355 }
else if (child->
name() ==
365 __FILE__, __LINE__, procName, exception.
errorMessage());
374 while (
ports_.size() > 0) {
411 for (
int i = 0; i < state->
childCount(); i++) {
static const std::string OSNAME_RFPORT
ObjectState name for register file port.
void internalUnsetMachine()
virtual TCEString name() const
std::string stringAttribute(const std::string &name) const
virtual ObjectState * saveState() const
virtual void removePort(Port &port)
void deleteOtherPorts(const NameSet &portsToLeave)
virtual ObjectState * saveState() const
virtual void loadState(const ObjectState *state)
virtual int bidirPortCount() const
void setName(const std::string &name)
void internalSetMachine(Machine &machine)
virtual void loadState(const ObjectState *state)
#define assert(condition)
PortTable ports_
Contains all the ports of the unit.
std::set< std::string > NameSet
Set type for strings.
virtual ObjectState * saveState() const
static const std::string OSNAME_FUPORT
ObjectState name for FUPort.
virtual Port * port(const std::string &name) const
ObjectState * child(int index) const
void addChild(ObjectState *child)
virtual bool hasPort(const std::string &name) const
void loadStateWithoutReferences(const ObjectState *state)
virtual bool isOutput() const
virtual int portCount() const
std::string errorMessage() const
virtual int outputPortCount(bool countBidir=false) const
static NameSet portNames(const ObjectState *state)
virtual int inputPortCount(bool countBidir=false) const
static const std::string OSNAME_SPECIAL_REG_PORT
ObjectState name for special register port.
virtual Machine * machine() const
virtual std::string name() const
virtual void setMachine(Machine &mach)
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the port.
virtual bool isInput() const
static const std::string OSNAME_UNIT
ObjectState name for Unit.
Unit(const std::string &name)
virtual void detachAllSockets()
virtual void unsetMachine()
Unit * parentUnit() const