g4tools  5.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::sg::states Class Reference
Inheritance diagram for tools::sg::states:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::states:
Collaboration graph
[legend]

Public Member Functions

 states (unsigned int a_ww, unsigned int a_wh)
 
virtual ~states ()
 
const sg::statestate () const
 
sg::statestate ()
 
void pop_state ()
 
void push_state ()
 
void save_state (const sg::state &a_state)
 
const sg::statesaved_state () const
 
sg::statesaved_state ()
 

Protected Member Functions

 states (const states &a_from)
 
statesoperator= (const states &a_from)
 

Protected Attributes

std::vector< sg::statem_states
 
sg::state m_state
 
sg::state m_saved_state
 

Detailed Description

Definition at line 14 of file states.

Constructor & Destructor Documentation

◆ states() [1/2]

tools::sg::states::states ( unsigned int  a_ww,
unsigned int  a_wh 
)
inline

Definition at line 26 of file states.

26  :m_states() {
27  m_state.m_ww = a_ww;
28  m_state.m_wh = a_wh;
29  }

◆ ~states()

virtual tools::sg::states::~states ( )
inlinevirtual

Definition at line 31 of file states.

31 {}

◆ states() [2/2]

tools::sg::states::states ( const states a_from)
inlineprotected

Definition at line 48 of file states.

49  :m_states(a_from.m_states)
50  ,m_state(a_from.m_state)
51  ,m_saved_state(a_from.m_saved_state)
52  {}

Member Function Documentation

◆ operator=()

states& tools::sg::states::operator= ( const states a_from)
inlineprotected

Definition at line 53 of file states.

53  {
54  m_states = a_from.m_states;
55  m_state = a_from.m_state;
56  m_saved_state = a_from.m_saved_state;
57  return *this;
58  }

◆ pop_state()

void tools::sg::states::pop_state ( )
inline

Definition at line 78 of file states.

78  {
79  //if(!m_states.size()) return; //throw.
80  m_state = m_states.back();
81  m_states.pop_back();
82  }

◆ push_state()

void tools::sg::states::push_state ( )
inline

Definition at line 83 of file states.

83 {m_states.push_back(m_state);}

◆ save_state()

void tools::sg::states::save_state ( const sg::state a_state)
inline

Definition at line 86 of file states.

86 {m_saved_state = a_state;}

◆ saved_state() [1/2]

sg::state& tools::sg::states::saved_state ( )
inline

Definition at line 88 of file states.

88 {return m_saved_state;}

◆ saved_state() [2/2]

const sg::state& tools::sg::states::saved_state ( ) const
inline

Definition at line 87 of file states.

87 {return m_saved_state;}

◆ state() [1/2]

sg::state& tools::sg::states::state ( )
inline

Definition at line 77 of file states.

77 {return m_state;}

◆ state() [2/2]

const sg::state& tools::sg::states::state ( ) const
inline

Definition at line 76 of file states.

76 {return m_state;}

Member Data Documentation

◆ m_saved_state

sg::state tools::sg::states::m_saved_state
protected

Definition at line 97 of file states.

◆ m_state

sg::state tools::sg::states::m_state
protected

Definition at line 95 of file states.

◆ m_states

std::vector<sg::state> tools::sg::states::m_states
protected

Definition at line 90 of file states.


The documentation for this class was generated from the following file:
tools::sg::states::m_saved_state
sg::state m_saved_state
Definition: states:97
tools::sg::states::m_state
sg::state m_state
Definition: states:95
tools::sg::state::m_wh
unsigned int m_wh
Definition: state:242
tools::sg::states::m_states
std::vector< sg::state > m_states
Definition: states:90
tools::sg::state::m_ww
unsigned int m_ww
Definition: state:241