summaryrefslogtreecommitdiff
path: root/idl/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-12 08:58:26 +0200
committerNoel Grandin <noel@peralex.com>2016-02-12 09:13:43 +0200
commitb27dcabad349b68d2068dfe68924a5b0867f5ee9 (patch)
tree1f8810d1d321445b112ed76ba727dba1b3710450 /idl/inc
parentf3f533f0c60d90fb723ecf417ce3a20bc38fa6c7 (diff)
move parsing of enum into SvIdlParser
Change-Id: I89eef20d62f92f7345750c48c34c9f3b7bca287e
Diffstat (limited to 'idl/inc')
-rw-r--r--idl/inc/lex.hxx4
-rw-r--r--idl/inc/module.hxx2
-rw-r--r--idl/inc/parser.hxx6
-rw-r--r--idl/inc/types.hxx6
4 files changed, 11 insertions, 7 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index a9869de4c2ed..7780a36a49ec 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -198,14 +198,16 @@ public:
return false;
}
- void ReadIfDelimiter()
+ bool ReadIfDelimiter()
{
if( (*pCurToken)->IsChar()
&& (';' == (*pCurToken)->GetChar()
|| ',' == (*pCurToken)->GetChar()) )
{
GetToken_Next();
+ return true;
}
+ return false;
}
sal_uInt32 Tell() const { return pCurToken-aTokList.begin(); }
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index 6ac8fcd07acf..93f335a23449 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -23,7 +23,7 @@
#include <slot.hxx>
#include <object.hxx>
-class SvMetaModule : public SvMetaReference
+class SvMetaModule : public SvMetaObject
{
bool bImported;
public:
diff --git a/idl/inc/parser.hxx b/idl/inc/parser.hxx
index b1f9a67b4956..67f63e3fe0fc 100644
--- a/idl/inc/parser.hxx
+++ b/idl/inc/parser.hxx
@@ -25,6 +25,7 @@
class SvTokenStream;
class SvIdlDataBase;
class SvMetaModule;
+class SvMetaTypeEnum;
class SvIdlParser
{
@@ -36,6 +37,11 @@ public:
bool ReadModuleHeader(SvMetaModule& rModule);
bool ReadModuleBody(SvMetaModule& rModule);
void ReadModuleElement( SvMetaModule& rModule );
+ void ReadEnum(SvMetaTypeEnum& rEnum);
+ void ReadEnumValue( SvMetaTypeEnum& rEnum );
+ void ReadChar(char cChar);
+ void ReadDelimiter();
+ OString ReadIdentifier();
};
#endif // INCLUDED_IDL_INC_PARSER_HXX
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 748dc6ef637d..47c56722bab1 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -107,19 +107,15 @@ public:
class SvMetaTypeEnum : public SvMetaType
{
+public:
SvRefMemberList<SvMetaEnumValue *> aEnumValueList;
OString aPrefix;
-protected:
- virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
-public:
SvMetaTypeEnum();
sal_uLong Count() const { return aEnumValueList.size(); }
const OString& GetPrefix() const { return aPrefix; }
SvMetaEnumValue * GetObject( sal_uLong n ) const
{ return aEnumValueList[n]; }
-
- virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
};
class SvMetaTypevoid : public SvMetaType