cisst-saw
Loading...
Searching...
No Matches
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 Author(s): Anton Deguet, Rajesh Kumar
6 Created on: 2008-04-08
7
8 (C) Copyright 2008-2025 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19
24
25
26#ifndef _prmEventButton_h
27#define _prmEventButton_h
28
30
31// Always include last
33
36{
37 CMN_DECLARE_SERVICES(CMN_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
38
39 public:
41 typedef enum {PRESSED, RELEASED, CLICKED, DOUBLE_CLICKED, UNDEFINED} EventType;
42
43 public:
46 TypeMember(UNDEFINED)
47 {}
48
50 inline prmEventButton(const EventType & type):
51 TypeMember(type)
52 {}
53
55 inline prmEventButton(const prmEventButton & other):
56 BaseType(other),
57 TypeMember(other.TypeMember)
58 {}
59
61 virtual ~prmEventButton();
62
65 {
67 TypeMember = other.TypeMember;
68 return *this;
69 }
70
75
76public:
77
79 void ToStream(std::ostream & outputStream) const override;
80
82 void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
83 bool headerOnly = false, const std::string & headerPrefix = "") const override;
84
86 void SerializeRaw(std::ostream & outputStream) const override;
87
89 void DeSerializeRaw(std::istream & inputStream) override;
90
91};
92
93
95
96
97#endif // _prmEventButton_h
mtsGenericObject(void)
Definition mtsGenericObject.h:77
Definition prmEventButton.h:36
void ToStream(std::ostream &outputStream) const override
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const override
CMN_DECLARE_MEMBER_AND_ACCESSORS(EventType, Type)
void DeSerializeRaw(std::istream &inputStream) override
prmEventButton(const EventType &type)
Definition prmEventButton.h:50
virtual ~prmEventButton()
prmEventButton()
Definition prmEventButton.h:45
void SerializeRaw(std::ostream &outputStream) const override
EventType
Definition prmEventButton.h:41
@ PRESSED
Definition prmEventButton.h:41
@ DOUBLE_CLICKED
Definition prmEventButton.h:41
@ RELEASED
Definition prmEventButton.h:41
@ UNDEFINED
Definition prmEventButton.h:41
@ CLICKED
Definition prmEventButton.h:41
mtsGenericObject BaseType
Definition prmEventButton.h:40
prmEventButton(const prmEventButton &other)
Definition prmEventButton.h:55
ThisType & operator=(const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
Definition vctDynamicNArrayBase.h:401
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:328
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
Defines mtsGenericObject.
ThisType & operator=(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &otherMatrix)
Definition vctDynamicMatrix.h:255