Own fork of MbedSmartRest
Dependents: MbedSmartRestMain MbedSmartRestMain
Fork of MbedSmartRest by
NullValue.cpp
00001 /* 00002 * NullValue.cpp 00003 * 00004 * Created on: Nov 1, 2013 00005 * * Authors: Vincent Wochnik <v.wochnik@gmail.com> 00006 * 00007 * Copyright (c) 2013 Cumulocity GmbH 00008 * 00009 * Permission is hereby granted, free of charge, to any person obtaining 00010 * a copy of this software and associated documentation files (the 00011 * "Software"), to deal in the Software without restriction, including 00012 * without limitation the rights to use, copy, modify, merge, publish, 00013 * distribute, sublicense, and/or sell copies of the Software, and to 00014 * permit persons to whom the Software is furnished to do so, subject to 00015 * the following conditions: 00016 * 00017 * The above copyright notice and this permission notice shall be 00018 * included in all copies or substantial portions of the Software. 00019 * 00020 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00021 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00022 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00023 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00024 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00025 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00026 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00027 */ 00028 00029 #include "NullValue.h" 00030 00031 00032 NullValue aNullValue; 00033 00034 /*-------------------------------------------------------------------------*/ 00035 NullValue::NullValue() 00036 { 00037 } 00038 /*-------------------------------------------------------------------------*/ 00039 uint8_t NullValue::valueType() const 00040 { 00041 return VALUE_NULL; 00042 } 00043 /*-------------------------------------------------------------------------*/ 00044 long NullValue::integerValue() const 00045 { 00046 return 0; 00047 } 00048 /*-------------------------------------------------------------------------*/ 00049 double NullValue::floatValue() const 00050 { 00051 return 0.0; 00052 } 00053 /*-------------------------------------------------------------------------*/ 00054 const char * NullValue::characterValue() const 00055 { 00056 return NULL; 00057 } 00058 /*-------------------------------------------------------------------------*/ 00059 size_t NullValue::write(AbstractDataSink&) const 00060 { 00061 return 0; 00062 } 00063 /*-------------------------------------------------------------------------*/ 00064 size_t NullValue::length() const 00065 { 00066 return 0; 00067 } 00068 /*-------------------------------------------------------------------------*/ 00069 Value* NullValue::copy() const 00070 { 00071 return new NullValue(); 00072 } 00073 /*-------------------------------------------------------------------------*/
Generated on Tue Jul 12 2022 17:00:00 by 1.7.2