VTFLib
A C and C++ API that, with a few simple functions, can open and save .vtf and .vmt files.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VMTGroupNode.h
1 /*
2  * VTFLib
3  * Copyright (C) 2005-2010 Neil Jedrzejewski & Ryan Gregg
4 
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later
9  * version.
10  */
11 
12 #ifndef VTFLIB_VMTGROUPNODE_H
13 #define VTFLIB_VMTGROUPNODE_H
14 
15 #include "stdafx.h"
16 #include "VMTNode.h"
17 
18 #include "VMTStringNode.h"
19 #include "VMTIntegerNode.h"
20 #include "VMTSingleNode.h"
21 
22 #include <list>
23 
24 namespace VTFLib
25 {
26  class CVMTFile;
27 
28  namespace Nodes
29  {
30  class VTFLIB_API CVMTGroupNode : public CVMTNode
31  {
32  //private:
33  // friend class CVMTFile; // For direct node addition.
34 
35  private:
36  typedef std::list<CVMTNode *> CVMTNodeList;
37 
38  private:
39  CVMTNodeList *VMTNodeList;
40 
41  public:
42  CVMTGroupNode(const vlChar *cName);
43  CVMTGroupNode(const CVMTGroupNode &GroupNode);
44  virtual ~CVMTGroupNode();
45 
46  virtual VMTNodeType GetType() const;
47  virtual CVMTNode *Clone() const;
48 
49  public:
50  vlUInt GetNodeCount() const;
51 
52  CVMTNode *AddNode(CVMTNode *VMTNode);
53  CVMTGroupNode *AddGroupNode(const vlChar *cName);
54  CVMTStringNode *AddStringNode(const vlChar *cName, const vlChar *cValue);
55  CVMTIntegerNode *AddIntegerNode(const vlChar *cName, vlInt iValue);
56  CVMTSingleNode *AddSingleNode(const vlChar *cName, vlFloat fValue);
57 
58  vlVoid RemoveNode(CVMTNode *VMTNode);
59  vlVoid RemoveAllNodes();
60 
61  CVMTNode *GetNode(vlUInt uiIndex) const;
62  CVMTNode *GetNode(const vlChar *cName) const;
63  };
64  }
65 }
66 
67 #endif
vlSingle vlFloat
Floating point number (same as vlSingled).
Definition: stdafx.h:63
char vlChar
Single signed character.
Definition: stdafx.h:51
unsigned int vlUInt
Unsigned integer value.
Definition: stdafx.h:56
Application framework header plus VTFLib custom data types.
void vlVoid
Void value.
Definition: stdafx.h:61
signed int vlInt
Signed integer value.
Definition: stdafx.h:55