data: database storage

* replaced storage by a new version that utilizes sqlite for persistence.
* added SqliteStorage to manage direct access to the database.
* added testsuit for sqlite.
* slimmed down the protected interface of the storage.
* changed tests in StorageTestSuit to avoid using protected methods of the storage.
* added functions to begin and commit a transaction to the storage.
* removed GraphFilterTestSuite.
* removed GraphFilterConductorTestSuite.
* added Node and Edge constructor that takes id as parameter
* added constructor for TokenComponentNameCached that accepts NameHierarchy as parameter
* added TokenLocation constructor that takes locationId as parameter.
* created respective construction functions in TokenLocatonLine, -File and -Collection.

fortune cookie message = Recognition will come from unexpected sources.
This commit is contained in:
malte_langkabel
2015-08-25 18:07:02 +02:00
parent d996cf384d
commit e628241b02
63 changed files with 167982 additions and 3582 deletions
+52
View File
@@ -18,6 +18,13 @@ Node::Node(NodeType type, std::shared_ptr<TokenComponentName> nameComponent)
{
}
Node::Node(Id id, NodeType type, std::shared_ptr<TokenComponentName> nameComponent)
: Token(id)
, m_type(type)
, m_nameComponent(nameComponent)
{
}
Node::Node(const Node& other)
: Token(other)
, m_type(other.m_type)
@@ -371,6 +378,51 @@ std::string Node::getTypeString(NodeType type)
return "";
}
int Node::typeToInt(NodeType type)
{
return type;
}
Node::NodeType Node::intToType(int value)
{
switch (value)
{
case 0x1:
return NODE_UNDEFINED;
case 0x2:
return NODE_UNDEFINED_TYPE;
case 0x4:
return NODE_UNDEFINED_VARIABLE;
case 0x8:
return NODE_UNDEFINED_FUNCTION;
case 0x10:
return NODE_STRUCT;
case 0x20:
return NODE_CLASS;
case 0x40:
return NODE_GLOBAL_VARIABLE;
case 0x80:
return NODE_FIELD;
case 0x100:
return NODE_FUNCTION;
case 0x200:
return NODE_METHOD;
case 0x400:
return NODE_NAMESPACE;
case 0x800:
return NODE_ENUM;
case 0x1000:
return NODE_ENUM_CONSTANT;
case 0x2000:
return NODE_TYPEDEF;
case 0x4000:
return NODE_TEMPLATE_PARAMETER_TYPE;
case 0x8000:
return NODE_FILE;
}
return NODE_UNDEFINED;
}
std::string Node::getTypeString() const
{
return getTypeString(m_type);