cisst-saw
Loading...
Searching...
No Matches
mtsCallableVoidFunction.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5
6 Author(s): Anton Deguet
7 Created on: 2010-09-26
8
9 (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
10 Reserved.
11
12--- begin cisst license - do not edit ---
13
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://www.cisst.org/cisst/license.txt.
17
18--- end cisst license ---
19*/
20
21#ifndef _mtsCallableVoidFunction_h
22#define _mtsCallableVoidFunction_h
23
28
35class mtsCallableVoidFunction: public mtsCallableVoidBase {
36
37public:
39
41 typedef mtsCallableVoidFunction ThisType;
42
44 typedef void(*ActionType)(void);
45
46private:
48 inline mtsCallableVoidFunction(const ThisType & CMN_UNUSED(other));
49
50protected:
53
54public:
57
63 BaseType(),
64 Action(action)
65 {}
66
69
70 /* documented in base class */
72 (*Action)();
74 }
75
76 /* documented in base class */
77 inline void ToStream(std::ostream & outputStream) const {
78 outputStream << "function based callable object";
79 }
80
81};
82
83
84#endif // _mtsCallableVoidFunction_h
85
mtsCallableVoidBase(void)
Definition mtsCallableVoidBase.h:44
mtsCallableVoidFunction(ActionType action)
Definition mtsCallableVoidFunction.h:62
mtsExecutionResult Execute(void)
Definition mtsCallableVoidFunction.h:71
mtsCallableVoidFunction ThisType
Definition mtsCallableVoidFunction.h:41
ActionType Action
Definition mtsCallableVoidFunction.h:52
virtual ~mtsCallableVoidFunction()
Definition mtsCallableVoidFunction.h:68
mtsCallableVoidFunction()
Definition mtsCallableVoidFunction.h:56
mtsCallableVoidBase BaseType
Definition mtsCallableVoidFunction.h:38
void ToStream(std::ostream &outputStream) const
Definition mtsCallableVoidFunction.h:77
void(*) ActionType(void)
Definition mtsCallableVoidFunction.h:44
Definition mtsExecutionResult.h:34
@ COMMAND_SUCCEEDED
Definition mtsExecutionResult.h:44
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497