12 #include <fmt/format.h>
16 constexpr
struct select1st_t {
17 template <
typename S,
typename T>
18 const S& operator()(
const std::pair<S, T>& p )
const {
21 template <
typename S,
typename T>
22 S& operator()( std::pair<S, T>& p )
const {
29 std::vector<std::string> result;
35 auto it = catalog_.find( property->
ClientName() );
36 if ( it == catalog_.end() ) {
42 it->second.erase( *property );
43 it->second.insert( property );
48 auto it = catalog_.find( client );
49 if ( it == catalog_.end() )
return nullptr;
51 auto pit = std::find_if( it->second.begin(), it->second.end(),
52 [&](
const Property& property ) { return name == property.NameInClient(); } );
54 return ( pit != it->second.end() ) ? &*pit :
nullptr;
58 for (
const auto& client : catalog_ ) {
59 for (
const auto& current : client.second ) { result += current.ToString() +
"\n"; }
64 o << R
"(// ==================================================================================
66 // ==================================================================================
69 size_t nComponents = 0;
70 size_t nProperties = 0;
72 for (
const auto& client : catalog_ ) {
73 o <<
fmt::format(
"// Properties of {:<25} # = {}",
fmt::format(
"'{}'", client.first ), client.second.size() );
75 nProperties += client.second.size();
76 for (
const auto& current : client.second ) {
77 o <<
fmt::format(
"{:<44} = {} ;", current.FullName(), current.ValueAsString() );
80 o <<
fmt::format( R
"(// ==================================================================================
81 // End parser catalog #Components={} #Properties={}
82 // ==================================================================================
84 nComponents, nProperties );