Delphi & Pascal (česká wiki)
/* ========================================================================== */ /* */ /* CCastic.h */ /* */ /* Description */ /* Header pro ccastic.cpp */ /* Trida vypocita rapitity castice pt nad souborem podle vzorce. */ /* */ /* ========================================================================== */ #include <stdio.h> #include <conio.h> #include <math.h> #define TMP_FILE "temp.$$$" #define POC_CURSORS 300 // struktura castice typedef struct CASTIC { long por; int event; int poradi; int cislo; float px; float py; float pz; float y; } castic; // trida class CCastic { private: FILE *f; fpos_t filepos [POC_CURSORS]; castic cs_cursor [POC_CURSORS]; castic cs; int hcast; long lsize; long por; float m; char rz; int N; // pocet pro virtualni event public: CCastic(char* meno, float _m); ~CCastic(); void MoveFirst(); void MoveNext(); void MovePrev(); void MoveLast(); int IsEOF(); void SetCursor(int i); void GetCursor(int i); void ClearCursor(); void GetLineSize(); float CalcRapidity(); float CalcFaktorC(castic cs2); float CalcPt(); void SetM(float _m); castic GetCastice(); castic GetCasticeCursor(int i); void ViewRuzica(long cislo=0); void CountN(); int GetN(); };