Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
Ice::ObjectFactory Class Referenceabstract

A factory for objects. More...

#include <Ice/Ice.h>

Inheritance diagram for Ice::ObjectFactory:
Collaboration diagram for Ice::ObjectFactory:

Public Types

typedef ObjectFactoryPtr PointerType

Public Member Functions

virtual ValuePtr create (const ::std::string &type)=0
 Create a new object for a given object type.
virtual void destroy ()=0
 Called when the factory is removed from the communicator, or if the communicator is destroyed.
virtual ~ObjectFactory ()
Public Member Functions inherited from Ice::LocalObject
virtual bool operator< (const LocalObject &) const
virtual bool operator== (const LocalObject &) const
Public Member Functions inherited from IceUtil::Shared
void __clearFlag (unsigned char flag)
virtual void __decRef ()
virtual int __getRef () const
bool __hasFlag (unsigned char flag)
virtual void __incRef ()
void __setFlag (unsigned char flag)
virtual void __setNoDelete (bool)
Sharedoperator= (const Shared &)
 Shared ()
 Shared (const Shared &)
virtual ~Shared ()

Additional Inherited Members

Static Public Attributes inherited from IceUtil::Shared
static const unsigned char NoDelete
Protected Attributes inherited from IceUtil::Shared
unsigned char _flags
IceUtilInternal::Atomic _ref

Detailed Description

A factory for objects.

Object factories are used when receiving "objects by value". An object factory must be implemented by the application writer and registered with the communicator.

Deprecated
ObjectFactory has been deprecated, use ValueFactory instead.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~ObjectFactory()

virtual Ice::ObjectFactory::~ObjectFactory ( )
virtual

Member Function Documentation

◆ create()

virtual ValuePtr Ice::ObjectFactory::create ( const ::std::string & type)
pure virtual

Create a new object for a given object type.

The type is the absolute Slice type id, i.e., the id relative to the unnamed top-level Slice module. For example, the absolute Slice type id for interfaces of type Bar in the module Foo is "::Foo::Bar".

The leading "<code>::</code>" is required.

Parameters
typeThe object type.
Returns
The object created for the given type, or nil if the factory is unable to create the object.

◆ destroy()

virtual void Ice::ObjectFactory::destroy ( )
pure virtual

Called when the factory is removed from the communicator, or if the communicator is destroyed.

See also
Communicator::destroy

The documentation for this class was generated from the following file: