Parent class for CubeAttributeInput and CubeAttributeOutput.
More...
#include <CubeAttribute.h>
|
QStringList | attributeList (bool(ChildClass::*tester)(QString) const) const |
| Get a list of attributes that the tester returns true on. More...
|
|
void | setAttribute (QString newValue, bool(ChildClass::*tester)(QString) const) |
| Set the attribute(s) for which tester returns true to newValue. More...
|
|
template<typename ChildClass>
class Isis::CubeAttribute< ChildClass >
Parent class for CubeAttributeInput and CubeAttributeOutput.
This class provides common functionality for the CubeAttributeInput and CubeAttributeOutput classes. These classes are used to parse and manipulate attribute information attached to the end of a cube filename.
- See also
- IsisAml IsisGui
- Author
- 2003-07-09 Stuart Sides
◆ CubeAttribute() [1/2]
template<typename ChildClass >
◆ CubeAttribute() [2/2]
template<typename ChildClass >
Constructs a CubeAttribute using the argument.
Constructs a CubeAttribute and initializes it with the contents of the string parameter. Minimal error checking is done to see if the string looks like an attribute.
- Parameters
-
att | A string containing the file attributes. All characters before the first "+" are assumed to be the filename and are ignored. |
◆ ~CubeAttribute()
template<typename ChildClass >
◆ addAttribute()
template<typename ChildClass >
Add a single attribute to these attributes.
This attribute should NOT have a '+' in it. For example, if you wanted to add BandSequential to the CubeAttributeOutput class, you could call addAttribute("BSQ") or addAttribute("BandSequential") or any valid deviation of that string. This will preserve existing attributes unless it's of the same type (if Tile was already set, then this will overwrite Tile). If the attribute is unrecognized or ambiguous, then an exception will be thrown.
- Parameters
-
attribute | The attribute we're adding to the current cube attributes |
Referenced by Isis::CubeAttribute< CubeAttributeInput >::setAttributes().
◆ addAttributes() [1/3]
template<typename ChildClass >
Append the attributes in the string to these cube attributes.
This will call addAttribute() for every attribute in the string. The initial "+" is not expected but allowed. This should NOT be called with a file name.
- Parameters
-
attributesString | A string of recognizable attributes, for example "+Bsq+Real" or "Bsq+Real" |
◆ addAttributes() [2/3]
template<typename ChildClass >
◆ addAttributes() [3/3]
template<typename ChildClass >
Append the attributes in the string to these cube attributes.
- See also
- addAttributes(const char *)
- Parameters
-
attributesString | A string of recognizable attributes, for example "+Bsq+Real" or "Bsq+Real" |
◆ attributeList()
template<typename ChildClass >
Get a list of attributes that the tester returns true on.
This is helpful for accessing the values of existing attributes. The strings will always be the UPPER CASE version of the attribute, i.e. not Bsq but BSQ. The returned attributes do not contain delimiters.
- Parameters
-
tester | A method that determines whether the attribute should be returned/is relevant |
- Returns
- A list of attributes for which the tester returns true on.
◆ setAttribute()
template<typename ChildClass >
void Isis::CubeAttribute< ChildClass >::setAttribute |
( |
QString |
newValue, |
|
|
bool(ChildClass::*)(QString) const |
tester |
|
) |
| |
|
inlineprotected |
Set the attribute(s) for which tester returns true to newValue.
If multiple attributes match (tester returns true on them), only the first one is preserved and it's value becomes newValue. Subsequent matching attributes are removed/deleted. This is done to simplify the resulting attribute string to be minimal with this particular attribute.
- Parameters
-
newValue | The string to set the attribute to... tester(newValue) really ought to return true. |
tester | A method that determines if an attribute is of the same type of newValue, so that existing attributes can be overwritten. |
◆ setAttributes()
template<typename ChildClass >
◆ toString()
template<typename ChildClass >
Return a string-representation of this cube attributes.
This will typically be exactl the string passed in if you used setAttributes(...). This can be an empty string ("") or if there are attributes then it will be +att1+att2+... The result of this method could be used to re-create this instance.
- Returns
- The cube attributes in string form
Referenced by Isis::CubeAttribute< CubeAttributeInput >::addAttributes().
The documentation for this class was generated from the following file:
- /home/isis3mgr/repos/ISIS3/isis/src/base/objs/CubeAttribute/CubeAttribute.h