blob: d311b30690c0b5b18fe450fd2bdd6a00b3d676c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* $Id: type.c,v 1.2 2004/12/08 17:13:26 lordjaxom Exp $
*/
#include "xml/type.h"
#include "xml/function.h"
#include <stdio.h>
const std::string &cxType::String(void) {
static char buffer[50];
if (mType == number) {
snprintf(buffer, sizeof(buffer), "%d", mNumber);
mString = buffer;
mType = string;
} else if (mType == boolean) {
mString = mNumber ? cxFunction::True : cxFunction::False;
mType = string;
}
return mString;
}
|