libes  0.5.3
an Entity System library for C++
Classes | Typedefs | Enumerations | Functions
es Namespace Reference

Classes

struct  Component
 A component. More...
 
class  ComponentStore
 A type-safe wrapper around a store. More...
 
class  CustomSystem
 A custom system. More...
 
struct  Event
 An event. More...
 
class  GlobalSystem
 A global system. More...
 
class  LocalSystem
 A local system. More...
 
class  Manager
 The manager. More...
 
class  SingleSystem
 A single system. More...
 
class  Store
 A store. More...
 
class  System
 A system. More...
 

Typedefs

typedef Type ComponentType
 A component type. More...
 
typedef unsigned long Entity
 An entity, a game object. More...
 
typedef Type EventType
 An event type. More...
 
typedef std::function
< EventStatus(Entity,
EventType, Event *)> 
EventHandler
 An event handler. More...
 
typedef uint64_t Type
 A type. More...
 

Enumerations

enum  EventStatus {
  EventStatus::KEEP,
  EventStatus::DIE
}
 The status of an event handler at the end. More...
 

Functions

constexpr Type Hash (const char *str, std::size_t sz)
 
Type Hash (const std::string &str)
 

Typedef Documentation

A component type.

A component type is a strictly positive integer that must be unique among all component types.

typedef unsigned long es::Entity

An entity, a game object.

An entity has a very simple representation: a strictly positive integer. Everything else is in components.

typedef std::function<EventStatus(Entity, EventType, Event*)> es::EventHandler

An event handler.

Parameters
originthe entity that triggers the event
typethe event type
eventthe event parameters
Returns
the status of the handler at the end

An event type.

An event type is a strictly positive integer that must be unique among all event types.

typedef uint64_t es::Type

A type.

An type is a generic unsigned int that helps to distinguish several elements of the same class.

Enumeration Type Documentation

enum es::EventStatus
strong

The status of an event handler at the end.

Enumerator
KEEP 

The handler must be kept

DIE 

The handler can be removed

Function Documentation

constexpr Type es::Hash ( const char *  str,
std::size_t  sz 
)
Type es::Hash ( const std::string &  str)
inline