Drizzled Public API Documentation

sql_locale.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2008 Sun Microsystems, Inc.
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #pragma once
00021 
00022 #include <drizzled/common_fwd.h>
00023 
00024 namespace drizzled {
00025 
00026 typedef struct my_locale_st
00027 {
00028   uint32_t  number;
00029   const bool is_ascii;
00030   const char *name;
00031   const char *description;
00032   TYPELIB *month_names;
00033   TYPELIB *ab_month_names;
00034   TYPELIB *day_names;
00035   TYPELIB *ab_day_names;
00036   my_locale_st(uint32_t number_par,
00037                const char *name_par, const char *descr_par, bool is_ascii_par,
00038                TYPELIB *month_names_par, TYPELIB *ab_month_names_par,
00039                TYPELIB *day_names_par, TYPELIB *ab_day_names_par) :
00040     number(number_par), is_ascii(is_ascii_par),
00041     name(name_par), description(descr_par),
00042     month_names(month_names_par), ab_month_names(ab_month_names_par),
00043     day_names(day_names_par), ab_day_names(ab_day_names_par)
00044   {}
00045 } MY_LOCALE;
00046 
00047 extern MY_LOCALE my_locale_en_US;
00048 extern MY_LOCALE *my_locales[];
00049 extern MY_LOCALE *my_default_lc_time_names;
00050 
00051 MY_LOCALE *my_locale_by_name(const char *name);
00052 MY_LOCALE *my_locale_by_number(uint32_t number);
00053 
00054 } /* namespace drizzled */
00055