MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / add

Method add

src/CoolPropLib.cpp:487–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 public:
486 AbstractStateLibrary() = default;
487 long add(const shared_ptr<CoolProp::AbstractState>& AS) {
488 std::scoped_lock guard(ASLib_mutex);
489 ASlibrary.insert(std::pair<std::size_t, shared_ptr<CoolProp::AbstractState>>(this->next_handle, AS));
490 this->next_handle++;
491 return next_handle - 1;
492 }
493 void remove(long handle) {
494 std::scoped_lock guard(ASLib_mutex);
495 std::size_t count_removed = ASlibrary.erase(handle);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected