<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://51.250.0.107/w/index.php?action=history&amp;feed=atom&amp;title=CAssociativeDataStorage</id>
	<title>CAssociativeDataStorage - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://51.250.0.107/w/index.php?action=history&amp;feed=atom&amp;title=CAssociativeDataStorage"/>
	<link rel="alternate" type="text/html" href="http://51.250.0.107/w/index.php?title=CAssociativeDataStorage&amp;action=history"/>
	<updated>2026-05-01T11:11:31Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://51.250.0.107/w/index.php?title=CAssociativeDataStorage&amp;diff=5789&amp;oldid=prev</id>
		<title>Андрей Чусов: Новая страница: «{{example_begin}} &lt;source lang=&quot;cpp&quot;&gt; #include &lt;camaas/idatastorage.h&gt; #include &lt;chsvlib/chsvmath.h&gt; #include &lt;string&gt; #include &lt;iostream&gt; #include &lt;iomanip&gt;  usi…»</title>
		<link rel="alternate" type="text/html" href="http://51.250.0.107/w/index.php?title=CAssociativeDataStorage&amp;diff=5789&amp;oldid=prev"/>
		<updated>2017-12-11T13:39:06Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «{{example_begin}} &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;camaas/idatastorage.h&amp;gt; #include &amp;lt;chsvlib/chsvmath.h&amp;gt; #include &amp;lt;string&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;iomanip&amp;gt;  usi…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{example_begin}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;camaas/idatastorage.h&amp;gt;&lt;br /&gt;
#include &amp;lt;chsvlib/chsvmath.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;iomanip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace CAMaaS;&lt;br /&gt;
&lt;br /&gt;
int main(int, char**)&lt;br /&gt;
{&lt;br /&gt;
    auto map = CAssociativeDataStorage&amp;lt;InMemoryAssociativeDataStorageImplementation&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
    map.insert(&amp;quot;Key1&amp;quot;, 4, std::string(&amp;quot;value1&amp;quot;));&lt;br /&gt;
    map.insert(reinterpret_cast&amp;lt;const std::uint8_t*&amp;gt;(&amp;quot;Key2&amp;quot;), 4, &amp;quot;value2&amp;quot;, 6);&lt;br /&gt;
    map.insert(std::string(&amp;quot;Key3&amp;quot;), &amp;quot;value3&amp;quot;, 6);&lt;br /&gt;
    map.insert(static_cast&amp;lt;const void*&amp;gt;(&amp;quot;Key4&amp;quot;), 5, static_cast&amp;lt;const void*&amp;gt;(&amp;quot;value4&amp;quot;), 7);&lt;br /&gt;
    auto v = map.find(&amp;quot;Key3&amp;quot;, 4);&lt;br /&gt;
    auto strFound = represent_as&amp;lt;InputByteStreamOwn&amp;gt;(v.input_stream()).read_all_as&amp;lt;std::string&amp;gt;();&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; strFound &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    map.erase(v);&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; represent_as&amp;lt;InputByteStreamOwn&amp;gt;(map.find(&amp;quot;Key1&amp;quot;, 4).input_stream()).read_all_as&amp;lt;std::string&amp;gt;() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; represent_as&amp;lt;InputByteStreamOwn&amp;gt;(map.find(reinterpret_cast&amp;lt;const std::uint8_t*&amp;gt;(&amp;quot;Key2&amp;quot;), 4).input_stream()).read_all_as&amp;lt;std::string&amp;gt;() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    if (bool(map.find(&amp;quot;Key3&amp;quot;, 4)))&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Found a deleted element\n&amp;quot;;&lt;br /&gt;
    auto strg = represent_as&amp;lt;InMemoryDataStorageInputOwn&amp;gt;(map.find(&amp;quot;Key4&amp;quot;, 5).get_storage());&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; std::string(static_cast&amp;lt;const char*&amp;gt;(strg.data()), std::size_t(strg.byte_size())) &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    auto map2 = make_associative_data_storage();&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(map2.create_node(&amp;quot;Some node 1&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(map2.create_node(&amp;quot;Some node 2&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(map2.create_node(&amp;quot;Some node 3&amp;quot;)).write()).write(&amp;quot;Value 3&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(map2.create_node(&amp;quot;Some node 4&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    map2.delete_node(&amp;quot;Some node 2&amp;quot;);&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; represent_as&amp;lt;InputByteStreamOwn&amp;gt;(map2.read(&amp;quot;Some node 3&amp;quot;)).read_all_as&amp;lt;std::string&amp;gt;() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    auto ini_map = make_associative_data_storage&amp;lt;AssociativeDataStorageParserIni | AssociativeDataStorageReadAccess | AssociativeDataStorageWriteAccess&amp;gt;&lt;br /&gt;
        (make_file_based_data_storage(&amp;quot;ini_test.ini&amp;quot;, FileReadWrite, FileCreateAlways));&lt;br /&gt;
    auto node_storage = represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some node&amp;quot;));&lt;br /&gt;
    auto node_os = represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(node_storage.write());&lt;br /&gt;
    node_os.write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some node 1&amp;quot;)).write()).write(&amp;quot;Value1&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some node 2&amp;quot;)).write()).write(&amp;quot;Value2&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some node 3&amp;quot;)).write()).write(&amp;quot;Value 3&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some node 4&amp;quot;)).write()).write(&amp;quot;Value 4&amp;quot;);&lt;br /&gt;
    ini_map.delete_node(&amp;quot;Some node 2&amp;quot;);&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; represent_as&amp;lt;InputByteStreamOwn&amp;gt;(ini_map.read(&amp;quot;Some node 3&amp;quot;)).read_all_as&amp;lt;std::string&amp;gt;() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some section 1/Some node 1&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    ini_map.create_node(&amp;quot;Some section 1/empty node&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some section 2/Some node 1&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some section 3/Some node 1&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some section 3/Some node 2&amp;quot;)).write()).write(&amp;quot;Value&amp;quot;);&lt;br /&gt;
    ini_map.create_node(&amp;quot;Some section 4/Some node 1&amp;quot;);&lt;br /&gt;
    represent_as&amp;lt;OutputByteStreamOwn&amp;gt;(represent_as&amp;lt;ContiguousDataStorageOwn&amp;gt;(ini_map.create_node(&amp;quot;Some section with \\/ and \\\\/Some node with \\/ and \\\\&amp;quot;)).write()).write(&amp;quot;A value (\\, /)&amp;quot;);&lt;br /&gt;
    ini_map.delete_node(&amp;quot;Some section 3/Some node 1&amp;quot;);&lt;br /&gt;
    ini_map.delete_node(&amp;quot;Some section 3/Some node 2&amp;quot;);&lt;br /&gt;
    ini_map.delete_node(&amp;quot;Some section 4/Some node 1&amp;quot;);&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; represent_as&amp;lt;InputByteStreamOwn&amp;gt;(ini_map.read(&amp;quot;Some section with \\/ and \\\\/Some node with \\/ and \\\\&amp;quot;)).read_all_as&amp;lt;std::string&amp;gt;() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
    if (bool(ini_map.find_node(&amp;quot;Some section 4/Some node 1&amp;quot;, std::nothrow)))&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Found a deleted node\n&amp;quot;;&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{example_end}}&lt;/div&gt;</summary>
		<author><name>Андрей Чусов</name></author>
	</entry>
</feed>