55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
#ifndef _CKEYBOARD_HPP_
|
|
#define _CKEYBOARD_HPP_
|
|
|
|
/*** C++ STL Files ***/
|
|
#include <vector>
|
|
|
|
/*** SDL Header Files ***/
|
|
#include <SDL.h>
|
|
|
|
/*** Custom Header Files ***/
|
|
#include "cKey.hpp"
|
|
|
|
/*** DLL Header File ***/
|
|
#include "dllExport.h"
|
|
|
|
/*** Custom Header Files ***/
|
|
#include "../UtilityEngine/cString.hpp"
|
|
|
|
using UtilityEngine::cString;
|
|
|
|
/*#pragma warning (disable : 4231)*/
|
|
EXPIMP_TEMPLATE template class EXPORT_FROM_MYDLL std::allocator<InputEngine::cKey*>;
|
|
EXPIMP_TEMPLATE template class EXPORT_FROM_MYDLL std::vector<InputEngine::cKey*, std::allocator<InputEngine::cKey*> >;
|
|
/*#pragma warning (default : 4231)*/
|
|
|
|
namespace InputEngine {
|
|
/* Singleton */
|
|
class EXPORT_FROM_MYDLL cKeyboard
|
|
{
|
|
public:
|
|
cKeyboard( const cString& label );
|
|
cKeyboard( const cKeyboard& copy );
|
|
virtual ~cKeyboard();
|
|
|
|
///Funtions
|
|
|
|
//Used when looking for keys that have been add to the check list
|
|
virtual void KeyboardCheck( const SDL_Event& event );
|
|
|
|
void AddKey( InputEngine::cKey* key );
|
|
void DeleteKey( const SDL_Keycode& key );
|
|
|
|
void DeleteAllKeys();
|
|
|
|
///Sets
|
|
///Gets
|
|
const cString& getLabel() const;
|
|
|
|
private:
|
|
cString m_label;// = ""
|
|
|
|
std::vector<InputEngine::cKey*> m_keys;
|
|
};/// END CLASS DEFINITION cKeyboard
|
|
}/// END NAMESPACE DEFINITION InputEngine
|
|
#endif/// END IFNDEF _CKEYBOARD_HPP_ |