Class XCDFFile#

Nested Relationships#

Nested Types#

Class Documentation#

class XCDFFile#

XCDF file handle with iterator access to stored records.

Author

Jim Braun

Date

29 Nov 2011

Public Functions

inline XCDFFile(const char *fileName, const char *mode)#

Open a disk file in the specified mode.

inline XCDFFile(std::istream &istream)#

Read data from the supplied istream.

inline XCDFFile(std::ostream &ostream)#

Write data to the supplied ostream.

inline XCDFFile()#
inline ~XCDFFile()#
bool Open(const char *fileName, const char *mode)#
inline bool Open(const std::string &fileName, const std::string &mode)#
inline void Open(std::istream &istream)#

Open the file, reading from the provided istream.

inline void Open(std::ostream &ostream)#

Open the file, writing to the provided istream.

void Close()#
inline bool IsWritable() const#
inline bool IsReadable() const#
inline bool IsOpen() const#
inline const std::string &GetCurrentFileName() const#
int Write()#
int Read()#
bool Seek(uint64_t absoluteEventPos)#

Seek to the given event in the file by absolute position.

uint64_t GetEventCount()#

Return the total number of events in the file.

inline uint64_t GetCurrentEventNumber() const#

Return the number of the current event.

inline uint64_t GetCurrentBlockNumber() const#

Return the number of the current block.

bool Rewind()#

Return the file to a state where calling Read() gives the starting event, if possible.

inline void StartNewBlock()#

Write out the current block and start a new one.

inline void WriteFileHeader()#

Force write of the file header, if not already written.

inline bool IsSimple()#

Does the underlying file have a trailer pointer that we can seek to?

inline uint32_t GetVersion() const#

Get the version number of the current open file.

inline uint32_t GetNFields() const#

Get the total number of fields allocated in the file.

inline bool HasField(const std::string &name) const#
inline bool IsVectorField(const std::string &name) const#
inline std::string GetFieldParentName(const std::string &name) const#
inline bool IsUnsignedIntegerField(const std::string &name) const#
inline bool IsSignedIntegerField(const std::string &name) const#
inline bool IsFloatingPointField(const std::string &name) const#
inline ConstXCDFUnsignedIntegerField GetUnsignedIntegerField(const std::string &name) const#
inline ConstXCDFSignedIntegerField GetSignedIntegerField(const std::string &name) const#
inline ConstXCDFFloatingPointField GetFloatingPointField(const std::string &name) const#
inline XCDFUnsignedIntegerField GetUnsignedIntegerField(const std::string &name)#
inline XCDFSignedIntegerField GetSignedIntegerField(const std::string &name)#
inline XCDFFloatingPointField GetFloatingPointField(const std::string &name)#
inline std::vector<XCDFFieldDescriptor>::const_iterator FieldDescriptorsBegin() const#
inline std::vector<XCDFFieldDescriptor>::const_iterator FieldDescriptorsEnd() const#
inline uint64_t GetFieldBytes(const std::string &name)#
inline std::pair<uint64_t, uint64_t> GetUnsignedIntegerFieldRange(const std::string &name)#
inline std::pair<int64_t, int64_t> GetSignedIntegerFieldRange(const std::string &name)#
inline std::pair<double, double> GetFloatingPointFieldRange(const std::string &name)#
inline void SetBlockSize(const uint64_t blockSize)#

Set the maximum number of events contained in a block.

inline uint64_t GetBlockSize() const#

Get the maximum number of events contained in a block.

inline void SetBlockThresholdByteCount(const uint64_t count)#

Set the threshold above which a new block is started (default: 100 MB)

inline uint64_t GetBlockThresholdByteCount() const#

Get the size (in bytes) of the largest event that can be written.

inline void DisableBlockTable()#

Disable ability to do fast seek operations (usually never necessary)

inline void SetZeroAlign(bool align = true)#
inline void AddComment(const std::string &comment)#

Add a string comment to the file.

inline void AddVersionComment()#
inline void LoadComments()#

Force load the comments at the end of a streaming file if we don’t already have them

inline std::vector<std::string>::const_iterator CommentsBegin()#

Get an iterator to the beginning of the comment list.

inline std::vector<std::string>::const_iterator CommentsEnd()#

Get an iterator to the end of the comment list.

inline unsigned GetNComments(bool forceLoad = false)#

Get the number of comments Optional: Force load the comments at the end of a streaming file if we don’t already have them

inline XCDFFloatingPointField AllocateFloatingPointField(const std::string &name, double resolution, const std::string &parentName = NO_PARENT)#
inline XCDFUnsignedIntegerField AllocateUnsignedIntegerField(const std::string &name, uint64_t resolution, const std::string &parentName = NO_PARENT)#
inline XCDFSignedIntegerField AllocateSignedIntegerField(const std::string &name, int64_t resolution, const std::string &parentName = NO_PARENT)#
template<typename T>
inline void ApplyFieldVisitor(T &visitor)#
template<typename T>
inline void ApplyFieldVisitor(T &visitor) const#
inline void CreateAlias(const std::string &name, const std::string &expression)#
inline bool HasAlias(const std::string &name) const#
inline bool IsUnsignedIntegerAlias(const std::string &name) const#
inline bool IsSignedIntegerAlias(const std::string &name) const#
inline bool IsFloatingPointAlias(const std::string &name) const#
inline ConstXCDFUnsignedIntegerFieldAlias GetUnsignedIntegerAlias(const std::string &name) const#
inline ConstXCDFSignedIntegerFieldAlias GetSignedIntegerAlias(const std::string &name) const#
inline ConstXCDFFloatingPointFieldAlias GetFloatingPointAlias(const std::string &name) const#
inline std::vector<XCDFAliasDescriptor>::const_iterator AliasDescriptorsBegin() const#
inline std::vector<XCDFAliasDescriptor>::const_iterator AliasDescriptorsEnd() const#
inline XCDFAliasDescriptor GetAliasDescriptor(const std::string &name)#