Poco::RemotingNG

class AttributedObject

File Information

Library: RemotingNG
Package: ORB
Header: Poco/RemotingNG/AttributedObject.h

Description

A AttributedObject can hold any number of attributes in the form of name-value pairs.

Inheritance

Known Derived Classes: IoT::Devices::RotaryEncoderSkeleton, IoT::Devices::ScalarDatapointSkeleton, IoT::Devices::SensorSkeleton, IoT::Devices::SerialDeviceSkeleton, IoT::Devices::StringDatapointSkeleton, IoT::Devices::SwitchSkeleton, IoT::Devices::VectorDatapointSkeleton, Credentials, IoT::BtLE::PeripheralSkeleton, Poco::RemotingNG::HTTP::Transport, Poco::RemotingNG::REST::Transport, Poco::RemotingNG::JSONRPC::Transport, Poco::RemotingNG::TCP::Connection, Poco::RemotingNG::TCP::ServerTransport, Poco::RemotingNG::TCP::Transport, EventSubscriber, ServerTransport, Skeleton, Transport, Poco::UPnP::GENA::Transport, Poco::UPnP::SOAP::Transport, IoT::BtLE::PeripheralBrowserSkeleton, IoT::XBee::XBeeNodeSkeleton, IoT::NetworkEnvironment::NetworkEnvironmentServiceSkeleton, IoT::BtLE::PeripheralManagerSkeleton, IoT::CAN::CANEndpointSkeleton, IoT::MQTT::MQTTClientSkeleton, IoT::Modbus::ModbusMasterSkeleton, IoT::OPC::OPCClientSkeleton, IoT::S7PLC::S7PLCClientSkeleton, IoT::UDP::UDPEndpointSkeleton, IoT::DeviceStatus::DeviceStatusServiceSkeleton, IoT::Mailer::MailerServiceSkeleton, IoT::MobileConnection::MobileConnectionServiceSkeleton, IoT::SMS::ShortMessageServiceSkeleton, IoT::Settings::SettingsServiceSkeleton, IoT::WebEvent::WebEventNotifierSkeleton, IoT::Datapoints::DatapointFactorySkeleton, Poco::RemotingNG::SOAP::Transport, IoT::Devices::AccelerometerSkeleton, IoT::Devices::BarcodeReaderSkeleton, IoT::Devices::BooleanDatapointSkeleton, IoT::Devices::CameraSkeleton, IoT::Devices::CompositeSkeleton, IoT::Devices::CounterDatapointSkeleton, IoT::Devices::CounterSkeleton, IoT::Devices::DatapointSkeleton, IoT::Devices::DeviceSkeleton, IoT::Devices::EnumDatapointSkeleton, IoT::Devices::FlagsDatapointSkeleton, IoT::Devices::GNSSSensorSkeleton, IoT::Devices::GyroscopeSkeleton, IoT::Devices::LEDSkeleton, IoT::Devices::MagnetometerSkeleton, IoT::Devices::BooleanSensorSkeleton, IoT::Devices::DeviceTreeSkeleton, IoT::Devices::IOSkeleton, IoT::Devices::TriggerSkeleton

Member Summary

Member Functions: clearAttributes, countAttributes, enumerateAttributes, getAttribute, hasAttribute, operator =, removeAttribute, setAttribute

Types Aliases

NameValueMap

using NameValueMap = std::map < std::string, std::string >;

Constructors

AttributedObject

AttributedObject();

Creates an AttributedObject.

AttributedObject

AttributedObject(
    const AttributedObject & other
);

Creates an AttributedObject by copying the attributes from another one.

AttributedObject

AttributedObject(
    AttributedObject && other
) noexcept;

Creates an AttributedObject by moving the attributes from another one.

Destructor

~AttributedObject virtual

virtual ~AttributedObject();

Destroys the AttributedObject.

Member Functions

clearAttributes

void clearAttributes();

Removes all attributes.

countAttributes inline

std::size_t countAttributes() const;

Returns the number of attributes.

enumerateAttributes

std::vector < std::string > enumerateAttributes() const;

Returns a vector containing all attribute names.

getAttribute

const std::string & getAttribute(
    const std::string & name
) const;

Returns the value of the attribute with the given name. Throws a Poco::NotFoundException if no such attribute exists.

getAttribute

const std::string & getAttribute(
    const std::string & name,
    const std::string & deflt
) const;

Returns the value of the attribute with the given name, or the given default value if no such attribute exists.

hasAttribute

bool hasAttribute(
    const std::string & name
) const;

Returns true if and only if an attribute with the given name exists.

operator =

AttributedObject & operator = (
    const AttributedObject & other
);

Assigns the attributes from another AttributedObject.

operator =

AttributedObject & operator = (
    AttributedObject && other
) noexcept;

Moves the attributes from another AttributedObject.

removeAttribute

void removeAttribute(
    const std::string & name
);

Removes the attribute with the given name. Does nothing if no attribute with the given name exists.

setAttribute

void setAttribute(
    const std::string & name,
    const std::string & value
);

Adds or modifies the attribute with the given name.

Securely control IoT edge devices from anywhere   Connect a Device