Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
Contour< doubletype > Class Template Reference

#include <Contour.h>

Inheritance diagram for Contour< doubletype >:
Object

Public Member Functions

 Contour ()
 
 Contour (int pid, int pnods, doubletype *px, doubletype *py, bool pclosed)
 
 ~Contour ()
 
Objectcopy ()
 
void DeepEcho (void)
 
void Echo (void)
 
int Id (void)
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
int ObjectEnum (void)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 

Data Fields

int id
 
int nods
 
doubletype * x
 
doubletype * y
 
bool closed
 

Detailed Description

template<class doubletype>
class Contour< doubletype >

Definition at line 15 of file Contour.h.

Constructor & Destructor Documentation

◆ Contour() [1/2]

template<class doubletype >
Contour< doubletype >::Contour ( )
inline

Definition at line 26 of file Contour.h.

26  {/*{{{*/
27  this->id = 0;
28  this->nods = 0;
29  this->x = NULL;
30  this->y = NULL;
31  this->closed = false;
32  }

◆ Contour() [2/2]

template<class doubletype >
Contour< doubletype >::Contour ( int  pid,
int  pnods,
doubletype *  px,
doubletype *  py,
bool  pclosed 
)
inline

Definition at line 34 of file Contour.h.

34  {/*{{{*/
35 
36  this->id = pid;
37  this->nods = pnods;
38  this->closed = pclosed;
39  if(nods){
40  this->x=xNew<doubletype>(nods);
41  xMemCpy<doubletype>(this->x,px,nods);
42  this->y=xNew<doubletype>(nods);
43  xMemCpy<doubletype>(this->y,py,nods);
44  }
45  }

◆ ~Contour()

template<class doubletype >
Contour< doubletype >::~Contour ( )
inline

Definition at line 47 of file Contour.h.

47  {/*{{{*/
48  xDelete<doubletype>(this->x);
49  xDelete<doubletype>(this->y);
50  }

Member Function Documentation

◆ copy()

template<class doubletype >
Object* Contour< doubletype >::copy ( void  )
inlinevirtual

Implements Object.

Definition at line 54 of file Contour.h.

54  {/*{{{*/
55 
56  Contour* contour = new Contour(this->id,this->nods,this->x,this->y,this->closed);
57 
58  return (Object*) contour;
59  }

◆ DeepEcho()

template<class doubletype >
void Contour< doubletype >::DeepEcho ( void  )
inlinevirtual

Implements Object.

Definition at line 61 of file Contour.h.

61  {/*{{{*/
62  this->Echo();
63  }

◆ Echo()

template<class doubletype >
void Contour< doubletype >::Echo ( void  )
inlinevirtual

Implements Object.

Definition at line 65 of file Contour.h.

65  {/*{{{*/
66  _printf_(" Contour: " << id << "\n");
67  _printf_(" nods: " << nods << "\n");
68  _printf_(" closed: " << (closed?"true":"false") << "\n");
69  if(nods){
70  _printf_(" x , y:\n");
71  for(int i=0;i<nods;i++){
72  _printf_(i << ": " << x[i] << " | " << y[i] << "\n");
73  }
74  }
75  }

◆ Id()

template<class doubletype >
int Contour< doubletype >::Id ( void  )
inlinevirtual

Implements Object.

Definition at line 77 of file Contour.h.

77  {/*{{{*/
78  return id;
79  }

◆ Marshall()

template<class doubletype >
void Contour< doubletype >::Marshall ( char **  pmarshalled_data,
int *  pmarshalled_data_size,
int  marshall_direction 
)
inlinevirtual

Implements Object.

Definition at line 81 of file Contour.h.

81  {/*{{{*/
82  _error_("not implemented yet!");
83  }

◆ ObjectEnum()

template<class doubletype >
int Contour< doubletype >::ObjectEnum ( void  )
inlinevirtual

Implements Object.

Definition at line 85 of file Contour.h.

85  {/*{{{*/
86  return ContourEnum;
87  }

Field Documentation

◆ id

template<class doubletype >
int Contour< doubletype >::id

Definition at line 19 of file Contour.h.

◆ nods

template<class doubletype >
int Contour< doubletype >::nods

Definition at line 20 of file Contour.h.

◆ x

template<class doubletype >
doubletype* Contour< doubletype >::x

Definition at line 21 of file Contour.h.

◆ y

template<class doubletype >
doubletype* Contour< doubletype >::y

Definition at line 22 of file Contour.h.

◆ closed

template<class doubletype >
bool Contour< doubletype >::closed

Definition at line 23 of file Contour.h.


The documentation for this class was generated from the following file:
ContourEnum
@ ContourEnum
Definition: EnumDefinitions.h:1015
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
Contour
Definition: Contour.h:15
Contour::Contour
Contour()
Definition: Contour.h:26
Object
Definition: Object.h:13
Contour::nods
int nods
Definition: Contour.h:20
Contour::closed
bool closed
Definition: Contour.h:23
Contour::y
doubletype * y
Definition: Contour.h:22
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
Contour::id
int id
Definition: Contour.h:19
Contour::x
doubletype * x
Definition: Contour.h:21
Contour::Echo
void Echo(void)
Definition: Contour.h:65