cisst-saw
Loading...
Searching...
No Matches
mtsCommandRead.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): Ankur Kapoor, Peter Kazanzides, Anton Deguet
7 Created on: 2004-04-30
8
9 (C) Copyright 2004-2014 Johns Hopkins University (JHU), All Rights Reserved.
10
11--- begin cisst license - do not edit ---
12
13This software is provided "as is" under an open source license, with
14no warranty. The complete license can be found in license.txt and
15http://www.cisst.org/cisst/license.txt.
16
17--- end cisst license ---
18*/
19
20
25
26#ifndef _mtsCommandRead_h
27#define _mtsCommandRead_h
28
29
32
33// Always include last
35
42class CISST_EXPORT mtsCommandRead: public mtsCommandBase {
43public:
45 typedef mtsCommandBase BaseType;
46
48 typedef mtsCommandRead ThisType;
49
52
53private:
55 inline mtsCommandRead(const ThisType & CMN_UNUSED(other));
56
57protected:
59
61
62public:
65
66 mtsCommandRead(const std::string & name);
67
68
75 const std::string & name,
76 const mtsGenericObject * argumentPrototype);
77
80
86
90 mtsCommandWriteBase * CMN_UNUSED(finishedEventHandler))
91 { return Execute(argument); }
92
99
100 virtual const mtsGenericObject * GetArgumentPrototype(void) const;
101 // GetResultPrototype is same as GetArgumentPrototype, but provided for
102 // consistency with mtsCommandVoidReturn
103 virtual const mtsGenericObject * GetResultPrototype(void) const;
104
105 /* documented in base class */
106 size_t NumberOfArguments(void) const;
107
108 /* documented in base class */
109 bool Returns(void) const;
110
111 /* documented in base class */
112 void ToStream(std::ostream & outputStream) const;
113};
114
115
116#endif // _mtsCommandRead_h
117
Definition mtsCallableReadBase.h:40
virtual const mtsGenericObject * GetResultPrototype(void) const
mtsCommandRead(const std::string &name)
void ToStream(std::ostream &outputStream) const
mtsCommandBase BaseType
Definition mtsCommandRead.h:45
mtsCallableReadBase CallableType
Definition mtsCommandRead.h:51
mtsCallableReadBase * GetCallable(void) const
mtsCallableReadBase * Callable
Definition mtsCommandRead.h:58
mtsCommandRead(void)
const mtsGenericObject * ArgumentPrototype
Definition mtsCommandRead.h:60
virtual mtsExecutionResult Execute(mtsGenericObject &argument)
mtsCommandRead(mtsCallableReadBase *callable, const std::string &name, const mtsGenericObject *argumentPrototype)
virtual const mtsGenericObject * GetArgumentPrototype(void) const
bool Returns(void) const
size_t NumberOfArguments(void) const
virtual mtsExecutionResult Execute(mtsGenericObject &argument, mtsCommandWriteBase *CMN_UNUSED(finishedEventHandler))
Definition mtsCommandRead.h:89
mtsCommandRead ThisType
Definition mtsCommandRead.h:48
Definition mtsCommandWriteBase.h:40
Definition mtsExecutionResult.h:34
Base class for data object in cisstMultiTask.
Definition mtsGenericObject.h:52
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
Defines a base class for a command.
Rules of exporting.