codac 2.0.0
Loading...
Searching...
No Matches
codac2::SliceBase Class Referenceabstract

Base class for codomain slices attached to a temporal slice. More...

#include <codac2_SliceBase.h>

Inheritance diagram for codac2::SliceBase:
Collaboration diagram for codac2::SliceBase:

Public Member Functions

virtual ~SliceBase ()=default
 Virtual destructor.
virtual std::shared_ptr< SliceBasecopy () const =0
 Duplicates this slice.
virtual void init ()=0
 Initializes this slice to its unbounded codomain.
virtual void set_empty ()=0
 Sets this slice to the empty codomain.
const Intervalt0_tf () const
 Returns the temporal domain of this slice.
const TSlicetslice () const
 Returns the temporal slice associated with this object.
std::shared_ptr< const SliceBaseprev_slice () const
 Returns the previous slice of the same tube.
std::shared_ptr< const SliceBasenext_slice () const
 Returns the next slice of the same tube.

Protected Member Functions

 SliceBase (const SlicedTubeBase &tube, const std::list< TSlice >::iterator &it_tslice)
 Creates a slice attached to a tube and a temporal slice.

Protected Attributes

const SlicedTubeBase_tube
 Parent sliced tube.
std::list< TSlice >::iterator _it_tslice
 Iterator to the associated temporal slice.

Detailed Description

Base class for codomain slices attached to a temporal slice.

A SliceBase represents the codomain of a sliced tube over one temporal slice of a TDomain.

This abstract class stores:

  • a reference to the parent SlicedTubeBase,
  • an iterator to the corresponding TSlice in the temporal partition.

Concrete derived classes, such as Slice<T>, provide the actual codomain representation and the associated operations.

Constructor & Destructor Documentation

◆ SliceBase()

codac2::SliceBase::SliceBase ( const SlicedTubeBase & tube,
const std::list< TSlice >::iterator & it_tslice )
protected

Creates a slice attached to a tube and a temporal slice.

Parameters
tubesliced tube owning this slice
it_tsliceiterator to the associated temporal slice

Member Function Documentation

◆ copy()

virtual std::shared_ptr< SliceBase > codac2::SliceBase::copy ( ) const
pure virtual

Duplicates this slice.

Returns
shared pointer to a copy of this slice

Implemented in codac2::Slice< T >.

◆ t0_tf()

const Interval & codac2::SliceBase::t0_tf ( ) const

Returns the temporal domain of this slice.

Returns
temporal interval associated with this slice

◆ tslice()

const TSlice & codac2::SliceBase::tslice ( ) const

Returns the temporal slice associated with this object.

Returns
reference to the underlying TSlice

◆ prev_slice()

std::shared_ptr< const SliceBase > codac2::SliceBase::prev_slice ( ) const

Returns the previous slice of the same tube.

The previous slice is searched in the temporal element preceding the current TSlice.

Returns
shared pointer to the previous slice, or nullptr if this slice is the first one

◆ next_slice()

std::shared_ptr< const SliceBase > codac2::SliceBase::next_slice ( ) const

Returns the next slice of the same tube.

The next slice is searched in the temporal element following the current TSlice.

Returns
shared pointer to the next slice, or nullptr if this slice is the last one

The documentation for this class was generated from the following file: