LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
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. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SimpleMeta &m) |
std::istream & | operator>> (std::istream &is, SimpleMeta &m) |
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.