19 lines
499 B
C++
19 lines
499 B
C++
#pragma once
|
|
/// @file PrimitiveWrapper.hpp
|
|
/// For complete documentation, see src/PrimitiveWrapper.cpp
|
|
//
|
|
namespace hdk::grid {
|
|
template <typename T>
|
|
class PrimitiveWrapper {
|
|
private:
|
|
T primitive_value;
|
|
public:
|
|
PrimitiveWrapper() = delete;
|
|
PrimitiveWrapper(T value) : primitive_value(value) {}
|
|
operator T() const { return primitive_value; }
|
|
PrimitiveWrapper& operator=(T newValue) {
|
|
primitive_value = newValue;
|
|
return *this;
|
|
}
|
|
};
|
|
} |