1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include <ls-std/io/section-pair/SectionPairRow.hpp>
- ls::std::io::SectionPairRow::SectionPairRow(const ::std::string &_key) : ls::std::core::Class("SectionPairRow")
- {
-
- this->key = _key;
- }
- ls::std::io::SectionPairRow::~SectionPairRow() = default;
- ::std::string ls::std::io::SectionPairRow::getValue()
- {
- return this->values.empty() ? "" : this->values.front();
- }
- bool ls::std::io::SectionPairRow::isKeyValue()
- {
- return this->type == ls::std::io::SectionPairRowEnumType::SECTION_PAIR_ROW_KEY_VALUE;
- }
- bool ls::std::io::SectionPairRow::isList()
- {
- return this->type == ls::std::io::SectionPairRowEnumType::SECTION_PAIR_ROW_LIST;
- }
- void ls::std::io::SectionPairRow::setValue(const ::std::string &_value)
- {
-
- if (!this->values.empty())
- {
- this->values.pop_front();
- }
- this->values.push_back(_value);
- }
|