Difference between revisions of "Util (lx-util.hpp)"

From The Foundry MODO SDK wiki
Jump to: navigation, search
Line 13: Line 13:
 
The three things you can do with COM objects without knowing anything about them are QueryInterface, AddRef, and Release. These functions handle different data types.
 
The three things you can do with COM objects without knowing anything about them are QueryInterface, AddRef, and Release. These functions handle different data types.
  
* lx::IfcQuery(), lx::IfcAddRef(), lx::IfcRelease() -- for an ILx''Interface''ID pointer
+
* '''lx::IfcQuery()''', '''lx::IfcAddRef()''', '''lx::IfcRelease()''' -- for an ILx''Interface''ID pointer
* lx::ObjQuery(), lx::ObjAddRef(), lx::ObjRelease() -- for an LXtObjectID
+
* '''lx::ObjQuery()''', '''lx::ObjAddRef()''', '''lx::ObjRelease()''' -- for an LXtObjectID
* lx::UnkQuery(), lx::UnkAddRef(), lx::UnkRelease() -- for an ILxUnknownID pointer
+
* '''lx::UnkQuery()''', '''lx::UnkAddRef()''', '''lx::UnkRelease()''' -- for an ILxUnknownID pointer
  
 
== Globals ==
 
== Globals ==
Line 21: Line 21:
 
Globals con from querying the global object, which can be done though:
 
Globals con from querying the global object, which can be done though:
  
* lx::GetGlobal() -- this can take a GUID pointer or a GUID string
+
* '''lx::GetGlobal()''' -- this can take a GUID pointer or a GUID string
  
 
== GUID Services ==
 
== GUID Services ==
Line 27: Line 27:
 
If you really need to deal in GUIDs, there are some functions for that:
 
If you really need to deal in GUIDs, there are some functions for that:
  
* lx::LookupGUID() -- returns a GUID pointer from a string
+
* '''lx::LookupGUID()''' -- returns a GUID pointer from a string
* lx::GUIDCompare() -- compares two GUIDs
+
* '''lx::GUIDCompare()''' -- compares two GUIDs
* lx::GUIDSet() -- sets a GUID struct from raw numbers. This is mostly used by the CLxLoc localization wrappers
+
* '''lx::GUIDSet()''' -- sets a GUID struct from raw numbers. This is mostly used by the CLxLoc localization wrappers
  
 
[[Category:Headers]]
 
[[Category:Headers]]

Revision as of 16:41, 8 October 2011

Utility classes used by wrappers.

CLxObject

This is just a class with a virtual destructor. Anything inheriting from this has the ability to be destroyed anywhere, and that's a powerfully important concept in C++.

CLxList

Simple template list class using the next and prev pointers in the templated type.

Object Management

The three things you can do with COM objects without knowing anything about them are QueryInterface, AddRef, and Release. These functions handle different data types.

  • lx::IfcQuery(), lx::IfcAddRef(), lx::IfcRelease() -- for an ILxInterfaceID pointer
  • lx::ObjQuery(), lx::ObjAddRef(), lx::ObjRelease() -- for an LXtObjectID
  • lx::UnkQuery(), lx::UnkAddRef(), lx::UnkRelease() -- for an ILxUnknownID pointer

Globals

Globals con from querying the global object, which can be done though:

  • lx::GetGlobal() -- this can take a GUID pointer or a GUID string

GUID Services

If you really need to deal in GUIDs, there are some functions for that:

  • lx::LookupGUID() -- returns a GUID pointer from a string
  • lx::GUIDCompare() -- compares two GUIDs
  • lx::GUIDSet() -- sets a GUID struct from raw numbers. This is mostly used by the CLxLoc localization wrappers