summaryrefslogtreecommitdiff
path: root/ACE/ace/UUID.h
diff options
context:
space:
mode:
authorhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-06 20:24:50 +0000
committerhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-06 20:24:50 +0000
commitdadce19ab89f9cb1bdf1e20546b1326f8e944a9b (patch)
tree89fbbb55bc1fce12ade19cc0e0298036788198c4 /ACE/ace/UUID.h
parentb0300c25750397f387d049fd081f9ad915deeb70 (diff)
downloadATCD-dadce19ab89f9cb1bdf1e20546b1326f8e944a9b.tar.gz
Sat Dec 6 20:18:38 UTC 2008 James H. Hill <hillj@isis.vanderbilt.edu>
Diffstat (limited to 'ACE/ace/UUID.h')
-rw-r--r--ACE/ace/UUID.h44
1 files changed, 34 insertions, 10 deletions
diff --git a/ACE/ace/UUID.h b/ACE/ace/UUID.h
index c33655b925f..06f09a95404 100644
--- a/ACE/ace/UUID.h
+++ b/ACE/ace/UUID.h
@@ -33,14 +33,25 @@ namespace ACE_Utils
class ACE_Export UUID_Node
{
public:
+ /// Size of the node in bytes.
+ enum {NODE_ID_SIZE = 6};
- /// Constructor
+ /// Type definition of the node.
+ typedef u_char Node_ID[NODE_ID_SIZE];
+
+ /// Default constructor
UUID_Node (void);
- enum {NODE_ID_SIZE = 6};
- typedef u_char Node_ID[NODE_ID_SIZE];
+ /**
+ * Copy constructor.
+ *
+ * @param[in] node Source node.
+ */
+ UUID_Node (const UUID_Node & node);
Node_ID &node_ID (void);
+ const Node_ID &node_ID (void) const;
+
void node_ID (Node_ID&);
///// Equality Operations
@@ -50,7 +61,11 @@ namespace ACE_Utils
///// Relational Operations
//bool operator < (const UUID_Node& right) const;
+ /// Assign the value of an existing node id to this object.
+ const UUID_Node & operator = (const UUID_Node & rhs);
+
private:
+ /// The value of the node id.
Node_ID node_ID_;
};
@@ -102,8 +117,10 @@ namespace ACE_Utils
u_char clock_seq_low (void) const;
void clock_seq_low (u_char);
- UUID_Node* node (void) const;
- void node (UUID_Node*);
+ UUID_Node* node (void);
+ const UUID_Node* node (void) const;
+
+ void node (const UUID_Node*);
ACE_CString* thr_id (void);
void thr_id (char*);
@@ -129,25 +146,32 @@ namespace ACE_Utils
//bool operator<= (const UUID &right) const;
//bool operator>= (const UUID &right) const;
+ /// Assign an existing UUID to this UUID.
+ const UUID & operator = (const UUID & rhs);
+
private:
+ /**
+ * Helper method to convert from a string UUID.
+ *
+ * @param[in] uuid_string String version of UUID.
+ */
void from_string_i (const ACE_CString& uuid_string);
- UUID& operator= (const UUID&);
-
/// Data Members for Class Attributes
ACE_UINT32 time_low_;
ACE_UINT16 time_mid_;
ACE_UINT16 time_hi_and_version_;
u_char clock_seq_hi_and_reserved_;
u_char clock_seq_low_;
- UUID_Node* node_;
- bool node_release_;
+
+ UUID_Node node_;
+
ACE_CString thr_id_;
ACE_CString pid_;
/// The string representation of the UUID. This is created and
/// updated only on demand.
- mutable ACE_CString *as_string_;
+ mutable ACE_Auto_Ptr <ACE_CString> as_string_;
};
/**