Bsoft 2.1.4
Bernard's software package
Bstar Class Reference

Overall STAR class to hold all data blocks and options for I/O.. More...

#include <star.h>

Public Member Functions

 Bstar ()
 
 Bstar (string filename)
 
int read (string filename)
 Reads paramaters and data into a STAR data base from a file. More...
 
int write (string filename)
 Writes a STAR data base to a STAR format file. More...
 
int write (string filename, int split)
 
void line_length (long i)
 
long line_length ()
 
void comment (const string &s)
 
string & comment ()
 
long list_comments (long len)
 
vector< BstarBlock > & blocks ()
 
bool exists (string t)
 
BstarBlockblock (long i)
 
BstarBlockfind (string t)
 
BstarBlockadd_block (const string &s)
 
long number_of_blocks (string t)
 
void replace_tag (string oldtag, string newtag)
 
void erase (const string &s)
 

Detailed Description

Overall STAR class to hold all data blocks and options for I/O..

The split flag allows the user to output data blocks in separate files
in stead of one big file.
The line length field allows the user to output long lines without
wrapping it around.
The comments are ignored but output to the a new file - this can be used
to document the history of the file.
The STAR database is a hierarchy consisting of blocks, each with a set
of items.

Constructor & Destructor Documentation

◆ Bstar() [1/2]

Bstar::Bstar ( )
inline

◆ Bstar() [2/2]

Bstar::Bstar ( string  filename)
inline

Member Function Documentation

◆ add_block()

BstarBlock & Bstar::add_block ( const string &  s)
inline

◆ block()

BstarBlock & Bstar::block ( long  i)
inline

◆ blocks()

vector< BstarBlock > & Bstar::blocks ( )
inline

◆ comment() [1/2]

string & Bstar::comment ( )
inline

◆ comment() [2/2]

void Bstar::comment ( const string &  s)
inline

◆ erase()

void Bstar::erase ( const string &  s)
inline

◆ exists()

bool Bstar::exists ( string  t)
inline

◆ find()

BstarBlock & Bstar::find ( string  t)
inline

◆ line_length() [1/2]

long Bstar::line_length ( )
inline

◆ line_length() [2/2]

void Bstar::line_length ( long  i)
inline

◆ list_comments()

long Bstar::list_comments ( long  len)
inline

◆ number_of_blocks()

long Bstar::number_of_blocks ( string  t)
inline

◆ read()

int Bstar::read ( string  filename)
inline

Reads paramaters and data into a STAR data base from a file.

Parameters
filenamea file name.
Every data block is read separately and comments are preserved as far 
as possible.

◆ replace_tag()

void Bstar::replace_tag ( string  oldtag,
string  newtag 
)
inline

◆ write() [1/2]

int Bstar::write ( string  filename)
inline

Writes a STAR data base to a STAR format file.

Parameters
filenamefile name.
Returns
int error code (<0 means failure).

◆ write() [2/2]

int Bstar::write ( string  filename,
int  split 
)
inline

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