SG::DVLDataBucket< T > Class Template Reference

A DataBucket specialized for DataVector/DataList. More...

#include <DVLDataBucket.h>

Inheritance diagram for SG::DVLDataBucket< T >:
SG::DVLConstDataListBucket< T >

List of all members.

Public Member Functions

 DVLDataBucket ()
 Default constructor.
 DVLDataBucket (T *data)
 Constructor from a payload object.
 DVLDataBucket (const DVLDataBucket &other)
 Copy constructor.
 ~DVLDataBucket ()
 Destructor.
virtual void * cast (CLID clid, IRegisterTransient *irt=0, bool isConst=true) const
 Return the contents of the DataBucket, converted to type given by clid. Note that only derived->base conversions are allowed here.
virtual void * cast (const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) const
 Return the contents of the DataBucket, converted to type given by std::type_info. Note that only derived->base conversions are allowed here.
virtual DVLDataBucketclone () const
 Return a new DataBucket whose payload has been cloned from the original one.

Detailed Description

template<class T>
class SG::DVLDataBucket< T >

A DataBucket specialized for DataVector/DataList.

DataVector and DataList have some special conversion requirements.

In particular, we may have a situation where we're asked to convert from DataVector<D> to DataVector<B>, where these two classes are not related by inheritance, but D derived from . (In practice, this arises when one has multiple inheritance, and can't mirror both arms with DataVector/DataList.)

This DataBucket allows such conversions to happen by making a copy of the container (as a view container) and converting the contained pointers. The new instance remains owned by the DataBucket.


Constructor & Destructor Documentation

template<class T>
SG::DVLDataBucket< T >::DVLDataBucket ( T data  )  [inline]

Constructor from a payload object.

Parameters:
data Object to hold in the bucket.
template<typename T>
SG::DVLDataBucket< T >::DVLDataBucket ( const DVLDataBucket< T > &  other  )  [inline]

Copy constructor.

Parameters:
other Bucket to copy.

Member Function Documentation

template<typename T >
void * SG::DVLDataBucket< T >::cast ( const std::type_info &  tinfo,
IRegisterTransient *  irt = 0,
bool  isConst = true 
) const [inline, virtual]

Return the contents of the DataBucket, converted to type given by std::type_info. Note that only derived->base conversions are allowed here.

Parameters:
clid The std::type_info of the type to which to convert.
irt To be called if we make a new instance.
isConst True if the object being converted is regarded as const.
template<typename T >
void * SG::DVLDataBucket< T >::cast ( CLID  clid,
IRegisterTransient *  irt = 0,
bool  isConst = true 
) const [inline, virtual]

Return the contents of the DataBucket, converted to type given by clid. Note that only derived->base conversions are allowed here.

Parameters:
clid The class ID to which to convert.
irt To be called if we make a new instance.
isConst True if the object being converted is regarded as const.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1