cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsFunctionVoid.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): Peter Kazanzides, Anton Deguet
7 
8  (C) Copyright 2007-2011 Johns Hopkins University (JHU), All Rights Reserved.
9 
10 --- begin cisst license - do not edit ---
11 
12 This software is provided "as is" under an open source license, with
13 no warranty. The complete license can be found in license.txt and
14 http://www.cisst.org/cisst/license.txt.
15 
16 --- end cisst license ---
17 */
18 
19 
20 
26 #ifndef _mtsFunctionVoid_h
27 #define _mtsFunctionVoid_h
28 
32 
33 // Always include last
35 
37  public:
39  protected:
43 
44  public:
46  mtsFunctionVoid(const bool isProxy = false);
47 
49  ~mtsFunctionVoid();
50 
51  // documented in base class
52  bool Detach(void);
53 
54  // documented in base class
55  bool IsValid(void) const;
56 
62  bool Bind(CommandType * command);
63 
66  mtsExecutionResult operator()(void) const { return Execute(); }
67 
69  mtsExecutionResult Execute(void) const;
70 
72  mtsExecutionResult ExecuteBlocking(void) const;
73 
75  mtsCommandVoid * GetCommand(void) const;
76 
77  // documented in base class
78  void ToStream(std::ostream & outputStream) const;
79 };
80 
81 
82 #endif // _mtsFunctionVoid_h
83 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: mtsCommandVoid.h:44
virtual void ToStream(std::ostream &outputStream) const =0
Definition: mtsFunctionVoid.h:36
Definition: mtsFunctionBase.h:38
Defines a base function object to allow heterogeneous containers of functions.
virtual bool Detach(void)=0
Forward declarations and #define for cisstMultiTask.
CommandType * Command
Definition: mtsFunctionVoid.h:42
Definition: mtsExecutionResult.h:34
Rules of exporting.
mtsExecutionResult operator()(void) const
Definition: mtsFunctionVoid.h:66
mtsCommandVoid CommandType
Definition: mtsFunctionVoid.h:38
virtual bool IsValid(void) const =0
Defines a base class for a command.