utils.h File Reference

Header file for auxilary classes. More...

#include "Python.h"
#include "datetime.h"
#include "frepple/tags.h"
#include "frepple/entity.h"
#include "pythonutils.h"
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  frepple::utils::Association< A, B, C >
 This template class represents a data structure for a load or flow network. More...
class  frepple::utils::Attribute
 A class to model keyword instances. More...
class  frepple::utils::AttributeList
 This class represents a dictionary of keyword + value pairs. More...
class  frepple::utils::CommandManager::Bookmark
class  frepple::utils::Command
 Abstract base class for all commands. More...
class  frepple::utils::CommandList
 A container command to group a series of commands together. More...
class  frepple::utils::CommandManager
 This class allows management of tasks with supporting commiting them, rolling them back, and setting bookmarks which can be undone and redone. More...
class  frepple::utils::Association< A, B, C >::ListB::const_iterator
 An iterator over the associated objects. More...
class  frepple::utils::Association< A, B, C >::ListA::const_iterator
 An iterator over the associated objects. More...
class  frepple::utils::DataElement
 This abstract class represents a attribute and value pair for updating objects in frePPLe. More...
class  frepple::utils::DataException
 An exception of this type is thrown when data errors are found. More...
class  frepple::utils::Date
 This class represents a date and time with an accuracy of one second. More...
class  frepple::utils::DateRange
 This class defines a date-range, i.e. a start-date and end-date pair. More...
class  frepple::utils::Environment
 This class groups some functions used to interact with the operating system environment. More...
class  frepple::utils::FreppleIterator< ME, ITERCLASS, DATACLASS >
 A template class to expose iterators to Python. More...
class  frepple::utils::Functor
 This abstract class is the base class used for callbacks. More...
class  frepple::utils::FunctorInstance< T, U >
 This class represents an object subscribing to a signal. More...
class  frepple::utils::FunctorStatic< T, U >
 This class represents a static subscription to a signal. More...
class  frepple::utils::HasDescription
 This is a decorator class for the main objects. More...
class  frepple::utils::HasHierarchy< T >
 This is a base class for the main objects. More...
class  frepple::utils::HasName< T >
 Base class for objects using a string as their primary key. More...
struct  frepple::utils::indent
class  frepple::utils::Association< A, B, C >::ListB::iterator
 An iterator over the associated objects. More...
class  frepple::utils::Association< A, B, C >::ListA::iterator
 An iterator over the associated objects. More...
class  frepple::utils::HasName< T >::iterator
 This class models a STL-like iterator that allows us to iterate over the named entities in a simple and safe way. More...
class  frepple::utils::CommandManager::iterator
class  frepple::utils::CommandList::iterator
class  frepple::utils::Keyword
 This class defines a keyword for the frePPLe data model. More...
class  frepple::utils::LibraryUtils
 This class holds functions that used for maintenance of the library. More...
class  frepple::utils::Association< A, B, C >::List
 A abstract base class for the internal representation of the association lists.
class  frepple::utils::Association< A, B, C >::ListA
 A list type of the "first" / "from" part of the association. More...
class  frepple::utils::Association< A, B, C >::ListB
 A list type of the "second" / "to" part of the association. More...
class  frepple::utils::LogicException
 An exception of this type is thrown when the library gets in an inconsistent state from which the normal course of action can't continue. More...
class  frepple::utils::HasHierarchy< T >::memberIterator
 This class models an STL-like iterator that allows us to iterate over the members. More...
class  frepple::utils::MetaCategory
 This class stores metadata on a data field of a class. More...
class  frepple::utils::MetaClass
 This class stores metadata about the classes in the library. The stored information goes well beyond the standard 'type_info'. More...
class  frepple::utils::Mutex
 This class is a wrapper around platform specific mutex functions. More...
class  frepple::utils::Association< A, B, C >::Node
 A base class for the class representing the association itself. More...
class  frepple::utils::NonCopyable
 Class NonCopyable is a base class.
Derive your own class from it when you want to prohibit copy construction and copy assignment. More...
class  frepple::utils::Object
 Object is the abstract base class for the main entities. More...
class  frepple::utils::PythonAttributeList
 This class is a wrapper around a Python dictionary. More...
class  frepple::utils::PythonExtension< T >
 Template class to define Python extensions. More...
class  frepple::utils::PythonExtensionBase
 This is a base class for all Python extension types. More...
class  frepple::utils::PythonFunction
 This call is a wrapper around a Python function that can be called from the C++ code. More...
class  frepple::utils::PythonInterpreter
 This class is used to maintain the Python interpreter. More...
class  frepple::utils::PythonObject
 This class handles two-way translation between the data types in C++ and Python. More...
class  frepple::utils::PythonType
 This class is a thin wrapper around the type information in Python. More...
class  frepple::utils::CommandManager::reverse_iterator
class  frepple::utils::RuntimeException
 An exception of this type is thrown when the library runs into problems that are specific at runtime.
These could either be memory problems, threading problems, file system problems, etc... More...
class  frepple::utils::ScopeMutexLock
 This is a convenience class that makes it easy (and exception-safe) to lock a mutex in a scope. More...
class  frepple::utils::Tags
 This class holds a collection of all XML tags used by frepple. More...
class  frepple::utils::ThreadGroup
 This class supports parallel execution of a number of functions. More...
class  frepple::utils::TimePeriod
 This class represents a time duration with an accuracy of one second. More...
class  frepple::utils::Timer
 This class is used to measure the processor time used by the program. More...
class  frepple::utils::Tree
 This class implements a binary tree data structure. It is used as a container for entities keyed by their name. More...
class  frepple::utils::Tree::TreeNode
 This class represents a node in the tree. More...
class  frepple::utils::XMLAttributeList
 This class represents a list of XML attributes. More...
class  frepple::utils::XMLElement
 This class represents an XML element being read in from the input file. More...
class  frepple::utils::XMLEscape
class  frepple::utils::XMLInput
 This class will read in an XML-file and call the appropriate handler functions of the Object classes and objects. More...
class  frepple::utils::XMLInputFile
 This class reads XML data from a file system. More...
class  frepple::utils::XMLInputString
 This class reads XML data from a string. More...
class  frepple::utils::XMLOutput
 Base class for writing XML formatted data to an output stream. More...
class  frepple::utils::XMLOutputFile
 This class writes XML data to a flat file. More...
class  frepple::utils::XMLOutputString
 This class writes XML data to a string. More...

Namespaces

namespace  frepple
 Core namespace.
namespace  frepple::utils
 Utilities for the frePPle core.

Macros

#define DECLARE_EXPORT
#define MODULE_EXPORT   extern "C"
#define PACKAGE_VERSION   "2.0"
#define PY_SSIZE_T_MAX   INT_MAX
#define PY_SSIZE_T_MIN   INT_MIN
#define ROUNDING_ERROR   0.000001

Typedefs

typedef unsigned int frepple::utils::hashtype
typedef int Py_ssize_t

Enumerations

enum  frepple::utils::Action { frepple::utils::ADD = 0, frepple::utils::CHANGE = 1, frepple::utils::REMOVE = 2, frepple::utils::ADD_CHANGE = 3 }
enum  frepple::utils::mode { frepple::utils::DEFAULT = 0, frepple::utils::REFERENCE = 1, frepple::utils::NOHEADER = 2, frepple::utils::FULL = 3 }
enum  frepple::utils::Signal { frepple::utils::SIG_ADD = 0, frepple::utils::SIG_REMOVE = 1 }

Functions

PyObject * frepple::utils::call_handler (PyObject *self, PyObject *args, PyObject *kwds)
int frepple::utils::compare_handler (PyObject *self, PyObject *other)
PyObject * frepple::utils::getattro_handler (PyObject *self, PyObject *name)
PyObject * frepple::utils::iternext_handler (PyObject *self)
PyObject * frepple::utils::loadModule (PyObject *, PyObject *, PyObject *)
 This Python function loads a frepple extension module in memory.
bool frepple::utils::matchWildcard (const char *wild, const char *str)
template<class T >
ostream & frepple::utils::operator<< (ostream &o, const HasName< T > &n)
template<class T >
ostream & frepple::utils::operator<< (ostream &o, const HasName< T > *n)
ostream & frepple::utils::operator<< (ostream &os, const Action &d)
ostream & frepple::utils::operator<< (ostream &os, const Signal &d)
ostream & frepple::utils::operator<< (ostream &os, const indent &i)
ostream & frepple::utils::operator<< (ostream &os, const XMLEscape &x)
ostream & frepple::utils::operator<< (ostream &os, const Timer &t)
ostream & frepple::utils::operator<< (ostream &os, const TimePeriod &t)
ostream & frepple::utils::operator<< (ostream &os, const Date &d)
ostream & frepple::utils::operator<< (ostream &os, const DateRange &dr)
int frepple::utils::setattro_handler (PyObject *self, PyObject *name, PyObject *value)
PyObject * frepple::utils::str_handler (PyObject *self)

Variables

ostream frepple::utils::logger

Detailed Description

Header file for auxilary classes.

Definition in file utils.h.


Macro Definition Documentation

#define DECLARE_EXPORT

Used to define which symbols to export from a Windows DLL.

Definition at line 198 of file utils.h.

#define MODULE_EXPORT   extern "C"

Signature used for a module initialization routine. It assures the function is exported appropriately when running on Windows.
A module will need to define a function with the following prototype:

MODULE_EXPORT string initialize(const CommandLoadLibrary::ParameterList&);

Definition at line 199 of file utils.h.

#define PACKAGE_VERSION   "2.0"

Defines the version of frePPLe.

Definition at line 123 of file utils.h.

#define PY_SSIZE_T_MAX   INT_MAX

Definition at line 66 of file utils.h.

#define PY_SSIZE_T_MIN   INT_MIN

Definition at line 67 of file utils.h.

#define ROUNDING_ERROR   0.000001

This constant defines the magnitude of what can still be considered as a rounding error.

Definition at line 159 of file utils.h.


Typedef Documentation

typedef int Py_ssize_t

Definition at line 65 of file utils.h.