Jpp  16.0.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JAbstractObjectStatus.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JABSTRACTOBJECTSTATUS__
2 #define __JLANG__JABSTRACTOBJECTSTATUS__
3 
4 /**
5  * \author mdejong
6  */
7 
8 namespace JLANG {}
9 namespace JPP { using namespace JLANG; }
10 
11 namespace JLANG {
12 
13  /**
14  * Interface for status of object.\n
15  * This interface implements:
16  * - type conversion operator <tt>bool ()</tt>; and
17  * - negate operator <tt>!</tt>.
18  */
20  /**
21  * Get status of object.
22  *
23  * \return status of this object
24  */
25  virtual bool getStatus() const = 0;
26 
27 
28  /**
29  * Type conversion operator.
30  *
31  * \return status of this object
32  */
33  operator bool() const
34  {
35  return this->getStatus();
36  }
37 
38 
39  /**
40  * Negated status of this object.
41  *
42  * \return negated status of this object
43  */
44  bool operator!() const
45  {
46  return !(this->getStatus());
47  }
48  };
49 }
50 
51 #endif
bool operator!() const
Negated status of this object.
Interface for status of object.
virtual bool getStatus() const =0
Get status of object.