COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coUifPort.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef _CO_UIF_PORT_H_
9 #define _CO_UIF_PORT_H_
10 
12 // (C)2001 VirCinity
13 //
14 // Base class for input and (not yet output) ports of a module
15 //
16 //
17 //
18 // Sven Kufer
19 // VirCinity IT-Consulting GmbH
20 // Nobelstrasse 15
21 // 70569 Stuttgart
22 // Date: 13.08.2001
23 //
25 
26 #include <covise/covise.h>
27 #include "coPort.h"
28 
29 namespace covise
30 {
31 
32 class APIEXPORT coUifPort : public coPort
33 {
34 private:
35  // whether port is connected
37 
38 public:
39  // default (de)constructors
40 
42  {
43  }
44 
45 private:
46  coUifPort(const coUifPort &);
47 
48 public:
49  coUifPort(const char *name, const char *desc)
50  : coPort(name, desc)
51  {
52  d_connected = 0;
53  }
54 
56  {
57  return d_connected;
58  }
59 
60  // called by paramCB
61  virtual int paramChange()
62  {
63  if (d_connected == 0)
64  d_connected = 1;
65  else
66  d_connected = 0;
67  return 1;
68  }
69 };
70 }
71 #endif
coUifPort(const char *name, const char *desc)
Definition: coUifPort.h:49
GLuint const GLchar * name
Definition: khronos-glext.h:6722
#define APIEXPORT
Definition: coExport.h:263
virtual int paramChange()
handle parameter changes: called by paramCB
Definition: coUifPort.h:61
Definition: coUifPort.h:32
Definition: coPort.h:24
int d_connected
Definition: coUifPort.h:36
~coUifPort()
Definition: coUifPort.h:41
int isConnected()
Definition: coUifPort.h:55