File: ConstProperty.cpp

package info (click to toggle)
dyssol 1.5.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,204 kB
  • sloc: cpp: 53,870; sh: 85; python: 59; makefile: 11
file content (25 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Copyright (c) 2020, Dyssol Development Team. All rights reserved. This file is part of Dyssol. See LICENSE file for license information. */

#include "ConstProperty.h"

CConstProperty::CConstProperty(unsigned _nProperty, const std::string& _sName, const std::wstring& _sUnits, double _defaultValue)
	: CBaseProperty(_nProperty, _sName, _sUnits),
	m_defaultValue{ _defaultValue },
	m_dValue{ _defaultValue }
{
}

double CConstProperty::GetValue() const
{
	return m_dValue;
}

void CConstProperty::SetValue(double _dValue)
{
	m_dValue = _dValue;
}

bool CConstProperty::IsDefaultValue() const
{
	return m_dValue == m_defaultValue;
}