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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 424
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 336
3-31
Interface Repository Framework Reference
lookup_id Method
Purpose
Returns the object having a specified RepositoryId.
IDL Syntax
Contained lookup_id (
in RepositoryId search_id);
Description
The lookup_id method returns the object having a RepositoryId given by the specified
search_id argument. The returned object represents a component of an IDL interface
(class) definition maintained within the Interface Repository.
When finished using the object returned by this method, the client code is responsible for
releasing it, using the somFree method.
Parameters
receiver A pointer to an object of class Repository representing SOM’s Interface
Repository.
ev A pointer where the method can return exception information if an error is
encountered.
search_id An ID value of type RepositoryId that uniquely identifies the desired object
in the Interface Repository.
Return Value
The lookup_id method returns the Contained object that has the specified RepositoryId.
Example
Here is a code fragment written in C that uses the lookup_id method:
#include <containd.h>
#include <repostry.h>
...
Repository repo;
Environment *ev;
Contained c;
RepositoryId objectToFind;
...
repo = RepositoryNew ();
c = Repository_lookup_id (repo, ev, objectToFind);
if (c) {
printf (”lookup_id found object of type: %s, named: %s\n”,
SOMObject_somGetClassName (c), Contained__get_name (c,
ev));
SOMObject_somFree (c);
}
Przeglądanie stron 336
1 2 ... 332 333 334 335 336 337 338 339 340 341 342 ... 423 424

Komentarze do niniejszej Instrukcji

Brak uwag