667 |
khor |
1 |
/* ----------------------------------------------------------------------- *
|
|
|
2 |
* This file is part of GEL, http://www.imm.dtu.dk/GEL
|
|
|
3 |
* Copyright (C) the authors and DTU Informatics
|
|
|
4 |
* For license and list of authors, see ../../doc/intro.pdf
|
|
|
5 |
* ----------------------------------------------------------------------- */
|
|
|
6 |
|
|
|
7 |
/**
|
|
|
8 |
* @file Parse.h
|
|
|
9 |
* @brief Parsing various entites from a string.
|
|
|
10 |
*/
|
|
|
11 |
|
|
|
12 |
#ifndef __UTIL_PARSE_H__
|
|
|
13 |
#define __UTIL_PARSE_H__
|
|
|
14 |
|
|
|
15 |
#include <string>
|
|
|
16 |
#include <sstream>
|
|
|
17 |
#include <vector>
|
|
|
18 |
#include "../CGLA/Vec4f.h"
|
|
|
19 |
#include "../CGLA/Vec3f.h"
|
|
|
20 |
#include "../CGLA/Vec2f.h"
|
|
|
21 |
|
|
|
22 |
namespace Util {
|
|
|
23 |
std::string floatToString(float value);
|
|
|
24 |
void parse(const char* str,bool& x);
|
|
|
25 |
void parse(const char* str,std::string& x);
|
|
|
26 |
void parse(const char* str,int& x);
|
|
|
27 |
void parse(const char* str,CGLA::Vec2i&);
|
|
|
28 |
void parse(const char* str,float& x);
|
|
|
29 |
void parse(const char* str,CGLA::Vec2f&);
|
|
|
30 |
void parse(const char* str,CGLA::Vec3f& vec);
|
|
|
31 |
void parse(const char* str,CGLA::Vec4f&);
|
|
|
32 |
void parse(const char* str,std::vector<float>& v);
|
|
|
33 |
void parse(const char* str,std::vector<double>& v);
|
|
|
34 |
void parse(const char* str,std::vector<CGLA::Vec2f>& v);
|
|
|
35 |
void parse(const char* str,std::vector<CGLA::Vec3f>& v);
|
|
|
36 |
void parse(const char* str,std::vector<int>& v);
|
|
|
37 |
void parseSMPT(const char* str, float& x);
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
#endif // __PARSE_H__
|