Difference between revisions of "Documentation/DevGuide/ProUNO/Modules"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(7 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/ProUNO/Exceptions
 
|NextPage=Documentation/DevGuide/ProUNO/Exceptions
 
}}
 
}}
 +
{{Documentation/DevGuideLanguages|Documentation/DevGuide/ProUNO/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Modules}}
 
{{DISPLAYTITLE:Modules}}
 
Modules are namespaces, similar to namespaces in C++ or packages in Java. They group services, interfaces, structs, exceptions, enums, typedefs, constant groups and submodules with related functional content or behavior. They are utilized to specify coherent blocks in the API, this allows for a well-structured API. For example, the module <idlmodule>com.sun.star.text</idlmodule> contains interfaces and other types for text handling. Some other typical modules are <idlmodule>com.sun.star.uno</idlmodule>, <idlmodule>com.sun.star.drawing</idlmodule>, <idlmodule>com.sun.star.sheet</idlmodule> and <idlmodule>com.sun.star.table</idlmodule>. Identifiers inside a module do not clash with identifiers in other modules, therefore it is possible for the same name to occur more than once. The global index of the API reference shows that this does happen.
 
Modules are namespaces, similar to namespaces in C++ or packages in Java. They group services, interfaces, structs, exceptions, enums, typedefs, constant groups and submodules with related functional content or behavior. They are utilized to specify coherent blocks in the API, this allows for a well-structured API. For example, the module <idlmodule>com.sun.star.text</idlmodule> contains interfaces and other types for text handling. Some other typical modules are <idlmodule>com.sun.star.uno</idlmodule>, <idlmodule>com.sun.star.drawing</idlmodule>, <idlmodule>com.sun.star.sheet</idlmodule> and <idlmodule>com.sun.star.table</idlmodule>. Identifiers inside a module do not clash with identifiers in other modules, therefore it is possible for the same name to occur more than once. The global index of the API reference shows that this does happen.
  
Although it may seem that the modules correspond with the various parts of {{PRODUCTNAME}}, there is no direct relationship between the API modules and the {{PRODUCTNAME}} applications Writer, Calc and Draw. Interfaces from the module <idlmodule>com.sun.star.text</idlmodule> are used in Calc and Draw. Modules like <idlmodule>com.sun.star.style</idlmodule> or <idlmodule>com.sun.star.document</idlmodule> provide generic services and interfaces that are not specific to any one part of {{PRODUCTNAME}}.
+
Although it may seem that the modules correspond with the various parts of {{AOo}}, there is no direct relationship between the API modules and the {{AOo}} applications Writer, Calc and Draw. Interfaces from the module <idlmodule>com.sun.star.text</idlmodule> are used in Calc and Draw. Modules like <idlmodule>com.sun.star.style</idlmodule> or <idlmodule>com.sun.star.document</idlmodule> provide generic services and interfaces that are not specific to any one part of {{AOo}}.
  
 
The modules you see in the API reference were defined by nesting UNO IDL types in module instructions. For example, the module <idlmodule>com.sun.star.uno</idlmodule> contains the interface <code>XInterface</code>:
 
The modules you see in the API reference were defined by nesting UNO IDL types in module instructions. For example, the module <idlmodule>com.sun.star.uno</idlmodule> contains the interface <code>XInterface</code>:
  <source lang="idl">
+
<syntaxhighlight lang="idl">
 
   module com {
 
   module com {
 
       module sun {
 
       module sun {
Line 23: Line 24:
 
       };
 
       };
 
   };
 
   };
  </source>
+
</syntaxhighlight>
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Professional UNO]]
+
 
 +
[[Category:Documentation/Developer's Guide/Professional UNO]]

Latest revision as of 10:43, 23 December 2020



Modules are namespaces, similar to namespaces in C++ or packages in Java. They group services, interfaces, structs, exceptions, enums, typedefs, constant groups and submodules with related functional content or behavior. They are utilized to specify coherent blocks in the API, this allows for a well-structured API. For example, the module com.sun.star.text contains interfaces and other types for text handling. Some other typical modules are com.sun.star.uno, com.sun.star.drawing, com.sun.star.sheet and com.sun.star.table. Identifiers inside a module do not clash with identifiers in other modules, therefore it is possible for the same name to occur more than once. The global index of the API reference shows that this does happen.

Although it may seem that the modules correspond with the various parts of Apache OpenOffice, there is no direct relationship between the API modules and the Apache OpenOffice applications Writer, Calc and Draw. Interfaces from the module com.sun.star.text are used in Calc and Draw. Modules like com.sun.star.style or com.sun.star.document provide generic services and interfaces that are not specific to any one part of Apache OpenOffice.

The modules you see in the API reference were defined by nesting UNO IDL types in module instructions. For example, the module com.sun.star.uno contains the interface XInterface:

  module com {
      module sun {
          module star {
              module uno {
                  interface XInterface {
                      ... 
                  }; 
              };
          };
      };
  };
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages