Reference Manual

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

# Inti::Atk::StateSet Class Reference

An AtkStateSet C++ wrapper class. More...

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

Inheritance diagram for Inti::Atk::StateSet:

List of all members.

## Public Member Functions

Constructors

- StateSet ()
    Construct a new empty state set.
- virtual ~StateSet ()
    Destructor.

Accessors

- AtkStateSet * atk_state_set () const
    Get a pointer to the AtkStateSet structure.
- AtkStateSetClass * atk_state_set_class () const
    Get a pointer to the AtkStateSetClass structure.
- operator AtkStateSet * () const
    Conversion operator; safely converts a StateSet to an AtkStateSet pointer.
- bool is_empty () const
    Checks whether the state set is empty (that is, has no states set).
- bool contains_state (StateType type) const
    Checks whether the state for the specified type is in the specified set.
- bool contains_states (const std::vector< StateType > &types) const
    Checks whether the states specified in types are in the specified set.

Methods

- bool add_state (StateType type)
    Add a new state for the specified type to the current state set, if not already present.
- void add_states (const std::vector< StateType > &types)
    Add the states specified in types to the current state set.
- void clear_states ()
    Removes all states from the state set.
- bool remove_state (StateType type)
    Removes the state for the specified type from the state set.
- Pointer< StateSet > and_sets (StateSet &compare_set)
    Constructs the intersection of the states in this set and compare_set.
- Pointer< StateSet > or_sets (StateSet &compare_set)
    Constructs the union of the states in this set and compare_set.
- Pointer< StateSet > xor_sets (StateSet &compare_set)
    Constructs the exclusive-or of the states in this set and compare_set.

## Protected Member Functions

Constructors

- StateSet (AtkStateSet *set, bool reference=true)
    Construct a new StateSet from an existing AtkStateSet.

## Detailed Description

An AtkStateSet C++ wrapper class.

A StateSet determines a component's state set. It is composed of a set of states.

## Constructor & Destructor Documentation

Inti::Atk::StateSet::StateSet | ( | AtkStateSet * | set,
|  | bool | reference = true
| ) | `[explicit, protected]`

Construct a new StateSet from an existing AtkStateSet.

Parameters:

  set | A pointer to a AtkStateSet.
  reference | Set false if the initial reference count is floating, set true if it's not.

The set can be a newly created AtkStateSet or an existing AtkStateSet. (see G::Object::Object).

## Member Function Documentation

bool Inti::Atk::StateSet::add_state | ( | StateType | type | ) |

Add a new state for the specified type to the current state set, if not already present.

Parameters:

  type | A StateType.

Returns:
  true if the state for type is not already in set.

void Inti::Atk::StateSet::add_states | ( | const std::vector< StateType > & | types | ) |

Add the states specified in types to the current state set.

Parameters:

  types | A vector of StateType.

Pointer<StateSet> Inti::Atk::StateSet::and_sets | ( | StateSet & | compare_set | ) |

Constructs the intersection of the states in this set and compare_set.

Parameters:

  compare_set | Another StateSet.

Returns:
  A new StateSet which is the intersection of the two sets, or null if the intersection is empty.

bool Inti::Atk::StateSet::contains_state | ( | StateType | type | ) | const

Checks whether the state for the specified type is in the specified set.

Parameters:

  type | A StateType.

Returns:
  trueif type is the state type is in set.

bool Inti::Atk::StateSet::contains_states | ( | const std::vector< StateType > & | types | ) | const

Checks whether the states specified in types are in the specified set.

Parameters:

  types | A vector of StateType

Returns:
  true if all the states in types are in set.

bool Inti::Atk::StateSet::is_empty | ( |  | ) | const

Checks whether the state set is empty (that is, has no states set).

Returns:
  true if set has no states set, otherwise false.

Pointer<StateSet> Inti::Atk::StateSet::or_sets | ( | StateSet & | compare_set | ) |

Constructs the union of the states in this set and compare_set.

Parameters:

  compare_set | Another StateSet.

Returns:
  A new StateSet which is the union of the two sets.

bool Inti::Atk::StateSet::remove_state | ( | StateType | type | ) |

Removes the state for the specified type from the state set.

Parameters:

  type | A StateType

Returns:
  true if type was in the state set and was removed.

Pointer<StateSet> Inti::Atk::StateSet::xor_sets | ( | StateSet & | compare_set | ) |

Constructs the exclusive-or of the states in this set and compare_set.

Parameters:

  compare_set | Another StateSet.

Returns:
  A new StateSet which contains the states which are in exactly one of the two sets, or null if the exclusive-or is empty.

The set returned by this operation contains the states in exactly one of the two sets.

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

- stateset.h

Main Page - Footer