The SoDa Base class.
More...
#include <SoDaBase.hxx>
|
| | Base (const std::string &oname) |
| | The constructor – pass a name for the object.
|
| void | registerSelf (BasePtr ptr) |
| std::string & | getObjName () |
| | get the name of this object
|
| BasePtr | findSoDaObject (const std::string &oname) |
| | find a SoDa Object by name.
|
| double | getTime () |
| | Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS).
|
| BasePtr | getSelfPtr () |
| | get a pointer to myself.
|
|
| static bool | first_time |
| | have we seen the first call to getTime?
|
| static double | base_first_time |
| | time of first call to getTime from anyone.
|
| static std::map< std::string, BasePtr > | object_directory |
| | a class member – directory of all registered objects.
|
The SoDa Base class.
All persistent soda objects of any size are given a NAME so that the SoDa::Exception class can show who is complaining for a given exception.
Definition at line 105 of file SoDaBase.hxx.
◆ Base()
| SoDa::Base::Base |
( |
const std::string & | oname | ) |
|
The constructor – pass a name for the object.
- Parameters
-
| oname | The name of the object. Uniqueness is helpful, but not necessary. The first object with a given name will be entered into the directory Objects can be retrieved from the directory by name with the findSoDaObject function. |
◆ findSoDaObject()
| BasePtr SoDa::Base::findSoDaObject |
( |
const std::string & | oname | ) |
|
find a SoDa Object by name.
- Parameters
-
| oname | a string that names the object |
- Returns
- a pointer to the SoDaBase object (NULL if the name isn't found)
◆ getObjName()
| std::string & SoDa::Base::getObjName |
( |
| ) |
|
|
inline |
◆ getSelfPtr()
◆ getTime()
| double SoDa::Base::getTime |
( |
| ) |
|
Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS).
- Returns
- a monotonically increasing timestamp in nS since an arbitrary time in the past.
◆ registerSelf()
| void SoDa::Base::registerSelf |
( |
BasePtr | ptr | ) |
|
◆ base_first_time
| double SoDa::Base::base_first_time |
|
staticprivate |
time of first call to getTime from anyone.
Definition at line 151 of file SoDaBase.hxx.
◆ first_time
| bool SoDa::Base::first_time |
|
staticprivate |
have we seen the first call to getTime?
Definition at line 150 of file SoDaBase.hxx.
◆ object_directory
| std::map<std::string, BasePtr > SoDa::Base::object_directory |
|
staticprivate |
a class member – directory of all registered objects.
Definition at line 153 of file SoDaBase.hxx.
◆ objname
| std::string SoDa::Base::objname |
|
private |
◆ self
| std::weak_ptr<Base> SoDa::Base::self |
|
private |
The documentation for this class was generated from the following file: