]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.h
- Import namespace std globally.
[ginac.git] / ginac / structure.h
index cbe44758c0e6910b0334b90c7c79dbacd8479d59..43828191997626ba69aa8f13cdcf03ac6876a335 100644 (file)
@@ -1,8 +1,9 @@
 /** @file structure.h
  *
- *  Interface to 'abstract' class structure.
- *
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  Interface to 'abstract' class structure. */
+
+/*
+ *  GiNaC Copyright (C) 1999-2000 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
 #ifndef __GINAC_STRUCTURE_H__
 #define __GINAC_STRUCTURE_H__
 
-#include <ginac/basic.h>
+#include "basic.h"
+
+#ifndef NO_NAMESPACE_GINAC
+namespace GiNaC {
+#endif // ndef NO_NAMESPACE_GINAC
 
 struct registered_structure_info {
-    char const * name;
+       const char * name;
 };
 
 /** The class structure is used to implement user defined classes
-    with named members which behave similar to ordinary C structs.
-    structure is an 'abstract' base class (it is possible but not
-    meaningful to make instances), the user defined structures
-    will be create by the perl script structure.pl */
+       with named members which behave similar to ordinary C structs.
+       structure is an 'abstract' base class (it is possible but not
+       meaningful to make instances), the user defined structures
+       will be create by the perl script structure.pl */
 
 class structure : public basic
 {
 // member functions
 
-    // default constructor, destructor, copy constructor assignment operator and helpers
+       // default constructor, destructor, copy constructor assignment operator and helpers
 public:
-    structure();
-    ~structure();
-    structure(structure const & other);
-    structure const & operator=(structure const & other);
+       structure();
+       ~structure();
+       structure(const structure & other);
+       const structure & operator=(const structure & other);
 protected:
-    void copy(structure const & other);
-    void destroy(bool call_parent);
+       void copy(const structure & other);
+       void destroy(bool call_parent);
 
-    // other constructors
-    // none
+       // other constructors
+       // none
 
-    // functions overriding virtual functions from bases classes
+       // functions overriding virtual functions from bases classes
 public:
-    basic * duplicate() const;
-    void printraw(ostream & os) const; 
-    void print(ostream & os, unsigned upper_precedence=0) const;
-    void printtree(ostream & os, unsigned indent) const;
-    void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
+       basic * duplicate() const;
+       void printraw(std::ostream & os) const; 
+       void print(std::ostream & os, unsigned upper_precedence=0) const;
+       void printtree(std::ostream & os, unsigned indent) const;
+       void printcsrc(std::ostream & os, unsigned type, unsigned upper_precedence=0) const;
 protected:
-    int compare_same_type(basic const & other) const;
-    bool is_equal_same_type(basic const & other) const;
-    
-    // new virtual functions which can be overridden by derived classes
-    // none
-    
-    // non-virtual functions in this class
+       int compare_same_type(const basic & other) const;
+       bool is_equal_same_type(const basic & other) const;
+       
+       // new virtual functions which can be overridden by derived classes
+       // none
+       
+       // non-virtual functions in this class
 protected:
-    static vector<registered_structure_info> & registered_structures(void);
+       static std::vector<registered_structure_info> & registered_structures(void);
 public:
-    static unsigned register_new(char const * nm);
+       static unsigned register_new(const char * nm);
 
 // member variables
 // none
@@ -79,7 +84,10 @@ public:
 // global constants
 
 extern const structure some_structure;
-extern type_info const & typeid_structure;
+extern const std::type_info & typeid_structure;
 
-#endif // ndef __GINAC_STRUCTURE_H__
+#ifndef NO_NAMESPACE_GINAC
+} // namespace GiNaC
+#endif // ndef NO_NAMESPACE_GINAC
 
+#endif // ndef __GINAC_STRUCTURE_H__