blob: 5fa950c3ff6b44b2d9ccc91f363661c270979784 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* $Id: type.c,v 1.2 2005/01/05 19:32:43 lordjaxom Exp $
*/
#include "xml/type.h"
#include "xml/function.h"
#include <vdr/tools.h>
#include <stdio.h>
cxType cxType::False(false);
cxType cxType::True(true);
std::string cxType::String(void) const {
if (mType == number)
return (const char*)itoa(mNumber);
return mString;
#if 0
if (mType == number) {
char *buffer;
asprintf(&buffer, "%d", mNumber);
mString = buffer;
mType = string;
free(buffer);
} else if (mType == boolean) {
mString = mNumber ? cxFunction::True : cxFunction::False;
mType = string;
}
return mString;
#endif
}
|