common.h File Reference

#include <iostream>
#include <cstdio>
#include <iomanip>
#include <map>
#include <set>
#include <vector>

Go to the source code of this file.

Classes

struct  deletePtr< T >
 Template function to dealloc a container which owns a list of pointer to object. More...
class  Singleton< T >
 A singleton is perhaps the simplest design pattern, common to many programming languages and it’s the way to allow one and only one instance of a class. More...

Defines

#define CLEAR_SCREEN_CMD   "clear"
#define LOG(L,...)
#define LOG_CTOR()   LOG(3, "ctor called\n")
#define LOG_DTOR()   LOG(3, "dtor called\n")

Typedefs

typedef std::set< std::string > StringSet
typedef std::vector< size_t > IntVector

Functions

template<class InputIterator , class T >
valueMerge (InputIterator first, InputIterator last, T delim)
 Merge container values, delimited by a separator.

Variables

int debugLevel

Define Documentation

#define CLEAR_SCREEN_CMD   "clear"
#define LOG ( L,
...   ) 
 
#define LOG_CTOR (  )     LOG(3, "ctor called\n")
 
#define LOG_DTOR (  )     LOG(3, "dtor called\n")

Typedef Documentation

typedef std::vector<size_t> IntVector
typedef std::set<std::string> StringSet

Function Documentation

template<class InputIterator , class T >
T valueMerge ( InputIterator  first,
InputIterator  last,
delim 
) [inline]

Merge container values, delimited by a separator.

The function valueMerge need an iterator associated to the container, an iterator that points to the end of it and a string used as separator; a common use of this function is to obtain a string starting from a container, such as a vector or a set.

Referenced by ManagedObject::update().


Variable Documentation

Referenced by main().


Generated by  doxygen 1.6.2