From e4b20015a4ee35f1279af4caa983478fa2ff0d4a Mon Sep 17 00:00:00 2001 From: dhuth Date: Mon, 6 Oct 2014 11:56:47 -0600 Subject: Added omega to source --- omega/code_gen/src/CG_stringRepr.cc | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 omega/code_gen/src/CG_stringRepr.cc (limited to 'omega/code_gen/src/CG_stringRepr.cc') diff --git a/omega/code_gen/src/CG_stringRepr.cc b/omega/code_gen/src/CG_stringRepr.cc new file mode 100644 index 0000000..63a1657 --- /dev/null +++ b/omega/code_gen/src/CG_stringRepr.cc @@ -0,0 +1,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 +#include + +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 -- cgit v1.2.3-70-g09d2