Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Hydra Core Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::LocaleSnapshot

Group:  General


rwsf::LocaleSnapshotrwsf::Locale

Local Index

Members

Header File

#include <rwsf/core/LocaleSnapshot.h>

Description

The class rwsf::LocaleSnapshot implements the rwsf::Locale interface using Standard C Library facilities. To use it, the program creates an rwsf::LocaleSnapshot instance. The constructor of the instance queries the program's environment (using Standard C Library functions such as localeconv(), strftime(), and, if available, vendor specific library functions) to determine the formatting conventions in effect at the moment of instantiation. When done, the locale can then be switched and another instance of rwsf::LocaleSnapshot created.

By creating multiple instances of rwsf::LocaleSnapshot, your program can have more than one locale active at the same time, something that is difficult to do with the Standard C Library facilities.

Note: rwsf::LocaleSnapshot does not encapsulate character set, collation, or message information.

Class rwsf::LocaleSnapshot contains a set of public data members initialized by its constructor with information extracted from its execution environment.

For a description of the static members of the rwsf::Locale interface that operate on objects of type rwsf::LocaleSnapshot, see the rwsf::Locale class description.

Public Constructor

LocaleSnapshot(const char* localeName = 0);

Public Member Functions

virtual std::string
asString(long) const;
virtual std::string
asString(unsigned long) const;
virtual std::string
asString(double f, int precision = 6,
         bool showpoint = 0) const;
std::string
asString(const struct tm* tmbuf, const char *format,
    const rwsf::TimeZone& r = rwsf::TimeZone::local())
    const;
virtual std::string 
asString(const struct tm* tmbuf, char format, const rwsf::TimeZone& = rwsf::TimeZone::local())
const; virtual std::string
moneyAsString(double, CurrSymbol=LOCAL) const; virtual std::string
moneyAsString(double, Locale::CurrSymbol=LOCAL) const; virtual int
monthIndex(const std::string&) const; virtual bool stringToDate (const std::string&, struct tm*) const; virtual bool stringToMoney(const std::string&, double*, Locale::CurrSymbol=LOCAL) const; virtual bool stringToNum (const std::string&, double*) const; virtual bool stringToNum (const std::string&, long*) const; virtual bool stringToNum (const std::string&, unsigned long*) const; stringToTime (const std::string&, struct tm*) const; virtual int weekdayIndex(const std::string&) const;
virtual const std::string& 
currency_symbol() const;
virtual const std::string& 
decimal_point() const;
virtual const std::string& 
grouping() const;
virtual const std::string& 
int_curr_symbol() const;
virtual const std::string& 
locale_name() const;
virtual const std::string& 
mon_decimal_point() const;
virtual const std::string& 
mon_thousands_sep() const;
virtual const std::string& 
mon_grouping() const;
virtual const std::string&
positive_sign() const;
virtual const std::string&
negative_sign() const;
virtual const std::string& 
thousands_sep() const;

Public Data Members

std::string     decimal_point_;
std::string     thousands_sep_;
std::string     grouping_;
std::string     int_curr_symbol_;
std::string     currency_symbol_;
std::string     mon_decimal_point_;
std::string     mon_thousands_sep_;
std::string     mon_grouping_;
std::string     positive_sign_;
std::string     negative_sign_;
char            int_frac_digits_;
char            frac_digits_;
char            p_cs_precedes_;
char            p_sep_by_space_;
char            n_cs_precedes_;
char            n_sep_by_space_;
char            p_sign_posn_;
char            n_sign_posn_;


Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.