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

Template for concrete functors of the Set accessors of the inputs and outputs of a AtomicBlackBox (inherits from bbtk::AtomicBlackBoxSetFunctor). 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 *b, 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 for concrete functors of the Set accessors of the inputs and outputs of a AtomicBlackBox (inherits from bbtk::AtomicBlackBoxSetFunctor).

Definition at line 163 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 170 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkDebugMessage, and bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::mSetMethodPointer.

00170                                                       :
00171       mSetMethodPointer(s) 
00172       {
00173         bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"<<
00174                         TypeName<UBB>()<<","<<
00175                         TypeName<T>()<<","<<
00176                         TypeName<TACCESS>()<<
00177                          ">::AtomicBlackBoxTSetFunctor()"<<std::endl);
00178       }
      


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 181 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkDebugMessage, bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::mSetMethodPointer, and bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::Set().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::Set().

00182     { 
00183       bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetfunctor<"<<
00184                         TypeName<UBB>()<<","<<
00185                         TypeName<T>()<<","<<
00186                         TypeName<TACCESS>()<<
00187                        ">::Set()"<<std::endl);
00188       //      (((UBB*)o)->*mSetMethodPointer)(*(T*)d);
00189       //      bbtkAssert( bbtkEqualTypes( d.type(), typeid(T) ) );
00190       T t = d.unsafe_get<T>();
00191       (((UBB*)o)->*mSetMethodPointer)(t);
00192       //      bbtkDebugMessage("Kernel",9,"SetOK"<<std::endl);
00193     }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 196 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeInfo().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeInfo().

00196 { return typeid(T); }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 197 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeName().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeName().

00197 { return TypeName<T>(); }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 198 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetHumanTypeName().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetHumanTypeName().

00198 { return HumanTypeName<T>(); }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements bbtk::AtomicBlackBoxSetFunctor.

Definition at line 199 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::IsPointerType().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::IsPointerType().

00199 { return false; }

Here is the call graph for this function:

Here is the caller graph for this function:

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 200 of file bbtkAtomicBlackBoxGetSetFunctor.h.

References bbtkInternalError, and bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::BruteForceSetPointer().

Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::BruteForceSetPointer().

00201     {
00202       bbtkInternalError("AtomicBlackBoxTSetFunctor<"
00203                         <<TypeName<UBB>()<<","
00204                         <<TypeName<T>()<<","
00205                         <<TypeName<TACCESS>()
00206                         <<">::BruteForceSetPointer("
00207                         <<b<<","<<p<<")"
00208                         <<" called whereas type '"
00209                         <<TypeName<T>()
00210                         <<"' is not a pointer type"); 
00211     }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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


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