blob: 63a1657f2baf094147211916ed4da198941b75c2 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*****************************************************************************
Copyright (C) 1994-2000 University of Maryland
Copyright (C) 2008 University of Southern California
Copyright (C) 2009 University of Utah
All Rights Reserved.
Purpose:
omega holder for string implementation.
Notes:
History:
04/17/96 - Lei Zhou - created
*****************************************************************************/
#include <code_gen/CG_stringRepr.h>
#include <stdio.h>
namespace omega {
CG_stringRepr::CG_stringRepr() {
}
CG_stringRepr::CG_stringRepr(const std::string& _s) : s(_s) {
}
CG_stringRepr::~CG_stringRepr() {
}
CG_outputRepr* CG_stringRepr::clone() {
return new CG_stringRepr(s);
}
//-----------------------------------------------------------------------------
// basic operation
//-----------------------------------------------------------------------------
std::string CG_stringRepr::GetString() const {
return s;
}
//-----------------------------------------------------------------------------
// Dump operations
//-----------------------------------------------------------------------------
void CG_stringRepr::Dump() const {
printf("%s\n", s.c_str());
}
void CG_stringRepr::DumpToFile(FILE *fp) const {
fprintf(fp,"%s", s.c_str());
}
} // namespace
|