Difference between revisions of "Documentation/DevGuide/WritingUNO/C++/Implementing your own Interfaces"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m
Line 9: Line 9:
 
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]-->
 
+
<source 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;
 
   }
 
   }
 
+
</source>
 
{{PDL1}}
 
{{PDL1}}
 
[[Category: Writing UNO Components]]
 
[[Category: Writing UNO Components]]

Revision as of 22:40, 22 March 2008




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).
Personal tools