diff --git a/srcs/HttpRequest/BaseKeyValueMap.cpp b/srcs/HttpRequest/BaseKeyValueMap.cpp index e2ff60c0..f625915d 100644 --- a/srcs/HttpRequest/BaseKeyValueMap.cpp +++ b/srcs/HttpRequest/BaseKeyValueMap.cpp @@ -1,5 +1,15 @@ #include "../includes/BaseKeyValueMap.hpp" +BaseKeyValueMap::BaseKeyValueMap() +{ + //Nothing to do +} + +BaseKeyValueMap::BaseKeyValueMap(const BaseKeyValueMap &other) +{ + //Nothing to do +} + BaseKeyValueMap::~BaseKeyValueMap() { //Nothing to do diff --git a/srcs/HttpRequest/HttpRequest.cpp b/srcs/HttpRequest/HttpRequest.cpp index 6a625db1..ebf5c24f 100644 --- a/srcs/HttpRequest/HttpRequest.cpp +++ b/srcs/HttpRequest/HttpRequest.cpp @@ -15,7 +15,7 @@ HttpRequest::HttpRequest(const std::string &all_request_text) key = this->obtain_request_key(line); value = this->obtain_request_value(line); if (this->check_keyword_exist(key) == true) - this->_key_value_map = (this->*inputvalue_functionmap[key])(key, line); + this->request_keyvalue_map = (this->*inputvalue_functionmap[key])(key, line); } } diff --git a/srcs/HttpRequest/TwoValueSet.cpp b/srcs/HttpRequest/TwoValueSet.cpp index cd992b17..109925df 100644 --- a/srcs/HttpRequest/TwoValueSet.cpp +++ b/srcs/HttpRequest/TwoValueSet.cpp @@ -1,5 +1,10 @@ #include "../includes/TwoValueSet.hpp" +TwoValueSet::TwoValueSet() +{ + // Nothing to do +} + TwoValueSet::TwoValueSet(std::string const &first_value) { this->_firstvalue = first_value; @@ -11,6 +16,16 @@ TwoValueSet::TwoValueSet(const std::string &first_value, const std::string &seco this->_secondValue = second_value; } +TwoValueSet& TwoValueSet::operator=(const TwoValueSet &other) +{ + if (this == &other) + return (*this); + this->_firstvalue = other.get_firstvalue(); + this->_secondValue = other.get_secondvalue(); + + return (*this); +} + TwoValueSet::~TwoValueSet() { diff --git a/srcs/HttpRequest/ValueArraySet.cpp b/srcs/HttpRequest/ValueArraySet.cpp index 50095e94..a958503c 100644 --- a/srcs/HttpRequest/ValueArraySet.cpp +++ b/srcs/HttpRequest/ValueArraySet.cpp @@ -1,13 +1,31 @@ #include "../includes/ValueArraySet.hpp" +ValueArraySet::ValueArraySet() +{ + +} + +ValueArraySet::ValueArraySet(const ValueArraySet &other) +{ + this->_value_array = other.get_value_array(); +} + ValueArraySet::ValueArraySet(const std::vector &value_array) { this->_value_array = value_array; } -ValueArraySet::~ValueArraySet() +ValueArraySet& ValueArraySet::operator=(const ValueArraySet &other) { + if (this == &other) + return (*this); + this->_value_array = other.get_value_array(); + return (*this); +} +ValueArraySet::~ValueArraySet() +{ + //Nothing To Do } std::vector ValueArraySet::get_value_array(void) const diff --git a/srcs/HttpRequest/ValueDateSet.cpp b/srcs/HttpRequest/ValueDateSet.cpp index fabdbf50..da5e4b94 100644 --- a/srcs/HttpRequest/ValueDateSet.cpp +++ b/srcs/HttpRequest/ValueDateSet.cpp @@ -1,5 +1,23 @@ #include "../includes/ValueDateSet.hpp" +ValueDateSet::ValueDateSet() +{ + +} + +ValueDateSet& ValueDateSet::operator=(const ValueDateSet &other) +{ + if (this == &other) + return (*this); + this->_day_name = other->get_valuedateset_day_name(); + this->_day = other->get_valuedateset_day(); + this->_month = other->get_valuedateset_month(); + this->_year = other->get_valuedateset_year(); + this->_hour = other->get_valuedateset_hour(); + this->_minute = other->get_valuedateset_minute(); + this->_second = other->get_valuedateset_second(); +} + ValueDateSet::ValueDateSet(const std::string &date_format) { std::vector value_array; diff --git a/srcs/HttpRequest/ValueInsertMethod.cpp b/srcs/HttpRequest/ValueInsertMethod.cpp deleted file mode 100644 index d356e120..00000000 --- a/srcs/HttpRequest/ValueInsertMethod.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "../includes/ValueInsertMethod.hpp" - -ValueWeightArraySet ValueInsertMethod::ready_accept(const std::string &value) -{ - ValueWeightArraySet accept; - std::stringstream ss(value); - std::string line; - - while(std::getline(ss, line, ',')) - { - if (line.find(';') != std::string::npos) - accept.append_valueweight_set(HandlingString::skipping_emptyword(line)); - else - accept.append_valueweight_set(HandlingString::skipping_emptyword(line), 1.0); - } - return (accept); -} \ No newline at end of file diff --git a/srcs/HttpRequest/ValueMap.cpp b/srcs/HttpRequest/ValueMap.cpp index 7ccd14e4..552de2ce 100644 --- a/srcs/HttpRequest/ValueMap.cpp +++ b/srcs/HttpRequest/ValueMap.cpp @@ -5,6 +5,19 @@ ValueMap::ValueMap() } +ValueMap::ValueMap(const ValueMap &other) +{ + this->_value_map = other.get_value_map(); +} + +ValueMap& ValueMap::operator=(const ValueMap &other) +{ + if (this == &other) + return (*this); + this->_value_map = other.get_value_map(); + return (*this); +} + ValueMap::~ValueMap() { diff --git a/srcs/HttpRequest/ValueSet.cpp b/srcs/HttpRequest/ValueSet.cpp index 8cd1723a..1d4c0dbf 100644 --- a/srcs/HttpRequest/ValueSet.cpp +++ b/srcs/HttpRequest/ValueSet.cpp @@ -1,5 +1,23 @@ #include "../includes/ValueSet.hpp" +ValueSet::ValueSet() +{ + +} + +ValueSet::ValueSet(const ValueSet &other) +{ + this->_value = other.get_value_set(); +} + +ValueSet& ValueSet::operator=(const ValueSet &other) +{ + if (this == &other) + return (*this); + this->_value = other.get_value_set(); + return (*this); +} + ValueSet::ValueSet(const std::string &value) { this->_value = value;