#include <ASerializable.hpp>
|
static bool | _commentWrite (std::ostream &os, const String &comment) |
|
template<typename T > |
static bool | _recordWrite (std::ostream &os, const String &title, const T &val) |
|
template<typename T > |
static bool | _recordWriteVec (std::ostream &os, const String &title, const VectorT< T > &vec) |
|
template<typename T > |
static bool | _recordRead (std::istream &is, const String &title, T &val) |
|
template<typename T > |
static bool | _recordReadVec (std::istream &is, const String &title, VectorT< T > &vec, int nvalues) |
|
static bool | _onlyBlanks (char *string) |
|
static bool | _tableRead (std::istream &is, const String &string, int ntab, double *tab) |
|
static bool | _tableWrite (std::ostream &os, const String &string, int ntab, const VectorDouble &tab) |
|
◆ ASerializable() [1/2]
ASerializable::ASerializable |
( |
| ) |
|
◆ ASerializable() [2/2]
Copy constructor: don't copy temporary file info
◆ ~ASerializable()
ASerializable::~ASerializable |
( |
| ) |
|
|
virtual |
◆ _commentWrite()
bool ASerializable::_commentWrite |
( |
std::ostream & |
os, |
|
|
const String & |
comment |
|
) |
| |
|
staticprotected |
◆ _deserialize()
virtual bool ASerializable::_deserialize |
( |
std::istream & |
is, |
|
|
bool |
verbose = false |
|
) |
| |
|
protectedpure virtual |
Implemented in Vario, Polygons, PolyElem, NeighUnique, NeighMoving, NeighImage, NeighCell, NeighBench, ANeigh, Model, MeshSpherical, MeshManifold, MeshManifold, MeshETurbo, MeshEStandard, AMesh, Table, RuleShift, RuleShadow, Rule, FracFault, FracFamily, FracEnviron, Faults, DbGrid, Db, PolyLine2D, AnamUser, AnamHermite, AnamEmpirical, AnamDiscreteIR, AnamDiscreteDD, AnamDiscrete, and AnamContinuous.
◆ _fileOpenRead()
bool ASerializable::_fileOpenRead |
( |
const String & |
filename, |
|
|
std::ifstream & |
is, |
|
|
bool |
verbose = false |
|
) |
| const |
|
protected |
◆ _fileOpenWrite()
bool ASerializable::_fileOpenWrite |
( |
const String & |
filename, |
|
|
std::ofstream & |
os, |
|
|
bool |
verbose = false |
|
) |
| const |
|
protected |
◆ _getNFName()
virtual String ASerializable::_getNFName |
( |
| ) |
const |
|
protectedpure virtual |
Implemented in Vario, Polygons, PolyElem, NeighUnique, NeighMoving, NeighImage, NeighCell, NeighBench, ANeigh, Model, MeshSpherical, MeshManifold, MeshETurbo, MeshEStandard, AMesh, Table, RuleShift, RuleShadow, Rule, FracFault, FracFamily, FracEnviron, Faults, DbGrid, Db, PolyLine2D, AnamUser, AnamHermite, AnamEmpirical, AnamDiscreteIR, AnamDiscreteDD, AnamDiscrete, and AnamContinuous.
◆ _onlyBlanks()
bool ASerializable::_onlyBlanks |
( |
char * |
string | ) |
|
|
staticprotected |
◆ _recordRead()
template<typename T >
bool ASerializable::_recordRead |
( |
std::istream & |
is, |
|
|
const String & |
title, |
|
|
T & |
val |
|
) |
| |
|
staticprotected |
◆ _recordReadVec()
template<typename T >
bool ASerializable::_recordReadVec |
( |
std::istream & |
is, |
|
|
const String & |
title, |
|
|
VectorT< T > & |
vec, |
|
|
int |
nvalues |
|
) |
| |
|
staticprotected |
◆ _recordWrite()
template<typename T >
bool ASerializable::_recordWrite |
( |
std::ostream & |
os, |
|
|
const String & |
title, |
|
|
const T & |
val |
|
) |
| |
|
staticprotected |
◆ _recordWriteVec()
template<typename T >
bool ASerializable::_recordWriteVec |
( |
std::ostream & |
os, |
|
|
const String & |
title, |
|
|
const VectorT< T > & |
vec |
|
) |
| |
|
staticprotected |
◆ _serialize()
virtual bool ASerializable::_serialize |
( |
std::ostream & |
os, |
|
|
bool |
verbose = false |
|
) |
| const |
|
protectedpure virtual |
Implemented in Vario, Polygons, PolyElem, NeighUnique, NeighMoving, NeighImage, NeighCell, NeighBench, ANeigh, Model, MeshSpherical, MeshManifold, MeshManifold, MeshETurbo, MeshEStandard, AMesh, Table, RuleShift, RuleShadow, Rule, FracFault, FracFamily, FracEnviron, Faults, DbGrid, Db, PolyLine2D, AnamUser, AnamHermite, AnamEmpirical, AnamDiscreteIR, AnamDiscreteDD, AnamDiscrete, and AnamContinuous.
◆ _tableRead()
bool ASerializable::_tableRead |
( |
std::istream & |
is, |
|
|
const String & |
string, |
|
|
int |
ntab, |
|
|
double * |
tab |
|
) |
| |
|
staticprotected |
◆ _tableWrite()
bool ASerializable::_tableWrite |
( |
std::ostream & |
os, |
|
|
const String & |
string, |
|
|
int |
ntab, |
|
|
const VectorDouble & |
tab |
|
) |
| |
|
staticprotected |
◆ buildFileName()
String ASerializable::buildFileName |
( |
int |
status, |
|
|
const String & |
filename, |
|
|
bool |
ensureDirExist = false |
|
) |
| |
|
static |
Build a standard filename for Read or Write operation
- Parameters
-
status | 1 for Read and 2 for Write |
filename | Name of the filename (see remark) |
ensureDirExist | When TRUE, the Directory is created if not already existing |
- Returns
◆ createDirectory()
bool ASerializable::createDirectory |
( |
const String & |
dir | ) |
|
|
static |
Cross platform way to create a directory (or ensure its existence)
◆ deserialize()
bool ASerializable::deserialize |
( |
std::istream & |
is, |
|
|
bool |
verbose = true |
|
) |
| |
◆ dumpToNF()
bool ASerializable::dumpToNF |
( |
const String & |
neutralFilename, |
|
|
bool |
verbose = false |
|
) |
| const |
◆ getContainerName()
const String & ASerializable::getContainerName |
( |
| ) |
|
|
static |
◆ getDirectory()
Cross-platform way to get parent directory from a path. Returned directory contains trailing separator.
◆ getExecDirectory()
String ASerializable::getExecDirectory |
( |
| ) |
|
|
static |
Cross platform way to get executable directory. Returned directory contains trailing separator
◆ getFileIdentity()
String ASerializable::getFileIdentity |
( |
const String & |
filename, |
|
|
bool |
verbose = false |
|
) |
| |
|
static |
◆ getHomeDirectory()
String ASerializable::getHomeDirectory |
( |
const String & |
sub = "" | ) |
|
|
static |
◆ getPrefixName()
const String & ASerializable::getPrefixName |
( |
| ) |
|
|
static |
◆ getTestData()
This method returns the absolute path to a Test Data This can only be used in non-regression test (NOT in any Python or R stand-alone script)
- Returns
◆ getWorkingDirectory()
String ASerializable::getWorkingDirectory |
( |
| ) |
|
|
static |
◆ operator=()
Assignment operator: don't copy temporary file info
◆ serialize()
bool ASerializable::serialize |
( |
std::ostream & |
os, |
|
|
bool |
verbose = true |
|
) |
| const |
◆ setContainerName()
void ASerializable::setContainerName |
( |
bool |
useDefault, |
|
|
const String & |
containerName = "" , |
|
|
bool |
verbose = false |
|
) |
| |
|
static |
Set the Container Directory Name (do not forget trailing separator "/")
- Parameters
-
useDefault | True if the user wants to use automated ContainerName
- defined with the global variable PYGTSLEARN_DIR
- or using HOME/gstlearn_dir
|
containerName | Name or "" for current location |
verbose | Verbose flag |
◆ setPrefixName()
void ASerializable::setPrefixName |
( |
const String & |
prefixName | ) |
|
|
static |
◆ unsetContainerName()
void ASerializable::unsetContainerName |
( |
| ) |
|
|
static |
This enables un-defining the Container Name. Then files will be saved on current Directory
◆ unsetPrefixName()
void ASerializable::unsetPrefixName |
( |
void |
| ) |
|
|
static |
◆ myContainerName
◆ myPrefixName
The documentation for this class was generated from the following files: