[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/hugin_utils/utils.h File Reference

#include <hugin_shared.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <cassert>
#include <hugin_utils/platform.h>

Include dependency graph for utils.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  hugin_utils

Defines

#define DEBUG_HEADER   hugin_utils::CurrentTime() <<" (" << __FILE__ << ":" << __LINE__ << ") " << __func__ << "(): "
#define DEBUG_TRACE(msg)
#define DEBUG_DEBUG(msg)
#define DEBUG_INFO(msg)
#define DEBUG_NOTICE(msg)
#define DEBUG_WARN(msg)   { std::cerr << "WARN: " << DEBUG_HEADER << msg << std::endl; }
#define DEBUG_ERROR(msg)   { std::cerr << "ERROR: " << DEBUG_HEADER << msg << std::endl; }
#define DEBUG_FATAL(msg)   { std::cerr << "FATAL: " << DEBUG_HEADER << "(): " << msg << std::endl; }
#define DEBUG_ASSERT(cond)   assert(cond)
#define UTILS_THROW(class, msg)   { std::stringstream o; o << msg; throw(class(o.str().c_str())); };

Functions

template<typename STR>
bool stringToDouble (const STR &str_, double &dest)
 convert a string to a double, ignore localisation.
template<typename Target, typename Source>
Target lexical_cast (Source arg)
template<class str>
str QuoteStringInternal (const str &arg, const str &quotechar, const str &replacements)
template<class str>
str replaceAll (const str &arg, const str &target, const str &replacement)


Define Documentation

#define DEBUG_ASSERT cond   )     assert(cond)
 

#define DEBUG_DEBUG msg   ) 
 

#define DEBUG_ERROR msg   )     { std::cerr << "ERROR: " << DEBUG_HEADER << msg << std::endl; }
 

#define DEBUG_FATAL msg   )     { std::cerr << "FATAL: " << DEBUG_HEADER << "(): " << msg << std::endl; }
 

#define DEBUG_HEADER   hugin_utils::CurrentTime() <<" (" << __FILE__ << ":" << __LINE__ << ") " << __func__ << "(): "
 

#define DEBUG_INFO msg   ) 
 

#define DEBUG_NOTICE msg   ) 
 

#define DEBUG_TRACE msg   ) 
 

#define DEBUG_WARN msg   )     { std::cerr << "WARN: " << DEBUG_HEADER << msg << std::endl; }
 

#define UTILS_THROW class,
msg   )     { std::stringstream o; o << msg; throw(class(o.str().c_str())); };
 


Function Documentation

template<typename Target, typename Source>
Target lexical_cast Source  arg  ) 
 

template<class str>
str QuoteStringInternal const str &  arg,
const str &  quotechar,
const str &  replacements
 

template<class str>
str replaceAll const str &  arg,
const str &  target,
const str &  replacement
 

template<typename STR>
bool stringToDouble const STR &  str_,
double dest
 

convert a string to a double, ignore localisation.

always accept both.

sets dest to the new value, and returns true if it could be read.

it the conversion fails, returns false and does not modify dest.

Returns:
success


Generated on Mon Sep 20 01:01:28 2010 for Hugintrunk by doxygen 1.3.9.1