somDefaultCopyInit - Example Code
// IDL produced by a DTS C++ compiler for a DTS C++ class
interface X : SOMObject
{
void foo(in SOMClass arg);
implementation {
foo: cxxdecl = "void foo(SOMClass arg)"; // !! call-by-value
};
};
// C++ SOMObjects Toolkit Code
#include <X.xh>
#include <somcls.xh>
main()
{
X *x = new X;
SOMClass *arg = _SOMClass->somNewNoInit();
// make arg be a copy of the X class object
arg->somDefaultCopyInit(0,_X);
x->foo(arg); // call foo with the copy
}
[Back: somDefaultCopyInit - Related Methods]
[Next: somDefaultCopyInit - Topics]