|
Tulip
5.6.0
Large graphs analysis and drawing
|
25 #include <sys/types.h>
26 #include <tulip/tulipconf.h>
43 inline void tlp_hash_combine(std::size_t &seed,
const T &v) {
45 seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
50 extern TLP_SCOPE
const char PATH_DELIMITER;
51 extern TLP_SCOPE std::string TulipLibDir;
52 extern TLP_SCOPE std::string TulipPluginsPath;
53 extern TLP_SCOPE std::string TulipBitmapDir;
54 extern TLP_SCOPE std::string TulipShareDir;
55 extern TLP_SCOPE
bool TulipProgramExiting;
70 extern TLP_SCOPE
void initTulipLib(
const char *appDirPath =
nullptr);
80 TLP_SCOPE std::string
demangleClassName(
const char *className,
bool hideTlp =
false);
101 TLP_SCOPE std::istream *
getIgzstream(
const std::string &name,
int open_mode = std::ios::in);
111 TLP_SCOPE std::ostream *
getOgzstream(
const std::string &name,
int open_mode = std::ios::out);
156 TLP_SCOPE
bool pathExist(
const std::string &pathname);
167 std::ios_base::openmode open_mode = std::ios::in);
178 std::ios_base::openmode open_mode = std::ios::out);
182 TLP_SCOPE
bool inGuiTestingMode();
183 TLP_SCOPE
void setGuiTestingMode(
bool);
185 TLP_SCOPE
void registerTulipExitHandler();
void initRandomSequence()
Initializes a random sequence with the seed previously set Further calls to rand() or random() will r...
std::istream * getInputFileStream(const std::string &filename, std::ios_base::openmode open_mode=std::ios::in)
Cross-platform function to get an input file stream. Its purpose is to support paths on windows platf...
void initTulipLib(const char *appDirPath=nullptr)
Initializes the Tulip library. Looks for the Tulip plug-ins directory. The plug-ins directory can be ...
int randomInteger(int max)
Returns a random integer in the range [0, max] if max is positive or in the range [max,...
std::string demangleTlpClassName(const char *className)
Demangles the name of a C++ class defined in the tlp namespace.
double randomDouble(double max=1.0)
Returns a random double in the range [0, max].
std::ostream * getOutputFileStream(const std::string &filename, std::ios_base::openmode open_mode=std::ios::out)
Cross-platform function to get an output file stream. Its purpose is to support paths on windows plat...
void setSeedOfRandomSequence(unsigned int seed=UINT_MAX)
Gives the value of the seed used for further initialization of a random sequence (with further calls ...
bool pathExist(const std::string &pathname)
returns if a path exists
unsigned int randomUnsignedInteger(unsigned int max)
Returns a random unsigned integer in the range [0, max].
std::ostream * getOgzstream(const std::string &name, int open_mode=std::ios::out)
Returns an ostream to write to a gzipped file (uses gzstream lib). The stream has to be deleted after...
unsigned int getSeedOfRandomSequence()
Returns the value of the seed used for further initialization of a random sequence.
std::string demangleClassName(const char *className, bool hideTlp=false)
Demangles the name of a C++ class.
std::istream * getIgzstream(const std::string &name, int open_mode=std::ios::in)
Returns an istream to read from a gzipped file (uses gzstream lib). The stream has to be deleted afte...