Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
twiddler.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WWSaveLoad *
24 * *
25 * $Archive:: /Commando/Code/wwsaveload/twiddler.h $*
26 * *
27 * Author:: Patrick Smith *
28 * *
29 * $Modtime:: 6/27/00 2:34p $*
30 * *
31 * $Revision:: 2 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37#if defined(_MSC_VER)
38#pragma once
39#endif
40
41#ifndef __TWIDDLER_H
42#define __TWIDDLER_H
43
44#include "definition.h"
45#include "definitionclassids.h"
46
47
49//
50// TwiddlerClass
51//
54{
55public:
56
58 // Editable interface requirements
61
63 // Public constructors/destructors
65 TwiddlerClass (void);
66 virtual ~TwiddlerClass (void);
67
69 // Public methods
71
72 //
73 // Type identification
74 //
75 uint32 Get_Class_ID (void) const { return CLASSID_TWIDDLERS; }
76 PersistClass * Create (void) const;
77
78 //
79 // From PersistClass
80 //
81 bool Save (ChunkSaveClass &csave);
82 bool Load (ChunkLoadClass &cload);
83 const PersistFactoryClass & Get_Factory (void) const;
84
85 //
86 // Twiddler specific
87 //
88 virtual DefinitionClass * Twiddle (void) const;
89 virtual uint32 Get_Indirect_Class_ID (void) const;
90 virtual void Set_Indirect_Class_ID (uint32 class_id);
91
92private:
93
95 // Private methods
97 bool Save_Variables (ChunkSaveClass &csave);
98 bool Load_Variables (ChunkLoadClass &cload);
99
101 // Private member data
103 uint32 m_IndirectClassID;
104 DynamicVectorClass<int> m_DefinitionList;
105};
106
107
109// Get_Indirect_Class_ID
111inline uint32
113{
114 return m_IndirectClassID;
115}
116
117
119// Set_Indirect_Class_ID
121inline void
123{
124 m_IndirectClassID = class_id;
125 return ;
126}
127
128
129#endif //__TWIDDLER_H
130
unsigned long uint32
Definition bittype.h:46
DefinitionClass(void)
Definition definition.h:139
virtual void Set_Indirect_Class_ID(uint32 class_id)
Definition twiddler.h:122
virtual DefinitionClass * Twiddle(void) const
Definition twiddler.cpp:106
uint32 Get_Class_ID(void) const
Definition twiddler.h:75
DECLARE_EDITABLE(TwiddlerClass, DefinitionClass)
bool Load(ChunkLoadClass &cload)
Definition twiddler.cpp:196
bool Save(ChunkSaveClass &csave)
Definition twiddler.cpp:174
PersistClass * Create(void) const
Definition twiddler.cpp:135
virtual uint32 Get_Indirect_Class_ID(void) const
Definition twiddler.h:112
TwiddlerClass(void)
Definition twiddler.cpp:80
const PersistFactoryClass & Get_Factory(void) const
Definition twiddler.cpp:162
virtual ~TwiddlerClass(void)
Definition twiddler.cpp:94
@ CLASSID_TWIDDLERS
else return(RetVal)