| 1 | // |
|---|---|
| 2 | // RowFormatter.cpp |
| 3 | // |
| 4 | // Library: Data |
| 5 | // Package: DataCore |
| 6 | // Module: RowFormatter |
| 7 | // |
| 8 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
| 9 | // and Contributors. |
| 10 | // |
| 11 | // SPDX-License-Identifier: BSL-1.0 |
| 12 | // |
| 13 | |
| 14 | |
| 15 | #include "Poco/Data/RowFormatter.h" |
| 16 | #include "Poco/Exception.h" |
| 17 | #include <iomanip> |
| 18 | |
| 19 | |
| 20 | namespace Poco { |
| 21 | namespace Data { |
| 22 | |
| 23 | |
| 24 | RowFormatter::RowFormatter(const std::string& rPrefix, |
| 25 | const std::string& rPostfix, |
| 26 | Mode mode): |
| 27 | _prefix(rPrefix), |
| 28 | _postfix(rPostfix), |
| 29 | _mode(mode), |
| 30 | _totalRowCount(0) |
| 31 | { |
| 32 | } |
| 33 | |
| 34 | |
| 35 | RowFormatter::~RowFormatter() |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | |
| 40 | std::string& RowFormatter::formatNames(const NameVecPtr pNames, std::string& formattedNames) |
| 41 | { |
| 42 | formattedNames.clear(); |
| 43 | return formattedNames; |
| 44 | } |
| 45 | |
| 46 | |
| 47 | void RowFormatter::formatNames(const NameVecPtr pNames) |
| 48 | { |
| 49 | return; |
| 50 | } |
| 51 | |
| 52 | |
| 53 | std::string& RowFormatter::formatValues(const ValueVec& vals, std::string& formattedValues) |
| 54 | { |
| 55 | formattedValues.clear(); |
| 56 | return formattedValues; |
| 57 | } |
| 58 | |
| 59 | |
| 60 | void RowFormatter::formatValues(const ValueVec& vals) |
| 61 | { |
| 62 | return; |
| 63 | } |
| 64 | |
| 65 | |
| 66 | const std::string& RowFormatter::toString() |
| 67 | { |
| 68 | throw NotImplementedException("RowFormatter::toString()"); |
| 69 | } |
| 70 | |
| 71 | |
| 72 | void RowFormatter::reset() |
| 73 | { |
| 74 | _prefix = ""; |
| 75 | _postfix = ""; |
| 76 | _totalRowCount = INVALID_ROW_COUNT; |
| 77 | } |
| 78 | |
| 79 | |
| 80 | } } // namespace Poco::Data |
| 81 |