Tag: cws_src680_qiq
User: fs      
Date: 06/05/10 03:19:43

Modified:
 /dba/connectivity/inc/connectivity/
  sqlparse.hxx

Log:
 added conversion from Scanner's rule ID to Rule enum value (which allows to 
implement SQLNode::getKnownRuleID)

File Changes:

Directory: /dba/connectivity/inc/connectivity/
==============================================

File [changed]: sqlparse.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/sqlparse.hxx?r1=1.18&r2=1.18.104.1
Delta lines:  +10 -4
--------------------
--- sqlparse.hxx        8 Sep 2005 05:02:35 -0000       1.18
+++ sqlparse.hxx        10 May 2006 10:19:40 -0000      1.18.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqlparse.hxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 05:02:35 $
+ *  last change: $Author: fs $ $Date: 2006/05/10 10:19:40 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -65,6 +65,8 @@
 #include "connectivity/IParseContext.hxx"
 #endif
 
+#include <map>
+
 // forward declarations
 namespace com
 {
@@ -135,11 +137,13 @@
        {
                friend class OSQLParseNode;
                friend class OSQLInternalNode;
-               friend struct OSQLParseNode::SQLParseNodeParameter;
+               friend struct SQLParseNodeParameter;
 
        private:
+        typedef ::std::map< sal_uInt32, OSQLParseNode::Rule >   RuleIDMap;
        //      static parts for parsers
                static sal_uInt32                       
s_nRuleIDs[OSQLParseNode::rule_count + 1];
+        static RuleIDMap            s_aReverseRuleIDLookup;
                static OParseContext            s_aDefaultContext;
 
        //      parts controled by mutex
@@ -205,6 +209,8 @@
                // (0, falls nicht gefunden). Die Suche nach der ID aufgrund 
eines Strings ist
                // extrem ineffizient (sequentielle Suche nach ::rtl::OUString)!
                static sal_uInt32 StrToRuleID(const ::rtl::OString & rValue);
+
+        static OSQLParseNode::Rule RuleIDToRule( sal_uInt32 _nRule );
 
                // RuleId mit enum, wesentlich effizienter
                static sal_uInt32 RuleID(OSQLParseNode::Rule eRule);




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to