Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXTranslator.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                       M e s s a g e   T r a n s l a t o r                     *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005,2009 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 *********************************************************************************
00021 * $Id: FXTranslator.h,v 1.13 2009/01/06 13:07:28 fox Exp $                      *
00022 ********************************************************************************/
00023 #ifndef FXTRANSLATOR_H
00024 #define FXTRANSLATOR_H
00025 
00026 #ifndef FXOBJECT_H
00027 #include "FXObject.h"
00028 #endif
00029 
00030 
00031 ////////////////////////////  UNDER DEVELOPMENT  ////////////////////////////////
00032 
00033 
00034 namespace FX {
00035 
00036 
00037 /**
00038 * The translator class translates a message to another language.
00039 */
00040 class FXAPI FXTranslator : public FXObject {
00041   FXDECLARE(FXTranslator)
00042 private:
00043   FXTranslator(const FXTranslator&);
00044   FXTranslator &operator=(const FXTranslator&);
00045 public:
00046 
00047   /// Construct translator
00048   FXTranslator();
00049 
00050   /// Translate a string
00051   virtual const FXchar* tr(const FXchar* context,const FXchar* message,const FXchar* hint=NULL,FXint count=-1) const;
00052 
00053   /// Save translator to a stream
00054   virtual void save(FXStream& store) const;
00055 
00056   /// Load translator from a stream
00057   virtual void load(FXStream& store);
00058 
00059   /// Destructor
00060   virtual ~FXTranslator();
00061   };
00062 
00063 
00064 }
00065 
00066 #endif

Copyright © 1997-2009 Jeroen van der Zijp