/*************** Xobject H Declares Source Code File (.H) **************/ /* Name: XOBJECT.H Version 2.4 */ /* */ /* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ /* */ /* This file contains the XOBJECT and derived classes declares. */ /***********************************************************************/
#ifndef __XOBJECT__H #define __XOBJECT__H
/***********************************************************************/ /* Include required application header files */ /* block.h is header containing Block global declarations. */ /***********************************************************************/ #include"block.h" #include"valblk.h"// includes value.h
/***********************************************************************/ /* Types used in some class definitions. */ /***********************************************************************/ typedefclass STRING *PSTRG;
/***********************************************************************/ /* The pointer to the one and only needed void object. */ /***********************************************************************/ extern PXOB const pXVOID;
/***********************************************************************/ /* Class XOBJECT is the base class for all classes that can be used */ /* in evaluation operations: FILTER, EXPRESSION, SCALF, FNC, COLBLK, */ /* SELECT, FILTER as well as all the constant object types. */ /***********************************************************************/ class DllExport XOBJECT : public BLOCK { public:
XOBJECT(void) {Value = NULL; Constant = false;}
protected:
PVAL Value; // The current value of the object. bool Constant; // true for an object having a constant value.
}; // end of class XOBJECT
/***********************************************************************/ /* Class XVOID: represent a void (null) object. */ /* Used to represent a void parameter for count(*) or for a filter. */ /***********************************************************************/ class DllExport XVOID : public XOBJECT { public:
XVOID(void) {Constant = true;}
// Implementation int GetType(void) override {return TYPE_VOID;} int GetLength(void) override {return0;} int GetLengthEx(void) override {return0;}
PSZ GetCharValue(void) override {return NULL;} int GetIntValue(void) override {return0;} double GetFloatValue(void) override {return0.0;} int GetScale() override {return0;}
// Methods bool Compare(PXOB xp) override {return xp->GetType() == TYPE_VOID;} bool SetFormat(PGLOBAL, FORMAT&) override {returntrue;}
}; // end of class XVOID
/***********************************************************************/ /* Class CONSTANT: represents a constant XOBJECT of any value type. */ /* Note that the CONSTANT class is a friend of the VALUE class; */ /***********************************************************************/ class DllExport CONSTANT : public XOBJECT { public:
CONSTANT(PGLOBAL g, void *value, short type);
CONSTANT(PGLOBAL g, int n);
CONSTANT(PVAL valp) {Value = valp; Constant = true;}
// Implementation int GetType(void) override {return TYPE_CONST;} int GetResultType(void) override {return Value->Type;} int GetLength(void) override {return Value->GetValLen();} int GetScale() override {return Value->GetValPrec();} int GetLengthEx(void) override;
/***********************************************************************/ /* Class STRING handles variable length char strings. */ /* It is mainly used to avoid buffer overrun. */ /***********************************************************************/ class DllExport STRING : public BLOCK { public: // Constructor
STRING(PGLOBAL g, uint n, PCSZ str = NULL);
// Members
PGLOBAL G; // To avoid parameter
PSZ Strp; // The char string
uint Length; // String length
uint Size; // Allocated size bool Trc; // When truncated char *Next; // Next alloc position
}; // end of class STRING
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.