cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsFunctionBase.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-2014 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 _mtsFunctionBase_h
27 #define _mtsFunctionBase_h
28 
32 
33 // Always include last
35 
37 
39 
40 private:
41  mtsFunctionBase(void); // default constructor should not be used.
42 
43 protected:
45  mtsFunctionBase(const bool isProxy);
46 
48  virtual ~mtsFunctionBase();
49 
52 
56 
60  bool IsProxy;
61 
62 public:
64  virtual bool Detach(void) = 0;
65 
67  virtual bool IsValid(void) const = 0;
68 
70  virtual void ToStream(std::ostream & outputStream) const = 0;
71 
73  virtual void InitCompletionCommand(const std::string &name);
74 
76  void SetThreadSignal(osaThreadSignal * threadSignal);
77 
79  void ThreadSignalWait(void) const;
80 
82  mtsExecutionResult WaitForResult(mtsGenericObject &arg) const;
83 
85  mtsExecutionResult WaitForResult(void) const;
86 
87 };
88 
89 
91 inline std::ostream & operator << (std::ostream & output,
92  const mtsFunctionBase & function) {
93  function.ToStream(output);
94  return output;
95 }
96 
97 
98 #endif // _mtsFunctionBase_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
std::ostream & operator<<(std::ostream &output, const mtsFunctionBase &function)
Definition: mtsFunctionBase.h:91
bool IsProxy
Definition: mtsFunctionBase.h:60
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
Definition: mtsFunctionBase.h:38
Definition: mtsEventReceiver.h:180
Forward declarations and #define for cisstMultiTask.
osaThreadSignal * ThreadSignal
Definition: mtsFunctionBase.h:51
Definition: mtsExecutionResult.h:34
Rules of exporting.
Definition: osaThreadSignal.h:40
mtsEventReceiverWrite * CompletionCommand
Definition: mtsFunctionBase.h:55
Forward declarations and #define for cisstOSAbstraction.