VertexPtr clone_vertex (VertexPtr from) { switch (from->type()) { #define FOREACH_OP(x) case x: {CLONE_VERTEX (res, x, VertexAdaptor <x> (from)); return res;} break; #include "foreach_op.h" default: kphp_fail(); } return VertexPtr(); }
VertexPtr create_vertex (Operation op, VertexPtr first, VertexPtr second) { switch (op) { #define FOREACH_OP(x) case x: {CREATE_VERTEX (res, x, first, second); return res;} break; #include "foreach_op.h" default: kphp_fail(); } return VertexPtr(); }
VertexPtr CTinOrientDBStorage::_GetStringToVertex(String& str) { String vertexRID = _GetProperty(str, "rid"); String X = _GetProperty(str, "x"); String Y = _GetProperty(str, "y"); String HalfEdgeRID = _GetProperty(str, "halfedge"); if (HalfEdgeRID == "null") HalfEdgeRID = ""; CTinOrientDBVertex* pV = new CTinOrientDBVertex(vertexRID, atof(X.c_str()), atof(Y.c_str()), HalfEdgeRID); return VertexPtr(pV); }