summaryrefslogtreecommitdiff
path: root/include/basic/codecompletecache.hxx
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-24 17:27:02 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-07-24 17:27:02 +0200
commitfd35319cbf96e215cf52db70d947ff0b5cf96948 (patch)
tree66fe50ea24117c90a44f75a3261e4449199d5d34 /include/basic/codecompletecache.hxx
parentc4373b6e3b07bbd0d633499da4e1afd692d03889 (diff)
GSOC work, cache implementation fix, code fixes
The CodeCompleteDataCache got a new implementation: global variables are stored separately. The "static const" OUString-s were removed from the class. Data extraction is only done when pressing the dot key. Change-Id: I3ff94c0c6eabe328761336d4c74744eb7efc6056
Diffstat (limited to 'include/basic/codecompletecache.hxx')
-rw-r--r--include/basic/codecompletecache.hxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx
index 57ed673c13fa..480c3c1dcf4c 100644
--- a/include/basic/codecompletecache.hxx
+++ b/include/basic/codecompletecache.hxx
@@ -33,6 +33,7 @@ typedef boost::unordered_map< OUString, OUString, OUStringHash > CodeCompleteVar
typedef boost::unordered_map< OUString, CodeCompleteVarTypes, OUStringHash > CodeCompleteVarScopes;
/* procedure, CodeCompleteVarTypes */
+
class BASIC_DLLPUBLIC CodeCompleteOptions
{
/*
@@ -63,11 +64,9 @@ class BASIC_DLLPUBLIC CodeCompleteDataCache
* */
private:
CodeCompleteVarScopes aVarScopes;
+ CodeCompleteVarTypes aGlobalVars;
public:
- static const OUString GLOB_KEY;
- static const OUString NOT_FOUND;
-
CodeCompleteDataCache(){}
virtual ~CodeCompleteDataCache(){}
@@ -76,9 +75,11 @@ public:
void SetVars( const CodeCompleteVarScopes& aScopes );
const CodeCompleteVarScopes& GetVars() const;
- void InsertProcedure( const OUString& sProcName, const CodeCompleteVarTypes& aVarTypes );
- OUString GetVariableType( const OUString& sVarName, const OUString& sProcName ) const;
+ void InsertGlobalVar( const OUString& sVarName, const OUString& sVarType );
+ void InsertLocalVar( const OUString& sProcName, const OUString& sVarName, const OUString& sVarType );
+ OUString GetVarType( const OUString& sVarName );
void print() const; // wrapper for operator<<, prints to std::cerr
+ void Clear();
};
#endif // CODECOMPLETECACHE_H