1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*    Copyright (C) 2002-2021 Konrad-Zuse-Zentrum                            */
7    	/*                            fuer Informationstechnik Berlin                */
8    	/*                                                                           */
9    	/*  SCIP is distributed under the terms of the ZIB Academic License.         */
10   	/*                                                                           */
11   	/*  You should have received a copy of the ZIB Academic License.             */
12   	/*  along with SCIP; see the file COPYING. If not visit scipopt.org.         */
13   	/*                                                                           */
14   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15   	
16   	/**@file   objcloneable.h
17   	 * @brief  definition of base class for all clonable classes
18   	 * @author Michael Winkler
19   	 */
20   	
21   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22   	
23   	#ifndef __SCIP_OBJCLONEABLE_H__
24   	#define __SCIP_OBJCLONEABLE_H__
25   	
26   	#include "scip/def.h"
27   	#include "scip/scip.h"
28   	#include "objscip/type_objcloneable.h"
29   	
30   	
31   	namespace scip
32   	{
33   	   /** @brief Definition of base class for all clonable classes
34   	    *
35   	    * All C++ wrapper object plugins should extend this class, except constraint handlers and variable pricers. This is
36   	    * needed to be able to copy (clone) a SCIP instance.
37   	    */
38   	   struct ObjCloneable
39   	   {
40   	      virtual ~ObjCloneable() {}
41   	
42   	      /** clone method, used to copy plugins which are not constraint handlers or variable pricer plugins */
43   	      virtual SCIP_DECL_OBJCLONEABLECLONE(ObjCloneable* clone)
44   	      {
45   	         return 0;
46   	      }
47   	
48   	      /** returns whether the plugin object is copyable */
49   	      virtual SCIP_DECL_OBJCLONEABLEISCLONEABLE(iscloneable)
50   	      {
51   	         return false;
52   	      }
53   	   };
54   	}
55   	
56   	#endif
57