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 namespace drizzled
00023 {
00024 
00025 typedef struct st_typelib TYPELIB;
00026 
00027 typedef struct my_locale_st
00028 {
00029   uint32_t  number;
00030   const bool is_ascii;
00031   const char *name;
00032   const char *description;
00033   TYPELIB *month_names;
00034   TYPELIB *ab_month_names;
00035   TYPELIB *day_names;
00036   TYPELIB *ab_day_names;
00037   my_locale_st(uint32_t number_par,
00038                const char *name_par, const char *descr_par, bool is_ascii_par,
00039                TYPELIB *month_names_par, TYPELIB *ab_month_names_par,
00040                TYPELIB *day_names_par, TYPELIB *ab_day_names_par) :
00041     number(number_par), is_ascii(is_ascii_par),
00042     name(name_par), description(descr_par),
00043     month_names(month_names_par), ab_month_names(ab_month_names_par),
00044     day_names(day_names_par), ab_day_names(ab_day_names_par)
00045   {}
00046 } MY_LOCALE;
00047 
00048 extern MY_LOCALE my_locale_en_US;
00049 extern MY_LOCALE *my_locales[];
00050 extern MY_LOCALE *my_default_lc_time_names;
00051 
00052 MY_LOCALE *my_locale_by_name(const char *name);
00053 MY_LOCALE *my_locale_by_number(uint32_t number);
00054 
00055 } /* namespace drizzled */
00056