All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
modules/common/src/include/aerospike/as_val.h File Reference
#include <citrusleaf/cf_atomic.h>
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for modules/common/src/include/aerospike/as_val.h:

Go to the source code of this file.

Data Structures

struct  as_val
 

Macros

#define as_val_destroy(__v)   ( as_val_val_destroy((as_val *)__v) )
 
#define as_val_hashcode(__v)   ( as_val_val_hashcode((as_val *)__v) )
 
#define as_val_reserve(__v)   ( as_val_val_reserve((as_val *)__v) )
 
#define as_val_tostring(__v)   ( as_val_val_tostring((as_val *)__v) )
 
#define as_val_type(__v)   (__v ? ((as_val *)__v)->type : AS_UNDEF)
 

Enumerations

enum  as_val_t
 

Functions

enum as_val_t __attribute__ ((packed)) as_val_t
 
as_valas_val_cons (as_val *val, as_val_t type, bool free)
 
void as_val_init (as_val *v, as_val_t type, bool free)
 
as_valas_val_val_destroy (as_val *)
 
uint32_t as_val_val_hashcode (const as_val *)
 
as_valas_val_val_reserve (as_val *)
 
char * as_val_val_tostring (const as_val *)
 

Variables

 AS_BOOLEAN = 2
 
 AS_BYTES = 9
 
 AS_INTEGER = 3
 
 AS_LIST = 5
 
 AS_MAP = 6
 
 AS_NIL = 1
 
 AS_PAIR = 8
 
 AS_REC = 7
 
 AS_STRING = 4
 
 AS_UNDEF = 0
 
 AS_UNKNOWN = 0
 
 AS_VAL_T_MAX
 

Macro Definition Documentation

#define as_val_destroy (   __v)    ( as_val_val_destroy((as_val *)__v) )

Decrement the as_val.count of a value. If as_val.count reaches 0 (zero) and as_val.free is true, then free the as_val instance.

Parameters
__vThe as_val to be decremented.
Returns
The value, if its as_val.count > 0. Otherwise NULL.

Definition at line 109 of file modules/common/src/include/aerospike/as_val.h.

#define as_val_hashcode (   __v)    ( as_val_val_hashcode((as_val *)__v) )

Get the hashcode value for the value.

Parameters
__vThe as_val to get the hashcode value for.
Returns
The hashcode value.

Definition at line 118 of file modules/common/src/include/aerospike/as_val.h.

#define as_val_reserve (   __v)    ( as_val_val_reserve((as_val *)__v) )

Increment the as_val.count of a value.

Parameters
__vThe as_val to be incremented.
Returns
The value, with it's refcount incremented.

Definition at line 99 of file modules/common/src/include/aerospike/as_val.h.

#define as_val_tostring (   __v)    ( as_val_val_tostring((as_val *)__v) )

Get the string representation of the value.

Parameters
__vThe as_val to get the string value for.
Returns
The string representation on success. Otherwise NULL.

Definition at line 127 of file modules/common/src/include/aerospike/as_val.h.

#define as_val_type (   __v)    (__v ? ((as_val *)__v)->type : AS_UNDEF)

Returns the as_val.type of a value.

Parameters
__vThe as_val to get the type of
Returns
An as_val_t value. If the type is unknown, then it will be AS_UNKNOWN.

Definition at line 90 of file modules/common/src/include/aerospike/as_val.h.

Enumeration Type Documentation

enum as_val_t

as_val types

Definition at line 37 of file modules/common/src/include/aerospike/as_val.h.

Function Documentation

enum as_val_t __attribute__ ( (packed)  )

as_val types

as_val* as_val_cons ( as_val val,
as_val_t  type,
bool  free 
)
inlineprivate

Initialize an as_val. Should only be used by subtypes.

Definition at line 181 of file modules/common/src/include/aerospike/as_val.h.

References as_val::count, as_val::free, type, and as_val::type.

void as_val_init ( as_val v,
as_val_t  type,
bool  free 
)
inlineprivate

Initialize an as_val. Should only be used by subtypes.

Definition at line 168 of file modules/common/src/include/aerospike/as_val.h.

References as_val::count, as_val::free, type, and as_val::type.

as_val* as_val_val_destroy ( as_val )
private

Helper function for decrementing the count of a value, and if count==0 and free==true, then free the value.

uint32_t as_val_val_hashcode ( const as_val )
private

Helper function for calculating the hash value.

as_val* as_val_val_reserve ( as_val )
private

Helper function for incrementing the count of a value.

char* as_val_val_tostring ( const as_val )
private

Helper function for generating the string representation.

Variable Documentation

AS_BOOLEAN = 2
AS_BYTES = 9
AS_INTEGER = 3
AS_LIST = 5
AS_MAP = 6
AS_NIL = 1
AS_PAIR = 8
AS_REC = 7
AS_STRING = 4
AS_UNDEF = 0
AS_UNKNOWN = 0
AS_VAL_T_MAX