Scopira  20080306
scopira::tool::uuid Class Reference

#include <uuid.h>

Public Member Functions

 uuid (void)
 Constructor. Builds a "zero" UUID (one with all zeros)
 
 uuid (const char *s)
 
void set_zero (void)
 
bool is_zero (void) const
 
bool operator== (const uuid &rhs) const
 comparator
 
bool operator!= (const uuid &rhs) const
 comparator
 
bool operator< (const uuid &rhs) const
 comparator
 
bool load (scopira::tool::itflow_i &in)
 Serialization - yes, non-virtual.
 
void save (scopira::tool::otflow_i &out) const
 Serialization - yes, non-virtual.
 
std::string as_string (void) const
 return a nice string representation
 
bool parse_string (const std::string &s)
 parse the string into this object, return false if failed
 

Friends

class scopira::tool::uuid_generator
 
scopira::tool::oflow_ioperator<< (scopira::tool::oflow_i &o, const scopira::tool::uuid &id)
 Output operator for uuids.
 

Detailed Description

A universally unique identifier. You can print this out (for debugging purposes), do comparison tests and serialize it to stream. That's it. This class is heavily inline and includes two seperate implementations.

Generic implementation: broken.

Author
Aleksander Demko

Constructor & Destructor Documentation

◆ uuid()

scopira::tool::uuid::uuid ( const char *  s)

Construct the UUID from the given string. Particularly useful in global, static, constant-like objects.

Author
Aleksander Demko

Member Function Documentation

◆ is_zero()

bool scopira::tool::uuid::is_zero ( void  ) const

Is this UUID a "zero" uuid?

Author
Aleksander Demko

◆ set_zero()

void scopira::tool::uuid::set_zero ( void  )

Sets this uuid to be a zero UUID, the "null" of UUIDs.

Author
Aleksander Demko

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