Difference between revisions of "Documentation/DevGuide/WritingUNO/C++/Implementing your own Interfaces"
From Apache OpenOffice Wiki
< Documentation | DevGuide
m |
|||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
|NextPage=Documentation/DevGuide/WritingUNO/C++/Providing a Single Factory Using a Helper Method | |NextPage=Documentation/DevGuide/WritingUNO/C++/Providing a Single Factory Using a Helper Method | ||
}} | }} | ||
− | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/WritingUNO/C++/{{SUBPAGENAME}}}} | |
{{DISPLAYTITLE:Implementing your own Interfaces}} | {{DISPLAYTITLE:Implementing your own Interfaces}} | ||
For the <code>my_module.XSomething</code> interface, add a string to be returned that informs the caller when <code>methodOne()</code> was called successfully. | For the <code>my_module.XSomething</code> interface, add a string to be returned that informs the caller when <code>methodOne()</code> was called successfully. | ||
<!--[SOURCE:Components/CppComponent/service2_impl.cxx]--> | <!--[SOURCE:Components/CppComponent/service2_impl.cxx]--> | ||
− | < | + | <syntaxhighlight lang="cpp"> |
OUString MyService2Impl::methodOne( OUString const & str ) | OUString MyService2Impl::methodOne( OUString const & str ) | ||
throw (RuntimeException) | throw (RuntimeException) | ||
Line 16: | Line 16: | ||
"called methodOne() of MyService2 implementation: ") ) + str; | "called methodOne() of MyService2 implementation: ") ) + str; | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
{{PDL1}} | {{PDL1}} | ||
[[Category:Documentation/Developer's Guide/Writing UNO Components]] | [[Category:Documentation/Developer's Guide/Writing UNO Components]] |
Latest revision as of 14:31, 24 December 2020
- Class Definition with Helper Template Classes
- Implementing your own Interfaces
- Providing a Single Factory Using a Helper Method
- Write Registration Info Using a Helper Method
- Provide Implementation Environment
- Implementing without Helpers
- Storing the Service Manager for Further Use
- Create Instance with Arguments
- Multiple Components in One Dynamic Link Library
- Building and Testing C++ Components
For the my_module.XSomething
interface, add a string to be returned that informs the caller when methodOne()
was called successfully.
OUString MyService2Impl::methodOne( OUString const & str ) throw (RuntimeException) { return OUString( RTL_CONSTASCII_USTRINGPARAM( "called methodOne() of MyService2 implementation: ") ) + str; }
Content on this page is licensed under the Public Documentation License (PDL). |