mtc_colorset.cpp
Go to the documentation of this file.
1 /** @file mtc_colorset.cpp
2 
3 Implements color sets for multitasking automata
4 
5 */
6 
7 /* FAU Discrete Event Systems Library (libfaudes)
8 
9  Copyright (C) 2008 Matthias Singer
10  Exclusive copyright is granted to Klaus Schmidt
11 
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Lesser General Public
14  License as published by the Free Software Foundation; either
15  version 2.1 of the License, or (at your option) any later version.
16 
17  This library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  Lesser General Public License for more details.
21 
22  You should have received a copy of the GNU Lesser General Public
23  License along with this library; if not, write to the Free Software
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
25 
26 
27 #include "mtc_colorset.h"
28 
29 
30 
31 namespace faudes {
32 
33 
34 // std faudes type (cannot do New() with macro)
35 FAUDES_TYPE_IMPLEMENTATION_COPY(ColorSet,ColorSet,NameSet)
36 FAUDES_TYPE_IMPLEMENTATION_CAST(ColorSet,ColorSet,NameSet)
37 FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ColorSet,ColorSet,NameSet)
38 FAUDES_TYPE_IMPLEMENTATION_EQUAL(ColorSet,ColorSet,NameSet)
39 
40 
41 // msColorSymbolTable (static)
42 SymbolTable ColorSet::msSymbolTable;
43 
44 // DoAssign()
45 void ColorSet::DoAssign(const ColorSet& rSourceSet) {
46  // call base
47  NameSet::DoAssign(rSourceSet);
48 }
49 
50 // Colorset::New()
51 ColorSet* ColorSet::New(void) const {
52  ColorSet* res = new ColorSet();
54  return res;
55 }
56 
57 
58 // StaticSymbolTablep()
60  return &msSymbolTable;
61 }
62 
63 // ColorSymbolTablep()
65  mpSymbolTable = pSymTab;
66 }
67 
68 // operators
69 ColorSet ColorSet::operator * (const ColorSet& rOtherSet) const {
70  FD_DC("ColorSet(" << this << ")::operator * (" << &rOtherSet << ")");
71  ColorSet res;
72  res.Assign( NameSet::operator * (rOtherSet) );
73  return res;
74 }
75 
76 // operator +
77 ColorSet ColorSet::operator + (const ColorSet& rOtherSet) const {
78  FD_DC("ColorSet(" << this << ")::operator + (" << &rOtherSet << ")");
79  ColorSet res;
80  res.Assign( NameSet::operator + (rOtherSet) );
81  return res;
82 }
83 
84 // operator -
85 ColorSet ColorSet::operator - (const ColorSet& rOtherSet) const {
86  FD_DC("ColorSet(" << this << ")::operator - (" << &rOtherSet << ")");
87  ColorSet res;
88  res.Assign( NameSet::operator - (rOtherSet) );
89  return res;
90 }
91 
92 // operator <=
93 bool ColorSet::operator <= (const ColorSet& rOtherSet) const {
94  return NameSet::operator <= (rOtherSet);
95 }
96 
97 // operator >=
98 bool ColorSet::operator >= (const ColorSet& rOtherSet) const {
99  return NameSet::operator >= (rOtherSet);
100 }
101 
102 } // namespace faudes

libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen