Basic Image AlgorithmS Library
2.8.0
|
interface class for producing/storing Universally Unique IDentifiers More...
#include <Base/Image/UUID.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | AssignUUID (const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY) |
function to assign a fresh, unique ID. More... | |
void | AssignUUID_Consecutive () |
jw More... | |
void | AssignUUID_Global () |
jw More... | |
void | clear () |
NULLS the class members, invalidates this UID ( not unique anymore). More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
unsigned long | GetLong () const |
get least significant value of UID as long value. More... | |
void | GetString (std::string &sUUID) const |
writes the UUID into a string object More... | |
std::string | GetString () const |
time_t | GetUUIDCreationTime () const |
returns the time used to create the uuid (just seconds) More... | |
timeval | GetUUIDCreationTimeStruct () const |
returns the time used to create the uuid (seconds and usecs) More... | |
const unsigned char * | GetUUIDRaw () const |
get the pointer to the Uc[16] array with the raw uuid More... | |
void | Invalidate () |
sets the valid flag to false and clears data JW 09/2005: added clear in addition to just setting bool flag invalid. More... | |
bool | IsConsecutive () const |
undefined behaviour if uuid is invalid More... | |
bool | IsNil () const |
bool | IsValid () const |
checks whether this uuid is valid(true) or unitialized(false) More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
bool | operator!= (const UUID &id) const |
"not equal"-operator, uses result of operator== More... | |
bool | operator< (const UUID &id) const |
the operator< does not express temporal ordering, it does only compare the data areas of the two ids, e.g. More... | |
bool | operator<= (const UUID &id) const |
operator<= does not express temporal ordering, it does only compare the data areas of the two ids !!! More... | |
UUID & | operator= (const UUID &id) |
standard assignment operator More... | |
bool | operator== (const UUID &id) const |
comparison operator only compares ids, no check of validities More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
bool | SetFromLong (const unsigned long &n) |
construct from a unique long. More... | |
bool | SetFromString (const std::string &sID) |
construct from string containing ascii uuid. More... | |
void | SetUUIDRaw (const unsigned char *rawid) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
UUID () | |
default constructor does NOT create a valid UUID to avoid performance decrease in case someone wants to create many UIDS that are not really used. More... | |
UUID (const uuid_t &id) | |
use this if you want to create a UUID "manually" More... | |
UUID (const BIAS::UUID &id) | |
copy constructor, calls operator= internally. More... | |
UUID (const std::string &sID) | |
construct from string containing ascii uuid More... | |
UUID (const unsigned long &n) | |
construct from string containing a unique long. More... | |
virtual | ~UUID () |
Static Public Member Functions | |
static UUID | GenerateUUID (const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY) |
static function which simply produces a uuid and returns More... | |
static UUID | GenerateUUID_Consecutive () |
jw More... | |
static UUID | GenerateUUID_Global () |
jw More... | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
bool | IsValid_ |
flag indicating whether this uuid has been assigned a value yet More... | |
uuid_t | theID_ |
the data fields of the uuid More... | |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long | g_uniqueCounter = 0 |
global counter to create next unique consecutive program run-unique ID. More... | |
static long int | GlobalDebugLevel = 0 |
static timeval | LastGenerationTime_ |
when creating a uuid, current time is compared against the time saved during the last uuid generation More... | |
Friends | |
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const UUID &id) |
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, UUID &id) |
Related Functions | |
(Note that these are not member functions.) | |
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const UUID &id) |
write a UUID to a stream More... | |
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, UUID &id) |
reads a UUID from a stream More... | |
interface class for producing/storing Universally Unique IDentifiers
A UUID is a u unique structure. It is usually a 128 bit value computed from the MAC address of the network adapter (which means "spatial uniqueness") and a high resolution timestamp providing "temporal uniqueness". In addition you
@attention temporal uniqueness is only obtained if time is monotonic, i.e. you MUST NOT turn back the clock (-> NTP ?) For information: generating 1.000.000 UIDS on WIN32 takes approx. 180 msec. (jw)
@author koeser 09/2003, W32: Jan Woetzel 08/2005
BIAS::UUID::UUID | ( | ) |
|
explicit |
BIAS::UUID::UUID | ( | const BIAS::UUID & | id | ) |
|
explicit |
|
explicit |
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
void BIAS::UUID::AssignUUID | ( | const bool & | consecutively = DEFAULT_UUID_CONSECUTIVELY | ) |
function to assign a fresh, unique ID.
consecutively,: | true to use a sequential, dense counter instead of 16 Byte MAC like UID. The ID will be unique for each program run. Please mind the differnec to a sequential (local unique only) UUID w hich is unique for the machine, not only the run. False to generate universally valid one. |
Definition at line 264 of file UUID.cpp.
Referenced by GenerateUUID().
void BIAS::UUID::AssignUUID_Consecutive | ( | ) |
void BIAS::UUID::AssignUUID_Global | ( | ) |
void BIAS::UUID::clear | ( | ) |
NULLS the class members, invalidates this UID ( not unique anymore).
Jan Woetzel 08/2005
Definition at line 93 of file UUID.cpp.
Referenced by BIAS::operator<<().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
static |
static function which simply produces a uuid and returns
Definition at line 235 of file UUID.cpp.
References AssignUUID().
Referenced by BIAS::VideoSource_Disk_Bayer::GrabSingle(), BIAS::VideoSource_DiskZessPMD::GrabSingle(), BIAS::VideoSource_ShmPMD::GrabSingle(), BIAS::VideoSource_DiskPMD::GrabSingle(), BIAS::VideoSource_Shm::GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_FFmpeg::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageIO::Save(), BIAS::ImageIO::Write_(), and BIAS::ImageIO::WriteUnbuffered().
|
static |
|
static |
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
unsigned long BIAS::UUID::GetLong | ( | ) | const |
void BIAS::UUID::GetString | ( | std::string & | sUUID | ) | const |
writes the UUID into a string object
Definition at line 366 of file UUID.cpp.
Referenced by IsConsecutive(), BIAS::operator<<(), BIAS::ImageIO::Save(), and BIAS::VideoSource::WriteDirect_().
time_t BIAS::UUID::GetUUIDCreationTime | ( | ) | const |
timeval BIAS::UUID::GetUUIDCreationTimeStruct | ( | ) | const |
const unsigned char * BIAS::UUID::GetUUIDRaw | ( | ) | const |
|
inline |
bool BIAS::UUID::IsConsecutive | ( | ) | const |
undefined behaviour if uuid is invalid
Definition at line 450 of file UUID.cpp.
References GetString(), and BIAS::UUID.
bool BIAS::UUID::IsNil | ( | ) | const |
|
inline |
checks whether this uuid is valid(true) or unitialized(false)
Definition at line 210 of file UUID.hh.
Referenced by BIAS::ImageBlender::AddCamera(), BIAS::ImageBlenderIncremental::AddCamera(), BIAS::operator<<(), BIAS::ImageBase::PrintHeader(), BIAS::ImageIO::Save(), BIAS::ImageIO::Write_(), and BIAS::ImageIO::WriteUnbuffered().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
bool BIAS::UUID::SetFromLong | ( | const unsigned long & | n | ) |
bool BIAS::UUID::SetFromString | ( | const std::string & | sID | ) |
construct from string containing ascii uuid.
Thsiu routine is slow! (1.000.000 times take approx 16 seconds, JW)
Definition at line 130 of file UUID.cpp.
Referenced by BIAS::operator>>(), and BIAS::VideoStream::SplitIntoFiles().
|
inlinestaticinherited |
|
inlineinherited |
|
related |
write a UUID to a stream
|
friend |
|
related |
reads a UUID from a stream
|
friend |
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotected |
|
staticprotectedinherited |
|
protected |
|
staticprotected |
when creating a uuid, current time is compared against the time saved during the last uuid generation
Hint: If you have WIN32 compilation problems look for WIN32_LEAN_AND_MEAN and windows.h (JW)
|
protected |
the data fields of the uuid
Definition at line 233 of file UUID.hh.
Referenced by GetUUIDCreationTime().