torc::generic::View Class Reference

Represents and EDIF View. More...

#include <View.hpp>

Inheritance diagram for torc::generic::View:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::View:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  eTypeMaskLayout = 0, eTypePCBLayout, eTypeNetlist, eTypeSchematic,
  eTypeSymbolic, eTypeBehavior, eTypeLogicModel, eTypeDocument,
  eTypeGraphic, eTypeStranger
}
typedef VisitorType< ViewVisitor

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
ParameterContext getParameterContext () const throw ()
ParameterMapSharedPtr getParameters () throw (Error)
void setParameters (const ParameterMapSharedPtr &inSource) throw ()
const Type getType () const throw ()
void setType (const Type &inSource) throw ()
void getInstances (std::vector< InstanceSharedPtr > &outInstances) const throw ()
void setInstances (const std::vector< InstanceSharedPtr > &inSource) throw (Error)
void addInstance (const InstanceSharedPtr &inInstance) throw (Error)
InstanceSharedPtr findInstance (const std::string &inName) throw ()
void removeInstance (const std::string &inName) throw (Error)
template<typename _Action>
void applyOnAllInstances (const _Action &action) throw (Error)
void getNets (std::vector< NetSharedPtr > &outNets) const throw ()
void setNets (const std::vector< NetSharedPtr > &inSource) throw (Error)
void addNet (const NetSharedPtr &inNet) throw (Error)
NetSharedPtr findNet (const std::string &inName) throw ()
void removeNet (const std::string &inName) throw (Error)
template<typename _Action>
void applyOnAllNets (const _Action &action) throw (Error)
void getPorts (std::vector< PortSharedPtr > &outPorts) const throw ()
void setPorts (const std::vector< PortSharedPtr > &inSource) throw (Error)
void addPort (const PortSharedPtr &inPort) throw (Error)
PortSharedPtr findPort (const std::string &inName) throw ()
void removePort (const std::string &inName) throw (Error)
template<typename _Action>
void applyOnAllPorts (const _Action &action) throw (Error)
void getPermutables (std::vector< PermutableSharedPtr > &outPermutables) const throw ()
void setPermutables (const std::vector< PermutableSharedPtr > &inSource) throw (Error)
bool addPermutable (const PermutableSharedPtr &inPermutable) throw (Error)
template<typename _Action>
void applyOnAllPermutables (const _Action &action) throw (Error)
void getInterfaceJoinedInfos (std::vector< InterfaceJoinedInfoSharedPtr > &outJoinedInfos) const throw ()
void setInterfaceJoinedInfos (const std::vector< InterfaceJoinedInfoSharedPtr > &inSource) throw (Error)
bool addInterfaceJoinedInfo (const InterfaceJoinedInfoSharedPtr &inJoinedInfo) throw (Error)
template<typename _Action>
void applyOnAllInterfaceJoinedInfos (const _Action &action) throw (Error)
const InterfaceAttributesSharedPtr getInterfaceAttributes () const throw ()
void setInterfaceAttributes (const InterfaceAttributesSharedPtr &inSource) throw ()
const std::string & getNonNetlistViewData () const throw ()
void setNonNetlistViewData (const std::string &inData) throw ()
const SimulateSharedPtr getSimulate () const throw ()
void setSimulate (const SimulateSharedPtr &inSource) throw ()
const TimingSharedPtr getTiming () const throw ()
void setTiming (const TimingSharedPtr &inSource) throw ()

Private Attributes

ParameterMapSharedPtr mParameters
ParameterContext mMyContext
SymTab< std::string,
InstanceSharedPtr > 
mInstanceSymTab
SymTab< std::string, NetSharedPtr > mNetSymTab
SymTab< std::string,
PortSharedPtr > 
mPortSymTab
std::string mNonNetlistViewData
Type mType
std::vector< PermutableSharedPtr > mPermutables
std::vector
< InterfaceJoinedInfoSharedPtr > 
mInterfaceJoinedInfos
InterfaceAttributesSharedPtr mAttributes
SimulateSharedPtr mSimulate
TimingSharedPtr mTiming

Friends

class FactoryType< View >

Classes

class  Factory


Detailed Description

Represents and EDIF View.

The View class represents an EDIF view. A view can be conrete or extern (black-box).

Note:
Only views of type NETLIST are supported.

Definition at line 64 of file View.hpp.


Member Typedef Documentation

Convenience

Definition at line 105 of file View.hpp.


Member Enumeration Documentation

Type of the view

Definition at line 88 of file View.hpp.


Member Function Documentation

void torc::generic::View::accept ( BaseVisitor inoutVisitor  )  throw (Error) [virtual]

Recive a inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This sitation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.

Parameters:
[in,out] inoutVisitor A reference to the inoutVisitor object
Exceptions:
Error Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method.

Implements torc::generic::Visitable.

Definition at line 110 of file View.cpp.

ParameterContext torc::generic::View::getParameterContext (  )  const throw () [inline]

Returns the context that will be used to get parameters from the parameter map. For an unbound instance, this will return an invalid value

Definition at line 702 of file View.hpp.

ParameterMapSharedPtr torc::generic::View::getParameters (  )  throw (Error)

Get the ParameterMap corresponding to this cell

Returns:
A ParameterMap consisiting of only the overridden parameters.

Definition at line 124 of file View.cpp.

const View::Type torc::generic::View::getType ( void   )  const throw () [inline]

Get the type of view.

Returns:
Type of view

Definition at line 712 of file View.hpp.

void torc::generic::View::setType ( const Type inSource  )  throw ()

Set the type of view

Parameters:
[in] inSource Type of view

Definition at line 138 of file View.cpp.

void torc::generic::View::getInstances ( std::vector< InstanceSharedPtr > &  outInstances  )  const throw () [inline]

Get the list of instances for this view.

Parameters:
[out] outInstances List of instances to be appended to

Definition at line 717 of file View.hpp.

void torc::generic::View::setInstances ( const std::vector< InstanceSharedPtr > &  inSource  )  throw (Error)

Set the list of instances to this view. It will lead to a linear traversal on the list. So usage of this API is not recommended.

Parameters:
[in] inSource List of instances.
Set the list of instances to this view.

Parameters:
[in] inSource List of instances.

Definition at line 148 of file View.cpp.

void torc::generic::View::addInstance ( const InstanceSharedPtr &  inInstance  )  throw (Error)

Add an instance to the list of instances. Empty pointer is ignored.

Parameters:
[in] inInstance Pointer to instance to be added.
Exceptions:
Error Could not add instance because pointer to the Instance does not exist
  • Id : eMessageIdErrorPointerToItemDoesNotExist
  • Context Data
    • Pointer to Instance - boost::shared_ptr
Error Could not add instance because Instance name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
Error Could not add instance because Instance name already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data
Add an instance to the list of instances. Empty pointer is ignored.

Parameters:
[in] inInstance Pointer to instance to be added.
Exceptions:
Error Could not add instance because pointer to the Instance does not exist
Error Could not add instance because Instance name is empty
Error Could not add instance because Instance name already exists

Definition at line 177 of file View.cpp.

InstanceSharedPtr torc::generic::View::findInstance ( const std::string &  inName  )  throw ()

Find an instance by name, in the list of instances.

Parameters:
[in] inName String inSource specifying the name of the instance.
Returns:
A pointer to the instance if found, an empty pointer otherwise.
Exceptions:
Error Empty Instance name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
Find an instance by name, in the list of instances.

Parameters:
[in] inName String inSource specifying the name of the instance.
Returns:
A pointer to the instance if found, an empty pointer otherwise.
Exceptions:
Error Empty Instance name

Definition at line 214 of file View.cpp.

void torc::generic::View::removeInstance ( const std::string &  inName  )  throw (Error)

Remove the specified instance from the list of cells.

Parameters:
inName Name of the object to be delete
Exceptions:
Error Empty Instance name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
Error Instance name not preset in collection.
  • Id : eMessageIdErrorItemNotFound
  • Context Data
Remove the specified instance from the list of cells. If an empty pointer is passed, it returns without doing anything

Parameters:
inInstance Pointer to an instance object.
Exceptions:
Error Empty Instance name
Error Instance name not preset in collection.

Definition at line 236 of file View.cpp.

template<typename _Action>
void torc::generic::View::applyOnAllInstances ( const _Action &  action  )  throw (Error) [inline]

Apply action on all Instances.

Parameters:
[in] action Action to be applied

Definition at line 726 of file View.hpp.

void torc::generic::View::getNets ( std::vector< NetSharedPtr > &  outNets  )  const throw () [inline]

Get the list of nets for this view.

Parameters:
[out] outNets List of nets to be appended to

Definition at line 740 of file View.hpp.

void torc::generic::View::setNets ( const std::vector< NetSharedPtr > &  inSource  )  throw (Error)

Set the list of nets to this view. It will lead to a linear traversal on the list. So usage of this API is not recommended.

Parameters:
[in] inSource List of nets.
Set the list of nets to this view.

Parameters:
[in] inSource List of nets.

Definition at line 275 of file View.cpp.

void torc::generic::View::addNet ( const NetSharedPtr &  inNet  )  throw (Error)

Add a net to the list of nets. Empty pointer is ignored.

Parameters:
[in] inNet Pointer to net to be added.
Exceptions:
Error Could not add Net, because Net name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Net name - String
Error Could not add Net, because Net name already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data
    • Net name - String
Add a net to the list of nets. Empty pointer is ignored.

Parameters:
[in] inNet Pointer to net to be added.
Exceptions:
Error Could not add Net, because Net name is empty
Error Could not add Net, because Net name already exists

Definition at line 305 of file View.cpp.

NetSharedPtr torc::generic::View::findNet ( const std::string &  inName  )  throw ()

Find a net by name, in the list of net.

Parameters:
[in] inName String inSource specifying the name of the Net
Returns:
A pointer to the net if found, an empty pointer otherwise.
Exceptions:
Error Empty Net name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Net name - String
Find a net by name, in the list of net.

Parameters:
[in] inName String inSource specifying the name of the Net
Returns:
A pointer to the net if found, an empty pointer otherwise.
Exceptions:
Error Empty Net name

Definition at line 337 of file View.cpp.

void torc::generic::View::removeNet ( const std::string &  inName  )  throw (Error)

Remove the specified net from the list of nets. If an empty pointer is passed, it returns without doing anything

Parameters:
inName Name of the object to be delete
Exceptions:
Error Empty Net name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Net name - String
Error Net not preset in collection.
  • Id : eMessageIdErrorItemNotFound
  • Context Data
    • Net name - String
Remove the specified net from the list of nets. If an empty pointer is passed, it returns without doing anything

Parameters:
inNet Pointer to a net object.
Exceptions:
Error Empty Net name
Error Net not preset in collection.

Definition at line 359 of file View.cpp.

template<typename _Action>
void torc::generic::View::applyOnAllNets ( const _Action &  action  )  throw (Error) [inline]

Apply action on all Nets.

Parameters:
[in] action Action to be applied

Definition at line 748 of file View.hpp.

void torc::generic::View::getPorts ( std::vector< PortSharedPtr > &  outPorts  )  const throw () [inline]

Get the list of ports for this view.

Parameters:
[out] outPorts List of ports to be appended to

Definition at line 762 of file View.hpp.

void torc::generic::View::setPorts ( const std::vector< PortSharedPtr > &  inSource  )  throw (Error)

Set the list of ports to this view. It will lead to a linear traversal on the list. So usage of this API is not recommended.

Parameters:
[in] inSource List of ports
Set the list of ports to this view.

Parameters:
[in] inSource List of ports

Definition at line 382 of file View.cpp.

void torc::generic::View::addPort ( const PortSharedPtr &  inPort  )  throw (Error)

Add a port to the list of ports. Empty pointer is ignored.

Parameters:
[in] inPort Pointer to port to be added.
Exceptions:
Error Could not add port, because Port name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Port name - String
Error Could not add port, because Port name already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data
Add a port to the list of ports. Empty pointer is ignored.

Parameters:
[in] inPort Pointer to port to be added.
Exceptions:
Error Could not add port, because Port name is empty

Definition at line 409 of file View.cpp.

PortSharedPtr torc::generic::View::findPort ( const std::string &  inName  )  throw ()

Find a port by name, in the list of ports.

Parameters:
[in] inName String inSource specifying the name of the port.
Returns:
A pointer to the port if found, an empty pointer otherwise.
Exceptions:
Error Empty Port name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Port Name - String
Find a port by name, in the list of ports.

Parameters:
[in] inName String inSource specifying the name of the port.
Returns:
A pointer to the port if found, an empty pointer otherwise.
Exceptions:
Error Empty Port name

Definition at line 443 of file View.cpp.

void torc::generic::View::removePort ( const std::string &  inName  )  throw (Error)

Remove the specified port from the list of ports.

Parameters:
inName Name of the port to be removed
Exceptions:
Error Empty Port name
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Port name - String
Error Port not preset in collection.
  • Id : eMessageIdErrorItemNotFound
  • Context Data
    • Port name - String
Remove the specified port from the list of ports. If an empty pointer is passed, it returns without doing anything

Parameters:
inName Name of the port to be removed
Exceptions:
Error Empty Port name
Error Port not preset in collection.

Definition at line 465 of file View.cpp.

template<typename _Action>
void torc::generic::View::applyOnAllPorts ( const _Action &  action  )  throw (Error) [inline]

Apply action on all Ports.

Parameters:
[in] action Action to be applied

Definition at line 770 of file View.hpp.

void torc::generic::View::getPermutables ( std::vector< PermutableSharedPtr > &  outPermutables  )  const throw () [inline]

Get the vector of permutables for this view.

Parameters:
[out] outPermutables Vector of permutable to be appended to

Definition at line 795 of file View.hpp.

void torc::generic::View::setPermutables ( const std::vector< PermutableSharedPtr > &  inSource  )  throw (Error)

Set the vector of permutables to this view. It will lead to a linear traversal on the list.

Parameters:
[in] inSource Vector of permutables to this view.
Exceptions:
Error Could not add permutable because pointer to the permutable does not exist
Set the vector of permutables to this view. It will lead to a linear traversal on the list. So usage of this API is not recommended.

Parameters:
[in] inSource Vector of permutables to this view.
Exceptions:
Error Could not add permutable because pointer to the permutable does not exist

Definition at line 495 of file View.cpp.

bool torc::generic::View::addPermutable ( const PermutableSharedPtr &  inPermutable  )  throw (Error)

Add a permutable to this view.

Parameters:
[in] inPermutable Pointer to permutable to be added.
Exceptions:
Error Could not add permutable because pointer to the permutable does not exist

Definition at line 521 of file View.cpp.

template<typename _Action>
void torc::generic::View::applyOnAllPermutables ( const _Action &  action  )  throw (Error) [inline]

Apply action on all Permutables.

Parameters:
[in] action Action to be applied
Apply action on all children.
Parameters:
[in] action Action to be applied

Definition at line 808 of file View.hpp.

void torc::generic::View::getInterfaceJoinedInfos ( std::vector< InterfaceJoinedInfoSharedPtr > &  outJoinedInfos  )  const throw () [inline]

Get the vector of joined info for this view.

Parameters:
[out] outJoinedInfos Vector of joined info to be appended to

Definition at line 830 of file View.hpp.

void torc::generic::View::setInterfaceJoinedInfos ( const std::vector< InterfaceJoinedInfoSharedPtr > &  inSource  )  throw (Error)

Set the vector of joined info for this view.

Parameters:
[in] inSource Vector of joined info to this view.
Exceptions:
Error Could not add joined info because pointer to the joined info does not exist

Definition at line 546 of file View.cpp.

bool torc::generic::View::addInterfaceJoinedInfo ( const InterfaceJoinedInfoSharedPtr &  inJoinedInfo  )  throw (Error)

Add a joined info to this view.

Parameters:
[in] inJoinedInfo Pointer to joined info to be added.
Exceptions:
Error Could not add joined info because pointer to the joined info does not exist

Definition at line 572 of file View.cpp.

template<typename _Action>
void torc::generic::View::applyOnAllInterfaceJoinedInfos ( const _Action &  action  )  throw (Error) [inline]

Apply action on all joined info.

Parameters:
[in] action Action to be applied

Definition at line 845 of file View.hpp.

const InterfaceAttributesSharedPtr torc::generic::View::getInterfaceAttributes (  )  const throw () [inline]

Get the attributes of a view interface. Attributes include designator, simulate, timing, comments, userdata etc. This will decompile within (contents ...) construct.

Returns:
Pointer to InterfaceAttributes object.
Get the attributes of a view interface. Attributes include designator, comments, userdata etc.

Returns:
Pointer to InterfaceAttributes object.

Definition at line 868 of file View.hpp.

void torc::generic::View::setInterfaceAttributes ( const InterfaceAttributesSharedPtr &  inSource  )  throw ()

Set the attributes of a view interface. Attributes include designator, simulate, timing, comments, userdata etc. This will decompile within (contents ...) construct.

Parameters:
[in] inSource Pointer to InterfaceAttributes object.

Definition at line 598 of file View.cpp.

const SimulateSharedPtr torc::generic::View::getSimulate (  )  const throw () [inline]

Get the pointer to the simulate.

Returns:
Pointer to the simulatie

Definition at line 878 of file View.hpp.

void torc::generic::View::setSimulate ( const SimulateSharedPtr &  inSource  )  throw ()

Set the pointer to the simulate.

Parameters:
[in] inSource Pointer to the simulate

Definition at line 609 of file View.cpp.

const TimingSharedPtr torc::generic::View::getTiming (  )  const throw () [inline]

Get the pointer to the timing object

Returns:
Pointer to the timing object

Definition at line 888 of file View.hpp.

void torc::generic::View::setTiming ( const TimingSharedPtr &  inSource  )  throw ()

Set the pointer to the timing object

Parameters:
[in] inSource Pointer to the timing object

Definition at line 619 of file View.cpp.


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

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