Poco::RemotingNG::REST

class JSValue

File Information

Library: RemotingNG/REST
Package: JSValue
Header: Poco/RemotingNG/REST/JSValue.h

Description

This class represents a generic JavaScript object.

Subclasses implement scalar values, arrays and objects.

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Known Derived Classes: JSScalar, JSObject, JSArray

Member Summary

Member Functions: asBool, asDouble, asInt32, asInt64, asUInt32, asUInt64, has, operator [], size, stringValue, type

Inherited Functions: duplicate, referenceCount, release

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < JSValue >;

Enumerations

Type

JS_OBJECT

JS_ARRAY

JS_STRING

JS_NUMBER

JS_BOOL

Member Functions

asBool inline

bool asBool() const;

Returns the object's value as boolean.

asDouble inline

double asDouble() const;

Returns the object's value as double.

asInt32 inline

Poco::Int32 asInt32() const;

Returns the object's value as Int32.

asInt64 inline

Poco::Int64 asInt64() const;

Returns the object's value as Int64.

asUInt32 inline

Poco::UInt32 asUInt32() const;

Returns the object's value as UInt32.

asUInt64 inline

Poco::UInt64 asUInt64() const;

Returns the object's value as UInt64.

has virtual

virtual bool has(
    const std::string & name
) const;

operator [] virtual

virtual const Ptr & operator[] (
    const std::string & name
) const;

operator [] virtual

virtual Ptr & operator[] (
    const std::string & name
);

operator [] virtual

virtual const Ptr & operator[] (
    std::size_t index
) const;

operator [] virtual

virtual Ptr & operator[] (
    std::size_t index
);

size virtual

virtual std::size_t size() const;

Returns the size of the object.

stringValue virtual

virtual const std::string & stringValue() const;

Returns the object's value as string.

type virtual

virtual Type type() const = 0;

Returns the type of the object.