| 
    OpenASIP 2.2
    
   | 
 
#include <DataObject.hh>


Public Member Functions | |
| virtual int | integerValue () const override | 
| virtual SLongWord | longValue () const override | 
| virtual void | setInteger (int value) override | 
| virtual void | setLong (SLongWord value) override | 
| virtual std::string | stringValue () const | 
| virtual void | setString (std::string value) override | 
| virtual double | doubleValue () const | 
| virtual void | setDouble (double value) override | 
| virtual float | floatValue () const | 
| virtual void | setFloat (float value) override | 
| virtual bool | isNull () const | 
| virtual void | setNull () override | 
  Public Member Functions inherited from DataObject | |
| DataObject () | |
| DataObject (int value) | |
| DataObject (SLongWord value) | |
| DataObject (double value) | |
| DataObject (const std::string value) | |
| virtual | ~DataObject () | 
| virtual bool | boolValue () const | 
| virtual void | setBool (bool value) | 
| virtual bool | operator!= (const DataObject &object) const | 
Static Public Member Functions | |
| static NullDataObject & | instance () | 
Private Member Functions | |
| NullDataObject () | |
| virtual | ~NullDataObject () | 
| NullDataObject (const DataObject &obj) | |
Static Private Attributes | |
| static NullDataObject * | instance_ = NULL | 
Additional Inherited Members | |
  Public Types inherited from DataObject | |
| enum | OrigType {  TYPE_INT , TYPE_STRING , TYPE_DOUBLE , TYPE_FLOAT , TYPE_NULL , TYPE_NOTYPE }  | 
  Protected Member Functions inherited from DataObject | |
| OrigType | type () const | 
| bool | intFresh () const | 
| bool | stringFresh () const | 
| bool | doubleFresh () const | 
| bool | floatFresh () const | 
Singleton class that represents a null DataObject.
All methods write to error log and abort the program.
Definition at line 128 of file DataObject.hh.
      
  | 
  private | 
      
  | 
  privatevirtual | 
      
  | 
  private | 
      
  | 
  virtual | 
Returns the double value of DataObject.
If double value is not available, the conversion is done from the original data type. Note that a NULL DataObject is converted to 0.0.
| NumberFormatException | If conversion fails or if DataObject is not initialized. | 
Reimplemented from DataObject.
Definition at line 603 of file DataObject.cc.
References abortWithError.
      
  | 
  virtual | 
Returns the float value of DataObject.
If float value is not available, the conversion is done from the original data type. Note that a NULL DataObject is converted to 0.0.
| NumberFormatException | If conversion fails or if DataObject is not initialized. | 
Reimplemented from DataObject.
Definition at line 609 of file DataObject.cc.
References abortWithError.
      
  | 
  static | 
Returns an instance of NullDataObject (singleton)
Definition at line 542 of file DataObject.cc.
References instance_, and NullDataObject().
Referenced by InstructionExecution::address(), InstructionExecution::cycle(), RelationalDBQueryResult::data(), RelationalDBQueryResult::data(), and SQLiteQueryResult::data().

      
  | 
  overridevirtual | 
Returns the integer value of DataObject.
If integer value is not available, the conversion is done from the original value type. Note that a NULL DataObject is converted to 0.
| NumberFormatException | If conversion fails or if DataObject is not initialized. | 
Reimplemented from DataObject.
Definition at line 585 of file DataObject.cc.
References abortWithError.
      
  | 
  virtual | 
Returns true in case the object represents a NULL value.
Reimplemented from DataObject.
Definition at line 615 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Returns the (long) integer value of DataObject.
If integer value is not available, the conversion is done from the original value type. Note that a NULL DataObject is converted to 0.
| NumberFormatException | If conversion fails or if DataObject is not initialized. | 
Reimplemented from DataObject.
Definition at line 591 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Sets the double value of DataObject.
| value | The double value of DataObject. | 
Reimplemented from DataObject.
Definition at line 570 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Sets the float value of DataObject.
| value | The float value of DataObject. | 
Reimplemented from DataObject.
Definition at line 575 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
All method implementations of NullDataObject write a message to error log and abort the program.
Reimplemented from DataObject.
Definition at line 555 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Sets the integer value of DataObject.
| value | The integer value. | 
Reimplemented from DataObject.
Definition at line 560 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Sets the DataObject to null.
Reimplemented from DataObject.
Definition at line 580 of file DataObject.cc.
References abortWithError.
      
  | 
  overridevirtual | 
Sets the string value of DataObject.
| value | The string value. | 
Reimplemented from DataObject.
Definition at line 565 of file DataObject.cc.
References abortWithError.
      
  | 
  virtual | 
Returns the string value of DataObject.
If string value is not available, the conversion is done from the original data type. Note that a NULL DataObject is converted to an empty string.
| NumberFormatException | If conversion fails or if DataObject is not initialized. | 
Reimplemented from DataObject.
Definition at line 597 of file DataObject.cc.
References abortWithError.
      
  | 
  staticprivate | 
Definition at line 156 of file DataObject.hh.
Referenced by instance().