Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pnt Struct Reference

Point object that represents a single point. More...

#include <datatypedef.h>

Public Member Functions

 pnt ()
 Constructor that initializes values to defaults. More...
 
 ~pnt ()
 Destructor. More...
 
 pnt (const pnt &p)
 Deep copy constructor. More...
 
pntoperator= (const pnt &p)
 Equals operator, deep copy. More...
 

Public Attributes

long double * vals
 
int size
 

Detailed Description

Point object that represents a single point.

Definition at line 68 of file datatypedef.h.

Constructor & Destructor Documentation

pnt ( )
inline

Constructor that initializes values to defaults.

Definition at line 75 of file datatypedef.h.

References size, and vals.

75  {
76  size = 0;
77  vals = NULL;
78  }
int size
Definition: datatypedef.h:70
long double * vals
Definition: datatypedef.h:69
~pnt ( )
inline

Destructor.

Definition at line 83 of file datatypedef.h.

References size, and vals.

83  {
84  if(size > 0)
85  delete[] vals;
86  }
int size
Definition: datatypedef.h:70
long double * vals
Definition: datatypedef.h:69
pnt ( const pnt p)
inline

Deep copy constructor.

Definition at line 91 of file datatypedef.h.

References i, size, and vals.

91  {
92  size = p.size;
93 
94  if(size > 0){
95  vals = new long double[size];
96 
97  for(int i=0; i<size; i++){
98  vals[i] = p.vals[i];
99  }
100  }
101  }
int size
Definition: datatypedef.h:70
long double * vals
Definition: datatypedef.h:69
blockLoc i
Definition: read.cpp:79

Member Function Documentation

pnt& operator= ( const pnt p)
inline

Equals operator, deep copy.

Returns
Reference to new object

Definition at line 107 of file datatypedef.h.

References i, size, and vals.

107  {
108 
109  if(this != &p){
110  if(size > 0)
111  delete[] vals;
112 
113  size = p.size;
114  vals = new long double[size];
115 
116  for(int i=0; i<size; i++){
117  vals[i] = p.vals[i];
118  }
119  }
120 
121  return *this;
122  }
int size
Definition: datatypedef.h:70
long double * vals
Definition: datatypedef.h:69
blockLoc i
Definition: read.cpp:79

Member Data Documentation


The documentation for this struct was generated from the following file: