summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/ParseUtil.h
blob: 4f43a02bd7b24a4e102a2871afba7b81fdf10be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*  Project nGenEx
	Destroyer Studios LLC
	Copyright © 1997-2004. All Rights Reserved.

	SUBSYSTEM:    nGenEx.lib
	FILE:         ParseUtil.h
	AUTHOR:       John DiCamillo


	OVERVIEW
	========
	Parser utility functions
*/

#ifndef ParseUtil_h
#define ParseUtil_h

#include "Types.h"
#include "Geometry.h"
#include "Color.h"
#include "ArrayList.h"

#include "Text.h"
#include "Parser.h"
#include "Reader.h"
#include "Token.h"

// +--------------------------------------------------------------------+

bool GetDefBool(bool& dst, TermDef* def, const char* file);
bool GetDefText(Text& dst, TermDef* def, const char* file);
bool GetDefText(char* dst, TermDef* def, const char* file);
bool GetDefNumber(int& dst, TermDef* def, const char* file);
bool GetDefNumber(DWORD& dst, TermDef* def, const char* file);
bool GetDefNumber(float& dst, TermDef* def, const char* file);
bool GetDefNumber(double& dst, TermDef* def, const char* file);
bool GetDefVec(Vec3& dst, TermDef* def, const char* file);
bool GetDefColor(Color& dst, TermDef* def, const char* file);
bool GetDefColor(ColorValue& dst, TermDef* def, const char* file);
bool GetDefRect(Rect& dst, TermDef* def, const char* file);
bool GetDefInsets(Insets& dst, TermDef* def, const char* file);
bool GetDefTime(int& dst, TermDef* def, const char* file);

bool GetDefArray(int*    dst, int size, TermDef* def, const char* file);
bool GetDefArray(float*  dst, int size, TermDef* def, const char* file);
bool GetDefArray(double* dst, int size, TermDef* def, const char* file);
bool GetDefArray(ArrayList& array,      TermDef* def, const char* file);
bool GetDefArray(FloatList& array,      TermDef* def, const char* file);

// +--------------------------------------------------------------------+

#endif ParseUtil_h