C++ Client-Side SDK
LaunchDarkly SDK
Typedefs | Functions
object_builder.h File Reference
#include <launchdarkly/bindings/c/export.h>
#include <launchdarkly/bindings/c/value.h>
Include dependency graph for object_builder.h:

Go to the source code of this file.

Typedefs

typedef struct _LDObjectBuilder * LDObjectBuilder
 

Functions

 LDObjectBuilder_New ()
 
 LDObjectBuilder_Free (LDObjectBuilder builder)
 
 LDObjectBuilder_Add (LDObjectBuilder builder, char const *key, LDValue val)
 
 LDObjectBuilder_Build (LDObjectBuilder builder)
 

Function Documentation

◆ LDObjectBuilder_Add()

LDObjectBuilder_Add ( LDObjectBuilder  builder,
char const *  key,
LDValue  val 
)

Add a key-value pair to the object builder.

After calling this method the provider LDValue is consumed. It should not be accessed, and the caller doesn't need to call LDValue_Free. The key will be copied.

Parameters
builderThe object builder to add the value to.
keyThe key for the value being added. Must not be NULL.
valThe value to add. Must not be NULL.

◆ LDObjectBuilder_Build()

LDObjectBuilder_Build ( LDObjectBuilder  builder)

Construct an LDValue from an object builder.

After calling this method the object builder is consumed. It should not be used and the caller does not need to call LDObjectBuilder_Free.

Parameters
builderThe object builder to build an LDValue from. Must not be NULL.
Returns
The built LDValue.

◆ LDObjectBuilder_Free()

LDObjectBuilder_Free ( LDObjectBuilder  builder)

Free an object builder. This should only be done for a builder which has not been built. Calling LDObjectBuilder_Build on an object builder consumes the object builder.

Parameters
builderThe builder to free.

◆ LDObjectBuilder_New()

LDObjectBuilder_New ( )

Construct a new object builder.

Returns
The new object builder.