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,ColorSet,NameSet)
00036 FAUDES_TYPE_IMPLEMENTATION_CAST(ColorSet,ColorSet,NameSet)
00037 FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ColorSet,ColorSet,NameSet)
00038 FAUDES_TYPE_IMPLEMENTATION_EQUAL(ColorSet,ColorSet,NameSet)
00039 
00040 
00041 // msColorSymbolTable (static)
00042 SymbolTable ColorSet::msSymbolTable;
00043 
00044 // DoAssign()
00045 void ColorSet::DoAssign(const ColorSet& rSourceSet) {
00046   // call base
00047   NameSet::DoAssign(rSourceSet);
00048 }
00049 
00050 // Colorset::New()
00051 ColorSet* ColorSet::New(void) const {
00052   ColorSet* res = new ColorSet();
00053   res->mpSymbolTable=mpSymbolTable;
00054   return res;
00055 }
00056 
00057 
00058 // StaticSymbolTablep()
00059 SymbolTable* ColorSet::StaticSymbolTablep(void) {
00060   return &msSymbolTable;
00061 }
00062 
00063 // ColorSymbolTablep()
00064 void ColorSet::ColorSymbolTablep(SymbolTable *pSymTab) {
00065   mpSymbolTable = pSymTab;
00066 }
00067 
00068 // operators
00069 ColorSet ColorSet::operator * (const ColorSet& rOtherSet) const {
00070   FD_DC("ColorSet(" << this << ")::operator * (" << &rOtherSet << ")");
00071   ColorSet res;
00072   res.Assign( NameSet::operator * (rOtherSet) );
00073   return res;
00074 }
00075 
00076 // operator +
00077 ColorSet ColorSet::operator + (const ColorSet& rOtherSet) const {
00078   FD_DC("ColorSet(" << this << ")::operator + (" << &rOtherSet << ")");
00079   ColorSet res;
00080   res.Assign( NameSet::operator + (rOtherSet) );
00081   return res;
00082 }
00083 
00084 // operator -
00085 ColorSet ColorSet::operator - (const ColorSet& rOtherSet) const {
00086   FD_DC("ColorSet(" << this << ")::operator - (" << &rOtherSet << ")");
00087   ColorSet res;
00088   res.Assign( NameSet::operator - (rOtherSet) );
00089   return res;
00090 }
00091 
00092 // operator <=
00093 bool ColorSet::operator <= (const ColorSet& rOtherSet) const {
00094   return NameSet::operator <= (rOtherSet);
00095 }
00096 
00097 // operator >=
00098 bool ColorSet::operator >= (const ColorSet& rOtherSet) const {
00099   return NameSet::operator >= (rOtherSet);
00100 }
00101 
00102 } // namespace faudes

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen