iv::DVarSystem Class Reference

#include <DVarSystem.hpp>

Public Member Functions

 DVarSystem (SystemContainer *sc)
 
 ~DVarSystem ()
 
virtual std::string debug_name () const override
 
void lock (Instance *setter, DVarId id)
 
void unlock (Instance *setter, DVarId id)
 
Instancelocked (DVarId id)
 
template<class Type >
void set (Instance *setter, DVarIdT< Type > id, Type const &value)
 
template<class Type >
Type get (DVarIdT< Type > id)
 
void add_listener (DVarListenerI *listener, DVarId id)
 
void remove_listener (DVarListenerI *listener, DVarId id)
 
- Public Member Functions inherited from iv::System
 System (SystemContainer *sc)
 
virtual ~System ()
 
virtual bool flushSystem ()
 
virtual void status (TextDebugView *view)
 
SystemContainersystem_container () const
 
void retain ()
 
void release ()
 
- Public Member Functions inherited from iv::Context
 Context ()
 
virtual ~Context ()
 
template<class ... Items>
void log (SrcInfo const &info, LogId id, Items const &... items) const
 
bool log_enabled (LogId id) const
 
template<class ... Items>
void warning (SrcInfo const &info, Items const &... items) const
 

Additional Inherited Members

- Protected Member Functions inherited from iv::System
virtual bool log_process_enabled (LogId id) const override final
 
virtual void log_process (SrcInfo const &info, LogId id, std::string const &message) const override final
 

Detailed Description

NOTE - If we want debug access to existing dvar ids, then the list should be queried from RuntimeId dictionary (not implemented by the time of writing this note).

Definition at line 22 of file DVarSystem.hpp.

Constructor & Destructor Documentation

◆ DVarSystem()

iv::DVarSystem::DVarSystem ( SystemContainer sc)

DVarSystem lets parent system decide on value of DVars that are not specified in this sytem.

Definition at line 6 of file DVarSystem.cpp.

◆ ~DVarSystem()

iv::DVarSystem::~DVarSystem ( )

Definition at line 11 of file DVarSystem.cpp.

Member Function Documentation

◆ debug_name()

virtual std::string iv::DVarSystem::debug_name ( ) const
inlineoverridevirtual

Reimplemented from iv::System.

Definition at line 31 of file DVarSystem.hpp.

◆ lock()

void iv::DVarSystem::lock ( Instance setter,
DVarId  id 
)

Lock id so that given setter can change or unlock it.

Definition at line 29 of file DVarSystem.cpp.

◆ unlock()

void iv::DVarSystem::unlock ( Instance setter,
DVarId  id 
)

Revert effect of DVarSystem::lock. Should be called only by the one who locked it.

Definition at line 34 of file DVarSystem.cpp.

◆ locked()

Instance * iv::DVarSystem::locked ( DVarId  id)

Return instance that has the id locked or nullptr, if it is not locked.

Definition at line 43 of file DVarSystem.cpp.

◆ set()

template<class Type >
void iv::DVarSystem::set ( Instance setter,
DVarIdT< Type >  id,
Type const &  value 
)

Will be changed only if dvar is not locked or if setter is the same one who locked it. If the write fails (due to wrong setter) then a warning will be printed.

Definition at line 5 of file DVarSystem.inl.

◆ get()

template<class Type >
Type iv::DVarSystem::get ( DVarIdT< Type >  id)

Definition at line 43 of file DVarSystem.inl.

◆ add_listener()

void iv::DVarSystem::add_listener ( DVarListenerI listener,
DVarId  id 
)

Definition at line 18 of file DVarSystem.cpp.

◆ remove_listener()

void iv::DVarSystem::remove_listener ( DVarListenerI listener,
DVarId  id 
)

Definition at line 23 of file DVarSystem.cpp.


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