libkazv
Kazv::EffectStatus Class Reference

#include <context.hpp>

Public Member Functions

 EffectStatus ()
 
 EffectStatus (bool succ)
 
 EffectStatus (bool succ, JsonWrap d)
 
bool success () const
 Get whether this is successful. More...
 
 operator bool () const
 Conversion to bool. More...
 
const JsonWrapdata () const
 Get the attached data. More...
 
const jsondataJson (std::string key) const
 Get the data at key. More...
 
const jsondataJson (int index, std::string key) const
 Get the data at index at key. More...
 
std::string dataStr (std::string key) const
 Get the data string at key. More...
 
std::string dataStr (int index, std::string key) const
 Get the data at index at key. More...
 

Constructor & Destructor Documentation

◆ EffectStatus() [1/3]

Kazv::EffectStatus::EffectStatus ( )
inline

◆ EffectStatus() [2/3]

Kazv::EffectStatus::EffectStatus ( bool  succ)
inline

◆ EffectStatus() [3/3]

Kazv::EffectStatus::EffectStatus ( bool  succ,
JsonWrap  d 
)
inline

Member Function Documentation

◆ data()

const JsonWrap& Kazv::EffectStatus::data ( ) const
inline

Get the attached data.

Returns
A JsonWrap containing the attached data.

◆ dataJson() [1/2]

const json& Kazv::EffectStatus::dataJson ( int  index,
std::string  key 
) const
inline

Get the data at index at key.

This requires data() to contain a json array of json objects.

Parameters
indexThe index.
keyThe key.
Returns
A json with the data at index at key.

◆ dataJson() [2/2]

const json& Kazv::EffectStatus::dataJson ( std::string  key) const
inline

Get the data at key.

This requires data() to contain a json object.

Parameters
keyThe key.
Returns
A json with the data at key.

◆ dataStr() [1/2]

std::string Kazv::EffectStatus::dataStr ( int  index,
std::string  key 
) const
inline

Get the data at index at key.

This requires data() to contain a json array of json objects, and data().get().at(index).at(key) to be a json string.

Parameters
indexThe index.
keyThe key.
Returns
A std::string for the data at index at key.

◆ dataStr() [2/2]

std::string Kazv::EffectStatus::dataStr ( std::string  key) const
inline

Get the data string at key.

This requires data() to contain a json object, and data().get().at(key) to be a json string.

Parameters
keyThe key.
Returns
A std::string for the data at key.

◆ operator bool()

Kazv::EffectStatus::operator bool ( ) const
inlineexplicit

Conversion to bool.

Returns
success().

◆ success()

bool Kazv::EffectStatus::success ( ) const
inline

Get whether this is successful.

Returns
Whether this is successful.

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