DATAKIT API  V2025.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 (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 
1838  {
1839  Default = 0,
1840  AllAround = 1,
1841  AllOver = 2,
1842  };

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.

1882  {
1883  _Init();
1884  }

◆ ~ApplicationZone()

Dtk_Leader::ApplicationZone::~ApplicationZone ( )

Destructor.

1887 { _Reset();}

Member Function Documentation

◆ _Copy()

void Dtk_Leader::ApplicationZone::_Copy ( const ApplicationZone s)
protected
1861  {
1862  _ApplicationZoneType = s._ApplicationZoneType;
1863  Dtk_Size_t i, NumElts = s._RelatedGeomElements.size();
1864  for( i = 0 ; i < NumElts ; i++)
1865  {
1866  Dtk_CurvePtr c;
1867  s._RelatedGeomElements[i].Clone(c);
1868  _RelatedGeomElements.push_back(c);
1869  }
1870  }

◆ _Init()

void Dtk_Leader::ApplicationZone::_Init ( )
protected
1857  {
1859  }

◆ _Reset()

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

◆ ApplicationZoneEnumToString()

static Dtk_string Dtk_Leader::ApplicationZone::ApplicationZoneEnumToString ( const ApplicationZoneEnum inEnum)
static
1844  {
1845  switch( inEnum )
1846  {
1847  default:
1848  case Default: return L"Default";
1849  case AllAround: return L"AllAround";
1850  case AllOver: return L"AllOver";
1851  }
1852  }

◆ Clear()

void Dtk_Leader::ApplicationZone::Clear ( )

Clear elements.

1891  {
1893  _RelatedGeomElements.clear();
1894  }

◆ GetApplicationZoneType()

ApplicationZoneEnum Dtk_Leader::ApplicationZone::GetApplicationZoneType ( ) const

Retrieves the ApplicationZone Type - Read Only -.

Returns
The ApplicationZone Type.
1908 {return _ApplicationZoneType;}

◆ GetGeometries()

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

Process Related geometries.

1912  {
1913  Dtk_Size_t i,nb = this->_RelatedGeomElements.size();
1914  outGeoms.resize(nb);
1915  for(i=0;i<nb;i++)
1916  this->_RelatedGeomElements[i].Clone(outGeoms[i]);
1917  }

◆ operator=() [1/2]

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

Move assignment operator.

Parameters
inObject to move from.
1954  {
1955  if( &in == this )
1956  {
1957  return *this;
1958  }
1959  _ApplicationZoneType = in._ApplicationZoneType;
1960  _RelatedGeomElements = std::move( in._RelatedGeomElements );
1961  return *this;
1962  }

◆ operator=() [2/2]

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

Copy assignment operator.

Parameters
inObject to copy from.
1943  {
1944  if (&in == this)
1945  {
1946  return *this;
1947  }
1948  _Reset();
1949  _Copy(in);
1950  return *this;
1951  }

◆ 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.
1902  {
1903  this->_ApplicationZoneType = inApplicationZoneType;
1904  this->_RelatedGeomElements = std::move( inRelatedGeomElements );
1905  }

◆ 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
1932  {
1933  if( inTransfo == Dtk_transfo() )
1934  return dtkNoError;
1935  Dtk_Size_t i, NumGeoms = _RelatedGeomElements.size();
1936  for (i = 0; i < NumGeoms; i++)
1937  { _RelatedGeomElements[i]->Transform( inTransfo ); }
1938  return dtkNoError;
1939  }

◆ 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
1923  {
1924  Dtk_transfo TmpMatrix;
1925  TmpMatrix.addTranslate( inTranslateDir );
1926  return Transform( TmpMatrix );
1927  }

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:1854
Dtk_Leader::ApplicationZone::AllOver
@ AllOver
Definition: util_draw_dtk.hpp:1841
Dtk_Leader::Clone
virtual Dtk_Object * Clone()
Definition: util_draw_dtk.hpp:2249
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:1931
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:714
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:605
Dtk_Leader::ApplicationZone::_Reset
void _Reset()
Definition: util_draw_dtk.hpp:1871
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Leader::ApplicationZone::_RelatedGeomElements
Dtk_tab< Dtk_CurvePtr > _RelatedGeomElements
Definition: util_draw_dtk.hpp:1855
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:1860
Dtk_Leader::ApplicationZone::AllAround
@ AllAround
Definition: util_draw_dtk.hpp:1840
Dtk_Leader::ApplicationZone::_Init
void _Init()
Definition: util_draw_dtk.hpp:1856
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:144
Dtk_Leader::ApplicationZone::Default
@ Default
Definition: util_draw_dtk.hpp:1839