torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::common::Annotated Class Reference

Concept for any object that can be annotated. More...

#include <Annotated.hpp>

+ Inheritance diagram for torc::common::Annotated:

Public Types

enum  EAnnotationType {
  ePlacerInstanceTypeIndex, ePlacerInstanceSitePtr, ePlacerInstanceDependentInstanceAbove, ePlacerInstanceDependsOnInstanceBelow,
  eRouterNetTilewireSources, eRouterNetTilewireSinks, eRouterNetArcList, eRouterNetRouteNodePtrVector,
  eRouterNetRouteTime, eRouterNetArcVector, eAnnotationGlobalRouter, eAnnotationCount
}
 Enumeration for all types of annotations. More...
 

Public Member Functions

 Annotated ()
 Default constructor containing no annotations. More...
 
 ~Annotated ()
 Destructor. More...
 
boost::any getAnnotation (uint32 inKey)
 Get an annotation. Returns an empty annotation if the index doesn't exist. More...
 
void setAnnotation (uint32 inKey, boost::any inValue)
 Set an annotation. More...
 
void removeAnnotation (uint32 inKey)
 Remove an annotation. More...
 
bool hasAnnotation (uint32 inKey)
 Check if an annotation exists. More...
 

Protected Attributes

boost::unordered_map
< boost::uint32_t, boost::any > 
mAnnotations
 Map containing any annotations. More...
 

Private Types

typedef boost::uint32_t uint32
 

Detailed Description

Concept for any object that can be annotated.

Definition at line 29 of file Annotated.hpp.

Member Typedef Documentation

typedef boost::uint32_t torc::common::Annotated::uint32
private

Definition at line 30 of file Annotated.hpp.

Member Enumeration Documentation

Enumeration for all types of annotations.

Enumerator
ePlacerInstanceTypeIndex 
ePlacerInstanceSitePtr 
ePlacerInstanceDependentInstanceAbove 
ePlacerInstanceDependsOnInstanceBelow 
eRouterNetTilewireSources 
eRouterNetTilewireSinks 
eRouterNetArcList 
eRouterNetRouteNodePtrVector 
eRouterNetRouteTime 
eRouterNetArcVector 
eAnnotationGlobalRouter 
eAnnotationCount 

Definition at line 57 of file Annotated.hpp.

Constructor & Destructor Documentation

torc::common::Annotated::Annotated ( )
inline

Default constructor containing no annotations.

Definition at line 39 of file Annotated.hpp.

39 {}
torc::common::Annotated::~Annotated ( )
inline

Destructor.

Definition at line 41 of file Annotated.hpp.

41 {}

Member Function Documentation

boost::any torc::common::Annotated::getAnnotation ( uint32  inKey)
inline

Get an annotation. Returns an empty annotation if the index doesn't exist.

Definition at line 45 of file Annotated.hpp.

45 { return mAnnotations[inKey]; }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

bool torc::common::Annotated::hasAnnotation ( uint32  inKey)
inline

Check if an annotation exists.

Definition at line 51 of file Annotated.hpp.

51  {
52  return (mAnnotations.find(inKey) != mAnnotations.end());
53  }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

void torc::common::Annotated::removeAnnotation ( uint32  inKey)
inline

Remove an annotation.

Definition at line 49 of file Annotated.hpp.

49 { mAnnotations.erase(inKey); }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

void torc::common::Annotated::setAnnotation ( uint32  inKey,
boost::any  inValue 
)
inline

Set an annotation.

Definition at line 47 of file Annotated.hpp.

47 { mAnnotations[inKey] = inValue; }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

Field Documentation

boost::unordered_map<boost::uint32_t, boost::any> torc::common::Annotated::mAnnotations
protected

Map containing any annotations.

Definition at line 34 of file Annotated.hpp.


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