#include "defs.h"
#include "tError.h"
Go to the source code of this file.
Classes | |
class | tFunction |
mathematical function (to be moved into tools sometime, and currently limited to linear functions) More... | |
Functions | |
template<typename T> | |
T & | operator<< (T &m, tFunction const &f) |
template<typename T> | |
T & | operator>> (T &m, tFunction &f) |
function network message writing operator |
T & operator<< | ( | T & | m, | |
tFunction const & | f | |||
) | [inline] |
m | message to write to | |
f | function to write |
Definition at line 194 of file tFunction.h.
References tFunction::GetOffset(), tFunction::GetSlope(), and nMessage::Write().
00195 { 00196 // write ID for compatibility with future extensions 00197 unsigned short ID = 1; 00198 m.Write( ID ); 00199 00200 // write values 00201 m << f.GetOffset(); 00202 m << f.GetSlope(); 00203 00204 return m; 00205 }
T & operator>> | ( | T & | m, | |
tFunction & | f | |||
) | [inline] |
function network message writing operator
m | message to read from | |
f | function to read to |
Definition at line 219 of file tFunction.h.
References nMessage::Read(), REAL, tFunction::SetOffset(), tFunction::SetSlope(), and tASSERT.
00220 { 00221 // write ID for compatibility with future extensions 00222 unsigned short ID; 00223 m.Read(ID); 00224 tASSERT( ID == 1 ); 00225 00226 // read values 00227 REAL slope, offset; 00228 m >> offset >> slope; 00229 00230 // store values 00231 f.SetOffset( offset ).SetSlope( slope ); 00232 00233 return m; 00234 }