Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JFIT::JHistory::is_event Struct Reference

Auxiliary class to test history. More...

#include <JHistory.hh>

Public Member Functions

 is_event (int type)
 Constructor. More...
 
 is_event (const JHistory &history)
 Constructor. More...
 
bool operator() (const JHistory &history) const
 Test history. More...
 

Public Attributes

int type
 

Detailed Description

Auxiliary class to test history.

Definition at line 104 of file JHistory.hh.

Constructor & Destructor Documentation

JFIT::JHistory::is_event::is_event ( int  type)
inline

Constructor.

Parameters
typeapplication type

Definition at line 110 of file JHistory.hh.

111  {
112  this->type = type;
113  }
JFIT::JHistory::is_event::is_event ( const JHistory history)
inline

Constructor.

Parameters
historyhistory

Definition at line 121 of file JHistory.hh.

122  {
123  if (!history.empty())
124  this->type = history.rbegin()->type;
125  else
126  this->type = -1;
127  }

Member Function Documentation

bool JFIT::JHistory::is_event::operator() ( const JHistory history) const
inline

Test history.

Parameters
historyhistory
Returns
true if given history ends with specified event type; else false

Definition at line 136 of file JHistory.hh.

137  {
138  if (!history.empty()) {
139  return history.rbegin()->type == this->type;
140  }
141 
142  return false;
143  }

Member Data Documentation

int JFIT::JHistory::is_event::type

Definition at line 145 of file JHistory.hh.


The documentation for this struct was generated from the following file: