Bull DPX/20 Podręcznik Użytkownika Strona 239

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 424
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 238
2-71
DSOM Framework Reference
object_to_string Method
Purpose
Converts an object reference to an external form (string) which can be stored outside the
ORB.
IDL Syntax
string object_to_string (
in SOMDObject obj);
Description
The object_to_string method converts the object reference to a form (string) which can be
stored externally.
Ownership of allocated memory is transferred to the caller.
Parameters
receiver A pointer to the ORB object.
env A pointer to the Environment structure for the method caller.
obj A pointer to a SOMDObject object representing the reference to be
converted.
Return Value
The object_to_string method returns a string representing the external (string) form of the
referenced object.
Example
#include <somd.h>
#include <car.h>
Environment ev;
Car car;
string objrefstr;
SOM_InitEnvironment(&ev);
SOMD_Init(&ev);
/* create a remote Car object */
car = _somdNewObject(SOMD_ObjectMgr, &ev, “Car”, ””);
/* save the reference to the object */
objrefstr = _object_to_string(SOMD_ORBObject, &ev, car);
FileWrite(”/u/joe/mycar”, objrefstr);
Original Class
ORB
Related Information
Methods: string_to_object
Przeglądanie stron 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 423 424

Komentarze do niniejszej Instrukcji

Brak uwag