##// END OF EJS Templates
Handles StateRole in variable model
Handles StateRole in variable model

File last commit:

r807:c2c9696a1972
r809:892af30fdefb
Show More
VariableStates.cpp
49 lines | 955 B | text/x-c | CppLexer
#include "Variable/VariableStates.h"
AbstractVariableState::AbstractVariableState(StateData data) : m_Data{std::move(data)}
{
}
StateData AbstractVariableState::data() const
{
return m_Data;
}
// /////////// //
// LoadedState //
// /////////// //
LoadedState::LoadedState() : AbstractVariableState{{{"color", "green"}}}
{
}
std::unique_ptr<IVariableState> LoadedState::clone() const
{
return std::make_unique<LoadedState>(*this);
}
// //////////// //
// LoadingState //
// //////////// //
LoadingState::LoadingState() : AbstractVariableState{{{"color", "blue"}}}
{
}
std::unique_ptr<IVariableState> LoadingState::clone() const
{
return std::make_unique<LoadingState>(*this);
}
// ///////////// //
// CanceledState //
// ///////////// //
CanceledState::CanceledState() : AbstractVariableState{{{"color", "red"}}}
{
}
std::unique_ptr<IVariableState> CanceledState::clone() const
{
return std::make_unique<CanceledState>(*this);
}