LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Object Attributes

Object Attributes

Class

The name of the class to which an Object belongs. (string, read-only)

ID

Object identification string that is not copied. (string)

This attribute contains a string which may be used to identify the Object to which it is attached. There is no restriction on the contents of this string, which is not used internally by the AST library, and is simply returned without change when required. The default value is an empty string.

An identification string can be valuable when, for example, several Objects have been stored in a file (using Channel::write) and are later retrieved (using Channel::read). Consistent use of the ID attribute allows the retrieved Objects to be identified without depending simply on the order in which they were stored.

This attribute may also be useful during debugging, to distinguish similar Objects when using astShow to display them.

Notes

  • Unlike most other attributes, the value of ID is not transferred when an Object is copied. Instead, its value is undefined (and therefore defaults to an empty string) in any copy. However, it is retained in any external representation of an Object produced by Channel::write

Ident

Permanent Object identification string that is copied. (string)

This attribute is like ID, in that it contains a string which may be used to identify the Object to which it is attached. The only difference between ID and Ident is that Ident is transferred when an Object is copied, but ID is not.

NObject

Number of Objects in class. (int, read only)

This attribute gives the total number of Objects currently in existence in the same class as the Object whose attribute value is requested. This count does not include Objects which belong to derived (more specialised) classes.

This attribute is mainly intended for debugging. It can be used to detect whether Objects which should have been deleted have, in fact, been deleted.

ObjSize

The in-memory size of the Object, in bytes. (int, read-only)

This attribute gives the total number of bytes of memory used by the Object. This includes any Objects which are encapsulated within the supplied Object.

RefCount

Count of active Object pointers. (int, read-only)

This attribute gives the number of active pointers associated with an Object. It is modified whenever pointers are created or annulled. The count includes the initial pointer issued when the Object was created.

If the reference count for an Object falls to zero, then the Object will be deleted.

UseDefs

Use default values for unspecified attributes? (bool)

This attribute specifies whether default values should be used internally for object attributes which have not been assigned a value explicitly. If a non-zero value (the default) is supplied for UseDefs, then default values will be used for attributes which have not explicitly been assigned a value. If zero is supplied for UseDefs, then an error will be reported if an attribute for which no explicit value has been supplied is needed internally within AST.

Many attributes (including the UseDefs attribute itself) are unaffected by the setting of UseDefs, and default values will always be used without error for such attributes. The "Applicability:" section below lists the attributes which are affected by the setting of UseDefs.

Note, UseDefs only affects access to attributes internally within AST. The public accessor functions such as Object::getC are unaffected by the UseDefs attribute - default values will always be returned if no value has been set. Application code should use Object::test if required to determine if a value has been set for an attribute.

Applicability

  • Object

    All Objects have this attribute, but ignore its setting except as described below for individual classes.

  • FrameSet

    The default value of UseDefs for a FrameSet is redefined to be the UseDefs value of its current Frame.

  • CmpFrame

    The default value of UseDefs for a CmpFrame is redefined to be the UseDefs value of its first component Frame.

  • Region

    The default value of UseDefs for a Region is redefined to be the UseDefs value of its encapsulated Frame.

  • Frame

    If UseDefs is zero, an error is reported when aligning Frames if the Epoch, ObsLat or ObsLon attribute is required but has not been assigned a value explicitly.

  • SkyFrame

    If UseDefs is zero, an error is reported when aligning SkyFrames if any of the following attributes are required but have not been assigned a value explicitly: Epoch, Equinox.

  • SpecFrame

    If UseDefs is zero, an error is reported when aligning SpecFrames if any of the following attributes are required but have not been assigned a value explicitly: Epoch, RefRA, RefDec, RestFreq, SourceVel, StdOfRest.

  • DSBSpecFrame

    If UseDefs is zero, an error is reported when aligning DSBSpecFrames or when accessing the ImagFreq attribute if any of the following attributes are required but have not been assigned a value explicitly: Epoch, DSBCentre, IF.