| 1 | /*************************************************************************** |
| 2 | CNullValue.h - description |
| 3 | ------------------- |
| 4 | begin : January 18th, 2009 |
| 5 | copyright : (C) 2009 by Duong Khang NGUYEN |
| 6 | email : neoneurone @ gmail com |
| 7 | |
| 8 | $Id: CNullValue.h 449 2010-05-20 18:46:59Z neoneurone $ |
| 9 | ***************************************************************************/ |
| 10 | |
| 11 | /*************************************************************************** |
| 12 | * * |
| 13 | * This program is free software; you can redistribute it and/or modify * |
| 14 | * it under the terms of the GNU General Public License as published by * |
| 15 | * the Free Software Foundation; either version 2 of the License, or * |
| 16 | * any later version. * |
| 17 | * * |
| 18 | ***************************************************************************/ |
| 19 | |
| 20 | #ifndef _SPF_SYSTEM_CNULLVALUE_H_ |
| 21 | #define _SPF_SYSTEM_CNULLVALUE_H_ 1 |
| 22 | |
| 23 | // Framework headers |
| 24 | #include "AValueType.h" |
| 25 | |
| 26 | |
| 27 | SPF_NAMESPACE_BEGIN(System) |
| 28 | |
| 29 | /** |
| 30 | Represents a NullValue object. In C++, a reference can not be assigned |
| 31 | a null value. In this Sharp Plus Framework, the C# null reference is emulated |
| 32 | by the System::NullValue class. |
| 33 | To assign a null value to an object, use the System::Null constant. |
| 34 | */ |
| 35 | class NullValue : public ValueType |
| 36 | { |
| 37 | public: |
| 38 | NullValue(); |
| 39 | NullValue(const NullValue& value); |
| 40 | virtual ~NullValue(); |
| 41 | |
| 42 | bool IsNull() const; |
| 43 | |
| 44 | virtual String ToString() const; |
| 45 | |
| 46 | }; // class System::NullValue |
| 47 | |
| 48 | #ifndef _SPF_SYSTEM_CNULLVALUE_CPP_ |
| 49 | extern const NullValue Null; |
| 50 | #endif |
| 51 | |
| 52 | SPF_NAMESPACE_END |
| 53 | |
| 54 | #endif |