Skip to content

Commit d221a07

Browse files
committed
also wrap type_var.h
- requires updated Clang.jl with #214 fixed.
1 parent 479aae1 commit d221a07

File tree

2 files changed

+206
-1
lines changed

2 files changed

+206
-1
lines changed

gen/generate_wrapper.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ top_types = [
2020
]
2121

2222
headers = vcat(
23-
filter(h -> h != "type_var.h", top_types), # problem: `union SCIP_DomChg`
23+
top_types,
2424
filter(h -> startswith(h, "type_") && !in(h, top_types), all_headers),
2525
# filter(h -> startswith(h, "pub_"), all_headers),
2626
filter(h -> startswith(h, "scip_"), all_headers),

src/wrapper/commons.jl

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,211 @@ struct SCIP_Nlp
600600
end
601601

602602
const SCIP_NLP = Cvoid
603+
const NLOCKTYPES = 2
604+
605+
# Skipping MacroDefinition: SCIP_DECL_VARDELORIG ( x ) SCIP_RETCODE x ( SCIP * scip , SCIP_VAR * var , SCIP_VARDATA * * vardata ) /** creates transformed variable for original user variable
606+
# *
607+
# * Because the original variable and the user data of the original variable should not be
608+
# * modified during the solving process, a transformed variable is created as a copy of
609+
# * the original variable. If the user variable data is never modified during the solving
610+
# * process anyways, it is enough to simple copy the user data's pointer. This is the
611+
# * default implementation, which is used when a NULL is given as VARTRANS method.
612+
# * If the user data may be modified during the solving process (e.g. during preprocessing),
613+
# * the VARTRANS method must be given and has to copy the user variable data to a different
614+
# * memory location.
615+
# *
616+
# * input:
617+
# * - scip : SCIP main data structure
618+
# * - sourcevar : original variable
619+
# * - sourcedata : source variable data to transform
620+
# * - targetvar : transformed variable
621+
# * - targetdata : pointer to store created transformed variable data
622+
# */
623+
# Skipping MacroDefinition: SCIP_DECL_VARTRANS ( x ) SCIP_RETCODE x ( SCIP * scip , SCIP_VAR * sourcevar , SCIP_VARDATA * sourcedata , SCIP_VAR * targetvar , SCIP_VARDATA * * targetdata ) /** frees user data of transformed variable (called when the transformed variable is freed)
624+
# *
625+
# * This method has to be implemented, if the VARTRANS method is not a simple pointer
626+
# * copy operation like in the default VARTRANS implementation. It should free the
627+
# * user data of the transformed variable, that was created in the VARTRANS method.
628+
# *
629+
# * input:
630+
# * - scip : SCIP main data structure
631+
# * - var : transformed variable the data to free is belonging to
632+
# * - vardata : pointer to the user variable data to free
633+
# */
634+
# Skipping MacroDefinition: SCIP_DECL_VARDELTRANS ( x ) SCIP_RETCODE x ( SCIP * scip , SCIP_VAR * var , SCIP_VARDATA * * vardata ) /** copies variable data of source SCIP variable for the target SCIP variable
635+
# *
636+
# * This method should copy the variable data of the source SCIP and create a target variable data for target
637+
# * variable. This callback is optimal. If the copying process was successful the target variable gets this variable
638+
# * data assigned. In case the result pointer is set to SCIP_DIDNOTRUN the target variable will have no variable data at
639+
# * all.
640+
# *
641+
# * The variable map and the constraint map can be used via the function SCIPgetVarCopy() and SCIPgetConsCopy(),
642+
# * respectively, to get for certain variables and constraints of the source SCIP the counter parts in the target
643+
# * SCIP. You should be very carefully in using these two methods since they could lead to infinity loop.
644+
# *
645+
# * input:
646+
# * - scip : target SCIP data structure
647+
# * - sourcescip : source SCIP main data structure
648+
# * - sourcevar : variable of the source SCIP
649+
# * - sourcedata : variable data of the source variable which should get copied
650+
# * - varmap, : a hashmap which stores the mapping of source variables to corresponding target variables
651+
# * - consmap, : a hashmap which stores the mapping of source constraints to corresponding target constraints
652+
# * - targetvar : variable of the (target) SCIP (targetvar is the copy of sourcevar)
653+
# * - targetdata : pointer to store created copy of the variable data for the (target) SCIP
654+
# *
655+
# * output:
656+
# * - result : pointer to store the result of the call
657+
# *
658+
# * possible return values for *result:
659+
# * - SCIP_DIDNOTRUN : the copying process was not performed
660+
# * - SCIP_SUCCESS : the copying process was successfully performed
661+
# */
662+
# Skipping MacroDefinition: SCIP_DECL_VARCOPY ( x ) SCIP_RETCODE x ( SCIP * scip , SCIP * sourcescip , SCIP_VAR * sourcevar , SCIP_VARDATA * sourcedata , SCIP_HASHMAP * varmap , SCIP_HASHMAP * consmap , SCIP_VAR * targetvar , SCIP_VARDATA * * targetdata , SCIP_RESULT * result ) #
663+
664+
# begin enum SCIP_Varstatus
665+
const SCIP_Varstatus = UInt32
666+
const SCIP_VARSTATUS_ORIGINAL = 0 |> UInt32
667+
const SCIP_VARSTATUS_LOOSE = 1 |> UInt32
668+
const SCIP_VARSTATUS_COLUMN = 2 |> UInt32
669+
const SCIP_VARSTATUS_FIXED = 3 |> UInt32
670+
const SCIP_VARSTATUS_AGGREGATED = 4 |> UInt32
671+
const SCIP_VARSTATUS_MULTAGGR = 5 |> UInt32
672+
const SCIP_VARSTATUS_NEGATED = 6 |> UInt32
673+
# end enum SCIP_Varstatus
674+
675+
const SCIP_VARSTATUS = SCIP_Varstatus
676+
677+
# begin enum SCIP_Vartype
678+
const SCIP_Vartype = UInt32
679+
const SCIP_VARTYPE_BINARY = 0 |> UInt32
680+
const SCIP_VARTYPE_INTEGER = 1 |> UInt32
681+
const SCIP_VARTYPE_IMPLINT = 2 |> UInt32
682+
const SCIP_VARTYPE_CONTINUOUS = 3 |> UInt32
683+
# end enum SCIP_Vartype
684+
685+
const SCIP_VARTYPE = SCIP_Vartype
686+
687+
# begin enum SCIP_DomchgType
688+
const SCIP_DomchgType = UInt32
689+
const SCIP_DOMCHGTYPE_DYNAMIC = 0 |> UInt32
690+
const SCIP_DOMCHGTYPE_BOTH = 1 |> UInt32
691+
const SCIP_DOMCHGTYPE_BOUND = 2 |> UInt32
692+
# end enum SCIP_DomchgType
693+
694+
const SCIP_DOMCHGTYPE = SCIP_DomchgType
695+
696+
# begin enum SCIP_BoundchgType
697+
const SCIP_BoundchgType = UInt32
698+
const SCIP_BOUNDCHGTYPE_BRANCHING = 0 |> UInt32
699+
const SCIP_BOUNDCHGTYPE_CONSINFER = 1 |> UInt32
700+
const SCIP_BOUNDCHGTYPE_PROPINFER = 2 |> UInt32
701+
# end enum SCIP_BoundchgType
702+
703+
const SCIP_BOUNDCHGTYPE = SCIP_BoundchgType
704+
705+
# begin enum SCIP_LockType
706+
const SCIP_LockType = UInt32
707+
const SCIP_LOCKTYPE_MODEL = 0 |> UInt32
708+
const SCIP_LOCKTYPE_CONFLICT = 1 |> UInt32
709+
# end enum SCIP_LockType
710+
711+
const SCIP_LOCKTYPE = SCIP_LockType
712+
713+
struct SCIP_DomChgBound
714+
end
715+
716+
const SCIP_DOMCHGBOUND = Cvoid
717+
718+
struct SCIP_DomChgBoth
719+
end
720+
721+
const SCIP_DOMCHGBOTH = Cvoid
722+
723+
struct SCIP_DomChgDyn
724+
end
725+
726+
const SCIP_DOMCHGDYN = Cvoid
727+
728+
struct SCIP_DomChg
729+
_SCIP_DomChg::Cvoid
730+
end
731+
732+
const SCIP_DOMCHG = Cvoid
733+
734+
struct SCIP_BoundChg
735+
end
736+
737+
const SCIP_BOUNDCHG = Cvoid
738+
739+
struct SCIP_BdChgIdx
740+
end
741+
742+
const SCIP_BDCHGIDX = Cvoid
743+
744+
struct SCIP_BdChgInfo
745+
end
746+
747+
const SCIP_BDCHGINFO = Cvoid
748+
749+
struct SCIP_BranchingData
750+
end
751+
752+
const SCIP_BRANCHINGDATA = Cvoid
753+
754+
struct SCIP_InferenceData
755+
end
756+
757+
const SCIP_INFERENCEDATA = Cvoid
758+
759+
struct SCIP_HoleChg
760+
end
761+
762+
const SCIP_HOLECHG = Cvoid
763+
764+
struct SCIP_Hole
765+
end
766+
767+
const SCIP_HOLE = Cvoid
768+
769+
struct SCIP_Holelist
770+
end
771+
772+
const SCIP_HOLELIST = Cvoid
773+
774+
struct SCIP_Dom
775+
end
776+
777+
const SCIP_DOM = Cvoid
778+
779+
struct SCIP_Original
780+
end
781+
782+
const SCIP_ORIGINAL = Cvoid
783+
784+
struct SCIP_Aggregate
785+
end
786+
787+
const SCIP_AGGREGATE = Cvoid
788+
789+
struct SCIP_Multaggr
790+
end
791+
792+
const SCIP_MULTAGGR = Cvoid
793+
794+
struct SCIP_Negate
795+
end
796+
797+
const SCIP_NEGATE = Cvoid
798+
799+
struct SCIP_Var
800+
end
801+
802+
const SCIP_VAR = Cvoid
803+
804+
struct SCIP_VarData
805+
end
806+
807+
const SCIP_VARDATA = Cvoid
603808

604809
# Skipping MacroDefinition: SCIP_DECL_PROBDELORIG ( x ) SCIP_RETCODE x ( SCIP * scip , SCIP_PROBDATA * * probdata ) /** creates user data of transformed problem by transforming the original user problem data
605810
# * (called after problem was transformed)

0 commit comments

Comments
 (0)