casacore
|
#include <ObjectID.h>
Public Member Functions | |
ObjectID (Bool makeNull=False) | |
If makeNull is True, make the null ObjectID, otherwise create a unique ObjectID. More... | |
ObjectID (Int sequence, Int pid, Int time, const String &hostname) | |
Create explicitly from the provided constituents. More... | |
ObjectID (const ObjectID &other) | |
Copy other . More... | |
ObjectID & | operator= (const ObjectID &other) |
Bool | isNull () const |
Is this ObjectID set? More... | |
Bool | operator== (const ObjectID &other) const |
Compare two ObjectID's for (in)equality. More... | |
Bool | operator!= (const ObjectID &other) const |
Bool | fromString (String &error, const String &in) |
It is useful to interconvert between strings and ObjecID's, e.g. More... | |
void | toString (String &out) const |
Note that out is zero'd before it is set. More... | |
Int | sequence () const |
Ordinarily the user does not need to get at the exact state of the, ObjectID, however it is available for those times when it is necessary. More... | |
Int | pid () const |
Int | creationTime () const |
const String & | hostName () const |
Static Public Member Functions | |
static String | extractIDs (Block< ObjectID > &objectIDs, const String &command) |
Extract objectID strings (as set by glish script substitute.g) from a command, convert them to ObjectID objects, store those in the Block, and replace the strings by their Block indices as $OBJ::n::O where n is the index. More... | |
Static Private Member Functions | |
static Int | sequence_number () |
Make a unique sequence number, returns 0 on first call, 1 on next,... More... | |
Private Attributes | |
Int | sequence_number_p |
Int | process_id_p |
Int | creation_time_p |
String | hostname_p |
ObjectID: A unique identifier for distributed and other objects.
Public interface
The ObjectID class name reflects its role as the single identifier for distributed and other user-level objects.
The ObjectID class is used to give a unique identifier to `‘high-level’' objects in the system. Internally the ObjectID consists of a sequence number (unique within the creating process), a process id, a creation time, and a host id. Pragmatically the ObjectID should be unique with no dangers of collisions.
A special `‘Null’' ObjectID is available.
The fundamental purpose for an ObjectID is to provide a unique identifier for persistent objects, or for objects that might be accessed outside the creating processes address space.
Definition at line 79 of file ObjectID.h.
Create explicitly from the provided constituents.
casacore::ObjectID::ObjectID | ( | const ObjectID & | other | ) |
|
inline |
Definition at line 164 of file ObjectID.h.
References creation_time_p.
It is useful to interconvert between strings and ObjecID's, e.g.
when saving to FITS or writing to a table. The form of the string is:
with an optional comma between the fields. However, in general user code should not depend on the exact form of the string.
If this fails, an error message is set and the ObjectID is the null ObjectID.
|
inline |
Definition at line 169 of file ObjectID.h.
References hostname_p.
Compare two ObjectID's for (in)equality.
|
inline |
Definition at line 159 of file ObjectID.h.
References process_id_p.
|
inline |
Ordinarily the user does not need to get at the exact state of the, ObjectID, however it is available for those times when it is necessary.
Definition at line 154 of file ObjectID.h.
References sequence_number_p.
|
staticprivate |
Make a unique sequence number, returns 0 on first call, 1 on next,...
void casacore::ObjectID::toString | ( | String & | out | ) | const |
Note that out
is zero'd before it is set.
|
private |
Definition at line 141 of file ObjectID.h.
Referenced by creationTime().
|
private |
Definition at line 142 of file ObjectID.h.
Referenced by hostName().
|
private |
Definition at line 140 of file ObjectID.h.
Referenced by pid().
|
private |
Definition at line 139 of file ObjectID.h.
Referenced by sequence().