Veda/TextLocalized.h

00001 #ifndef COM_M4NKIND_TextLocalized_H
00002 #define COM_M4NKIND_TextLocalized_H
00003 #include "BaseObject.h"
00004 #include "PackString_MultipleLines.h"
00005 #include "PackULong_Enums.h"
00006 #include "PackList.h"
00007 /*!
00008     \class  TextLocalized
00009     \ingroup BaseObjectInheritedDocGroup BaseObjectInherited_Veda
00010     \brief  Define a text and possibly other localized versions.
00011 */
00012 
00013 class TextLocalized : public BaseObject
00014 {
00015 /*==================================================================
00016                                 PUBLIC
00017 ==================================================================*/
00018 public:
00019     /*!
00020         \brief  Constructor. There should only be members initialisation there.
00021     */
00022     TextLocalized(void);
00023 
00024     /*!
00025         \brief  Class Inheritance Descriptors. Also forces a destructor. See BASEOBJECT_DECLARE_... in .cpp
00026     */
00027     BASEOBJECT_DEFINE_CLASS(TextLocalized);
00028     /*!
00029         \brief  return number of characters, including space, tabs and returns.
00030     */
00031     unsigned int    GetLength();
00032 
00033     /*!
00034         \brief  return a caracter of the text, as a string.
00035     */
00036     const char  *GetChar(unsigned int _index);
00037 
00038 
00039 /*==================================================================
00040                                 PROTECTED
00041 ==================================================================*/
00042 protected:
00043     /*!
00044         \brief  Method that really build the object using the serializable parameters.
00045                 Close() should close everything opened by CreateInternal().
00046     */
00047     virtual bool CreateInternal(void);
00048     /*
00049         \class  LocalText
00050         \brief nested class.
00051     */
00052     class LocalText : public PackStruct
00053     { public:
00054         //! constructor
00055         LocalText();
00056         //! target language. Use VirtualMachine::eMachineLocalization
00057         PackULong_Enums mSer_LocalizationEnum;
00058         //! Base default text.
00059         PackString_MultipleLines        mSer_BaseText;
00060 
00061     };
00062     /*!
00063         \brief  static method passed to the list to create new elements.
00064         \return a new  object.
00065     */
00066     static BaseType *NewLocalText();
00067 
00068     //! list of all localized version.
00069     PackList    mSer_TextList;
00070     //! buffer...
00071     char    m_charbuffer[8];
00072 
00073     /*!
00074         \brief  Synchronize Text To Machine Language
00075     */
00076     void    SynchronizeTextToMachineLanguage();
00077     //! the text corresponding to the last langage checked:
00078     PackString_MultipleLines    *m_pCurrentText;
00079     //! ...for this langage enum:
00080     int     m_TextLanguageEnum;
00081 
00082 };
00083 
00084 #endif

      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/