diff --git a/Examples/scilab/vector/builder.sce b/Examples/scilab/vector/builder.sce deleted file mode 100644 index 5b90bc35e..000000000 --- a/Examples/scilab/vector/builder.sce +++ /dev/null @@ -1,16 +0,0 @@ -mode(-1); -lines(0); -ilib_verbose(0); -ilib_name = "examplelib"; -files = "example_wrap.cxx"; -files($+1) = "example.cpp"; -libs = []; -ldflags = ""; -cflags = ["-g -I" + get_absolute_file_path("builder.sce")]; -table = ["nlopt_doublevector_empty","_wrap_nlopt_doublevector_empty";"nlopt_doublevector_size","_wrap_nlopt_doublevector_size";"nlopt_doublevector_clear","_wrap_nlopt_doublevector_clear";"nlopt_doublevector_swap","_wrap_nlopt_doublevector_swap";"nlopt_doublevector_get_allocator","_wrap_nlopt_doublevector_get_allocator";"nlopt_doublevector_pop_back","_wrap_nlopt_doublevector_pop_back";"new_nlopt_doublevector","_wrap_new_nlopt_doublevector";"nlopt_doublevector_push_back","_wrap_nlopt_doublevector_push_back";"nlopt_doublevector_front","_wrap_nlopt_doublevector_front";]; - -table = [table;"nlopt_doublevector_back","_wrap_nlopt_doublevector_back";"nlopt_doublevector_assign","_wrap_nlopt_doublevector_assign";"nlopt_doublevector_resize","_wrap_nlopt_doublevector_resize";"nlopt_doublevector_reserve","_wrap_nlopt_doublevector_reserve";"nlopt_doublevector_capacity","_wrap_nlopt_doublevector_capacity";"delete_nlopt_doublevector","_wrap_delete_nlopt_doublevector";"opt_set_lower_bound","_wrap_opt_set_lower_bound";"new_opt","_wrap_new_opt";"delete_opt","_wrap_delete_opt";]; -if ~isempty(table) then - ilib_build(ilib_name, table, files, libs, [], ldflags, cflags); -end -exit \ No newline at end of file diff --git a/Examples/scilab/vector/cleaner.sce b/Examples/scilab/vector/cleaner.sce deleted file mode 100644 index 0129a2e73..000000000 --- a/Examples/scilab/vector/cleaner.sce +++ /dev/null @@ -1,22 +0,0 @@ -// This file is released under the 3-clause BSD license. See COPYING-BSD. -// Generated by builder.sce : Please, do not edit this file -// cleaner.sce -// ------------------------------------------------------ -curdir = pwd(); -cleaner_path = get_file_path('cleaner.sce'); -chdir(cleaner_path); -// ------------------------------------------------------ -if fileinfo('loader.sce') <> [] then - mdelete('loader.sce'); -end -// ------------------------------------------------------ -if fileinfo('libexamplelib.so') <> [] then - mdelete('libexamplelib.so'); -end -// ------------------------------------------------------ -if fileinfo('libexamplelib.c') <> [] then - mdelete('libexamplelib.c'); -end -// ------------------------------------------------------ -chdir(curdir); -// ------------------------------------------------------ diff --git a/Examples/scilab/vector/example_wrap.cxx b/Examples/scilab/vector/example_wrap.cxx deleted file mode 100644 index 9119bd933..000000000 --- a/Examples/scilab/vector/example_wrap.cxx +++ /dev/null @@ -1,2059 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.5 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Scilab function name management */ -#include -static char* fname = NULL; -static char* SWIG_Scilab_GetFname(void) { - return fname; -} -static void SWIG_Scilab_SetFname(char* _fname) { - if (fname != NULL) { - free(fname); - } - fname = strdup(_fname); -} -/* Scilab output argument management */ -static int outputPosition = -1; -static int SWIG_Scilab_GetOutputPosition(void) { - return outputPosition; -} -static int SWIG_Scilab_GetOutputPositionAndReset(void) { - int returnValue = outputPosition; - outputPosition = -1; /* Set as read */ - return returnValue; -} -static void SWIG_Scilab_SetOutputPosition(int _outputPosition) { - outputPosition = _outputPosition; -} - - -/* Scilab standard headers */ -#ifdef __cplusplus -extern "C" { -#endif -#include "stack-c.h" -#include "MALLOC.h" -#include "sciprint.h" -#include "Scierror.h" -#include "api_scilab.h" -#include "localization.h" -#include "freeArrayOfString.h" -#ifdef __cplusplus -} -#endif - -#undef Max -#undef Min - -typedef int SciObject; - -#define SWIG_fail return SWIG_ERROR; -#define SWIG_Error return SWIG_ERROR; - -/* Used for C++ enums */ -//#define SWIG_AsVal_int(scilabValue, valuePointer) SWIG_SciDouble_AsInt(pvApiCtx, scilabValue, valuePointer, fname) - -SWIGINTERN int -SwigScilabPtrToObject(void *_pvApiCtx, int _iVar, void **_pObjValue, swig_type_info *_descriptor, int _flags, char *_fname) { - SciErr sciErr; - int iType = 0; - int *piAddrVar = NULL; - - sciErr = getVarAddressFromPosition(_pvApiCtx, _iVar, &piAddrVar); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - sciErr = getVarType(_pvApiCtx, piAddrVar, &iType); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - if (iType != sci_pointer) { - //Scierror(999, _("%s: Wrong type for input argument #%d: A pointer expected.\n"), _fname, _iVar); - return SWIG_ERROR; - } - - sciErr = getPointer(_pvApiCtx, piAddrVar, _pObjValue); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - return SWIG_OK; -} - -SWIGRUNTIMEINLINE int -SwigScilabPtrFromObject(void *_pvApiCtx, int _iVarOut, void *_object, swig_type_info *_descriptor, int _flags) { - SciErr sciErr; - - sciErr = createPointer(pvApiCtx, Rhs + _iVarOut, (void *)_object); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - return Rhs + _iVarOut; -} - -SWIGRUNTIME int -SWIG_Scilab_ConvertPacked(void *_pvApiCtx, int _iVar, void *_ptr, int sz, swig_type_info *ty, char *_fname) { - swig_cast_info *tc; - - SciErr sciErr; - int iRows = 0; - int iCols = 0; - int iType = 0; - int *piAddrVar = NULL; - char *pstStrings = NULL; - int piLength = 0; - - sciErr = getVarAddressFromPosition(pvApiCtx, _iVar, &piAddrVar); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - sciErr = getVarType(pvApiCtx, piAddrVar, &iType); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - if (iType != sci_strings) { - Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), _fname, _iVar); - return SWIG_ERROR; - } - - sciErr = getMatrixOfString(pvApiCtx, piAddrVar, &iRows, &iCols, &piLength, NULL); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - if (iRows * iCols != 1) { - Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), _fname, _iVar); - return SWIG_ERROR; - } - - pstStrings = (char *)MALLOC(sizeof(char) * (piLength + 1)); - sciErr = getMatrixOfString(pvApiCtx, piAddrVar, &iRows, &iCols, &piLength, (char **)&pstStrings); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - /* Pointer values must start with leading underscore */ - if (*pstStrings != '_') { - return SWIG_ERROR; - } - pstStrings++; - pstStrings = (char*)SWIG_UnpackData(pstStrings, _ptr, sz); - if (ty) { - tc = SWIG_TypeCheck(pstStrings, ty); - if (!tc) { - return SWIG_ERROR; - } - } - FREE(pstStrings); - return SWIG_OK; -} - -SWIGRUNTIME int -SWIG_Scilab_NewMemberObj(void *_pvApiCtx, int _iVarOut, void *_ptr, int _sz, swig_type_info *_type) { - char result[1024]; - char *r = result; - - SciErr sciErr; - char **pstData = NULL; - if ((2*_sz + 1 + strlen(_type->name)) > 1000) { - return SWIG_ERROR; - } - *(r++) = '_'; - r = SWIG_PackData(r, _ptr, _sz); - strcpy(r, _type->name); - - pstData = (char **)MALLOC(sizeof(char *)); - pstData[0] = strdup(r); - - sciErr = createMatrixOfString(_pvApiCtx, Rhs + _iVarOut, 1, 1, (char **)pstData); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - freeArrayOfString(pstData, 1); - - return Rhs + _iVarOut; -} - -SWIGRUNTIME int -SWIG_Scilab_SetOutput(SciObject _output) { - int outputPosition = SWIG_Scilab_GetOutputPositionAndReset(); - if (outputPosition < 0 || _output < 0) { - return SWIG_ERROR; - } - LhsVar(outputPosition) = _output; - return SWIG_OK; -} - -#define SwigScilabRaise(OBJ, TYPE, DESC) Scierror(999, "C++ side threw an exception of type %s.\n", TYPE) - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_allocator_type swig_types[0] -#define SWIGTYPE_p_char swig_types[1] -#define SWIGTYPE_p_difference_type swig_types[2] -#define SWIGTYPE_p_nlopt__opt swig_types[3] -#define SWIGTYPE_p_size_type swig_types[4] -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[5] -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[6] -#define SWIGTYPE_p_value_type swig_types[7] -static swig_type_info *swig_types[9]; -static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - - -#define SWIGVERSION 0x020005 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) (void *)((const void *)(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) - - -#include - - -#include "example.hxx" - - -#include - - -#if defined(__GNUC__) -# if __GNUC__ == 2 && __GNUC_MINOR <= 96 -# define SWIG_STD_NOMODERN_STL -# endif -#endif - - -#include -#include -#include - - -#include - - -#include - - -SWIGINTERN int -SWIG_AsVal_double (SciObject _iVar, double *_pdblValue) { - SciErr sciErr; - int iRet = 0; - int *piAddrVar = NULL; - - sciErr = getVarAddressFromPosition(pvApiCtx, _iVar, &piAddrVar); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - if (!isDoubleType(pvApiCtx, piAddrVar) || isVarComplex(pvApiCtx, piAddrVar)) { - Scierror(999, _("%s: Wrong type for input argument #%d: A real expected.\n"), SWIG_Scilab_GetFname(), _iVar); - return SWIG_ERROR; - } - - if (!isScalar(pvApiCtx, piAddrVar)) { - Scierror(999, _("%s: Wrong size for input argument #%d: A real expected.\n"), SWIG_Scilab_GetFname(), _iVar); - return SWIG_ERROR; - } - - iRet = getScalarDouble(pvApiCtx, piAddrVar, _pdblValue); - if (iRet) { - return SWIG_ERROR; - } - - return SWIG_OK; -} - - -SWIGINTERN int -SWIG_From_double (double _dblValue) { - int iRet; - int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition(); - iRet = createScalarDouble(pvApiCtx, iVarOut, _dblValue); - if (iRet) { - return SWIG_ERROR; - } - - return iVarOut; -} - - -namespace swig { - template - struct noconst_traits { - typedef Type noconst_type; - }; - - template - struct noconst_traits { - typedef Type noconst_type; - }; - - /* - type categories - */ - struct pointer_category { }; - struct value_category { }; - - /* - General traits that provides type_name and type_info - */ - template struct traits { }; - - template - inline const char* type_name() { - return traits::noconst_type >::type_name(); - } - - template - struct traits_info { - static swig_type_info *type_query(std::string name) { - name += " *"; - return SWIG_TypeQuery(name.c_str()); - } - static swig_type_info *type_info() { - static swig_type_info *info = type_query(type_name()); - return info; - } - }; - - template - inline swig_type_info *type_info() { - return traits_info::type_info(); - } - - /* - Partial specialization for pointers - */ - template struct traits { - typedef pointer_category category; - static std::string make_ptr_name(const char* name) { - std::string ptrname = name; - ptrname += " *"; - return ptrname; - } - static const char* type_name() { - static std::string name = make_ptr_name(swig::type_name()); - return name.c_str(); - } - }; - - template - struct traits_as { }; - - template - struct traits_check { }; - -} - - -namespace swig { - /* - Traits that provides the from method - */ - template struct traits_from_ptr { - static SciObject from(Type *val, int owner = 0) { - return SWIG_InternalNewPointerObj(val, type_info(), owner); - } - }; - - template struct traits_from { - static SciObject from(const Type& val) { - return traits_from_ptr::from(new Type(val), 1); - } - }; - - template struct traits_from { - static SciObject from(Type* val) { - return traits_from_ptr::from(val, 0); - } - }; - - template struct traits_from { - static SciObject from(const Type* val) { - return traits_from_ptr::from(const_cast(val), 0); - } - }; - - - template - inline SciObject from(const Type& val) { - return traits_from::from(val); - } - - template - inline SciObject from_ptr(Type* val, int owner) { - return traits_from_ptr::from(val, owner); - } - - /* - Traits that provides the asval/as/check method - */ - template - struct traits_asptr { - static int asptr(SciObject obj, Type **val) { - Type *p; - int res = SwigScilabPtrToObject(pvApiCtx, obj, (void**)&p, type_info(), 0, fname); - if (SWIG_IsOK(res)) { - if (val) *val = p; - } - return res; - } - }; - - template - inline int asptr(SciObject obj, Type **vptr) { - return traits_asptr::asptr(obj, vptr); - } - - template - struct traits_asval { - static int asval(SciObject obj, Type *val) { - if (val) { - Type *p = 0; - int res = traits_asptr::asptr(obj, &p); - if (!SWIG_IsOK(res)) return res; - if (p) { - typedef typename noconst_traits::noconst_type noconst_type; - *(const_cast(val)) = *p; - if (SWIG_IsNewObj(res)){ - delete p; - res = SWIG_DelNewMask(res); - } - return res; - } else { - return SWIG_ERROR; - } - } else { - return traits_asptr::asptr(obj, (Type **)(0)); - } - } - }; - - template struct traits_asval { - static int asval(SciObject obj, Type **val) { - if (val) { - typedef typename noconst_traits::noconst_type noconst_type; - noconst_type *p = 0; - int res = traits_asptr::asptr(obj, &p); - if (SWIG_IsOK(res)) { - *(const_cast(val)) = p; - } - return res; - } else { - return traits_asptr::asptr(obj, (Type **)(0)); - } - } - }; - - template - inline int asval(SciObject obj, Type *val) { - return traits_asval::asval(obj, val); - } - - template - struct traits_as { - static Type as(SciObject obj, bool throw_error) { - Type v; - int res = asval(obj, &v); - if (!obj || !SWIG_IsOK(res)) { -// if (!PyErr_Occurred()) { -// ::%type_error(swig::type_name()); -// } - if (throw_error) throw std::invalid_argument("bad type"); - } - return v; - } - }; - - template - struct traits_as { - static Type as(SciObject obj, bool throw_error) { - Type *v = 0; - int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); - if (SWIG_IsOK(res) && v) { - if (SWIG_IsNewObj(res)) { - Type r(*v); - delete v; - return r; - } else { - return *v; - } - } else { - // Uninitialized return value, no Type() constructor required. - static Type *v_def = (Type*) malloc(sizeof(Type)); -// if (!PyErr_Occurred()) { -// %type_error(swig::type_name()); -// } - if (throw_error) throw std::invalid_argument("bad type"); - memset(v_def,0,sizeof(Type)); - return *v_def; - } - } - }; - - template - struct traits_as { - static Type* as(SciObject obj, bool throw_error) { - Type *v = 0; - int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); - if (SWIG_IsOK(res)) { - return v; - } else { -// if (!PyErr_Occurred()) { -// %type_error(swig::type_name()); -// } - if (throw_error) throw std::invalid_argument("bad type"); - return 0; - } - } - }; - - template - inline Type as(SciObject obj, bool te = false) { - return traits_as::category>::as(obj, te); - } - - template - struct traits_check { - static bool check(SciObject obj) { - int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; - return SWIG_IsOK(res) ? true : false; - } - }; - - template - struct traits_check { - static bool check(SciObject obj) { - int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; - return SWIG_IsOK(res) ? true : false; - } - }; - - template - inline bool check(SciObject obj) { - return traits_check::category>::check(obj); - } -} - - -namespace swig { - template <> struct traits { - typedef value_category category; - static const char* type_name() { return"double"; } - }; - template <> struct traits_asval { - typedef double value_type; - static int asval(SciObject obj, value_type *val) { - return SWIG_AsVal_double (obj, val); - } - }; - template <> struct traits_from { - typedef double value_type; - static SciObject from(const value_type& val) { - return SWIG_From_double (val); - } - }; -} - - - - - namespace swig { - template <> struct traits > > { - typedef pointer_category category; - static const char* type_name() { - return "std::vector<" "double" "," "std::allocator< double >" " >"; - } - }; - } - - -SWIGINTERN int -SWIG_From_bool (bool _bValue) { - int iRet = 0; - int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition(); - - iRet = createScalarBoolean(pvApiCtx, iVarOut, _bValue); - if (iRet) { - return SWIG_ERROR; - } - - return iVarOut; -} - - -SWIGINTERN int -SWIG_From_size_t (size_t _iValue) { - SciErr sciErr; - double dblDoubleValue = (double) _iValue; - int iRowsOut = 1; - int iColsOut = 1; - int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition(); - - sciErr = createMatrixOfDouble(pvApiCtx, iVarOut, iRowsOut, iColsOut, &dblDoubleValue); - if (sciErr.iErr) { - printError(&sciErr, 0); - return SWIG_ERROR; - } - - return iVarOut; -} - - -SWIGINTERN int -SWIG_AsVal_size_t (SciObject _iVar, size_t *_piValue) { - double dblValue = 0.0; - if(SWIG_AsVal_double (_iVar, &dblValue) != SWIG_OK) { - return SWIG_ERROR; - } - *_piValue = (int) dblValue; - return SWIG_OK; -} - -extern "C" { -int _wrap_new_nlopt_doublevector__SWIG_0(char *fname, unsigned long fname_len) { - std::vector< double > *result = 0 ; - - CheckRhs(0, 0); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - result = (std::vector< double > *)new std::vector< double >(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 1 | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_new_nlopt_doublevector__SWIG_1(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - std::vector< double > *result = 0 ; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - { - std::vector > *ptr = (std::vector > *)0; - res1 = swig::asptr(1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_nlopt_doublevector" "', argument " "1"" of type '" "std::vector< double > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nlopt_doublevector" "', argument " "1"" of type '" "std::vector< double > const &""'"); - } - arg1 = ptr; - } - result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 1 | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_empty(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = (bool)((std::vector< double > const *)arg1)->empty(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SWIG_From_bool((bool)(result))))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_size(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< double >::size_type result; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_size" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = ((std::vector< double > const *)arg1)->size(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SWIG_From_size_t((size_t)(result))))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_clear(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - CheckRhs(1, 1); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - (arg1)->clear(); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_swap(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - CheckRhs(2, 2); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_swap" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - res2 = SwigScilabPtrToObject(pvApiCtx, 2, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 , fname); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "nlopt_doublevector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nlopt_doublevector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); - } - arg2 = (std::vector< double > *)(argp2); - (arg1)->swap(*arg2); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_get_allocator(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< std::allocator< double > > result; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = ((std::vector< double > const *)arg1)->get_allocator(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, (new std::vector< double >::allocator_type((const std::vector< double >::allocator_type&)(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_new_nlopt_doublevector__SWIG_2(char *fname, unsigned long fname_len) { - std::vector< double >::size_type arg1 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< double > *result = 0 ; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - ecode1 = SWIG_AsVal_size_t(1, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_nlopt_doublevector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); - } - arg1 = (std::vector< double >::size_type)(val1); - result = (std::vector< double > *)new std::vector< double >(arg1); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 1 | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_pop_back(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - CheckRhs(1, 1); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - (arg1)->pop_back(); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_resize__SWIG_0(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - CheckRhs(2, 2); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - ecode2 = SWIG_AsVal_size_t(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlopt_doublevector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); - } - arg2 = (std::vector< double >::size_type)(val2); - (arg1)->resize(arg2); - - return SWIG_OK; -} - - -int _wrap_new_nlopt_doublevector__SWIG_3(char *fname, unsigned long fname_len) { - std::vector< double >::size_type arg1 ; - std::vector< double >::value_type *arg2 = 0 ; - size_t val1 ; - int ecode1 = 0 ; - std::vector< double >::value_type temp2 ; - double val2 ; - int ecode2 = 0 ; - std::vector< double > *result = 0 ; - - CheckRhs(2, 2); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - ecode1 = SWIG_AsVal_size_t(1, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_nlopt_doublevector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); - } - arg1 = (std::vector< double >::size_type)(val1); - ecode2 = SWIG_AsVal_double(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_nlopt_doublevector" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); - } - temp2 = (std::vector< double >::value_type)(val2); - arg2 = &temp2; - result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 1 | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_new_nlopt_doublevector (char *fname, unsigned long fname_len) { - int argc = Rhs; - int argv[2] = { - 1,2 - }; - - if (argc == 0) { - return _wrap_new_nlopt_doublevector__SWIG_0(fname, fname_len); - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_nlopt_doublevector__SWIG_2(fname, fname_len); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_nlopt_doublevector__SWIG_1(fname, fname_len); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_size_t(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_nlopt_doublevector__SWIG_3(fname, fname_len); - } - } - } - - Scierror(999, _("No matching function for overload")); - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_push_back(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double >::value_type *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< double >::value_type temp2 ; - double val2 ; - int ecode2 = 0 ; - - CheckRhs(2, 2); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - ecode2 = SWIG_AsVal_double(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlopt_doublevector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); - } - temp2 = (std::vector< double >::value_type)(val2); - arg2 = &temp2; - (arg1)->push_back((std::vector< double >::value_type const &)*arg2); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_front(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< double >::value_type *result = 0 ; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_front" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SWIG_From_double((double)(*result))))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_back(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< double >::value_type *result = 0 ; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_back" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SWIG_From_double((double)(*result))))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_assign(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double >::size_type arg2 ; - std::vector< double >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< double >::value_type temp3 ; - double val3 ; - int ecode3 = 0 ; - - CheckRhs(3, 3); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_assign" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - ecode2 = SWIG_AsVal_size_t(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlopt_doublevector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); - } - arg2 = (std::vector< double >::size_type)(val2); - ecode3 = SWIG_AsVal_double(3, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "nlopt_doublevector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); - } - temp3 = (std::vector< double >::value_type)(val3); - arg3 = &temp3; - (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_resize__SWIG_1(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double >::size_type arg2 ; - std::vector< double >::value_type *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - std::vector< double >::value_type temp3 ; - double val3 ; - int ecode3 = 0 ; - - CheckRhs(3, 3); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - ecode2 = SWIG_AsVal_size_t(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlopt_doublevector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); - } - arg2 = (std::vector< double >::size_type)(val2); - ecode3 = SWIG_AsVal_double(3, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "nlopt_doublevector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); - } - temp3 = (std::vector< double >::value_type)(val3); - arg3 = &temp3; - (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_resize (char *fname, unsigned long fname_len) { - int argc = Rhs; - int argv[3] = { - 1,2,3 - }; - - if (argc == 2) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_nlopt_doublevector_resize__SWIG_0(fname, fname_len); - } - } - } - if (argc == 3) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_nlopt_doublevector_resize__SWIG_1(fname, fname_len); - } - } - } - } - - Scierror(999, _("No matching function for overload")); - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_reserve(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - std::vector< double >::size_type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - CheckRhs(2, 2); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - ecode2 = SWIG_AsVal_size_t(2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlopt_doublevector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); - } - arg2 = (std::vector< double >::size_type)(val2); - (arg1)->reserve(arg2); - - return SWIG_OK; -} - - -int _wrap_nlopt_doublevector_capacity(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::vector< double >::size_type result; - - CheckRhs(1, 1); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nlopt_doublevector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'"); - } - arg1 = (std::vector< double > *)(argp1); - result = ((std::vector< double > const *)arg1)->capacity(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SWIG_From_size_t((size_t)(result))))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_delete_nlopt_doublevector(char *fname, unsigned long fname_len) { - std::vector< double > *arg1 = (std::vector< double > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - CheckRhs(1, 1); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_nlopt_doublevector" "', argument " "1"" of type '" "std::vector< double > *""'"); - } - arg1 = (std::vector< double > *)(argp1); - delete arg1; - - return SWIG_OK; -} - - -int _wrap_opt_set_lower_bound(char *fname, unsigned long fname_len) { - nlopt::opt *arg1 = (nlopt::opt *) 0 ; - std::vector< double,std::allocator< double > > *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - - CheckRhs(2, 2); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_nlopt__opt, 0 | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "opt_set_lower_bound" "', argument " "1"" of type '" "nlopt::opt *""'"); - } - arg1 = (nlopt::opt *)(argp1); - { - std::vector > *ptr = (std::vector > *)0; - res2 = swig::asptr(2, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "opt_set_lower_bound" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "opt_set_lower_bound" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); - } - arg2 = ptr; - } - (arg1)->set_lower_bound((std::vector< double,std::allocator< double > > const &)*arg2); - - return SWIG_OK; -} - - -int _wrap_new_opt(char *fname, unsigned long fname_len) { - nlopt::opt *result = 0 ; - - CheckRhs(0, 0); - CheckLhs(1, 1); - SWIG_Scilab_SetFname(fname); - result = (nlopt::opt *)new nlopt::opt(); - SWIG_Scilab_SetOutputPosition(1); /* functionReturnTypemap */ - if (!SWIG_IsOK(SWIG_Scilab_SetOutput(SwigScilabPtrFromObject(pvApiCtx, 1, SWIG_as_voidptr(result), SWIGTYPE_p_nlopt__opt, 1 | 0 )))) return SWIG_ERROR; - return SWIG_OK; -} - - -int _wrap_delete_opt(char *fname, unsigned long fname_len) { - nlopt::opt *arg1 = (nlopt::opt *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - CheckRhs(1, 1); - CheckLhs(0, 1); - SWIG_Scilab_SetFname(fname); - res1 = SwigScilabPtrToObject(pvApiCtx, 1, &argp1, SWIGTYPE_p_nlopt__opt, SWIG_POINTER_DISOWN | 0 , fname); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_opt" "', argument " "1"" of type '" "nlopt::opt *""'"); - } - arg1 = (nlopt::opt *)(argp1); - delete arg1; - - return SWIG_OK; -} - - -} - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_nlopt__opt = {"_p_nlopt__opt", "nlopt::opt *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_allocator_type, - &_swigt__p_char, - &_swigt__p_difference_type, - &_swigt__p_nlopt__opt, - &_swigt__p_size_type, - &_swigt__p_std__allocatorT_double_t, - &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, - &_swigt__p_value_type, -}; - -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_nlopt__opt[] = { {&_swigt__p_nlopt__opt, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_allocator_type, - _swigc__p_char, - _swigc__p_difference_type, - _swigc__p_nlopt__opt, - _swigc__p_size_type, - _swigc__p_std__allocatorT_double_t, - _swigc__p_std__vectorT_double_std__allocatorT_double_t_t, - _swigc__p_value_type, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -SWIGEXPORT int SWIG_init(void) { - return 0; -} - diff --git a/Examples/scilab/vector/libexamplelib.c b/Examples/scilab/vector/libexamplelib.c deleted file mode 100644 index 12029f6c3..000000000 --- a/Examples/scilab/vector/libexamplelib.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -static int direct_gateway(char *fname,void F(void)) { F();return 0;}; -extern Gatefunc _wrap_nlopt_doublevector_empty; -extern Gatefunc _wrap_nlopt_doublevector_size; -extern Gatefunc _wrap_nlopt_doublevector_clear; -extern Gatefunc _wrap_nlopt_doublevector_swap; -extern Gatefunc _wrap_nlopt_doublevector_get_allocator; -extern Gatefunc _wrap_nlopt_doublevector_pop_back; -extern Gatefunc _wrap_new_nlopt_doublevector; -extern Gatefunc _wrap_nlopt_doublevector_push_back; -extern Gatefunc _wrap_nlopt_doublevector_front; -extern Gatefunc _wrap_nlopt_doublevector_back; -extern Gatefunc _wrap_nlopt_doublevector_assign; -extern Gatefunc _wrap_nlopt_doublevector_resize; -extern Gatefunc _wrap_nlopt_doublevector_reserve; -extern Gatefunc _wrap_nlopt_doublevector_capacity; -extern Gatefunc _wrap_delete_nlopt_doublevector; -extern Gatefunc _wrap_opt_set_lower_bound; -extern Gatefunc _wrap_new_opt; -extern Gatefunc _wrap_delete_opt; -static GenericTable Tab[]={ - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_empty,"nlopt_doublevector_empty"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_size,"nlopt_doublevector_size"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_clear,"nlopt_doublevector_clear"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_swap,"nlopt_doublevector_swap"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_get_allocator,"nlopt_doublevector_get_allocator"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_pop_back,"nlopt_doublevector_pop_back"}, - {(Myinterfun)sci_gateway,_wrap_new_nlopt_doublevector,"new_nlopt_doublevector"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_push_back,"nlopt_doublevector_push_back"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_front,"nlopt_doublevector_front"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_back,"nlopt_doublevector_back"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_assign,"nlopt_doublevector_assign"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_resize,"nlopt_doublevector_resize"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_reserve,"nlopt_doublevector_reserve"}, - {(Myinterfun)sci_gateway,_wrap_nlopt_doublevector_capacity,"nlopt_doublevector_capacity"}, - {(Myinterfun)sci_gateway,_wrap_delete_nlopt_doublevector,"delete_nlopt_doublevector"}, - {(Myinterfun)sci_gateway,_wrap_opt_set_lower_bound,"opt_set_lower_bound"}, - {(Myinterfun)sci_gateway,_wrap_new_opt,"new_opt"}, - {(Myinterfun)sci_gateway,_wrap_delete_opt,"delete_opt"}, -}; - -int C2F(libexamplelib)() -{ - Rhs = Max(0, Rhs); - if (*(Tab[Fin-1].f) != NULL) - { - if(pvApiCtx == NULL) - { - pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx)); - } - pvApiCtx->pstName = (char*)Tab[Fin-1].name; - (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F); - } - return 0; -}