Go to the first, previous, next, last section, table of contents.

Methods

Any object has at least the following methods:

  1. Two constructors, one with an empty parameter list and one with all components, which are accessible by the public. The former sets the object to non existent, the latter sets the object to existent and initializes it with the given parameters. The types of the parameters are the same as the types of the components. It is optional, to provide a constructor which takes C base types as parameters and performs the conversion.
  2. A destructor, which tends to be an empty function. However, dynamically allocated memory is freed from here.
  3. Selector(s) or extractor(s) one for each component of public relevance. Extractors are canonically named `get<component>', where <component> is the name of the component that the extractor will access. The component is not returned as the value of the function but is assigned to a reference parameter. Selectors return an integer value reflecting the success of the extraction. A return Value of zero means that the extraction was performed successfully. Values less than zero mean that the object itself can not perform the extraction (often because it is not present or is null). A Value greater than zero tells that the returned object is unhealthy in any way.
  4. Modifier(s) one for each component of public relevance. Modifiers always set an object to be present. nullify() is a special modifier.
  5. Input method, returns 1 if reading was successful, 0 otherwise.
  6. Output method. Input and output methods can handle different encoding rules depending on some properties of the stream. See See section I/O methods for more.

Go to the first, previous, next, last section, table of contents.