55 assert(vardata !=
NULL);
56 assert(*vardata !=
NULL);
57 assert((*vardata)->objvardata !=
NULL);
63 if( (*vardata)->deleteobject )
64 delete (*vardata)->objvardata;
83 assert(sourcedata !=
NULL);
84 assert(sourcedata->objvardata !=
NULL);
85 assert(targetdata !=
NULL);
86 assert(*targetdata ==
NULL);
89 SCIP_CALL( sourcedata->objvardata->scip_trans(
scip, targetvar, &objvardata, &deleteobject) );
93 (*targetdata)->objvardata = objvardata;
94 (*targetdata)->deleteobject = deleteobject;
104 assert(vardata !=
NULL);
105 assert(*vardata !=
NULL);
106 assert((*vardata)->objvardata !=
NULL);
109 SCIP_CALL( (*vardata)->objvardata->scip_deltrans(
scip, var) );
112 if( (*vardata)->deleteobject )
113 delete (*vardata)->objvardata;
128 assert(sourcedata !=
NULL);
129 assert(sourcedata->objvardata !=
NULL);
130 assert(targetdata !=
NULL);
131 assert(*targetdata ==
NULL);
134 SCIP_CALL( sourcedata->objvardata->scip_copy(
scip, sourcescip, sourcevar, varmap, consmap, targetvar, &objvardata, result) );
136 if( objvardata != 0 )
142 (*targetdata)->objvardata = objvardata;
143 (*targetdata)->deleteobject =
TRUE;
184 vardata->objvardata = objvardata;
185 vardata->deleteobject = deleteobject;
189 varDelorigObj, varTransObj, varDeltransObj, varCopyObj, vardata) );
206 assert(vardata !=
NULL);
208 return vardata->objvardata;
C++ wrapper for user variable data.
static SCIP_DECL_VARDELORIG(varDelorigObj)
struct SCIP_VarData SCIP_VARDATA
enum SCIP_Retcode SCIP_RETCODE
scip::ObjVardata * SCIPgetObjVardata(SCIP *scip, SCIP_VAR *var)
static SCIP_DECL_VARCOPY(varCopyObj)
static SCIP_DECL_VARDELTRANS(varDeltransObj)
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
C++ wrapper for user variable data.
SCIP_RETCODE SCIPcreateObjVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, scip::ObjVardata *objvardata, SCIP_Bool deleteobject)
enum SCIP_Vartype SCIP_VARTYPE
static SCIP_DECL_VARTRANS(varTransObj)