Vowpal Wabbit
Public Member Functions | List of all members
LabelSinglePropertyState< audit > Struct Template Reference

#include <parse_example_json.h>

Inheritance diagram for LabelSinglePropertyState< audit >:
BaseState< audit >

Public Member Functions

 LabelSinglePropertyState ()
 
BaseState< audit > * Float (Context< audit > &ctx, float v) override
 
BaseState< audit > * Uint (Context< audit > &ctx, unsigned v) override
 
- Public Member Functions inherited from BaseState< audit >
 BaseState (const char *pname)
 
virtual BaseState< audit > * Null (Context< audit > &ctx)
 
virtual BaseState< audit > * Bool (Context< audit > &ctx, bool b)
 
virtual BaseState< audit > * String (Context< audit > &ctx, const char *str, rapidjson::SizeType len, bool)
 
virtual BaseState< audit > * StartObject (Context< audit > &ctx)
 
virtual BaseState< audit > * Key (Context< audit > &ctx, const char *str, rapidjson::SizeType len, bool)
 
virtual BaseState< audit > * EndObject (Context< audit > &ctx, rapidjson::SizeType)
 
virtual BaseState< audit > * StartArray (Context< audit > &ctx)
 
virtual BaseState< audit > * EndArray (Context< audit > &ctx, rapidjson::SizeType)
 

Additional Inherited Members

- Public Attributes inherited from BaseState< audit >
const char * name
 

Detailed Description

template<bool audit>
struct LabelSinglePropertyState< audit >

Definition at line 299 of file parse_example_json.h.

Constructor & Destructor Documentation

◆ LabelSinglePropertyState()

template<bool audit>
LabelSinglePropertyState< audit >::LabelSinglePropertyState ( )
inline

Definition at line 301 of file parse_example_json.h.

301 : BaseState<audit>("LabelSingleProperty") {}

Member Function Documentation

◆ Float()

template<bool audit>
BaseState<audit>* LabelSinglePropertyState< audit >::Float ( Context< audit > &  ctx,
float  v 
)
inlineoverridevirtual

Reimplemented from BaseState< audit >.

Definition at line 304 of file parse_example_json.h.

References Context< audit >::key, Context< audit >::key_length, Context< audit >::label_object_state, and Context< audit >::previous_state.

305  {
306  // skip "_label_"
307  ctx.key += 7;
308  ctx.key_length -= 7;
309 
310  if (ctx.label_object_state.Float(ctx, v) == nullptr)
311  return nullptr;
312 
313  return ctx.previous_state;
314  }
LabelObjectState< audit > label_object_state
const char * key
rapidjson::SizeType key_length
BaseState< audit > * previous_state

◆ Uint()

template<bool audit>
BaseState<audit>* LabelSinglePropertyState< audit >::Uint ( Context< audit > &  ctx,
unsigned  v 
)
inlineoverridevirtual

Reimplemented from BaseState< audit >.

Definition at line 316 of file parse_example_json.h.

References Context< audit >::key, Context< audit >::key_length, Context< audit >::label_object_state, and Context< audit >::previous_state.

317  {
318  // skip "_label_"
319  ctx.key += 7;
320  ctx.key_length -= 7;
321 
322  if (ctx.label_object_state.Uint(ctx, v) == nullptr)
323  return nullptr;
324 
325  return ctx.previous_state;
326  }
LabelObjectState< audit > label_object_state
const char * key
rapidjson::SizeType key_length
BaseState< audit > * previous_state

The documentation for this struct was generated from the following file: