DATAKIT API  V2025.1
Dtk_Leader::ApplicationZone Class Reference

This is the application zone class.
It's used to gather all application zone informations. More...

Public Types

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

Public Member Functions

 ApplicationZone ()
 Base 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 &&inToBeMoved) DTK_NOEXCEPT
 \MoveOp{inTobeAssigned} More...
 
ApplicationZoneoperator= (const ApplicationZone &inToBeAssigned)
 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's used to gather all application zone informations.

Member Enumeration Documentation

◆ ApplicationZoneEnum

Enumerator
Default 
AllAround 
AllOver 
1871  {
1872  Default = 0,
1873  AllAround = 1,
1874  AllOver = 2,
1875  };

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 ( )

Base constructor.

1915  {
1916  _Init();
1917  }

◆ ~ApplicationZone()

Dtk_Leader::ApplicationZone::~ApplicationZone ( )

Destructor.

1920 { _Reset();}

Member Function Documentation

◆ _Copy()

void Dtk_Leader::ApplicationZone::_Copy ( const ApplicationZone s)
protected
1894  {
1895  _ApplicationZoneType = s._ApplicationZoneType;
1896  Dtk_Size_t i, NumElts = s._RelatedGeomElements.size();
1897  for( i = 0 ; i < NumElts ; i++)
1898  {
1899  Dtk_CurvePtr c;
1900  s._RelatedGeomElements[i].Clone(c);
1901  _RelatedGeomElements.push_back(c);
1902  }
1903  }

◆ _Init()

void Dtk_Leader::ApplicationZone::_Init ( )
protected
1890  {
1892  }

◆ _Reset()

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

◆ ApplicationZoneEnumToString()

static Dtk_string Dtk_Leader::ApplicationZone::ApplicationZoneEnumToString ( const ApplicationZoneEnum inEnum)
static
1877  {
1878  switch( inEnum )
1879  {
1880  default:
1881  case Default: return L"Default";
1882  case AllAround: return L"AllAround";
1883  case AllOver: return L"AllOver";
1884  }
1885  }

◆ Clear()

void Dtk_Leader::ApplicationZone::Clear ( )

Clear elements.

1924  {
1926  _RelatedGeomElements.clear();
1927  }

◆ GetApplicationZoneType()

ApplicationZoneEnum Dtk_Leader::ApplicationZone::GetApplicationZoneType ( ) const

Retrieves the ApplicationZone Type - Read Only -.

Returns
The ApplicationZone Type.
1941 {return _ApplicationZoneType;}

◆ GetGeometries()

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

Process Related geometries.

1945  {
1946  Dtk_Size_t i,nb = this->_RelatedGeomElements.size();
1947  outGeoms.resize(nb);
1948  for(i=0;i<nb;i++)
1949  this->_RelatedGeomElements[i].Clone(outGeoms[i]);
1950  }

◆ operator=() [1/2]

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

\MoveOp{inTobeAssigned}

1987  {
1988  if( &inToBeMoved == this )
1989  {
1990  return *this;
1991  }
1992  _ApplicationZoneType = inToBeMoved._ApplicationZoneType;
1993  _RelatedGeomElements = std::move( inToBeMoved._RelatedGeomElements );
1994  return *this;
1995  }

◆ operator=() [2/2]

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

Assignment Operator.

Parameters
inTobeAssignedObject to copy.
1976  {
1977  if (&inToBeAssigned == this)
1978  {
1979  return *this;
1980  }
1981  _Reset();
1982  _Copy(inToBeAssigned);
1983  return *this;
1984  }

◆ 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.
1935  {
1936  this->_ApplicationZoneType = inApplicationZoneType;
1937  this->_RelatedGeomElements = std::move( inRelatedGeomElements );
1938  }

◆ 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
1965  {
1966  if( inTransfo == Dtk_transfo() )
1967  return dtkNoError;
1968  Dtk_Size_t i, NumGeoms = _RelatedGeomElements.size();
1969  for (i = 0; i < NumGeoms; i++)
1970  { _RelatedGeomElements[i]->Transform( inTransfo ); }
1971  return dtkNoError;
1972  }

◆ 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
1956  {
1957  Dtk_transfo TmpMatrix;
1958  TmpMatrix.addTranslate( inTranslateDir );
1959  return Transform( TmpMatrix );
1960  }

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:1887
Dtk_Leader::ApplicationZone::AllOver
@ AllOver
Definition: util_draw_dtk.hpp:1874
Dtk_Leader::Clone
virtual Dtk_Object * Clone()
Definition: util_draw_dtk.hpp:2302
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:619
Dtk_Leader::ApplicationZone::Transform
Dtk_ErrorStatus Transform(const Dtk_transfo &inTransfo)
Applies a transformation matrix to the ApplicationZone.
Definition: util_draw_dtk.hpp:1964
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
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:603
Dtk_Leader::ApplicationZone::_Reset
void _Reset()
Definition: util_draw_dtk.hpp:1904
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Leader::ApplicationZone::_RelatedGeomElements
Dtk_tab< Dtk_CurvePtr > _RelatedGeomElements
Definition: util_draw_dtk.hpp:1888
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:1893
Dtk_Leader::ApplicationZone::AllAround
@ AllAround
Definition: util_draw_dtk.hpp:1873
Dtk_Leader::ApplicationZone::_Init
void _Init()
Definition: util_draw_dtk.hpp:1889
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:140
Dtk_Leader::ApplicationZone::Default
@ Default
Definition: util_draw_dtk.hpp:1872