NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
newlang::VariableTaken Class Reference

#include <variable.h>

Inheritance diagram for newlang::VariableTaken:

Public Member Functions

 operator bool () const
 
const Variableoperator* () const
 
Variableoperator* ()
 
VariableTakenoperator= (VariableTaken const &var) noexcept
 
 ~VariableTaken ()
 

Protected Member Functions

 VariableTaken (const Variable &var, bool edit_mode, const std::chrono::milliseconds &timeout_duration=Sync::SyncTimeoutDeedlock, const std::string_view message="", const std::source_location &location=std::source_location::current())
 

Static Protected Member Functions

static std::string MakeTimeoutMessage (const Variable &var, bool edit_mode, const std::chrono::milliseconds &timeout_duration, const std::string_view message, const std::source_location &location)
 

Protected Attributes

std::variant< Variable *, std::shared_ptr< Variable >, std::shared_ptr< Sync > > variable
 

Friends

class Variable
 

Detailed Description

Класс VariableTaken используется для захвата объекта синхронизации Sync при работе с классом Variable

Definition at line 220 of file variable.h.

Constructor & Destructor Documentation

◆ VariableTaken()

VariableTaken::VariableTaken ( const Variable & var,
bool edit_mode,
const std::chrono::milliseconds & timeout_duration = Sync::SyncTimeoutDeedlock,
const std::string_view message = "",
const std::source_location & location = std::source_location::current() )
explicitprotected

Конструктор захвата объекта синхронизации Sync при работе с классом Variable

Parameters
varСсылка на объект Variable .
edit_modeРежим редактирования (по умолчанию только для чтения).
timeout_durationВремя ожидания захвата блокировки до возникнвоения исключения ошибки захвата.

Definition at line 54 of file variable.cpp.

References MakeTimeoutMessage(), and variable.

◆ ~VariableTaken()

VariableTaken::~VariableTaken ( )

Definition at line 89 of file variable.cpp.

References variable.

Member Function Documentation

◆ MakeTimeoutMessage()

std::string VariableTaken::MakeTimeoutMessage ( const Variable & var,
bool edit_mode,
const std::chrono::milliseconds & timeout_duration,
const std::string_view message,
const std::source_location & location )
staticprotected

Definition at line 95 of file variable.cpp.

References result, and newlang::Variable::toString().

Referenced by VariableTaken().

◆ operator bool()

newlang::VariableTaken::operator bool ( ) const
inline

Definition at line 244 of file variable.h.

References variable.

◆ operator*() [1/2]

const Variable & newlang::VariableTaken::operator* ( ) const
inline

Definition at line 253 of file variable.h.

References ASSERT, and variable.

◆ operator*() [2/2]

Variable & newlang::VariableTaken::operator* ( )
inline

Definition at line 266 of file variable.h.

References ASSERT, and variable.

◆ operator=()

VariableTaken & newlang::VariableTaken::operator= ( VariableTaken const & var)
inlinenoexcept

Definition at line 279 of file variable.h.

References variable.

Friends And Related Symbol Documentation

◆ Variable

friend class Variable
friend

Definition at line 221 of file variable.h.

Member Data Documentation

◆ variable

std::variant<Variable *, std::shared_ptr<Variable>, std::shared_ptr<Sync> > newlang::VariableTaken::variable
protected

The documentation for this class was generated from the following files: