1 /* This file is part of StepCore library. 2 Copyright (C) 2007 Vladimir Kuznetsov <ks.vladimir@gmail.com> 3 Copyright (C) 2014 Inge Wallin <inge@lysator.liu.se> 4 5 StepCore library is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 StepCore library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with StepCore; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 /** \file objecterrors.h 21 * \brief Contains the Objecterrors object. 22 */ 23 24 #ifndef STEPCORE_OBJECTERRORS_H 25 #define STEPCORE_OBJECTERRORS_H 26 27 28 #include <vector> // XXX: Replace if Qt is enabled. 29 30 #include "types.h" 31 #include "object.h" 32 33 34 namespace StepCore 35 { 36 37 38 class Item; 39 40 41 /** \ingroup errors 42 * \brief Base class for all errors objects 43 */ 44 class ObjectErrors: public Object 45 { STEPCORE_OBJECT(ObjectErrors)46 STEPCORE_OBJECT(ObjectErrors) 47 48 public: 49 /** Constructs ObjectErrors */ 50 explicit ObjectErrors(Item* owner = NULL): _owner(owner) {} 51 52 /** Get the owner of ObjectErrors */ owner()53 Item* owner() const { return _owner; } 54 /** Set the owner of ObjectErrors */ setOwner(Item * owner)55 void setOwner(Item* owner) { _owner = owner; } 56 57 private: 58 Item* _owner; 59 }; 60 61 62 63 } // namespace StepCore 64 65 66 #endif 67