Program listing for file kernel/src/modelingTools/NonSmoothLaw.hpp

Program listing for file kernel/src/modelingTools/NonSmoothLaw.hpp#

 1#ifndef NSLAW_H
 2#define NSLAW_H
 3
 4#include "SiconosConst.hpp"
 5#include "SiconosFwd.hpp"
 6#include "SiconosPointers.hpp"
 7#include "SiconosSerialization.hpp"
 8#include "SiconosVisitor.hpp"
 9
10
11class NonSmoothLaw {
12protected:
13  ACCEPT_SERIALIZATION(NonSmoothLaw);
14
15
16  unsigned int _size{0};
17
18
19  NonSmoothLaw() = default;
20  NonSmoothLaw(const NonSmoothLaw &) = delete;
21  NonSmoothLaw(NonSmoothLaw &&) = delete;
22  NonSmoothLaw &operator=(const NonSmoothLaw &) = delete;
23  NonSmoothLaw &operator=(const NonSmoothLaw &&) = delete;
24
25public:
26
27  NonSmoothLaw(unsigned int size) : _size(size) {}
28
29
30  virtual ~NonSmoothLaw() noexcept = default;
31
32
33  virtual bool isVerified() const
34  {
35    THROW_EXCEPTION("NonSmoothLaw::isVerified, not yet implemented!");
36    return false;
37  }
38
39
40  inline unsigned int size() const { return _size; }
41
42
43  virtual void display() const = 0;
44
45  VIRTUAL_ACCEPT_VISITORS(NonSmoothLaw);
46};
47#endif