[DONE] Storing & inheriting locale-specific information.

Igor Gomon giv at tlc.kherson.ua
Wed Apr 7 18:52:53 CDT 2004


> >   I_Database* CreateDatabase(
> >                           EStorageType inStorage = kStorage_Disk,
> >                           const char* inEncoding = NULL,
> >                           const char* inLocale = NULL,
> >                           const char* inSortOrder = NULL );
> >   Accordingly Database' class constructor also updated.
>
> What is SortOrder?
Sort order is a specific set of rules which can affect end result of sorting.
There are some predefined SortOrders. In ICU it is called 'collator options',
for example "UCA4.0.0_AS_LSV_S" - this means:

UCA (Unicode collation algorithm) version 4.0.0; ignore spaces, punctuation and
symbols; use Swedish linguistic conventions;
compare case-insensitively.

I have not yet fully understand how can we use this but I am sure that ICU
supports this.


> > 2)  Added two new global functions:
>
> As I understand, I must make sure they work on MAC, yes?
Yes. But for now they are very simple.

>
> >       /** Returns system-level default locale. All new databases inherits
this
> >              locale if the user not specified different on database
creation.
> > */
> > const Locale& GetDefaultLocale( void );
> >
> >       /** Returns system-level default encoding. All new databases inherits
> >           this value if the user not specified different on database
creation.
> > */
> > const String& GetDefaultEncoding( void );
>
> > It is used when NULL parameters passed to the Database constructor.
> > These functions may determine default locale & encoding differently.
> > For example, they may get these values from the configuration file, etc.
>
> You mean that C++ developer can change them in own application?
I haven't think about this.

> Where they are located?
> Public zone?
FBL/publ/Headers/FBL_Globals.h

> > 5) New I_Localizable interface added.
> >   (And its default implementation Localizable_Imp).
>
> >   This interface provides functionality of localizable object.
>
> >   Currently 3 classes implements this interface:
> >       Database (indirectly - through Localizable_Imp)
> >       Table (indirectly - through Localizable_Imp)
> >       VString (indirectly - through Localizable_Imp)
> >       (... maybe later some else)
>
> Of course! also must be VarChar and VText
>
> > So, the summary on new files:
> >   FBL/prot/Interfaces/FBL_I_Localizable.h
>
> ok
>
> >   FBL/prot/Structure/Database/FBL_Localizable_Imp.h
>
> Hmm, Not agree.
> This is not database only class.
> Must go to some other place.
I simply don't know where to put it..

-- 
Best regards,
Igor Gomon
-------------------------------------------------------------
e-mail: giv at tlc.kherson.ua
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina




More information about the Valentina-beta mailing list