Scippy

SCIP

Solving Constraint Integer Programs

objcloneable.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2015 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 email to scip@zib.de. */
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"
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 */
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
virtual ~ObjCloneable()
Definition: objcloneable.h:40
function type definitions for clonable classes
virtual SCIP_DECL_OBJCLONEABLEISCLONEABLE(iscloneable)
Definition: objcloneable.h:49
virtual SCIP_DECL_OBJCLONEABLECLONE(ObjCloneable *clone)
Definition: objcloneable.h:43
Definition of base class for all clonable classes.
Definition: objcloneable.h:38
common defines and data types used in all packages of SCIP
SCIP callable library.