Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ScriptLibraryStorage Class Reference

#include <ored/portfolio/scriptedtrade.hpp>

+ Inheritance diagram for ScriptLibraryStorage:
+ Collaboration diagram for ScriptLibraryStorage:

Public Member Functions

const ScriptLibraryDataget () const
 
void set (const ScriptLibraryData &data)
 
void set (ScriptLibraryData &&data)
 
void clear ()
 

Private Attributes

ScriptLibraryData data_
 
boost::shared_mutex mutex_
 

Detailed Description

Definition at line 281 of file scriptedtrade.hpp.

Member Function Documentation

◆ get()

const ScriptLibraryData & get ( ) const

Definition at line 674 of file scriptedtrade.cpp.

674 {
675 boost::shared_lock<boost::shared_mutex> lock(mutex_);
676 return data_;
677}

◆ set() [1/2]

void set ( const ScriptLibraryData data)

Definition at line 679 of file scriptedtrade.cpp.

679 {
680 boost::unique_lock<boost::shared_mutex> lock(mutex_);
681 data_ = data;
682}
@ data
Definition: log.hpp:77

◆ set() [2/2]

void set ( ScriptLibraryData &&  data)

Definition at line 684 of file scriptedtrade.cpp.

684 {
685 boost::unique_lock<boost::shared_mutex> lock(mutex_);
686 data_ = std::move(data);
687}

◆ clear()

void clear ( )

Definition at line 689 of file scriptedtrade.cpp.

689 {
690 boost::unique_lock<boost::shared_mutex> lock(mutex_);
691 data_ = ScriptLibraryData();
692}

Member Data Documentation

◆ data_

ScriptLibraryData data_
private

Definition at line 282 of file scriptedtrade.hpp.

◆ mutex_

boost::shared_mutex mutex_
mutableprivate

Definition at line 283 of file scriptedtrade.hpp.