misc.h File Reference

Miscellaneous conversion and utility functions. More...

#include <iomanip>
#include <iostream>
#include <typeinfo>
#include <string>
#include <sstream>

Include dependency graph for misc.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.

Functions

template<class T>
string toString (T x)
 Converts a generic value of a generic type to a string.
string replaceAll (string s, string f, string r)
 Replaces all the occurrences of the string f in the string s with the string r.
template<class T>
string className (T *p)
 Returns the name of the class of the parameter as a string. Used to prevent a common bug in some C++ implementations.
unsigned long long int stringToULL (string A, int theRes)
 Converts a number stored as a string to an unsigned long long int representation consistent with the DETime one.


Detailed Description

Miscellaneous conversion and utility functions.


Function Documentation

unsigned long long int stringToULL string  A,
int  theRes
 

Converts a number stored as a string to an unsigned long long int representation consistent with the DETime one.

This function is used to initialize the DETime struct, as it is impossible to use DETime conversion functions before the DETime setup. It is functionally equivalent to the conversion from a string represented number and the euivalent DETime's ticks.

Parameters:
A  the string to convert.
theRes  the time precision. See DETime for further details.


Generated on Wed Dec 22 23:23:48 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo