8a89f6601d
Implemented untested UniqueOrderedIndex. Introduced TypeGroupEdge/Vertex into database. Added Index capabilityes to PropertyFamily. Added method for adding index. Added method for removing index.
27 lines
354 B
C++
27 lines
354 B
C++
#pragma once
|
|
|
|
template <class T>
|
|
class OptionPtr
|
|
{
|
|
public:
|
|
OptionPtr() {}
|
|
OptionPtr(T *ptr) : ptr(ptr) {}
|
|
|
|
bool is_present() { return ptr != nullptr; }
|
|
|
|
T *get()
|
|
{
|
|
assert(is_present());
|
|
return ptr;
|
|
}
|
|
|
|
private:
|
|
T *ptr = nullptr;
|
|
};
|
|
|
|
template <class T>
|
|
auto make_option_ptr(T *t)
|
|
{
|
|
return OptionPtr<T>(t);
|
|
}
|