Difference between revisions of "Documentation/DevGuide/AppendixA/Structs"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Appendix)
m
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/AppendixA/Parameter
 
|NextPage=Documentation/DevGuide/AppendixA/Parameter
 
}}
 
}}
{{DISPLAYTITLE:Structs}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/AppendixA/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Structs}}
 
Structs are static collections of multiple values that belong to a single aspect and could be considered as a single, complex value.  
 
Structs are static collections of multiple values that belong to a single aspect and could be considered as a single, complex value.  
  
Line 12: Line 13:
 
Structs begin with an uppercase letter and are put in initial caps. Avoid abbreviations.
 
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 <code>Attributes</code>, <code>Properties</code> or the suffixes suggested for enums. These two words refer to different concepts within the {{PRODUCTNAME}} API. Instead, use words like <code>Format</code> or <code>Descriptor</code>.  
+
If the actual name for the struct does not sound correct, do not add <code>Attributes</code>, <code>Properties</code> or the suffixes suggested for enums. These two words refer to different concepts within the {{AOo}} API. Instead, use words like <code>Format</code> or <code>Descriptor</code>.  
  
 
==== Usage ====
 
==== Usage ====
Line 22: Line 23:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Appendix]]
+
[[Category:Documentation/Developer's Guide/Appendix]]

Latest revision as of 13:53, 22 December 2020



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