Annwvyn::AnnControllerBuffer Class Reference

Internal utility class that store joystick information. RAII the oisJoystick object given to constructor. More...

#include <AnnEvents.hpp>

Collaboration diagram for Annwvyn::AnnControllerBuffer:

Public Member Functions

 AnnControllerBuffer (OIS::JoyStick *joystick)
 
 AnnControllerBuffer (const AnnControllerBuffer &)=delete
 Make class explicitly non construct-copyable. More...
 
AnnControllerBufferoperator= (const AnnControllerBuffer &)=delete
 Make class explicitly non copyable. More...
 
 AnnControllerBuffer (AnnControllerBuffer &&buffer)=default
 Let compiler generate move constructor. More...
 
AnnControllerBufferoperator= (AnnControllerBuffer &&buffer)=default
 Let compiler generate move operator. More...
 
 ~AnnControllerBuffer ()
 Delete the OIS stick at destruction time. More...
 
void capture () const
 

Private Member Functions

unsigned int getID () const
 Get the ID if this stick. More...
 

Private Attributes

OIS::JoyStick * oisJoystick
 Joystick object from OIS. Deleted by constructor. More...
 
std::vector< bytepreviousStickButtonStates
 Array of "bool" for previous buttons. More...
 
unsigned int id
 The ID. More...
 

Static Private Attributes

static unsigned int idcounter = 0
 The counter. More...
 

Friends

class AnnEventManager
 

Detailed Description

Internal utility class that store joystick information. RAII the oisJoystick object given to constructor.

Definition at line 444 of file AnnEvents.hpp.

Constructor & Destructor Documentation

◆ AnnControllerBuffer() [1/3]

AnnControllerBuffer::AnnControllerBuffer ( OIS::JoyStick *  joystick)

Private constructor for AnnEventManager Create a Joystick buffer object, increments a static counter of IDs

Definition at line 484 of file AnnEvents.cpp.

◆ AnnControllerBuffer() [2/3]

Annwvyn::AnnControllerBuffer::AnnControllerBuffer ( const AnnControllerBuffer )
delete

Make class explicitly non construct-copyable.

◆ AnnControllerBuffer() [3/3]

Annwvyn::AnnControllerBuffer::AnnControllerBuffer ( AnnControllerBuffer &&  buffer)
default

Let compiler generate move constructor.

◆ ~AnnControllerBuffer()

AnnControllerBuffer::~AnnControllerBuffer ( )

Delete the OIS stick at destruction time.

Definition at line 490 of file AnnEvents.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ capture()

void AnnControllerBuffer::capture ( ) const

Definition at line 496 of file AnnEvents.cpp.

◆ getID()

unsigned int Annwvyn::AnnControllerBuffer::getID ( ) const
inlineprivate

Get the ID if this stick.

Definition at line 470 of file AnnEvents.hpp.

◆ operator=() [1/2]

AnnControllerBuffer& Annwvyn::AnnControllerBuffer::operator= ( const AnnControllerBuffer )
delete

Make class explicitly non copyable.

◆ operator=() [2/2]

AnnControllerBuffer& Annwvyn::AnnControllerBuffer::operator= ( AnnControllerBuffer &&  buffer)
default

Let compiler generate move operator.

Friends And Related Function Documentation

◆ AnnEventManager

friend class AnnEventManager
friend

Definition at line 447 of file AnnEvents.hpp.

Member Data Documentation

◆ id

unsigned int Annwvyn::AnnControllerBuffer::id
private

The ID.

Definition at line 472 of file AnnEvents.hpp.

◆ idcounter

unsigned int AnnControllerBuffer::idcounter = 0
staticprivate

The counter.

Definition at line 474 of file AnnEvents.hpp.

◆ oisJoystick

OIS::JoyStick* Annwvyn::AnnControllerBuffer::oisJoystick
private

Joystick object from OIS. Deleted by constructor.

Definition at line 466 of file AnnEvents.hpp.

◆ previousStickButtonStates

std::vector<byte> Annwvyn::AnnControllerBuffer::previousStickButtonStates
private

Array of "bool" for previous buttons.

Definition at line 468 of file AnnEvents.hpp.


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