summaryrefslogtreecommitdiff
path: root/idlc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'idlc/inc')
-rw-r--r--idlc/inc/idlc/astmember.hxx43
-rw-r--r--idlc/inc/idlc/astparameter.hxx41
2 files changed, 40 insertions, 44 deletions
diff --git a/idlc/inc/idlc/astmember.hxx b/idlc/inc/idlc/astmember.hxx
index ac8fa70eb877..bdcdd435e707 100644
--- a/idlc/inc/idlc/astmember.hxx
+++ b/idlc/inc/idlc/astmember.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: astmember.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jsc $ $Date: 2001-03-15 12:23:01 $
+ * last change: $Author: rt $ $Date: 2004-03-30 16:40:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,35 +58,36 @@
*
*
************************************************************************/
+
#ifndef _IDLC_ASTMEMBER_HXX_
#define _IDLC_ASTMEMBER_HXX_
#ifndef _IDLC_ASTDECLARATION_HXX_
-#include <idlc/astdeclaration.hxx>
+#include "idlc/astdeclaration.hxx"
#endif
-class AstMember : public AstDeclaration
-{
+namespace rtl { class OString; }
+class AstScope;
+class AstType;
+
+class AstMember: public AstDeclaration {
public:
- AstMember(AstType *pType, const ::rtl::OString& name, AstScope* pScope)
- : AstDeclaration(NT_member, name, pScope)
- , m_pType(pType)
- {}
- AstMember(const NodeType type,
- AstType *pType,
- const ::rtl::OString& name,
- AstScope* pScope)
- : AstDeclaration(type, name, pScope)
- , m_pType(pType)
- {}
+ AstMember(
+ AstType const * pType, rtl::OString const & name, AstScope * pScope):
+ AstDeclaration(NT_member, name, pScope), m_pType(pType) {}
+
virtual ~AstMember() {}
- AstType* getType()
- { return m_pType; }
+ AstType const * getType() const { return m_pType; }
+
+protected:
+ AstMember(
+ NodeType type, AstType const * pType, rtl::OString const & name,
+ AstScope * pScope):
+ AstDeclaration(type, name, pScope), m_pType(pType) {}
private:
- AstType* m_pType;
+ AstType const * m_pType;
};
-#endif // _IDLC_ASTMEMBER_HXX_
-
+#endif
diff --git a/idlc/inc/idlc/astparameter.hxx b/idlc/inc/idlc/astparameter.hxx
index afe2a13deb5d..f6cde3da3d1f 100644
--- a/idlc/inc/idlc/astparameter.hxx
+++ b/idlc/inc/idlc/astparameter.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: astparameter.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jsc $ $Date: 2001-03-15 12:23:01 $
+ * last change: $Author: rt $ $Date: 2004-03-30 16:41:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,6 +58,7 @@
*
*
************************************************************************/
+
#ifndef _IDLC_ASTPARAMETER_HXX_
#define _IDLC_ASTPARAMETER_HXX_
@@ -65,31 +66,25 @@
#include <idlc/astmember.hxx>
#endif
-enum Direction
-{
- DIR_IN,
- DIR_OUT,
- DIR_INOUT
-};
+enum Direction { DIR_IN, DIR_OUT, DIR_INOUT };
-class AstParameter : public AstMember
-{
+class AstParameter: public AstMember {
public:
- AstParameter(Direction direction, AstType *pType, const ::rtl::OString& name, AstScope* pScope)
- : AstMember(NT_parameter, pType, name, pScope)
- , m_direction(direction)
- , m_pType(pType)
- {}
+ AstParameter(
+ Direction direction, bool rest, AstType const * type,
+ rtl::OString const & name, AstScope * scope):
+ AstMember(NT_parameter, type, name, scope), m_direction(direction),
+ m_rest(rest) {}
+
virtual ~AstParameter() {}
- Direction getDirection()
- { return m_direction; }
- AstType* getType()
- { return m_pType; }
+ Direction getDirection() const { return m_direction; }
+
+ bool isRest() const { return m_rest; }
+
private:
- Direction m_direction;
- AstType* m_pType;
+ Direction m_direction;
+ bool m_rest;
};
-#endif // _IDLC_ASTPARAMETER_HXX_
-
+#endif