Purpose:
This class holds an arbitrary name and value pair. It is frequently used to pass parameters with varying numbers, names, and types. As the name suggests, DKNVPair has two parts; name and value. The name is a string name of the object stored in the value part. The value is a DKAny containing the named object.
Class summary:
class DKNVPair { public: dkNVPair(const char *InName = 0); dkNVPair(const char *InName, const DKAny &InValue); dkNVPair(const DKNVPair &fromPair); virtual DKNVPair(); dkString getName() const; void setName(const char* name); dkAny getValue() const; void setValue(const DKAny& value); void set(const char* name, const DKAny& value); };
Members:
The destructor destroys the name and value in DKNVPair's internal representation. Since the value is stored in DKAny, it coincides with DKAny memory policy; that is, if the object is not managed by DKAny, then you must destroy it manually.
dkNVPair(const char *InName = 0); dkNVPair(const char *InName, const DKAny &InValue); dkNVPair(const DKNVPair &fromPair); virtual DKNVPair();
dkString getName() const;
void setName(const char* name);
dkAny getValue() const;
void setValue(const DKAny& value);
void set(const char* name, const DKAny& value);
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.