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

Represents an information container relating to the writer of the EDIF file. More...

#include <Written.hpp>

+ Inheritance diagram for torc::generic::Written:
+ Collaboration diagram for torc::generic::Written:

Data Structures

class  Factory
 

Public Types

typedef Written Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

const TimeStamp getTimeStamp () const
 
void setTimeStamp (const TimeStamp &inTimeStamp)
 
const std::string getAuthorName () const
 
void setAuthorName (const std::string &inAuthorName)
 
const std::string getProgramName () const
 
void setProgramName (const std::string &inProgramName)
 
const std::string getProgramVersion () const
 
void setProgramVersion (const std::string &inProgramVersion)
 
const std::string getDataOriginLocationName () const
 
void setDataOriginLocationName (const std::string &value)
 
const std::string getDataOriginVersion () const
 
void setDataOriginVersion (const std::string &inDataOriginVersion)
 
 Written ()
 
 ~Written () throw ()
 
void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
PropertySharedPtr getProperty (const std::string &inName)
 
bool setProperty (const std::string &inName, const PropertySharedPtr &inProperty)
 
void getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const
 
void setProperties (const std::map< std::string, PropertySharedPtr > &inSource)
 
template<typename _Action >
void applyOnAllProperties (const _Action &action) throw (Error)
 
void getUserData (std::list< std::string > &outUserData) const
 
void setUserData (const std::list< std::string > &inSource)
 
void addUserData (const std::string &inSource)
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 

Private Attributes

TimeStamp mTimeStamp
 
std::string mAuthorName
 
std::string mProgramName
 
std::string mProgramVersion
 
std::string mDataOriginLocationName
 
std::string mDataOriginVersion
 

Friends

class FactoryType< Written >
 

Detailed Description

Represents an information container relating to the writer of the EDIF file.

Definition at line 33 of file Written.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<Type> torc::generic::SelfReferencing< Written >::Pointer
inherited

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

typedef boost::weak_ptr<Type> torc::generic::SelfReferencing< Written >::WeakPointer
inherited

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::Written::Written ( )
torc::generic::Written::~Written ( )
throw (
)

Definition at line 116 of file Written.cpp.

116 {}

Member Function Documentation

void torc::generic::Commentable::addComment ( const std::string &  comment)
inherited

Add a comment to the object

Parameters
[in]commentThe comment to add to an existing list of comments

Definition at line 36 of file Commentable.cpp.

36  {
37  mComments.push_back(comment);
38 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::UserDataContainer::addUserData ( const std::string &  inSource)
inherited

Add an user data to the list of user data

Parameters
[in]inSourceAn user data as string

Definition at line 34 of file UserDataContainer.cpp.

34  {
35  mUserData.push_back(inSource);
36 }
std::list< std::string > mUserData
template<typename _Action >
void torc::generic::PropertyContainer::applyOnAllProperties ( const _Action &  action)
throw (Error
)
inlineinherited

Apply action on all properties.

Parameters
[in]actionAction to be applied

Definition at line 113 of file PropertyContainer.hpp.

114  {
115  try {
116  mProperties.applyOnAll(action);
117  } catch(Error& e) {
118  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
119  throw;
120  }
121 }
void applyOnAll(const _Action &action)
Definition: SymTab.hpp:192
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

const std::string torc::generic::Written::getAuthorName ( ) const
inline

Get author name

Returns
mAuthorName

Definition at line 180 of file Written.hpp.

180  {
181  return mAuthorName;
182 }
std::string mAuthorName
Definition: Written.hpp:159
const std::vector< std::string > & torc::generic::Commentable::getComments ( ) const
inlineinherited

Get the list of all comments

Returns
A list of all comments on this object

Definition at line 85 of file Commentable.hpp.

85  {
86  return mComments;
87 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
const std::string torc::generic::Written::getDataOriginLocationName ( ) const
inline

Get Data origin location name

Returns
mDataOriginLocationName

Definition at line 207 of file Written.hpp.

207  {
209 }
std::string mDataOriginLocationName
Definition: Written.hpp:162
const std::string torc::generic::Written::getDataOriginVersion ( ) const
inline

Get Data origin version

Returns
mDataOriginVersion

Get DataOrigin version

Returns
mDataOriginVersion

Definition at line 216 of file Written.hpp.

216  {
217  return mDataOriginVersion;
218 }
std::string mDataOriginVersion
Definition: Written.hpp:163
const std::string torc::generic::Written::getProgramName ( ) const
inline

Get program name

Returns
mProgramName

Definition at line 189 of file Written.hpp.

189  {
190  return mProgramName;
191 }
std::string mProgramName
Definition: Written.hpp:160
const std::string torc::generic::Written::getProgramVersion ( ) const
inline

Get program version

Returns
mProgramVersion

Definition at line 198 of file Written.hpp.

198  {
199  return mProgramVersion;
200 }
std::string mProgramVersion
Definition: Written.hpp:161
void torc::generic::PropertyContainer::getProperties ( std::map< std::string, PropertySharedPtr > &  outProperties) const
inlineinherited

Get the map of all properties

Parameters
[out]outPropertiesThe map of properties

Get the map of all properties

Returns
The map of properties

Definition at line 107 of file PropertyContainer.hpp.

108  {
109  mProperties.getValueMap(outProperties);
110  return;
111 }
void getValueMap(UserMap &outMap) const
Definition: SymTab.hpp:171
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

PropertySharedPtr torc::generic::PropertyContainer::getProperty ( const std::string &  inName)
inherited

Get a property

Parameters
[in]inNameName of the property to be retreived
Returns
Pointer to the property object if present, empty pointer otherwise.

Get a property

Parameters
[in]nameName of the property to be retreived
Returns
Pointer to the property object if present, empty pointer otherwise.

Definition at line 37 of file PropertyContainer.cpp.

37  {
38  PropertySharedPtr property;
39  if(!inName.empty()) {
40  mProperties.get(inName, property);
41  }
42  return property;
43 }
bool get(const KeyType &inKey, ValueType &outValue) const
Definition: SymTab.hpp:121
SymTab< std::string, PropertySharedPtr > mProperties
boost::shared_ptr< Property > PropertySharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Pointer torc::generic::SelfReferencing< Written >::getSharedThis ( ) const
inlineinherited

Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.

Returns
A shared pointer to this object

Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.

Parameters
[out]ptrSet to a shared pointer to this object
const TimeStamp torc::generic::Written::getTimeStamp ( ) const
inline

Get the time stamp

Returns
mTimeStamp The time in Universal Time Coordinate (year, month, day, hour, minute, second))

Definition at line 171 of file Written.hpp.

171  {
172  return mTimeStamp;
173 }
void torc::generic::UserDataContainer::getUserData ( std::list< std::string > &  outUserData) const
inlineinherited

Get the list of all userData

Parameters
[out]outUserDataThe list of all userData

Definition at line 78 of file UserDataContainer.hpp.

78  {
79  outUserData.insert(outUserData.end(), mUserData.begin(), mUserData.end());
80  return;
81 }
std::list< std::string > mUserData
void torc::generic::Written::setAuthorName ( const std::string &  inAuthorName)

Set author name

Parameters
[in]inAuthorNameName of the author

Definition at line 72 of file Written.cpp.

72  {
73  mAuthorName = inAuthorName;
74 }
std::string mAuthorName
Definition: Written.hpp:159
void torc::generic::Commentable::setComments ( const std::vector< std::string > &  inSource)
inherited

Get the list of all comments

Parameters
[in]inSourceA list of all comments to be set on this object

Definition at line 45 of file Commentable.cpp.

45  {
46  mComments.insert(mComments.end(), inSource.begin(), inSource.end());
47 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::Written::setDataOriginLocationName ( const std::string &  value)

Set Data origin location name

Parameters
[in]valueData Origin Location Name

Definition at line 99 of file Written.cpp.

99  {
100  mDataOriginLocationName = value;
101 }
std::string mDataOriginLocationName
Definition: Written.hpp:162
void torc::generic::Written::setDataOriginVersion ( const std::string &  inDataOriginVersion)

Set Data origin version

Parameters
[in]inDataOriginVersionVersion of the DataOrigin

Set DataOrigin version

Parameters
[in]inDataOriginVersionVersion of the DataOrigin

Definition at line 108 of file Written.cpp.

108  {
109  mDataOriginVersion = inDataOriginVersion;
110 }
std::string mDataOriginVersion
Definition: Written.hpp:163
void torc::generic::Written::setProgramName ( const std::string &  inProgramName)

Set program name

Parameters
[in]inProgramNameName of the program

Definition at line 81 of file Written.cpp.

81  {
82  mProgramName = inProgramName;
83 }
std::string mProgramName
Definition: Written.hpp:160
void torc::generic::Written::setProgramVersion ( const std::string &  inProgramVersion)

Set program version

Parameters
[in]inProgramVersionVersion of the program

Definition at line 90 of file Written.cpp.

90  {
91  mProgramVersion = inProgramVersion;
92 }
std::string mProgramVersion
Definition: Written.hpp:161
void torc::generic::PropertyContainer::setProperties ( const std::map< std::string, PropertySharedPtr > &  inSource)
inherited

Set the map of properties

Parameters
[in]inSourceThe map of properties

Definition at line 66 of file PropertyContainer.cpp.

66  {
67  std::map<std::string, PropertySharedPtr>::const_iterator it = inSource.begin();
68  for(; it != inSource.end(); it++) {
69  setProperty((*it).first, (*it).second);
70  }
71 }
bool setProperty(const std::string &inName, const PropertySharedPtr &inProperty)

+ Here is the call graph for this function:

bool torc::generic::PropertyContainer::setProperty ( const std::string &  inName,
const PropertySharedPtr inProperty 
)
inherited

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPropertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPopertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Definition at line 53 of file PropertyContainer.cpp.

54  {
55  if(!inName.empty()) {
56  return mProperties.set(inName, inProperty);
57  }
58  return false;
59 }
bool set(const KeyType &inKey, const ValueType &inValue)
Definition: SymTab.hpp:132
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::Written::setTimeStamp ( const TimeStamp inTimeStamp)

Set time stamp

Parameters
[in]inTimeStampTimeStamp in Universal Time Coordinate.

Definition at line 63 of file Written.cpp.

63  {
64  mTimeStamp = inTimeStamp;
65 }
void torc::generic::UserDataContainer::setUserData ( const std::list< std::string > &  inSource)
inherited

Set the list of userData

Parameters
[in]inSourceThe list of UserData

Definition at line 26 of file UserDataContainer.cpp.

26  {
27  mUserData.insert(mUserData.end(), inSource.begin(), inSource.end());
28 }
std::list< std::string > mUserData
void torc::generic::SelfReferencing< Written >::setWeakThis ( const WeakPointer inWeakThis)
inlineinherited

Set a weak pointer to this object. This will be used later to get a shared pointer to this object from within other member methods if required. This should be called by the Factory creating the object.

Parameters
[in]weakThisA weak pointer to this object

Friends And Related Function Documentation

friend class FactoryType< Written >
friend

Definition at line 36 of file Written.hpp.

Field Documentation

std::string torc::generic::Written::mAuthorName
private

Definition at line 159 of file Written.hpp.

std::string torc::generic::Written::mDataOriginLocationName
private

Definition at line 162 of file Written.hpp.

std::string torc::generic::Written::mDataOriginVersion
private

Definition at line 163 of file Written.hpp.

std::string torc::generic::Written::mProgramName
private

Definition at line 160 of file Written.hpp.

std::string torc::generic::Written::mProgramVersion
private

Definition at line 161 of file Written.hpp.

TimeStamp torc::generic::Written::mTimeStamp
private

Definition at line 158 of file Written.hpp.


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