raiigraph
C++ RAII for igraph data structures
Loading...
Searching...
No Matches
initialize.hpp
Go to the documentation of this file.
1#ifndef RAIIGRAPH_INITIALIZE_HPP
2#define RAIIGRAPH_INITIALIZE_HPP
3
4#include "error.hpp"
5
11namespace raiigraph {
12
20inline bool initialize() {
21 static bool initialized = false;
22 if (initialized) {
23 return true;
24 }
25
26 check_code(igraph_setup());
27 return false;
28}
29
30}
31
32#endif
Error handling for raiigraph.
Utilities for manipulating igraph data structures in C++.
Definition error.hpp:11
void check_code(igraph_error_t code)
Definition error.hpp:39
bool initialize()
Definition initialize.hpp:20