spot  1.0.1
Public Member Functions | Protected Attributes | Private Attributes | List of all members
spot::formater Class Reference

#include <misc/formater.hh>

Inheritance diagram for spot::formater:
Inheritance graph
Collaboration diagram for spot::formater:
Collaboration graph

Public Member Functions

 formater ()
virtual ~formater ()
bool has (char c) const
 Whether c occurred in the primed formats.
void declare (char c, const printable *f)
 Declare a callback function for c.
void set_output (std::ostream &output)
 Remember where to output any string.
std::ostream & format (const char *fmt)
 Expand the %-sequences in fmt, write the result on output_.
std::ostream & format (std::ostream &output, const char *fmt)
 Expand the %-sequences in fmt, write the result on output.
std::ostream & format (const std::string &fmt)
 Expand the %-sequences in fmt, write the result on output_.
std::ostream & format (std::ostream &output, const std::string &fmt)
 Expand the %-sequences in fmt, write the result on output.
void scan (const char *fmt, std::vector< bool > &has) const
 Scan the %-sequences occuring in fmt.
void scan (const std::string &fmt, std::vector< bool > &has) const
void prime (const char *fmt)
void prime (const std::string &fmt)

Protected Attributes

std::ostream * output_

Private Attributes

printable_id id
printable_percent percent
std::vector< bool > has_
std::vector< const printable * > call_

Constructor & Destructor Documentation

spot::formater::formater ( )
inline

References call_, and percent.

virtual spot::formater::~formater ( )
inlinevirtual

Member Function Documentation

void spot::formater::declare ( char  c,
const printable f 
)
inline

Declare a callback function for c.

References call_.

std::ostream& spot::formater::format ( const char *  fmt)

Expand the %-sequences in fmt, write the result on output_.

Referenced by format().

std::ostream& spot::formater::format ( std::ostream &  output,
const char *  fmt 
)
inline

Expand the %-sequences in fmt, write the result on output.

References format(), and set_output().

std::ostream& spot::formater::format ( const std::string &  fmt)
inline

Expand the %-sequences in fmt, write the result on output_.

References format().

std::ostream& spot::formater::format ( std::ostream &  output,
const std::string &  fmt 
)
inline

Expand the %-sequences in fmt, write the result on output.

References format().

bool spot::formater::has ( char  c) const
inline

Whether c occurred in the primed formats.

References has_.

Referenced by scan().

void spot::formater::prime ( const char *  fmt)

Collect the %-sequences occurring in fmt.

Referenced by prime().

void spot::formater::prime ( const std::string &  fmt)
inline

References prime().

void spot::formater::scan ( const char *  fmt,
std::vector< bool > &  has 
) const

Scan the %-sequences occuring in fmt.

Set has['c'] for each c in fmt. has must be 256 wide.

Referenced by scan().

void spot::formater::scan ( const std::string &  fmt,
std::vector< bool > &  has 
) const
inline

References has(), and scan().

void spot::formater::set_output ( std::ostream &  output)
inline

Remember where to output any string.

References output_.

Referenced by format().

Member Data Documentation

std::vector<const printable*> spot::formater::call_
private

Referenced by declare(), and formater().

std::vector<bool> spot::formater::has_
private

Referenced by has().

printable_id spot::formater::id
private
std::ostream* spot::formater::output_
protected

Referenced by set_output().

printable_percent spot::formater::percent
private

Referenced by formater().


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

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Jan 23 2013 15:00:02 for spot by doxygen 1.8.1.2