/LispString.cpp
https://bitbucket.org/hardtack/resoup · C++ · 34 lines · 24 code · 2 blank · 8 comment · 0 complexity · b56d538c6d5e4838a9f2c8753947c33c MD5 · raw file
- /*
- * LispString.cpp
- * Resoup
- *
- * Created by ??? on 10. 8. 18..
- * Copyright 2010 Unplug. All rights reserved.
- *
- */
- #include "LispString.h"
- #include <string.h>
- #include "Functions.h"
- using namespace Functions;
- LispString::LispString(const char* value){
- this->value = new char[strlen(value) + 1];
- strcpy(this->value, value);
- }
- LispString::LispString(const LispString &original):LispObject(original){
- this->value = new char[strlen(original.value) + 1];
- strcpy(this->value, original.value);
- }
- LispString::~LispString(){
- delete[] value;
- }
- int LispString::getClassIdentifier(){
- return LISPSTRING;
- }
- LispObject* LispString::copy(){
- return new LispString(*this);
- }
- char* LispString::getString(){
- return stringcpy(value);
- }