Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Atk::Attribute Class Reference

A AtkAttribute C++ wrapper class. More...

`#include <inti/atk/text.h>`

List of all members.

## Public Member Functions

Constructors

- Attribute ()
    Construct an empty attribute.
- Attribute (TextAttribute attr, int index)
    Construct an new attribute from a TextAttribute and a value index.
- Attribute (TextAttribute attr, const String &value)
    Construct an new attribute from a TextAttribute and a value string.
- Attribute (const String &name, const String &value)
    Construct an new attribute from an attribute name and a value string.
- Attribute (const AtkAttribute &attrib)
    Construct an new attribute from an existing AtkAttribute.
- Attribute (const Attribute &src)
    Copy constructor.
- ~Attribute ()
    Destructor.
- Attribute & operator= (const Attribute &src)
    Assignment operator.

Accessors

- AtkAttribute * atk_attribute () const
    Get a pointer to the AtkAttribute structure.
- TextAttribute attr () const
    Returns the TextAttribute enumerated type corresponding to the attibute name, or TEXT_ATTR_INVALID if no matching text attribute is found.
- String name () const
    Returns the name of the attribute.
- String value () const
    Returns the string representation of the attribute value.

Methods

- void set (const String &name, const String &value)
    Sets the name and value for the attribute.

## Detailed Description

A AtkAttribute C++ wrapper class.

Attribute is a string name/value pair representing a text attribute.

## Constructor & Destructor Documentation

Inti::Atk::Attribute::Attribute | ( | TextAttribute | attr,
|  | int | index
| ) |

  | Construct an new attribute from a TextAttribute and a value index. Parameters:
  attr | The TextAttribute whose name will be used.
  index | The index of the string value required.
This is a convenience constructor that calls text_attribute_get_name() and text_attribute_get_value() for you. The index is the index of the required value for those values which are strings.

Inti::Atk::Attribute::Attribute | ( | TextAttribute | attr,
|  | const String & | value
| ) |

  | Construct an new attribute from a TextAttribute and a value string. Parameters:
  attr | The TextAttribute whose name will be used.
  value | A string representation of the value.
This is a convenience constructor that calls text_attribute_get_name() for you. Call text_attribute_get_value() for those values which are strings. For values which are numbers, the string representation of the number should be in value.

Inti::Atk::Attribute::Attribute | ( | const String & | name,
|  | const String & | value
| ) |

  | Construct an new attribute from an attribute name and a value string. Parameters:
  name | The attribute name (call text_attribute_get_name()).
  value | The value of the attribute, represented as a string.
Call text_attribute_get_value() for those values which are strings. For values which are numbers, the string representation of the number should be in value.

Inti::Atk::Attribute::Attribute | ( | const AtkAttribute & | attrib | ) |

  | Construct an new attribute from an existing AtkAttribute. Parameters:
  attrib | An AtkAttribute.

Inti::Atk::Attribute::Attribute | ( | const Attribute & | src | ) |

  | Copy constructor. Parameters:
  src | The source attribute.

## Member Function Documentation

Attribute& Inti::Atk::Attribute::operator= | ( | const Attribute & | src | ) |

  | Assignment operator. Parameters:
  src | The source attribute.

void Inti::Atk::Attribute::set | ( | const String & | name,
|  | const String & | value
| ) |

  | Sets the name and value for the attribute. Parameters:
  name | The attribute name (call text_attribute_get_name()).
  value | The value of the attribute, represented as a string.
Call text_attribute_get_value() for those values which are strings. For values which are numbers, the string representation of the number should be in value.

The documentation for this class was generated from the following file:

- text.h

Main Page - Footer