Bull DPX/20 Guia do Utilizador Página 349

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 348
3-43
Interface Repository Framework Reference
The tk_pointer TypeCode contains only one parameter—a TypeCode which
describes the data type that the pointer references. The tk_self TypeCode is used
to describe a “self-referential” structure or union without introducing unbounded
recursion in the TypeCode. For example, the following C struct:
struct node {
long count;
struct node *next;
};
could be described with a TypeCode created as follows:
TypeCode tcForNode;
tcForNode = TypeCodeNew (tk_struct, ”node”,
”count”, TypeCodeNew (tk_long),
”next”, TypeCodeNew (tk_pointer,
TypeCodeNew (tk_self, ”node”)));
The tk_foreign TypeCode provides a more general escape mechanism, allowing
TypeCodes to be created that partially describe non-IDL types. Since these foreign
TypeCodes carry only a partial description of a type, the “implementation context”
parameter can be used by a non-IDL execution environment to recognize other
types that are known or understood in that environment. For more information about
using foreign TypeCodes in SOM IDL files see the SOM Toolkit Users Guide.
Note that the use of self-referential structures, pointers, or foreign types is beyond
the scope of the CORBA standard, and may result in a loss of portability or
distributability in client code.
Parameters
tc The TypeCode whose TCKind categorization is requested.
ev A pointer to an Environment structure. The CORBA standard mandates
the use of this structure as a standard way to return exception information
when an error condition is detected.
Return Value
Returns one of the enumerators listed in the TCKind enumeration shown previously. No
exceptions are raised by this function.
Related Information
Functions: TypeCodeNew, TypeCode_alignment, TypeCode_copy, TypeCode_equal,
TypeCode_free, TypeCode_param_count, TypeCode_parameter, TypeCode_print,
TypeCode_setAlignment, TypeCode_size
Vista de página 348
1 2 ... 344 345 346 347 348 349 350 351 352 353 354 ... 423 424

Comentários a estes Manuais

Sem comentários