torc::physical::Net Class Reference

Physical design net. More...

#include <Net.hpp>

Inheritance diagram for torc::physical::Net:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::Net:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
InstancePinSharedPtrVector::const_iterator 
InstancePinSharedPtrConstIterator
 Constant iterator to InstancePin shared pointer objects.
typedef
InstancePinSharedPtrVector::iterator 
InstancePinSharedPtrIterator
 Non-constant iterator to InstancePin shared pointer objects.
typedef PipVector::const_iterator PipConstIterator
 Constant iterator to Pip objects.
typedef PipVector::iterator PipIterator
 Non-constant iterator to Pip objects.

Public Member Functions

bool containsSource (InstancePinSharedPtr &inInstancePinPtr) const
 Determines whether the given instance pin is a source of this net.
bool containsSink (InstancePinSharedPtr &inInstancePinPtr) const
 Determines whether the given instance pin is a sink of this net.
bool containsPip (const Pip &inPip) const
 Determines whether the net contains the given pip.
void addSource (InstancePinSharedPtr &inInstancePinPtr)
 Adds the given instance pin as a source for this net.
void addSink (InstancePinSharedPtr &inInstancePinPtr)
 Adds the given instance pin as a sink for this net.
bool removeSource (InstancePinSharedPtr &inInstancePinPtr)
 Removes the given instance pin from the sources of this net.
bool removeSink (InstancePinSharedPtr &inInstancePinPtr)
 Removes the given instance pin from the sinks of this net.
void addPip (const Pip &inPip)
 Adds the given pip to this net.
bool removePip (const Pip &inPip)
 Removes the given pip from this net.
void unroute (void)
 Unroute the net.
bool hasAnySources (void) const
 Returns true if the net has any sources.
bool hasOneSource (void) const
 Returns true if the net has exactly one source.
bool hasMultipleSources (void) const
 Returns true if the net has more than one source.
size_t getSourceCount (void) const
 Returns the number of sources on the net.
bool hasAnySinks (void) const
 Returns true if the net has any sinks.
bool hasOneSink (void) const
 Returns true if the net has exactly one sink.
bool hasMultipleSinks (void) const
 Returns true if the next has more than one sink.
size_t getSinkCount (void) const
 Returns the number of sinks on the net.
bool hasAnyPips (void) const
 Returns true if the net has any pips.
size_t getPipCount (void) const
 Returns the number of pips on the net.
bool isRouted (void) const
 Returns true if the net has any pips.
bool isUnrouted (void) const
 Returns true if the net has no pips.
InstancePinSharedPtrConstIterator sourcesBegin (void) const
 Returns the begin constant iterator for source instance pins.
InstancePinSharedPtrConstIterator sourcesEnd (void) const
 Returns the end constant iterator for source instance pins.
InstancePinSharedPtrIterator sourcesBegin (void)
 Returns the begin non-constant iterator for source instance pins.
InstancePinSharedPtrIterator sourcesEnd (void)
 Returns the end non-constant iterator for source instance pins.
InstancePinSharedPtrConstIterator sinksBegin (void) const
 Returns the begin constant iterator for sink instance pins.
InstancePinSharedPtrConstIterator sinksEnd (void) const
 Returns the end constant iterator for sink instance pins.
InstancePinSharedPtrIterator sinksBegin (void)
 Returns the begin non-constant iterator for sink instance pins.
InstancePinSharedPtrIterator sinksEnd (void)
 Returns the end non-constant iterator for sink instance pins.
PipConstIterator pipsBegin (void) const
 Returns the begin constant iterator for pips.
PipConstIterator pipsEnd (void) const
 Returns the end constant iterator for pips.
PipIterator pipsBegin (void)
 Returns the begin non-constant iterator for pips.
PipIterator pipsEnd (void)
 Returns the end non-constant iterator for pips.
ENetType getNetType (void) const
 Returns the net power type. See ENetPowerType.
void setNetType (ENetType inNetType)
 Sets the net power type. See ENetPowerType.
bool operator== (const Net &rhs) const
 Equality operator.

Protected Types

typedef std::string string
 Imported type name.

Protected Member Functions

 Net (const string &inName, ENetType inNetType)
 Protected constructor.

Protected Attributes

ENetType mNetType
 The net power type. See ENetType.
InstancePinSharedPtrVector mSources
 Vector of instance pin shared pointer sources for the net.
InstancePinSharedPtrVector mSinks
 Vector of instance pin shared pointer sinks for the net.
PipVector mPips
 Vector of pips for the net.

Friends

class Factory
 The Factory class has direct access to our internals.


Detailed Description

Physical design net.

The Net class owns its instance pins and its pips, and is responsible for deleting them.

Todo:
Consider checking for duplicates whenever a source, sink, or pip is added. On the other hand, we provide the functions to check for existing resources, so perhaps we can just leave it to the user.

Definition at line 41 of file Net.hpp.


Member Typedef Documentation

typedef std::string torc::physical::Net::string [protected]

Imported type name.

Reimplemented from torc::physical::ConfigMap.

Definition at line 49 of file Net.hpp.

typedef InstancePinSharedPtrVector::const_iterator torc::physical::Net::InstancePinSharedPtrConstIterator

Constant iterator to InstancePin shared pointer objects.

Definition at line 68 of file Net.hpp.

typedef InstancePinSharedPtrVector::iterator torc::physical::Net::InstancePinSharedPtrIterator

Non-constant iterator to InstancePin shared pointer objects.

Definition at line 70 of file Net.hpp.

typedef PipVector::const_iterator torc::physical::Net::PipConstIterator

Constant iterator to Pip objects.

Definition at line 72 of file Net.hpp.

typedef PipVector::iterator torc::physical::Net::PipIterator

Non-constant iterator to Pip objects.

Definition at line 74 of file Net.hpp.


Constructor & Destructor Documentation

torc::physical::Net::Net ( const string inName,
ENetType  inNetType 
) [inline, protected]

Protected constructor.

Parameters:
inName The net name.
inNetType The net power type.

Definition at line 63 of file Net.hpp.


Member Function Documentation

bool torc::physical::Net::containsSource ( InstancePinSharedPtr inInstancePinPtr  )  const [inline]

Determines whether the given instance pin is a source of this net.

Returns:
true if the given instance pin is a source of this net, or false otherwise.

Definition at line 78 of file Net.hpp.

bool torc::physical::Net::containsSink ( InstancePinSharedPtr inInstancePinPtr  )  const [inline]

Determines whether the given instance pin is a sink of this net.

Returns:
true if the given instance pin is a sink of this net, or false otherwise.

Definition at line 83 of file Net.hpp.

bool torc::physical::Net::containsPip ( const Pip inPip  )  const [inline]

Determines whether the net contains the given pip.

Returns:
true if the net contains the given pip, or false otherwise.

Definition at line 88 of file Net.hpp.

void torc::physical::Net::addSource ( InstancePinSharedPtr inInstancePinPtr  )  [inline]

Adds the given instance pin as a source for this net.

Duplicate sources are not currently discarded.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 93 of file Net.hpp.

void torc::physical::Net::addSink ( InstancePinSharedPtr inInstancePinPtr  )  [inline]

Adds the given instance pin as a sink for this net.

Duplicate sinks are not currently discarded.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 103 of file Net.hpp.

bool torc::physical::Net::removeSource ( InstancePinSharedPtr inInstancePinPtr  )  [inline]

Removes the given instance pin from the sources of this net.

Returns:
true if the instance pin was removed from the source list, or false if it was not found.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 114 of file Net.hpp.

bool torc::physical::Net::removeSink ( InstancePinSharedPtr inInstancePinPtr  )  [inline]

Removes the given instance pin from the sinks of this net.

Returns:
true if the instance pin was removed from the sink list, or false if it was not found.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 127 of file Net.hpp.

void torc::physical::Net::addPip ( const Pip inPip  )  [inline]

Adds the given pip to this net.

Duplicate pips are not currently discarded.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 139 of file Net.hpp.

bool torc::physical::Net::removePip ( const Pip inPip  )  [inline]

Removes the given pip from this net.

Returns:
true if the pip was removed from this net, or false if it was not found.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 147 of file Net.hpp.

void torc::physical::Net::unroute ( void   )  [inline]

Unroute the net.

The net is unrouted by clearing its pip list.

Definition at line 161 of file Net.hpp.

bool torc::physical::Net::hasAnySources ( void   )  const [inline]

Returns true if the net has any sources.

Definition at line 166 of file Net.hpp.

bool torc::physical::Net::hasOneSource ( void   )  const [inline]

Returns true if the net has exactly one source.

Definition at line 168 of file Net.hpp.

bool torc::physical::Net::hasMultipleSources ( void   )  const [inline]

Returns true if the net has more than one source.

Definition at line 170 of file Net.hpp.

size_t torc::physical::Net::getSourceCount ( void   )  const [inline]

Returns the number of sources on the net.

Definition at line 172 of file Net.hpp.

bool torc::physical::Net::hasAnySinks ( void   )  const [inline]

Returns true if the net has any sinks.

Definition at line 174 of file Net.hpp.

bool torc::physical::Net::hasOneSink ( void   )  const [inline]

Returns true if the net has exactly one sink.

Definition at line 176 of file Net.hpp.

bool torc::physical::Net::hasMultipleSinks ( void   )  const [inline]

Returns true if the next has more than one sink.

Definition at line 178 of file Net.hpp.

size_t torc::physical::Net::getSinkCount ( void   )  const [inline]

Returns the number of sinks on the net.

Definition at line 180 of file Net.hpp.

bool torc::physical::Net::hasAnyPips ( void   )  const [inline]

Returns true if the net has any pips.

Definition at line 182 of file Net.hpp.

size_t torc::physical::Net::getPipCount ( void   )  const [inline]

Returns the number of pips on the net.

Definition at line 184 of file Net.hpp.

bool torc::physical::Net::isRouted ( void   )  const [inline]

Returns true if the net has any pips.

Definition at line 186 of file Net.hpp.

bool torc::physical::Net::isUnrouted ( void   )  const [inline]

Returns true if the net has no pips.

Definition at line 188 of file Net.hpp.

InstancePinSharedPtrConstIterator torc::physical::Net::sourcesBegin ( void   )  const [inline]

Returns the begin constant iterator for source instance pins.

Definition at line 191 of file Net.hpp.

InstancePinSharedPtrConstIterator torc::physical::Net::sourcesEnd ( void   )  const [inline]

Returns the end constant iterator for source instance pins.

Definition at line 193 of file Net.hpp.

InstancePinSharedPtrIterator torc::physical::Net::sourcesBegin ( void   )  [inline]

Returns the begin non-constant iterator for source instance pins.

Definition at line 195 of file Net.hpp.

InstancePinSharedPtrIterator torc::physical::Net::sourcesEnd ( void   )  [inline]

Returns the end non-constant iterator for source instance pins.

Definition at line 197 of file Net.hpp.

InstancePinSharedPtrConstIterator torc::physical::Net::sinksBegin ( void   )  const [inline]

Returns the begin constant iterator for sink instance pins.

Definition at line 199 of file Net.hpp.

InstancePinSharedPtrConstIterator torc::physical::Net::sinksEnd ( void   )  const [inline]

Returns the end constant iterator for sink instance pins.

Definition at line 201 of file Net.hpp.

InstancePinSharedPtrIterator torc::physical::Net::sinksBegin ( void   )  [inline]

Returns the begin non-constant iterator for sink instance pins.

Definition at line 203 of file Net.hpp.

InstancePinSharedPtrIterator torc::physical::Net::sinksEnd ( void   )  [inline]

Returns the end non-constant iterator for sink instance pins.

Definition at line 205 of file Net.hpp.

PipConstIterator torc::physical::Net::pipsBegin ( void   )  const [inline]

Returns the begin constant iterator for pips.

Definition at line 207 of file Net.hpp.

PipConstIterator torc::physical::Net::pipsEnd ( void   )  const [inline]

Returns the end constant iterator for pips.

Definition at line 209 of file Net.hpp.

PipIterator torc::physical::Net::pipsBegin ( void   )  [inline]

Returns the begin non-constant iterator for pips.

Definition at line 211 of file Net.hpp.

PipIterator torc::physical::Net::pipsEnd ( void   )  [inline]

Returns the end non-constant iterator for pips.

Definition at line 213 of file Net.hpp.

ENetType torc::physical::Net::getNetType ( void   )  const [inline]

Returns the net power type. See ENetPowerType.

Definition at line 216 of file Net.hpp.

void torc::physical::Net::setNetType ( ENetType  inNetType  )  [inline]

Sets the net power type. See ENetPowerType.

Definition at line 218 of file Net.hpp.

bool torc::physical::Net::operator== ( const Net rhs  )  const [inline]

Equality operator.

This function deems nets equal if their names are identical.

Parameters:
rhs The net to compare against.
Returns:
true if both net names are identical, or false otherwise.

Definition at line 224 of file Net.hpp.


Friends And Related Function Documentation

friend class Factory [friend]

The Factory class has direct access to our internals.

Reimplemented from torc::physical::Progenitor< T >.

Definition at line 45 of file Net.hpp.


Member Data Documentation

The net power type. See ENetType.

Definition at line 52 of file Net.hpp.

Vector of instance pin shared pointer sources for the net.

Definition at line 54 of file Net.hpp.

Vector of instance pin shared pointer sinks for the net.

Definition at line 56 of file Net.hpp.

Vector of pips for the net.

Definition at line 58 of file Net.hpp.


The documentation for this class was generated from the following file:

Generated on Thu Oct 13 16:50:48 2011 for TORC by  doxygen 1.5.6