Lsystem.hpp

Go to the documentation of this file.
00001 /*
00002                                                           _
00003                                                         _(_)_       _
00004      _                             _                   (_)@(_)    _(_)_
00005     | |              ___ _   _ ___| |_ ___ _ __ ___      (_)\    (_)@(_)
00006     | |      _____  / __| | | / __| __/ _ \ '_ ` _ \        |     /(_)
00007     | |___  |_____| \__ \ |_| \__ \ ||  __/ | | | | |      \|/   \|/
00008     |_____|         |___/\__, |___/\__\___|_| |_| |_|    \\\|//\\\|///
00009  ________________________ |___/ ________________________________________
00010 |                                                                      |\
00011 |                                                                      |_\
00012 |   File    : Lsystem.hpp                                                 |
00013 |   Created : 03-Dec-2011                                                 |
00014 |   By      : atrilla                                                     |
00015 |                                                                         |
00016 |   L-system - Parallel string rewriting system                           |
00017 |                                                                         |
00018 |   Copyright (c) 2011 Alexandre Trilla                                   |
00019 |                                                                         |
00020 |   -------------------------------------------------------------------   |
00021 |                                                                         |
00022 |   This file is part of L-system.                                        |
00023 |                                                                         |
00024 |   L-system is free software: you can redistribute it and/or modify it   |
00025 |   under the terms of the MIT/X11 License as published by the            |
00026 |   Massachusetts Institute of Technology. See the MIT/X11 License for    |
00027 |   more details.                                                         |
00028 |                                                                         |
00029 |   You should have received a copy of the MIT/X11 License along with     |
00030 |   this source code distribution of L-system (see the COPYING            |
00031 |   file in the root directory). If not, see                              |
00032 |   <http://www.opensource.org/licenses/mit-license>.                     |
00033 |________________________________________________________________________*/
00034 
00035 #ifndef LSYSTEM_HPP
00036 #define LSYSTEM_HPP
00037 
00038 #include <string>
00039 #include <set>
00040 #include <map>
00041 
00042 using namespace std;
00043 
00059 class Lsystem {
00060     public:
00066         Lsystem();
00075         Lsystem(const set<char> &vars, const string start,
00076                 const multimap<char, string> &rules);
00086         string produce(const int numIter) const;
00087     private:
00091         set<char> theVariables;
00095         string theStart;
00099         multimap<char, string> theRules;
00100 };
00101 
00102 #endif
00103