SiddiqSoft.RWLContainer 1.1.3

dotnet add package SiddiqSoft.RWLContainer --version 1.1.3                
NuGet\Install-Package SiddiqSoft.RWLContainer -Version 1.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SiddiqSoft.RWLContainer" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SiddiqSoft.RWLContainer --version 1.1.3                
#r "nuget: SiddiqSoft.RWLContainer, 1.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SiddiqSoft.RWLContainer as a Cake Addin
#addin nuget:?package=SiddiqSoft.RWLContainer&version=1.1.3

// Install SiddiqSoft.RWLContainer as a Cake Tool
#tool nuget:?package=SiddiqSoft.RWLContainer&version=1.1.3                

RWLContainer : Reader-writer protected container

CodeQL Build Status alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Objective

  • Avoid re-implementing the rw-lock; standard C++ (since C++14) has a good reader-writer lock implementation.
  • Provide a simple, convenience layer for dictionary containers.
  • The storage type is a std::shared_ptr<>

Requirements

  • You must be able to use <shared_mutex> and <mutex>.
  • Minimal target is C++17.
  • The build and tests are for Visual Studio 2019 under x64.
  • We use nlohmann::json only in our tests and the library is aware to provide a conversion operator if library is detected.

Usage

#include "gtest/gtest.h"
#include "nlohmann/json.hpp"
#include "siddiqsoft/RWLContainer.hpp"


TEST(examples, Example1)
{
    try
    {
        siddiqsoft::RWLContainer<std::string, std::string> myContainer;

        auto item = myContainer.add("foo", "bar");
        ASSERT_TRUE(item);
        EXPECT_EQ("bar", *item);
    }
    catch (...)
    {
        EXPECT_TRUE(false); // if we throw then the test fails.
    }
}

Additional examples.

<small align="right">

© 2021 Siddiq Software LLC. All rights reserved.

</small>

Product Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 593 11/20/2021
1.1.2 373 7/22/2021
1.1.1 366 7/22/2021