* Helper templates to provide per-class information for class hierarchies. */
/*
- * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __GINAC_CLASS_INFO_H__
-#define __GINAC_CLASS_INFO_H__
+#ifndef GINAC_CLASS_INFO_H
+#define GINAC_CLASS_INFO_H
#include <cstddef> // for size_t
#include <cstring>
-#include <vector>
-#include <map>
-#include <string>
-#include <iostream>
#include <iomanip>
+#include <iostream>
+#include <map>
#include <stdexcept>
+#include <string>
+#include <vector>
namespace GiNaC {
template <class OPT>
class class_info {
public:
- class_info(const OPT & o) : options(o), next(first), parent(NULL)
+ class_info(const OPT & o) : options(o), next(first), parent(nullptr)
{
first = this;
parents_identified = false;
}
- /** Get pointer to class_info of parent class (or NULL). */
+ /** Get pointer to class_info of parent class (or nullptr). */
class_info *get_parent() const
{
identify_parents();
tree.push_back(tree_node(p));
// Identify children for all nodes and find the root
- tree_node *root = NULL;
+ tree_node *root = nullptr;
for (typename std::vector<tree_node>::iterator i = tree.begin(); i != tree.end(); ++i) {
class_info *p = i->info->get_parent();
if (p) {
}
}
-template <class OPT> class_info<OPT> *class_info<OPT>::first = NULL;
+template <class OPT> class_info<OPT> *class_info<OPT>::first = nullptr;
template <class OPT> bool class_info<OPT>::parents_identified = false;
} // namespace GiNaC
-#endif // ndef __GINAC_CLASS_INFO_H__
+#endif // ndef GINAC_CLASS_INFO_H