00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include <stdlib.h>
00044 #include <stdio.h>
00045
00046 #include "OSGConfig.h"
00047
00048 #include <iostream>
00049
00050 #include <OSGLog.h>
00051
00052 OSG_BEGIN_NAMESPACE
00053
00054
00055
00056
00057
00058
00059 template <class SizeTraitsT> inline
00060 TypedFunctorBase<SizeTraitsT>::TypedFunctorBase(void) :
00061 Inherited()
00062 {
00063 }
00064
00065
00066 template <class SizeTraitsT> inline
00067 TypedFunctorBase<SizeTraitsT>::TypedFunctorBase(
00068 const TypedFunctorBase &source) :
00069
00070 Inherited(source)
00071 {
00072 }
00073
00074
00075 template <class SizeTraitsT> inline
00076 TypedFunctorBase<SizeTraitsT>::~TypedFunctorBase(void)
00077 {
00078 }
00079
00080
00081 template <class SizeTraitsT> inline
00082 void TypedFunctorBase<SizeTraitsT>::operator =(const TypedFunctorBase &source)
00083 {
00084 if(this != &source)
00085 {
00086 memcpy(this, &source,
00087 sizeof(TypedFunctorBase<SizeTraitsT>));
00088 }
00089 }
00090
00091
00092 template <class SizeTraitsT> inline
00093 void TypedFunctorBase<SizeTraitsT>::postCopyConstruct(
00094 const TypedFunctorBase &source)
00095 {
00096 memcpy(this, &source,
00097 sizeof(TypedFunctorBase<SizeTraitsT>));
00098 }
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 template <class Parent, class Params> inline
00109 TypedFunctionFunctorBase<Parent, Params>::TypedFunctionFunctorBase(void) :
00110 Inherited()
00111 {
00112 }
00113
00114
00115 template <class Parent, class Params> inline
00116 TypedFunctionFunctorBase<Parent, Params>::TypedFunctionFunctorBase(
00117 const TypedFunctionFunctorBase &source) :
00118
00119 Inherited(source)
00120 {
00121 }
00122
00123
00124 template <class Parent, class Params> inline
00125 TypedFunctionFunctorBase<Parent, Params>::~TypedFunctionFunctorBase(void)
00126 {
00127 }
00128
00129
00130 template <class Parent, class Params> inline
00131 void TypedFunctionFunctorBase<Parent, Params>::setMethod(FunctionF pFunc)
00132 {
00133 Self::_flags |= Self::FuncPtrValid;
00134
00135 *((FunctionF *) Self::_data2) = pFunc;
00136 }
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146 template <class Parent, class Params> inline
00147 TypedObjectFunctorBase<Parent, Params>::TypedObjectFunctorBase(void) :
00148 Inherited()
00149 {
00150 }
00151
00152
00153 template <class Parent, class Params> inline
00154 TypedObjectFunctorBase<Parent, Params>::TypedObjectFunctorBase(
00155 const TypedObjectFunctorBase &source) :
00156
00157 Inherited(source)
00158 {
00159 }
00160
00161
00162 template <class Parent, class Params> inline
00163 TypedObjectFunctorBase<Parent, Params>::~TypedObjectFunctorBase(void)
00164 {
00165 }
00166
00167
00168 template <class Parent, class Params> inline
00169 void TypedObjectFunctorBase<Parent, Params>::setMethod(ObjMethodF pFunc)
00170 {
00171 Self::_flags |= Self::FuncPtrValid;
00172
00173 *((ObjMethodF *) Self::_data2) = pFunc;
00174 }
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184 template <class Parent, class Params> inline
00185 TypedStoredObjectFunctorBase<Parent, Params>::TypedStoredObjectFunctorBase(
00186 void) :
00187
00188 Inherited()
00189 {
00190 }
00191
00192
00193 template <class Parent, class Params> inline
00194 TypedStoredObjectFunctorBase<Parent, Params>::TypedStoredObjectFunctorBase(
00195 const TypedStoredObjectFunctorBase &source) :
00196
00197 Inherited(source)
00198 {
00199 }
00200
00201
00202 template <class Parent, class Params> inline
00203 TypedStoredObjectFunctorBase<Parent, Params>::~TypedStoredObjectFunctorBase(
00204 void)
00205 {
00206 }
00207
00208
00209 template <class Parent, class Params> inline
00210 void TypedStoredObjectFunctorBase<Parent, Params>::setMethod(ObjMethodF pFunc)
00211 {
00212 Self::_flags |= Self::FuncPtrValid;
00213
00214 *((ObjMethodF *) Self::_data2) = pFunc;
00215 }
00216
00217
00218 template <class Parent, class Params> inline
00219 void TypedStoredObjectFunctorBase<Parent, Params>::setCalledObject(
00220 SetObjectT pObj)
00221 {
00222 Self::_flags |= Self::ObjectValid;
00223
00224 Params::setCalledObject(reinterpret_cast<Char8 *>(Self::_data1), pObj);
00225 }
00226
00227
00228 template <class Parent, class Params> inline
00229 void TypedStoredObjectFunctorBase<Parent, Params>::setObjectAndMethod(
00230 SetObjectT pObj,
00231 ObjMethodF pFunc)
00232 {
00233 Self::_flags |= Self::FuncPtrValid;
00234 Self::_flags |= Self::ObjectValid;
00235
00236 Params::setCalledObject(reinterpret_cast<Char8 *>(Self::_data1), pObj);
00237
00238 *((ObjMethodF *) Self::_data2) = pFunc;
00239 }
00240
00241 OSG_END_NAMESPACE
00242