Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

upf::ITypeInfo Interface Reference

import "ITypeInfo.idl";

Inheritance diagram for upf::ITypeInfo:

Inheritance graph
[legend]
List of all members.

Detailed Description

Type information about particular type.

This class and derived classes are used to implement reflexion (ability to inspect types at runtime, e.g. enumerate inteface's methods and call them without compilation-time knowledge of the type).

ITypeInfo objects are returned by various IInterfaceInfo methods. IInterfaceInfo instances are returned by IManager as means of interface description.

See also:
upf::IManager::getInterfaceInfo, upf::IInterfaceInfo, upf::IClassInfo, upf::IObject::getClassID, upf::IClassInfo::getInterfaces


Public Types

enum  Kind {
  TYPE_INTERFACE, TYPE_TYPEDEF, TYPE_NATIVE_TYPE, TYPE_STRUCT,
  TYPE_CONST, TYPE_UNION, TYPE_ENUM
}
 Basic type categorization. More...


Public Methods

Kind getKind ()
 Returns basic "type category" of the type represented by this ITypeInfo instance (interface, typedef, elementary type, ...).

string getName ()
 Returns type name.


Member Enumeration Documentation

enum upf::ITypeInfo::Kind
 

Basic type categorization.

Enumeration values:
TYPE_INTERFACE  The type is interface (see IInterfaceInfo).
TYPE_TYPEDEF  The type is typedef for another type (see ITypedefInfo).
TYPE_NATIVE_TYPE  The type is a native type (see INativeTypeInfo).
TYPE_STRUCT  The type is structure (see IStructInfo).
TYPE_CONST  The type is constant (see IConstInfo, not really a type...).
TYPE_UNION  The type is union (see IUnionInfo).
TYPE_ENUM  The type is an enum (see IEnumInfo).


Member Function Documentation

Kind upf::ITypeInfo::getKind  
 

Returns basic "type category" of the type represented by this ITypeInfo instance (interface, typedef, elementary type, ...).

Use this information to query type info object for more specific interface with detailed information about the type. For example, if getKind returns TYPE_INTERFACE, then you can query the object for upf::IInterfaceInfo:

        // C++ example:
        Ptr<ITypeInfo> typeinfo = ...;
        if (typeinfo->getKind() == ITypeInfo::TYPE_INTERFACE)
        {
            Ptr<IInterfaceInfo> info2 = typeinfo; // will certainly be != NULL
            ...
        }

string upf::ITypeInfo::getName  
 

Returns type name.

The name is fully qualified and uses dotted notation (for example, interface defined as Foo in module Bar and referred to as Bar::Foo in IDL (or C++) is reported as "Bar.Foo").


Generated on Wed Jan 15 23:10:56 2003 for Universal Plugins Framework by doxygen1.2.18