MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / insert

Method insert

framework/src/util/AnyMap.cpp:921–944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919 }
920
921 std::pair<any_map::iterator, bool>
922 any_map::insert(value_type const& value)
923 {
924 switch (type)
925 {
926 case map_type::ORDERED_MAP:
927 {
928 auto p = o_m().insert(value);
929 return { iterator(std::move(p.first)), p.second };
930 }
931 case map_type::UNORDERED_MAP:
932 {
933 auto p = uo_m().insert(value);
934 return { iterator(std::move(p.first), iterator::UNORDERED), p.second };
935 }
936 case map_type::UNORDERED_MAP_CASEINSENSITIVE_KEYS:
937 {
938 auto p = uoci_m().insert(value);
939 return { iterator(std::move(p.first), iterator::UNORDERED_CI), p.second };
940 }
941 default:
942 throw std::logic_error("invalid map type");
943 }
944 }
945
946 any_map::const_iterator
947 any_map::find(key_type const& key) const

Callers 15

conf.pyFile · 0.45
AddDirectoryMethod · 0.45
add_fileMethod · 0.45
StartMethod · 0.45
StartMethod · 0.45
ServiceControlMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
escapePathFunction · 0.45

Calls

no outgoing calls

Tested by 15

StartMethod · 0.36
StartMethod · 0.36
ServiceControlMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
escapePathFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
AddedMethod · 0.36
GetServiceMethod · 0.36
GetServiceMethod · 0.36