saga::detail::attribute< Derived > Struct Template Reference
The SAGA attribute interface.
More...
#include <attribute.hpp>
List of all members.
Detailed Description
template<typename Derived>
struct saga::detail::attribute< Derived >
The SAGA attribute interface.
Classes implementing this interface maintain a set of attributes. These attributes can be considered as a pair of string-based key-value pairs attached to the object. This interface provies methods for querying, adding, and removing attributes.
Usage example:
saga::url lfn("rls://localhost//lfn.dat");
//logical_file implements the attribute interface
logical_file::logical_file lf (lfn);
std::vector<std::string> keys(lf.list_attributes());
std::vector<std::string>::const_iterator end = keys.end();
std::vector<std::string>::const_iterator key_it = keys.begin();
for(; key_it != end; ++key_it) { std::cout << lf.get_attribute(*key_it) << std::endl };
Member Typedef Documentation
template<typename Derived>
Attribute string vector type.
template<typename Derived>
Attribute string map type.
Member Function Documentation
template<typename Derived>
Gets an attribute value.
- Parameters:
-
- Returns:
- String value of the attribute.
template<typename Derived>
void saga::detail::attribute< Derived >::set_attribute |
( |
std::string const & |
key, |
|
|
std::string const & |
value | |
|
) |
| | [inline] |
Sets an attribute to a value.
- Parameters:
-
| key | Attribute key name |
| value | String value to set the attribute to |
template<typename Derived>
Gets the array of values associated with an attribute.
- Parameters:
-
- Returns:
- String array of attribute values
template<typename Derived>
Sets an attribute to an array of values.
- Parameters:
-
| key | Attribute key name |
| values | String array of attribute values |
template<typename Derived>
Removes an attribute.
- Parameters:
-
| key | Attribute key to be removed |
template<typename Derived>
Gets the list of attribute keys.
- Returns:
- Existing attribute keys
template<typename Derived>
Finds matching attributes.
- Parameters:
-
| pattern | Key name search pattern |
- Returns:
- Matching attribute keys
template<typename Derived>
Checks if the attribute exists.
- Parameters:
-
- Returns:
- true if the attribute exists, false otherwise
template<typename Derived>
Checks the attribute mode.
- Parameters:
-
- Returns:
- true if the attribute is read-only, false otherwise
template<typename Derived>
Checks the attribute mode.
- Parameters:
-
- Returns:
- true if the attribute is writeable, false otherwise
template<typename Derived>
Checks if it is vector.
- Parameters:
-
- Returns:
- true if the attribute is a vector, false otherwise
template<typename Derived>
Checks the attribute mode.
- Parameters:
-
- Returns:
- true if the attribute is removable, false otherwise
The documentation for this struct was generated from the following file: