class SbiSymDef { // general symbol entry friendclass SbiSymPool; protected:
OUString aName;
SbxDataType eType;
SbiSymPool* pIn; // parent pool
std::unique_ptr<SbiSymPool> pPool; // pool for sub-elements short nLen; // string length for STRING*n short nDims;
sal_uInt16 nId;
sal_uInt16 nTypeId; // Dim X AS data type
sal_uInt16 nProcId;
sal_uInt16 nPos;
sal_uInt32 nChain; bool bNew : 1; // true: Dim As New... bool bChained : 1; // true: symbol is defined in code bool bByVal : 1; // true: ByVal-parameter bool bOpt : 1; // true: optional parameter bool bStatic : 1; // true: STATIC variable bool bAs : 1; // true: data type defined per AS XXX bool bGlobal : 1; // true: global variable bool bParamArray : 1; // true: ParamArray parameter bool bWithEvents : 1; // true: Declared WithEvents bool bWithBrackets : 1; // true: Followed by ()
sal_uInt16 nDefaultId; // Symbol number of default value short nFixedStringLength; // String length in: Dim foo As String*Length public:
SbiSymDef( OUString ); virtual ~SbiSymDef(); virtual SbiProcDef* GetProcDef(); virtual SbiConstDef* GetConstDef();
SbiSymPool& GetPool();
sal_uInt32 Define(); // define symbol in code
sal_uInt32 Reference(); // reference symbol in code
private:
SbiSymDef( const SbiSymDef& ) = delete;
};
class SbiProcDef final : public SbiSymDef { // procedure definition (from basic):
SbiSymPool aParams;
SbiSymPool aLabels; // local jump targets
OUString aLibName;
OUString aAlias;
sal_uInt16 nLine1, nLine2; // line area
PropertyMode mePropMode; // Marks if this is a property procedure and which
OUString maPropName; // Property name if property procedure (!= proc name) bool bCdecl : 1; // true: CDECL given bool bPublic : 1; // true: proc is PUBLIC bool mbProcDecl : 1; // true: instantiated by SbiParser::ProcDecl public:
SbiProcDef( SbiParser*, const OUString&, bool bProcDecl=false ); virtual ~SbiProcDef() override; virtual SbiProcDef* GetProcDef() override; virtualvoid SetType( SbxDataType ) override;
SbiSymPool& GetParams() { return aParams; }
SbiSymPool& GetLabels() { return aLabels; }
SbiSymPool& GetLocals() { return GetPool();}
OUString& GetLib() { return aLibName; }
OUString& GetAlias() { return aAlias; } void SetPublic( bool b ) { bPublic = b; } bool IsPublic() const { return bPublic; } void SetCdecl( bool b ) { bCdecl = b; } bool IsCdecl() const { return bCdecl; } bool IsUsedForProcDecl() const { return mbProcDecl; } void SetLine1( sal_uInt16 n ) { nLine1 = n; }
sal_uInt16 GetLine1() const { return nLine1; } void SetLine2( sal_uInt16 n ) { nLine2 = n; }
sal_uInt16 GetLine2() const { return nLine2; }
PropertyMode getPropertyMode() const { return mePropMode; } void setPropertyMode( PropertyMode ePropMode ); const OUString& GetPropName() const { return maPropName; }
// Match with a forward-declaration. The parameter names are // compared and the forward declaration is replaced by this void Match( SbiProcDef* pForward );
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.