LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
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.