Leviathan  0.8.0.0
Leviathan game engine
Leviathan::DataStore Class Reference

#include <DataStore.h>

Public Member Functions

DLLEXPORT DataStore ()
 
DLLEXPORT DataStore (bool main)
 
DLLEXPORT ~DataStore ()
 
DLLEXPORT void SetPersistance (unsigned int index, bool toset)
 
DLLEXPORT void SetPersistance (const std::string &name, bool toset)
 
DLLEXPORT int GetPersistance (unsigned int index) const
 
DLLEXPORT int GetPersistance (const std::string &name) const
 
DLLEXPORT bool SetValue (const std::string &name, const VariableBlock &value1)
 
DLLEXPORT bool SetValue (const std::string &name, VariableBlock *value1)
 
DLLEXPORT bool SetValue (const std::string &name, const std::vector< VariableBlock *> &values)
 
DLLEXPORT bool SetValue (NamedVariableList &nameandvalues)
 
DLLEXPORT size_t GetValueCount (const std::string &name) const
 
DLLEXPORT const VariableBlockGetValue (const std::string &name) const
 
DLLEXPORT bool GetValue (const std::string &name, VariableBlock &receiver) const
 
DLLEXPORT bool GetValues (const std::string &name, std::vector< const VariableBlock *> &receiver) const
 
template<class T >
DLLEXPORT bool GetValueAndConvertTo (const std::string &name, T &receiver) const
 
DLLEXPORT void AddVar (std::shared_ptr< NamedVariableList > values)
 
DLLEXPORT void Remove (size_t index)
 
DLLEXPORT void Remove (const std::string &name)
 
DLLEXPORT int GetVariableType (const std::string &name) const
 
DLLEXPORT int GetVariableTypeOfAll (const std::string &name) const
 
DLLEXPORT int GetTickTime () const
 
DLLEXPORT int GetTickCount () const
 
DLLEXPORT int GetFrameTime () const
 
DLLEXPORT int GetFPS () const
 
DLLEXPORT int GetHeight () const
 
DLLEXPORT int GetWidth () const
 
DLLEXPORT int GetGUiActive () const
 
DLLEXPORT int GetFrameTimeMin () const
 
DLLEXPORT int GetFrameTimeMax () const
 
DLLEXPORT int GetFrameTimeAverage () const
 
DLLEXPORT int GetFPSMin () const
 
DLLEXPORT int GetFPSMax () const
 
DLLEXPORT int GetFPSAverage () const
 
DLLEXPORT int GetFontSizeMultiplier () const
 
DLLEXPORT void SetTickTime (int newval)
 
DLLEXPORT void SetTickCount (int newval)
 
DLLEXPORT void SetFrameTime (int newval)
 
DLLEXPORT void SetFPS (int newval)
 
DLLEXPORT void SetGUiActive (int newval)
 
DLLEXPORT void SetFrameTimeMin (int newval)
 
DLLEXPORT void SetFrameTimeMax (int newval)
 
DLLEXPORT void SetFrameTimeAverage (int newval)
 
DLLEXPORT void SetFPSMin (int newval)
 
DLLEXPORT void SetFPSMax (int newval)
 
DLLEXPORT void SetFPSAverage (int newval)
 
DLLEXPORT void SetFontSizeMultiplier (int newval)
 
DLLEXPORT void SetWidth (int newval)
 
DLLEXPORT void SetHeight (int newval)
 
DLLEXPORT int GetValueFromValIndex (int valindex) const
 
DLLEXPORT void RegisterListener (AutoUpdateableObject *object, DataListener *listen)
 
DLLEXPORT void RemoveListener (AutoUpdateableObject *object, int valueid, const std::string &name="", bool all=false)
 

Static Public Member Functions

static DLLEXPORT std::string GetPersistStorageFile ()
 
static DLLEXPORT DataStoreGet ()
 

Detailed Description

Definition at line 53 of file DataStore.h.

Constructor & Destructor Documentation

◆ DataStore() [1/2]

DLLEXPORT Leviathan::DataStore::DataStore ( )

Definition at line 12 of file DataStore.cpp.

12  {
13  Load();
14 
15  // set default values //
16  TickTime = 0;
17  TickCount = 0;
18  FrameTime = 0;
19  FPS = 0;
20 
21  FrameTimeMin = 0;
22  FrameTimeMax = 0;
23  FrameTimeAverage = 0;
24 
25 
26  FPSMin = 0;
27  FPSMax = 0;
28  FPSAverage = 0;
29 
30  // set font multiplier default //
31  FontSizeMultiplier = 1;
32 
33 }

◆ DataStore() [2/2]

DLLEXPORT Leviathan::DataStore::DataStore ( bool  main)

Definition at line 34 of file DataStore.cpp.

34  {
35 
36  LEVIATHAN_ASSERT(man, "this shouldn't be called with false");
37 
38  Staticaccess = this;
39 
40  Load();
41 
42  TickCount = 0;
43 
44  // set default values //
45  TickTime = 0;
46  TickCount = 0;
47  FrameTime = 0;
48  FPS = 0;
49 
50  FrameTimeMin = 0;
51  FrameTimeMax = 0;
52  FrameTimeAverage = 0;
53 
54 
55  FPSMin = 0;
56  FPSMax = 0;
57  FPSAverage = 0;
58 
59  // set font multiplier default //
60  FontSizeMultiplier = 1;
61 
62  // register data indexes for use in Gui stuff //
63  // moved directly to object file processor
64 
65 }
#define LEVIATHAN_ASSERT(x, msg)
Definition: Define.h:92

◆ ~DataStore()

DLLEXPORT Leviathan::DataStore::~DataStore ( )

Definition at line 66 of file DataStore.cpp.

66  {
67  Save();
68 }

Member Function Documentation

◆ AddVar()

DLLEXPORT void Leviathan::DataStore::AddVar ( std::shared_ptr< NamedVariableList values)

Definition at line 194 of file DataStore.cpp.

194  {
195  if(Values.Find(values->GetName()) > Values.GetVariableCount()){
196  // can add new //
197  this->Values.AddVar(values);
198 
199  // don't forget to add persistence //
200  Persistencestates.push_back(false);
201  }
202 }
size_t Find(const std::string &name) const
Definition: NamedVars.h:367
DLLEXPORT size_t GetVariableCount() const
Returns the size of the internal variable vector.
Definition: NamedVars.cpp:1304
DLLEXPORT void AddVar(NamedVariableList *newvaluetoadd)
Definition: NamedVars.cpp:1198

◆ Get()

DataStore * Leviathan::DataStore::Get ( )
static

Definition at line 72 of file DataStore.cpp.

72  {
73  return Staticaccess;
74 }

◆ GetFontSizeMultiplier()

DLLEXPORT int Leviathan::DataStore::GetFontSizeMultiplier ( ) const

Definition at line 506 of file DataStore.cpp.

506  {
507  return FontSizeMultiplier;
508 }

◆ GetFPS()

DLLEXPORT int Leviathan::DataStore::GetFPS ( ) const

Definition at line 386 of file DataStore.cpp.

386  {
387  return FPS;
388 }

◆ GetFPSAverage()

DLLEXPORT int Leviathan::DataStore::GetFPSAverage ( ) const

Definition at line 472 of file DataStore.cpp.

472  {
473  return FPSAverage;
474 }

◆ GetFPSMax()

DLLEXPORT int Leviathan::DataStore::GetFPSMax ( ) const

Definition at line 468 of file DataStore.cpp.

468  {
469  return FPSMax;
470 }

◆ GetFPSMin()

DLLEXPORT int Leviathan::DataStore::GetFPSMin ( ) const

Definition at line 464 of file DataStore.cpp.

464  {
465  return FPSMax;
466 }

◆ GetFrameTime()

DLLEXPORT int Leviathan::DataStore::GetFrameTime ( ) const

Definition at line 288 of file DataStore.cpp.

288  {
289  return FrameTime;
290 }

◆ GetFrameTimeAverage()

DLLEXPORT int Leviathan::DataStore::GetFrameTimeAverage ( ) const

Definition at line 460 of file DataStore.cpp.

460  {
461  return FrameTimeAverage;
462 }

◆ GetFrameTimeMax()

DLLEXPORT int Leviathan::DataStore::GetFrameTimeMax ( ) const

Definition at line 456 of file DataStore.cpp.

456  {
457  return FrameTimeMax;
458 }

◆ GetFrameTimeMin()

DLLEXPORT int Leviathan::DataStore::GetFrameTimeMin ( ) const

Definition at line 452 of file DataStore.cpp.

452  {
453  return FrameTimeMin;
454 }

◆ GetGUiActive()

DLLEXPORT int Leviathan::DataStore::GetGUiActive ( ) const

Definition at line 374 of file DataStore.cpp.

374  {
375  return Gui;
376 }

◆ GetHeight()

DLLEXPORT int Leviathan::DataStore::GetHeight ( ) const

Definition at line 382 of file DataStore.cpp.

382  {
383  return Height;
384 }

◆ GetPersistance() [1/2]

int DataStore::GetPersistance ( unsigned int  index) const

Definition at line 140 of file DataStore.cpp.

140  {
141 
142  return Persistencestates[index];
143 }

◆ GetPersistance() [2/2]

int DataStore::GetPersistance ( const std::string &  name) const

Definition at line 144 of file DataStore.cpp.

144  {
145  auto index = Values.Find(name);
146 
147  if (!Values.IsIndexValid(index))
148  throw Exception("GetPersistance called for non-existent value");
149 
150  return Persistencestates[index];
151 }
DLLEXPORT bool IsIndexValid(size_t index) const
Definition: NamedVars.h:232
size_t Find(const std::string &name) const
Definition: NamedVars.h:367
Base class for all exceptions thrown by Leviathan.
Definition: Exceptions.h:10

◆ GetPersistStorageFile()

DLLEXPORT std::string DataStore::GetPersistStorageFile ( )
static

Definition at line 514 of file DataStore.cpp.

514  {
515 
516  std::string logName = StringOperations::RemoveEnding<std::string>(
517  StringOperations::RemoveExtension(Logger::Get()->GetLogFile(), false), "Log");
518 
519  return logName + "Persist.txt";
520 }
static const StringTypeN RemoveExtension(const StringTypeN &filepath, bool delpath=true)
static DLLEXPORT Logger * Get()
Definition: Logger.cpp:106

◆ GetTickCount()

DLLEXPORT int Leviathan::DataStore::GetTickCount ( ) const

Definition at line 284 of file DataStore.cpp.

284  {
285  return TickCount;
286 }

◆ GetTickTime()

DLLEXPORT int Leviathan::DataStore::GetTickTime ( ) const

Definition at line 280 of file DataStore.cpp.

280  {
281  return TickTime;
282 }

◆ GetValue() [1/2]

DLLEXPORT const VariableBlock* Leviathan::DataStore::GetValue ( const std::string &  name) const

◆ GetValue() [2/2]

DLLEXPORT bool Leviathan::DataStore::GetValue ( const std::string &  name,
VariableBlock receiver 
) const

Definition at line 116 of file DataStore.cpp.

116  {
117  return Values.GetValue(name, receiver);
118 }
DLLEXPORT const VariableBlock * GetValue(const std::string &name) const
Definition: NamedVars.cpp:974

◆ GetValueAndConvertTo()

template<class T >
DLLEXPORT bool Leviathan::DataStore::GetValueAndConvertTo ( const std::string &  name,
T &  receiver 
) const
inline

Definition at line 80 of file DataStore.h.

80  {
81  // use try block to catch all exceptions (not found and conversion fail //
82  try{
83  if(!Values.GetValue(name)->ConvertAndAssingToVariable<T>(receiver)){
84  // Couldn't convert or assign or find the value //
85  return false;
86  }
87  }
88  catch(...){
89  // variable not found / wrong type //
90  return false;
91  }
92  // correct variable has been set //
93  return true;
94  }
DLLEXPORT const VariableBlock * GetValue(const std::string &name) const
Definition: NamedVars.cpp:974
bool ConvertAndAssingToVariable(ConvertT &var) const
Definition: DataBlock.h:728

◆ GetValueCount()

DLLEXPORT size_t Leviathan::DataStore::GetValueCount ( const std::string &  name) const

Definition at line 120 of file DataStore.cpp.

120  {
121  return Values.GetValueCount(name);
122 }
DLLEXPORT size_t GetValueCount(const std::string &name) const
Definition: NamedVars.cpp:1037

◆ GetValueFromValIndex()

DLLEXPORT int Leviathan::DataStore::GetValueFromValIndex ( int  valindex) const

Definition at line 390 of file DataStore.cpp.

390  {
391  switch(valindex){
392  case DATAINDEX_TICKTIME:
393  {
394  return TickTime;
395  }
396  break;
397  case DATAINDEX_TICKCOUNT:
398  {
399  return TickCount;
400  }
401  break;
402  case DATAINDEX_FRAMETIME:
403  {
404  return FrameTime;
405  }
406  break;
407  case DATAINDEX_FPS:
408  {
409  return FPS;
410  }
411  break;
412  case DATAINDEX_HEIGHT:
413  {
414  return Height;
415  }
416  break;
418  {
419  return FrameTimeMax;
420  }
421  break;
423  {
424  return FrameTimeMin;
425  }
426  break;
428  {
429  return FrameTimeAverage;
430  }
431  break;
432  case DATAINDEX_FPS_MIN:
433  {
434  return FPSMin;
435  }
436  break;
437  case DATAINDEX_FPS_MAX:
438  {
439  return FPSMax;
440  }
441  break;
443  {
444  return FPSAverage;
445  }
446  break;
447  }
448  return -1;
449 }
#define DATAINDEX_FRAMETIME
Definition: DataStore.h:12
#define DATAINDEX_FRAMETIME_MIN
Definition: DataStore.h:18
#define DATAINDEX_TICKTIME
Definition: DataStore.h:10
#define DATAINDEX_TICKCOUNT
Definition: DataStore.h:11
#define DATAINDEX_FRAMETIME_AVERAGE
Definition: DataStore.h:19
#define DATAINDEX_FPS_AVERAGE
Definition: DataStore.h:23
#define DATAINDEX_FPS
Definition: DataStore.h:13
#define DATAINDEX_HEIGHT
Definition: DataStore.h:15
#define DATAINDEX_FPS_MIN
Definition: DataStore.h:21
#define DATAINDEX_FPS_MAX
Definition: DataStore.h:22
#define DATAINDEX_FRAMETIME_MAX
Definition: DataStore.h:17

◆ GetValues()

DLLEXPORT bool Leviathan::DataStore::GetValues ( const std::string &  name,
std::vector< const VariableBlock *> &  receiver 
) const

Definition at line 124 of file DataStore.cpp.

124  {
125  return Values.GetValues(name, receiver);
126 }
DLLEXPORT bool GetValues(const std::string &name, std::vector< const VariableBlock *> &receiver) const
Definition: NamedVars.cpp:1062

◆ GetVariableType()

DLLEXPORT int Leviathan::DataStore::GetVariableType ( const std::string &  name) const

Definition at line 220 of file DataStore.cpp.

220  {
221  return Values.GetVariableType(name);
222 }
DLLEXPORT int GetVariableType(const std::string &name) const
Definition: NamedVars.cpp:1131

◆ GetVariableTypeOfAll()

DLLEXPORT int Leviathan::DataStore::GetVariableTypeOfAll ( const std::string &  name) const

Definition at line 224 of file DataStore.cpp.

224  {
225  return Values.GetVariableTypeOfAll(name);
226 }
DLLEXPORT int GetVariableTypeOfAll(const std::string &name) const
Definition: NamedVars.cpp:1143

◆ GetWidth()

DLLEXPORT int Leviathan::DataStore::GetWidth ( ) const

Definition at line 378 of file DataStore.cpp.

378  {
379  return Width;
380 }

◆ RegisterListener()

DLLEXPORT void Leviathan::DataStore::RegisterListener ( AutoUpdateableObject object,
DataListener listen 
)

Definition at line 228 of file DataStore.cpp.

230 {
231  // set into the map //
232 
233  DataListenHolder* tmpptre = Listeners[object].get();
234 
235  if(tmpptre == NULL){
236  // new required //
237  // add back to map //
238  Listeners[object] = std::make_shared<DataListenHolder>();
239 
240  // recurse to use the new object //
241  return RegisterListener(object, listen);
242  }
243 
244  // can add new one //
245  tmpptre->HandledListeners.push_back(listen);
246 }
DLLEXPORT void RegisterListener(AutoUpdateableObject *object, DataListener *listen)
Definition: DataStore.cpp:228
std::vector< DataListener * > HandledListeners
Definition: DataStore.h:49

◆ Remove() [1/2]

DLLEXPORT void Leviathan::DataStore::Remove ( size_t  index)

Definition at line 204 of file DataStore.cpp.

204  {
205 
206  if(index >= Values.GetVariableCount())
207  return;
208 
209  // remove from store //
210  Values.Remove(index);
211  // don't forget to remove from persistence states //
212  Persistencestates.erase(Persistencestates.begin()+index);
213 }
DLLEXPORT void Remove(size_t index)
Definition: NamedVars.cpp:1215
DLLEXPORT size_t GetVariableCount() const
Returns the size of the internal variable vector.
Definition: NamedVars.cpp:1304

◆ Remove() [2/2]

DLLEXPORT void Leviathan::DataStore::Remove ( const std::string &  name)

Definition at line 215 of file DataStore.cpp.

215  {
216  // call overload //
217  Remove(Values.Find(name));
218 }
size_t Find(const std::string &name) const
Definition: NamedVars.h:367
DLLEXPORT void Remove(size_t index)
Definition: DataStore.cpp:204

◆ RemoveListener()

DLLEXPORT void Leviathan::DataStore::RemoveListener ( AutoUpdateableObject object,
int  valueid,
const std::string &  name = "",
bool  all = false 
)

Definition at line 248 of file DataStore.cpp.

250 {
251  if(all){
252  // just erase the bulk //
253  Listeners.erase(object);
254  return;
255  }
256 
257  // get pointer to block //
258  DataListenHolder* tmpptre = Listeners[object].get();
259 
260  if(tmpptre == NULL){
261  return;
262  }
263 
264  // erase the wanted ones //
265  for(size_t i = 0; i < tmpptre->HandledListeners.size(); i++){
266  if(tmpptre->HandledListeners[i]->ListenIndex == valueid){
267  // check name if wanted //
268  if(name.size() == 0 || name == tmpptre->HandledListeners[i]->VarName){
269  // erase //
270 
271  SAFE_DELETE(tmpptre->HandledListeners[i]);
272  tmpptre->HandledListeners.erase(tmpptre->HandledListeners.begin()+i);
273 
274  break;
275  }
276  }
277  }
278 }
#define SAFE_DELETE(x)
Definition: Define.h:141
std::vector< DataListener * > HandledListeners
Definition: DataStore.h:49

◆ SetFontSizeMultiplier()

DLLEXPORT void Leviathan::DataStore::SetFontSizeMultiplier ( int  newval)

Definition at line 510 of file DataStore.cpp.

510  {
511  FontSizeMultiplier = newval;
512 }

◆ SetFPS()

DLLEXPORT void Leviathan::DataStore::SetFPS ( int  newval)

Definition at line 354 of file DataStore.cpp.

354  {
355  FPS = newval;
356  ValueUpdate(4);
357 }

◆ SetFPSAverage()

DLLEXPORT void Leviathan::DataStore::SetFPSAverage ( int  newval)

Definition at line 501 of file DataStore.cpp.

501  {
502  FPSAverage = newval;
503  ValueUpdate(DATAINDEX_FPS_AVERAGE);
504 }
#define DATAINDEX_FPS_AVERAGE
Definition: DataStore.h:23

◆ SetFPSMax()

DLLEXPORT void Leviathan::DataStore::SetFPSMax ( int  newval)

Definition at line 496 of file DataStore.cpp.

496  {
497  FPSMax = newval;
498  ValueUpdate(DATAINDEX_FPS_MAX);
499 }
#define DATAINDEX_FPS_MAX
Definition: DataStore.h:22

◆ SetFPSMin()

DLLEXPORT void Leviathan::DataStore::SetFPSMin ( int  newval)

Definition at line 491 of file DataStore.cpp.

491  {
492  FPSMin = newval;
493  ValueUpdate(DATAINDEX_FPS_MIN);
494 }
#define DATAINDEX_FPS_MIN
Definition: DataStore.h:21

◆ SetFrameTime()

DLLEXPORT void Leviathan::DataStore::SetFrameTime ( int  newval)

Definition at line 359 of file DataStore.cpp.

359  {
360  FrameTime = newval;
361  ValueUpdate(3);
362 }

◆ SetFrameTimeAverage()

DLLEXPORT void Leviathan::DataStore::SetFrameTimeAverage ( int  newval)

Definition at line 486 of file DataStore.cpp.

486  {
487  FrameTimeAverage = newval;
488  ValueUpdate(DATAINDEX_FRAMETIME_AVERAGE);
489 }
#define DATAINDEX_FRAMETIME_AVERAGE
Definition: DataStore.h:19

◆ SetFrameTimeMax()

DLLEXPORT void Leviathan::DataStore::SetFrameTimeMax ( int  newval)

Definition at line 481 of file DataStore.cpp.

481  {
482  FrameTimeMax = newval;
483  ValueUpdate(DATAINDEX_FRAMETIME_MAX);
484 }
#define DATAINDEX_FRAMETIME_MAX
Definition: DataStore.h:17

◆ SetFrameTimeMin()

DLLEXPORT void Leviathan::DataStore::SetFrameTimeMin ( int  newval)

Definition at line 476 of file DataStore.cpp.

476  {
477  FrameTimeMin = newval;
478  ValueUpdate(DATAINDEX_FRAMETIME_MIN);
479 }
#define DATAINDEX_FRAMETIME_MIN
Definition: DataStore.h:18

◆ SetGUiActive()

DLLEXPORT void Leviathan::DataStore::SetGUiActive ( int  newval)

Definition at line 349 of file DataStore.cpp.

349  {
350  Gui = newval;
351  //ValueUpdate(4);
352 }

◆ SetHeight()

DLLEXPORT void Leviathan::DataStore::SetHeight ( int  newval)

Definition at line 339 of file DataStore.cpp.

339  {
340  Height = newval;
341  ValueUpdate(DATAINDEX_HEIGHT);
342 }
#define DATAINDEX_HEIGHT
Definition: DataStore.h:15

◆ SetPersistance() [1/2]

void Leviathan::DataStore::SetPersistance ( unsigned int  index,
bool  toset 
)

Definition at line 128 of file DataStore.cpp.

128  {
129 
130  Persistencestates[index] = toset;
131 }

◆ SetPersistance() [2/2]

void DataStore::SetPersistance ( const std::string &  name,
bool  toset 
)

Definition at line 132 of file DataStore.cpp.

132  {
133  auto index = Values.Find(name);
134 
135  if (!Values.IsIndexValid(index))
136  throw Exception("SetPersitance called for non-existent value");
137 
138  Persistencestates[index] = toset;
139 }
DLLEXPORT bool IsIndexValid(size_t index) const
Definition: NamedVars.h:232
size_t Find(const std::string &name) const
Definition: NamedVars.h:367
Base class for all exceptions thrown by Leviathan.
Definition: Exceptions.h:10

◆ SetTickCount()

DLLEXPORT void Leviathan::DataStore::SetTickCount ( int  newval)

Definition at line 364 of file DataStore.cpp.

364  {
365  TickCount = newval;
366  ValueUpdate(2);
367 }

◆ SetTickTime()

DLLEXPORT void Leviathan::DataStore::SetTickTime ( int  newval)

Definition at line 369 of file DataStore.cpp.

369  {
370  TickTime = newval;
371  ValueUpdate(1);
372 }

◆ SetValue() [1/4]

DLLEXPORT bool Leviathan::DataStore::SetValue ( const std::string &  name,
const VariableBlock value1 
)

Definition at line 153 of file DataStore.cpp.

153  {
154  // use variable holder to do this //
155  Values.SetValue(name, value1);
156 
157  // send update to value listeners //
158  ValueUpdate(name);
159 
160  return true;
161 }
DLLEXPORT bool SetValue(const std::string &name, const VariableBlock &value1)
Definition: NamedVars.cpp:899

◆ SetValue() [2/4]

DLLEXPORT bool Leviathan::DataStore::SetValue ( const std::string &  name,
VariableBlock value1 
)

Definition at line 163 of file DataStore.cpp.

163  {
164  // use variable holder to do this //
165  Values.SetValue(name, value1);
166 
167  // send update to value listeners //
168  ValueUpdate(name);
169 
170  return true;
171 }
DLLEXPORT bool SetValue(const std::string &name, const VariableBlock &value1)
Definition: NamedVars.cpp:899

◆ SetValue() [3/4]

DLLEXPORT bool Leviathan::DataStore::SetValue ( const std::string &  name,
const std::vector< VariableBlock *> &  values 
)

Definition at line 173 of file DataStore.cpp.

175 {
176  // use variable holder to do this //
177  this->Values.SetValue(name, values);
178 
179  // send update to value listeners //
180  ValueUpdate(name);
181 
182  return true;
183 }
DLLEXPORT bool SetValue(const std::string &name, const VariableBlock &value1)
Definition: NamedVars.cpp:899

◆ SetValue() [4/4]

DLLEXPORT bool Leviathan::DataStore::SetValue ( NamedVariableList nameandvalues)

Definition at line 185 of file DataStore.cpp.

185  {
186 
187  // send update to value listeners //
188  ValueUpdate(nameandvalues.GetName());
189 
190  return true;
191 }
std::string GetName() const
Definition: NamedVars.h:139

◆ SetWidth()

DLLEXPORT void Leviathan::DataStore::SetWidth ( int  newval)

Definition at line 344 of file DataStore.cpp.

344  {
345  Width = newval;
346  ValueUpdate(DATAINDEX_WIDTH);
347 }
#define DATAINDEX_WIDTH
Definition: DataStore.h:14

The documentation for this class was generated from the following files: