summaryrefslogtreecommitdiff
path: root/omega/code_gen/src/CG_stringRepr.cc
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
committerDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
commit8d73c8fcc75556c1df71dd39dd99783f8f86fc3e (patch)
tree157d627863d76a4c256a27cae27ce2e8566c7ea0 /omega/code_gen/src/CG_stringRepr.cc
parente87b55ad69f0ac6211daae741b32c8ee9dcbe470 (diff)
parent8c646f24570079eac53e58fcf42d0d4fbc437ee3 (diff)
downloadchill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.gz
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.bz2
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.zip
Merge pull request #2 from dhuth/master
Moved omega into chill.
Diffstat (limited to 'omega/code_gen/src/CG_stringRepr.cc')
-rw-r--r--omega/code_gen/src/CG_stringRepr.cc54
1 files changed, 54 insertions, 0 deletions
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 <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