Nuclide
Software Development Kit for id Technology (BETA)
Dict.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 ncDict(void);
45
46 nonvirtual string Name(void);
47 nonvirtual int GetInteger(string);
48 nonvirtual float GetFloat(string);
49 nonvirtual string GetString(string);
50 nonvirtual vector GetVector(string);
51 nonvirtual bool GetBool(string);
52
53 nonvirtual void SetDeclBody(string);
54 nonvirtual string GetDeclBody(void);
55
56 nonvirtual void AddKey(string, string);
57 nonvirtual void RemoveKey(string);
58
59 nonvirtual int TokenCount(void);
60
61 static ncDict InitWithSpawnData(string);
62 static ncDict LoadDeclFromFile(string, string);
63
64private:
65 nonvirtual void _AddRemoveKey(string, string, bool);
66 string m_strBody;
67 string m_declPath;
68};
69 // end of decl
This class is responsible for handling groups of key/value pairs.
Definition: Dict.h:42