#include <brpress.h>
Inheritance diagram for PressureItem:

| Public Member Functions | |
| PressureItem () | |
| PressureItem (const PressureItem &) | |
| copy constructor | |
| PressureItem (UINT32 Pressure, double Proportion, MILLIPOINT Distance) | |
| constructor with initialisation | |
| PressureItem | operator= (const PressureItem &Other) | 
| copy constructor | |
| void | WorkOutProportion (MILLIPOINT PathLength) | 
| calculates how far along the path we are and sets the member variable | |
| BOOL | WriteNative (CXaraFileRecord *pRecord) | 
| Writes out a record of this PressureItem to the record supplied. Note that because PressureItems are generally part of a larger object they do not have their own tag etc. This function is merely a convenience function. | |
| Public Attributes | |
| UINT32 | m_Pressure | 
| double | m_Proportion | 
| MILLIPOINT | m_Distance | 
Definition at line 143 of file brpress.h.
| 
 | 
| 
 Definition at line 148 of file brpress.h. 00148 {m_Pressure = 0; m_Proportion = 0; m_Distance = 0;} 
 | 
| 
 | 
| copy constructor 
 
 
 
 Definition at line 142 of file brpress.cpp. 00143 { 00144 m_Pressure = Other.m_Pressure; 00145 m_Proportion = Other.m_Proportion; 00146 m_Distance = Other.m_Distance; 00147 } 
 | 
| 
 | ||||||||||||||||
| constructor with initialisation 
 
 
 
 Definition at line 123 of file brpress.cpp. 00124 { 00125 m_Pressure = Pressure; 00126 m_Proportion = Proportion; 00127 m_Distance = Distance; 00128 } 
 | 
| 
 | 
| copy constructor 
 
 
 
 Definition at line 162 of file brpress.cpp. 00163 { 00164 m_Pressure = Other.m_Pressure; 00165 m_Proportion = Other.m_Proportion; 00166 m_Distance = Other.m_Distance; 00167 00168 return *this; 00169 } 
 | 
| 
 | 
| calculates how far along the path we are and sets the member variable 
 
 
 
 Definition at line 184 of file brpress.cpp. 00185 { 00186 if (m_Distance < 0 || m_Distance > PathLength) 00187 { 00188 ERROR3("Attempting to calculate proportional distance with invalid data"); 00189 TRACEUSER( "Diccon", _T("Invalid distance: %d, Path Length: %d\n"), m_Distance, PathLength ); 00190 m_Proportion = 1.0; 00191 return; 00192 } 00193 m_Proportion = (double)((double)m_Distance / (double)PathLength); 00194 //if (m_Proportion < 0) 00195 // TRACEUSER( "Diccon", _T("Proportion: %f\n"), m_Proportion); 00196 00197 } 
 | 
| 
 | 
| Writes out a record of this PressureItem to the record supplied. Note that because PressureItems are generally part of a larger object they do not have their own tag etc. This function is merely a convenience function. 
 
 
 
 
 Definition at line 217 of file brpress.cpp. 00218 { 00219 ERROR2IF(pRecord == NULL, FALSE, "Record is NULL in PressureItem::WriteNative"); 00220 00221 BOOL ok = pRecord->WriteINT32((INT32)m_Pressure); 00222 if (ok) ok = pRecord->WriteDOUBLE(m_Proportion); 00223 if (ok) ok = pRecord->WriteINT32(m_Distance); 00224 00225 return ok; 00226 } 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
 1.4.4
 1.4.4