diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-18 15:45:13 +0000 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-18 15:45:13 +0000 |
commit | 2fce43d484e4148ae858f410d51dcd9951d34374 (patch) | |
tree | 80c204799cd38349b3bb209d4d37962b11aa6222 /omegalib/codegen/include/code_gen/CG_stringRepr.h | |
parent | f433eae7a1408cca20f3b72fb4c136d9b62de3b8 (diff) | |
download | chill-2fce43d484e4148ae858f410d51dcd9951d34374.tar.gz chill-2fce43d484e4148ae858f410d51dcd9951d34374.tar.bz2 chill-2fce43d484e4148ae858f410d51dcd9951d34374.zip |
remove include & rename
Diffstat (limited to 'omegalib/codegen/include/code_gen/CG_stringRepr.h')
-rw-r--r-- | omegalib/codegen/include/code_gen/CG_stringRepr.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/omegalib/codegen/include/code_gen/CG_stringRepr.h b/omegalib/codegen/include/code_gen/CG_stringRepr.h new file mode 100644 index 0000000..a6df85d --- /dev/null +++ b/omegalib/codegen/include/code_gen/CG_stringRepr.h @@ -0,0 +1,43 @@ +/***************************************************************************** + Copyright (C) 1994-2000 the Omega Project Team + Copyright (C) 2005-2011 Chun Chen + All Rights Reserved. + + Purpose: + pseudo string code wrapper + + Notes: + + History: + 04/17/96 - Lei Zhou - created +*****************************************************************************/ + +#ifndef _CG_STRINGREPR_H +#define _CG_STRINGREPR_H + +#include <code_gen/CG_outputRepr.h> +#include <string> +#include <iostream> + +namespace omega { + +class CG_stringRepr: public CG_outputRepr { +private: + std::string s_; + +public: + CG_stringRepr() {} + CG_stringRepr(const std::string &s) { s_ = s; } + ~CG_stringRepr() {} + CG_outputRepr *clone() const { return new CG_stringRepr(s_); } + void dump() const { std::cout << s_ << std::endl; } + + //--------------------------------------------------------------------------- + // basic operation + //--------------------------------------------------------------------------- + std::string GetString() const { return s_; } +}; + +} + +#endif |