Bull DPX/20 Uživatelská příručka Strana 272

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 424
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 271
2-104
SOMobjects Base Toolkit: Programmers Reference Manual
is_nil Method
Purpose
Tests to see if the object reference is nil.
IDL Syntax
boolean is_nil ( );
Description
The is_nil method tests to see if the specified object reference is nil.
Parameters
receiver A pointer to any object, either a SOMObject or a SOMDObject. The
pointer can be NULL.
env A pointer to the Environment structure for the method caller.
Return Value
The is_nil method returns TRUE if the object reference is empty. Otherwise, is_nil returns
FALSE.
Example
#include <somd.h>
Environment ev;
SOMDObject objref;
SOMObject somobj;
...
/* This code might be part of the code
* that overrides the somdSOMObjFromRef method, i.e.
* in an implementation of a subclass of SOMDServer called
* myServer
*/
if (_is_nil(objref, &ev) ||
_somIsA(objref, SOMDClientProxyNewClass(0, 0)) ||
_is_SOM_ref(objref, &ev)) {
somobj = myServer_parent_SOMDServer_somdSOMObjFromRef
(somSelf, &ev, objref);
}
else {
/* do the myServer–specific stuff to create/find somobj here */
}
return somobj;
Related Information
Methods: create, is_constant, is_proxy, is_SOM_ref
Zobrazit stránku 271
1 2 ... 267 268 269 270 271 272 273 274 275 276 277 ... 423 424

Komentáře k této Příručce

Žádné komentáře