| 129 | } |
| 130 | |
| 131 | std::string DisplayDescriptor::getHumanReadableDescription() const { |
| 132 | std::ostringstream os; |
| 133 | bool needSpace = false; |
| 134 | if (!m_vendor.empty()) { |
| 135 | os << m_vendor; |
| 136 | needSpace = true; |
| 137 | } |
| 138 | |
| 139 | if (!m_model.empty()) { |
| 140 | if (needSpace) { |
| 141 | os << " "; |
| 142 | } |
| 143 | os << m_model; |
| 144 | needSpace = true; |
| 145 | } |
| 146 | |
| 147 | if (!m_version.empty()) { |
| 148 | if (needSpace) { |
| 149 | os << " "; |
| 150 | } |
| 151 | os << "(Version " << m_version << ")"; |
| 152 | needSpace = true; |
| 153 | } |
| 154 | |
| 155 | if (!m_note.empty()) { |
| 156 | if (needSpace) { |
| 157 | os << " "; |
| 158 | } |
| 159 | os << "[Display descriptor note: " << m_note << "]"; |
| 160 | } |
| 161 | return os.str(); |
| 162 | } |
| 163 | |
| 164 | void |
| 165 | DisplayDescriptor::m_processResolution(Json::Value const &resolution) { |