Structs

From Apache OpenOffice Wiki
Jump to: navigation, search



Structs are static collections of multiple values that belong to a single aspect and could be considered as a single, complex value.

Naming

Structs begin with an uppercase letter and are put in initial caps. Avoid abbreviations.

If the actual name for the struct does not sound correct, do not add Attributes, Properties or the suffixes suggested for enums. These two words refer to different concepts within the Apache OpenOffice API. Instead, use words like Format or Descriptor.

Usage

Use structs as data containers. Data other than interfaces are always copied by value. This is an efficiency gain, especially in distributed systems.

Structs with just a single member are wrong by definition.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages