JsonCpp project page JsonCpp home page

json_value.cpp File Reference

#include <json/value.h>
#include <json/writer.h>
#include "json_batchallocator.h"
#include <iostream>
#include <utility>
#include <stdexcept>
#include <cstring>
#include <cassert>
#include <cstddef>
#include "json_internalarray.inl"
#include "json_internalmap.inl"
#include "json_valueiterator.inl"

Include dependency graph for json_value.cpp:

Go to the source code of this file.

Namespaces

namespace  Json

Defines

#define JSON_ASSERT_UNREACHABLE   assert( false )
#define JSON_ASSERT(condition)   assert( condition );
#define JSON_FAIL_MESSAGE(message)   throw std::runtime_error( message );
#define JSON_ASSERT_MESSAGE(condition, message)   if (!( condition )) JSON_FAIL_MESSAGE( message )

Functions

static char * Json::duplicateStringValue (const char *value, unsigned int length=unknown)
 Duplicates the specified string value.
static void Json::releaseStringValue (char *value)
 Free the string duplicated by duplicateStringValue().

Variables

static const unsigned int Json::unknown = (unsigned)-1
 Unknown size marker.


Define Documentation

#define JSON_ASSERT ( condition   )     assert( condition );

Definition at line 24 of file json_value.cpp.

Referenced by Json::Value::asCString(), Json::Value::clear(), Json::Value::getMemberNames(), Json::Value::operator[](), Json::Value::removeMember(), and Json::Value::resize().

#define JSON_ASSERT_MESSAGE ( condition,
message   )     if (!( condition )) JSON_FAIL_MESSAGE( message )

Definition at line 26 of file json_value.cpp.

Referenced by Json::Value::asInt(), Json::Value::asInt64(), Json::Value::asUInt(), Json::Value::asUInt64(), Json::duplicateStringValue(), Json::ValueInternalMap::unsafeAdd(), and Json::ValueInternalArray::ValueInternalArray().

#define JSON_ASSERT_UNREACHABLE   assert( false )

Definition at line 23 of file json_value.cpp.

Referenced by Json::Value::asBool(), Json::Value::asDouble(), Json::Value::asFloat(), Json::Value::asInt(), Json::Value::asInt64(), Json::Value::asString(), Json::Value::asUInt(), Json::Value::asUInt64(), Json::Value::isConvertibleTo(), Json::Value::operator<(), Json::Value::operator==(), Json::Value::size(), Json::Value::Value(), and Json::Value::~Value().

#define JSON_FAIL_MESSAGE ( message   )     throw std::runtime_error( message );

Definition at line 25 of file json_value.cpp.

Referenced by Json::Value::asDouble(), Json::Value::asFloat(), Json::Value::asInt(), Json::Value::asInt64(), Json::Value::asString(), Json::Value::asUInt(), and Json::Value::asUInt64().


SourceForge Logo hosts this site. Send comments to:
Json-cpp Developers