rwlogo
HydraExpress 4.7

HydraExpress C++ API Reference Guide

Product Documentation:
   Documentation Home

List of all members | Public Member Functions
rwsf::TypedNamedObjectImp< T > Class Template Reference

A subtype of NamedObjectImp used to wrap an object instance in a NamedObject handle. More...

#include <rwsf/core/NamedObject.h>

Inheritance diagram for rwsf::TypedNamedObjectImp< T >:
rwsf::NamedObjectImp

Public Member Functions

 TypedNamedObjectImp ()
 
 TypedNamedObjectImp (const T &objImpl)
 
getValue () const
 

Additional Inherited Members

- Protected Member Functions inherited from rwsf::BodyBase
 BodyBase (void)
 
 BodyBase (const BodyBase &second)
 
virtual ~BodyBase (void)
 
BodyBase & operator= (const BodyBase &second)
 

Detailed Description

template<class T>
class rwsf::TypedNamedObjectImp< T >

TypeNamedObjectImp is a subtype of NamedObjectImp and can be used to wrap an object instance in a NamedObject handle. The object wrapped by this NamedObject body type is passed by value, so performance considerations should be taken into account.

Since this is a templatized function. the type of object wrapped serves as the template parameter to this class and its functions. There are two ways to create a PointerNamedObjectImp:

In both cases, the stored object is local to the TypedNamedObjectImp instance, so no action is necessary regarding the object's lifetime.

Constructor & Destructor Documentation

template<class T >
rwsf::TypedNamedObjectImp< T >::TypedNamedObjectImp ( )

Creates a TypedNamedObjectImp body with a newly created object of type T. The type T must have a default constructor defined.

template<class T >
rwsf::TypedNamedObjectImp< T >::TypedNamedObjectImp ( const T &  objImpl)

Creates a TypedNamedObjectImp body, wrapping the given object objImpl. The objImpl is copied during construction.

Member Function Documentation

template<class T >
T rwsf::TypedNamedObjectImp< T >::getValue ( ) const

Returns a copy of the stored object.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.