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

upf Namespace Reference


Detailed Description

Module with all upf interfaces.


Compounds

interface  IClassFactory
 Class factory. More...

interface  IClassInfo
 RTTI information about a class. More...

interface  IInterfaceInfo
 RTTI information about interface. More...

interface  ILoader
 upf::ILoader interface is used to load classes from external modules and to provide bindings to other languages. More...

interface  ILog
 Errors logging interface. More...

interface  IManager
 UPF management class. More...

interface  INativeTypeInfo
 RTTI information about native types. More...

interface  IObject
 Base interface for all UPF interfaces. More...

interface  IServiceChangeListener
 Listener that is notified when service provider changes. More...

interface  IServiceManager
 Service manager. More...

interface  ITypedefInfo
 RTTI information about typedef. More...

interface  ITypeInfo
 Type information about particular type. More...

interface  IWriteableClassInfo
struct  Property
 Class property record. More...

class  Ptr
 UPF's smart pointer. More...


Typedefs

typedef upf_InterfaceData InterfacePtr
typedef upf_IID IID
 Interface identificator.

typedef unsigned long CID
 Class identifier.

typedef sequence< CIDCIDsList
 Sequence of ClassID values.

typedef sequence< IIDIIDsList
 Sequence of upf::IID values.


Functions

template<class T> T * queryInterface (IObject *obj)
bool init ()
 Initializes UPF.

bool done ()
 Shuts down UPF.

Ptr< IManagergetManager ()
 Returns pointer to the IManager singleton.

Ptr< IServiceManagergetServiceManager ()
 Returns pointer to the IServiceManager singleton.

CID getCID (const char *classname)
 Translates string class name to CID identifier.

Ptr< IObjectcreate (CID classID)
 Creates instance of class with CID equal to classID.

template<class Interface> Ptr< IObjectcreate ()
 Creates instance of object implementing Interface.

Ptr< IObjectcreate (const char *classname)
 Creates instance of class with given class name.

Ptr< IObjectcreate (const std::string &classname)
 Creates instance of class with given class name.


Variables

const string SERVICE_LOG = "/upf/log"
 Name of the logging service used by UPF (always present).

const long SERVICE_CAN_UNBIND = 0x0001
 The service can be unbinded (removed).

const long SERVICE_CAN_REBIND = 0x0002
 The service can be rebinded (replaced by another non-NULL instance).


Typedef Documentation

typedef unsigned long upf::CID
 

Class identifier.

This is unique integer that identifies particular class. Unlike IIDs, CIDs are assigned dynamically and are not guaranteed to be same during all executions of your application.

See also:
upf::create, upf::IID

native upf::IID
 

Interface identificator.

IID value is passed to IObject::queryInterface and uniquely identifies inteface and its version. IID is generated from interface name (as specified in IDL description, e.g. IClassInfo) and interface version. Unlike CID, IID is determined at compilation time (it is currently implemented as MD5 hash of interface name with version numbers appended).

See also:
Interface Version Numbers

native upf::InterfacePtr
 

For internal use only.

Native type used internally to refer to interface provided by object.

See also:
upf::IObject::queryInterface, upf::Ptr


Function Documentation

template<class Interface>
Ptr<IObject> create   [inline]
 

Creates instance of object implementing Interface.

This prototype is only available for interfaces that were defined with pragma single_impl in IDL file.

See also:
#pragma single_impl

Ptr<IObject> create CID    classID [inline]
 

Creates instance of class with CID equal to classID.

You can obtain classID by calling getCID, or you can pass the classname as argument to create.

Note:
This is slightly more efficient that passing classname as argument to the other prototype off upf::create

bool done   [inline]
 

Shuts down UPF.

Must be called exactly once by the application unless upf::init failed.

Returns:
true on success, false on failure
Note:
Must not be called from UPF module DLL! Call it only from the app.
See also:
upf::init

CID getCID const char *    classname [inline]
 

Translates string class name to CID identifier.

Returns:
CID value or 0 if no such class is registered.

Ptr<IManager> getManager   [inline]
 

Returns pointer to the IManager singleton.

IManager instance is used to access UPF's global state (e.g. class info and type info repositories, IID to interface name mappings etc.).

See also:
upf::IManager

Ptr<IServiceManager> getServiceManager   [inline]
 

Returns pointer to the IServiceManager singleton.

IServiceManager instance is used to access UPF's services (i.e. named objects).

See also:
upf::IServiceManager

bool init   [inline]
 

Initializes UPF.

Must be called exactly once by the application.

Returns:
true on success, false on failure
Note:
Must not be called from UPF module DLL! Call it only from the app.
See also:
upf::done

template<class T>
T* queryInterface IObject   obj [inline]
 

For internal use only.

Queries the object for given interface.

Note:
Use upf::Ptr instead of directly calling this function.
Returns:
pointer to interface implementation or NULL if the object does not provide this interface.


Variable Documentation

const string upf::SERVICE_LOG = "/upf/log"
 

Name of the logging service used by UPF (always present).

You can rebind this service in order to provide own way of reporting UPF errors.

See also:
IServiceManager


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