A SERVICE OF

logo

Scene Graph Base Classes
5
The csContainer Class
csContainer objects contain data associated with scene graphs. The data in csContainer
objects is grouped into elds (csField). Fields are not accessible directly to applications.
Instead, set() and get() methods are provided to set and return eld values.
Each eld contains either a single value of a simple data type, such as a oat, or a group
of values, all of simple data types.
As an abstract, base class, csContainer provides functionality common to all objects
containing elds, such as generic access to the elds, creating and deleting eld
connections, and managing reference counts when objects are added and removed as
elds.
The csField Class
Fields contain the data of csContainer objects; data generally associated with scene
graphs. All publicly-accessible elds in classes derived from csContainer should be
derived from csField.
Fields differ from standard C++ data members. Fields are not evaluated until they are
queried. Consequently, none of the meta information (for example, the elds name)
exists unless you ask for it.
Field Access
Fields are compact but they still allow applications complete access in two ways:
Indirect access. Methods for eld access and modication are part of each class.
Most of the time, applications access elds using these get*() and set*() functions.
Generic access. Applications can query any container object abstractly using
getFieldInfo() on any object that inherits from csContainer. This is useful for
getting information about unknown objects and makes it possible, for example, to
create a GUI for an application.