Poco::UPnP::GENA

template < typename T, typename MP >

class EventedStateVariable

File Information

Library: UPnP/GENA
Package: StateVariables
Header: Poco/UPnP/GENA/EventedStateVariable.h

Description

A helper class template for implementing UPnP evented state variables.

Firing of events is controlled by a moderation policy. An EventModerationPolicy must be a class providing a member function named valueChanged() that takes as argument the new value. Three policy classes are predefined:

Member Summary

Member Functions: get, name, set, toString

Constructors

EventedStateVariable inline

EventedStateVariable(
    const std::string & name,
    const T & initialValue,
    const MP & moderationPolicy
);

Creates a new EventedStateVariable with the given name and initialValue. The given moderation policy object is used to control the firing of events when the variable's value changes.

Destructor

~EventedStateVariable inline

~EventedStateVariable();

Member Functions

get inline

const T & get() const;

name inline

const std::string & name() const;

set inline

void set(
    const T & value
);

toString inline

std::string toString() const;

toString protected static inline

static std::string toString(
    Poco::Int8 value
);

toString protected static inline

static std::string toString(
    Poco::UInt8 value
);

toString protected static inline

static std::string toString(
    Poco::Int16 value
);

toString protected static inline

static std::string toString(
    Poco::UInt16 value
);

toString protected static inline

static std::string toString(
    Poco::Int32 value
);

toString protected static inline

static std::string toString(
    Poco::UInt32 value
);

toString protected static inline

static std::string toString(
    float value
);

toString protected static inline

static std::string toString(
    double value
);

toString protected static inline

static std::string toString(
    bool value
);

toString protected static inline

static std::string toString(
    const std::string & value
);

Securely control IoT edge devices from anywhere   Connect a Device