MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
mdf::IMetaData Class Referenceabstract

Interface against an meta data block (MD) in a MDF4 file. More...

#include "mdf/imetadata.h"

Inheritance diagram for mdf::IMetaData:
Collaboration diagram for mdf::IMetaData:

Public Member Functions

void InitMd (const std::string &root_name)
 Initiate the MD block.
 
void StringProperty (const std::string &tag, const std::string &value)
 Sets a string property in the block.
 
std::string StringProperty (const std::string &tag) const
 Returns a specific tag value.
 
void FloatProperty (const std::string &tag, double value)
 Sets a float property in the block.
 
double FloatProperty (const std::string &tag) const
 Returns a specific tag value.
 
void CommonProperty (const ETag &e_tag)
 Sets a common property.
 
ETag CommonProperty (const std::string &name) const
 Return a common property.
 
void CommonProperties (const std::vector< ETag > &tag_list)
 Sets a number of common properties.
 
std::vector< ETagCommonProperties () const
 Returns all common properties.
 
std::vector< ETagProperties () const
 Returns all properties without children.
 
virtual void XmlSnippet (const std::string &text)=0
 Stores the XML as a string..
 
virtual const std::string & XmlSnippet () const =0
 Returns the XML string.
 
- Public Member Functions inherited from mdf::IBlock
virtual ~IBlock ()=default
 Default destructor.
 
virtual int64_t Index () const =0
 File position within the file.
 
virtual std::string BlockType () const =0
 Returns the block type.
 

Detailed Description

Interface class against an meta data block in a MDF4 file. In reality is the block just an interface against an XML snippets

Member Function Documentation

◆ CommonProperties() [1/2]

std::vector< ETag > mdf::IMetaData::CommonProperties ( ) const
nodiscard
Returns
All common properties.

◆ CommonProperties() [2/2]

void mdf::IMetaData::CommonProperties ( const std::vector< ETag > & tag_list)
Parameters
tag_listList of common properties.

◆ CommonProperty() [1/2]

void mdf::IMetaData::CommonProperty ( const ETag & e_tag)
Parameters
e_tagProperty to set.

◆ CommonProperty() [2/2]

ETag mdf::IMetaData::CommonProperty ( const std::string & name) const
nodiscard
Parameters
nameProperty name.
Returns
Common property.

◆ FloatProperty() [1/2]

double mdf::IMetaData::FloatProperty ( const std::string & tag) const
nodiscard
Parameters
tagTag name.
Returns
Tag value.

◆ FloatProperty() [2/2]

void mdf::IMetaData::FloatProperty ( const std::string & tag,
double value )
Parameters
tagTag name.
valueTag value.

◆ InitMd()

void mdf::IMetaData::InitMd ( const std::string & root_name)

Initiate the MD block with a root name. Note that this function should not be called by the end-user as it automatically created by the owner block.

Parameters
root_nameRoot tag name of the XML snippet.

◆ Properties()

std::vector< ETag > mdf::IMetaData::Properties ( ) const
nodiscard
Returns
All properties.

◆ StringProperty() [1/2]

std::string mdf::IMetaData::StringProperty ( const std::string & tag) const
nodiscard
Parameters
tagTag name.
Returns
Tag value.

◆ StringProperty() [2/2]

void mdf::IMetaData::StringProperty ( const std::string & tag,
const std::string & value )
Parameters
tagTag name.
valueTag value.

◆ XmlSnippet() [1/2]

virtual const std::string & mdf::IMetaData::XmlSnippet ( ) const
nodiscardpure virtual
Returns
The XML as a string.

◆ XmlSnippet() [2/2]

virtual void mdf::IMetaData::XmlSnippet ( const std::string & text)
pure virtual
Parameters
textThe XML string.

The documentation for this class was generated from the following file: