11 #include "TDataMember.h"
12 #include "TDictionary.h"
14 #include "TMethodCall.h"
78 fcurDict = TDictionary::GetDictionary(this->GetName());
114 TDataMember* dm =
fCurCls->GetDataMember(tmpOb->GetName());
116 out =
new std::string(dm->GetTrueTypeName());
118 out =
new std::string(
"UNKNOWN_OBJECT");
121 out =
new std::string(
"UNKNOWN_OBJECT");
139 if( (*tmpName) ==
"char") {
141 }
else if( (*tmpName) ==
"int") {
143 }
else if((*tmpName) ==
"unsigned int") {
145 }
else if( (*tmpName) ==
"float") {
147 }
else if( (*tmpName) ==
"double") {
149 }
else if( (*tmpName) ==
"TArrayI") {
151 }
else if( (*tmpName) ==
"TArrayI*" ) {
153 }
else if( (*tmpName) ==
"TArrayF" ) {
155 }
else if ((*tmpName) ==
"TArrayF*") {
157 }
else if( (*tmpName) ==
"TArrayD" ) {
159 }
else if ( (*tmpName) ==
"TArrayD*" ) {
161 }
else if ((*tmpName) ==
"UNKNOWN_OBJECT") {
209 TMethod* mt = (TMethod*)
fMethodList->FindObject(methodName.c_str());
222 TMethod* mt = (TMethod*)
fMethodList->FindObject(methodName.c_str());
227 out =
new std::string(mt->GetPrototype());
229 out =
new std::string(
"UNKNOWN_METHOD");
254 TMethod* mt = (TMethod*)
fMethodList->FindObject(methodName);
259 out =
new std::string(mt->GetReturnTypeName());
261 out =
new std::string(
"UNKNOWN_METHOD");
275 TMethodCall* ret = 0;
277 TDataMember* mem = curcls.GetDataMember(mName.c_str());
280 ret = mem->GetterMethod();
304 if( (!getMeth) || (!getMeth->IsValid()) ) {
305 std::cerr <<
"<ERROR> Could not initialize getter method for "<< mName
306 <<
" Type is set to UNKNOWN_TYPE;" << std::endl;
310 std::string typeName =
", Type = ";
314 double tmpDouble = 0.00;
316 switch( (*returnVal).type ) {
318 typeName +=
"CHAR \n";
319 getMeth->Execute(
this,
"", &tmpChar);
320 (*returnVal).c_val = (*tmpChar);
323 typeName +=
"INT \n";
324 getMeth->Execute(
this,
"", tmpLong);
325 (*returnVal).i_val =
static_cast<int>(tmpLong);
328 typeName +=
"UNSIGNED INT \n";
329 getMeth->Execute(
this,
"", tmpLong);
330 (*returnVal).Ui_Val = tmpLong;
333 typeName +=
"FLOAT \n";
334 getMeth->Execute(
this,
"", tmpDouble);
335 (*returnVal).f_val =
static_cast<float>(tmpDouble);
338 typeName +=
"DOUBLE \n";
339 getMeth->Execute(
this,
"", tmpDouble);
340 (*returnVal).d_val = tmpDouble;
343 typeName +=
"INT_ARRAY \n";
344 getMeth->Execute(
this,
"", &tmpChar);
346 (*returnVal).I_Ar_val =
reinterpret_cast<TArrayI*
>(tmpChar);
349 typeName +=
"INT_ARRAY* \n";
350 getMeth->Execute(
this,
"", &tmpChar);
352 (*returnVal).I_Ar_val =
reinterpret_cast<TArrayI*
>(tmpChar);
355 typeName +=
"FLOAT_ARRAY \n";
356 getMeth->Execute(
this,
"", &tmpChar);
358 (*returnVal).F_Ar_val =
reinterpret_cast<TArrayF*
>(tmpChar);
361 typeName +=
"FLOAT_ARRAY* \n";
362 getMeth->Execute(
this,
"", &tmpChar);
364 (*returnVal).F_Ar_val =
reinterpret_cast<TArrayF*
>(tmpChar);
367 typeName +=
"DOUBLE_ARRAY \n";
368 getMeth->Execute(
this,
"", &tmpChar);
370 (*returnVal).D_Ar_val =
reinterpret_cast<TArrayD*
>(tmpChar);
373 typeName +=
"DOUBLE_ARRAY* \n";
374 getMeth->Execute(
this,
"", &tmpChar);
376 (*returnVal).D_Ar_val =
reinterpret_cast<TArrayD*
>(tmpChar);
379 typeName +=
"COMPLEX_TYPE \n";
380 std::cerr <<
"<Warning> Type = COMPLEX_TYPE. Not implemented yet.\n";
383 typeName +=
"UNKNOWN_TYPE \n";
384 std::cerr <<
"<ERROR> Type = UNKNOWN_TYPE. Do not know how to deal with this one. \n";
386 std::cout <<
"Par Name = " << mName << typeName;