MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KeyHandlerRegistry.hpp File Reference

Contains declaration of the abstract KeyHandlerRegistry class responsible for handling the keypressed callbacks. More...

#include <map>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <application/ApplicationState.hpp>
#include <logger/Log.hpp>
Include dependency graph for KeyHandlerRegistry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mic::application::KeyHandlerRegistry
 Abstract class responsible for handling the keypressed callbacks. Implements several basic callbacks and offers several mechnisms for callback management. More...
 

Namespaces

 mic
 Main Machine Intelligence Core namespace.
 
 mic::application
 Contains base application-related classes, types and types.
 

Macros

#define MAKE_KEYHANDLER(KEY, DESCRIPTION, METHOD)   std::make_pair((char)(KEY), std::make_pair( (DESCRIPTION), (METHOD) ) )
 Macro returning keyhandler (key-description-handler triplet). More...
 
#define REGISTER_KEY_HANDLER(KEY, DESCRIPTION, METHOD)   key_handler_map.insert(std::make_pair((char)(KEY), std::make_pair( (DESCRIPTION), boost::bind(METHOD, this ) ) ) )
 Macro for registration of key-description-handler triplets in KeyHandlers. More...
 

Typedefs

typedef std::pair< std::string,
boost::function< void()> > 
mic::application::Handler
 Basic handler type representing <description, handler function> pair. More...
 
typedef std::pair< char, Handler > mic::application::KeyHandler
 Basic handler type representing <key, description, handler function> triplet. More...
 
typedef std::map< char, Handler > mic::application::KeyHandlerMap
 Basic type storing <key, description, handler function> triplets. More...
 

Detailed Description

Contains declaration of the abstract KeyHandlerRegistry class responsible for handling the keypressed callbacks.

Copyright (C) tkornuta, IBM Corporation 2015-2019

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author
tkornuta
Date
Nov 20, 2015

Definition in file KeyHandlerRegistry.hpp.

Macro Definition Documentation

#define MAKE_KEYHANDLER (   KEY,
  DESCRIPTION,
  METHOD 
)    std::make_pair((char)(KEY), std::make_pair( (DESCRIPTION), (METHOD) ) )

Macro returning keyhandler (key-description-handler triplet).

Author
tkornuta

Definition at line 63 of file KeyHandlerRegistry.hpp.

#define REGISTER_KEY_HANDLER (   KEY,
  DESCRIPTION,
  METHOD 
)    key_handler_map.insert(std::make_pair((char)(KEY), std::make_pair( (DESCRIPTION), boost::bind(METHOD, this ) ) ) )

Macro for registration of key-description-handler triplets in KeyHandlers.

Author
tkornuta

Definition at line 76 of file KeyHandlerRegistry.hpp.