codac 1.5.6
Loading...
Searching...
No Matches
codac2_TSlice.h
Go to the documentation of this file.
1
12#ifndef __CODAC2_TSLICE_H__
13#define __CODAC2_TSLICE_H__
14
15#include <map>
16#include <list>
17#include <vector>
18#include <memory>
19
20#include "codac_Interval.h"
21#include "codac2_Slice.h"
22
23namespace codac2
24{
25 using codac::Interval;
26
27 class TDomain;
28 class AbstractSlice;
29 class AbstractSlicedTube;
30
31 class TSlice
32 {
33 public:
34
35 explicit TSlice(const Interval& tdomain);
36 TSlice(const TSlice& tslice, const Interval& tdomain); // performs a deep copy on slices
37 const Interval& t0_tf() const;
38 bool is_gate() const;
39 const std::map<const AbstractSlicedTube*,std::shared_ptr<AbstractSlice>>& slices() const;
40 bool operator==(const TSlice& x) const;
41 bool operator!=(const TSlice& x) const;
42 friend std::ostream& operator<<(std::ostream& os, const TSlice& x);
43
44 protected:
45
46 void set_tdomain(const Interval& tdomain);
47
48 Interval _t0_tf;
49 std::map<const AbstractSlicedTube*,std::shared_ptr<AbstractSlice>> _slices;
50
51 friend class TDomain;
52 template<typename U>
53 friend class Tube;
54 };
55} // namespace codac
56
57#endif