www.pudn.com > miracl.zip > FLASH.H
/* * MIRACL C++ Header file flash.h * * AUTHOR : N.Coghlan * Modified by M.Scott * * PURPOSE : Definition of class Flash * * Copyright (c) 1988-2001 Shamus Software Ltd. */ #ifndef FLASH_H #define FLASH_H #includeextern "C" { #include } #ifdef MR_FLASH #ifndef MIRACL_CLASS #define MIRACL_CLASS class Miracl { /* dummy class to initialise MIRACL - MUST be called before any Bigs * * are created. This could be a problem for static/global data declared * * in modules other than the main module */ miracl *mr; public: Miracl(int nd,mr_small nb=0) {mr=mirsys(nd,nb);mr->RPOINT=TRUE;} miracl *operator&() {return mr;} ~Miracl() {mirexit();} }; #endif #ifdef BIGS #define MR_FINIT_BIG fn=&b; b.w=a; b.len=0; for (int i=0;i =(const Flash& f1, const Flash& f2) {if (fcomp(f1.fn,f2.fn) >= 0) return TRUE; else return FALSE;} friend BOOL operator==(const Flash& f1, const Flash& f2) {if (fcomp(f1.fn,f2.fn) == 0) return TRUE; else return FALSE;} friend BOOL operator!=(const Flash& f1, const Flash& f2) {if (fcomp(f1.fn,f2.fn) != 0) return TRUE; else return FALSE;} friend BOOL operator<(const Flash& f1, const Flash& f2) {if (fcomp(f1.fn,f2.fn) < 0) return TRUE; else return FALSE;} friend BOOL operator>(const Flash& f1, const Flash& f2) {if (fcomp(f1.fn,f2.fn) > 0) return TRUE; else return FALSE;} friend Flash inverse(const Flash&); friend Flash pi(); friend Flash cos(const Flash&); friend Flash sin(const Flash&); friend Flash tan(const Flash&); friend Flash acos(const Flash&); friend Flash asin(const Flash&); friend Flash atan(const Flash&); friend Flash cosh(const Flash&); friend Flash sinh(const Flash&); friend Flash tanh(const Flash&); friend Flash acosh(const Flash&); friend Flash asinh(const Flash&); friend Flash atanh(const Flash&); friend Flash log(const Flash&); friend Flash exp(const Flash&); friend Flash pow(const Flash&,const Flash&); friend Flash sqrt(const Flash&); friend Flash nroot(const Flash&,int); friend Flash fabs(const Flash&); friend double todouble(const Flash& f) { return fdsize(f.fn);} #ifndef MR_NO_STANDARD_IO friend istream& operator>>(istream&, Flash&); friend ostream& operator<<(ostream&, const Flash&); #endif #ifdef BIGS ~Flash() { } #else ~Flash() {mirkill(fn);} #endif }; #endif #endif