LSST Applications g0f08755f38+82efc23009,g12f32b3c4e+e7bdf1200e,g1653933729+a8ce1bb630,g1a0ca8cf93+50eff2b06f,g28da252d5a+52db39f6a5,g2bbee38e9b+37c5a29d61,g2bc492864f+37c5a29d61,g2cdde0e794+c05ff076ad,g3156d2b45e+41e33cbcdc,g347aa1857d+37c5a29d61,g35bb328faa+a8ce1bb630,g3a166c0a6a+37c5a29d61,g3e281a1b8c+fb992f5633,g414038480c+7f03dfc1b0,g41af890bb2+11b950c980,g5fbc88fb19+17cd334064,g6b1c1869cb+12dd639c9a,g781aacb6e4+a8ce1bb630,g80478fca09+72e9651da0,g82479be7b0+04c31367b4,g858d7b2824+82efc23009,g9125e01d80+a8ce1bb630,g9726552aa6+8047e3811d,ga5288a1d22+e532dc0a0b,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+37c5a29d61,gcf0d15dbbd+2acd6d4d48,gd7358e8bfb+778a810b6e,gda3e153d99+82efc23009,gda6a2b7d83+2acd6d4d48,gdaeeff99f8+1711a396fd,ge2409df99d+6b12de1076,ge79ae78c31+37c5a29d61,gf0baf85859+d0a5978c5a,gf3967379c6+4954f8c433,gfb92a5be7c+82efc23009,gfec2e1e490+2aaed99252,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
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.