[opengtl-commits] [391] add skeleton VariablesManager |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 391
Author: cyrille
Date: 2008-09-13 23:07:47 +0200 (Sat, 13 Sep 2008)
Log Message:
-----------
add skeleton VariablesManager
Added Paths:
-----------
trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.cpp
trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.h
Added: trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.cpp (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.cpp 2008-09-13 21:07:47 UTC (rev 391)
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "VariablesManager_p.h"
+
Added: trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.h (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VariablesManager_p.h 2008-09-13 21:07:47 UTC (rev 391)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GTLCORE_VARIABLES_MANAGER_P_H
+#define _GTLCORE_VARIABLES_MANAGER_P_H
+
+namespace llvm {
+ class Value;
+}
+
+namespace GTLCore {
+ class ScopedName;
+ class VariableNG;
+ namespace AST {
+ class Statement;
+ }
+ /**
+ * The variable manager is a class that manages the variable of a function
+ * when parsing code.
+ */
+ class VariablesManager {
+ public:
+ VariableNG* getVariable( const ScopedName& ) const;
+ void declareParameter( const ScopedName& , VariableNG* );
+ void declareVariable( const ScopedName& , VariableNG* );
+ void startContext();
+ void endContext();
+
+ AST::Statement* garbageCollectCurrentContext() const;
+ AST::Statement* garbageCollectEverything( llvm::Value* _ignore ) const;
+ };
+}
+
+#endif