COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coPort.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_PORT_H_
9 #define _CO_PORT_H_
10 
11 // 20.09.99
12 
13 #include <covise/covise.h>
14 #include "coUifElem.h"
15 
21 namespace covise
22 {
23 
24 class APIEXPORT coPort : public coUifElem
25 {
26 
27 protected:
28  // Type information: whether this is a INPORT,OUTPORT, SWITCH, PARAM
29  typedef int Typeinfo;
30 
31  // Port name, description
32  char *d_name, *d_desc;
33 
34  // The 'default' string
35  char *d_defString;
36 
37  // whether this port has been initialized
38  int d_init;
39 
40 public:
41  coPort(const char *name, const char *desc);
42 
44  virtual ~coPort();
45 
47  virtual void initialize() = 0;
48 
50  virtual void print(ostream &str) const = 0;
51 
53  virtual const char *getName() const;
54 
56  virtual const char *getDesc() const;
57 
59  virtual Kind kind() const = 0;
60 
62  int isConnected() const;
63 
65  void setInfo(const char *value) const;
66 };
67 
68 inline ostream &operator<<(ostream &str, const coPort &port)
69 {
70  port.print(str);
71  return str;
72 }
73 }
74 #endif
char * d_defString
Definition: coPort.h:35
GLuint const GLchar * name
Definition: khronos-glext.h:6722
int d_init
Definition: coPort.h:38
Definition: coUifElem.h:20
#define APIEXPORT
Definition: coExport.h:251
int Typeinfo
Definition: coPort.h:29
Definition: coPort.h:24
virtual void print(ostream &str) const =0
print *this to a stream
Kind
enum Kind: SWITCH, PARAM, INPORT, OUTPORT
Definition: coUifElem.h:25
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
char * d_name
Definition: coPort.h:32
QTextStream & operator<<(QTextStream &out, const coConfigEntryStringList list)
Definition: coConfigEntryString.cpp:166