LOOS  v2.3.2
loos::DensityTools::SimpleMeta Class Reference

Simple class for handling metadata. More...

#include <SimpleMeta.hpp>

Public Types

typedef std::string value_type
typedef std::vector< value_type > container_type
typedef container_type::iterator iterator
typedef container_type::const_iterator const_iterator

Public Member Functions

 SimpleMeta (const std::string &s)
 SimpleMeta (const std::vector< std::string > &v)
container_type & data ()
 Direct access to stored container of data.
const container_type & data () const
iterator begin ()
 Allow STL-iteration.
iterator end ()
const_iterator begin () const
const_iterator end () const
bool empty () const
unsigned int size () const
void clear ()
 Clear all contained metadata.
void set (const std::string &s)
 Set metadata to string (deletes existing metadata)
void add (const std::string &s)
 Append metadata.


std::ostream & operator<< (std::ostream &os, const SimpleMeta &m)
std::istream & operator>> (std::istream &is, SimpleMeta &m)

Detailed Description

Simple class for handling metadata.

Metadata consists of multiple lines that begin with a hash-mark ('#'). When reading into a SimpleMeta object, the hash-marks are stripped and each line becomes a string in a vector. When writing out, the process is reversed.

Definition at line 51 of file SimpleMeta.hpp.

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