Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | Public Attributes | List of all members
seastar::json::json_list< T > Class Template Reference

Detailed Description

template<class T>
class seastar::json::json_list< T >

json_list is based on std vector implementation.

When values are added with push it is set the "set" flag to true hence will be included in the parsed object

#include <seastar/json/json_elements.hh>

Inheritance diagram for seastar::json::json_list< T >:
seastar::json::json_base_element

Public Member Functions

void push (const T &element)
 
virtual std::string to_string () override
 
template<class C >
json_listoperator= (const C &list)
 
virtual future write (output_stream< char > &s) const override
 
virtual bool is_verify () noexcept
 

Public Attributes

std::vector< T > _elements
 
std::string _name
 
bool _mandatory
 
bool _set
 

Member Function Documentation

◆ is_verify()

virtual bool seastar::json::json_base_element::is_verify ( )
inlinevirtualnoexceptinherited

Check if it's a mandatory parameter and if it's set.

Returns
true if this is not a mandatory parameter or if it is and it's value is set

◆ operator=()

template<class T >
template<class C >
json_list & seastar::json::json_list< T >::operator= ( const C &  list)
inline

Assignment can be done from any object that support const range iteration and that it's elements can be assigned to the list elements

◆ push()

template<class T >
void seastar::json::json_list< T >::push ( const T &  element)
inline

Add an element to the list.

Parameters
elementa new element that will be added to the list

◆ to_string()

template<class T >
virtual std::string seastar::json::json_list< T >::to_string ( )
inlineoverridevirtual

returns the internal value in a json format Each inherit class must implement this method

Returns
formated internal value

Implements seastar::json::json_base_element.

◆ write()

template<class T >
virtual future seastar::json::json_list< T >::write ( output_stream< char > &  s) const
inlineoverridevirtual

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