#include <emobject.h>
Collaboration diagram for EMAN::EMObject:
Public Types | |
enum | ObjectType { UNKNOWN, BOOL, UNSIGNEDINT, INT, FLOAT, DOUBLE, STRING, EMDATA, XYDATA, INTARRAY, FLOATARRAY, STRINGARRAY, TRANSFORM, CTF, FLOAT_POINTER, INT_POINTER, VOID_POINTER } |
Public Member Functions | |
EMObject () | |
Constructors for each type More types could be added, but all of the accompanying functions would have to be altered to ensure correct functioning. | |
EMObject (bool boolean) | |
EMObject (int num) | |
EMObject (unsigned int num) | |
EMObject (float ff) | |
EMObject (double dd) | |
EMObject (const char *s) | |
EMObject (const string &s) | |
EMObject (float *fp) | |
EMObject (int *ip) | |
EMObject (void *vp) | |
EMObject (EMData *em) | |
EMObject (XYData *xy) | |
EMObject (Transform *t) | |
EMObject (Ctf *ctf) | |
EMObject (const vector< int > &v) | |
EMObject (const vector< float > &v) | |
EMObject (const vector< string > &sarray) | |
EMObject (const EMObject &that) | |
Copy constructor. | |
EMObject & | operator= (const EMObject &that) |
Assigment operator copies pointer locations (emdata, xydata, transform3d) - does not take ownership deep copies all non pointer objects. | |
~EMObject () | |
Desctructor Does not free pointers. | |
operator bool () const | |
Conversion operators. | |
operator int () const | |
operator unsigned int () const | |
operator float () const | |
operator double () const | |
operator const char * () const | |
operator float * () const | |
operator int * () const | |
operator void * () const | |
operator EMData * () const | |
operator XYData * () const | |
operator Transform * () const | |
operator Ctf * () const | |
operator vector () const | |
operator vector () const | |
operator vector () const | |
bool | is_null () const |
Checks to see if the EMObject is interpretable This basically equates to checking to see if the type is UNKNOWN. | |
string | to_str () const |
Calls to_str( this->type). | |
ObjectType | get_type () const |
Get the ObjectType This is an enumerated type first declared in the class EMObjectTypes. | |
string | get_type_string () const |
Get the ObjectType as a string This is an enumerated type first declared in the class EMObjectTypes. | |
string | to_str (ObjectType type) const |
Write the EMObject's value to a string Literally copies into a string, except for the case where the type is boolen where it writes true of false, as opposed to 1 or 0. | |
Static Public Member Functions | |
string | get_object_type_name (ObjectType t) |
Get an ObjectType as a string statically Can be accessed without the instantiation of a class object. | |
Private Member Functions | |
void | printInfo () const |
A debug function that prints as much information as possibe to cout. | |
Static Private Member Functions | |
map< ObjectType, string > | init () |
Private Attributes | |
string | str |
vector< int > | iarray |
vector< float > | farray |
vector< string > | strarray |
ObjectType | type |
bool | b |
int | n |
unsigned int | ui |
float | f |
double | d |
float * | fp |
int * | ip |
void * | vp |
EMData * | emdata |
XYData * | xydata |
Static Private Attributes | |
map< ObjectType, string > | type_registry = init() |
Friends | |
bool | operator== (const EMObject &e1, const EMObject &e2) |
Friend declaration operator== namespace EMAN2 operator== accesses private variables. | |
bool | operator!= (const EMObject &e1, const EMObject &e2) |
Friend declaration operator!= namespace EMAN2 operator!= accesses private variables. |
Each type is typically used as follows ('int' is the example):
int a = 12; EMObject o(a); EMObject o2 = a; // implicit converter from int to EMObject. int a1 = o; // implicit converter from EMObject to int.
EMObjects may store pointers but they currently do not assume ownership - that is, the memory associated with a pointer is never freed by an EMObject.
This type of class design is sometimes referred to as the Variant pattern.
See the testing code in rt/emdata/test_emobject.cpp for prewritten testing code
Definition at line 122 of file emobject.h.
|
Definition at line 125 of file emobject.h. 00125 { 00126 UNKNOWN, 00127 BOOL, 00128 UNSIGNEDINT, 00129 INT, 00130 FLOAT, 00131 DOUBLE, 00132 STRING, 00133 EMDATA, 00134 XYDATA, 00135 INTARRAY, 00136 FLOATARRAY, 00137 STRINGARRAY, 00138 TRANSFORM, 00139 CTF, 00140 FLOAT_POINTER, 00141 INT_POINTER, 00142 VOID_POINTER 00143 };
|
|
Constructors for each type More types could be added, but all of the accompanying functions would have to be altered to ensure correct functioning.
Definition at line 123 of file emobject.cpp.
|
|
Definition at line 127 of file emobject.cpp. References b.
|
|
Definition at line 131 of file emobject.cpp.
|
|
Definition at line 135 of file emobject.cpp.
|
|
Definition at line 139 of file emobject.cpp. References f, and EMAN::Util::goodf(). 00139 : 00140 type(FLOAT) 00141 { 00142 if(Util::goodf(&ff)) { 00143 f = ff; 00144 } 00145 else{ 00146 f = 0.0f; 00147 } 00148 }
|
|
Definition at line 150 of file emobject.cpp. References d, and EMAN::Util::goodf(). 00150 : 00151 type(DOUBLE) 00152 { 00153 if(Util::goodf(&dd)) { 00154 d = dd; 00155 } 00156 else{ 00157 d = 0.0; 00158 } 00159 }
|
|
Definition at line 161 of file emobject.cpp.
|
|
Definition at line 165 of file emobject.cpp.
|
|
Definition at line 169 of file emobject.cpp.
|
|
Definition at line 173 of file emobject.cpp.
|
|
Definition at line 177 of file emobject.cpp.
|
|
Definition at line 181 of file emobject.cpp.
|
|
Definition at line 185 of file emobject.cpp.
|
|
Definition at line 189 of file emobject.cpp. References t. 00189 : 00190 farray(t->get_matrix()), type(TRANSFORM) 00191 {}
|
|
Definition at line 193 of file emobject.cpp.
|
|
Definition at line 197 of file emobject.cpp. References v.
|
|
Definition at line 201 of file emobject.cpp. References v.
|
|
Definition at line 205 of file emobject.cpp.
|
|
Copy constructor. copies pointer locations - does not take ownership deep copies all non pointer objects Definition at line 765 of file emobject.cpp. 00766 { 00767 // init isn't necessary because that must have already called it! 00768 *this = that; 00769 }
|
|
Desctructor Does not free pointers.
Definition at line 121 of file emobject.cpp. 00121 {}
|
|
Get an ObjectType as a string statically Can be accessed without the instantiation of a class object.
Definition at line 598 of file emobject.cpp. References LOGERR, NotExistingObjectException, t, and type_registry. Referenced by operator bool(), operator const char *(), operator double(), operator EMData *(), operator float(), operator float *(), operator int(), operator int *(), operator Transform *(), operator unsigned int(), operator vector(), operator void *(), and operator XYData *(). 00599 { 00600 #ifdef _WIN32 00601 if (t == BOOL) { 00602 return "BOOL"; 00603 }else 00604 if ( t == INT){ 00605 return "INT"; 00606 }else 00607 if ( t == UNSIGNEDINT){ 00608 return "UNSIGNEDINT"; 00609 } else 00610 if ( t == FLOAT){ 00611 return "FLOAT"; 00612 } else 00613 if ( t == DOUBLE){ 00614 return "DOUBLE"; 00615 }else 00616 if ( t == STRING){ 00617 return "STRING"; 00618 }else 00619 if ( t == EMDATA){ 00620 return "EMDATA"; 00621 } 00622 else 00623 if ( t == XYDATA){ 00624 return "XYDATA"; 00625 }else 00626 if ( t == INTARRAY){ 00627 return "INTARRAY"; 00628 }else 00629 if ( t == FLOATARRAY){ 00630 return "FLOATARRAY"; 00631 } else 00632 if ( t == STRINGARRAY){ 00633 return "STRINGARRAY"; 00634 }else 00635 if ( t == TRANSFORM){ 00636 return "TRANSFORM"; 00637 }else 00638 if ( t == CTF){ 00639 return "CTF"; 00640 }else 00641 if ( t == FLOAT_POINTER){ 00642 return "FLOAT_POINTER"; 00643 }else 00644 if ( t == INT_POINTER){ 00645 return "INT_POINTER"; 00646 }else 00647 if ( t == UNKNOWN){ 00648 return "UNKNOWN"; 00649 } else 00650 if ( t == VOID_POINTER){ 00651 return "VOID_POINTER"; 00652 } 00653 else { 00654 LOGERR("No such EMObject defined"); 00655 throw NotExistingObjectException("EMObject", "unknown type"); 00656 } 00657 00658 #else 00659 00660 if ( type_registry.find(t) != type_registry.end() ) 00661 return type_registry[t]; 00662 else 00663 LOGERR("No such EMObject defined"); 00664 throw NotExistingObjectException("EMObject", "unknown type"); 00665 #endif //_WIN32 00666 }
|
|
Get the ObjectType This is an enumerated type first declared in the class EMObjectTypes.
Definition at line 218 of file emobject.h. Referenced by EMAN::EMData::set_attr_python(), EMAN::Transform::set_params(), and EMAN::Transform::set_params_inverse(). 00218 { return type; }
|
|
Get the ObjectType as a string This is an enumerated type first declared in the class EMObjectTypes.
Definition at line 224 of file emobject.h. 00224 { return get_object_type_name(type); }
|
|
Definition at line 77 of file emobject.cpp. 00078 { 00079 map< EMObject::ObjectType, string> mymap; 00080 static bool first_construction = true; 00081 if ( first_construction ) 00082 { 00083 // Initialize the the type registry once and for all 00084 mymap[BOOL] = "BOOL"; 00085 mymap[INT] = "INT"; 00086 mymap[UNSIGNEDINT] = "UNSIGNEDINT"; 00087 mymap[FLOAT] = "FLOAT"; 00088 mymap[DOUBLE] = "DOUBLE"; 00089 mymap[STRING] = "STRING"; 00090 mymap[EMDATA] = "EMDATA"; 00091 mymap[XYDATA] = "XYDATA"; 00092 mymap[INTARRAY] = "INTARRAY"; 00093 mymap[FLOATARRAY] = "FLOATARRAY"; 00094 mymap[STRINGARRAY] = "STRINGARRAY"; 00095 mymap[TRANSFORM] = "TRANFORM"; 00096 mymap[CTF] = "CTF"; 00097 mymap[FLOAT_POINTER] = "FLOAT_POINTER"; 00098 mymap[INT_POINTER] = "INT_POINTER"; 00099 mymap[UNKNOWN] = "UNKNOWN"; 00100 mymap[VOID_POINTER] = "VOID_POINTER"; 00101 first_construction = false; 00102 } 00103 00104 return mymap; 00105 }
|
|
Checks to see if the EMObject is interpretable This basically equates to checking to see if the type is UNKNOWN.
Definition at line 522 of file emobject.cpp. References type. Referenced by EMAN::EMUtil::dump_dict(). 00523 { 00524 return (type == UNKNOWN); 00525 }
|
|
Conversion operators.
Definition at line 209 of file emobject.cpp. References d, emdata, f, fp, get_object_type_name(), ip, n, type, TypeException, ui, vp, and xydata. 00210 { 00211 if (type == BOOL) { 00212 return b; 00213 } 00214 else if (type == INT) { 00215 return n != 0; 00216 } 00217 else if (type == UNSIGNEDINT) { 00218 return ui != 0; 00219 } 00220 else if (type == FLOAT) { 00221 return f != 0; 00222 } 00223 else if (type == DOUBLE) { 00224 return d != 0; 00225 } 00226 else if (type == EMDATA) { 00227 return emdata != 0; 00228 } 00229 else if (type == XYDATA) { 00230 return xydata != 0; 00231 } 00232 else if (type == FLOAT_POINTER) { 00233 return fp != 0; 00234 } 00235 else if (type == INT_POINTER) { 00236 return ip != 0; 00237 } 00238 else if (type == VOID_POINTER) { 00239 return vp != 0; 00240 } 00241 // else if (type == TRANSFORM) { 00242 // return transform != 0; 00243 // } 00244 // It seemed unconventional to return a boolean for the stl objects 00245 else { 00246 if (type != UNKNOWN) { 00247 throw TypeException("Cannot convert to bool this data type ", 00248 get_object_type_name(type)); 00249 } 00250 } 00251 return 0; 00252 }
|
|
Definition at line 388 of file emobject.cpp. References get_object_type_name(), str, STRING, type, and TypeException. 00389 { 00390 if (type != STRING && type != CTF) { 00391 stringstream ss; 00392 string return_string; 00393 if ( type == INT ) 00394 { 00395 ss << n; 00396 ss >> return_string; 00397 return return_string.c_str(); 00398 } 00399 if ( type == UNSIGNEDINT ) 00400 { 00401 ss << ui; 00402 ss >> return_string; 00403 return return_string.c_str(); 00404 } 00405 else 00406 if ( type == FLOAT ) 00407 { 00408 ss << f; 00409 ss >> return_string; 00410 return return_string.c_str(); 00411 } 00412 else 00413 if ( type == DOUBLE ) 00414 { 00415 ss << d; 00416 ss >> return_string; 00417 return return_string.c_str(); 00418 } 00419 else if (type != UNKNOWN) { 00420 throw TypeException("Cannot convert to string from this data type", 00421 get_object_type_name(type)); 00422 } 00423 00424 return ""; 00425 } 00426 return str.c_str(); 00427 }
|
|
Definition at line 466 of file emobject.cpp. References EMAN::Ctf::from_string(), and str. 00467 { 00468 /* if(type != CTF) { 00469 if(type != CTF) { 00470 throw TypeException("Cannot convert to TRANSFORM* from this data type", 00471 get_object_type_name(type)); 00472 } 00473 }*/ 00474 Ctf * ctf = 0; 00475 if(str[0] == 'O') { 00476 ctf = new EMAN1Ctf(); 00477 ctf->from_string(str); 00478 } 00479 else if(str[0] == 'E') { 00480 ctf = new EMAN2Ctf(); 00481 ctf->from_string(str); 00482 } 00483 return ctf; 00484 }
|
|
Definition at line 321 of file emobject.cpp. References b, get_object_type_name(), type, and TypeException. 00322 { 00323 if (type == BOOL) { 00324 return b?1.0:0.0; 00325 } 00326 else if (type == DOUBLE) { 00327 return d; 00328 } 00329 else if (type == INT) { 00330 return (double) n; 00331 } 00332 else if (type == UNSIGNEDINT) { 00333 return (double) ui; 00334 } 00335 else if (type == FLOAT) { 00336 return (double) f; 00337 } 00338 else { 00339 if (type != UNKNOWN) { 00340 throw TypeException("Cannot convert to double from this data type", 00341 get_object_type_name(type)); 00342 } 00343 } 00344 return 0; 00345 }
|
|
Definition at line 429 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00430 { 00431 if (type != EMDATA) { 00432 if (type != UNKNOWN) { 00433 throw TypeException("Cannot convert to EMData* from this data type", 00434 get_object_type_name(type)); 00435 } 00436 return 0; 00437 } 00438 return emdata; 00439 }
|
|
Definition at line 294 of file emobject.cpp. References b, get_object_type_name(), type, and TypeException. 00295 { 00296 if (type == BOOL) { 00297 return b?1.0f:0.0f; 00298 } 00299 else if (type == FLOAT) { 00300 return f; 00301 } 00302 else if (type == INT) { 00303 return (float) n; 00304 } 00305 else if (type == UNSIGNEDINT) { 00306 return (float) ui; 00307 } 00308 else if (type == DOUBLE) { 00309 return (float) d; 00310 } 00311 else { 00312 if (type != UNKNOWN) { 00313 throw TypeException("Cannot convert to float from this data type", 00314 get_object_type_name(type)); 00315 } 00316 } 00317 00318 return 0; 00319 }
|
|
Definition at line 362 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00363 { 00364 if (type != FLOAT_POINTER) 00365 { 00366 if (type != UNKNOWN) 00367 throw TypeException("Cannot convert to float pointer from this data type", 00368 get_object_type_name(type)); 00369 00370 return 0; 00371 } 00372 00373 return fp; 00374 }
|
|
Definition at line 254 of file emobject.cpp. References b, get_object_type_name(), type, and TypeException. 00255 { 00256 if (type == INT) { 00257 return n; 00258 } 00259 else if (type == UNSIGNEDINT) { 00260 return (int) ui; 00261 } 00262 else if (type == FLOAT) { 00263 return (int) f; 00264 } 00265 else if (type == DOUBLE) { 00266 return (int) d; 00267 } 00268 else if (type == BOOL) { 00269 return b?1:0; 00270 } 00271 else { 00272 if (type != UNKNOWN) { 00273 throw TypeException("Cannot convert to int this data type ", 00274 get_object_type_name(type)); 00275 } 00276 } 00277 return 0; 00278 }
|
|
Definition at line 347 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00348 { 00349 if (type != INT_POINTER) 00350 { 00351 if (type != UNKNOWN) 00352 throw TypeException("Cannot convert to float pointer from this data type", 00353 get_object_type_name(type)); 00354 00355 return 0; 00356 } 00357 00358 return ip; 00359 }
|
|
Definition at line 453 of file emobject.cpp. References farray, get_object_type_name(), EMAN::Transform::set_matrix(), type, and TypeException. 00454 { 00455 if(type != TRANSFORM) { 00456 if(type != UNKNOWN) { 00457 throw TypeException("Cannot convert to TRANSFORM* from this data type", 00458 get_object_type_name(type)); 00459 } 00460 } 00461 Transform * transform = new Transform(); 00462 transform->set_matrix(farray); 00463 return transform; 00464 }
|
|
Definition at line 280 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00281 { 00282 if (type == UNSIGNEDINT) { 00283 return (unsigned int) ui; 00284 } 00285 else { 00286 if (type != UNKNOWN) { 00287 throw TypeException("Cannot convert to int this data type ", 00288 get_object_type_name(type)); 00289 } 00290 } 00291 return 0; 00292 }
|
|
|
|
|
|
Definition at line 486 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00487 { 00488 if( type != INTARRAY ) 00489 { 00490 if( type != UNKNOWN ) { 00491 throw TypeException("Cannot convert to vector<int> from this data type", get_object_type_name(type) ); 00492 } 00493 return vector<int>(); 00494 } 00495 return iarray; 00496 }
|
|
Definition at line 377 of file emobject.cpp. References get_object_type_name(), type, TypeException, and vp. 00378 { 00379 if (type == VOID_POINTER) return vp; 00380 else if (type == FLOAT_POINTER) return (void *)fp; 00381 else if (type == INT_POINTER) return (void *)ip; 00382 else if (type == EMDATA) return (void *) emdata; 00383 else if (type == XYDATA) return (void *) xydata; 00384 // else if (type == TRANSFORM) return (void *) transform; 00385 else throw TypeException("Cannot convert to void pointer from this data type", get_object_type_name(type)); 00386 }
|
|
Definition at line 441 of file emobject.cpp. References get_object_type_name(), type, and TypeException. 00442 { 00443 if (type != XYDATA) { 00444 if (type != UNKNOWN) { 00445 throw TypeException("Cannot convert to XYData* from this data type", 00446 get_object_type_name(type)); 00447 } 00448 return 0; 00449 } 00450 return xydata; 00451 }
|
|
Assigment operator copies pointer locations (emdata, xydata, transform3d) - does not take ownership deep copies all non pointer objects.
Definition at line 775 of file emobject.cpp. References b, BOOL, CTF, d, DOUBLE, emdata, EMDATA, f, farray, FLOAT, FLOAT_POINTER, FLOATARRAY, fp, iarray, INT, INT_POINTER, INTARRAY, ip, LOGERR, n, NotExistingObjectException, str, strarray, STRING, STRINGARRAY, TRANSFORM, type, ui, UNKNOWN, UNSIGNEDINT, VOID_POINTER, vp, vp, xydata, and XYDATA. 00776 { 00777 00778 // This test breaks assignment when either the current or assigned values are (float)nan 00779 // it's also somewhat inherently stupid, since testing for equivalence may cost as much 00780 // as assignment. 00781 // if ( *this != that ) 00782 { 00783 // First store the type of the input, At first I forgot to do this and it was a very 00784 // difficult bug to track down 00785 type = that.type; 00786 00787 // if ( type != this_type ) throw 00788 00789 00790 switch (type) 00791 { 00792 case BOOL: 00793 b = that.b; 00794 break; 00795 case INT: 00796 n = that.n; 00797 break; 00798 case UNSIGNEDINT: 00799 ui = that.ui; 00800 break; 00801 case FLOAT: 00802 f = that.f; 00803 break; 00804 case DOUBLE: 00805 d = that.d; 00806 break; 00807 case CTF: 00808 case STRING: 00809 str = that.str; 00810 break; 00811 case FLOAT_POINTER: 00812 // Warning - Pointer address copy. 00813 fp = that.fp; 00814 break; 00815 case INT_POINTER: 00816 // Warning - Pointer address copy. 00817 ip = that.ip; 00818 break; 00819 case VOID_POINTER: 00820 // Warning - Pointer address copy. 00821 vp = that.vp; 00822 break; 00823 case EMDATA: 00824 // Warning - Pointer address copy. 00825 emdata = that.emdata; 00826 break; 00827 case XYDATA: 00828 // Warning - Pointer address copy. 00829 xydata = that.xydata; 00830 break; 00831 case TRANSFORM: 00832 case FLOATARRAY: 00833 farray = that.farray; 00834 break; 00835 case INTARRAY: 00836 iarray = that.iarray; 00837 break; 00838 case STRINGARRAY: 00839 strarray = that.strarray; 00840 break; 00841 case UNKNOWN: 00842 // This is possible, nothing should happen 00843 // The EMObject's default constructor has been called and 00844 // as yet has no type - doing nothing is exactly as the 00845 // the assignment operator should work. 00846 break; 00847 default: 00848 LOGERR("No such EMObject defined"); 00849 throw NotExistingObjectException("EMObject", "unknown type"); 00850 break; 00851 } 00852 } 00853 // else 00854 // { 00855 // cerr << "Warning - attempt to assign EMObject onto itself. No action taken" << endl; 00856 // cerr << "My type is " << get_object_type_name(type) << endl; 00857 // } 00858 00859 return *this; 00860 }
|
|
A debug function that prints as much information as possibe to cout.
Definition at line 109 of file emobject.cpp. References to_str(), type, and type_registry. 00110 { 00111 cout << "The address of my type is " << &type << endl; 00112 cout << " Now printing the enumerated values in type_registry " << endl; 00113 for( map< ObjectType, string>::const_iterator it = type_registry.begin(); it != type_registry.end(); ++it ) 00114 { 00115 cout << it->first << " " << it->second << endl; 00116 } 00117 cout << "My type is " << to_str(type) << " and its enumerated value is " << type << endl; 00118 cout << "The address of the static type registry is " << &type_registry <<", it should be same for all EMObjects" << endl; 00119 }
|
|
Write the EMObject's value to a string Literally copies into a string, except for the case where the type is boolen where it writes true of false, as opposed to 1 or 0.
Definition at line 532 of file emobject.cpp. References d, f, LOGERR, n, NotExistingObjectException, and ui. 00533 { 00534 if (argtype == STRING) { 00535 return str; 00536 } 00537 else { 00538 char tmp_str[32]; 00539 if (argtype == BOOL) { 00540 if (b) 00541 sprintf(tmp_str, "true"); 00542 else 00543 sprintf(tmp_str, "false"); 00544 } 00545 else if (argtype == INT) { 00546 sprintf(tmp_str, "%d", n); 00547 } 00548 else if (argtype == UNSIGNEDINT) { 00549 sprintf(tmp_str, "%d", ui); 00550 } 00551 else if (argtype == FLOAT) { 00552 sprintf(tmp_str, "%f", f); 00553 } 00554 else if (argtype == DOUBLE) { 00555 sprintf(tmp_str, "%f", d); 00556 } 00557 else if (argtype == EMDATA) { 00558 sprintf(tmp_str, "EMDATA"); 00559 } 00560 else if (argtype == FLOAT_POINTER) { 00561 sprintf(tmp_str, "FLOAT_POINTER"); 00562 } 00563 else if (argtype == INT) { 00564 sprintf(tmp_str, "INT_POINTER"); 00565 } 00566 else if (argtype == VOID_POINTER) { 00567 sprintf(tmp_str, "VOID_POINTER"); 00568 } 00569 else if (argtype == XYDATA) { 00570 sprintf(tmp_str, "XYDATA"); 00571 } 00572 else if (argtype == INTARRAY) { 00573 sprintf(tmp_str, "INTARRAY"); 00574 } 00575 else if (argtype == FLOATARRAY) { 00576 sprintf(tmp_str, "FLOATARRAY"); 00577 } 00578 else if (argtype == STRINGARRAY) { 00579 sprintf(tmp_str, "STRINGARRAY"); 00580 } 00581 else if (argtype == TRANSFORM) { 00582 sprintf(tmp_str, "TRANSFORMD"); 00583 } 00584 else if (argtype == CTF) { 00585 sprintf(tmp_str, "CTF"); 00586 } 00587 else if (argtype == UNKNOWN) { 00588 sprintf(tmp_str, "UNKNOWN"); 00589 } 00590 else { 00591 LOGERR("No such EMObject defined"); 00592 throw NotExistingObjectException("EMObject", "unknown type"); 00593 } 00594 return string(tmp_str); 00595 } 00596 }
|
|
Calls to_str( this->type).
Definition at line 527 of file emobject.cpp. References type. Referenced by EMAN::EMUtil::dump_dict(), and printInfo(). 00528 { 00529 return to_str(type); 00530 }
|
|
Friend declaration operator!= namespace EMAN2 operator!= accesses private variables.
|
|
Friend declaration operator== namespace EMAN2 operator== accesses private variables.
|
|
Definition at line 252 of file emobject.h. Referenced by operator double(), operator float(), operator int(), operator=(), and EMAN::operator==(). |
|
Definition at line 256 of file emobject.h. Referenced by EMObject(), operator bool(), operator=(), EMAN::operator==(), and to_str(). |
|
Definition at line 260 of file emobject.h. Referenced by operator bool(), operator=(), and EMAN::operator==(). |
|
|
Definition at line 266 of file emobject.h. Referenced by operator Transform *(), operator=(), and EMAN::operator==(). |
|
Definition at line 257 of file emobject.h. Referenced by operator bool(), operator=(), and EMAN::operator==(). |
|
Definition at line 265 of file emobject.h. Referenced by operator=(), and EMAN::operator==(). |
|
Definition at line 258 of file emobject.h. Referenced by operator bool(), operator=(), and EMAN::operator==(). |
|
Definition at line 253 of file emobject.h. Referenced by operator bool(), operator=(), EMAN::operator==(), and to_str(). |
|
Definition at line 264 of file emobject.h. Referenced by operator const char *(), operator Ctf *(), operator=(), and EMAN::operator==(). |
|
Definition at line 267 of file emobject.h. Referenced by operator=(), and EMAN::operator==(). |
|
Definition at line 268 of file emobject.h. Referenced by is_null(), operator bool(), operator const char *(), operator double(), operator EMData *(), operator float(), operator float *(), operator int(), operator int *(), operator Transform *(), operator unsigned int(), operator vector(), operator void *(), operator XYData *(), operator=(), EMAN::operator==(), printInfo(), and to_str(). |
|
Definition at line 74 of file emobject.cpp. Referenced by get_object_type_name(), and printInfo(). |
|
Definition at line 254 of file emobject.h. Referenced by operator bool(), operator=(), EMAN::operator==(), and to_str(). |
|
Definition at line 259 of file emobject.h. Referenced by operator=(), and EMAN::operator==(). |
|
Definition at line 261 of file emobject.h. Referenced by operator bool(), operator=(), and EMAN::operator==(). |