COVISE Core
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
21namespace covise
22{
23
25{
26
27protected:
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
36
37 // whether this port has been initialized
38 int d_init;
39
40public:
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
68inline ostream &operator<<(ostream &str, const coPort &port)
69{
70 port.print(str);
71 return str;
72}
73}
74#endif
#define APIEXPORT
Definition: coExport.h:275
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
GLuint const GLchar * name
Definition: khronos-glext.h:6722
list of all chemical elements
Definition: coConfig.h:27
QTextStream & operator<<(QTextStream &out, const coConfigEntryStringList list)
Definition: coConfigEntryString.cpp:159
Definition: coPort.h:25
char * d_defString
Definition: coPort.h:35
virtual void print(ostream &str) const =0
print *this to a stream
int d_init
Definition: coPort.h:38
char * d_desc
Definition: coPort.h:32
virtual Kind kind() const =0
return my type of element: coUifElem::{INPORT,OUTPORT,SWITCH,PARAM}
int Typeinfo
Definition: coPort.h:29
virtual void initialize()=0
give all necessary info to Covise -> automatically called !
Definition: coUifElem.h:21
Kind
enum Kind: SWITCH, PARAM, INPORT, OUTPORT
Definition: coUifElem.h:26