SESegment.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6class CDM_DECL SESegment
7{
8protected:
9 friend class SECurve;
10 SESegment();
11public:
12 virtual ~SESegment();
13
14 virtual void Clear();
15 virtual bool IsValid() const;
16
17 virtual bool HasBeginVolume() const;
18 virtual SEScalarVolume& GetBeginVolume();
19 virtual double GetBeginVolume(const VolumeUnit& unit) const;
20
21 virtual bool HasEndVolume() const;
22 virtual SEScalarVolume& GetEndVolume();
23 virtual double GetEndVolume(const VolumeUnit& unit) const;
24
25 virtual std::string ToString() const;
26 virtual void ToString(std::ostream& str) const;
27
28protected:
29 virtual void Abstract() = 0;// Force this class to be abstract
30
33};
34
35inline std::ostream& operator<< (std::ostream& out, const SESegment* s)
36{
37 if (s == nullptr)
38 out << "Null Segment" << std::flush;
39 else
40 (*s).ToString(out);
41 return out;
42}
43inline std::ostream& operator<< (std::ostream& out, const SESegment& s)
44{
45 s.ToString(out);
46 return out;
47}
Definition: SECurve.h:12
virtual bool IsValid() const override
Definition: SECurve.cpp:24
virtual std::string ToString() const
Definition: SECurve.cpp:111
std::string ToString() const override
Definition: SEScalar.hxx:273
Definition: SEScalarVolume.h:28
Definition: SESegment.h:7
virtual std::string ToString() const
Definition: SESegment.cpp:66
SEScalarVolume * m_EndVolume
Definition: SESegment.h:32
virtual void Abstract()=0
SEScalarVolume * m_BeginVolume
Definition: SESegment.h:31
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.