/home/elb/work/cs590n/mace/mace/lib/Printable.h File Reference


Detailed Description

defines the mace methods for printing just about anything. Used by generated code, and from Mace Collections.

Definition in file Printable.h.

#include <string>
#include <sstream>
#include <iomanip>
#include <ctype.h>
#include <boost/shared_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <map>
#include <list>
#include "hash_string.h"
#include "Base64.h"

Include dependency graph for Printable.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mace

Classes

class  mace::PrintPrintable
 Printable helper class which handles the toString methods by just implementing the print methods. More...
class  mace::ToStringPrintable
 Printable helper class which handles the print methods by just implementing the toString methods. More...

Functions

template<typename S>
const int mace::noConvertToString (const S *dud)
 simple method to do nothing (for use by macro to compile out printing)
void mace::printItem (std::ostream &out, const void *pitem)
 The printItem methods print the item passed in to the ostream.
template<typename S>
std::string mace::mapToString (const S &m, bool newlines=false)
 Generic method to convert a map to a string by iterating through its elements.
template<typename S>
void mace::printMap (std::ostream &os, const S &b, const S &e, bool newlines=false)
 Generic method to print a map (between two iterators) to a ostream object.
template<typename S>
void mace::printMapState (std::ostream &os, const S &b, const S &e, bool newlines=false)
 Generic method to print a map state (between two iterators) to a ostream object (calling printState for the key and value).
template<typename S>
std::string mace::listToString (const S &l, bool newlines=false)
 Generic method to return a list as a string.
template<typename S>
std::string mace::listToString (const S &b, const S &e, bool newlines=false)
 Generic method to return a list (between two iterators) as a string.
template<typename S>
void mace::printList (std::ostream &os, const S &b, const S &e, bool newlines=false)
 Generic method to print a list (between two iterators) to an ostream.
template<typename S>
std::string mace::pointerListToString (const S &l, bool newlines=false)
 Generic method to return a list of pointers as a string.
template<typename S>
std::string mace::convertToString (const S *pitem, const S &item)
 Generic method to convert any object to a string.
template<typename S>
void mace::printState (std::ostream &out, const void *pitem, const S &item)
 Generic method to print any object in its state format.
template<typename S>
void mace::printState (std::ostream &out, const Printable *pitem, const S &item)
 Generic method to print any object in its state format.
template<typename S>
void mace::printListState (std::ostream &os, const S &b, const S &e, bool newlines=false)
 print a list (between two iterators) in state form
template<typename S>
void mace::printXml (std::ostream &os, const void *pitem, const S &item)
 print any object in xml format
std::ostream & operator<< (std::ostream &o, const mace::Printable &p)
 Support the output operator to ostream for all mace::Printable objects.


Generated on Sat Oct 4 21:30:15 2008 for Mace Library by  doxygen 1.5.5