1 // -*- C++ -*- 2 // AsapObject.h: Provides a name and __repr__ for all Python objects. 3 // 4 // AsapObject should be a base class for all C++ classes that will 5 // have a life as Python object, to support among others the __repr__ 6 // method. 7 // 8 // Copyright (C) 2008-2011 Jakob Schiotz and Center for Individual 9 // Nanoparticle Functionality, Department of Physics, Technical 10 // University of Denmark. Email: schiotz@fysik.dtu.dk 11 // 12 // This file is part of Asap version 3. 13 // Asap is released under the GNU Lesser Public License (LGPL) version 3. 14 // However, the parts of Asap distributed within the OpenKIM project 15 // (including this file) are also released under the Common Development 16 // and Distribution License (CDDL) version 1.0. 17 // 18 // This program is free software: you can redistribute it and/or 19 // modify it under the terms of the GNU Lesser General Public License 20 // version 3 as published by the Free Software Foundation. Permission 21 // to use other versions of the GNU Lesser General Public License may 22 // granted by Jakob Schiotz or the head of department of the 23 // Department of Physics, Technical University of Denmark, as 24 // described in section 14 of the GNU General Public License. 25 // 26 // This program is distributed in the hope that it will be useful, 27 // but WITHOUT ANY WARRANTY; without even the implied warranty of 28 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 // GNU General Public License for more details. 30 // 31 // You should have received a copy of the GNU General Public License 32 // and the GNU Lesser Public License along with this program. If not, 33 // see <http://www.gnu.org/licenses/>. 34 35 #ifndef _ASAPOBJECT_H 36 #define _ASAPOBJECT_H 37 38 #include "AsapNamespace.h" 39 #include <string> 40 using std::string; 41 42 namespace ASAPSPACE { 43 44 class AsapObject 45 { 46 public: ~AsapObject()47 virtual ~AsapObject() {}; 48 virtual string GetName() const = 0; 49 virtual string GetRepresentation() const; 50 }; 51 52 } // End namespace 53 54 #endif // _ASAPOBJECT_H 55