WARPXM v1.10.0
Loading...
Searching...
No Matches
wmudgfunctions.h File Reference
#include "warpxm/warpxm_config.h"
#include "wxexcept.h"
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <typeinfo>

Go to the source code of this file.

Classes

struct  WmUDGFunctions::typeString< int >
 
struct  WmUDGFunctions::typeString< unsigned >
 
struct  WmUDGFunctions::typeString< float >
 
struct  WmUDGFunctions::typeString< double >
 

Namespaces

namespace  WmUDGFunctions
 

Macros

#define SAFE_DELETE(ptr)
 
#define SAFE_DELETE_ARRAY(ptr)
 
#define SAFE_DELETE_POINTER_VECTOR(vec)
 

Functions

size_t WmUDGFunctions::getTypeSize (const std::type_info &typeinfo)
 
bool WmUDGFunctions::isaspace (unsigned char const c)
 
bool WmUDGFunctions::isjustaspace (unsigned char const c)
 
bool WmUDGFunctions::isacomma (unsigned char const c)
 
template<typename T >
WmUDGFunctions::stringToValue (const std::string &text)
 
template<typename T >
std::vector< T > WmUDGFunctions::stringToValueVec (const std::string &text)
 
template<typename T >
std::string WmUDGFunctions::valueToString (T value)
 
template<typename T >
void WmUDGFunctions::arrayPrinter (const T *array, const int n)
 
template<typename T >
void WmUDGFunctions::arrayPrinter (const std::vector< T > &array)
 
template<typename T >
std::string WmUDGFunctions::defineOption (const std::string &name, T value)
 
template<typename T >
std::string WmUDGFunctions::define (const std::string &name, T value)
 
std::string WmUDGFunctions::readFile (const std::string &filename)
 
void WmUDGFunctions::writeFile (const std::string &filename, const std::string &text)
 
template<typename T >
WmUDGFunctions::parseStringForValue (const std::string &string, const std::string &key)
 
template<typename T >
std::vector< T > WmUDGFunctions::parseStringForVector (const std::string &string, const std::string &key, const int expectedLength=-1)
 
template<typename T >
std::string WmUDGFunctions::toString (const T &val)
 
template<typename T >
bool WmUDGFunctions::hasDuplicates (const std::vector< T > &array)
 

Macro Definition Documentation

◆ SAFE_DELETE

#define SAFE_DELETE (   ptr)
Value:
if (ptr) \
{ \
delete ptr; \
ptr = NULL; \
}

◆ SAFE_DELETE_ARRAY

#define SAFE_DELETE_ARRAY (   ptr)
Value:
if (ptr) \
{ \
delete[] ptr; \
ptr = NULL; \
}

◆ SAFE_DELETE_POINTER_VECTOR

#define SAFE_DELETE_POINTER_VECTOR (   vec)
Value:
for (int i = 0; i < vec.size(); i++) \
{ \
SAFE_DELETE(vec[i]); \
} \
vec.clear();