bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * > Class Template Reference

Template specialization of AtomicBlackBoxTSetFunctor for pointer types. More...

#include <bbtkAtomicBlackBoxGetSetFunctor.h>

Inheritance diagram for bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >:

Inheritance graph
[legend]
Collaboration diagram for bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef void(UBB::* SetMethodPointerType )(TACCESS *)
 Type of pointer on a UBB::Set method.

Public Member Functions

 AtomicBlackBoxTSetFunctor (SetMethodPointerType s)
 Construction with the pointer on the Set method.
void Set (AtomicBlackBox *o, const Data &d)
 Concrete application of the Set method of object o.
TypeInfo GetTypeInfo () const
std::string GetTypeName () const
std::string GetHumanTypeName () const
virtual bool IsPointerType () const
virtual void BruteForceSetPointer (AtomicBlackBox *o, void *p)

Private Attributes

SetMethodPointerType mSetMethodPointer
 Pointer on the Set method.


Detailed Description

template<class UBB, class T, class TACCESS>
class bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >

Template specialization of AtomicBlackBoxTSetFunctor for pointer types.

Definition at line 223 of file bbtkAtomicBlackBoxGetSetFunctor.h.


Member Typedef Documentation

template<class UBB, class T, class TACCESS>
typedef void(UBB::* bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::SetMethodPointerType)(TACCESS *)

Type of pointer on a UBB::Set method.


Constructor & Destructor Documentation

template<class UBB, class T, class TACCESS>
bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::AtomicBlackBoxTSetFunctor ( SetMethodPointerType  s  )  [inline]

Construction with the pointer on the Set method.

Definition at line 231 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkDebugMessage.

00231                                                       :
00232       mSetMethodPointer(s) 
00233     {
00234       bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"<<
00235                        TypeName<UBB>()<<","<<
00236                        TypeName<T*>()<<","<<
00237                        TypeName<TACCESS*>()<<
00238                        ">::AtomicBlackBoxTSetFunctor()"<<std::endl);
00239     }
    


Member Function Documentation

template<class UBB, class T, class TACCESS>
void bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::Set ( AtomicBlackBox o,
const Data d 
) [inline, virtual]

Concrete application of the Set method of object o.

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 242 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkDebugMessage.

00243     { 
00244       bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetfunctor<"<<
00245                        TypeName<UBB>()<<","<<
00246                        TypeName<T*>()<<","<<
00247                        TypeName<TACCESS*>()<<
00248                        ">::Set()"<<std::endl);
00249       
00250       (((UBB*)o)->*mSetMethodPointer)(d.unsafe_get<T*>());
00251 
00252     }

template<class UBB, class T, class TACCESS>
TypeInfo bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::GetTypeInfo (  )  const [inline, virtual]

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 255 of file bbtkAtomicBlackBoxGetSetFunctor.h.

00255 { return typeid(T*); }

template<class UBB, class T, class TACCESS>
std::string bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::GetTypeName (  )  const [inline, virtual]

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 256 of file bbtkAtomicBlackBoxGetSetFunctor.h.

00256 { return TypeName<T*>(); }

template<class UBB, class T, class TACCESS>
std::string bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::GetHumanTypeName (  )  const [inline, virtual]

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 257 of file bbtkAtomicBlackBoxGetSetFunctor.h.

00257 { return HumanTypeName<T*>(); }

template<class UBB, class T, class TACCESS>
virtual bool bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::IsPointerType (  )  const [inline, virtual]

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 258 of file bbtkAtomicBlackBoxGetSetFunctor.h.

00258 { return true; }

template<class UBB, class T, class TACCESS>
virtual void bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::BruteForceSetPointer ( AtomicBlackBox o,
void *  p 
) [inline, virtual]

Abstract method which applies the "Set" function of AtomicBlackBox o using brute force cast to the typed pointer required by the "Set" fun. Only works if the param type of the "Set" function is a pointer (see template specialization below). !!! Use with care !!!

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 261 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkDebugMessage.

00262     {  
00263       bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"
00264                        <<TypeName<UBB>()<<","
00265                        <<TypeName<T*>()<<","
00266                        <<TypeName<TACCESS*>()
00267                        <<">::BruteForceSetPointer() (pointer specialization)");
00268 
00269       (((UBB*)o)->*mSetMethodPointer)((T*)p);
00270 
00271     }


Member Data Documentation

template<class UBB, class T, class TACCESS>
SetMethodPointerType bbtk::AtomicBlackBoxTSetFunctor< UBB, T *, TACCESS * >::mSetMethodPointer [private]

Pointer on the Set method.

Definition at line 274 of file bbtkAtomicBlackBoxGetSetFunctor.h.


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

Generated on Wed Nov 12 11:38:28 2008 for BBTK by  doxygen 1.5.6