~peter-gjoel/verifytapn/verifytapn

« back to all changes in this revision

Viewing changes to include/Core/TAPN/TransportArc.hpp

  • Committer: Peter G. Jensen
  • Date: 2020-03-20 16:42:35 UTC
  • Revision ID: peter.gjoel@gmail.com-20200320164235-gfs4jt7fxm2ep3h0
removing un-needed shared pointers. Better, but not good structure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
        class TransportArc {
18
18
        public:
19
 
            typedef std::vector<std::shared_ptr<TransportArc> > tarcvector_t;
20
 
            typedef std::vector<std::weak_ptr<TransportArc> > weak_tarcvector_t;
 
19
            typedef std::vector<TransportArc* > tarcvector_t;
21
20
        public:
22
21
            TransportArc(
23
 
                    std::shared_ptr<TimedPlace> source,
24
 
                    std::shared_ptr<TimedTransition> transition,
25
 
                    std::shared_ptr<TimedPlace> destination,
 
22
                    TimedPlace* source,
 
23
                    TimedTransition* transition,
 
24
                    TimedPlace* destination,
26
25
                    const TAPN::TimeInterval &interval
27
 
            ) : _interval(interval), _source(std::move(source)), _transition(std::move(transition)),
28
 
                _destination(std::move(destination)) {};
 
26
            ) : _interval(interval), _source(source), _transition(transition),
 
27
                _destination(destination) {};
29
28
 
30
29
            virtual ~TransportArc() = default;;
31
30
        public:
42
41
 
43
42
        private:
44
43
            const TAPN::TimeInterval _interval;
45
 
            const std::shared_ptr<TimedPlace> _source;
46
 
            const std::shared_ptr<TimedTransition> _transition;
47
 
            const std::shared_ptr<TimedPlace> _destination;
 
44
            TimedPlace* _source;
 
45
            TimedTransition* _transition;
 
46
            TimedPlace* _destination;
48
47
        };
49
48
 
50
49
        std::ostream &operator<<(std::ostream &out, const TransportArc &arc);