Difference between revisions of "Documentation/DevGuide/WritingUNO/XUnoTunnel"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement (-Category:Documentation/Developers Guide/Professional UNO +Category:Documentation/Developers Guide/Writing UNO))
m (Robot: Changing Category:Documentation/Developers Guide/Writing UNO)
Line 20: Line 20:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Writing UNO]]
+
[[Category:Documentation/Developers Guide/Writing UNO Components]]

Revision as of 07:52, 4 June 2008



The com.sun.star.lang.XUnoTunnel interface allows access to the this pointer of an object. This interface is used to cast a UNO interface that is coming back to its implementation class through a UNO method. Using this interface is a result of an unsatisfactory interface design, because it indicates that some functionality only works when non-UNO functions are used. In general, these objects cannot be replaced by a different implementation, because they undermine the general UNO interface concept. This interface can be understood as admittance to an already existing code that cannot be split into UNO components easily. If designing new services, do not use this interface.

  interface XUnoTunnel: com::sun::star::uno::XInterface
  { 
      hyper getSomething( [in] sequence< byte > aIdentifier );
  };

The byte sequence contains an identifier that both the caller and implementer must know. The implementer returns the this pointer of the object if the byte sequence is equal to the byte sequence previously stored in a static variable. The byte sequence is usually generated once per process per implementation.

Template:Documentation/Note

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