#include <bbtkAtomicBlackBoxGetSetFunctor.h>
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. |
Definition at line 163 of file bbtkAtomicBlackBoxGetSetFunctor.h.
typedef void(UBB::* bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::SetMethodPointerType)(TACCESS) |
Type of pointer on a UBB::Set method.
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.
00170 : 00171 mSetMethodPointer(s) 00172 { 00173 bbtkDebugMessage("data",9,"AtomicBlackBoxTSetFunctor<"<< 00174 TypeName<UBB>()<<","<< 00175 TypeName<T>()<<","<< 00176 TypeName<TACCESS>()<< 00177 ">::AtomicBlackBoxTSetFunctor()"<<std::endl); 00178 }
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.
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 }
std::string bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetHumanTypeName | ( | ) | const [inline, virtual] |
Implements bbtk::AtomicBlackBoxSetFunctor.
Definition at line 198 of file bbtkAtomicBlackBoxGetSetFunctor.h.
TypeInfo bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeInfo | ( | ) | const [inline, virtual] |
Implements bbtk::AtomicBlackBoxSetFunctor.
Definition at line 196 of file bbtkAtomicBlackBoxGetSetFunctor.h.
std::string bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::GetTypeName | ( | ) | const [inline, virtual] |
Implements bbtk::AtomicBlackBoxSetFunctor.
Definition at line 197 of file bbtkAtomicBlackBoxGetSetFunctor.h.
virtual bool bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::IsPointerType | ( | ) | const [inline, virtual] |
Implements bbtk::AtomicBlackBoxSetFunctor.
Definition at line 199 of file bbtkAtomicBlackBoxGetSetFunctor.h.
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, and bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::mSetMethodPointer.
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 }
SetMethodPointerType bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::mSetMethodPointer [private] |
Pointer on the Set method.
Definition at line 214 of file bbtkAtomicBlackBoxGetSetFunctor.h.
Referenced by bbtk::AtomicBlackBoxTSetFunctor< UBB, T, TACCESS >::Set().