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 >
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 GetTicksBehind () 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 SetTicksBehind (int value)
 
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 55 of file DataStore.h.

Constructor & Destructor Documentation

◆ DataStore() [1/2]

DLLEXPORT Leviathan::DataStore::DataStore ( )

Definition at line 11 of file DataStore.cpp.

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

◆ DataStore() [2/2]

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

Definition at line 34 of file DataStore.cpp.

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 }
#define LEVIATHAN_ASSERT(x, msg)
Definition: Define.h:98

◆ ~DataStore()

DLLEXPORT Leviathan::DataStore::~DataStore ( )

Definition at line 65 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 208 of file DataStore.cpp.

209 {
210  if(Values.Find(values->GetName()) > Values.GetVariableCount()) {
211  // can add new //
212  this->Values.AddVar(values);
213 
214  // don't forget to add persistence //
215  Persistencestates.push_back(false);
216  }
217 }
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.

73 {
74  return Staticaccess;
75 }

◆ GetFontSizeMultiplier()

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

Definition at line 543 of file DataStore.cpp.

544 {
545  return FontSizeMultiplier;
546 }

◆ GetFPS()

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

Definition at line 431 of file DataStore.cpp.

432 {
433  return FPS;
434 }

◆ GetFPSAverage()

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

Definition at line 502 of file DataStore.cpp.

503 {
504  return FPSAverage;
505 }

◆ GetFPSMax()

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

Definition at line 497 of file DataStore.cpp.

498 {
499  return FPSMax;
500 }

◆ GetFPSMin()

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

Definition at line 492 of file DataStore.cpp.

493 {
494  return FPSMax;
495 }

◆ GetFrameTime()

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

Definition at line 313 of file DataStore.cpp.

314 {
315  return FrameTime;
316 }

◆ GetFrameTimeAverage()

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

Definition at line 487 of file DataStore.cpp.

488 {
489  return FrameTimeAverage;
490 }

◆ GetFrameTimeMax()

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

Definition at line 482 of file DataStore.cpp.

483 {
484  return FrameTimeMax;
485 }

◆ GetFrameTimeMin()

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

Definition at line 477 of file DataStore.cpp.

478 {
479  return FrameTimeMin;
480 }

◆ GetGUiActive()

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

Definition at line 416 of file DataStore.cpp.

417 {
418  return Gui;
419 }

◆ GetHeight()

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

Definition at line 426 of file DataStore.cpp.

427 {
428  return Height;
429 }

◆ GetPersistance() [1/2]

int DataStore::GetPersistance ( unsigned int  index) const

Definition at line 149 of file DataStore.cpp.

150 {
151 
152  return Persistencestates[index];
153 }

◆ GetPersistance() [2/2]

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

Definition at line 154 of file DataStore.cpp.

155 {
156  auto index = Values.Find(name);
157 
158  if(!Values.IsIndexValid(index))
159  throw Exception("GetPersistance called for non-existent value");
160 
161  return Persistencestates[index];
162 }
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 553 of file DataStore.cpp.

554 {
555 
556  std::string logName = StringOperations::RemoveEnding<std::string>(
557  StringOperations::RemoveExtension(Logger::Get()->GetLogFile(), false), "Log");
558 
559  return logName + "Persist.txt";
560 }
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 303 of file DataStore.cpp.

304 {
305  return TickCount;
306 }

◆ GetTicksBehind()

DLLEXPORT int DataStore::GetTicksBehind ( ) const

Definition at line 308 of file DataStore.cpp.

309 {
310  return TicksBehind;
311 }

◆ GetTickTime()

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

Definition at line 298 of file DataStore.cpp.

299 {
300  return TickTime;
301 }

◆ 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 118 of file DataStore.cpp.

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

◆ GetValueAndConvertTo()

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

Definition at line 82 of file DataStore.h.

83  {
84  // use try block to catch all exceptions (not found and conversion fail //
85  try {
86  if(!Values.GetValue(name)->ConvertAndAssingToVariable<T>(receiver)) {
87  // Couldn't convert or assign or find the value //
88  return false;
89  }
90  } catch(...) {
91  // variable not found / wrong type //
92  return false;
93  }
94  // correct variable has been set //
95  return true;
96  }
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 124 of file DataStore.cpp.

125 {
126  return Values.GetValueCount(name);
127 }
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 436 of file DataStore.cpp.

437 {
438  switch(valindex) {
439  case DATAINDEX_TICKTIME: {
440  return TickTime;
441  } break;
442  case DATAINDEX_TICKCOUNT: {
443  return TickCount;
444  } break;
445  case DATAINDEX_FRAMETIME: {
446  return FrameTime;
447  } break;
448  case DATAINDEX_FPS: {
449  return FPS;
450  } break;
451  case DATAINDEX_HEIGHT: {
452  return Height;
453  } break;
455  return FrameTimeMax;
456  } break;
458  return FrameTimeMin;
459  } break;
461  return FrameTimeAverage;
462  } break;
463  case DATAINDEX_FPS_MIN: {
464  return FPSMin;
465  } break;
466  case DATAINDEX_FPS_MAX: {
467  return FPSMax;
468  } break;
469  case DATAINDEX_FPS_AVERAGE: {
470  return FPSAverage;
471  } break;
472  }
473  return -1;
474 }
#define DATAINDEX_FRAMETIME
Definition: DataStore.h:13
#define DATAINDEX_FRAMETIME_MIN
Definition: DataStore.h:19
#define DATAINDEX_TICKTIME
Definition: DataStore.h:11
#define DATAINDEX_TICKCOUNT
Definition: DataStore.h:12
#define DATAINDEX_FRAMETIME_AVERAGE
Definition: DataStore.h:20
#define DATAINDEX_FPS_AVERAGE
Definition: DataStore.h:24
#define DATAINDEX_FPS
Definition: DataStore.h:14
#define DATAINDEX_HEIGHT
Definition: DataStore.h:16
#define DATAINDEX_FPS_MIN
Definition: DataStore.h:22
#define DATAINDEX_FPS_MAX
Definition: DataStore.h:23
#define DATAINDEX_FRAMETIME_MAX
Definition: DataStore.h:18

◆ GetValues()

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

Definition at line 129 of file DataStore.cpp.

131 {
132  return Values.GetValues(name, receiver);
133 }
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 236 of file DataStore.cpp.

237 {
238  return Values.GetVariableType(name);
239 }
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 241 of file DataStore.cpp.

242 {
243  return Values.GetVariableTypeOfAll(name);
244 }
DLLEXPORT int GetVariableTypeOfAll(const std::string &name) const
Definition: NamedVars.cpp:1143

◆ GetWidth()

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

Definition at line 421 of file DataStore.cpp.

422 {
423  return Width;
424 }

◆ RegisterListener()

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

Definition at line 246 of file DataStore.cpp.

248 {
249  // set into the map //
250 
251  DataListenHolder* tmpptre = Listeners[object].get();
252 
253  if(tmpptre == NULL) {
254  // new required //
255  // add back to map //
256  Listeners[object] = std::make_shared<DataListenHolder>();
257 
258  // recurse to use the new object //
259  return RegisterListener(object, listen);
260  }
261 
262  // can add new one //
263  tmpptre->HandledListeners.push_back(listen);
264 }
DLLEXPORT void RegisterListener(AutoUpdateableObject *object, DataListener *listen)
Definition: DataStore.cpp:246
std::vector< DataListener * > HandledListeners
Definition: DataStore.h:51

◆ Remove() [1/2]

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

Definition at line 219 of file DataStore.cpp.

220 {
221  if(index >= Values.GetVariableCount())
222  return;
223 
224  // remove from store //
225  Values.Remove(index);
226  // don't forget to remove from persistence states //
227  Persistencestates.erase(Persistencestates.begin() + index);
228 }
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 230 of file DataStore.cpp.

231 {
232  // call overload //
233  Remove(Values.Find(name));
234 }
size_t Find(const std::string &name) const
Definition: NamedVars.h:367
DLLEXPORT void Remove(size_t index)
Definition: DataStore.cpp:219

◆ RemoveListener()

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

Definition at line 266 of file DataStore.cpp.

268 {
269  if(all) {
270  // just erase the bulk //
271  Listeners.erase(object);
272  return;
273  }
274 
275  // get pointer to block //
276  DataListenHolder* tmpptre = Listeners[object].get();
277 
278  if(tmpptre == NULL) {
279  return;
280  }
281 
282  // erase the wanted ones //
283  for(size_t i = 0; i < tmpptre->HandledListeners.size(); i++) {
284  if(tmpptre->HandledListeners[i]->ListenIndex == valueid) {
285  // check name if wanted //
286  if(name.size() == 0 || name == tmpptre->HandledListeners[i]->VarName) {
287  // erase //
288 
289  SAFE_DELETE(tmpptre->HandledListeners[i]);
290  tmpptre->HandledListeners.erase(tmpptre->HandledListeners.begin() + i);
291 
292  break;
293  }
294  }
295  }
296 }
#define SAFE_DELETE(x)
Definition: Define.h:147
std::vector< DataListener * > HandledListeners
Definition: DataStore.h:51

◆ SetFontSizeMultiplier()

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

Definition at line 548 of file DataStore.cpp.

549 {
550  FontSizeMultiplier = newval;
551 }

◆ SetFPS()

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

Definition at line 387 of file DataStore.cpp.

388 {
389  FPS = newval;
390  ValueUpdate(4);
391 }

◆ SetFPSAverage()

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

Definition at line 537 of file DataStore.cpp.

538 {
539  FPSAverage = newval;
540  ValueUpdate(DATAINDEX_FPS_AVERAGE);
541 }
#define DATAINDEX_FPS_AVERAGE
Definition: DataStore.h:24

◆ SetFPSMax()

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

Definition at line 531 of file DataStore.cpp.

532 {
533  FPSMax = newval;
534  ValueUpdate(DATAINDEX_FPS_MAX);
535 }
#define DATAINDEX_FPS_MAX
Definition: DataStore.h:23

◆ SetFPSMin()

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

Definition at line 525 of file DataStore.cpp.

526 {
527  FPSMin = newval;
528  ValueUpdate(DATAINDEX_FPS_MIN);
529 }
#define DATAINDEX_FPS_MIN
Definition: DataStore.h:22

◆ SetFrameTime()

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

Definition at line 393 of file DataStore.cpp.

394 {
395  FrameTime = newval;
396  ValueUpdate(3);
397 }

◆ SetFrameTimeAverage()

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

Definition at line 519 of file DataStore.cpp.

520 {
521  FrameTimeAverage = newval;
522  ValueUpdate(DATAINDEX_FRAMETIME_AVERAGE);
523 }
#define DATAINDEX_FRAMETIME_AVERAGE
Definition: DataStore.h:20

◆ SetFrameTimeMax()

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

Definition at line 513 of file DataStore.cpp.

514 {
515  FrameTimeMax = newval;
516  ValueUpdate(DATAINDEX_FRAMETIME_MAX);
517 }
#define DATAINDEX_FRAMETIME_MAX
Definition: DataStore.h:18

◆ SetFrameTimeMin()

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

Definition at line 507 of file DataStore.cpp.

508 {
509  FrameTimeMin = newval;
510  ValueUpdate(DATAINDEX_FRAMETIME_MIN);
511 }
#define DATAINDEX_FRAMETIME_MIN
Definition: DataStore.h:19

◆ SetGUiActive()

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

Definition at line 381 of file DataStore.cpp.

382 {
383  Gui = newval;
384  // ValueUpdate(4);
385 }

◆ SetHeight()

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

Definition at line 369 of file DataStore.cpp.

370 {
371  Height = newval;
372  ValueUpdate(DATAINDEX_HEIGHT);
373 }
#define DATAINDEX_HEIGHT
Definition: DataStore.h:16

◆ SetPersistance() [1/2]

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

Definition at line 135 of file DataStore.cpp.

136 {
137 
138  Persistencestates[index] = toset;
139 }

◆ SetPersistance() [2/2]

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

Definition at line 140 of file DataStore.cpp.

141 {
142  auto index = Values.Find(name);
143 
144  if(!Values.IsIndexValid(index))
145  throw Exception("SetPersitance called for non-existent value");
146 
147  Persistencestates[index] = toset;
148 }
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 399 of file DataStore.cpp.

400 {
401  TickCount = newval;
402  ValueUpdate(2);
403 }

◆ SetTicksBehind()

DLLEXPORT void DataStore::SetTicksBehind ( int  value)

Definition at line 411 of file DataStore.cpp.

412 {
413  TicksBehind = value;
414 }

◆ SetTickTime()

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

Definition at line 405 of file DataStore.cpp.

406 {
407  TickTime = newval;
408  ValueUpdate(1);
409 }

◆ SetValue() [1/4]

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

Definition at line 164 of file DataStore.cpp.

166 {
167  // use variable holder to do this //
168  Values.SetValue(name, value1);
169 
170  // send update to value listeners //
171  ValueUpdate(name);
172 
173  return true;
174 }
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 176 of file DataStore.cpp.

177 {
178  // use variable holder to do this //
179  Values.SetValue(name, value1);
180 
181  // send update to value listeners //
182  ValueUpdate(name);
183 
184  return true;
185 }
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 187 of file DataStore.cpp.

189 {
190  // use variable holder to do this //
191  this->Values.SetValue(name, values);
192 
193  // send update to value listeners //
194  ValueUpdate(name);
195 
196  return true;
197 }
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 199 of file DataStore.cpp.

200 {
201  // send update to value listeners //
202  ValueUpdate(nameandvalues.GetName());
203 
204  return true;
205 }
std::string GetName() const
Definition: NamedVars.h:139

◆ SetWidth()

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

Definition at line 375 of file DataStore.cpp.

376 {
377  Width = newval;
378  ValueUpdate(DATAINDEX_WIDTH);
379 }
#define DATAINDEX_WIDTH
Definition: DataStore.h:15

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