Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

s11n::abstract_creator< T * > Struct Template Reference

A specialization of abstract_creator to create objects on the heap, using the s11n classloader. More...

#include <abstract_creator.h>

List of all members.

Public Types

typedef T * value_type
 Same as (T *).

typedef T base_value_type
 Same as (T).


Static Public Member Functions

bool create (value_type &v, const std::string &implclass=std::string())
 Tries to create a value_type object, using classload<base_value_type>( key ) to create it.

value_type copy (const value_type &rhs)
 Creates a MONOMORPHIC copy of rhs and returns it.

void assign (value_type &lhs, const value_type &rhs)
 Returns rhs.

void release (value_type &v)
 Deletes v and assigns it to 0.


Detailed Description

template<typename T>
struct s11n::abstract_creator< T * >

A specialization of abstract_creator to create objects on the heap, using the s11n classloader.

Definition at line 127 of file abstract_creator.h.


Member Function Documentation

template<typename T>
value_type s11n::abstract_creator< T * >::copy const value_type rhs  )  [inline, static]
 

Creates a MONOMORPHIC copy of rhs and returns it.

This copy is only useful for non-polymorphic types.

Definition at line 171 of file abstract_creator.h.

template<typename T>
bool s11n::abstract_creator< T * >::create value_type v,
const std::string &  implclass = std::string()
[inline, static]
 

Tries to create a value_type object, using classload<base_value_type>( key ) to create it.

v is assigned to it's value, which may be 0. Returns true if an object is created, else false.

The caller owns the returned object.

Maintenance note: new classloader registrations may need to be installed as new types show up, especially for streamables/PODs (because those aren't normally registered as classes), or this function won't handle them. In s11n this registration is handled by most of the various proxy installation macros.

Definition at line 152 of file abstract_creator.h.


The documentation for this struct was generated from the following file:
Generated on Tue Jul 20 10:46:48 2004 for s11n by doxygen 1.3.7