Scippy

SCIP

Solving Constraint Integer Programs

objprobcloneable.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 2002-2022 Zuse Institute Berlin */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file objprobcloneable.h
26  * @brief Definition of base class for all clonable classes which define problem data
27  * @author Tobias Achterberg
28  * @author Timo Berthold
29  * @author Ambros Gleixner
30  * @author Stefan Heinz
31  * @author Stefan Vigerske
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef __SCIP_OBJPROBCLONEABLE_H__
37 #define __SCIP_OBJPROBCLONEABLE_H__
38 
39 #include "scip/def.h"
40 #include "scip/scip.h"
42 
43 
44 
45 namespace scip
46 {
47  /** @brief Definition of base class for all clonable classes which define problem data
48  *
49  * Constraint handler and variable pricer C++ wrapper object plugins should extend this class
50  */
52  {
53  virtual ~ObjProbCloneable() {}
54 
55  /** assignment of polymorphic classes causes slicing and is therefore disabled. */
56  ObjProbCloneable& operator=(const ObjProbCloneable& o) = delete;
57 
58  /** assignment of polymorphic classes causes slicing and is therefore disabled. */
60 
61  /** clone method which will be used to copy constraint handler and variable pricer objects */
63  {
64  return 0;
65  }
66 
67  /** returns whether the plugin object is copyable */
68  virtual SCIP_DECL_OBJPROBISCLONEABLE(iscloneable)
69  {
70  return FALSE;
71  }
72  };
73 }
74 
75 #endif
ObjProbCloneable & operator=(const ObjProbCloneable &o)=delete
virtual SCIP_DECL_OBJPROBCLONE(ObjProbCloneable *clone)
#define FALSE
Definition: def.h:96
function type definitions for clonable classes which define problem data
virtual SCIP_DECL_OBJPROBISCLONEABLE(iscloneable)
Definition of base class for all clonable classes which define problem data.
common defines and data types used in all packages of SCIP
SCIP callable library.