Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress C++ API Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::LocaleSnapshot


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.

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

Note

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

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 Constructors

LocaleSnapshot(const char * localeName = 0);

Public Member Functions

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


Previous fileTop of DocumentContentsIndex pageNext file

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