ObjectIDRecord.h

Classes

Global Functions -- Convert ObjectID to/from GlishRecord. (full description)

Convert ObjectID to/from GlishRecord. (source)

Interface

void OIDtoRecord (const ObjectID&, GlishRecord& out, const char* prefix = "_")
Bool OIDfromRecord (ObjectID&, String& error, const GlishRecord& in, const char* prefix = "_")

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Programs:
Tests:

Prerequisite

Synopsis

This file contains functions to convert an ObjectID to and from a GlishRecord for the AIPS++ Tasking system.

Motivation

The ObjectID class should be independent of the Tasking system used. Therefore functions coverting to and from a GlishRecord have been put in this separate file.

Member Description

void OIDtoRecord (const ObjectID&, GlishRecord& out, const char* prefix = "_")
Bool OIDfromRecord (ObjectID&, String& error, const GlishRecord& in, const char* prefix = "_")

It is useful to be able to interconvert between ObjectID's and Records. At present the Tasking system only uses GlishRecords, but we might want to change this to RecordInterfaces at some point. Note that if you do not call this function you will not link against Glish, as it is in its own .cc file.

Although you shouldn't need to know the exact form of the record, it is:

    [_seq=sequence, _pid=pid, _time=time, _host=hostname]
    
Note that the prefix ("_") may be defined.

This mapping may change with time. If any of the above fields already exist they will be overwritten when writing. When reading, all fields must be set. The field names begin with an underscore so that they may may be set into the same record as "user" data.