The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

RPCValue Class Reference

#include <rpc.h>

Inheritance diagram for RPCValue:

Inheritance graph
[legend]
Collaboration diagram for RPCValue:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RPCValue (RPCValue *rparent=NULL)
 RPCValue (RPCValueType ttype, RPCValue *rparent=NULL)
 RPCValue (bool nvalue, RPCValue *rparent=NULL)
 RPCValue (double nvalue, RPCValue *rparent=NULL)
 RPCValue (const std::string &nvalue, RPCValue *rparent=NULL)
virtual ~RPCValue ()
RPCValueType GetType ()
void SetNull ()
void SetBoolean (bool nvalue)
void SetInteger (double nvalue)
void SetString (const std::string &nvalue)
void SetArray ()
void SetObject ()
void ArrayAdd (RPCValue *nvalue)
void ObjectAdd (const std::string &key, RPCValue *nvalue)
RPCValueGetArray (int i)
int ArraySize ()
RPCValueGetObject (const std::string &key)
std::pair< RPCObjectContainer::iterator,
RPCObjectContainer::iterator > 
GetObjectIterator ()
std::string GetString ()
double GetInt ()
bool GetBool ()

Public Attributes

RPCValueparent

Protected Member Functions

double * CastInteger ()
std::stringCastString ()
RPCObjectContainerCastObject ()
RPCArrayContainerCastArray ()
void DestroyValue ()
void InitValue ()
 RPCValue (const RPCValue &v)

Protected Attributes

RPCValueType type
void * value

Detailed Description

Definition at line 23 of file rpc.h.


Constructor & Destructor Documentation

RPCValue::RPCValue const RPCValue v  )  [inline, protected]
 

Definition at line 104 of file rpc.h.

RPCValue::RPCValue RPCValue rparent = NULL  )  [inline]
 

Definition at line 109 of file rpc.h.

RPCValue::RPCValue RPCValueType  ttype,
RPCValue rparent = NULL
[inline]
 

Definition at line 110 of file rpc.h.

References InitValue().

RPCValue::RPCValue bool  nvalue,
RPCValue rparent = NULL
[inline]
 

Definition at line 111 of file rpc.h.

RPCValue::RPCValue double  nvalue,
RPCValue rparent = NULL
[inline]
 

Definition at line 112 of file rpc.h.

References value.

RPCValue::RPCValue const std::string nvalue,
RPCValue rparent = NULL
[inline]
 

Definition at line 113 of file rpc.h.

References value.

virtual RPCValue::~RPCValue  )  [inline, virtual]
 

Definition at line 115 of file rpc.h.

References DestroyValue().


Member Function Documentation

void RPCValue::ArrayAdd RPCValue nvalue  )  [inline]
 

Definition at line 194 of file rpc.h.

References CastArray(), parent, RPCArray, and type.

Referenced by ModuleRpcJson::AttachToParent().

int RPCValue::ArraySize  )  [inline]
 

Definition at line 222 of file rpc.h.

References CastArray(), RPCArray, and type.

Referenced by ModuleRpcJson::JSONSerialize(), and ModuleRPCTest::OnEvent().

RPCArrayContainer* RPCValue::CastArray  )  [inline, protected]
 

Definition at line 44 of file rpc.h.

References value.

Referenced by ArrayAdd(), ArraySize(), DestroyValue(), GetArray(), and SetArray().

double* RPCValue::CastInteger  )  [inline, protected]
 

Definition at line 29 of file rpc.h.

References value.

Referenced by DestroyValue(), GetInt(), and SetInteger().

RPCObjectContainer* RPCValue::CastObject  )  [inline, protected]
 

Definition at line 39 of file rpc.h.

References value.

Referenced by DestroyValue(), GetObject(), GetObjectIterator(), ObjectAdd(), and SetObject().

std::string* RPCValue::CastString  )  [inline, protected]
 

Definition at line 34 of file rpc.h.

References value.

Referenced by DestroyValue(), GetString(), and SetString().

void RPCValue::DestroyValue  )  [inline, protected]
 

Definition at line 49 of file rpc.h.

References CastArray(), CastInteger(), CastObject(), CastString(), RPCArray, RPCInteger, RPCObject, RPCString, type, and value.

Referenced by SetArray(), SetBoolean(), SetInteger(), SetNull(), SetObject(), SetString(), and ~RPCValue().

RPCValue* RPCValue::GetArray int  i  )  [inline]
 

Definition at line 212 of file rpc.h.

References CastArray(), RPCArray, and type.

Referenced by ModuleRpcJson::JSONSerialize(), and ModuleRPCTest::OnEvent().

bool RPCValue::GetBool  )  [inline]
 

Definition at line 263 of file rpc.h.

References RPCBoolean, type, and value.

Referenced by ModuleRpcJson::JSONSerialize().

double RPCValue::GetInt  )  [inline]
 

Definition at line 256 of file rpc.h.

References CastInteger(), RPCInteger, and type.

Referenced by ModuleRpcJson::JSONSerialize().

RPCValue* RPCValue::GetObject const std::string key  )  [inline]
 

Definition at line 230 of file rpc.h.

References CastObject(), RPCObject, and type.

Referenced by ModuleRpcJson::OnEvent().

std::pair<RPCObjectContainer::iterator,RPCObjectContainer::iterator> RPCValue::GetObjectIterator  )  [inline]
 

Definition at line 241 of file rpc.h.

References CastObject(), RPCObject, and type.

Referenced by ModuleRpcJson::JSONSerialize().

std::string RPCValue::GetString  )  [inline]
 

Definition at line 249 of file rpc.h.

References CastString(), RPCString, and type.

Referenced by ModuleRpcJson::JSONSerialize(), ModuleRPCTest::OnEvent(), and ModuleRpcJson::OnEvent().

RPCValueType RPCValue::GetType  )  [inline]
 

Definition at line 120 of file rpc.h.

References type.

Referenced by ModuleRpcJson::AttachToParent(), ModuleRpcJson::JSONSerialize(), and ModuleRpcJson::OnEvent().

void RPCValue::InitValue  )  [inline, protected]
 

Definition at line 81 of file rpc.h.

References RPCArray, RPCBoolean, RPCInteger, RPCNull, RPCObject, RPCString, type, and value.

Referenced by RPCValue(), SetArray(), and SetObject().

void RPCValue::ObjectAdd const std::string key,
RPCValue nvalue
[inline]
 

Definition at line 203 of file rpc.h.

References CastObject(), parent, RPCObject, and type.

Referenced by ModuleRpcJson::AttachToParent().

void RPCValue::SetArray  )  [inline]
 

Definition at line 166 of file rpc.h.

References CastArray(), DestroyValue(), InitValue(), RPCArray, and type.

void RPCValue::SetBoolean bool  nvalue  )  [inline]
 

Definition at line 131 of file rpc.h.

References DestroyValue(), RPCBoolean, type, and value.

void RPCValue::SetInteger double  nvalue  )  [inline]
 

Definition at line 138 of file rpc.h.

References CastInteger(), DestroyValue(), RPCInteger, type, and value.

void RPCValue::SetNull  )  [inline]
 

Definition at line 125 of file rpc.h.

References DestroyValue(), RPCNull, and type.

void RPCValue::SetObject  )  [inline]
 

Definition at line 180 of file rpc.h.

References CastObject(), DestroyValue(), InitValue(), RPCObject, and type.

void RPCValue::SetString const std::string nvalue  )  [inline]
 

Definition at line 152 of file rpc.h.

References CastString(), DestroyValue(), RPCString, type, and value.

Referenced by ModuleRPCTest::OnEvent().


Member Data Documentation

RPCValue* RPCValue::parent
 

Definition at line 107 of file rpc.h.

Referenced by ArrayAdd(), ModuleRpcJson::JSONParse(), and ObjectAdd().

RPCValueType RPCValue::type [protected]
 

Definition at line 26 of file rpc.h.

Referenced by ArrayAdd(), ArraySize(), DestroyValue(), GetArray(), GetBool(), GetInt(), GetObject(), GetObjectIterator(), GetString(), GetType(), InitValue(), ObjectAdd(), SetArray(), SetBoolean(), SetInteger(), SetNull(), SetObject(), and SetString().

void* RPCValue::value [protected]
 

Definition at line 27 of file rpc.h.

Referenced by CastArray(), CastInteger(), CastObject(), CastString(), DestroyValue(), GetBool(), InitValue(), RPCValue(), SetBoolean(), SetInteger(), and SetString().


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