Poco::Netconf

class DataStore

Library: Netconf
Package: Service
Header: Poco/Netconf/DataStore.h

Description

Implements a Netconf DataStore.

Member Summary

Member Functions: containsAttributes, content, editConfig, get, getName, isLocked, isSubTree, lock, operator =, setName, unlock, unlockSilent

Constructors

DataStore

DataStore(
    const DataStore & other
);

Creates a deep-copy of the store.

DataStore

DataStore(
    Poco::AutoPtr < XML::Document > doc,
    const std::string & name
);

Creates the DataStore. Netiher doc nor name are allowed to be empty.

Destructor

~DataStore

~DataStore();

Destroys the DataStore.

Member Functions

containsAttributes static

static bool containsAttributes(
    XML::Element * pIn,
    XML::Element * pOrig
);

Returns true if foreach attribute found in pIn a matching one is found in pOrig.

content inline

const Poco::AutoPtr < XML::Document > & content() const;

Returns the content of the data store.

editConfig

void editConfig(
    Poco::AutoPtr < XML::Document > config,
    Utility::DefaultOperation defaultOperation = Utility::DOP_MERGE,
    Utility::TestOption testOption = Utility::TO_TESTTHENSET,
    Utility::ErrorOption errorOption = Utility::EO_STOP
);

Implements the edit-config operation.

get

Poco::AutoPtr < XML::Document > get(
    const Filter & filter
);

Retrieves configuration data.

getName inline

const std::string & getName() const;

Returns the name of the DataStore.

isLocked inline

bool isLocked() const;

Returns lock status.

isSubTree static

static bool isSubTree(
    XML::Element * pIn,
    XML::Element * pOrig
);

Returns true if pOrig contains all elements/attributes found in pIn

lock

void lock();

Implements the lock operation.

operator =

DataStore & operator = (
    const DataStore & other
);

Assignment operator. Creates a deep-copy of the DataStore.

setName inline

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

Allows to change the name of a DataStore (must not be empty!).

unlock

void unlock();

Implements the unlock operation. Throws an exception if the sessionid doesn't match

unlockSilent

bool unlockSilent(
    Poco::UInt32 sessionId
);

Same as unlock but no exception will be thrown. Returns true if the sessionIds matched.