+
+ //==========================================================================
+ /*!
+ \brief Parameter attribute
+
+ This attribute is a universal container of arbitrary data of basic types
+ (%integer, real, string, array, etc).
+
+ Each parameter is identified by the unique name. Only one value of the
+ specific type can be assigned to the parameter, though it is allowed to
+ assign values of different types to the same name.
+ */
+ //==========================================================================
+ interface AttributeParameter : GenericAttribute
+ {
+ //! This exception is raised when an invalid identifier is passed as parameter.
+ exception InvalidIdentifier {};
+
+ /*!
+ \brief Associates %integer value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetInt(in string ID, in long value);
+ /*!
+ \brief Returns %integer value associated with the specified identifier.
+
+ Raises an exception if %integer parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return %integer value assigned to the parameter
+ */
+ long GetInt(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates real value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetReal(in string ID, in double value);
+ /*!
+ \brief Returns real value associated with the specified identifier.
+
+ Raises an exception if real parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return real value assigned to the parameter
+ */
+ double GetReal(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates string value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetString(in string ID, in string value);
+ /*!
+ \brief Returns string value associated with the specified identifier.
+
+ Raises an exception if string parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return string value assigned to the parameter
+ */
+ string GetString(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates boolean value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetBool(in string ID, in boolean value);
+ /*!
+ \brief Returns boolean value associated with the specified identifier.
+
+ Raises an exception if boolean parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return boolean value assigned to the parameter
+ */
+ boolean GetBool(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates real array value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetRealArray(in string ID, in DoubleSeq value);
+ /*!
+ \brief Returns real array value associated with the specified identifier.
+
+ Raises an exception if real array parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return real array value assigned to the parameter
+ */
+ DoubleSeq GetRealArray(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates %integer array value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetIntArray(in string ID, in LongSeq value);
+ /*!
+ \brief Returns %integer array value associated with the specified identifier.
+
+ Raises an exception if %integer array parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return %integer array value assigned to the parameter
+ */
+ LongSeq GetIntArray(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Associates string array value with the unique identifier.
+ \param ID parameter name
+ \param value parameter value
+ */
+ void SetStrArray(in string ID, in StringSeq value);
+ /*!
+ \brief Returns string array value associated with the specified identifier.
+
+ Raises an exception if string array parameter is not set for the specified
+ parameter.
+
+ \param ID parameter name
+ \return string array value assigned to the parameter
+ */
+ StringSeq GetStrArray(in string ID) raises(InvalidIdentifier);
+ /*!
+ \brief Checks if the value of specified type is set for the identifier.
+ \param ID parameter name
+ \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
+ 4(real array), 5(%integer array), 6(string array)]
+ \returns \c true if the value of type \a ptype is associated with the parameter \a ID
+ */
+ boolean IsSet(in string ID, in long ptype);
+ /*!
+ \brief Removes value of specified type from the named parameter.
+ \param ID parameter name
+ \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
+ 4(real array), 5(%integer array), 6(string array)]
+ \return \c true if value is successfully removed or \c false otherwise
+ */
+ boolean RemoveID(in string ID, in long ptype);
+ /*!
+ \brief Returns a father attribute of this attribute.
+ \return father parameter attribute
+ */
+ AttributeParameter GetFather();
+ /*!
+ \brief Check if this attribute has parent parameter attribute.
+ \return \c true if this attribute has parent parameter attribute
+ */
+ boolean HasFather();
+ /*!
+ \brief Check if this attribute is a root (top-level) parameter attribute.
+ \return \c true if this attribute is a root parameter attribute
+ */
+ boolean IsRoot();
+ /*!
+ \brief Clears the content of the attribute.
+ */
+ void Clear();
+ /*!
+ \brief Returns a sequence of parameters identifiers of the specified type
+ stored in the attribute.
+ \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
+ 4(real array), 5(%integer array), 6(string array)]
+ \return list of parameters identifier
+ */
+ StringSeq GetIDs(in long ptype);
+ };