]> git.tdb.fi Git - netvis.git/blob - source/port.h
Add a registered flag to Port
[netvis.git] / source / port.h
1 /* $Id$
2
3 This file is part of NetVis
4 Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed unter the GPL
6 */
7
8 #ifndef PORT_H_
9 #define PORT_H_
10
11 #include <string>
12 #include <msp/gl/color.h>
13 #include <msp/gl/mesh.h>
14
15 class NetVis;
16
17 class Port
18 {
19 private:
20         NetVis &netvis;
21         unsigned number;
22         bool registered;
23         std::string name;
24         Msp::GL::Color color;
25         Msp::GL::Mesh mesh;
26
27 public:
28         Port(NetVis &, unsigned);
29
30         unsigned get_number() const { return number; }
31         bool is_registered() const { return registered; }
32         const std::string &get_name() const { return name; }
33         const Msp::GL::Color &get_color() const { return color; }
34
35         void render() const;
36 };
37
38 #endif