Subversion Repositories gelsvn

Rev

Rev 448 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 448 Rev 595
-
 
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
 
1
#ifndef __UTIL_PARSE_H__
12
#ifndef __UTIL_PARSE_H__
2
#define __UTIL_PARSE_H__
13
#define __UTIL_PARSE_H__
3
 
14
 
4
#include <string>
15
#include <string>
5
#include <sstream>
16
#include <sstream>
6
#include <vector>
17
#include <vector>
7
#include <CGLA/Vec4f.h>
18
#include <CGLA/Vec4f.h>
8
#include <CGLA/Vec3f.h>
19
#include <CGLA/Vec3f.h>
9
#include <CGLA/Vec2f.h>
20
#include <CGLA/Vec2f.h>
10
 
21
 
11
namespace Util {
22
namespace Util {
12
	std::string floatToString(float value);
23
	std::string floatToString(float value);
13
	void parse(const char* str,bool& x);
24
	void parse(const char* str,bool& x);
14
	void parse(const char* str,std::string& x);
25
	void parse(const char* str,std::string& x);
15
	void parse(const char* str,int& x);
26
	void parse(const char* str,int& x);
16
	void parse(const char* str,CGLA::Vec2i&);
27
	void parse(const char* str,CGLA::Vec2i&);
17
	void parse(const char* str,float& x);
28
	void parse(const char* str,float& x);
18
	void parse(const char* str,CGLA::Vec2f&);
29
	void parse(const char* str,CGLA::Vec2f&);
19
	void parse(const char* str,CGLA::Vec3f& vec);
30
	void parse(const char* str,CGLA::Vec3f& vec);
20
	void parse(const char* str,CGLA::Vec4f&);
31
	void parse(const char* str,CGLA::Vec4f&);
21
	void parse(const char* str,std::vector<float>& v);
32
	void parse(const char* str,std::vector<float>& v);
22
	void parse(const char* str,std::vector<double>& v);
33
	void parse(const char* str,std::vector<double>& v);
23
	void parse(const char* str,std::vector<CGLA::Vec2f>& v);
34
	void parse(const char* str,std::vector<CGLA::Vec2f>& v);
24
	void parse(const char* str,std::vector<CGLA::Vec3f>& v);
35
	void parse(const char* str,std::vector<CGLA::Vec3f>& v);
25
	void parse(const char* str,std::vector<int>& v);
36
	void parse(const char* str,std::vector<int>& v);
26
	void parseSMPT(const char* str, float& x);
37
	void parseSMPT(const char* str, float& x);
27
}
38
}
28
 
39
 
29
#endif // __PARSE_H__
40
#endif // __PARSE_H__
30
 
41