Xmipp  v3.23.11-Nereus
Macros | Functions
metadata_object.cpp File Reference
#include <iostream>
#include <iomanip>
#include <sstream>
#include "metadata_object.h"
#include "metadata_static.h"
#include "xmipp_error.h"
#include "xmipp_macros.h"
#include <limits>
Include dependency graph for metadata_object.cpp:

Go to the source code of this file.

Macros

#define DOUBLE2STREAM(d)
 
#define INT2STREAM(i)
 
#define MDOBJECT_INIT()   this->label = label; this->type = MDL::labelType(label); this->failed = false; this->chr = _SPACE;
 Macro to do some basic initialization. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const MDObject &value)
 
std::istream & operator>> (std::istream &is, MDObject &value)
 

Macro Definition Documentation

◆ DOUBLE2STREAM

#define DOUBLE2STREAM (   d)
Value:
if (withFormat) {\
(os) << std::setw(12); \
(os) << (((d) != 0. && ABS(d) < 0.001) ? std::scientific : std::fixed);\
} os << d;
doublereal * d
#define ABS(x)
Definition: xmipp_macros.h:142

Definition at line 36 of file metadata_object.cpp.

◆ INT2STREAM

#define INT2STREAM (   i)
Value:
if (withFormat) os << std::setw(20); \
os << i;
#define i

Definition at line 42 of file metadata_object.cpp.

◆ MDOBJECT_INIT

#define MDOBJECT_INIT ( )    this->label = label; this->type = MDL::labelType(label); this->failed = false; this->chr = _SPACE;

Macro to do some basic initialization.

Definition at line 125 of file metadata_object.cpp.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const MDObject value 
)

Definition at line 425 of file metadata_object.cpp.

426 {
427  value.toStream(os);
428  return os;
429 }
void toStream(std::ostream &os, bool withFormat=false, bool isSql=false, bool escape=true) const

◆ operator>>()

std::istream& operator>> ( std::istream &  is,
MDObject value 
)

Definition at line 432 of file metadata_object.cpp.

433 {
434  value.fromStream(is);
435  return is;
436 }
bool fromStream(std::istream &is, bool fromString=false)