// ****************************************************************************************************
// File: ./Exception.cpp
// Authors: R. Escassut
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
//
// This file is part of Hurricane.
//
// Hurricane is free software: you can redistribute it  and/or  modify it under the  terms  of the  GNU
// Lesser General Public License as published by the Free Software Foundation, either version 3 of  the
// License, or (at your option) any later version.
//
// Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A  PARTICULAR  PURPOSE. See  the  Lesser  GNU
// General Public License for more details.
//
// You should have received a copy of the Lesser GNU General Public License along  with  Hurricane.  If
// not, see <http://www.gnu.org/licenses/>.
// ****************************************************************************************************

#include "hurricane/Exception.h"


namespace {

  using namespace Hurricane;


  TextTranslator  getDefaultTextTranslator ()
  {
    TextTranslator translator;

    translator.addTranslation ( "<br>"     , "\n" );
    translator.addTranslation ( "<em>"     , ""   );
    translator.addTranslation ( "</em>"    , ""   );
    translator.addTranslation ( "<strong>" , ""   );
    translator.addTranslation ( "</strong>", ""   );
    translator.addTranslation ( "<tt>"     , ""   );
    translator.addTranslation ( "</tt>"    , ""   );
    translator.addTranslation ( "<b>"      , ""   );
    translator.addTranslation ( "</b>"     , ""   );
    translator.addTranslation ( "<i>"      , ""   );
    translator.addTranslation ( "</i>"     , ""   );
    translator.addTranslation ( "<big>"    , ""   );
    translator.addTranslation ( "</big>"   , ""   );
    translator.addTranslation ( "<small>"  , ""   );
    translator.addTranslation ( "</small>" , ""   );
    translator.addTranslation ( "&lt;"     , "<"  );
    translator.addTranslation ( "&gt;"     , ">"  );

    return translator;
  }


} // End of anonymous namespace.



namespace Hurricane {



// ****************************************************************************************************
// Exception implementation
// ****************************************************************************************************

TextTranslator  Exception::_textTranslator = getDefaultTextTranslator();
TextTranslator  Exception::_htmlTranslator;


Exception::Exception()
// *******************
{
}

Exception::~Exception()
// ********************
{
}



// ****************************************************************************************************
// Generic functions
// ****************************************************************************************************



} // End of Hurricane namespace.


// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
// ****************************************************************************************************
