X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmUtil.h;h=b77fcb249740095ec16aa0355d568875fb43ef87;hb=cdc3f89e3291dfdc5cfa60dea19558635d2f8755;hp=63025122aaedc860df3181073a49fb2a6bedd409;hpb=1aa2bb207fb6b9ce78f35e7547dd4c770e516adb;p=gdcm.git diff --git a/src/gdcmUtil.h b/src/gdcmUtil.h index 63025122..b77fcb24 100644 --- a/src/gdcmUtil.h +++ b/src/gdcmUtil.h @@ -1,17 +1,28 @@ -#include -using namespace std; +// gdcmUtil.h +//----------------------------------------------------------------------------- +#ifndef GDCMUTIL_H +#define GDCMUTIL_H -class gdcmDebug { -private: - int DebugLevel; -public: - gdcmDebug(int = 0); - void Verbose(int, const char*, const char* =""); - void Error(bool, const char*, const char* =""); - void Error(const char*, const char* ="", const char* =""); - void Assert(int, bool, const char*, const char*); -}; +#include +#include -istream & eatwhite(istream & is); +/** + * \defgroup Globals Utility functions + * \brief Here are some utility functions, belonging to NO class, + * dealing with strings, file names... that can be called + * from anywhere by whomsoever they can help. + */ -extern gdcmDebug dbg; +//----------------------------------------------------------------------------- +std::istream & eatwhite(std::istream & is); + +void Tokenize (const std::string& str, + std::vector& tokens, + const std::string& delimiters = " "); + +std::string CreateCleanString(std::string s); +void NormalizePath(std::string &name); +std::string GetPath(std::string &fullName); +std::string GetName(std::string &fullName); +//----------------------------------------------------------------------------- +#endif