~stewart/drizzle/use-catalog-for-path

« back to all changes in this revision

Viewing changes to drizzled/typelib.cc

  • Committer: Brian Aker
  • Date: 2011-03-27 07:03:49 UTC
  • mfrom: (2252.2.3 drizzle-ga)
  • Revision ID: brian@tangent.org-20110327070349-ihqsw1cl19lu8j65
MergeĀ inĀ staging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <drizzled/internal/m_string.h>
23
23
#include <drizzled/charset_info.h>
 
24
#include <drizzled/memory/root.h>
24
25
#include <drizzled/typelib.h>
25
26
 
26
 
namespace drizzled
27
 
{
 
27
namespace drizzled {
28
28
 
29
29
static const char field_separator=',';
30
30
 
31
 
int st_typelib::find_type_or_exit(const char *x, const char *option) const
 
31
int TYPELIB::find_type_or_exit(const char *x, const char *option) const
32
32
{
33
33
  int res= find_type(const_cast<char*>(x), 2);
34
34
  if (res > 0)
70
70
*/
71
71
 
72
72
 
73
 
int st_typelib::find_type(const char *x, uint32_t full_name) const
 
73
int TYPELIB::find_type(const char *x, uint32_t full_name) const
74
74
{
75
75
  assert(full_name & 2);
76
76
  return find_type(const_cast<char*>(x), full_name);
77
77
}
78
78
 
79
 
int st_typelib::find_type(char *x, uint32_t full_name) const
 
79
int TYPELIB::find_type(char *x, uint32_t full_name) const
80
80
{
81
81
  if (!count)
82
82
    return 0;
124
124
        /* Get name of type nr 'nr' */
125
125
        /* Warning first type is 1, 0 = empty field */
126
126
 
127
 
void st_typelib::make_type(char *to, uint32_t nr) const
 
127
void TYPELIB::make_type(char *to, uint32_t nr) const
128
128
{
129
129
  if (!nr)
130
130
    to[0]= 0;
136
136
        /* Get type */
137
137
        /* Warning first type is 0 */
138
138
 
139
 
const char *st_typelib::get_type(uint32_t nr) const
 
139
const char *TYPELIB::get_type(uint32_t nr) const
140
140
{
141
141
  if (nr < count && type_names)
142
142
    return type_names[nr];
159
159
    a integer representation of the supplied string
160
160
*/
161
161
 
162
 
uint64_t st_typelib::find_typeset(const char *x, int *err) const
 
162
uint64_t TYPELIB::find_typeset(const char *x, int *err) const
163
163
{
164
164
  if (!count)
165
165
    return 0;
193
193
    NULL otherwise
194
194
*/
195
195
 
196
 
TYPELIB *st_typelib::copy_typelib(memory::Root *root) const
 
196
TYPELIB *TYPELIB::copy_typelib(memory::Root *root) const
197
197
{
198
198
  TYPELIB *to;
199
199
  uint32_t i;