| 196 | |
| 197 | |
| 198 | bool INI2Pb::Parse(google::protobuf::Message *message, int idx) { |
| 199 | if (!func_) return false; |
| 200 | |
| 201 | const google::protobuf::Descriptor *descriptor(message->GetDescriptor()); |
| 202 | |
| 203 | std::string section_name(descriptor->name()); |
| 204 | if (0 <= idx) { |
| 205 | ostringstream oss; |
| 206 | oss << idx; |
| 207 | section_name += oss.str(); |
| 208 | } |
| 209 | |
| 210 | return ParseMessage(message, section_name); |
| 211 | } |
| 212 | |
| 213 | |
| 214 | } // namespace comm |