Jpp  17.3.1
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 105 of file JHistory.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
typeapplication type

Definition at line 111 of file JHistory.hh.

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

Constructor.

Parameters
historyhistory

Definition at line 122 of file JHistory.hh.

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

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 137 of file JHistory.hh.

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

Member Data Documentation

int JFIT::JHistory::is_event::type

Definition at line 146 of file JHistory.hh.


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