DATAKIT SDK  V2026.4
Dtk_Leader::ApplicationZone Class Reference

This is the application zone class.
It is used to gather all application zone information. More...

Public Types

enum  ApplicationZoneEnum { Default = 0, AllAround = 1, AllOver = 2 }
 

Public Member Functions

 ApplicationZone ()
 Default constructor. More...
 
 ApplicationZone (ApplicationZone &&in) DTK_NOEXCEPT=default
 
 ApplicationZone (const ApplicationZone &in)
 
 ApplicationZone (const ApplicationZoneEnum &inApplicationZoneType, const Dtk_tab< Dtk_CurvePtr > &inRelatedGeometricalElts)
 Full featured constructor. More...
 
void Clear ()
 Clear elements. More...
 
ApplicationZoneEnum GetApplicationZoneType () const
 Retrieves the ApplicationZone Type - Read Only -. More...
 
void GetGeometries (Dtk_tab< Dtk_CurvePtr > &outGeoms) const
 Process Related geometries. More...
 
ApplicationZone & operator= (ApplicationZone &&in) DTK_NOEXCEPT=default
 Move assignment operator. More...
 
ApplicationZone & operator= (const ApplicationZone &in)
 Copy assignment operator. More...
 
void SetApplicationData (const ApplicationZoneEnum &inApplicationZoneType, Dtk_tab< Dtk_CurvePtr > inRelatedGeomElements)
 Set ApplicationZone informations. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the ApplicationZone. More...
 
Dtk_ErrorStatus Translate (const Dtk_dir &inTranslateDir)
 Translates the ApplicationZone giving a translation vector. More...
 
 ~ApplicationZone ()
 Destructor. More...
 

Static Public Member Functions

static Dtk_string ApplicationZoneEnumToString (const ApplicationZoneEnum &inEnum)
 

Protected Attributes

ApplicationZoneEnum _ApplicationZoneType
 
Dtk_tab< Dtk_CurvePtr > _RelatedGeomElements
 

Detailed Description

This is the application zone class.
It is used to gather all application zone information.

Member Enumeration Documentation

◆ ApplicationZoneEnum

Enumerator
Default 
AllAround 
AllOver 
1736  {
1737  Default = 0,
1738  AllAround = 1,
1739  AllOver = 2,
1740  };

Constructor & Destructor Documentation

◆ ApplicationZone() [1/4]

Dtk_Leader::ApplicationZone::ApplicationZone ( const ApplicationZoneEnum &  inApplicationZoneType,
const Dtk_tab< Dtk_CurvePtr > &  inRelatedGeometricalElts 
)

Full featured constructor.

Parameters
inApplicationZoneTypeApplicationZone Type.
inRelatedGeometricalEltsGeometries representing the frame.

◆ ApplicationZone() [2/4]

Dtk_Leader::ApplicationZone::ApplicationZone ( )

Default constructor.

◆ ApplicationZone() [3/4]

Dtk_Leader::ApplicationZone::ApplicationZone ( const ApplicationZone &  in)
1764  : _ApplicationZoneType( in._ApplicationZoneType )
1765  {
1766  _RelatedGeomElements.reserve( in._RelatedGeomElements.size() );
1767  for( Dtk_Size_t i = 0; i < in._RelatedGeomElements.size(); i++ )
1768  {
1769  Dtk_CurvePtr tmp;
1770  in._RelatedGeomElements[ i ].Clone( tmp );
1771  _RelatedGeomElements.push_back( tmp );
1772  }
1773  };

◆ ApplicationZone() [4/4]

Dtk_Leader::ApplicationZone::ApplicationZone ( ApplicationZone &&  in)
default

◆ ~ApplicationZone()

Dtk_Leader::ApplicationZone::~ApplicationZone ( )

Destructor.

1777 {}

Member Function Documentation

◆ ApplicationZoneEnumToString()

static Dtk_string Dtk_Leader::ApplicationZone::ApplicationZoneEnumToString ( const ApplicationZoneEnum &  inEnum)
static
1742  {
1743  switch( inEnum )
1744  {
1745  default:
1746  case Default: return L"Default";
1747  case AllAround: return L"AllAround";
1748  case AllOver: return L"AllOver";
1749  }
1750  }

◆ Clear()

void Dtk_Leader::ApplicationZone::Clear ( )

Clear elements.

1781  {
1783  _RelatedGeomElements.clear();
1784  }

◆ GetApplicationZoneType()

ApplicationZoneEnum Dtk_Leader::ApplicationZone::GetApplicationZoneType ( ) const

Retrieves the ApplicationZone Type - Read Only -.

Returns
The ApplicationZone Type.
1798 {return _ApplicationZoneType;}

◆ GetGeometries()

void Dtk_Leader::ApplicationZone::GetGeometries ( Dtk_tab< Dtk_CurvePtr > &  outGeoms) const

Process Related geometries.

1802  {
1803  Dtk_Size_t i,nb = this->_RelatedGeomElements.size();
1804  outGeoms.resize(nb);
1805  for(i=0;i<nb;i++)
1806  this->_RelatedGeomElements[i].Clone(outGeoms[i]);
1807  }

◆ operator=() [1/2]

ApplicationZone& Dtk_Leader::ApplicationZone::operator= ( ApplicationZone &&  in)
default

Move assignment operator.

Parameters
inObject to move from.

◆ operator=() [2/2]

ApplicationZone& Dtk_Leader::ApplicationZone::operator= ( const ApplicationZone &  in)

Copy assignment operator.

Parameters
inObject to copy from.
1832  {
1833  if (&in == this)
1834  {
1835  return *this;
1836  }
1837  _ApplicationZoneType = in._ApplicationZoneType;
1838  _RelatedGeomElements.reserve( in._RelatedGeomElements.size() );
1839  for (Dtk_Size_t i = 0; i < in._RelatedGeomElements.size(); i++)
1840  {
1841  Dtk_CurvePtr tmp;
1842  in._RelatedGeomElements[i].Clone(tmp);
1843  _RelatedGeomElements.push_back(tmp);
1844  }
1845  return *this;
1846  }

◆ SetApplicationData()

void Dtk_Leader::ApplicationZone::SetApplicationData ( const ApplicationZoneEnum &  inApplicationZoneType,
Dtk_tab< Dtk_CurvePtr >  inRelatedGeomElements 
)

Set ApplicationZone informations.

Parameters
inApplicationZoneTypeThe ApplicationZone Type.
inRelatedGeometricalEltsGeometries representing the Application Zone Symbol.
1792  {
1793  this->_ApplicationZoneType = inApplicationZoneType;
1794  this->_RelatedGeomElements = std::move( inRelatedGeomElements );
1795  }

◆ Transform()

Dtk_ErrorStatus Dtk_Leader::ApplicationZone::Transform ( const Dtk_transfo &  inTransfo)

Applies a transformation matrix to the ApplicationZone.

Parameters
inTransfoThe transformation matrix
Returns
dtkNoError if OK
1822  {
1823  if( inTransfo == Dtk_transfo() )
1824  return dtkNoError;
1825  Dtk_Size_t i, NumGeoms = _RelatedGeomElements.size();
1826  for (i = 0; i < NumGeoms; i++)
1827  { _RelatedGeomElements[i]->Transform( inTransfo ); }
1828  return dtkNoError;
1829  }

◆ Translate()

Dtk_ErrorStatus Dtk_Leader::ApplicationZone::Translate ( const Dtk_dir &  inTranslateDir)

Translates the ApplicationZone giving a translation vector.

Parameters
inTranslateDirthe translation vector
Returns
dtkNoError if OK
1813  {
1814  Dtk_transfo TmpMatrix;
1815  TmpMatrix.addTranslate( inTranslateDir );
1816  return Transform( TmpMatrix );
1817  }

Field Documentation

◆ _ApplicationZoneType

ApplicationZoneEnum Dtk_Leader::ApplicationZone::_ApplicationZoneType
protected

◆ _RelatedGeomElements

Dtk_tab< Dtk_CurvePtr > Dtk_Leader::ApplicationZone::_RelatedGeomElements
protected
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_Leader::ApplicationZone::_ApplicationZoneType
ApplicationZoneEnum _ApplicationZoneType
Definition: util_draw_dtk.hpp:1752
Dtk_Leader::ApplicationZone::AllOver
@ AllOver
Definition: util_draw_dtk.hpp:1739
Dtk_Leader::Clone
virtual Dtk_Object * Clone()
Definition: util_draw_dtk.hpp:2135
Dtk_Leader::ApplicationZone::Transform
Dtk_ErrorStatus Transform(const Dtk_transfo &inTransfo)
Applies a transformation matrix to the ApplicationZone.
Definition: util_draw_dtk.hpp:1821
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:711
Dtk_SmartPtr::Clone
void Clone(Dtk_SmartPtr< T > &out) const
Definition: util_ptr_dtk.hpp:192
Dtk_tab::resize
void resize(Dtk_Size_t n, const T &t)
Resizes the array.
Definition: util_stl_dtk.hpp:604
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Leader::ApplicationZone::_RelatedGeomElements
Dtk_tab< Dtk_CurvePtr > _RelatedGeomElements
Definition: util_draw_dtk.hpp:1753
Dtk_transfo::addTranslate
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
Dtk_Leader::ApplicationZone::AllAround
@ AllAround
Definition: util_draw_dtk.hpp:1738
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:151
Dtk_Leader::ApplicationZone::Default
@ Default
Definition: util_draw_dtk.hpp:1737