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:
@@ -8,6 +8,50 @@
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
int Edge::typeToInt(EdgeType type)
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
Edge::EdgeType Edge::intToType(int value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0x1:
|
||||
return EDGE_MEMBER;
|
||||
case 0x2:
|
||||
return EDGE_TYPE_OF;
|
||||
case 0x4:
|
||||
return EDGE_RETURN_TYPE_OF;
|
||||
case 0x8:
|
||||
return EDGE_PARAMETER_TYPE_OF;
|
||||
case 0x10:
|
||||
return EDGE_TYPE_USAGE;
|
||||
case 0x20:
|
||||
return EDGE_USAGE;
|
||||
case 0x40:
|
||||
return EDGE_CALL;
|
||||
case 0x80:
|
||||
return EDGE_INHERITANCE;
|
||||
case 0x100:
|
||||
return EDGE_OVERRIDE;
|
||||
case 0x200:
|
||||
return EDGE_TYPEDEF_OF;
|
||||
case 0x400:
|
||||
return EDGE_TEMPLATE_PARAMETER_OF;
|
||||
case 0x800:
|
||||
return EDGE_TEMPLATE_ARGUMENT_OF;
|
||||
case 0x1000:
|
||||
return EDGE_TEMPLATE_DEFAULT_ARGUMENT_OF;
|
||||
case 0x2000:
|
||||
return EDGE_TEMPLATE_SPECIALIZATION_OF;
|
||||
case 0x4000:
|
||||
return EDGE_INCLUDE;
|
||||
case 0x8000:
|
||||
return EDGE_AGGREGATION;
|
||||
}
|
||||
}
|
||||
|
||||
Edge::Edge(EdgeType type, Node* from, Node* to)
|
||||
: m_type(type)
|
||||
, m_from(from)
|
||||
@@ -19,6 +63,18 @@ Edge::Edge(EdgeType type, Node* from, Node* to)
|
||||
checkType();
|
||||
}
|
||||
|
||||
Edge::Edge(Id id, EdgeType type, Node* from, Node* to)
|
||||
: Token(id)
|
||||
, m_type(type)
|
||||
, m_from(from)
|
||||
, m_to(to)
|
||||
{
|
||||
m_from->addEdge(this);
|
||||
m_to->addEdge(this);
|
||||
|
||||
checkType();
|
||||
}
|
||||
|
||||
Edge::Edge(const Edge& other, Node* from, Node* to)
|
||||
: Token(other)
|
||||
, m_type(other.m_type)
|
||||
|
||||
Reference in New Issue
Block a user