aws-crt-cpp
Namespaces | Classes | Typedefs | Functions | Variables
Aws Namespace Reference

Namespaces

 Crt
 
 Iot
 

Classes

struct  cJSON
 
struct  cJSON_Hooks
 
struct  internal_hooks
 
struct  parse_buffer
 
struct  printbuffer
 

Typedefs

typedef struct Aws::cJSON cJSON
 
typedef struct Aws::cJSON_Hooks cJSON_Hooks
 
typedef int cJSON_bool
 
typedef struct Aws::internal_hooks internal_hooks
 

Functions

 CJSON_PUBLIC (const char *) cJSON_Version(void)
 
 CJSON_PUBLIC (void) cJSON_InitHooks(cJSON_Hooks *hooks)
 
 CJSON_PUBLIC (cJSON *) cJSON_Parse(const char *value
 
 CJSON_PUBLIC (char *) cJSON_Print(const cJSON *item)
 
 cJSON_PrintPreallocated (cJSON *item, char *buffer, const int length, const cJSON_bool format)
 
 CJSON_PUBLIC (int) cJSON_GetArraySize(const cJSON *array)
 
 cJSON_InsertItemInArray (cJSON *array, int which, cJSON *newitem)
 
 CJSON_PUBLIC (double) cJSON_SetNumberHelper(cJSON *object
 
 CJSON_PUBLIC (void *) cJSON_malloc(size_t size)
 
 if (value==NULL)
 
 if (item==NULL)
 
 if (!parse_value(item, buffer_skip_whitespace(skip_utf8_bom(&buffer))))
 
 if (return_parse_end)
 
 if (value !=NULL)
 
 if (prebuffer< 0)
 
 if (!p.buffer)
 
 if (!print_value(item, &p))
 
 return (char *) p.buffer
 
 if ((len< 0)||(buf==NULL))
 
return print_value (item, &p)
 
 if (add_item_to_object(object, name, null, &global_hooks, false))
 
 cJSON_Delete (null)
 
 if (add_item_to_object(object, name, true_item, &global_hooks, false))
 
 cJSON_Delete (true_item)
 
 if (add_item_to_object(object, name, false_item, &global_hooks, false))
 
 cJSON_Delete (false_item)
 
 if (add_item_to_object(object, name, bool_item, &global_hooks, false))
 
 cJSON_Delete (bool_item)
 
 if (add_item_to_object(object, name, number_item, &global_hooks, false))
 
 cJSON_Delete (number_item)
 
 if (add_item_to_object(object, name, string_item, &global_hooks, false))
 
 cJSON_Delete (string_item)
 
 if (add_item_to_object(object, name, raw_item, &global_hooks, false))
 
 cJSON_Delete (raw_item)
 
 if (add_item_to_object(object, name, object_item, &global_hooks, false))
 
 cJSON_Delete (object_item)
 
 if (add_item_to_object(object, name, array, &global_hooks, false))
 
 cJSON_Delete (array)
 
return cJSON_DetachItemViaPointer (object, to_detach)
 
 if (after_inserted==NULL)
 
 if (replacement->next !=NULL)
 
 if (replacement->prev !=NULL)
 
 if (parent->child==item)
 
 cJSON_Delete (item)
 
 if ((count< 0)||(numbers==NULL))
 
 for (i=0;a &&(i<(size_t) count);i++)
 
 if ((count< 0)||(strings==NULL))
 
 if (!item)
 
 if (item->valuestring)
 
 while (child !=NULL)
 
 cJSON_Compare (const cJSON *const a, const cJSON *const b, const cJSON_bool case_sensitive)
 

Variables

size_t length = length
 
size_t const char ** return_parse_end
 
int prebuffer
 
int cJSON_bool fmt
 
int index
 
const char *const string
 
int count
 
cJSONitem = NULL
 
int which
 
cJSON *const cJSONreplacement
 
int cJSONnewitem
 
cJSON_bool recurse
 
const cJSON *const b
 
const cJSON *const const cJSON_bool case_sensitive
 
const char *const name
 
const char *const const cJSON_bool boolean
 
const char *const const double number
 
const char *const const char *const raw
 
global_error json = NULL
 
global_error position = 0
 
buffer content = (const unsigned char *) value
 
buffer offset = 0
 
buffer hooks = global_hooks
 
fail __pad0__
 
return NULL
 
p buffer = (unsigned char *) global_hooks.allocate((size_t) prebuffer)
 
p noalloc = false
 
p format = fmt
 
char * buf
 
char const int len
 
item next = NULL
 
 after_inserted = get_array_item(array, (size_t) which)
 
newitem prev = after_inserted->prev
 
 else
 
return true
 
cJSONn = NULL
 
cJSONp = NULL
 
cJSONa = NULL
 
cJSONchild = NULL
 
cJSONnewchild = NULL
 
newitem type = item->type & (~cJSON_IsReference)
 
newitem valueint = item->valueint
 
newitem valuedouble = item->valuedouble
 
fail __pad1__
 

Detailed Description

MODIFICATIONS: parse doesn't rely on null terminated strings. (Who thought that was a good idea.... ever?). valueInt was moved up to improve alignment. Wrap all symbols in the Aws namespace as a short-term collision resolution

Modifications licensed under:

Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

◆ cJSON

typedef struct Aws::cJSON Aws::cJSON

◆ cJSON_bool

typedef int Aws::cJSON_bool

◆ cJSON_Hooks

◆ internal_hooks

Function Documentation

◆ cJSON_Compare()

Aws::cJSON_Compare ( const cJSON *const  a,
const cJSON *const  b,
const cJSON_bool  case_sensitive 
)

◆ cJSON_Delete() [1/10]

Aws::cJSON_Delete ( array  )

◆ cJSON_Delete() [2/10]

Aws::cJSON_Delete ( bool_item  )

◆ cJSON_Delete() [3/10]

Aws::cJSON_Delete ( false_item  )

◆ cJSON_Delete() [4/10]

Aws::cJSON_Delete ( item  )

◆ cJSON_Delete() [5/10]

Aws::cJSON_Delete ( null  )

◆ cJSON_Delete() [6/10]

Aws::cJSON_Delete ( number_item  )

◆ cJSON_Delete() [7/10]

Aws::cJSON_Delete ( object_item  )

◆ cJSON_Delete() [8/10]

Aws::cJSON_Delete ( raw_item  )

◆ cJSON_Delete() [9/10]

Aws::cJSON_Delete ( string_item  )

◆ cJSON_Delete() [10/10]

Aws::cJSON_Delete ( true_item  )

◆ cJSON_DetachItemViaPointer()

return Aws::cJSON_DetachItemViaPointer ( object  ,
to_detach   
)

◆ cJSON_InsertItemInArray()

Aws::cJSON_InsertItemInArray ( cJSON array,
int  which,
cJSON newitem 
)

◆ cJSON_PrintPreallocated()

Aws::cJSON_PrintPreallocated ( cJSON item,
char *  buffer,
const int  length,
const cJSON_bool  format 
)

◆ CJSON_PUBLIC() [1/7]

Aws::CJSON_PUBLIC ( char *  ) const

◆ CJSON_PUBLIC() [2/7]

Aws::CJSON_PUBLIC ( cJSON ) const

◆ CJSON_PUBLIC() [3/7]

Aws::CJSON_PUBLIC ( const char *  )

◆ CJSON_PUBLIC() [4/7]

Aws::CJSON_PUBLIC ( double  )

◆ CJSON_PUBLIC() [5/7]

Aws::CJSON_PUBLIC ( int  ) const

◆ CJSON_PUBLIC() [6/7]

Aws::CJSON_PUBLIC ( void *  )

◆ CJSON_PUBLIC() [7/7]

Aws::CJSON_PUBLIC ( void  )

◆ for()

Aws::for ( = 0; a && (i < (size_t) count); i++)

◆ if() [1/26]

Aws::if ( item)

◆ if() [2/26]

Aws::if ( !p.  buffer)

◆ if() [3/26]

Aws::if ( parse_valueitem, buffer_skip_whitespace(skip_utf8_bom(&buffer)))

◆ if() [4/26]

Aws::if ( print_valueitem, &p)

◆ if() [5/26]

Aws::if ( (count< 0)||(numbers==NULL )

◆ if() [6/26]

Aws::if ( (count< 0)||(strings==NULL )

◆ if() [7/26]

Aws::if ( (len< 0)||(buf==NULL )

◆ if() [8/26]

Aws::if ( add_item_to_object(object, name, array, &global_hooks, false)  )

◆ if() [9/26]

Aws::if ( add_item_to_object(object, name, bool_item, &global_hooks, false)  )

◆ if() [10/26]

Aws::if ( add_item_to_object(object, name, false_item, &global_hooks, false)  )

◆ if() [11/26]

Aws::if ( add_item_to_object(object, name, null, &global_hooks, false)  )

◆ if() [12/26]

Aws::if ( add_item_to_object(object, name, number_item, &global_hooks, false)  )

◆ if() [13/26]

Aws::if ( add_item_to_object(object, name, object_item, &global_hooks, false)  )

◆ if() [14/26]

Aws::if ( add_item_to_object(object, name, raw_item, &global_hooks, false)  )

◆ if() [15/26]

Aws::if ( add_item_to_object(object, name, string_item, &global_hooks, false)  )

◆ if() [16/26]

Aws::if ( add_item_to_object(object, name, true_item, &global_hooks, false)  )

◆ if() [17/26]

Aws::if ( after_inserted  = NULL)

◆ if() [18/26]

Aws::if ( item->  valuestring)

◆ if() [19/26]

Aws::if ( item  = NULL)

◆ if() [20/26]

Aws::if ( parent->  child = item)

◆ if() [21/26]

Aws::if ( )

◆ if() [22/26]

Aws::if ( replacement->next = NULL)

◆ if() [23/26]

Aws::if ( replacement->prev = NULL)

◆ if() [24/26]

Aws::if ( return_parse_end  )

◆ if() [25/26]

Aws::if ( value !  = NULL)

◆ if() [26/26]

Aws::if ( value  = NULL)

◆ print_value()

return Aws::print_value ( item  ,
p 
)

◆ return()

Aws::return ( char *  )

◆ while()

Aws::while ( child = NULL)

Variable Documentation

◆ __pad0__

fail Aws::__pad0__

◆ __pad1__

fail Aws::__pad1__

◆ a

return Aws::a = NULL

◆ after_inserted

Aws::after_inserted = get_array_item(array, (size_t) which)

◆ b

const cJSON* const Aws::b

◆ boolean

const char *const const cJSON_bool Aws::boolean
Initial value:
{
cJSON *bool_item = cJSON_CreateBool(boolean)

◆ buf

char* Aws::buf

◆ buffer

p Aws::buffer = (unsigned char *) global_hooks.allocate((size_t) prebuffer)

◆ case_sensitive

const cJSON* const const cJSON_bool Aws::case_sensitive

◆ child

Aws::child = NULL

◆ content

buffer Aws::content = (const unsigned char *) value

◆ count

int Aws::count
Initial value:
{
size_t i = 0

◆ else

Aws::else
Initial value:

◆ fmt

char const int const cJSON_bool Aws::fmt
Initial value:
{
printbuffer p = {0, 0, 0, 0, 0, 0, {0, 0, 0}}

◆ format

p Aws::format = fmt

◆ hooks

p Aws::hooks = global_hooks

◆ index

int Aws::index
Initial value:
{
if (index < 0) {
return NULL;
}
return get_array_item(array, (size_t) index)

◆ item

cJSON *const Aws::item = NULL

◆ json

global_error Aws::json = NULL

◆ len

char const int Aws::len

◆ length

p Aws::length = length

◆ n

cJSON * Aws::n = NULL

◆ name

const char *const Aws::name
Initial value:
{
cJSON *null = cJSON_CreateNull()

◆ newchild

cJSON* Aws::newchild = NULL

◆ newitem

return Aws::newitem
Initial value:

◆ next

cJSON * Aws::next = NULL

◆ noalloc

p Aws::noalloc = false

◆ NULL

return Aws::NULL

◆ number

const char *const const double Aws::number
Initial value:
{
if (number >= INT_MAX) {
object->valueint = INT_MAX;
} else if (number <= INT_MIN) {
object->valueint = INT_MIN;
} else {
object->valueint = (int) number;
}
return object->valuedouble = number

◆ offset

p Aws::offset = 0

◆ p

cJSON * Aws::p = NULL

◆ position

global_error Aws::position = 0

◆ prebuffer

int Aws::prebuffer

◆ prev

item Aws::prev = after_inserted->prev

◆ raw

const char *const const char *const Aws::raw
Initial value:
{
cJSON *raw_item = cJSON_CreateRaw(raw)

◆ recurse

cJSON_bool Aws::recurse
Initial value:

◆ replacement

cJSON *const cJSON * Aws::replacement
Initial value:
{
if ((parent == NULL) || (replacement == NULL) || (item == NULL)) {
return false;
}
if (replacement == item) {
return true;
}

◆ return_parse_end

size_t const char ** Aws::return_parse_end
Initial value:
{
parse_buffer buffer = {0, 0, 0, 0, {0, 0, 0}}

◆ string

const char * Aws::string
Initial value:
{
return get_object_item(object, string, false)

◆ true

return Aws::true

◆ type

newitem Aws::type = item->type & (~cJSON_IsReference)

◆ valuedouble

newitem Aws::valuedouble = item->valuedouble

◆ valueint

newitem Aws::valueint = item->valueint

◆ which

int Aws::which
Initial value:
{
if (which < 0) {
return NULL;
}
return cJSON_DetachItemViaPointer(array, get_array_item(array, (size_t) which))
Aws::replacement
cJSON *const cJSON * replacement
Definition: cJSON.h:282
Aws::raw
const char *const const char *const raw
Definition: cJSON.h:316
Aws::cJSON
struct Aws::cJSON cJSON
Aws::buffer
p buffer
Definition: cJSON.cpp:1033
Aws::newitem
int cJSON * newitem
Definition: cJSON.h:284
Aws::item
cJSON * item
Definition: cJSON.h:252
Aws::cJSON_DetachItemViaPointer
return cJSON_DetachItemViaPointer(object, to_detach)
Aws::p
cJSON * p
Definition: cJSON.cpp:2080
Aws::after_inserted
after_inserted
Definition: cJSON.cpp:1865
Aws::cJSON::prev
struct cJSON * prev
Definition: cJSON.h:74
Aws::cJSON::next
struct cJSON * next
Definition: cJSON.h:73
Aws::number
const char *const const double number
Definition: cJSON.h:312
Aws::NULL
return NULL
Definition: cJSON.cpp:951
Aws::index
int index
Definition: cJSON.h:180
Aws::which
int which
Definition: cJSON.h:267