MachineIntelligenceCore:Toolchain
|
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>
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... | |
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.
Definition in file KeyHandlerRegistry.hpp.
#define MAKE_KEYHANDLER | ( | KEY, | |
DESCRIPTION, | |||
METHOD | |||
) | std::make_pair((char)(KEY), std::make_pair( (DESCRIPTION), (METHOD) ) ) |
Macro returning keyhandler (key-description-handler triplet).
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.
Definition at line 76 of file KeyHandlerRegistry.hpp.