* String class for test purposes only. */
| 61 | * String class for test purposes only. |
| 62 | */ |
| 63 | class String |
| 64 | { |
| 65 | public: |
| 66 | |
| 67 | /** |
| 68 | * Constructs a string. |
| 69 | */ |
| 70 | String() : |
| 71 | m_stdStr() |
| 72 | { |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Destroys a string. |
| 77 | */ |
| 78 | ~String() |
| 79 | { |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Constructs a string by copying another. |
| 84 | * |
| 85 | * @param[in] other String to copy |
| 86 | */ |
| 87 | String(const String& other) : |
| 88 | m_stdStr(other.m_stdStr) |
| 89 | { |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Constructs a string by copying another. |
| 94 | * |
| 95 | * @param[in] other String to copy |
| 96 | */ |
| 97 | String(const char* other) : |
| 98 | m_stdStr((nullptr == other) ? "" : other) |
| 99 | { |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Constructs a string by copying another. |
| 104 | * |
| 105 | * @param[in] other String to copy |
| 106 | */ |
| 107 | String(const std::string& other) : |
| 108 | m_stdStr(other) |
| 109 | { |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Constructs a string by copying a single character. |
| 114 | * |
| 115 | * @param[in] c Single character |
| 116 | */ |
| 117 | String(char c) : |
| 118 | m_stdStr(1, c) |
| 119 | { |
| 120 | } |
no outgoing calls
no test coverage detected