Field3DFile.cpp File Reference
Fields

Contains implementations of Field3DFile-related member functions. More...

`#include "Field3DFile.h"`
`#include <sys/stat.h>`
`#include <unistd.h>`
`#include <boost/tokenizer.hpp>`
`#include <boost/utility.hpp>`
`#include "Field.h"`
`#include "FieldCache.h"`
`#include "Field3DFileHDF5.h"`
`#include "ClassFactory.h"`
`#include "OArchive.h"`
`#include "OgIAttribute.h"`
`#include "OgIDataset.h"`
`#include "OgIGroup.h"`
`#include "OgOAttribute.h"`
`#include "OgODataset.h"`
`#include "OgOGroup.h"`

Go to the source code of this file.

## Namespaces

namespace | File
| Namespace for file I/O specifics.

## Macros

#define | FIELD3D_INSTANTIATION_READLAYERS1(type)
#define | FIELD3D_INSTANTIATION_READLAYERS2(type)
#define | FIELD3D_INSTANTIATION_READPROXYLAYER(type)
#define | FIELD3D_INSTANTIATION_READPROXYSCALARLAYER(type)
#define | FIELD3D_INSTANTIATION_READPROXYVECTORLAYER(type)
#define | FIELD3D_INSTANTIATION_WRITELAYER(type)

## Functions

| FIELD3D_INSTANTIATION_READLAYERS1 (float16_t)
| FIELD3D_INSTANTIATION_READLAYERS1 (float32_t)
| FIELD3D_INSTANTIATION_READLAYERS1 (float64_t)
| FIELD3D_INSTANTIATION_READLAYERS1 (vec16_t)
| FIELD3D_INSTANTIATION_READLAYERS1 (vec32_t)
| FIELD3D_INSTANTIATION_READLAYERS1 (vec64_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (float16_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (float32_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (float64_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (vec16_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (vec32_t)
| FIELD3D_INSTANTIATION_READLAYERS2 (vec64_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (float16_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (float32_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (float64_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (vec16_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (vec32_t)
| FIELD3D_INSTANTIATION_READPROXYLAYER (vec64_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (float16_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (float32_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (float64_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (vec16_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (vec32_t)
| FIELD3D_INSTANTIATION_READPROXYSCALARLAYER (vec64_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (float16_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (float32_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (float64_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (vec16_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (vec32_t)
| FIELD3D_INSTANTIATION_READPROXYVECTORLAYER (vec64_t)
| FIELD3D_INSTANTIATION_WRITELAYER (float16_t)
| FIELD3D_INSTANTIATION_WRITELAYER (float32_t)
| FIELD3D_INSTANTIATION_WRITELAYER (float64_t)
| FIELD3D_INSTANTIATION_WRITELAYER (vec16_t)
| FIELD3D_INSTANTIATION_WRITELAYER (vec32_t)
| FIELD3D_INSTANTIATION_WRITELAYER (vec64_t)
bool | fileExists (const std::string &filename)
| checks to see if a file/directory exists or not

## Detailed Description

Contains implementations of Field3DFile-related member functions.

Definition in file Field3DFile.cpp.

## Macro Definition Documentation

## FIELD3D_INSTANTIATION_WRITELAYER

#define FIELD3D_INSTANTIATION_WRITELAYER | ( |  | type | ) |

Value:
template \
bool Field3DOutputFile::writeLayer<type> \
(const std::string &, const std::string &, Field<type>::Ptr ); \
Field3DOutputFile::writeLayer
bool writeLayer(const std::string &layerName, typename Field< Data_T >::Ptr layer)
Writes a scalar layer to the "Default" partition.
Definition Field3DFile.h:687
Field::Ptr
boost::intrusive_ptr< Field > Ptr
Definition Field.h:395

Definition at line 1928 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_WRITELAYER(type) \
template \
bool Field3DOutputFile::writeLayer<type> \
(const std::string &, const std::string &, Field<type>::Ptr ); \

## FIELD3D_INSTANTIATION_READLAYERS1

#define FIELD3D_INSTANTIATION_READLAYERS1 | ( |  | type | ) |

Value:
template \
Field<type>::Vec \
Field3DInputFile::readLayers<type>(const std::string &name) const; \

Definition at line 1961 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_READLAYERS1(type) \
template \
Field<type>::Vec \
Field3DInputFile::readLayers<type>(const std::string &name) const; \

## FIELD3D_INSTANTIATION_READLAYERS2

#define FIELD3D_INSTANTIATION_READLAYERS2 | ( |  | type | ) |

Value:
template \
Field<type>::Vec \
Field3DInputFile::readLayers<type>(const std::string &partitionName, \
const std::string &layerName) const; \

Definition at line 1975 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_READLAYERS2(type) \
template \
Field<type>::Vec \
Field3DInputFile::readLayers<type>(const std::string &partitionName, \
const std::string &layerName) const; \

## FIELD3D_INSTANTIATION_READPROXYLAYER

#define FIELD3D_INSTANTIATION_READPROXYLAYER | ( |  | type | ) |

Value:
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyLayer<type>(const std::string &partitionName, \
const std::string &layerName, \
bool isVectorLayer) const \

Definition at line 1990 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_READPROXYLAYER(type) \
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyLayer<type>(const std::string &partitionName, \
const std::string &layerName, \
bool isVectorLayer) const \

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER

#define FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( |  | type | ) |

Value:
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyScalarLayers<type> \
(const std::string &name) const \
Field3DInputFile::readProxyScalarLayers
EmptyField< Data_T >::Vec readProxyScalarLayers(const std::string &name=std::string("")) const
Retrieves a proxy version (EmptyField) of each scalar layer.
Definition Field3DFile.cpp:1858

Definition at line 2006 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_READPROXYSCALARLAYER(type) \
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyScalarLayers<type> \
(const std::string &name) const \

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER

#define FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( |  | type | ) |

Value:
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyVectorLayers<type> \
(const std::string &name) const \
Field3DInputFile::readProxyVectorLayers
EmptyField< Data_T >::Vec readProxyVectorLayers(const std::string &name=std::string("")) const
Retrieves a proxy version (EmptyField) of each vector layer.
Definition Field3DFile.cpp:1893

Definition at line 2021 of file Field3DFile.cpp.

#define FIELD3D_INSTANTIATION_READPROXYVECTORLAYER(type) \
template \
EmptyField<type>::Vec \
Field3DInputFile::readProxyVectorLayers<type> \
(const std::string &name) const \

## Function Documentation

## fileExists()

bool fileExists | ( | const std::string & | filename | ) |

checks to see if a file/directory exists or not

Parameters

  [in] | filename | the file/directory to check

Return values

  true | if it exists
  false | if it does not exist

Definition at line 1341 of file Field3DFile.cpp.

{
#ifdef WIN32
struct __stat64 statbuf;
return (_stat64(filename.c_str(), &statbuf) != -1);
#else
struct stat statbuf;
return (stat(filename.c_str(), &statbuf) != -1);
#endif
}

Referenced by Field3DOutputFile::create(), and FileSequence::FileSequence().

## FIELD3D_INSTANTIATION_WRITELAYER() [1/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_WRITELAYER() [2/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_WRITELAYER() [3/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_WRITELAYER() [4/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_WRITELAYER() [5/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_WRITELAYER() [6/6]

FIELD3D_INSTANTIATION_WRITELAYER | ( | vec64_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [1/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [2/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [3/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [4/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [5/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS1() [6/6]

FIELD3D_INSTANTIATION_READLAYERS1 | ( | vec64_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [1/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [2/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [3/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [4/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [5/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_READLAYERS2() [6/6]

FIELD3D_INSTANTIATION_READLAYERS2 | ( | vec64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [1/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [2/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [3/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [4/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [5/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYLAYER() [6/6]

FIELD3D_INSTANTIATION_READPROXYLAYER | ( | vec64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [1/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [2/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [3/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [4/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [5/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYSCALARLAYER() [6/6]

FIELD3D_INSTANTIATION_READPROXYSCALARLAYER | ( | vec64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [1/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | float16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [2/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | float32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [3/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | float64_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [4/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | vec16_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [5/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | vec32_t |  | ) |

## FIELD3D_INSTANTIATION_READPROXYVECTORLAYER() [6/6]

FIELD3D_INSTANTIATION_READPROXYVECTORLAYER | ( | vec64_t |  | ) |

References FIELD3D_NAMESPACE_SOURCE_CLOSE.