FAUST compiler  0.9.9.6b8
doc_metadatas.cpp
Go to the documentation of this file.
00001 /************************************************************************
00002  ************************************************************************
00003  FAUST compiler
00004  Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
00005  ---------------------------------------------------------------------
00006  This program is free software; you can redistribute it and/or modify
00007  it under the terms of the GNU General Public License as published by
00008  the Free Software Foundation; either version 2 of the License, or
00009  (at your option) any later version.
00010  
00011  This program is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  GNU General Public License for more details.
00015  
00016  You should have received a copy of the GNU General Public License
00017  along with this program; if not, write to the Free Software
00018  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  ************************************************************************
00020  ************************************************************************/
00021 
00022 
00023 #include <iostream>
00024 #include <string>
00025 #include <set>
00026 #include <map>
00027 #include <cstdlib>
00028 
00029 #include "doc_metadatas.hh"
00030 #include "doc.hh"
00031 
00032 
00033 extern SourceReader     gReader;
00034 
00035 map<string, string>     gDocMetadatasStringMap;
00036 set<string>             gDocMetadatasKeySet;
00037 
00038 static void             initDocMetadatasKeySet();
00039 
00040 
00041 
00042 
00043 /*****************************************************************************
00044                         Public functions
00045  *****************************************************************************/
00046 
00047 
00051 void initDocMetadatas() 
00052 {
00053     initDocMetadatasKeySet();
00054 }
00055 
00056 
00057 
00058 /*****************************************************************************
00059                             Static functions
00060  *****************************************************************************/
00061 
00062 
00066 static void initDocMetadatasKeySet() {
00067     
00068     gDocMetadatasKeySet.insert("name");
00069     gDocMetadatasKeySet.insert("author");
00070     gDocMetadatasKeySet.insert("copyright");
00071     gDocMetadatasKeySet.insert("license");
00072     gDocMetadatasKeySet.insert("version");
00073 }
00074 
00075 
00077 // * Simple trace function.
00078 // */
00079 //static void printDocMetadatasStringMapContent() {
00080 //  bool trace = false;
00081 //  if(trace) {
00082 //      cout << "gDocMetadatasStringMap.size() = " << gDocMetadatasStringMap.size() << endl;
00083 //      map<string,string>::iterator it;
00084 //      int i = 1;
00085 //      for(it = gDocMetadatasStringMap.begin(); it!=gDocMetadatasStringMap.end(); ++it)
00086 //          cout << i++ << ".\tgDocNoticeStringMap[" << it->first << "] \t= '" << it->second << "'" << endl;
00087 //  }
00088 //}
00089