libFAUDES

Sections

Index

mtc_colorset.cpp

Go to the documentation of this file.
00001 /** @file mtc_colorset.cpp
00002 
00003 Implements color sets for multitasking automata
00004 
00005 */
00006 
00007 /* FAU Discrete Event Systems Library (libfaudes)
00008 
00009    Copyright (C) 2008  Matthias Singer
00010    Exclusive copyright is granted to Klaus Schmidt
00011 
00012    This library is free software; you can redistribute it and/or
00013    modify it under the terms of the GNU Lesser General Public
00014    License as published by the Free Software Foundation; either
00015    version 2.1 of the License, or (at your option) any later version.
00016 
00017    This library is distributed in the hope that it will be useful,
00018    but WITHOUT ANY WARRANTY; without even the implied warranty of
00019    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020    Lesser General Public License for more details.
00021 
00022    You should have received a copy of the GNU Lesser General Public
00023    License along with this library; if not, write to the Free Software
00024    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00025 
00026 
00027 #include "mtc_colorset.h"
00028 
00029 
00030 
00031 namespace faudes {
00032 
00033 
00034 // std faudes type (cannot do New() with macro)
00035 FAUDES_TYPE_IMPLEMENTATION_COPY(ColorSet,NameSet)
00036 FAUDES_TYPE_IMPLEMENTATION_CAST(ColorSet,NameSet)
00037 FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ColorSet,NameSet)
00038 FAUDES_TYPE_IMPLEMENTATION_EQUAL(ColorSet,NameSet)
00039 
00040 
00041 // msColorSymbolTable (static)
00042 SymbolTable ColorSet::msSymbolTable;
00043 
00044 // DoAssign()
00045 ColorSet& ColorSet::DoAssign(const ColorSet& rSourceSet) {
00046   // call base
00047   NameSet::DoAssign(rSourceSet);
00048   // done
00049   return *this;
00050 }
00051 
00052 // Colorset::New()
00053 ColorSet* ColorSet::New(void) const {
00054   ColorSet* res = new ColorSet();
00055   res->mpSymbolTable=mpSymbolTable;
00056   return res;
00057 }
00058 
00059 
00060 // StaticSymbolTablep()
00061 SymbolTable* ColorSet::StaticSymbolTablep(void) {
00062   return &msSymbolTable;
00063 }
00064 
00065 // ColorSymbolTablep()
00066 void ColorSet::ColorSymbolTablep(SymbolTable *pSymTab) {
00067   mpSymbolTable = pSymTab;
00068 }
00069 
00070 // operators
00071 ColorSet ColorSet::operator * (const ColorSet& rOtherSet) const {
00072   FD_DC("ColorSet(" << this << ")::operator * (" << &rOtherSet << ")");
00073   ColorSet res;
00074   res.Assign( NameSet::operator * (rOtherSet) );
00075   return res;
00076 }
00077 
00078 // operator +
00079 ColorSet ColorSet::operator + (const ColorSet& rOtherSet) const {
00080   FD_DC("ColorSet(" << this << ")::operator + (" << &rOtherSet << ")");
00081   ColorSet res;
00082   res.Assign( NameSet::operator + (rOtherSet) );
00083   return res;
00084 }
00085 
00086 // operator -
00087 ColorSet ColorSet::operator - (const ColorSet& rOtherSet) const {
00088   FD_DC("ColorSet(" << this << ")::operator - (" << &rOtherSet << ")");
00089   ColorSet res;
00090   res.Assign( NameSet::operator - (rOtherSet) );
00091   return res;
00092 }
00093 
00094 // operator <=
00095 bool ColorSet::operator <= (const ColorSet& rOtherSet) const {
00096   return NameSet::operator <= (rOtherSet);
00097 }
00098 
00099 // operator >=
00100 bool ColorSet::operator >= (const ColorSet& rOtherSet) const {
00101   return NameSet::operator >= (rOtherSet);
00102 }
00103 
00104 } // namespace faudes

libFAUDES 2.16b --- 2010-9-8 --- c++ source docu by doxygen 1.6.3