Xmipp
v3.23.11-Nereus
|
#include <metadata_object.h>
Public Member Functions | |
void | labelTypeCheck (MDLabelType checkingType) const |
void | copy (const MDObject &obj) |
MDObject (const MDObject &obj) | |
MDObject & | operator= (const MDObject &obj) |
MDObject (MDLabel label) | |
MDObject (MDLabel label, const int &intValue) | |
MDObject (MDLabel label, const double &doubleValue) | |
MDObject (MDLabel label, const bool &boolValue) | |
MDObject (MDLabel label, const String &stringValue) | |
MDObject (MDLabel label, const std::vector< double > &vectorValue) | |
MDObject (MDLabel label, const std::vector< float > &vectorValueFloat) | |
MDObject (MDLabel label, const std::vector< size_t > &vectorValueLong) | |
MDObject (MDLabel label, const size_t &longintValue) | |
MDObject (MDLabel label, const float &floatValue)=delete | |
MDObject (MDLabel label, const char *&charValue)=delete | |
~MDObject () | |
Destructor. More... | |
const int & | getValue2 (int) const |
const double & | getValue2 (double) const |
const bool & | getValue2 (bool) const |
const String & | getValue2 (String) const |
const std::vector< double > & | getValue2 (std::vector< double >) const |
const std::vector< float > & | getValue2 (std::vector< float >) const |
const std::vector< size_t > & | getValue2 (std::vector< size_t >) const |
const size_t & | getValue2 (size_t) const |
float | getValue2 (float) const |
int & | getValue2 (int) |
double & | getValue2 (double) |
bool & | getValue2 (bool) |
String & | getValue2 (String) |
std::vector< double > & | getValue2 (std::vector< double >) |
std::vector< float > & | getValue2 (std::vector< float >) |
std::vector< size_t > & | getValue2 (std::vector< size_t >) |
size_t & | getValue2 (size_t) |
float | getValue2 (float) |
void | getValue2 (char *) const =delete |
void | setValue (const int &iv) |
void | setValue (const double &dv) |
void | setValue (const bool &bv) |
void | setValue (const String &sv) |
void | setValue (const std::vector< double > &vv) |
void | setValue (const std::vector< float > &vv) |
void | setValue (const std::vector< size_t > &vv) |
void | setValue (const size_t &lv) |
void | setValue (const float &floatvalue) |
void | setValue (const char *&charvalue) |
void | toStream (std::ostream &os, bool withFormat=false, bool isSql=false, bool escape=true) const |
String | toString (bool withFormat=false, bool isSql=false) const |
bool | fromStream (std::istream &is, bool fromString=false) |
bool | fromString (const String &str) |
bool | fromChar (const char *str) |
bool | eq (const MDObject &obj, double epsilon) const |
bool | operator== (const MDObject &obj) const |
bool | operator!= (const MDObject &obj) const |
bool | operator<= (const MDObject &obj) const |
bool | operator>= (const MDObject &obj) const |
bool | operator< (const MDObject &obj) const |
bool | operator> (const MDObject &obj) const |
Public Attributes | |
ObjectData | data = {0} |
bool | failed |
char | chr |
MDLabel | label |
MDLabelType | type = LABEL_INT |
Friends | |
class | MDSql |
std::istream & | operator>> (std::istream &is, MDObject &value) |
std::ostream & | operator<< (std::ostream &is, const MDObject &value) |
MDObject stores single MetaData value. Each column in each metadata row contains MDObject. It can contain multiple types of data (see ObjectData).
Definition at line 54 of file metadata_object.h.
MDObject::MDObject | ( | const MDObject & | obj | ) |
MDObject::MDObject | ( | MDLabel | label | ) |
Definition at line 105 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const int & | v | ||
) |
Constructors for each Label supported type these constructor will do the labels type checking
Definition at line 129 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const double & | doubleValue | ||
) |
Definition at line 134 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const bool & | boolValue | ||
) |
Definition at line 139 of file metadata_object.cpp.
Definition at line 144 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const std::vector< double > & | vectorValue | ||
) |
Definition at line 150 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const std::vector< float > & | vectorValueFloat | ||
) |
MDObject::MDObject | ( | MDLabel | label, |
const std::vector< size_t > & | vectorValueLong | ||
) |
Definition at line 156 of file metadata_object.cpp.
MDObject::MDObject | ( | MDLabel | label, |
const size_t & | longintValue | ||
) |
Definition at line 162 of file metadata_object.cpp.
|
delete |
Do not use MDObject constructor with floats, use double. Floats are banned from metadata class.
|
delete |
Do not use MDObject constructor with char, use string. Chars are banned from metadata class.
MDObject::~MDObject | ( | ) |
Destructor.
Definition at line 168 of file metadata_object.cpp.
void MDObject::copy | ( | const MDObject & | obj | ) |
Definition at line 48 of file metadata_object.cpp.
bool MDObject::eq | ( | const MDObject & | obj, |
double | epsilon | ||
) | const |
Definition at line 539 of file metadata_object.cpp.
bool MDObject::fromChar | ( | const char * | str | ) |
Definition at line 529 of file metadata_object.cpp.
bool MDObject::fromStream | ( | std::istream & | is, |
bool | fromString = false |
||
) |
Definition at line 438 of file metadata_object.cpp.
bool MDObject::fromString | ( | const String & | str | ) |
Definition at line 521 of file metadata_object.cpp.
const int & MDObject::getValue2 | ( | int | ) | const |
Definition at line 188 of file metadata_object.cpp.
const double & MDObject::getValue2 | ( | double | ) | const |
Definition at line 198 of file metadata_object.cpp.
const bool & MDObject::getValue2 | ( | bool | ) | const |
Definition at line 208 of file metadata_object.cpp.
Definition at line 218 of file metadata_object.cpp.
const std::vector< double > & MDObject::getValue2 | ( | std::vector< double > | ) | const |
Definition at line 228 of file metadata_object.cpp.
const std::vector< float > & MDObject::getValue2 | ( | std::vector< float > | ) | const |
Definition at line 238 of file metadata_object.cpp.
const std::vector< size_t > & MDObject::getValue2 | ( | std::vector< size_t > | ) | const |
Definition at line 248 of file metadata_object.cpp.
const size_t & MDObject::getValue2 | ( | size_t | ) | const |
Definition at line 258 of file metadata_object.cpp.
float MDObject::getValue2 | ( | float | ) | const |
Definition at line 267 of file metadata_object.cpp.
int & MDObject::getValue2 | ( | int | ) |
Definition at line 183 of file metadata_object.cpp.
double & MDObject::getValue2 | ( | double | ) |
Definition at line 193 of file metadata_object.cpp.
bool & MDObject::getValue2 | ( | bool | ) |
Definition at line 203 of file metadata_object.cpp.
Definition at line 213 of file metadata_object.cpp.
std::vector< double > & MDObject::getValue2 | ( | std::vector< double > | ) |
Definition at line 223 of file metadata_object.cpp.
std::vector< float > & MDObject::getValue2 | ( | std::vector< float > | ) |
Definition at line 233 of file metadata_object.cpp.
std::vector< size_t > & MDObject::getValue2 | ( | std::vector< size_t > | ) |
Definition at line 243 of file metadata_object.cpp.
size_t & MDObject::getValue2 | ( | size_t | ) |
Definition at line 253 of file metadata_object.cpp.
float MDObject::getValue2 | ( | float | ) |
Definition at line 263 of file metadata_object.cpp.
|
delete |
Do not use getValue2 with char, use string. chars are banned from metadata class.
|
inline |
Definition at line 92 of file metadata_object.cpp.
bool MDObject::operator!= | ( | const MDObject & | obj | ) | const |
Definition at line 595 of file metadata_object.cpp.
bool MDObject::operator< | ( | const MDObject & | obj | ) | const |
Definition at line 603 of file metadata_object.cpp.
bool MDObject::operator<= | ( | const MDObject & | obj | ) | const |
Definition at line 579 of file metadata_object.cpp.
bool MDObject::operator== | ( | const MDObject & | obj | ) | const |
Definition at line 535 of file metadata_object.cpp.
bool MDObject::operator> | ( | const MDObject & | obj | ) | const |
Definition at line 607 of file metadata_object.cpp.
bool MDObject::operator>= | ( | const MDObject & | obj | ) | const |
Definition at line 599 of file metadata_object.cpp.
void MDObject::setValue | ( | const int & | iv | ) |
Definition at line 271 of file metadata_object.cpp.
void MDObject::setValue | ( | const double & | dv | ) |
Definition at line 277 of file metadata_object.cpp.
void MDObject::setValue | ( | const bool & | bv | ) |
Definition at line 283 of file metadata_object.cpp.
void MDObject::setValue | ( | const String & | sv | ) |
Definition at line 289 of file metadata_object.cpp.
void MDObject::setValue | ( | const std::vector< double > & | vv | ) |
Definition at line 295 of file metadata_object.cpp.
void MDObject::setValue | ( | const std::vector< float > & | vv | ) |
Definition at line 305 of file metadata_object.cpp.
void MDObject::setValue | ( | const std::vector< size_t > & | vv | ) |
Definition at line 315 of file metadata_object.cpp.
void MDObject::setValue | ( | const size_t & | lv | ) |
Definition at line 321 of file metadata_object.cpp.
void MDObject::setValue | ( | const float & | floatvalue | ) |
Definition at line 327 of file metadata_object.cpp.
void MDObject::setValue | ( | const char *& | charvalue | ) |
Definition at line 332 of file metadata_object.cpp.
void MDObject::toStream | ( | std::ostream & | os, |
bool | withFormat = false , |
||
bool | isSql = false , |
||
bool | escape = true |
||
) | const |
Definition at line 337 of file metadata_object.cpp.
String MDObject::toString | ( | bool | withFormat = false , |
bool | isSql = false |
||
) | const |
Definition at line 412 of file metadata_object.cpp.
|
friend |
Definition at line 166 of file metadata_object.h.
|
friend |
Definition at line 425 of file metadata_object.cpp.
|
friend |
Definition at line 432 of file metadata_object.cpp.
char MDObject::chr |
Definition at line 60 of file metadata_object.h.
ObjectData MDObject::data = {0} |
Definition at line 58 of file metadata_object.h.
bool MDObject::failed |
Definition at line 59 of file metadata_object.h.
MDLabel MDObject::label |
Definition at line 65 of file metadata_object.h.
MDLabelType MDObject::type = LABEL_INT |
Definition at line 66 of file metadata_object.h.