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
33class
35{
36public:
37 void ncDict(void);
38
39 nonvirtual string Name(void);
40 nonvirtual int GetInteger(string);
41 nonvirtual float GetFloat(string);
42 nonvirtual string GetString(string);
43 nonvirtual vector GetVector(string);
44 nonvirtual bool GetBool(string);
45
46 nonvirtual void SetDeclBody(string);
47 nonvirtual string GetDeclBody(void);
48 nonvirtual string GetDeclBodyBase64(void);
49 nonvirtual ncDict InitWithSpawnDataFromBase64(string base64Data);
50
51 nonvirtual void AddKey(string, string);
52 nonvirtual void RemoveKey(string);
53
54 nonvirtual int TokenCount(void);
55
56 static ncDict InitWithSpawnData(string);
57 static ncDict LoadDeclFromFile(string, string);
58
59private:
60 nonvirtual void _AddRemoveKey(string, string, bool);
61 string m_strBody;
62 string m_declPath;
63 string m_filePath;
64
65 string m_dictType;
66};
67 // end of decl
This class is responsible for handling groups of key/value pairs.
Definition: Dict.h:35