Hi, do you see any issue in this C++ class? If not, can you please comment it in Doxygen…
Jump to turn (11)
- 1Hi, do you see any issue in this C++ class? If not, can you please comment it in
- 2Ok, can you please provide me an update version with these three comment impleme
- 3May I use a std::copy over double or pointer to double? It has to take an iterat
- 4While compiling such code, I get this error from compiler: do you know what does
- 5In C++ I would like to force that each Derived class will initialize some partic
- 6Yes, I was wondering the same approach. Do you have any other suggestion?
- 7To force an initialization, may be an idea to use a singleton?
- 8While there is a way to guarantee that a function is executed one and only one t
- 9I have a base class; the constructor take a list of strings and fill a private m
- 10Can you please explain me the factory pattern and the builder pattern?
- 11I have the following for loop, for samples a generic sizet variable for(sizet i=
- User
Hi, do you see any issue in this C++ class? If not, can you please comment it in Doxygen way?
codeclass Params { private: std::unique_ptr<double[]> values_; size_t size_; public: Params(const size_t _size) : size_(_size), values_(new double[_size]){}; double* GetValues() { return values_.get(); } size_t GetSize() { return size_; } void SetValue(const size_t _index, const double _value) { values_[_index] = _value; } void SetValues(const double* _values) { std::copy(_values, _values + size_, values_.get()); } double GetValue(const size_t _index) { return values_[_index]; } }; - Assistant