PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
plask::Mesh::Event Struct Reference

Store information about event connected with mesh. More...

`#include <plask/mesh/mesh.hpp>`

Inheritance diagram for plask::Mesh::Event:
[legend]
Collaboration diagram for plask::Mesh::Event:
[legend]

## Public Types
enum | Flags { EVENT_DELETE = 1 , EVENT_RESIZE = 1<<1 , EVENT_USER_DEFINED = 1<<2 }
| Event flags (which describe event properties). More...
Public Types inherited from plask::EventWithSourceAndFlags< Mesh >
typedef unsigned char | FlagsType

## Public Member Functions
bool | hasFlag (Flags flag) const
| Check if given `flag` is set.
bool | isDelete () const
| Check if EVENT_DELETE flag is set, which mean that source of event is being deleted.
bool | isResize () const
| Check if EVENT_RESIZE flag is set, which mean that source of event could have been resized.
| Event (Mesh *source, unsigned char flags=0)
| Construct the event.
Public Member Functions inherited from plask::EventWithSourceAndFlags< Mesh >
const Mesh * | source () const
| Get source of event.
Mesh * | source ()
| Get source of event.
const T * | source () const
| Get source of event casted (using dynamic_cast) to given type T.
T * | source ()
| Get source of event casted (using dynamic_cast) to given type T.
FlagsType | flags () const
| Get event's flags.
FlagsType | flagsWithout (FlagsType flagsToRemove) const
| Get event's flags with excluded `flagsToRemove`.
bool | hasAllFlags (FlagsType flags) const
| Check if given all of `flags` are set.
bool | hasAnyFlag (FlagsType flags) const
| Check if one of given `flags` are set.
| EventWithSourceAndFlags (Mesh *source, FlagsType flags=0)
| Construct event.
virtual | ~EventWithSourceAndFlags ()
| Virtual destructor for eventual subclassing.

## Detailed Description

Store information about event connected with mesh.

Subclasses of this can contains additional information about specific type of event.

Definition at line 141 of file mesh.hpp.

## Member Enumeration Documentation

## ◆ Flags

enum plask::Mesh::Event::Flags

Event flags (which describe event properties).

Enumerator
EVENT_DELETE | is deleted
EVENT_RESIZE | size could be changed (points added or deleted)
EVENT_USER_DEFINED | user-defined flags could have ids: EVENT_USER_DEFINED, EVENT_USER_DEFINED<<1, EVENT_USER_DEFINED<<2, ...

Definition at line 144 of file mesh.hpp.

## Constructor & Destructor Documentation

## ◆ Event()

plask::Mesh::Event::Event | ( | Mesh * | source,
|  | unsigned char | flags = `0`
| ) |  |
| inline explicit

Construct the event.

Parameters

  source | source of event
  flags | flags which describes event's properties

Definition at line 174 of file mesh.hpp.

## Member Function Documentation

## ◆ hasFlag()

bool plask::Mesh::Event::hasFlag | ( | Flags | flag | ) | const
| inline

Check if given `flag` is set.

Parameters

  flag | flag to check

Returns
  `true` only if `flag` is set

Definition at line 155 of file mesh.hpp.

## ◆ isDelete()

bool plask::Mesh::Event::isDelete | ( |  | ) | const
| inline

Check if EVENT_DELETE flag is set, which mean that source of event is being deleted.

Returns
  `true` only if EVENT_DELETE flag is set

Definition at line 161 of file mesh.hpp.

## ◆ isResize()

bool plask::Mesh::Event::isResize | ( |  | ) | const
| inline

Check if EVENT_RESIZE flag is set, which mean that source of event could have been resized.

Returns
  `true` only if EVENT_RESIZE flag is set

Definition at line 167 of file mesh.hpp.

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

- plask/mesh/mesh.hpp