DATAKIT SDK  V2026.1
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 (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...
 
ApplicationZoneoperator= (ApplicationZone &&in) DTK_NOEXCEPT
 Move assignment operator. More...
 
ApplicationZoneoperator= (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 Member Functions

void _Copy (const ApplicationZone &s)
 
void _Init ()
 
void _Reset ()
 

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 
1827  {
1828  Default = 0,
1829  AllAround = 1,
1830  AllOver = 2,
1831  };

Constructor & Destructor Documentation

◆ ApplicationZone() [1/2]

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/2]

Dtk_Leader::ApplicationZone::ApplicationZone ( )

Default constructor.

1871  {
1872  _Init();
1873  }

◆ ~ApplicationZone()

Dtk_Leader::ApplicationZone::~ApplicationZone ( )

Destructor.

1876 { _Reset();}

Member Function Documentation

◆ _Copy()

void Dtk_Leader::ApplicationZone::_Copy ( const ApplicationZone s)
protected
1850  {
1851  _ApplicationZoneType = s._ApplicationZoneType;
1852  Dtk_Size_t i, NumElts = s._RelatedGeomElements.size();
1853  for( i = 0 ; i < NumElts ; i++)
1854  {
1855  Dtk_CurvePtr c;
1856  s._RelatedGeomElements[i].Clone(c);
1857  _RelatedGeomElements.push_back(c);
1858  }
1859  }

◆ _Init()

void Dtk_Leader::ApplicationZone::_Init ( )
protected
1846  {
1848  }

◆ _Reset()

void Dtk_Leader::ApplicationZone::_Reset ( )
protected
1860 { _RelatedGeomElements.clear();}

◆ ApplicationZoneEnumToString()

static Dtk_string Dtk_Leader::ApplicationZone::ApplicationZoneEnumToString ( const ApplicationZoneEnum inEnum)
static
1833  {
1834  switch( inEnum )
1835  {
1836  default:
1837  case Default: return L"Default";
1838  case AllAround: return L"AllAround";
1839  case AllOver: return L"AllOver";
1840  }
1841  }

◆ Clear()

void Dtk_Leader::ApplicationZone::Clear ( )

Clear elements.

1880  {
1882  _RelatedGeomElements.clear();
1883  }

◆ GetApplicationZoneType()

ApplicationZoneEnum Dtk_Leader::ApplicationZone::GetApplicationZoneType ( ) const

Retrieves the ApplicationZone Type - Read Only -.

Returns
The ApplicationZone Type.
1897 {return _ApplicationZoneType;}

◆ GetGeometries()

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

Process Related geometries.

1901  {
1902  Dtk_Size_t i,nb = this->_RelatedGeomElements.size();
1903  outGeoms.resize(nb);
1904  for(i=0;i<nb;i++)
1905  this->_RelatedGeomElements[i].Clone(outGeoms[i]);
1906  }

◆ operator=() [1/2]

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

Move assignment operator.

Parameters
inObject to move from.
1943  {
1944  if( &in == this )
1945  {
1946  return *this;
1947  }
1948  _ApplicationZoneType = in._ApplicationZoneType;
1949  _RelatedGeomElements = std::move( in._RelatedGeomElements );
1950  return *this;
1951  }

◆ operator=() [2/2]

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

Copy assignment operator.

Parameters
inObject to copy from.
1932  {
1933  if (&in == this)
1934  {
1935  return *this;
1936  }
1937  _Reset();
1938  _Copy(in);
1939  return *this;
1940  }

◆ 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.
1891  {
1892  this->_ApplicationZoneType = inApplicationZoneType;
1893  this->_RelatedGeomElements = std::move( inRelatedGeomElements );
1894  }

◆ 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
1921  {
1922  if( inTransfo == Dtk_transfo() )
1923  return dtkNoError;
1924  Dtk_Size_t i, NumGeoms = _RelatedGeomElements.size();
1925  for (i = 0; i < NumGeoms; i++)
1926  { _RelatedGeomElements[i]->Transform( inTransfo ); }
1927  return dtkNoError;
1928  }

◆ 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
1912  {
1913  Dtk_transfo TmpMatrix;
1914  TmpMatrix.addTranslate( inTranslateDir );
1915  return Transform( TmpMatrix );
1916  }

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:1843
Dtk_Leader::ApplicationZone::AllOver
@ AllOver
Definition: util_draw_dtk.hpp:1830
Dtk_Leader::Clone
virtual Dtk_Object * Clone()
Definition: util_draw_dtk.hpp:2238
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:622
Dtk_Leader::ApplicationZone::Transform
Dtk_ErrorStatus Transform(const Dtk_transfo &inTransfo)
Applies a transformation matrix to the ApplicationZone.
Definition: util_draw_dtk.hpp:1920
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:715
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_Leader::ApplicationZone::_Reset
void _Reset()
Definition: util_draw_dtk.hpp:1860
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Leader::ApplicationZone::_RelatedGeomElements
Dtk_tab< Dtk_CurvePtr > _RelatedGeomElements
Definition: util_draw_dtk.hpp:1844
Dtk_transfo::addTranslate
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
Dtk_Leader::ApplicationZone::_Copy
void _Copy(const ApplicationZone &s)
Definition: util_draw_dtk.hpp:1849
Dtk_Leader::ApplicationZone::AllAround
@ AllAround
Definition: util_draw_dtk.hpp:1829
Dtk_Leader::ApplicationZone::_Init
void _Init()
Definition: util_draw_dtk.hpp:1845
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:147
Dtk_Leader::ApplicationZone::Default
@ Default
Definition: util_draw_dtk.hpp:1828