Move Cephelepod into deprecated_compiler, create captian.sh to handle bootstrapping kraken from backup or from Cephelepod
This commit is contained in:
45
deprecated_compiler/src/CCodeTriple.cpp
Normal file
45
deprecated_compiler/src/CCodeTriple.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CCodeTriple.h"
|
||||
|
||||
CCodeTriple::CCodeTriple(std::string pre, std::string val, std::string post) {
|
||||
preValue = pre;
|
||||
value = val;
|
||||
postValue = post;
|
||||
}
|
||||
|
||||
CCodeTriple::CCodeTriple(std::string val) {
|
||||
value = val;
|
||||
}
|
||||
CCodeTriple::CCodeTriple(const char* val) {
|
||||
value = val;
|
||||
}
|
||||
|
||||
CCodeTriple::CCodeTriple() {
|
||||
}
|
||||
|
||||
CCodeTriple::~CCodeTriple() {
|
||||
}
|
||||
|
||||
std::string CCodeTriple::oneString(bool endValue) {
|
||||
return preValue + value + (endValue ? ";" : "") + postValue;
|
||||
}
|
||||
|
||||
CCodeTriple & CCodeTriple::operator=(const CCodeTriple &rhs) {
|
||||
preValue = rhs.preValue;
|
||||
value = rhs.value;
|
||||
postValue = rhs.postValue;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CCodeTriple & CCodeTriple::operator+=(const CCodeTriple &rhs) {
|
||||
preValue += rhs.preValue;
|
||||
//preValue = rhs.preValue + preValue;
|
||||
value += rhs.value;
|
||||
postValue = rhs.postValue + postValue;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CCodeTriple operator+(const CCodeTriple &a, const CCodeTriple &b) {
|
||||
return CCodeTriple(a.preValue + b.preValue, a.value + b.value, b.postValue + a.postValue);
|
||||
//return CCodeTriple(b.preValue + a.preValue, a.value + b.value, b.postValue + a.postValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user