Dragonfly 4.20
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::EventView Class Reference
Inheritance diagram for df::EventView:
Inheritance graph

Public Member Functions

 EventView ()
 
 EventView (std::string new_tag, int new_value, bool new_delta)
 
void setTag (std::string new_tag)
 
std::string getTag () const
 
void setValue (int new_value)
 
int getValue () const
 
void setDelta (bool new_delta)
 
bool getDelta () const
 
- Public Member Functions inherited from df::Event
 Event ()
 
virtual ~Event ()
 
void setType (std::string new_type)
 
std::string getType () const
 

Private Attributes

std::string m_tag
 
int m_value
 
bool m_delta
 

Constructor & Destructor Documentation

◆ EventView() [1/2]

df::EventView::EventView ( )

Create view event with tag VIEW_EVENT, value 0 and delta false.

◆ EventView() [2/2]

df::EventView::EventView ( std::string  new_tag,
int  new_value,
bool  new_delta 
)

Create view event with tag, value and delta as indicated.

Member Function Documentation

◆ getDelta()

bool df::EventView::getDelta ( ) const

Get delta.

◆ getTag()

std::string df::EventView::getTag ( ) const

Get tag.

◆ getValue()

int df::EventView::getValue ( ) const

Get value.

◆ setDelta()

void df::EventView::setDelta ( bool  new_delta)

Set delta to new delta.

◆ setTag()

void df::EventView::setTag ( std::string  new_tag)

Set tag to new tag.

◆ setValue()

void df::EventView::setValue ( int  new_value)

Set value to new value.

Member Data Documentation

◆ m_delta

bool df::EventView::m_delta
private

True if change in value, else replace value.

◆ m_tag

std::string df::EventView::m_tag
private

Tag to associate.

◆ m_value

int df::EventView::m_value
private

Value for view.