Ignore:
Timestamp:
Apr 7, 2007, 10:07:26 PM (17 years ago)
Author:
dai_9181
Message:

ログ機構(Smoothie::Logger)を導入。
動的型情報生成において、未使用クラスの登録は行わないようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/include/Smoothie.h

    r88 r91  
    66class Smoothie{
    77public:
     8
     9    class Logger{
     10        static string log;
     11    public:
     12        static void Initialize(){
     13#ifdef _DEBUG
     14            log = "";
     15
     16            ofstream ofs( ( (string)BasicSystemDir + "compile.log" ).c_str(), ios_base::trunc );
     17            ofs.close();
     18#endif
     19        }
     20        static void Put( const string &text ){
     21#ifdef _DEBUG
     22            log += text + "\r\n";
     23
     24            {
     25                ofstream ofs( ( (string)BasicSystemDir + "compile.log" ).c_str(), ios_base::app );
     26                ofs << text << endl;
     27                ofs.close();
     28            }
     29#endif
     30        }
     31    };
    832
    933    class Lexical{
Note: See TracChangeset for help on using the changeset viewer.