Nuclide
Software Development Kit for id Technology
NSDict.h
1/*
2 * Copyright (c) 2024 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
40class
42{
43public:
44 void NSDict(void);
45
46 nonvirtual int GetInteger(string);
47 nonvirtual float GetFloat(string);
48 nonvirtual string GetString(string);
49 nonvirtual vector GetVector(string);
50 nonvirtual bool GetBool(string);
51
52 nonvirtual void SetDeclBody(string);
53 nonvirtual string GetDeclBody(void);
54
55 nonvirtual void AddKey(string, string);
56 nonvirtual void RemoveKey(string);
57
58 nonvirtual int TokenCount(void);
59
60 static NSDict InitWithSpawnData(string);
61 static NSDict LoadDeclFromFile(string, string);
62
63private:
64 nonvirtual void _AddRemoveKey(string, string, bool);
65 string m_strBody;
66};
67 // end of decl
This class is responsible for handling groups of key/value pairs.
Definition: NSDict.h:42