Difference between revisions of "Documentation/DevGuide/ProUNO/C++/Mapping of Singletons"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (FINAL VERSION FOR L10N)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/ProUNO/C++/Using Weak References
 
|NextPage=Documentation/DevGuide/ProUNO/C++/Using Weak References
 
}}
 
}}
[[zh:Zh/Documentation/DevGuide/ProUNO/C++/Mapping of Singletons]]
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/ProUNO/C++/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Mapping of Singletons}}
 
{{DISPLAYTITLE:Mapping of Singletons}}
 
A new-style singleton of the form
 
A new-style singleton of the form

Revision as of 08:09, 13 May 2009



A new-style singleton of the form

 singleton Name: XIfc;

is mapped to a C++ class with the same name. The class has a single member function

 public:
 static com::sun::star::uno::Reference< XIfc > get(
     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context) 
     throw (com::sun::star::uno::RuntimeException) { ... }

The semantics of such a singleton getter function in C++ are as follows (they are the same as for Java):

Old-style services are not mapped into the C++ language binding.

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