~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/convert.h

  • Committer: Brian Aker
  • Date: 2010-04-05 23:46:43 UTC
  • Revision ID: brian@gaz-20100405234643-0he3xnj902rc70r8
Fixing tests to work with PBXT.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLE_SERVER_UTIL_CONVERT
22
 
#define DRIZZLE_SERVER_UTIL_CONVERT
 
21
#ifndef DRIZZLED_UTIL_CONVERT_H
 
22
#define DRIZZLED_UTIL_CONVERT_H
23
23
 
24
24
#include <string>
25
25
#include <iostream>
26
26
#include <sstream>
27
 
#include <stdint.h>
 
27
 
 
28
namespace drizzled
 
29
{
28
30
 
29
31
template <class T>
30
32
std::string to_string(T t)
42
44
  return str;
43
45
}
44
46
 
45
 
extern "C"
46
 
{
47
 
  uint64_t drizzled_string_to_hex(char *to, const char *from,
48
 
                                  uint64_t from_size);
49
 
}
50
 
 
51
 
#endif
 
47
void bytesToHexdumpFormat(std::string &s, const unsigned char *from, size_t from_length);
 
48
 
 
49
uint64_t drizzled_string_to_hex(char *to, const char *from,
 
50
                                uint64_t from_size);
 
51
void drizzled_hex_to_string(char *to, const char *from, uint64_t from_size);
 
52
 
 
53
} /* namespace drizzled */
 
54
 
 
55
#endif /* DRIZZLED_UTIL_CONVERT_H */