Open
Graph Drawing
Framework

 v.2010.10
 

Classes | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables

basic.h File Reference

Basic declarations, included by all source files. More...

#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <string.h>
#include <math.h>
#include <ogdf/basic/exceptions.h>
#include <ogdf/basic/memory.h>
#include <ogdf/basic/comparer.h>

Go to the source code of this file.

Classes

class  ogdf::Initialization
class  ogdf::BucketFunc< E >
 Abstract base class for bucket functions. More...

Namespaces

namespace  ogdf
 

The namespace for all OGDF objects.


Defines

#define OGDF_ASSERT(expr)
#define OGDF_ASSERT_IF(minLevel, expr)
#define OGDF_SET_DEBUG_LEVEL(level)
#define OGDF_LIKELY(x)   (x)
#define OGDF_UNLIKELY(x)   (x)
#define OGDF_NODEFAULT
#define OGDF_DECL_ALIGN(b)
#define __SIZEOF_POINTER__   4
#define OGDF_LP_SOLVER
#define OGDF_EXPORT
#define SIZE_MAX   ((size_t)-1)

Typedefs

typedef signed char __int8
typedef short __int16
typedef int __int32
typedef long long __int64
typedef unsigned char __uint8
typedef unsigned short __uint16
typedef unsigned int __uint32
typedef unsigned long long __uint64

Enumerations

enum  ogdf::Direction { ogdf::before, ogdf::after }
enum  ogdf::FileType { ogdf::ftEntry, ogdf::ftFile, ogdf::ftDirectory }
 

The type of an entry in a directory.

More...

Functions

template<class T >
ogdf::min (const T &x, const T &y)
 Returns minimum of x and y.
template<class T >
ogdf::max (const T &x, const T &y)
 Returns maximum of x and y.
int ogdf::randomNumber (int low, int high)
 Returns random integer between low and high (including).
double ogdf::randomDouble (double low, double high)
 Returns random double value between low and high.
double ogdf::randomDoubleNormal (double m, double sd)
double ogdf::usedTime (double &T)
template<class E >
bool ogdf::doDestruction (const E *)
template<>
bool ogdf::doDestruction (const char *)
template<>
bool ogdf::doDestruction< int > (const int *)
template<>
bool ogdf::doDestruction< double > (const double *)
bool ogdf::isFile (const char *fileName)
 Returns true iff fileName is a regular file (not a directory).
bool ogdf::isDirectory (const char *fileName)
 Returns true iff fileName is a directory.
void ogdf::changeDir (const char *dirName)
 Changes current directory to dirName.
void ogdf::getFiles (const char *dirName, List< String > &files, const char *pattern="*")
 Returns in files the list of files in directory dirName.
void ogdf::getFilesAppend (const char *dirName, List< String > &files, const char *pattern="*")
 Appends to files the list of files in directory dirName.
void ogdf::getSubdirs (const char *dirName, List< String > &subdirs, const char *pattern="*")
 Returns in subdirs the list of directories contained in directory dirName.
void ogdf::getSubdirsAppend (const char *dirName, List< String > &subdirs, const char *pattern="*")
 Appends to subdirs the list of directories contained in directory dirName.
void ogdf::getEntries (const char *dirName, List< String > &entries, const char *pattern="*")
 Returns in entries the list of all entries contained in directory dirName.
void ogdf::getEntriesAppend (const char *dirName, List< String > &entries, const char *pattern="*")
 Appends to entries the list of all entries contained in directory dirName.
void ogdf::getEntries (const char *dirName, FileType t, List< String > &entries, const char *pattern="*")
 Returns in entries the list of all entries of type t contained in directory dirName.
void ogdf::getEntriesAppend (const char *dirName, FileType t, List< String > &entries, const char *pattern="*")
 Appends to entries the list of all entries of type t contained in directory dirName.
const char ogdf::NEWLINE ('\n')
const char ogdf::INDENTCHAR (' ')
const int ogdf::INDENTSIZE (2)
int ogdf::sprintf (char *buffer, size_t, const char *format,...)
int ogdf::vsprintf (char *buffer, size_t, const char *format, va_list argptr)
int ogdf::strcat (char *strDest, size_t, const char *strSource)
int ogdf::strcpy (char *strDest, size_t, const char *strSource)
int ogdf::strncpy (char *strDest, size_t, const char *strSource, size_t count)
int ogdf::localtime (struct tm *ptm, const time_t *timer)

Variables

static Initialization ogdf::s_ogdfInitializer
const double ogdf::pi = 3.1415926535897932384626433832795028841971
const double ogdf::euler = 2.7182818284590452353602874713526624977572

Detailed Description

Basic declarations, included by all source files.

Author:
Carsten Gutwenger
License:
This file is part of the Open Graph Drawing Framework (OGDF).

Copyright (C). All rights reserved. See README.txt in the root directory of the OGDF installation for details.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation and appearing in the files LICENSE_GPL_v2.txt and LICENSE_GPL_v3.txt included in the packaging of this file.
In addition, as a special exception, you have permission to link this software with the libraries of the COIN-OR Osi project (http://www.coin-or.org/projects/Osi.xml), all libraries required by Osi, and all LP-solver libraries directly supported by the COIN-OR Osi project, and distribute executables, as long as you follow the requirements of the GNU General Public License in regard to all of the software in the executable aside from these third-party libraries.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See also:
http://www.gnu.org/copyleft/gpl.html

Definition in file basic.h.


Define Documentation

#define __SIZEOF_POINTER__   4

Definition at line 137 of file basic.h.

#define OGDF_ASSERT (   expr  ) 

Definition at line 84 of file basic.h.

#define OGDF_ASSERT_IF (   minLevel,
  expr 
)

Definition at line 85 of file basic.h.

#define OGDF_DECL_ALIGN (   b  ) 

Definition at line 130 of file basic.h.

#define OGDF_EXPORT

Definition at line 192 of file basic.h.

#define OGDF_LIKELY (   x  )     (x)

Definition at line 126 of file basic.h.

#define OGDF_LP_SOLVER

Definition at line 170 of file basic.h.

#define OGDF_NODEFAULT

Definition at line 128 of file basic.h.

#define OGDF_SET_DEBUG_LEVEL (   level  ) 

Definition at line 86 of file basic.h.

#define OGDF_UNLIKELY (   x  )     (x)

Definition at line 127 of file basic.h.

#define SIZE_MAX   ((size_t)-1)

Definition at line 252 of file basic.h.


Typedef Documentation

typedef short __int16

Definition at line 211 of file basic.h.

typedef int __int32

Definition at line 212 of file basic.h.

typedef long long __int64

Definition at line 213 of file basic.h.

typedef signed char __int8

Definition at line 210 of file basic.h.

typedef unsigned short __uint16

Definition at line 215 of file basic.h.

typedef unsigned int __uint32

Definition at line 216 of file basic.h.

typedef unsigned long long __uint64

Definition at line 217 of file basic.h.

typedef unsigned char __uint8

Definition at line 214 of file basic.h.