cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
prmEventButton.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, Rajesh Kumar
7  Created on: 2008-04-08
8 
9  (C) Copyright 2008 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 */
20 
21 
28 #ifndef _prmEventButton_h
29 #define _prmEventButton_h
30 
32 
33 // Always include last
35 
38 {
40 
41  public:
43  typedef enum {PRESSED, RELEASED, CLICKED, DOUBLE_CLICKED} EventType;
44 
45  public:
47  inline prmEventButton()
48  {}
49 
51  inline prmEventButton(const EventType & type):
52  TypeMember(type)
53  {}
54 
56  inline prmEventButton(const prmEventButton & other):
57  BaseType(other),
58  TypeMember(other.TypeMember)
59  {}
60 
62  virtual ~prmEventButton();
63 
66  CMN_DECLARE_MEMBER_AND_ACCESSORS(EventType, Type);
68 
69 public:
70 
72  virtual void ToStream(std::ostream & outputStream) const;
73 
75  void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
76  bool headerOnly = false, const std::string & headerPrefix = "") const;
77 
79  void SerializeRaw(std::ostream & outputStream) const;
80 
82  void DeSerializeRaw(std::istream & inputStream);
83 
84 };
85 
86 
88 
89 
90 #endif // _prmEventButton_h
91 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
prmEventButton(const EventType &type)
Definition: prmEventButton.h:51
virtual void SerializeRaw(std::ostream &outputStream) const
virtual void DeSerializeRaw(std::istream &inputStream)
prmEventButton()
Definition: prmEventButton.h:47
virtual void ToStream(std::ostream &outputStream) const
EventType
Definition: prmEventButton.h:43
Base class for high level objects.
Definition: cmnGenericObject.h:51
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
Definition: prmEventButton.h:37
CMN_DECLARE_SERVICES_INSTANTIATION(prmEventButton)
Definition: prmEventButton.h:43
prmEventButton(const prmEventButton &other)
Definition: prmEventButton.h:56
Defines mtsGenericObject.
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
mtsGenericObject BaseType
Definition: prmEventButton.h:42
#define CMN_DECLARE_MEMBER_AND_ACCESSORS(memberType, memberName)
Definition: cmnAccessorMacros.h:70
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76