hexsha
stringlengths
40
40
size
int64
19
11.4M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
270
max_stars_repo_name
stringlengths
5
110
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
270
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
9
max_issues_count
float64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
270
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
9
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
19
11.4M
avg_line_length
float64
1.93
229k
max_line_length
int64
12
688k
alphanum_fraction
float64
0.07
0.99
matches
listlengths
1
10
6828751d4e826a8c15f7dafa6a605c69fc31fcc7
1,530
cpp
C++
Hari's Contests/LC November Challenge/Day2-UniquePaths-3.cpp
Tiger-Team-01/DSA-A-Z-Practice
e08284ffdb1409c08158dd4e90dc75dc3a3c5b18
[ "MIT" ]
14
2021-08-22T18:21:14.000Z
2022-03-08T12:04:23.000Z
Hari's Contests/LC November Challenge/Day2-UniquePaths-3.cpp
Tiger-Team-01/DSA-A-Z-Practice
e08284ffdb1409c08158dd4e90dc75dc3a3c5b18
[ "MIT" ]
1
2021-10-17T18:47:17.000Z
2021-10-17T18:47:17.000Z
Hari's Contests/LC November Challenge/Day2-UniquePaths-3.cpp
Tiger-Team-01/DSA-A-Z-Practice
e08284ffdb1409c08158dd4e90dc75dc3a3c5b18
[ "MIT" ]
5
2021-09-01T08:21:12.000Z
2022-03-09T12:13:39.000Z
// Hari // we need to count total no. of 0s and also find out which cell is start point int zeroCells = 1, res = 0; // zeroCells starts w 1 to account for start point // which is 1 and not 0 void dfs(vector<vector<int>>& grid, int x, int y, int countZeros){ // base cases if(x < 0 || y < 0 || x >=grid.size() || y>=grid[0].size() || grid[x][y] == -1) return; if(grid[x][y] == 2) { if (countZeros == zeroCells) res += 1; return; // we reached destination and all cells w 0 have been visited -> inc. unique path count (res) by 1. Else just return } grid[x][y] = -1; // mark curr cell visited // dfs dfs(grid, x+1, y, countZeros+1); dfs(grid, x-1, y, countZeros+1); dfs(grid, x, y+1, countZeros+1); dfs(grid, x, y-1, countZeros+1); // backtrack before trying to find new path grid[x][y] = 0; } int uniquePathsIII(vector<vector<int>>& grid) { // fast ios_base::sync_with_stdio(false); int start_x, start_y; int rows = grid.size(), cols = grid[0].size(); for(int i = 0; i<rows; i++){ for(int j = 0; j<cols; j++){ if(grid[i][j] == 1) start_x = i, start_y = j; else if(grid[i][j] == 0) zeroCells += 1; } } // now do dfs from start dfs(grid, start_x, start_y, 0); return res; }
32.553191
136
0.486928
[ "vector" ]
6829665a1addc14d0e903b0b1b0d018bdf1f49d1
21,032
cpp
C++
mediastreamer2/src/android/androidvideo.cpp
tiena2cva/Linphone
498eab7fca88915b283d079dfbb2c2b315ce43ff
[ "BSD-2-Clause" ]
1
2015-11-23T14:34:44.000Z
2015-11-23T14:34:44.000Z
mediastreamer2/src/android/androidvideo.cpp
tiena2cva/Linphone
498eab7fca88915b283d079dfbb2c2b315ce43ff
[ "BSD-2-Clause" ]
null
null
null
mediastreamer2/src/android/androidvideo.cpp
tiena2cva/Linphone
498eab7fca88915b283d079dfbb2c2b315ce43ff
[ "BSD-2-Clause" ]
null
null
null
/* mediastreamer2 library - modular sound and video processing and streaming This is the video capture filter for Android. It uses one of the JNI wrappers to access Android video capture API. See: org.linphone.mediastream.video.capture.AndroidVideoApi9JniWrapper org.linphone.mediastream.video.capture.AndroidVideoApi8JniWrapper org.linphone.mediastream.video.capture.AndroidVideoApi5JniWrapper * Copyright (C) 2010 Belledonne Communications, Grenoble, France This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { #include "mediastreamer2/msvideo.h" #include "mediastreamer2/msfilter.h" #include "mediastreamer2/mswebcam.h" #include "mediastreamer2/msjava.h" #include "mediastreamer2/msticker.h" } #include <jni.h> #include <math.h> static int android_sdk_version = 5; static const char* AndroidApi9WrapperPath = "org/linphone/mediastream/video/capture/AndroidVideoApi9JniWrapper"; static const char* AndroidApi8WrapperPath = "org/linphone/mediastream/video/capture/AndroidVideoApi8JniWrapper"; static const char* AndroidApi5WrapperPath = "org/linphone/mediastream/video/capture/AndroidVideoApi5JniWrapper"; static const char* VersionPath = "org/linphone/mediastream/Version"; #define UNDEFINED_ROTATION -1 /************************ Data structures ************************/ // Struct holding Android's cameras properties struct AndroidWebcamConfig { int id; int frontFacing; int orientation; }; struct AndroidReaderContext { AndroidReaderContext(MSFilter *f, MSWebCam *cam):filter(f), webcam(cam),frame(0),fps(5){ ms_message("Creating AndroidReaderContext for Android VIDEO capture filter"); ms_mutex_init(&mutex,NULL); androidCamera = 0; previewWindow = 0; rotation = rotationSavedDuringVSize = UNDEFINED_ROTATION; }; ~AndroidReaderContext(){ if (frame != 0) { freeb(frame); } ms_mutex_destroy(&mutex); }; MSFrameRateController fpsControl; MSAverageFPS averageFps; MSFilter *filter; MSWebCam *webcam; mblk_t *frame; float fps; MSVideoSize requestedSize, hwCapableSize, usedSize; ms_mutex_t mutex; int rotation, rotationSavedDuringVSize; int useDownscaling; char fps_context[64]; jobject androidCamera; jobject previewWindow; jclass helperClass; }; /************************ Private helper methods ************************/ static jclass getHelperClassGlobalRef(JNIEnv *env); static int compute_image_rotation_correction(AndroidReaderContext* d, int rotation); static void compute_cropping_offsets(MSVideoSize hwSize, MSVideoSize outputSize, int* yoff, int* cbcroff); static AndroidReaderContext *getContext(MSFilter *f); /************************ MS2 filter methods ************************/ static int video_capture_set_fps(MSFilter *f, void *arg){ AndroidReaderContext* d = (AndroidReaderContext*) f->data; d->fps=*((float*)arg); return 0; } static int video_capture_set_autofocus(MSFilter *f, void* data){ JNIEnv *env = ms_get_jni_env(); AndroidReaderContext* d = (AndroidReaderContext*) f->data; jmethodID method = env->GetStaticMethodID(d->helperClass,"activateAutoFocus", "(Ljava/lang/Object;)V"); env->CallStaticObjectMethod(d->helperClass, method, d->androidCamera); return 0; } static int video_capture_get_fps(MSFilter *f, void *arg){ AndroidReaderContext* d = (AndroidReaderContext*) f->data; *((float*)arg) = ms_average_fps_get(&d->averageFps); return 0; } static int video_capture_set_vsize(MSFilter *f, void* data){ AndroidReaderContext* d = (AndroidReaderContext*) f->data; ms_mutex_lock(&d->mutex); d->requestedSize=*(MSVideoSize*)data; // always request landscape mode, orientation is handled later if (d->requestedSize.height > d->requestedSize.width) { int tmp = d->requestedSize.height; d->requestedSize.height = d->requestedSize.width; d->requestedSize.width = tmp; } JNIEnv *env = ms_get_jni_env(); jmethodID method = env->GetStaticMethodID(d->helperClass,"selectNearestResolutionAvailable", "(III)[I"); // find neareast hw-available resolution (using jni call); jobject resArray = env->CallStaticObjectMethod(d->helperClass, method, ((AndroidWebcamConfig*)d->webcam->data)->id, d->requestedSize.width, d->requestedSize.height); if (!resArray) { ms_mutex_unlock(&d->mutex); ms_error("Failed to retrieve camera '%d' supported resolutions\n", ((AndroidWebcamConfig*)d->webcam->data)->id); return -1; } // handle result : // - 0 : width // - 1 : height // - 2 : useDownscaling jint res[3]; env->GetIntArrayRegion((jintArray)resArray, 0, 3, res); ms_message("Camera selected resolution is: %dx%d (requested: %dx%d) with downscaling?%d\n", res[0], res[1], d->requestedSize.width, d->requestedSize.height, res[2]); d->hwCapableSize.width = res[0]; d->hwCapableSize.height = res[1]; d->useDownscaling = res[2]; int rqSize = d->requestedSize.width * d->requestedSize.height; int hwSize = d->hwCapableSize.width * d->hwCapableSize.height; double downscale = d->useDownscaling ? 0.5 : 1; // if hw supplies a smaller resolution, modify requested size accordingly if ((hwSize * downscale * downscale) < rqSize) { ms_message("Camera cannot produce requested resolution %dx%d, will supply smaller one: %dx%d\n", d->requestedSize.width, d->requestedSize.height, (int) (res[0] * downscale), (int) (res[1]*downscale)); d->usedSize.width = (int) (d->hwCapableSize.width * downscale); d->usedSize.height = (int) (d->hwCapableSize.height * downscale); } else if ((hwSize * downscale * downscale) > rqSize) { ms_message("Camera cannot produce requested resolution %dx%d, will capture a bigger one (%dx%d) and crop it to match encoder requested resolution\n", d->requestedSize.width, d->requestedSize.height, (int)(res[0] * downscale), (int)(res[1] * downscale)); d->usedSize.width = d->requestedSize.width; d->usedSize.height = d->requestedSize.height; } else { d->usedSize.width = d->requestedSize.width; d->usedSize.height = d->requestedSize.height; } // is phone held |_ to cam orientation ? if (d->rotation == UNDEFINED_ROTATION || compute_image_rotation_correction(d, d->rotation) % 180 != 0) { if (d->rotation == UNDEFINED_ROTATION) { ms_error("To produce a correct image, Mediastreamer MUST be aware of device's orientation BEFORE calling 'configure_video_source'\n"); ms_warning("Capture filter do not know yet about device's orientation.\n" "Current assumption: device is held perpendicular to its webcam (ie: portrait mode for a phone)\n"); d->rotationSavedDuringVSize = 0; } else { d->rotationSavedDuringVSize = d->rotation; } bool camIsLandscape = d->hwCapableSize.width > d->hwCapableSize.height; bool useIsLandscape = d->usedSize.width > d->usedSize.height; // if both are landscape or both portrait, swap if (camIsLandscape == useIsLandscape) { int t = d->usedSize.width; d->usedSize.width = d->usedSize.height; d->usedSize.height = t; ms_message("Swapped resolution width and height to : %dx%d\n", d->usedSize.width, d->usedSize.height); } } else { d->rotationSavedDuringVSize = d->rotation; } ms_mutex_unlock(&d->mutex); return 0; } static int video_capture_get_vsize(MSFilter *f, void* data){ AndroidReaderContext* d = (AndroidReaderContext*) f->data; *(MSVideoSize*)data=d->usedSize; return 0; } static int video_capture_get_pix_fmt(MSFilter *f, void *data){ *(MSPixFmt*)data=MS_YUV420P; return 0; } // Java will give us a pointer to capture preview surface. static int video_set_native_preview_window(MSFilter *f, void *arg) { AndroidReaderContext* d = (AndroidReaderContext*) f->data; ms_mutex_lock(&d->mutex); jobject w = *((jobject*)arg); if (w == d->previewWindow) { ms_mutex_unlock(&d->mutex); return 0; } JNIEnv *env = ms_get_jni_env(); jmethodID method = env->GetStaticMethodID(d->helperClass,"setPreviewDisplaySurface", "(Ljava/lang/Object;Ljava/lang/Object;)V"); if (d->androidCamera) { if (d->previewWindow == 0) { ms_message("Preview capture window set for the 1st time (win: %p rotation:%d)\n", w, d->rotation); } else { ms_message("Preview capture window changed (oldwin: %p newwin: %p rotation:%d)\n", d->previewWindow, w, d->rotation); env->CallStaticVoidMethod(d->helperClass, env->GetStaticMethodID(d->helperClass,"stopRecording", "(Ljava/lang/Object;)V"), d->androidCamera); env->DeleteGlobalRef(d->androidCamera); d->androidCamera = env->NewGlobalRef( env->CallStaticObjectMethod(d->helperClass, env->GetStaticMethodID(d->helperClass,"startRecording", "(IIIIIJ)Ljava/lang/Object;"), ((AndroidWebcamConfig*)d->webcam->data)->id, d->hwCapableSize.width, d->hwCapableSize.height, (jint)d->fps, (d->rotation != UNDEFINED_ROTATION) ? d->rotation:0, (jlong)d)); } // if previewWindow AND camera are valid => set preview window if (w && d->androidCamera) env->CallStaticVoidMethod(d->helperClass, method, d->androidCamera, w); } else { ms_message("Preview capture window set but camera not created yet; remembering it for later use\n"); } d->previewWindow = w; ms_mutex_unlock(&d->mutex); return 0; } static int video_get_native_preview_window(MSFilter *f, void *arg) { AndroidReaderContext* d = (AndroidReaderContext*) f->data; arg = &d->previewWindow; return 0; } static int video_set_device_rotation(MSFilter* f, void* arg) { AndroidReaderContext* d = (AndroidReaderContext*) f->data; d->rotation=*((int*)arg); ms_message("%s : %d\n", __FUNCTION__, d->rotation); return 0; } void video_capture_preprocess(MSFilter *f){ ms_message("Preprocessing of Android VIDEO capture filter"); AndroidReaderContext *d = getContext(f); ms_mutex_lock(&d->mutex); snprintf(d->fps_context, sizeof(d->fps_context), "Captured mean fps=%%f, expected=%f", d->fps); ms_video_init_framerate_controller(&d->fpsControl, d->fps); ms_video_init_average_fps(&d->averageFps, d->fps_context); JNIEnv *env = ms_get_jni_env(); jmethodID method = env->GetStaticMethodID(d->helperClass,"startRecording", "(IIIIIJ)Ljava/lang/Object;"); ms_message("Starting Android camera '%d' (rotation:%d)\n", ((AndroidWebcamConfig*)d->webcam->data)->id, d->rotation); jobject cam = env->CallStaticObjectMethod(d->helperClass, method, ((AndroidWebcamConfig*)d->webcam->data)->id, d->hwCapableSize.width, d->hwCapableSize.height, (jint)d->fps, d->rotationSavedDuringVSize, (jlong)d); d->androidCamera = env->NewGlobalRef(cam); if (d->previewWindow) { method = env->GetStaticMethodID(d->helperClass,"setPreviewDisplaySurface", "(Ljava/lang/Object;Ljava/lang/Object;)V"); env->CallStaticVoidMethod(d->helperClass, method, d->androidCamera, d->previewWindow); } ms_message("Preprocessing of Android VIDEO capture filter done"); ms_mutex_unlock(&d->mutex); } static void video_capture_process(MSFilter *f){ AndroidReaderContext* d = getContext(f); ms_mutex_lock(&d->mutex); // If frame not ready, return if (d->frame == 0) { ms_mutex_unlock(&d->mutex); return; } ms_video_update_average_fps(&d->averageFps, f->ticker->time); ms_queue_put(f->outputs[0],d->frame); d->frame = 0; ms_mutex_unlock(&d->mutex); } static void video_capture_postprocess(MSFilter *f){ ms_message("Postprocessing of Android VIDEO capture filter"); AndroidReaderContext* d = getContext(f); JNIEnv *env = ms_get_jni_env(); ms_mutex_lock(&d->mutex); if (d->androidCamera) { jmethodID method = env->GetStaticMethodID(d->helperClass,"stopRecording", "(Ljava/lang/Object;)V"); env->CallStaticVoidMethod(d->helperClass, method, d->androidCamera); env->DeleteGlobalRef(d->androidCamera); } d->androidCamera = 0; d->previewWindow = 0; if (d->frame){ freemsg(d->frame); d->frame=NULL; } ms_mutex_unlock(&d->mutex); } static void video_capture_init(MSFilter *f) { AndroidReaderContext* d = new AndroidReaderContext(f, 0); ms_message("Init of Android VIDEO capture filter (%p)", d); JNIEnv *env = ms_get_jni_env(); d->helperClass = getHelperClassGlobalRef(env); f->data = d; } static void video_capture_uninit(MSFilter *f) { ms_message("Uninit of Android VIDEO capture filter"); AndroidReaderContext* d = getContext(f); JNIEnv *env = ms_get_jni_env(); env->DeleteGlobalRef(d->helperClass); delete d; } static MSFilterMethod video_capture_methods[]={ { MS_FILTER_SET_FPS, &video_capture_set_fps}, { MS_FILTER_GET_FPS, &video_capture_get_fps}, { MS_FILTER_SET_VIDEO_SIZE, &video_capture_set_vsize}, { MS_FILTER_GET_VIDEO_SIZE, &video_capture_get_vsize}, { MS_FILTER_GET_PIX_FMT, &video_capture_get_pix_fmt}, { MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID , &video_set_native_preview_window },//preview is managed by capture filter { MS_VIDEO_DISPLAY_GET_NATIVE_WINDOW_ID , &video_get_native_preview_window }, { MS_VIDEO_CAPTURE_SET_DEVICE_ORIENTATION, &video_set_device_rotation }, { MS_VIDEO_CAPTURE_SET_AUTOFOCUS, &video_capture_set_autofocus }, { 0,0 } }; MSFilterDesc ms_video_capture_desc={ MS_ANDROID_VIDEO_READ_ID, "MSAndroidVideoCapture", N_("A filter that captures Android video."), MS_FILTER_OTHER, NULL, 0, 1, video_capture_init, video_capture_preprocess, video_capture_process, video_capture_postprocess, video_capture_uninit, video_capture_methods }; MS_FILTER_DESC_EXPORT(ms_video_capture_desc) /* Webcam methods */ static void video_capture_detect(MSWebCamManager *obj); static void video_capture_cam_init(MSWebCam *cam){ ms_message("Android VIDEO capture filter cam init"); } static MSFilter *video_capture_create_reader(MSWebCam *obj){ ms_message("Instanciating Android VIDEO capture MS filter"); MSFilter* lFilter = ms_filter_new_from_desc(&ms_video_capture_desc); getContext(lFilter)->webcam = obj; return lFilter; } MSWebCamDesc ms_android_video_capture_desc={ "AndroidVideoCapture", &video_capture_detect, &video_capture_cam_init, &video_capture_create_reader, NULL }; static void video_capture_detect(MSWebCamManager *obj){ ms_message("Detecting Android VIDEO cards"); JNIEnv *env = ms_get_jni_env(); jclass helperClass = getHelperClassGlobalRef(env); if (helperClass==NULL) return; // create 3 int arrays - assuming 2 webcams at most jintArray indexes = (jintArray)env->NewIntArray(2); jintArray frontFacing = (jintArray)env->NewIntArray(2); jintArray orientation = (jintArray)env->NewIntArray(2); jmethodID method = env->GetStaticMethodID(helperClass,"detectCameras", "([I[I[I)I"); int count = env->CallStaticIntMethod(helperClass, method, indexes, frontFacing, orientation); ms_message("%d cards detected", count); for(int i=0; i<count; i++) { MSWebCam *cam = ms_web_cam_new(&ms_android_video_capture_desc); AndroidWebcamConfig* c = new AndroidWebcamConfig(); env->GetIntArrayRegion(indexes, i, 1, &c->id); env->GetIntArrayRegion(frontFacing, i, 1, &c->frontFacing); env->GetIntArrayRegion(orientation, i, 1, &c->orientation); cam->data = c; cam->name = ms_strdup("Android video name"); char* idstring = (char*) malloc(15); snprintf(idstring, 15, "Android%d", c->id); cam->id = idstring; ms_web_cam_manager_add_cam(obj,cam); ms_message("camera created: id=%d frontFacing=%d orientation=%d [msid:%s]\n", c->id, c->frontFacing, c->orientation, idstring); } env->DeleteLocalRef(indexes); env->DeleteLocalRef(frontFacing); env->DeleteLocalRef(orientation); env->DeleteGlobalRef(helperClass); ms_message("Detection of Android VIDEO cards done"); } /************************ JNI methods ************************/ #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_linphone_mediastream_video_capture_AndroidVideoApi5JniWrapper_putImage(JNIEnv* env, jclass thiz,jlong nativePtr,jbyteArray frame) { AndroidReaderContext* d = (AndroidReaderContext*) nativePtr; ms_mutex_lock(&d->mutex); if (!d->androidCamera){ ms_mutex_unlock(&d->mutex); return; } if (!ms_video_capture_new_frame(&d->fpsControl,d->filter->ticker->time)) { ms_mutex_unlock(&d->mutex); return; } if (d->rotation != UNDEFINED_ROTATION && d->rotationSavedDuringVSize != d->rotation) { ms_warning("Rotation has changed (new value: %d) since vsize was run (old value: %d)." "Will produce inverted images. Use set_device_orientation() then update call.\n", d->rotation, d->rotationSavedDuringVSize); } int image_rotation_correction = compute_image_rotation_correction(d, d->rotationSavedDuringVSize); jboolean isCopied; jbyte* jinternal_buff = env->GetByteArrayElements(frame, &isCopied); if (isCopied) { ms_warning("The video frame received from Java has been copied"); } int y_cropping_offset=0, cbcr_cropping_offset=0; MSVideoSize targetSize; d->useDownscaling?targetSize.width=d->requestedSize.width*2:targetSize.width=d->requestedSize.width; d->useDownscaling?targetSize.height=d->requestedSize.height*2:targetSize.height=d->requestedSize.height; compute_cropping_offsets(d->hwCapableSize, targetSize, &y_cropping_offset, &cbcr_cropping_offset); int width = d->hwCapableSize.width; int height = d->hwCapableSize.height; uint8_t* y_src = (uint8_t*)(jinternal_buff + y_cropping_offset); uint8_t* cbcr_src = (uint8_t*) (jinternal_buff + width * height + cbcr_cropping_offset); /* Warning note: image_rotation_correction == 90 does not imply portrait mode ! (incorrect function naming). It only implies one thing: image needs to rotated by that amount to be correctly displayed. */ mblk_t* yuv_block = copy_ycbcrbiplanar_to_true_yuv_with_rotation_and_down_scale_by_2(y_src , cbcr_src , image_rotation_correction , d->usedSize.width , d->usedSize.height , d->hwCapableSize.width , d->hwCapableSize.width , false , d->useDownscaling); if (yuv_block) { if (d->frame) freemsg(d->frame); d->frame = yuv_block; } ms_mutex_unlock(&d->mutex); // JNI_ABORT free the buffer without copying back the possible changes env->ReleaseByteArrayElements(frame, jinternal_buff, JNI_ABORT); } #ifdef __cplusplus } #endif static int compute_image_rotation_correction(AndroidReaderContext* d, int rotation) { AndroidWebcamConfig* conf = (AndroidWebcamConfig*)(AndroidWebcamConfig*)d->webcam->data; int result; if (conf->frontFacing) { ms_debug("%s: %d + %d\n", __FUNCTION__, ((AndroidWebcamConfig*)d->webcam->data)->orientation, rotation); result = ((AndroidWebcamConfig*)d->webcam->data)->orientation + rotation; } else { ms_debug("%s: %d - %d\n", __FUNCTION__, ((AndroidWebcamConfig*)d->webcam->data)->orientation, rotation); result = ((AndroidWebcamConfig*)d->webcam->data)->orientation - rotation; } while(result < 0) result += 360; return result % 360; } static void compute_cropping_offsets(MSVideoSize hwSize, MSVideoSize outputSize, int* yoff, int* cbcroff) { // if hw <= out -> return if (hwSize.width * hwSize.height <= outputSize.width * outputSize.height) { *yoff = 0; *cbcroff = 0; return; } int halfDiffW = (hwSize.width - ((outputSize.width>outputSize.height)?outputSize.width:outputSize.height)) / 2; int halfDiffH = (hwSize.height - ((outputSize.width<outputSize.height)?outputSize.width:outputSize.height)) / 2; *yoff = hwSize.width * halfDiffH + halfDiffW; *cbcroff = hwSize.width * halfDiffH * 0.5 + halfDiffW; } static jclass getHelperClassGlobalRef(JNIEnv *env) { ms_message("getHelperClassGlobalRef (env: %p)", env); const char* className; // FindClass only returns local references. // Find the current Android SDK version jclass version = env->FindClass(VersionPath); jmethodID method = env->GetStaticMethodID(version,"sdk", "()I"); android_sdk_version = env->CallStaticIntMethod(version, method); ms_message("Android SDK version found is %i", android_sdk_version); env->DeleteLocalRef(version); if (android_sdk_version >= 9) { className = AndroidApi9WrapperPath; } else if (android_sdk_version >= 8) { className = AndroidApi8WrapperPath; } else { className = AndroidApi5WrapperPath; } jclass c = env->FindClass(className); if (c == 0) { ms_error("Could not load class '%s' (%d)", className, android_sdk_version); return NULL; } else { jclass globalRef = reinterpret_cast<jclass>(env->NewGlobalRef(c)); env->DeleteLocalRef(c); return globalRef; } } static AndroidReaderContext *getContext(MSFilter *f) { return (AndroidReaderContext*) f->data; }
34.821192
166
0.728984
[ "object" ]
682c488a17b77118d13fc224dc6155702efdb1c4
1,673
cpp
C++
codeforces-topics-wise-interesting-problems/BIT MANIPULATION/main.cpp
navjotdadwal/Hack-CP-DSA
60fa56c12f1662badc7f7b562fc3e1550b650362
[ "MIT" ]
1
2020-08-27T06:59:52.000Z
2020-08-27T06:59:52.000Z
codeforces-topics-wise-interesting-problems/BIT MANIPULATION/main.cpp
navjotdadwal/Hack-CP-DSA
60fa56c12f1662badc7f7b562fc3e1550b650362
[ "MIT" ]
null
null
null
codeforces-topics-wise-interesting-problems/BIT MANIPULATION/main.cpp
navjotdadwal/Hack-CP-DSA
60fa56c12f1662badc7f7b562fc3e1550b650362
[ "MIT" ]
null
null
null
#include<bits/stdc++.h> #define pp pop_back #define pb push_back #define int long long int #define INF 1e18 #define vec vector<int> #define pii pair<int,int> #define REP(i,a,b) for(i=a;i<b;i++) using namespace std; int ComputeXorFrom1ToN(int n) { if(n%4==0) return n; else if(n%4==1) return 1; else if(n%4==2) return n+1; else return 0; } int isPowerOfTwo(int x) { return x && (!(x&(x-1))); } void swapno(int a,int b) { a^=b; b^=a; a^=b; } int MSB(int n) { // for 64 bit integer n|=n>>1; n|=n>>2; n|=n>>4; n|=n>>8; n|=n>>16; n|=n>>32; n+=1; return (n>>1); } int clearLSB(int i,int x) { // clear all bits from LSB to the i-th bit in x int mask=~((1<<(i+1))-1); x&=mask; return x; } int countsetbits(int n) { int c=0; while(x) { x&=(x-1); c++; } return c; } int setabit(int n,int pos) { //setting the bit at position pos n|=(1<<pos); return n; } int unsetbit(int n,int pos) { //unsetting the bit at position pos n&=(~(1<<pos)); return n; } int toggling(int n,int pos) { //toggling the bit at position pos n^=(1<<pos); return n; } int check(int n,int pos) { //check bit at position pos is set or unset return n&(1<<pos); } int onecomplement(int n) { return (~n); } int twocomplement(int n) { // -n or (~n+1) return (~n+1); } int strippingLSB(int n) { return x & (x-1); } int getLSB(int n) { return x&(-x); } int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t=1; cin>>t; while(t--) { } }
14.9375
50
0.529588
[ "vector" ]
68326a370434596c2d956e6bf070e41560d57d2c
54,290
cpp
C++
arm9/source/_library/library.image.gif.encoder.cpp
DuffsDevice/winds
35f1b5fd458c527a6c372f94077e784f6fd960b2
[ "MIT" ]
2
2017-02-07T18:25:07.000Z
2021-12-13T18:29:03.000Z
arm9/source/_library/library.image.gif.encoder.cpp
DuffsDevice/winds
35f1b5fd458c527a6c372f94077e784f6fd960b2
[ "MIT" ]
null
null
null
arm9/source/_library/library.image.gif.encoder.cpp
DuffsDevice/winds
35f1b5fd458c527a6c372f94077e784f6fd960b2
[ "MIT" ]
null
null
null
/* ======================================================================== */ /* GIF Encoder routines. */ /* */ /* These are intended to support single-frame and multi-frame GIFs. */ /* Single frame support is for screen shots, multi-frame support is for */ /* converting movies to animated GIFs. */ /* */ /* This GIF encoder doesn't trust that the decoder honors the aspect */ /* ratio stored in the GIF. We just set it to 0. */ /* */ /* None of this code's thread-safe/reentrant. BFD. */ /* ======================================================================== */ #include <_library/library.image.gif.encoder.h> #include <_controller/controller.debug.h> #include <string.h> #include <malloc.h> #include <assert.h> #include <limits.h> //#define dprintf(x) printf x #define dprintf(x) uint8_t *gif_enc_buf = NULL; int gif_enc_buf_sz = 0; uint8_t *gif_img_tr = NULL; uint8_t *gif_img_a = NULL; uint8_t *gif_img_b = NULL; uint8_t *gif_img_d = NULL, *gif_pal_d = NULL; uint8_t *gif_img_e = NULL, *gif_pal_e = NULL; uint8_t *gif_img_f = NULL, *gif_pal_f = NULL; int gif_img_sz = 0; int gen_mpi(uint8_t *src, uint8_t *xtra, uint8_t *dst, int cnt, uint8_t *pal); int gif_best_stats[6]; /* ======================================================================== */ /* GIF_START -- Starts a single or multi-frame GIF. */ /* ======================================================================== */ int gif_start ( gif_t *gif, FILE *f, /* file to attach to GIF. */ int x_dim, /* source image X dimension */ int y_dim, /* source image Y dimension */ uint8_t *pal, /* palette to use for GIF. */ int n_cols, /* number of colors in GIF. */ int trans, /* Index of transparent Color in image */ int multi /* 0: Single image, 1: Multiple image */ ) { int i, gt_size; uint8_t *enc_ptr; size_t wrote; /* -------------------------------------------------------------------- */ /* Set up our GIF structure to hold incoming images. */ /* -------------------------------------------------------------------- */ memset(gif, 0, sizeof(gif_t)); gif->f = f; gif->x_dim = x_dim; gif->y_dim = y_dim; if (multi) { gif->vid = (uint8_t*) calloc(x_dim, y_dim); gif->pal = (uint8_t*) calloc(n_cols, 3); } else { gif->vid = gif->pal = NULL; } if (!gif_enc_buf || gif_enc_buf_sz < x_dim * y_dim * 2) { if (gif_enc_buf) free(gif_enc_buf); gif_enc_buf_sz = x_dim * y_dim * 2; gif_enc_buf = (uint8_t*) malloc(gif_enc_buf_sz); } if (!gif_enc_buf || (multi && (!gif->pal || !gif->vid))) { _debugController::debug( "gif_start: out of memory\n"); return -1; } if (multi && n_cols < 256) { gif->n_cols = n_cols + 1; gif->trans = n_cols; } else { gif->n_cols = n_cols; gif->trans = trans; } if (multi) memset(gif->vid, 0xFF & gif->trans, x_dim * y_dim); /* -------------------------------------------------------------------- */ /* Save a copy of the palette if this is a multiframe GIF. */ /* -------------------------------------------------------------------- */ if (multi) memcpy(gif->pal, pal, n_cols * 3); /* -------------------------------------------------------------------- */ /* Output a GIF header. */ /* -------------------------------------------------------------------- */ gt_size = 0; for (i = 0; i < 8; i++) if ((2 << i) >= gif->n_cols) { gt_size = i; break; } dprintf(("color_depth: %d\n",gt_size)); memcpy(gif_enc_buf, multi ? "GIF89a" : "GIF87a", 6); enc_ptr = gif_enc_buf + 6; *enc_ptr++ = (x_dim >> 0) & 0xFF; /* X dimension LSB */ *enc_ptr++ = (x_dim >> 8) & 0xFF; /* X dimension MSB */ *enc_ptr++ = (y_dim >> 0) & 0xFF; /* Y dimension LSB */ *enc_ptr++ = (y_dim >> 8) & 0xFF; /* Y dimension MSB */ *enc_ptr++ = 0x80 /* Global Color Table present */ | 0x70 /* 8 significant bits in palette entries */ | gt_size; /* Color Depth (sets GCT size) */ *enc_ptr++ = 0; /* Background color index. */ *enc_ptr++ = 0; /* Aspect ratio. We hardcode to 0. */ for (i = 0; i < gif->n_cols; i++) { *enc_ptr++ = pal[i*3+0]; *enc_ptr++ = pal[i*3+1]; *enc_ptr++ = pal[i*3+2]; } for (i = gif->n_cols; i < (2 << gt_size); i++) { *enc_ptr++ = 0xFF; *enc_ptr++ = 0x80; *enc_ptr++ = 0x80; } /* -------------------------------------------------------------------- */ /* If this is a multi-frame GIF, write out the extension block which */ /* instructs the web browser to loop the animation. */ /* */ /* byte 1 : 33 (hex 0x21) GIF Extension code */ /* byte 2 : 255 (hex 0xFF) Application Extension Label */ /* byte 3 : 11 (hex (0x0B) Length of Application Block */ /* (eleven bytes of data to follow) */ /* bytes 4 to 11 : "NETSCAPE" */ /* bytes 12 to 14 : "2.0" */ /* byte 15 : 3 (hex 0x03) Length of Data Sub-Block */ /* (three bytes of data to follow) */ /* byte 16 : 1 (hex 0x01) */ /* bytes 17 to 18 : 0 to 65535, little-endian unsigned integer */ /* This indicate the number of iterations the */ /* loop should be executed. 0 == infinite */ /* bytes 19 : 0 (hex 0x00) a Data Sub-block Terminator. */ /* */ /* Text above comes from http://the-labs.com/GIFMerge/ w/ minor edits. */ /* -------------------------------------------------------------------- */ if (multi) { *enc_ptr++ = 0x21; // Introduces Extension Block *enc_ptr++ = 0xFF; // Specifies what extension this is *enc_ptr++ = 0x0B; // = Size: 11 bytes memcpy(enc_ptr, "NETSCAPE2.0", 11); enc_ptr += 11; *enc_ptr++ = 3; // Next Extension? *enc_ptr++ = 1; *enc_ptr++ = 0; /* "forever" */ *enc_ptr++ = 0; /* "forever" */ *enc_ptr++ = 0; } else if( trans >= 0 ) { *enc_ptr++ = 0x21; // Introduces Extension Block *enc_ptr++ = 0xF9; // Specifies what extension this is *enc_ptr++ = 0x04; // = Size: 4 bytes *enc_ptr++ = 0x01; *enc_ptr++ = 0x00; *enc_ptr++ = 0x00; *enc_ptr++ = trans; *enc_ptr++ = 0x00; } /* -------------------------------------------------------------------- */ /* Write out the GIF header, and that's it. The caller will need */ /* to call gif_wr_frame_X() to write out the image(s). */ /* -------------------------------------------------------------------- */ wrote = fwrite(gif_enc_buf, 1, enc_ptr - gif_enc_buf, gif->f); if (wrote < (unsigned)(enc_ptr - gif_enc_buf)) { _debugController::debug( "gif_start: file write failed!\n"); return -1; } return wrote; } /* ======================================================================== */ /* GIF_FINISH -- Finishes off a GIF, terminating it and freeing memory. */ /* ======================================================================== */ int gif_finish(gif_t *gif) { /* -------------------------------------------------------------------- */ /* Write an image terminator. */ /* -------------------------------------------------------------------- */ fputc(0x3B, gif->f); fflush(gif->f); /* -------------------------------------------------------------------- */ /* Free any allocated memory in the gif structure. */ /* -------------------------------------------------------------------- */ if (gif->vid) { free(gif->vid); gif->vid = NULL; } if (gif->pal) { free(gif->pal); gif->pal = NULL; } return 1; /* wrote 1 byte. */ } /* ======================================================================== */ /* GIF_WR_FRAME_S -- Writes single-frame image to GIF. */ /* ======================================================================== */ int gif_wr_frame_s ( gif_t *gif, uint8_t *vid ) { uint8_t *enc_ptr = gif_enc_buf; int lzw_len; size_t wrote; assert(enc_ptr); /* -------------------------------------------------------------------- */ /* Output local header. */ /* -------------------------------------------------------------------- */ *enc_ptr++ = 0x2C; /* Local header signature. */ *enc_ptr++ = 0; /* X position of image = 0 LSB */ *enc_ptr++ = 0; /* X position of image = 0 MSB */ *enc_ptr++ = 0; /* Y position of image = 0 LSB */ *enc_ptr++ = 0; /* Y position of image = 0 MSB */ *enc_ptr++ = (gif->x_dim >> 0) & 0xFF; /* Width = X dimension LSB */ *enc_ptr++ = (gif->x_dim >> 8) & 0xFF; /* Width = X dimension MSB */ *enc_ptr++ = (gif->y_dim >> 0) & 0xFF; /* Height = Y dimension LSB */ *enc_ptr++ = (gif->y_dim >> 8) & 0xFF; /* Height = Y dimension MSB */ *enc_ptr++ = 0; /* No local colors */ /* -------------------------------------------------------------------- */ /* Now compress the image. */ /* -------------------------------------------------------------------- */ lzw_len = lzw_encode(vid, enc_ptr, gif->x_dim*gif->y_dim, gif_enc_buf_sz - (enc_ptr - gif_enc_buf)); if (lzw_len < 0) { _debugController::debug( "gif_wr_frame_s: lzw_encode failed!\n"); return -1; } enc_ptr += lzw_len; assert(enc_ptr < gif_enc_buf + gif_enc_buf_sz); /* -------------------------------------------------------------------- */ /* Write the compressed image out. */ /* -------------------------------------------------------------------- */ wrote = fwrite(gif_enc_buf, 1, enc_ptr - gif_enc_buf, gif->f); if (wrote < (unsigned)(enc_ptr - gif_enc_buf)) { _debugController::debug( "gif_wr_frame_s: file write failed!\n"); return -1; } return wrote; } /* ======================================================================== */ /* GIF_WRITE -- Wrapper around gif_start/gif_wr_frame_s. */ /* ======================================================================== */ int gif_write ( FILE *f, uint8_t *vid, int x_dim, int y_dim, uint8_t *pal, int n_cols, int trans ) { gif_t gif; int wrote = 0, ret; /* -------------------------------------------------------------------- */ /* Start the GIF. */ /* -------------------------------------------------------------------- */ ret = gif_start(&gif, f, x_dim, y_dim, pal, n_cols, trans, 0); wrote += ret; if (ret < 0) { _debugController::debug( "gif_write: gif_start failed!\n"); return -1; } /* -------------------------------------------------------------------- */ /* Send the image. */ /* -------------------------------------------------------------------- */ ret = gif_wr_frame_s(&gif, vid); wrote += ret; if (ret < 0) { _debugController::debug( "gif_wr_frame_s: gif_start failed!\n"); return -1; } /* -------------------------------------------------------------------- */ /* Terminate it. */ /* -------------------------------------------------------------------- */ ret = gif_finish(&gif); wrote += ret; if (ret < 0) { _debugController::debug( "gif_finish: gif_start failed!\n"); return -1; } return wrote; } /* ======================================================================== */ /* GIF_WR_FRAME_M -- Writes next frame to a multi-frame GIF. */ /* Attempts to optimize image. */ /* ======================================================================== */ int gif_wr_frame_m ( gif_t *gif, uint8_t *vid, int delay, int mode ) { int trans = gif->trans >= 0; uint8_t *enc_ptr = gif_enc_buf; uint8_t *vid_ptr, *prv_ptr, *trn_ptr; uint8_t *best_img1, *best_img2, *best_lct; int x, y, xx, yy, min_x, min_y, max_x, max_y, width, height; int n_col_d, n_col_e = 0, n_col_f = 0, lct_sz_d, lct_sz_e, lct_sz_f; int enc_sz_a, enc_sz_b, enc_sz_c, enc_sz_d, enc_sz_e, enc_sz_f; int best_sz, best_lct_sz, trans_idx, do_trans = 0; int lzw_len; int cnt, num_trans = 0; char best = '*'; size_t wrote; assert(enc_ptr); /* -------------------------------------------------------------------- */ /* Allocate our image optimization scratch buffers, if necessary. */ /* -------------------------------------------------------------------- */ if (gif_img_sz < gif->x_dim * gif->y_dim) { if (gif_img_tr) free(gif_img_tr); gif_img_sz = gif->x_dim * gif->y_dim; gif_img_tr = (uint8_t*) malloc(7 * gif->x_dim * gif->y_dim + 3*256); if (!gif_img_tr) { _debugController::debug( "gif_wr_frame_m: out of memory\n"); return -1; } gif_img_a = gif_img_tr + gif_img_sz * 2; gif_img_b = gif_img_a + gif_img_sz; gif_img_d = gif_img_b + gif_img_sz; gif_img_e = gif_img_d + gif_img_sz; gif_img_f = gif_img_e + gif_img_sz; gif_pal_d = gif_img_f + gif_img_sz; gif_pal_e = gif_pal_d + 256; gif_pal_f = gif_pal_e + 256; } /* -------------------------------------------------------------------- */ /* Optimize image: */ /* */ /* 1. Generate "transparency" image with trans pixels wherever this */ /* image is the same as the previous one. */ /* */ /* 2. Compute tighter bounding box on image--that is, smallest box */ /* that contains all the non-trans pixels. */ /* */ /* 3. Crop the incoming image based on the tighter bounding box. */ /* */ /* 4. Generate "minimal palette" images that renumber all the */ /* pixels into the smallest possible numbering space. */ /* */ /* 5. Compress the image multiple ways, and take the best: */ /* */ /* a. Cropped image, orig palette, no trans pixels */ /* b. Cropped image, orig palette, trans pixels */ /* c. Cropped image, orig palette, "wildcard" trans/no-trans */ /* d. Cropped image, new palette, no trans pixels */ /* e. Cropped image, new palette, trans pixels */ /* f. Cropped image, new palette, "wildcard" trans/no-trans */ /* */ /* When comparing new palette to orig palette, include cost */ /* of sending local palette. If the global palette has too */ /* many colors, we may not be able to try b or c. If the local */ /* palette has too many colors, we may not be able to try e or */ /* f. */ /* */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /* 1. Generate "transparency" image... */ /* 2. Compute tighter bounding box on image... */ /* -------------------------------------------------------------------- */ min_x = gif->x_dim; min_y = gif->y_dim; max_x = 0; max_y = 0; vid_ptr = vid; prv_ptr = gif->vid; trn_ptr = gif_img_tr; for (y = 0; y < gif->y_dim; y++) for (x = 0; x < gif->x_dim; x++) { uint8_t curr = *vid_ptr++; uint8_t prev = *prv_ptr++; uint8_t tran = gif->trans; if (curr != prev) { tran = curr; if (x < min_x) min_x = x; if (y < min_y) min_y = y; if (x > max_x) max_x = x; if (y > max_y) max_y = y; } *trn_ptr++ = tran; } /* -------------------------------------------------------------------- */ /* Stop now if current image matches previous image. */ /* -------------------------------------------------------------------- */ if (min_x > max_x || min_y > max_y) return 0; if (mode != 0) { min_x = 0; min_y = 0; max_x = gif->x_dim - 1; max_y = gif->y_dim - 1; } width = max_x - min_x + 1; height = max_y - min_y + 1; cnt = width*height; /* -------------------------------------------------------------------- */ /* 3. Crop the incoming image based on the tighter bounding box. */ /* -------------------------------------------------------------------- */ for (y = min_y, yy = 0; y <= max_y; y++, yy++) for (x = min_x, xx = 0; x <= max_x; x++, xx++) { /* a. Cropped image, orig palette, no trans pixels */ /* b. Cropped image, orig palette, trans pixels */ gif_img_a[xx + yy*width] = vid [x + y*gif->x_dim]; gif_img_b[xx + yy*width] = gif_img_tr[x + y*gif->x_dim]; if (gif_img_tr[x + y*gif->x_dim] == gif->trans) num_trans++; } if (num_trans == 0) trans = 0; if (mode != 0) trans = 0; #if 0 { FILE *ff; ff = fopen("debug", "wb"); if (ff) { fwrite(gif_img_a, 1, cnt, ff); fclose(ff); } } #endif /* -------------------------------------------------------------------- */ /* 4. Generate "minimal palette" images... */ /* d. Cropped image, new palette, no trans pixels */ /* e. Cropped image, new palette, trans pixels */ /* f. Cropped image, new palette, "wildcard" trans/no-trans */ /* -------------------------------------------------------------------- */ n_col_d = gen_mpi(gif_img_a, NULL, gif_img_d, cnt, gif_pal_d); if(trans) n_col_e = gen_mpi(gif_img_b, NULL, gif_img_e, cnt, gif_pal_e); if(trans) n_col_f = gen_mpi(gif_img_b,gif_img_a,gif_img_f, cnt, gif_pal_f); for (lct_sz_d = 1; (2 << lct_sz_d) < n_col_d; lct_sz_d++); for (lct_sz_e = 1; (2 << lct_sz_e) < n_col_e; lct_sz_e++); for (lct_sz_f = 1; (2 << lct_sz_f) < n_col_f; lct_sz_f++); if (trans) { int i; for (i = 0; i < n_col_d; i++) assert(gif_pal_d[i] == gif_pal_f[i]); //printf("n_col_d=%d, n_col_f=%d gif_pal_f[n_col_f-1]=%d gif->trans=%d\n", n_col_d, n_col_f, gif_pal_f[n_col_f-1], gif->trans); assert(n_col_d < n_col_f); assert(gif_pal_f[n_col_f - 1] == gif->trans); } /* -------------------------------------------------------------------- */ /* 5. Compress the image multiple ways, and take the best... */ /* */ /* We reuse gif_img_tr as a compression buffer here, since we don't */ /* need that image any longer, but we do need a temp buffer for LZW. */ /* -------------------------------------------------------------------- */ enc_sz_a = lzw_encode(gif_img_a, gif_img_tr, cnt, gif_img_sz*2); enc_sz_b = -1; enc_sz_c = -1; enc_sz_d = lzw_encode(gif_img_d, gif_img_tr, cnt, gif_img_sz*2); enc_sz_e = -1; enc_sz_f = -1; if (trans) { enc_sz_b = lzw_encode(gif_img_b, gif_img_tr, cnt, gif_img_sz*2); enc_sz_e = lzw_encode(gif_img_e, gif_img_tr, cnt, gif_img_sz*2); #if 1 enc_sz_c = lzw_encode2(gif_img_b, gif_img_a, gif_img_tr, cnt, gif_img_sz); enc_sz_f = lzw_encode2(gif_img_f, gif_img_d, gif_img_tr, cnt, gif_img_sz); #endif } if (enc_sz_d > 0) enc_sz_d += 3 << (lct_sz_d + 1); if (enc_sz_e > 0) enc_sz_e += 3 << (lct_sz_e + 1); if (enc_sz_f > 0) enc_sz_f += 3 << (lct_sz_f + 1); if (enc_sz_a < 0) enc_sz_a = INT_MAX; if (enc_sz_b < 0) enc_sz_b = INT_MAX; if (enc_sz_c < 0) enc_sz_c = INT_MAX; if (enc_sz_d < 0) enc_sz_d = INT_MAX; if (enc_sz_e < 0) enc_sz_e = INT_MAX; if (enc_sz_f < 0) enc_sz_f = INT_MAX; /* Initially assume A's the best. */ best_img1 = gif_img_a; best_img2 = NULL; best_lct = NULL; best_lct_sz = 0; best_sz = enc_sz_a; trans_idx = 0; do_trans = 0; best = 'a'; #if 1 if (enc_sz_b < best_sz) { best_img1 = gif_img_b; best_img2 = NULL; best_lct = NULL; best_lct_sz = 0; best_sz = enc_sz_b; trans_idx = gif->trans; do_trans = 1; best = 'b'; } if (enc_sz_d < best_sz) { best_img1 = gif_img_d; best_img2 = NULL; best_lct = gif_pal_d; best_lct_sz = lct_sz_d; best_sz = enc_sz_d; trans_idx = 0; do_trans = 0; best = 'd'; } if (enc_sz_e < best_sz) { best_img1 = gif_img_e; best_img2 = NULL; best_lct = gif_pal_e; best_lct_sz = lct_sz_e; best_sz = enc_sz_e; trans_idx = n_col_e - 1; do_trans = 1; best = 'e'; } if (enc_sz_c < best_sz) { best_img1 = gif_img_b; best_img2 = gif_img_a; best_lct = NULL; best_lct_sz = 0; best_sz = enc_sz_c; trans_idx = gif->trans; do_trans = 1; best = 'c'; } if (enc_sz_f < best_sz) { best_img1 = gif_img_f; best_img2 = gif_img_d; best_lct = gif_pal_f; best_lct_sz = lct_sz_f; best_sz = enc_sz_f; trans_idx = n_col_f - 1; do_trans = 1; best = 'f'; } if (best_sz < 0 || best_sz == INT_MAX) { _debugController::debug( "gif_wr_frame_m: Image overflowed compression " "buffer.\n"); return -1; } #endif gif_best_stat[best - 'a']++; /* -------------------------------------------------------------------- */ /* Output a Graphic Control Ext. */ /* -------------------------------------------------------------------- */ *enc_ptr++ = 0x21; /* Extension signature */ *enc_ptr++ = 0xF9; /* Graphic control extension */ *enc_ptr++ = 0x04; /* Length of block: Fixed at 4. */ *enc_ptr++ = 0x04 | do_trans; /* Disposal 01, No input, Trans */ *enc_ptr++ = (delay >> 0) & 0xFF; /* delay in 100ths of a second LSB */ *enc_ptr++ = (delay >> 8) & 0xFF; /* delay in 100ths of a second MSB */ *enc_ptr++ = trans_idx; /* Transparency index, if any. */ *enc_ptr++ = 0x00; /* GCE block terminator. */ /* -------------------------------------------------------------------- */ /* Output an Image Descriptor. */ /* -------------------------------------------------------------------- */ *enc_ptr++ = 0x2C; /* Image Separator */ *enc_ptr++ = (min_x >> 0) & 0xFF; /* Left edge, LSB */ *enc_ptr++ = (min_x >> 8) & 0xFF; /* Left edge, MSB */ *enc_ptr++ = (min_y >> 0) & 0xFF; /* Top edge, LSB */ *enc_ptr++ = (min_y >> 8) & 0xFF; /* Top edge, MSB */ *enc_ptr++ = (width >> 0) & 0xFF; /* Image width, LSB */ *enc_ptr++ = (width >> 8) & 0xFF; /* Image width, MSB */ *enc_ptr++ = (height >> 0) & 0xFF; /* Image height, LSB */ *enc_ptr++ = (height >> 8) & 0xFF; /* Image height, MSB */ *enc_ptr++ = best_lct_sz == 0 ? 0 /* no local color table? */ : best_lct_sz | 0x80; /* or yes local color table? */ //printf("[%3d,%3d] [%3d,%3d] [%3d,%3d] delay=%-3d trans=%-3d%c lct=%d\n", min_x, min_y, width, height, min_x + width, min_y + height, delay, trans_idx, do_trans ? '*' : ' ', best_lct_sz); /* -------------------------------------------------------------------- */ /* If we're sending a local color table, put it here. */ /* -------------------------------------------------------------------- */ if (best_lct_sz) { int i; for (i = 0; i < (2 << best_lct_sz); i++) { if (best_lct[i] < gif->n_cols) { *enc_ptr++ = gif->pal[3*best_lct[i] + 0]; *enc_ptr++ = gif->pal[3*best_lct[i] + 1]; *enc_ptr++ = gif->pal[3*best_lct[i] + 2]; } else { *enc_ptr++ = 0; *enc_ptr++ = 0; *enc_ptr++ = 0; } } } /* -------------------------------------------------------------------- */ /* Now, re-encode the winning image. */ /* -------------------------------------------------------------------- */ if (best_img2) { lzw_len = lzw_encode2(best_img1, best_img2, enc_ptr, cnt, gif_enc_buf_sz - (enc_ptr - gif_enc_buf) - 1); } else { lzw_len = lzw_encode(best_img1, enc_ptr, cnt, gif_enc_buf_sz - (enc_ptr - gif_enc_buf) - 1); } if (lzw_len < 0) { _debugController::debug( "gif_wr_frame_m: Final encode failed?\n"); return -1; } enc_ptr += lzw_len; assert(enc_ptr < gif_enc_buf + gif_enc_buf_sz); /* -------------------------------------------------------------------- */ /* Write the compressed image out. */ /* -------------------------------------------------------------------- */ wrote = fwrite(gif_enc_buf, 1, enc_ptr - gif_enc_buf, gif->f); if (wrote < (unsigned)(enc_ptr - gif_enc_buf)) { _debugController::debug( "gif_wr_frame_m: Short write? %ld vs %ld\n", (long)wrote, (long)(enc_ptr - gif_enc_buf)); return -1; } /* -------------------------------------------------------------------- */ /* Make the current image the new previous image. */ /* -------------------------------------------------------------------- */ memcpy(gif->vid, vid, gif->x_dim * gif->y_dim); return wrote; } /* ======================================================================== */ /* GEN_MPI -- Generate Minimal Palette Image, and its palette. */ /* ======================================================================== */ int gen_mpi ( uint8_t *src, uint8_t *xtra, uint8_t *dst, int cnt, uint8_t *pal_map ) { int hist1[256]; int hist2[256]; int rev_map[256]; int i, r = 0; memset(hist1, 0, sizeof(hist1)); memset(hist2, 0, sizeof(hist2)); memset(rev_map, 0, sizeof(rev_map)); /* -------------------------------------------------------------------- */ /* Find what colors are in the source image. */ /* -------------------------------------------------------------------- */ for (i = 0; i < cnt; i++) hist1[src[i]]++; /* -------------------------------------------------------------------- */ /* If we have a secondary image, look for its palette also. It gets */ /* first dibs on palette allocation, because our goal is to just */ /* *extend* the extra image's palette to accomodate our source image. */ /* -------------------------------------------------------------------- */ if (xtra) { for (i = 0; i < cnt; i++) hist2[xtra[i]]++; for (i = 0; i < 256; i++) if (hist2[i]) { rev_map[i] = r; pal_map[r] = i; r++; } } /* -------------------------------------------------------------------- */ /* Build up our palette map from the source image. */ /* -------------------------------------------------------------------- */ for (i = 0; i < 256; i++) if (hist1[i] && !hist2[i]) { rev_map[i] = r; pal_map[r] = i; r++; } /* -------------------------------------------------------------------- */ /* Remap the source image to the smaller palette. */ /* -------------------------------------------------------------------- */ for (i = 0; i < cnt; i++) dst[i] = rev_map[src[i]]; return r; } /* ======================================================================== */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ /* General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ======================================================================== */ /* Copyright (c) 2005, Joseph Zbiciak */ /* ======================================================================== */ /* ======================================================================== */ /* LZW Encode */ /* */ /* This code compresses an input buffer using LZW compression, as defined */ /* by the GIF standard. This includes dividing the compressed output */ /* into 256-byte blocks. */ /* */ /* My data structure is entirely uncreative. I use an N-way tree to */ /* represent the current code table. It's dirt simple to implement, but */ /* it's a memory pig. Since the longest code is 12 bits, I use indices */ /* instead of pointers, and use a static table of codes. */ /* ======================================================================== */ int lzw_encode(const uint8_t *i_buf, uint8_t *o_buf, int i_len, int max_o_len) { static uint16_t *dict = NULL; static int dict_size = 0; const uint8_t *i_end = i_buf + i_len; const uint8_t *i_ptr; uint8_t *o_end = o_buf + max_o_len - 1; uint8_t *o_ptr; uint8_t *last_len_byte; int i; int code_size; int max_sym = 0, dict_stride; uint32_t curr_word = 0; int curr_bits = 0; int code = 0, next_new_code, curr_size; int end_of_info, clear_code; int next_char = 0, next_code; /* -------------------------------------------------------------------- */ /* First, scan the buffer and determine the total dynamic range of */ /* the input bytes. We'll pick our starting code size based on that. */ /* -------------------------------------------------------------------- */ for (i = 0; i < i_len; i++) if (i_buf[i] > max_sym) max_sym = i_buf[i]; dict_stride = max_sym + 1; dprintf(("max_sym = %.2X\n", max_sym)); /* -------------------------------------------------------------------- */ /* Compute and output the starting code-size. */ /* -------------------------------------------------------------------- */ for (code_size = 2; code_size < 8; code_size++) if ((1 << code_size) > max_sym) break; dprintf(("code_size = %.2X\n", code_size)); /* -------------------------------------------------------------------- */ /* Allocate the dictionary. We store the tree in a 2-D array. One */ /* dimension is the code number, and the other is the codes it chains */ /* to. We size this to the maximum number of symbols in the input, */ /* so that it's not too big. */ /* -------------------------------------------------------------------- */ if (dict_size < dict_stride) { if (dict) free(dict); dict = (uint16_t*) malloc(4096 * sizeof(uint16_t) * dict_stride); dict_size = dict_stride; } /* -------------------------------------------------------------------- */ /* Output the code length, and prepare to compress. */ /* -------------------------------------------------------------------- */ o_ptr = o_buf; *o_ptr++ = code_size; last_len_byte = o_ptr++; /* save room for first data block length byte */ i_ptr = i_buf; curr_size = code_size + 1; curr_word = 0; curr_bits = 0; next_new_code = 0x1000; /* trigger dictionary flush first go */ clear_code = (1 << code_size); end_of_info = (1 << code_size) + 1; next_char = *i_ptr++; /* -------------------------------------------------------------------- */ /* Compress! */ /* -------------------------------------------------------------------- */ while (i_ptr <= i_end && code != end_of_info) { dprintf(("remaining: %10d\n", i_end - i_ptr)); /* ---------------------------------------------------------------- */ /* If dictionary's full, send a clear code and flush dictionary. */ /* Otherwise, patch the previous code+char into the dictionary. */ /* ---------------------------------------------------------------- */ if (next_new_code == 0x1000) { dprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); curr_word |= clear_code << curr_bits; curr_bits += curr_size; while (curr_bits > 8) { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } curr_size = code_size + 1; next_new_code = (1 << code_size) + 2; memset(dict, 0, 4096*sizeof(uint16_t)*dict_stride); } else { dprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, code, next_char)); dict[code*dict_stride + next_char] = next_new_code; if (next_new_code == (1 << curr_size)) curr_size++; next_new_code++; } code = next_char; /* Previous concat becomes new initial code */ dprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); /* ---------------------------------------------------------------- */ /* Keep concatenating as long as we stay in the dictionary. */ /* ---------------------------------------------------------------- */ if (i_ptr == i_end) { next_char = end_of_info; dprintf(("--> next is EOI!\n")); } else { next_code = -1; while (next_code && i_ptr < i_end) { next_char = *i_ptr++; next_code = dict[code*dict_stride + next_char]; dprintf(("--> code: %.3X + %.2X = %.3X\n", code, next_char, next_code)); if (next_code) code = next_code; } if (next_code && i_ptr == i_end) next_char = end_of_info; if (next_char == end_of_info) { dprintf(("--> next is EOI! (b)\n")); } } /* ---------------------------------------------------------------- */ /* Ok, no longer in the dictionary. Emit the current code and the */ /* extra character. We can stuff two codes in, since curr_bits */ /* should never be more than 7, and curr_size should be no more */ /* than 12. */ /* ---------------------------------------------------------------- */ curr_word |= code << curr_bits; curr_bits += curr_size; dprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, curr_word, curr_bits)); while (curr_bits > 8) { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } } /* -------------------------------------------------------------------- */ /* If we have any left-over bits (at most 7), go ahead and flush them. */ /* -------------------------------------------------------------------- */ while (curr_bits > 0) /* flush it ALL out. */ { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } /* -------------------------------------------------------------------- */ /* Patch in the last length byte, and a 0-length record. We are */ /* guaranteed to have room here, since our overflow criterion above */ /* is conservative by one character. */ /* -------------------------------------------------------------------- */ *last_len_byte = o_ptr - last_len_byte - 1; *o_ptr++ = 0; dprintf(("encoded %d bytes\n", o_ptr - o_buf)); return o_ptr - o_buf; overflow: _debugController::debug( "lzw_encode: overflowed!\n"); return -1; } int lzw_encode2(const uint8_t *i_buf, const uint8_t *i_buf_alt, uint8_t *o_buf, int i_len, int max_o_len) { static uint16_t *dict = NULL; static int dict_size = 0; int i_idx = 0; uint8_t *o_end = o_buf + max_o_len - 1; uint8_t *o_ptr; uint8_t *last_len_byte; int i; int code_size; int max_sym = 0, dict_stride; uint32_t curr_word = 0; int curr_bits = 0; int code = 0, next_new_code, curr_size; int end_of_info, clear_code; int next_char = 0, next_code; /* -------------------------------------------------------------------- */ /* First, scan the buffer and determine the total dynamic range of */ /* the input bytes. We'll pick our starting code size based on that. */ /* -------------------------------------------------------------------- */ for (i = 0; i < i_len; i++) { if (i_buf[i] > max_sym) max_sym = i_buf[i]; if (i_buf_alt[i] > max_sym) max_sym = i_buf_alt[i]; } dict_stride = max_sym + 1; dprintf(("max_sym = %.2X\n", max_sym)); /* -------------------------------------------------------------------- */ /* Compute and output the starting code-size. */ /* -------------------------------------------------------------------- */ for (code_size = 2; code_size < 8; code_size++) if ((1 << code_size) > max_sym) break; dprintf(("code_size = %.2X\n", code_size)); /* -------------------------------------------------------------------- */ /* Allocate the dictionary. We store the tree in a 2-D array. One */ /* dimension is the code number, and the other is the codes it chains */ /* to. We size this to the maximum number of symbols in the input, */ /* so that it's not too big. */ /* -------------------------------------------------------------------- */ if (dict_size < dict_stride) { if (dict) free(dict); dict = (uint16_t*) malloc(4096 * sizeof(uint16_t) * dict_stride); dict_size = dict_stride; } /* -------------------------------------------------------------------- */ /* Output the code length, and prepare to compress. */ /* -------------------------------------------------------------------- */ o_ptr = o_buf; *o_ptr++ = code_size; last_len_byte = o_ptr++; /* save room for first data block length byte */ curr_size = code_size + 1; curr_word = 0; curr_bits = 0; next_new_code = 0x1000; /* trigger dictionary flush first go */ clear_code = (1 << code_size); end_of_info = (1 << code_size) + 1; next_char = i_buf[i_idx++]; /* -------------------------------------------------------------------- */ /* Compress! */ /* -------------------------------------------------------------------- */ while (i_idx <= i_len && code != end_of_info) { dprintf(("remaining: %10d\n", i_len - i_idx)); /* ---------------------------------------------------------------- */ /* If dictionary's full, send a clear code and flush dictionary. */ /* Otherwise, patch the previous code+char into the dictionary. */ /* ---------------------------------------------------------------- */ if (next_new_code == 0x1000) { dprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); curr_word |= clear_code << curr_bits; curr_bits += curr_size; while (curr_bits > 8) { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } curr_size = code_size + 1; next_new_code = (1 << code_size) + 2; memset(dict, 0, 4096*sizeof(uint16_t)*dict_stride); } else { dprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, code, next_char)); dict[code*dict_stride + next_char] = next_new_code; if (next_new_code == (1 << curr_size)) curr_size++; next_new_code++; } code = next_char; /* Previous concat becomes new initial code */ dprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); /* ---------------------------------------------------------------- */ /* Keep concatenating as long as we stay in the dictionary. */ /* ---------------------------------------------------------------- */ if (i_idx == i_len) { next_char = end_of_info; dprintf(("--> next is EOI!\n")); } else { next_code = -1; while (next_code && i_idx < i_len) { int tmp; next_char = i_buf[i_idx]; if ((tmp = dict[code*dict_stride + i_buf[i_idx]]) != 0) { next_code = tmp; dprintf(("--> code: %.3X + %.2X(a) = %.3X\n", code, next_char, next_code)); } else if ((tmp = dict[code*dict_stride + i_buf_alt[i_idx]]) != 0) { next_char = i_buf_alt[i_idx]; next_code = tmp; dprintf(("--> code: %.3X + %.2X(b) = %.3X\n", code, next_char, next_code)); } else { next_code = 0; dprintf(("--> code: %.3X + %.2X(c) = %.3X\n", code, next_char, next_code)); } i_idx++; if (next_code) code = next_code; } if (next_code && i_idx == i_len) next_char = end_of_info; if (next_char == end_of_info) { dprintf(("--> next is EOI! (b)\n")); } } /* ---------------------------------------------------------------- */ /* Ok, no longer in the dictionary. Emit the current code and the */ /* extra character. We can stuff two codes in, since curr_bits */ /* should never be more than 7, and curr_size should be no more */ /* than 12. */ /* ---------------------------------------------------------------- */ curr_word |= code << curr_bits; curr_bits += curr_size; dprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, curr_word, curr_bits)); while (curr_bits > 8) { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } } /* -------------------------------------------------------------------- */ /* If we have any left-over bits (at most 7), go ahead and flush them. */ /* -------------------------------------------------------------------- */ while (curr_bits > 0) /* flush it ALL out. */ { /* Handle packaging data into 256-byte records */ if (o_ptr - last_len_byte == 256) { dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); *last_len_byte = 255; last_len_byte = o_ptr++; } if (o_ptr >= o_end) goto overflow; *o_ptr++ = curr_word & 0xFF; curr_word >>= 8; curr_bits -= 8; } /* -------------------------------------------------------------------- */ /* Patch in the last length byte, and a 0-length record. We are */ /* guaranteed to have room here, since our overflow criterion above */ /* is conservative by one character. */ /* -------------------------------------------------------------------- */ *last_len_byte = o_ptr - last_len_byte - 1; *o_ptr++ = 0; dprintf(("encoded %d bytes\n", o_ptr - o_buf)); return o_ptr - o_buf; overflow: _debugController::debug( "lzw_encode2: overflowed!\n"); return -1; } /* ======================================================================== */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ /* General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ======================================================================== */ /* Copyright (c) 2005, Joseph Zbiciak */ /* ======================================================================== */
41.128788
189
0.370363
[ "3d" ]
6835307c7ec39b8c684d25afeb270ec79a26bf10
30,099
cpp
C++
run/params.cpp
SymbioticLab/YAPS
1bf25abe0fe1ea7c7dec60645dda49ffcc59c7a0
[ "BSD-3-Clause" ]
null
null
null
run/params.cpp
SymbioticLab/YAPS
1bf25abe0fe1ea7c7dec60645dda49ffcc59c7a0
[ "BSD-3-Clause" ]
1
2021-06-18T19:12:19.000Z
2021-06-18T19:12:19.000Z
run/params.cpp
SymbioticLab/YAPS
1bf25abe0fe1ea7c7dec60645dda49ffcc59c7a0
[ "BSD-3-Clause" ]
1
2021-06-18T07:01:16.000Z
2021-06-18T07:01:16.000Z
#include "params.h" #include <assert.h> #include <fstream> #include <iostream> #include <sstream> #include <string> #include "../ext/factory.h" DCExpParams params; /* Read parameters from a config file */ void read_experiment_parameters(std::string conf_filename, uint32_t exp_type) { std::cout << "PUPU: config filename: " << conf_filename << std::endl; std::ifstream input(conf_filename); std::string line; std::string key; params.interarrival_cdf = "none"; params.permutation_tm = 0; params.hdr_size = 40; params.num_hosts = 144; params.num_agg_switches = 9; params.num_core_switches = 4; params.weights = std::vector<int>(); params.targets = std::vector<double>(); params.hardcoded_targets = std::vector<double>(); params.qos_ratio = std::vector<double>(); params.buffer_carving = std::vector<int>(); params.use_dynamic_load = 0; params.use_random_jitter = 0; params.first_flow_start_time = 1.0; // just need to be put into a para to make it consistent in all places //params.random_flow_start = 1; params.early_pkt_in_highest_prio = 0; //params.load_change_freq = 100; params.burst_size = 100; // dult value params.use_burst_byte = 0; params.burst_with_no_spacing = 0; params.channel_multiplexing = 0; params.multiplex_constant = 1; params.flushing_coefficient = 1; params.disable_poisson_arrival = 0; // default: enable poisson params.disable_veritas_cc = 0; params.traffic_pattern = 0; params.cc_delay_target = 10; params.high_prio_lat_target = 10; params.target_expiration = 50; params.load_measure_interval = 1; // in us; params.qd_expiration = 50; params.rtt_expiration = 50; params.dwnd_alpha = 3; params.uwnd_beta = 3; params.dp_alpha = 0.01; params.dp_beta = 0.1; params.downgrade_batch_size = 10; params.upgrade_batch_size = 10; params.expiration_count = 150; params.qd_num_hops = 2; params.num_pctl = 10; params.moving_window_size = 1000; params.memory_time_duration = 60000; params.smart_time_window = 0; params.target_pctl = 1000; params.normalized_lat = 0; params.print_normalized_result = 0; params.big_switch = 0; params.disable_pkt_logging = 0; params.only_sw_queue = 0; params.test_fairness = 0; params.test_size_to_priority = 0; params.disable_cwnd_logging = 0; params.disable_dwnd_logging = 1; params.track_qosh_dwnds = 0; params.priority_downgrade = 0; params.debug_event_info = 0; params.enable_flow_lookup = 0; params.flow_lookup_id = 0; params.mtu = 5120; params.real_nic = 0; params.nic_use_WF = 0; params.qjump_cumulative_pd = 1; params.enable_qjump_retransmission = 0; params.qjump_tput_factor = std::vector<int>(); params.early_termination = 0; params.pfabric_limited_priority = 0; params.cdf_info = 0; params.homa_sampling_freq = 5000; params.homa_rttbytes_in_mss = 100; // assuming 100Gbps network //params.enable_initial_shift = 0; //params.dynamic_load = std::vector<double>(); while (std::getline(input, line)) { std::istringstream lineStream(line); if (line.empty()) { continue; } lineStream >> key; assert(key[key.length()-1] == ':'); key = key.substr(0, key.length()-1); if (key == "init_cwnd") { lineStream >> params.initial_cwnd; } else if (key == "max_cwnd") { lineStream >> params.max_cwnd; } else if (key == "retx_timeout") { double timeout; lineStream >> timeout; params.retx_timeout_value = timeout / 1e6; } else if (key == "queue_size") { lineStream >> params.queue_size; } else if (key == "propagation_delay") { lineStream >> params.propagation_delay; } else if (key == "bandwidth") { lineStream >> params.bandwidth; } else if (key == "load_measure_interval") { double interval = 0; lineStream >> interval; params.load_measure_interval = interval / 1e6; } else if (key == "queue_type") { lineStream >> params.queue_type; } else if (key == "flow_type") { lineStream >> params.flow_type; } else if (key == "num_flow") { lineStream >> params.num_flows_to_run; } else if (key == "num_hosts") { lineStream >> params.num_hosts; } else if (key == "num_agg_switches") { lineStream >> params.num_agg_switches; } else if (key == "num_core_switches") { lineStream >> params.num_core_switches; } else if (key == "flow_trace") { lineStream >> params.cdf_or_flow_trace; } else if (key == "cut_through") { lineStream >> params.cut_through; } else if (key == "mean_flow_size") { lineStream >> params.mean_flow_size; } else if (key == "load_balancing") { lineStream >> params.load_balancing; } else if (key == "disable_poisson_arrival") { lineStream >> params.disable_poisson_arrival; } else if (key == "disable_veritas_cc") { lineStream >> params.disable_veritas_cc; } else if (key == "traffic_pattern") { lineStream >> params.traffic_pattern; } else if (key == "use_dynamic_load") { lineStream >> params.use_dynamic_load; } else if (key == "use_random_jitter") { lineStream >> params.use_random_jitter; } //else if (key == "random_flow_start") { // lineStream >> params.random_flow_start; //} else if (key == "early_pkt_in_highest_prio") { lineStream >> params.early_pkt_in_highest_prio; } else if (key == "flushing_coefficient") { lineStream >> params.flushing_coefficient; } else if (key == "cc_delay_target") { lineStream >> params.cc_delay_target; } else if (key == "qjump_cumulative_pd") { lineStream >> params.qjump_cumulative_pd; } else if (key == "enable_qjump_retransmission") { lineStream >> params.enable_qjump_retransmission; } else if (key == "high_prio_lat_target") { lineStream >> params.high_prio_lat_target; } else if (key == "target_expiration") { lineStream >> params.target_expiration; } else if (key == "qd_expiration") { lineStream >> params.qd_expiration; } else if (key == "rtt_expiration") { lineStream >> params.rtt_expiration; } else if (key == "qd_num_hops") { lineStream >> params.qd_num_hops; std::cout << "qd num_hops hint = " << params.qd_num_hops << std::endl; } else if (key == "num_pctl") { lineStream >> params.num_pctl; std::cout << "num pctl for qos dist breakdown = " << params.num_pctl << std::endl; } else if (key == "memory_time_duration") { lineStream >> params.memory_time_duration; std::cout << "memory time duration (us) = " << params.memory_time_duration << std::endl; } else if (key == "smart_time_window") { lineStream >> params.smart_time_window; } else if (key == "target_pctl") { lineStream >> params.target_pctl; } else if (key == "normalized_lat") { lineStream >> params.normalized_lat; } else if (key == "print_normalized_result") { lineStream >> params.print_normalized_result; } else if (key == "dwnd_alpha") { lineStream >> params.dwnd_alpha; } else if (key == "dp_alpha") { lineStream >> params.dp_alpha; } else if (key == "dp_beta") { lineStream >> params.dp_beta; } else if (key == "downgrade_batch_size") { lineStream >> params.downgrade_batch_size; } else if (key == "upgrade_batch_size") { lineStream >> params.upgrade_batch_size; } else if (key == "expiration_count") { lineStream >> params.expiration_count; } //else if (key == "load_change_freq") { // lineStream >> params.load_change_freq; //} else if (key == "burst_size") { lineStream >> params.burst_size; } else if (key == "use_burst_byte") { lineStream >> params.use_burst_byte; } else if (key == "burst_with_no_spacing") { lineStream >> params.burst_with_no_spacing; } else if (key == "channel_multiplexing") { lineStream >> params.channel_multiplexing; } else if (key == "multiplex_constant") { lineStream >> params.multiplex_constant; } else if (key == "preemptive_queue") { lineStream >> params.preemptive_queue; } else if (key == "big_switch") { lineStream >> params.big_switch; } else if (key == "disable_pkt_logging") { lineStream >> params.disable_pkt_logging; } else if (key == "disable_cwnd_logging") { lineStream >> params.disable_cwnd_logging; } else if (key == "disable_dwnd_logging") { lineStream >> params.disable_dwnd_logging; } else if (key == "only_sw_queue") { lineStream >> params.only_sw_queue; } else if (key == "test_fairness") { lineStream >> params.test_fairness; } else if (key == "test_size_to_priority") { lineStream >> params.test_size_to_priority; } else if (key == "track_qosh_dwnds") { lineStream >> params.track_qosh_dwnds; } else if (key == "debug_event_info") { lineStream >> params.debug_event_info; } else if (key == "enable_flow_lookup") { lineStream >> params.enable_flow_lookup; } else if (key == "flow_lookup_id") { lineStream >> params.flow_lookup_id; } else if (key == "mtu") { lineStream >> params.mtu; } else if (key == "real_nic") { lineStream >> params.real_nic; } else if (key == "nic_use_WF") { lineStream >> params.nic_use_WF; } //else if (key == "enable_initial_shift") { // lineStream >> params.enable_initial_shift; //} else if (key == "priority_downgrade") { lineStream >> params.priority_downgrade; } else if (key == "host_type") { lineStream >> params.host_type; } else if (key == "imbalance") { lineStream >> params.traffic_imbalance; } else if (key == "load") { lineStream >> params.load; } else if (key == "burst_load") { lineStream >> params.burst_load; } else if (key == "traffic_imbalance") { lineStream >> params.traffic_imbalance; } else if (key == "reauth_limit") { lineStream >> params.reauth_limit; } else if (key == "magic_trans_slack") { lineStream >> params.magic_trans_slack; } else if (key == "magic_delay_scheduling") { lineStream >> params.magic_delay_scheduling; } else if (key == "capability_timeout") { lineStream >> params.capability_timeout; } else if (key == "use_flow_trace") { lineStream >> params.use_flow_trace; } else if (key == "smooth_cdf") { lineStream >> params.smooth_cdf; } else if (key == "burst_at_beginning") { lineStream >> params.burst_at_beginning; } else if (key == "capability_resend_timeout") { lineStream >> params.capability_resend_timeout; } else if (key == "capability_initial") { lineStream >> params.capability_initial; } else if (key == "capability_window") { lineStream >> params.capability_window; } else if (key == "capability_prio_thresh") { lineStream >> params.capability_prio_thresh; } else if (key == "capability_third_level") { lineStream >> params.capability_third_level; } else if (key == "capability_fourth_level") { lineStream >> params.capability_fourth_level; } else if (key == "capability_window_timeout") { lineStream >> params.capability_window_timeout; } else if (key == "ddc") { lineStream >> params.ddc; } else if (key == "ddc_cpu_ratio") { lineStream >> params.ddc_cpu_ratio; } else if (key == "ddc_mem_ratio") { lineStream >> params.ddc_mem_ratio; } else if (key == "ddc_disk_ratio") { lineStream >> params.ddc_disk_ratio; } else if (key == "ddc_normalize") { lineStream >> params.ddc_normalize; } else if (key == "ddc_type") { lineStream >> params.ddc_type; } else if (key == "deadline") { lineStream >> params.deadline; } else if (key == "schedule_by_deadline") { lineStream >> params.schedule_by_deadline; } else if (key == "avg_deadline") { lineStream >> params.avg_deadline; } else if (key == "magic_inflate") { lineStream >> params.magic_inflate; } else if (key == "interarrival_cdf") { lineStream >> params.interarrival_cdf; } else if (key == "num_host_types") { lineStream >> params.num_host_types; } else if (key == "permutation_tm") { lineStream >> params.permutation_tm; } else if (key == "dctcp_mark_thresh") { lineStream >> params.dctcp_mark_thresh; } else if (key == "hdr_size") { lineStream >> params.hdr_size; assert(params.hdr_size > 0); } else if (key == "bytes_mode") { lineStream >> params.bytes_mode; } else if (key == "homa_sampling_freq") { lineStream >> params.homa_sampling_freq; } else if (key == "homa_rttbytes_in_mss") { lineStream >> params.homa_rttbytes_in_mss; } //else if (key == "dctcp_delayed_ack_freq") { // lineStream >> params.dctcp_delayed_ack_freq; //} //// weights format in config file: for example, for 3 qos levels with weights 8:2:1, write: //// qos_weights: 8,2,1 else if (key == "qos_weights") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); while (ss.good()) { std::string weight; getline(ss, weight, ','); params.weights.push_back(stoi(weight)); } params.sum_weights = 0; std::cout << "QoS weights: "; for (int i = 0; i < params.weights.size(); i++) { std::cout << params.weights[i] << " "; params.sum_weights += params.weights[i]; } std::cout << std::endl; std::cout << "Sum weights = " << params.sum_weights << std::endl; std::cout << "Fair Share Ratio = "; for (int i = 0; i < params.weights.size(); i++) { if (i < params.weights.size() - 1) { std::cout << (double) params.weights[i] / params.sum_weights << " : "; } else { std::cout << (double) params.weights[i] / params.sum_weights << std::endl; } } } //// qos_ratio: [30,70] means 30% of the flow gets first priority, 70% of the flows gets 2nd priority //// (in this case you can also write [3,7] as long as the ratio is what you want) //// number of entries should match that of qos_weights //// TODO: make it ratio in terms of bytes not number of flows else if (key == "qos_ratio") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); double ratio_sum = 0; std::vector<double> temp_vec; while (ss.good()) { std::string qos_ratio_str; getline(ss, qos_ratio_str, ','); //int qos_ratio_int = stoi(qos_ratio_str); double qos_ratio_double = stod(qos_ratio_str); ratio_sum += qos_ratio_double; temp_vec.push_back(qos_ratio_double); } // normalize qos ratio for (auto i: temp_vec) { params.qos_ratio.push_back(i / ratio_sum); } std::cout << "QoS ratio: "; for (auto i: params.qos_ratio) { std::cout << i << " "; } std::cout << std::endl; } // Vector for buffer carving: [1, 2, 3] means 1/6th space for prio_1, 2/6th space for prio_2, the rest for prio_3. else if (key == "buffer_carving") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); while (ss.good()) { std::string buffer_carve_ratio; getline(ss, buffer_carve_ratio, ','); params.buffer_carving.push_back(stoi(buffer_carve_ratio)); } std::cout << "Buffer carving: "; for (auto i: params.buffer_carving) { std::cout << i << " "; } std::cout << std::endl; } else if (key == "hardcoded_targets") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); while (ss.good()) { std::string target; getline(ss, target, ','); params.hardcoded_targets.push_back(stod(target)); } std::cout << "Downgrade Hardcoded Targets: "; for (auto i: params.hardcoded_targets) { std::cout << i << " "; } std::cout << std::endl; } else if (key == "targets") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); while (ss.good()) { std::string target; getline(ss, target, ','); params.targets.push_back(stod(target)); } std::cout << "Final targets (unnormalized latency) (for counting traffic meeting SLOs): "; for (auto i: params.targets) { std::cout << i << " "; } std::cout << std::endl; } else if (key == "qjump_tput_factor") { std::string temp_str; lineStream >> temp_str; std::stringstream ss(temp_str); while (ss.good()) { std::string factor; getline(ss, factor, ','); params.qjump_tput_factor.push_back(stoi(factor)); } std::cout << "Qjump throughput factors: "; for (auto i: params.qjump_tput_factor) { std::cout << i << " "; } std::cout << std::endl; } else if (key == "early_termination") { lineStream >> params.early_termination; } //else if (key == "dynamic_load") { // std::string temp_str; // lineStream >> temp_str; // std::stringstream ss(temp_str); // while (ss.good()) { // std::string load_val; // getline(ss, load_val, ','); // params.dynamic_load.push_back(stod(load_val)); // } //} else if (key == "pfabric_priority_type") { lineStream >> params.pfabric_priority_type; } else if (key == "pfabric_limited_priority") { lineStream >> params.pfabric_limited_priority; if (params.pfabric_limited_priority) { std::cout << "Pfabric uses limited priority levels." << std::endl; } else { std::cout << "Pfabric uses unlimited priority levels." << std::endl; } } else if (key == "cdf_info") { lineStream >> params.cdf_info; } else { std::cout << "Unknown conf param: " << key << " in file: " << conf_filename << "\n"; assert(false); } params.fastpass_epoch_time = 1500 * 8 * (FASTPASS_EPOCH_PKTS + 0.5) / params.bandwidth; params.param_str.append(line); params.param_str.append(", "); } if (params.use_dynamic_load) { std::cout << "Use dynamic load." << std::endl; //assert(!params.dynamic_load.empty()); //std::cout << "Dynamic load: "; //for (auto i: params.dynamic_load) { // std::cout << i << " "; //} //std::cout << std::endl; //std::cout << "load change frequency: " << params.load_change_freq << std::endl; std::cout << "Avg load to achieve = " << params.load << std::endl; if (params.use_burst_byte) { std::cout << "burst size (# of bytes) in the dynamic load setting: " << params.burst_size << std::endl; } else { std::cout << "burst size (# of RPCs) in the dynamic load setting: " << params.burst_size << std::endl; } if (params.burst_with_no_spacing) { std::cout << "Heavy burst mode: RPCs with the same burst period arrives at the same time (with tiny delay)" << std::endl; } if (params.channel_multiplexing) { std::cout << "Using Channel Multiplexing. Multiplexing Constant = " << params.multiplex_constant << std::endl; } std::cout << "burst load = " << params.burst_load << std::endl; if (params.use_random_jitter) { std::cout << "Use random jitter." << std::endl; } } else { std::cout << "Load: " << params.load << std::endl; } std::cout << "CDF: " << params.cdf_or_flow_trace << std::endl; //std::cout << "Exponential Random Flow Start Time: " << params.random_flow_start << std::endl; params.num_qos_level = params.weights.size(); if (params.host_type == 2) { std::cout << "use pFabric host" << std::endl; } else if (params.host_type == 6) { std::cout << "use Veritas(WFQ) host" << std::endl; } if (params.num_qos_level < 1) { std::cout << "please specify valid qos weights " << std::endl; } if (params.early_pkt_in_highest_prio) { std::cout << "early_pkt_in_highest_prio is enabled." << std::endl; // this option should not be enabled when all qos weights are intially set to be equal bool check_equal = true; for (int i = 0; i < params.weights.size(); i++) { if (params.weights[i] != params.weights[0]) { check_equal = false; break; } } if (check_equal) { std::cout << "Error! Option \"early_pkt_in_highest_prio\" should not be enabled when all QoS weights are intially set to be equal." << std::endl; assert(false); } } std::cout << "Per port queue size: " << params.queue_size << " Bytes" << std::endl; if (params.disable_veritas_cc) { std::cout << "Veritas Flow: disable CC" << std::endl; } if (params.disable_poisson_arrival) { std::cout << "Disable Poisson Arrival; use initial shift instead" << std::endl; } else { std::cout << "Enable Poisson Arrival; don't use initial shift" << std::endl; } if (params.disable_pkt_logging) { std::cout << "Disable Packet Logging (to save memory)" << std::endl; } if (params.disable_cwnd_logging) { std::cout << "Disable CWND Logging (to save memory)" << std::endl; } if (params.disable_dwnd_logging) { std::cout << "Disable DWND Logging (to save memory)" << std::endl; } if (params.only_sw_queue) { std::cout << "only use the switch queue in BigSwitchTopo (skip other host queues)" << std::endl; } if (params.test_fairness) { std::cout << "testing fairness with disproportional qos dist" << std::endl; params.fairness_qos_dist.resize(params.weights.size(), 0); } if (params.test_size_to_priority == 1) { if (params.test_fairness) { std::cout << "can't test together with fairness" << std::endl; exit(1); } std::cout << "Extra size experiment: size corresponds to priority (please use an appropriate rpc size CDF)" << std::endl; } else if (params.test_size_to_priority == 2) { if (params.test_fairness) { std::cout << "can't test together with fairness" << std::endl; exit(1); } std::cout << "Extra size experiment: size does not correspond to priority (please use an appropriate rpc size CDF)" << std::endl; } if (params.track_qosh_dwnds) { std::cout << "Track QoS_H DWNDS" << std::endl; } if (params.debug_event_info) { std::cout << "print event info." << std::endl; } if (params.enable_flow_lookup) { std::cout << "Enable flow lookup. lookup flow id = " << params.flow_lookup_id << std::endl; } //if (params.enable_initial_shift) { // std::cout << "Enable initial shift." << std::endl; //} else { // std::cout << "Disable initial shift." << std::endl; //} if (params.smart_time_window) { std::cout << "Enable smart time window. Adjust per qos window time duration based on target X " << params.target_pctl << std::endl; } if (params.normalized_lat) { std::cout << "Enable latency measurement (in the simulation results) by RPC size (# of MTUs)" << std::endl; } if (params.priority_downgrade) { std::cout << "Enable Priority Downgrade." << std::endl; std::cout << "downgrade lat target: " << params.high_prio_lat_target << " us" << std::endl; std::cout << "target expires in " << params.target_expiration << " us" << std::endl; std::cout << "qd expires in " << params.qd_expiration << " us" << std::endl; std::cout << "qd estimated from rtt expires in " << params.rtt_expiration << " us" << std::endl; //std::cout << "dwnd alpha: " << params.dwnd_alpha << std::endl; std::cout << "dp alpha: " << params.dp_alpha << std::endl; std::cout << "dp beta: " << params.dp_beta << std::endl; std::cout << "downgrade batch size: " << params.downgrade_batch_size << std::endl; std::cout << "upgrade batch size: " << params.upgrade_batch_size << std::endl; std::cout << "expiration count: " << params.expiration_count << std::endl; //params.targets.resize(params.weights.size() - 1); //for (uint32_t i = 0; i < params.weights.size() - 1; i++) { // params.targets[i] = params.high_prio_lat_target * ((double)params.weights[0] / params.weights[i]); //} } else { std::cout << "Disable Priority Downgrade." << std::endl; } std::cout << "Host type: " << params.host_type << std::endl; std::cout << "Queue type: " << params.queue_type << std::endl; std::cout << "Flow type: " << params.flow_type << std::endl; params.mss = params.mtu - params.hdr_size; params.homa_rtt_bytes = params.homa_rttbytes_in_mss * params.mss; std::cout << "Init cwnd: " << params.initial_cwnd << std::endl; std::cout << "Max cwnd: " << params.max_cwnd << std::endl; std::cout << "Num Hosts: " << params.num_hosts << std::endl; if (!params.use_flow_trace) { std::cout << "Num total RPCs to run: " << params.num_flows_to_run << std::endl; } if (params.traffic_pattern == 0) { std::cout << "traffic pattern: incast" << std::endl; } else if (params.traffic_pattern == 1) { std::cout << "traffic pattern: all-to-all" << std::endl; } std::cout << "mtu: " << params.mtu << std::endl; std::cout << "mss: " << params.mss << std::endl; std::cout << "Swift Delay target: " << params.cc_delay_target << " us" << std::endl; if (params.real_nic) { std::cout << "Real Nic on" << std::endl; assert(params.channel_multiplexing); // when limiting nic speed with line rate, params.channel_multiplexing must be on if (params.nic_use_WF) { std::cout << "Real NIC uses WF" << std::endl; } else { std::cout << "Real NIC uses RR" << std::endl; } } if (params.flow_type == QJUMP_FLOW) { // Qjump disables CC assert(params.channel_multiplexing && params.multiplex_constant == 1); assert(params.real_nic == 0); std::cout << "Qjump cumulative processing delay: " << params.qjump_cumulative_pd << " us." << std::endl; } if (params.flow_type == HOMA_FLOW) { std::cout << "Homa RTTbytes = " << params.homa_rtt_bytes << std::endl; std::cout << "Homa sampling freq = " << params.homa_sampling_freq << std::endl; } assert(params.burst_size > 0); //std::cout << "Flushing Coefficient = " << params.flushing_coefficient << std::endl; std::cout << "Retransmission Timeout: " << params.retx_timeout_value * 1e6 << " us" << std::endl; //TODO: assert(params.real_nic == 0); }
39.603947
157
0.548556
[ "vector" ]
683e5f2a5a85aa236187ff4cb39386b797f072c9
3,447
hpp
C++
src/sdm/utils/struct/tree.hpp
SDMStudio/sdms
43a86973081ffd86c091aed69b332f0087f59361
[ "MIT" ]
null
null
null
src/sdm/utils/struct/tree.hpp
SDMStudio/sdms
43a86973081ffd86c091aed69b332f0087f59361
[ "MIT" ]
null
null
null
src/sdm/utils/struct/tree.hpp
SDMStudio/sdms
43a86973081ffd86c091aed69b332f0087f59361
[ "MIT" ]
null
null
null
/** * @file tree.hpp * @author Jilles S. Dibangoye * @author David Albert * @brief Tree data structure * @version 0.1 * @date 12/04/2016 * * @copyright Copyright (c) 2020 * */ #pragma once #include <memory> #include <iostream> #include <unordered_set> #include <unordered_map> #include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/weak_ptr.hpp> #include <sdm/types.hpp> #include <sdm/tools.hpp> #include <sdm/public/boost_serializable.hpp> namespace sdm { /** * @class Tree * * @brief Generic Tree class * * @tparam T the type of the data contains in each node * * Basic Usage * * ```cpp * std::shared_ptr<Tree<int>> tree = std::make_shared<Tree<int>>(4); * tree->addChildren({3, 4, 5}); * tree->getChild(3)->addChildren({9, 8, 7, 6}); * tree->getChild(5)->addChildren({1, 3}); * ``` * */ template <typename T> class Tree //public std::inheritable_enable_shared_from_this<Tree<T>> //public BoostSerializable<Tree<T>> { public: using value_type = T; /** * @brief Default constructor object * */ Tree(); /** * @brief Construct a new Tree object (the origin) * * @param data the value of the origin */ Tree(number max_depth); /** * @brief Construct a new Tree object * * @param parent the parent * @param data the value of the node * @param backup if true, save the new tree as a child for its parent */ Tree(std::shared_ptr<Tree<T>> parent, const T &data); /*! * @fn ~Tree() * @brief Destructor of Tree (that's bad). * * This destructor recursively all, children and the item from the tree, bottom up. */ virtual ~Tree(); bool isOrigin() const; const T &getData() const; number getNumChildren() const; std::shared_ptr<Tree<T>> getChild(const T &child_item) const; std::vector<std::shared_ptr<Tree<T>>> getChildren() const; // void addChild(const T &child_item); // void addChildren(const std::vector<T> &child_items); std::shared_ptr<Tree<T>> getParent() const; std::shared_ptr<Tree<T>> getOrigin(); number getDepth() const; number getMaxDepth() const; void setMaxDepth(number) const; std::string str() const; // std::shared_ptr<Tree<T>> getptr(); template <class Archive> void serialize(Archive &archive, const unsigned int); friend std::ostream &operator<<(std::ostream &os, Tree<T> &tree) { os << tree.str(); return os; } protected: //! @brief depth of the tree number depth_ = 0; //! @brief maximum length of the tree number max_depth_ = std::numeric_limits<number>::max(); //! @brief data of the current node T data_; //! @brief the root of the tree std::weak_ptr<Tree<T>> origin_; //! @brief the parent node std::weak_ptr<Tree<T>> parent_; //! @brief mapping of items to successor trees std::unordered_map<T, std::shared_ptr<Tree<T>>> children_; bool is_origin = false; }; } // namespace sdm #include <sdm/utils/struct/tree.tpp>
24.104895
92
0.564259
[ "object", "vector" ]
969962bbb4c24ae462623984a119bf9728281778
623
cpp
C++
CodeForces/A_Beautiful_Matrix.cpp
eRuaro/Algorithmic-Solving
b5c7be94c3ea03ca0f7be2524c235e903bd4e1b4
[ "MIT" ]
null
null
null
CodeForces/A_Beautiful_Matrix.cpp
eRuaro/Algorithmic-Solving
b5c7be94c3ea03ca0f7be2524c235e903bd4e1b4
[ "MIT" ]
null
null
null
CodeForces/A_Beautiful_Matrix.cpp
eRuaro/Algorithmic-Solving
b5c7be94c3ea03ca0f7be2524c235e903bd4e1b4
[ "MIT" ]
null
null
null
#include <iostream> #include <vector> using std::cin; using std::cout; using std::vector; int main() { std::ios_base::sync_with_stdio(false); cin.tie(0); int vec[5][5]; int numberX = 0; int numberY = 0; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { cin >> vec[i][j]; } } for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { if (vec[i][j] == 1) { numberX = i; numberY = j; break; } } } cout << abs(numberX - 2) + abs(numberY - 2) << "\n"; }
18.323529
56
0.398074
[ "vector" ]
969df3c85a9695b75dc8a2b6bc6b1f0533356f19
1,322
hh
C++
src/OpenCL/Device.hh
MovGata/Ultrasound-Pre-Processing
4b9011aa6f5a3f047adcca11f8b524999a8569eb
[ "MIT" ]
null
null
null
src/OpenCL/Device.hh
MovGata/Ultrasound-Pre-Processing
4b9011aa6f5a3f047adcca11f8b524999a8569eb
[ "MIT" ]
null
null
null
src/OpenCL/Device.hh
MovGata/Ultrasound-Pre-Processing
4b9011aa6f5a3f047adcca11f8b524999a8569eb
[ "MIT" ]
null
null
null
#ifndef GUI_OPENCL_DEVICE #define GUI_OPENCL_DEVICE #include <chrono> #include <map> #include <memory> #include <string> #include <vector> #include <gl/glew.h> #include <gl/gl.h> #include <gl/glext.h> #include <CL/cl2.hpp> #include <SDL2/SDL_timer.h> #include "Program.hh" #include "Concepts.hh" #include "../GUI/Renderer.hh" #include "../GUI/Rectangle.hh" #include "../GUI/Tree.hh" namespace opencl { class Device { private: cl::Platform platform; cl::Device device; cl::Buffer outBuffer; cl::Buffer invMVTransposed; unsigned int width = 0; unsigned int height = 0; public: cl_GLuint pixelBuffer; cl::CommandQueue cQueue; std::map<std::string, std::shared_ptr<Program>> programs; cl::Context context; cl_device_type type = CL_DEVICE_TYPE_CPU; bool selected = false; Device(unsigned int width = 512, unsigned int height = 512); ~Device(); void initialise(); void render(gui::Renderer &renderer); void createDisplay(unsigned int w, unsigned int h); std::shared_ptr<gui::Tree> buildDeviceTree(float x = 0.0f, float y = 0.0f); void selectDevice(); }; } // namespace opencl #endif
22.033333
84
0.602874
[ "render", "vector" ]
96a3f3a02e4027523f4238232c4c30e02b7c402c
7,095
cpp
C++
external/libdxfrw/intern/dwgreader15.cpp
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
external/libdxfrw/intern/dwgreader15.cpp
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
external/libdxfrw/intern/dwgreader15.cpp
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
/****************************************************************************** ** libDXFrw - Library to read/write DXF files (ascii & binary) ** ** ** ** Copyright (C) 2011-2015 José F. Soriano, rallazz@gmail.com ** ** ** ** This library is free software, licensed under the terms of the GNU ** ** General Public License as published by the Free Software Foundation, ** ** either version 2 of the License, or (at your option) any later version. ** ** You should have received a copy of the GNU General Public License ** ** along with this program. If not, see <http://www.gnu.org/licenses/>. ** ******************************************************************************/ #include <cstdlib> #include <iostream> #include <fstream> #include <string> #include <sstream> #include "dwgreader15.h" #include "drw_textcodec.h" #include "../libdwgr.h" #include "qgslogger.h" bool dwgReader15::readMetaData() { QgsDebugMsg( "Entering." ); version = parent->getVersion(); decoder.setVersion( version, false ); if ( ! fileBuf->setPosition( 13 ) ) return false; previewImagePos = fileBuf->getRawLong32(); QgsDebugMsg( QString( "previewImagePos (seekerImageData) = %1" ).arg( previewImagePos ) ); /* MEASUREMENT system variable 2 bytes*/ duint16 meas = fileBuf->getRawShort16(); QgsDebugMsg( QString( "MEASUREMENT (0 = English, 1 = Metric)= %1" ).arg( meas ) ); Q_UNUSED( meas ); duint16 cp = fileBuf->getRawShort16(); QgsDebugMsg( QString( "codepage= %1" ).arg( cp ) ); if ( cp == 29 ) //TODO RLZ: locate wath code page and correct this decoder.setCodePage( "ANSI_1252", false ); if ( cp == 30 ) decoder.setCodePage( "ANSI_1252", false ); return true; } bool dwgReader15::readFileHeader() { QgsDebugMsg( "Entering." ); bool ret = true; if ( ! fileBuf->setPosition( 21 ) ) return false; duint32 count = fileBuf->getRawLong32(); QgsDebugMsg( QString( "count records=%1" ).arg( count ) ); for ( unsigned int i = 0; i < count; i++ ) { duint8 rec = fileBuf->getRawChar8(); duint32 address = fileBuf->getRawLong32(); duint32 size = fileBuf->getRawLong32(); dwgSectionInfo si; si.Id = rec; si.size = size; si.address = address; if ( rec == 0 ) { QgsDebugMsg( QString( "Section HEADERS address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::HEADER] = si; } else if ( rec == 1 ) { QgsDebugMsg( QString( "Section CLASSES address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::CLASSES] = si; } else if ( rec == 2 ) { QgsDebugMsg( QString( "Section OBJECTS (handles) address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::HANDLES] = si; } else if ( rec == 3 ) { QgsDebugMsg( QString( "Section UNKNOWN address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::UNKNOWNS] = si; } else if ( rec == 4 ) { QgsDebugMsg( QString( "Section R14DATA (AcDb::Template) address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::TEMPLATE] = si; } else if ( rec == 5 ) { QgsDebugMsg( QString( "Section R14REC5 (AcDb::AuxHeader) address=%1 size=%2" ).arg( address ).arg( size ) ); sections[secEnum::AUXHEADER] = si; } else { std::cerr << "\nUnsupported section number\n"; } } if ( ! fileBuf->isGood() ) return false; QgsDebugMsg( QString( "position after read section locator records=%1, bit are=%2" ).arg( fileBuf->getPosition() ).arg( fileBuf->getBitPos() ) ); duint32 ckcrc = fileBuf->crc8( 0, 0, fileBuf->getPosition() ); QgsDebugMsg( QString( "file header crc8 0 result=%1" ).arg( ckcrc ) ); switch ( count ) { case 3: ckcrc = ckcrc ^ 0xA598; break; case 4: ckcrc = ckcrc ^ 0x8101; break; case 5: ckcrc = ckcrc ^ 0x3CC4; break; case 6: ckcrc = ckcrc ^ 0x8461; } int headercrc = fileBuf->getRawShort16(); QgsDebugMsg( QString( "file header crc8 xor result=%1, file header CRC=%2" ).arg( ckcrc ).arg( headercrc ) ); Q_UNUSED( headercrc ); checkSentinel( fileBuf, secEnum::FILEHEADER, false ); QgsDebugMsg( QString( "position after read file header sentinel=%1, bit pos=%2" ).arg( fileBuf->getPosition() ).arg( fileBuf->getBitPos() ) ); QgsDebugMsg( "Leaving." ); return ret; } bool dwgReader15::readDwgHeader( DRW_Header &hdr ) { QgsDebugMsg( "Entering." ); dwgSectionInfo si = sections[secEnum::HEADER]; if ( si.Id < 0 )//not found, ends return false; if ( !fileBuf->setPosition( si.address ) ) return false; duint8 *tmpByteStr = new duint8[si.size]; fileBuf->getBytes( tmpByteStr, si.size ); dwgBuffer buff( tmpByteStr, si.size, &decoder ); QgsDebugMsg( "checksentinel" ); checkSentinel( &buff, secEnum::HEADER, true ); bool ret = dwgReader::readDwgHeader( hdr, &buff, &buff ); delete[]tmpByteStr; return ret; } bool dwgReader15::readDwgClasses() { QgsDebugMsg( "Entering." ); dwgSectionInfo si = sections[secEnum::CLASSES]; if ( si.Id < 0 )//not found, ends return false; if ( !fileBuf->setPosition( si.address ) ) return false; QgsDebugMsg( "classes section sentinel" ); checkSentinel( fileBuf, secEnum::CLASSES, true ); duint32 size = fileBuf->getRawLong32(); if ( size != ( si.size - 38 ) ) { QgsDebugMsg( QString( "size is %1 and secSize - 38 are %1" ).arg( size ).arg( si.size - 38 ) ); } duint8 *tmpByteStr = new duint8[size]; fileBuf->getBytes( tmpByteStr, size ); dwgBuffer buff( tmpByteStr, size, &decoder ); size--; //reduce 1 byte instead of check pos + bitPos while ( size > buff.getPosition() ) { DRW_Class *cl = new DRW_Class(); cl->parseDwg( version, &buff, &buff ); classesmap[cl->classNum] = cl; } int crc = fileBuf->getRawShort16(); QgsDebugMsg( QString( "crc=%1, classes section end sentinel" ).arg( crc ) ); Q_UNUSED( crc ); checkSentinel( fileBuf, secEnum::CLASSES, false ); bool ret = buff.isGood(); delete[]tmpByteStr; return ret; } bool dwgReader15::readDwgHandles() { QgsDebugMsg( "Entering." ); dwgSectionInfo si = sections[secEnum::HANDLES]; if ( si.Id < 0 )//not found, ends return false; bool ret = dwgReader::readDwgHandles( fileBuf, si.address, si.size ); return ret; } /*********** objects ************************/ /** * Reads all the object referenced in the object map section of the DWG file * (using their object file offsets) */ bool dwgReader15::readDwgTables( DRW_Header &hdr ) { bool ret = dwgReader::readDwgTables( hdr, fileBuf ); return ret; } /** * Reads all the object referenced in the object map section of the DWG file * (using their object file offsets) */ bool dwgReader15::readDwgBlocks( DRW_Interface &intfa ) { bool ret = true; ret = dwgReader::readDwgBlocks( intfa, fileBuf ); return ret; }
30.450644
147
0.606483
[ "object" ]
96af1050233f1e617fbec0d95773a70308d0c48d
9,222
cpp
C++
src/particle_filter.cpp
mkolod/CarND-Kidnapped-Vehicle-Project
bbe54cae778bab5c6cfb228a61c035d03e14b3ef
[ "MIT" ]
null
null
null
src/particle_filter.cpp
mkolod/CarND-Kidnapped-Vehicle-Project
bbe54cae778bab5c6cfb228a61c035d03e14b3ef
[ "MIT" ]
null
null
null
src/particle_filter.cpp
mkolod/CarND-Kidnapped-Vehicle-Project
bbe54cae778bab5c6cfb228a61c035d03e14b3ef
[ "MIT" ]
null
null
null
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: Tiffany Huang */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include <unordered_map> #include "helper_functions.h" using std::string; using std::vector; using dbl_normdist = std::normal_distribution<double>; static std::default_random_engine gen(123); inline double multiv_prob(double sig_x, double sig_y, double x_obs, double y_obs, double mu_x, double mu_y) { // calculate normalization term double gauss_norm = 1 / (2 * M_PI * sig_x * sig_y); // calculate exponent double exponent = (pow(x_obs - mu_x, 2) / (2 * pow(sig_x, 2))) + (pow(y_obs - mu_y, 2) / (2 * pow(sig_y, 2))); // calculate weight using normalization terms and exponent double weight = gauss_norm * exp(-exponent); return weight; } void ParticleFilter::init(double x, double y, double theta, double std[]) { /** * TODO: Set the number of particles. Initialize all particles to * first position (based on estimates of x, y, theta and their uncertainties * from GPS) and all weights to 1. */ constexpr int num_particles = 100; dbl_normdist x_rng(x, std[0]); dbl_normdist y_rng(y, std[1]); dbl_normdist theta_rng(theta, std[2]); particles.reserve(num_particles); #pragma unroll for (int i = 0; i < num_particles; ++i) { particles.emplace_back(Particle { i, x_rng(gen), y_rng(gen), theta_rng(gen), 1.0, std::vector<int>(), std::vector<double>(), std::vector<double>() }); } is_initialized = true; } void ParticleFilter::prediction(double delta_t, double std_pos[], double velocity, double yaw_rate) { /** * TODO: Add measurements to each particle and add random Gaussian noise. * NOTE: When adding noise you may find std::normal_distribution * and std::default_random_engine useful. * http://en.cppreference.com/w/cpp/numeric/random/normal_distribution * http://www.cplusplus.com/reference/random/default_random_engine/ */ constexpr double tolerance = 1e-5; dbl_normdist x_gen(0, std_pos[0]); dbl_normdist y_gen(0, std_pos[1]); dbl_normdist theta_gen(0, std_pos[2]); for (auto& particle : particles) { const double theta = particle.theta; const double v_dt = velocity * delta_t; if (fabs(yaw_rate) < tolerance) { particle.x += v_dt * cos(theta); particle.y += v_dt * sin(theta); } else { const double v_yaw = velocity / yaw_rate; const double yaw_dt = yaw_rate * delta_t; particle.x += v_yaw * (sin(theta + yaw_dt) - sin(theta)); particle.y += v_yaw * (cos(theta) - cos(theta + yaw_dt)); particle.theta += yaw_dt; } particle.x += x_gen(gen); particle.y += y_gen(gen); particle.theta += theta_gen(gen); } } void ParticleFilter::dataAssociation(vector<LandmarkObs> predicted, vector<LandmarkObs>& observations) { /** * TODO: Find the predicted measurement that is closest to each * observed measurement and assign the observed measurement to this * particular landmark. * NOTE: this method will NOT be called by the grading code. But you will * probably find it useful to implement this method and use it as a helper * during the updateWeights phase. */ for (auto& observation : observations) { double smallest_dist = std::numeric_limits<double>::max(); for (const auto& prediction : predicted) { double curr_dist = dist(observation.x, observation.y, prediction.x, prediction.y); if (curr_dist < smallest_dist) { smallest_dist = curr_dist; observation.id = prediction.id; } } } } inline double weight_prob(double x, double y, double mu_x, double mu_y, double sigma_x, double sigma_y) { double result = 1.0 / (2 * M_PI * sigma_x * sigma_y); result *= exp(-( pow(x - mu_x, 2)/(2.0 * pow(sigma_x, 2)) + pow(y - mu_y, 2)/(2.0 * pow(sigma_y, 2)) )); return result; } void ParticleFilter::updateWeights(double sensor_range, double std_landmark[], const vector<LandmarkObs> &observations, const Map &map_landmarks) { /** * TODO: Update the weights of each particle using a mult-variate Gaussian * distribution. You can read more about this distribution here: * https://en.wikipedia.org/wiki/Multivariate_normal_distribution * NOTE: The observations are given in the VEHICLE'S coordinate system. * Your particles are located according to the MAP'S coordinate system. * You will need to transform between the two systems. Keep in mind that * this transformation requires both rotation AND translation (but no scaling). * The following is a good resource for the theory: * https://www.willamette.edu/~gorr/classes/GeneralGraphics/Transforms/transforms2d.htm * and the following is a good resource for the actual equation to implement * (look at equation 3.33) http://planning.cs.uiuc.edu/node99.html */ const auto landmark_list = map_landmarks.landmark_list; for (auto& particle : particles) { const double x = particle.x; const double y = particle.y; const double theta = particle.theta; std::vector<LandmarkObs> visible_landmarks; std::unordered_map<int, LandmarkObs> vis_landmark_lookup; for (const auto& landmark : landmark_list) { const double distance = dist(x, y, landmark.x_f, landmark.y_f); if (distance <= sensor_range) { const auto lm_obs = LandmarkObs {landmark.id_i, landmark.x_f, landmark.y_f}; visible_landmarks.emplace_back(lm_obs); vis_landmark_lookup.insert({landmark.id_i, lm_obs}); } } std::vector<LandmarkObs> transformed_obs; for (const auto& obs : observations) { const double trans_x = cos(theta) * obs.x - sin(theta) * obs.y + x; const double trans_y = sin(theta) * obs.x + cos(theta) * obs.y + y; const auto lm_obs = LandmarkObs {obs.id, trans_x, trans_y }; transformed_obs.emplace_back(lm_obs); } dataAssociation(visible_landmarks, transformed_obs); particle.weight = 1.0; for (const auto& tobs : transformed_obs) { const auto found = vis_landmark_lookup.find(tobs.id); if (found != vis_landmark_lookup.end()) { const auto lm_obs = found->second; const double obs_weight = weight_prob(lm_obs.x, lm_obs.y, tobs.x, tobs.y, std_landmark[0], std_landmark[1]); particle.weight *= obs_weight; } } } } void ParticleFilter::resample() { /** * TODO: Resample particles with replacement with probability proportional * to their weight. * NOTE: You may find std::discrete_distribution helpful here. * http://en.cppreference.com/w/cpp/numeric/random/discrete_distribution */ double max_weight = std::numeric_limits<double>::min(); std::vector<double> weights; weights.reserve(num_particles); for (const auto& particle : particles) { double weight = particle.weight; weights.emplace_back(weight); if (weight > max_weight) { max_weight = weight; } } std::uniform_int_distribution<int> unif_int_dist(0, num_particles - 1); int index = unif_int_dist(gen); std::uniform_real_distribution<double> unif_real_dist(0.0, max_weight); double beta = 0.0; std::vector<Particle> resampled; resampled.reserve(num_particles); for (int i = 0; i < num_particles; ++i) { beta += unif_real_dist(gen) * 2.0; while (beta > weights[index]) { beta -= weights[index]; index = (index + 1) % num_particles; } resampled.emplace_back(particles[index]); } particles = resampled; } void ParticleFilter::SetAssociations(Particle& particle, const vector<int>& associations, const vector<double>& sense_x, const vector<double>& sense_y) { // particle: the particle to which assign each listed association, // and association's (x,y) world coordinates mapping // associations: The landmark id that goes along with each listed association // sense_x: the associations x mapping already converted to world coordinates // sense_y: the associations y mapping already converted to world coordinates particle.associations= associations; particle.sense_x = sense_x; particle.sense_y = sense_y; } string ParticleFilter::getAssociations(Particle best) { vector<int> v = best.associations; std::stringstream ss; copy(v.begin(), v.end(), std::ostream_iterator<int>(ss, " ")); string s = ss.str(); s = s.substr(0, s.length()-1); // get rid of the trailing space return s; } string ParticleFilter::getSenseCoord(Particle best, string coord) { vector<double> v; if (coord == "X") { v = best.sense_x; } else { v = best.sense_y; } std::stringstream ss; copy(v.begin(), v.end(), std::ostream_iterator<float>(ss, " ")); string s = ss.str(); s = s.substr(0, s.length()-1); // get rid of the trailing space return s; }
34.02952
115
0.664498
[ "vector", "transform" ]
96b06cd5b061b125af290adc6b39341ad50b736f
3,904
hpp
C++
include/Interop/ComCastor3D/CastorUtils/ComHdrRgbaColour.hpp
Mu-L/Castor3D
7b9c6e7be6f7373ad60c0811d136c0004e50e76b
[ "MIT" ]
245
2015-10-29T14:31:45.000Z
2022-03-31T13:04:45.000Z
include/Interop/ComCastor3D/CastorUtils/ComHdrRgbaColour.hpp
Mu-L/Castor3D
7b9c6e7be6f7373ad60c0811d136c0004e50e76b
[ "MIT" ]
64
2016-03-11T19:45:05.000Z
2022-03-31T23:58:33.000Z
include/Interop/ComCastor3D/CastorUtils/ComHdrRgbaColour.hpp
Mu-L/Castor3D
7b9c6e7be6f7373ad60c0811d136c0004e50e76b
[ "MIT" ]
11
2018-05-24T09:07:43.000Z
2022-03-21T21:05:20.000Z
/* See LICENSE file in root folder */ #ifndef __COMC3D_COM_HDRRGBACOLOUR_H__ #define __COMC3D_COM_HDRRGBACOLOUR_H__ #include "ComCastor3D/ComAtlObject.hpp" #include <CastorUtils/Graphics/Colour.hpp> namespace CastorCom { /*! \author Sylvain DOREMUS \version 0.7.0 \date 10/09/2014 \~english \brief This class defines a HdrColour object accessible from COM. \~french \brief Cette classe définit un HdrColour accessible depuis COM */ class ATL_NO_VTABLE CHdrRgbaColour : COM_ATL_OBJECT( HdrRgbaColour ) , public castor::HdrRgbaColour { public: /** *\~english *\brief Default constructor. *\~french *\brief Constructeur par défaut. */ CHdrRgbaColour(); /** *\~english *\brief Destructor. *\~french *\brief Destructeur. */ virtual ~CHdrRgbaColour(); /** *\~english *\brief Implicit conversion operator, to castor::Point4f. *\~french *\brief Opérateur de conversion implicite vers castor::Point4f. */ inline operator castor::Point4f()const { return toBGRAFloat( *this ); } COM_PROPERTY( R, FLOAT, makeGetter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eRed ), makePutter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eRed ) ); COM_PROPERTY( G, FLOAT, makeGetter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eGreen ), makePutter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eGreen ) ); COM_PROPERTY( B, FLOAT, makeGetter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eBlue ), makePutter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eBlue ) ); COM_PROPERTY( A, FLOAT, makeGetter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eAlpha ), makePutter( this, &castor::HdrRgbaColour::get, castor::RgbaComponent::eAlpha ) ); }; //!\~english Enters the ATL object into the object map, updates the registry and creates an instance of the object \~french Ecrit l'objet ATL dans la table d'objets, met à jour le registre et crée une instance de l'objet OBJECT_ENTRY_AUTO( __uuidof( HdrRgbaColour ), CHdrRgbaColour ); DECLARE_VARIABLE_REF_GETTER( HdrRgbaColour, castor, HdrRgbaColour ); DECLARE_VARIABLE_REF_PUTTER( HdrRgbaColour, castor, HdrRgbaColour ); /* template< typename Class > struct VariableRefGetter< Class, castor::Point4f > { typedef castor::Point4f Value; typedef Value const & ( Class::*Function )( )const; VariableRefGetter( Class * instance, Function function ) : m_instance( instance ) , m_function( function ) { } HRESULT operator()( IHdrColour ** value ) { HRESULT hr = E_POINTER; if ( m_instance ) { if ( value ) { hr = CHdrColour::CreateInstance( value ); if ( hr == S_OK ) { castor::Colour * l_colour = static_cast< castor::HdrColour * >( static_cast< CHdrColour * >( *value ) ); l_colour->fromBGRA( ( m_instance->*m_function )() ); } } } else { hr = CComError::dispatchError( E_FAIL, IID_IHdrColour, cuT( "nullptr instance" ), ERROR_UNINITIALISED_INSTANCE.c_str(), 0, nullptr ); } return hr; } private: Class * m_instance; Function m_function; }; template< typename Class > struct VariablePutter< Class, castor::Point4f const & > { typedef void ( Class::*Function )( castor::Point4f const & ); VariablePutter( Class * instance, Function function ) : m_instance( instance ) , m_function( function ) { } HRESULT operator()( IHdrColour * value ) { HRESULT hr = E_POINTER; if ( m_instance ) { if ( value ) { ( m_instance->*m_function )( *static_cast< CHdrColour * >( value ) ); hr = S_OK; } } else { hr = CComError::dispatchError( E_FAIL, IID_IHdrColour, cuT( "nullptr instance" ), ERROR_UNINITIALISED_INSTANCE.c_str(), 0, nullptr ); } return hr; } private: Class * m_instance; Function m_function; }; */ } #endif
28.289855
221
0.684682
[ "object" ]
96b6bc60aed2b7ad28afa3cf87eae54eaaeed546
2,679
cc
C++
src/Artwork.cc
TooTallNate/node-iTunes
5c4c2469773cfefbabdc0e9ebb5a041fa709d335
[ "MIT" ]
11
2015-09-21T04:50:51.000Z
2021-06-22T07:52:28.000Z
src/Artwork.cc
TooTallNate/node-iTunes
5c4c2469773cfefbabdc0e9ebb5a041fa709d335
[ "MIT" ]
1
2017-05-10T19:56:56.000Z
2017-05-10T19:56:56.000Z
src/Artwork.cc
TooTallNate/node-iTunes
5c4c2469773cfefbabdc0e9ebb5a041fa709d335
[ "MIT" ]
3
2015-08-02T11:36:14.000Z
2018-09-19T00:39:43.000Z
#include <node/node_buffer.h> #include "Artwork.h" #include "async_macros.h" using namespace node; using namespace v8; namespace node_iTunes { static Persistent<String> ARTWORK_CLASS_SYMBOL; void free_artwork_data_callback(char *data, void *hint); void Artwork::Init(v8::Handle<Object> target) { HandleScope scope; // String Constants ARTWORK_CLASS_SYMBOL = NODE_PSYMBOL("Artwork"); Local<FunctionTemplate> t = FunctionTemplate::New(New); artwork_constructor_template = Persistent<FunctionTemplate>::New(t); artwork_constructor_template->Inherit(item_constructor_template); artwork_constructor_template->SetClassName(ARTWORK_CLASS_SYMBOL); t->InstanceTemplate()->SetInternalFieldCount(1); NODE_SET_PROTOTYPE_METHOD(t, "data", Data); target->Set(ARTWORK_CLASS_SYMBOL, artwork_constructor_template->GetFunction()); } // JavaScript Constructor ///////////////////////////////////////////////////// v8::Handle<Value> Artwork::New(const Arguments& args) { HandleScope scope; Artwork* p = new Artwork(); p->Wrap(args.This()); return args.This(); } // Data /////////////////////////////////////////////////////////////////////// v8::Handle<Value> Artwork::Data(const Arguments& args) { HandleScope scope; INIT(Artwork); if (HAS_CALLBACK_ARG) { GET_CALLBACK; } BEGIN_ASYNC(EIO_Data, EIO_AfterData); } // Gets the TIFF data representation by default. // TODO: Add support for specifying format and compression level. // See here: http://borkware.com/quickies/one?topic=NSImage int Artwork::EIO_Data(eio_req *req) { INIT_EIO_FUNC; iTunesArtwork *item = (iTunesArtwork *)ar->itemRef; NSImage *image = [item data]; NSData *data = [image TIFFRepresentation]; [data retain]; ar->result = data; req->result = [data length]; FINISH_EIO_FUNC; } int Artwork::EIO_AfterData(eio_req *req) { INIT_AFTER_FUNC; // TODO: Error handling argv[0] = Null(); // Create the buffer. // http://sambro.is-super-awesome.com/2011/03/03/creating-a-proper-buffer-in-a-node-c-addon Buffer *slowBuffer = Buffer::New((char *)[(NSData *)ar->result bytes], req->result, free_artwork_data_callback, ar->result); Local<Object> globalObj = Context::GetCurrent()->Global(); Local<Function> bufferConstructor = Local<Function>::Cast(globalObj->Get(String::New("Buffer"))); v8::Handle<Value> constructorArgs[3] = { slowBuffer->handle_, Integer::New(req->result), Integer::New(0) }; Local<Object> actualBuffer = bufferConstructor->NewInstance(3, constructorArgs); argv[1] = actualBuffer; FINISH_AFTER_FUNC; } void free_artwork_data_callback(char *data, void *hint) { [(NSData *)hint release]; } } // namespace node_iTunes
31.517647
126
0.700261
[ "object" ]
96b92998b74b89e074fa7efc871bc56784f13a9a
5,583
hh
C++
c_src/easton_index/io.hh
cloudant-labs/easton
ec6b16d8a52f9fba7252ae8bd9edff071387741c
[ "Apache-2.0" ]
14
2017-04-20T15:53:16.000Z
2021-07-31T06:13:01.000Z
c_src/easton_index/io.hh
cloudant-labs/easton
ec6b16d8a52f9fba7252ae8bd9edff071387741c
[ "Apache-2.0" ]
8
2017-05-24T22:45:59.000Z
2018-06-24T23:13:08.000Z
c_src/easton_index/io.hh
cloudant-labs/easton
ec6b16d8a52f9fba7252ae8bd9edff071387741c
[ "Apache-2.0" ]
1
2017-10-13T22:16:52.000Z
2017-10-13T22:16:52.000Z
// Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. #ifndef EASTON_IO_HH #define EASTON_IO_HH #include <sys/time.h> #include <ctime> #include <string> #include <unordered_map> #include <leveldb/db.h> #include <leveldb/write_batch.h> #include <spatialindex/capi/sidx_api.h> #include <spatialindex/capi/sidx_impl.h> #include "ei.h" #include "easton.hh" typedef struct SpatialIndex::StorageManager::CustomStorageManagerCallbacks SpatialIndexStorageManager; NS_EASTON_BEGIN NS_EASTON_IO_BEGIN bool is_dir(std::string dname); class Timer { public: void start(); void print(std::string prefix); private: struct timeval tv; }; class Bytes { public: typedef std::shared_ptr<Bytes> Ptr; typedef std::vector<Ptr> Vector; typedef std::vector<Ptr>::iterator VIter; void display(); // Create objects that own the underlying memory static Ptr create(uint32_t len); static Ptr create(uint8_t* data, uint32_t len); // Create objects by copying the provided memory static Ptr copy(const uint8_t* const data, uint32_t len); // Create objects that only proxy to the underlying memory static Ptr proxy(const char* data); static Ptr proxy(uint8_t* data, uint32_t len); ~Bytes(); leveldb::Slice slice(); uint8_t* get(); uint32_t size(); private: Bytes(); Bytes(uint32_t len); Bytes(uint8_t* data, uint32_t len, bool owner); Bytes(const Bytes& other); bool owner; uint8_t* data; uint32_t len; }; class Reader { public: typedef std::shared_ptr<Reader> Ptr; static Ptr recv(); static Ptr create(Bytes::Ptr data); ~Reader(); void print(); bool read(bool& val); bool read(int64_t& val); bool read(uint64_t& val); bool read(double& val); bool read(std::string& val); Bytes::Ptr read_bytes(); // The read_SOMETHING_n functions are to assert // that the given arity was found for the data // type rather than an investigatory what is the // arity. bool read_tuple(int32_t& arity); bool read_tuple_n(int32_t arity); bool read_list(int32_t& arity); bool read_list_n(int32_t arity); bool read_empty_list(); private: Reader(); Reader(Bytes::Ptr data); Reader(const Reader& other); Bytes::Ptr data; int32_t pos; }; class Writer { public: typedef std::shared_ptr<Writer> Ptr; typedef std::unique_ptr<ei_x_buff> EIXBuffPtr; static Ptr create(); ~Writer(); void send(); Bytes::Ptr serialize(); void write(bool val); void write(const char* val); void write(int64_t val); void write(uint64_t val); void write(double val); void write(Bytes::Ptr val); void start_tuple(int32_t arity); void start_list(int32_t arity); void write_empty_list(); private: Writer(); Writer(const Writer& other); EIXBuffPtr buff; }; class Transaction; typedef std::weak_ptr<Transaction> TxMonitor; class Storage { public: typedef std::shared_ptr<Storage> Ptr; static Ptr create(std::string dirname); ~Storage(); uint64_t data_size(); io::Bytes::Ptr make_key(const char* tag, const char* val); io::Bytes::Ptr make_key(const char* tag, io::Bytes::Ptr val); Bytes::Ptr get_kv(Bytes::Ptr key); void put_kv(Bytes::Ptr key, Bytes::Ptr val); void del_kv(Bytes::Ptr key); void* get_storage_manager(); int64_t new_geoid(); private: Storage(); Storage(std::string dirname); Storage(const Storage& other); void set_transaction(TxMonitor tx); void write(leveldb::WriteBatch* batch); std::string dirname; leveldb::DB* db; leveldb::Options o_opts; leveldb::ReadOptions r_opts; leveldb::WriteOptions w_opts; TxMonitor tx; Bytes::Ptr geoid_num_key; int64_t geoid_num; SpatialIndexStorageManager sm; friend class Transaction; }; class Transaction { public: typedef std::shared_ptr<Transaction> Ptr; typedef std::unique_ptr<leveldb::WriteBatch> WBPtr; static Ptr open(Storage::Ptr store); static Ptr autocommit(Storage::Ptr store); ~Transaction(); void commit(); private: Transaction(Storage::Ptr store, bool is_autocommit); Transaction(const Transaction& other); io::Bytes::Ptr get_kv(Bytes::Ptr key); void put_kv(Bytes::Ptr key, Bytes::Ptr val); void del_kv(Bytes::Ptr key); Storage::Ptr store; WBPtr batch; std::unordered_map<std::string, io::Bytes::Ptr> rbuf; bool is_autocommit; friend class Storage; }; NS_EASTON_IO_END NS_EASTON_END #endif
22.787755
80
0.622783
[ "vector" ]
96bbdb9c253c89265f0fe51d726bdc2ae10eb45a
7,233
cpp
C++
modules/task_2/solovev_a_scatter/main.cpp
LioBuitrago/pp_2020_autumn_informatics
1ecc1b5dae978295778176ff11ffe42bedbc602e
[ "BSD-3-Clause" ]
1
2020-11-20T15:05:12.000Z
2020-11-20T15:05:12.000Z
modules/task_2/solovev_a_scatter/main.cpp
LioBuitrago/pp_2020_autumn_informatics
1ecc1b5dae978295778176ff11ffe42bedbc602e
[ "BSD-3-Clause" ]
1
2021-02-13T03:00:05.000Z
2021-02-13T03:00:05.000Z
modules/task_2/solovev_a_scatter/main.cpp
LioBuitrago/pp_2020_autumn_informatics
1ecc1b5dae978295778176ff11ffe42bedbc602e
[ "BSD-3-Clause" ]
1
2020-10-11T09:11:57.000Z
2020-10-11T09:11:57.000Z
// Copyright 2020 Solovev Alexandr #include <gtest-mpi-listener.hpp> #include <gtest/gtest.h> #include <random> #include <vector> #include "../../../modules/task_2/solovev_a_scatter/scatter.h" TEST(MPI_Scatter, int_to_int) { const int root = 0; int rank, size; int k = 0; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> data(30); std::vector<int> data1(30); std::vector<int> data2(30); int data_size = static_cast<int>(data.size()); std::vector<int> recv(data_size/ size); int recv_size = static_cast<int>(recv.size()); std::vector<int> scatter(data_size / size); int scatter_size = static_cast<int>(scatter.size()); for (int& i : data) { i = ++k; } My_Scatter(data.data(), data_size / size, MPI_INT, recv.data(), data_size / size, MPI_INT, root, MPI_COMM_WORLD); MPI_Scatter(data.data(), data_size / size, MPI_INT, scatter.data(), data_size / size, MPI_INT, root, MPI_COMM_WORLD); MPI_Gather(recv.data(), recv_size, MPI_INT, data1.data(), recv_size, MPI_INT, root, MPI_COMM_WORLD); MPI_Gather(scatter.data(), scatter_size, MPI_INT, data2.data(), scatter_size, MPI_INT, root, MPI_COMM_WORLD); if (rank == root) { ASSERT_EQ(data1, data2); } } TEST(MPI_Scatter, float_to_float) { const int root = 0; int rank, size; float k = 3.3f; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<float> data(35); int data_size = static_cast<int>(data.size()); std::vector<float> data1(35); std::vector<float> data2(35); std::vector<float> recv(data_size / size); int recv_size = static_cast<int>(recv.size()); std::vector<float> scatter(data_size / size); int scatter_size = static_cast<int>(scatter.size()); for (float& i : data) { i = ++k; } My_Scatter(data.data(), data_size / size, MPI_FLOAT, recv.data(), data_size / size, MPI_FLOAT, root, MPI_COMM_WORLD); MPI_Scatter(data.data(), data_size / size, MPI_FLOAT, scatter.data(), data_size / size, MPI_FLOAT, root, MPI_COMM_WORLD); MPI_Gather(recv.data(), recv_size, MPI_FLOAT, data1.data(), recv_size, MPI_FLOAT, root, MPI_COMM_WORLD); MPI_Gather(scatter.data(), scatter_size, MPI_FLOAT, data2.data(), scatter_size, MPI_FLOAT, root, MPI_COMM_WORLD); if (rank == root) { ASSERT_EQ(data1, data2); } } TEST(MPI_Scatter, double_to_double) { const int root = 0; int rank, size; double k = 17.3; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<double> data(35); int data_size = static_cast<int>(data.size()); std::vector<double> data1(35); std::vector<double> data2(35); std::vector<double> recv(data_size / size); int recv_size = static_cast<int>(recv.size()); std::vector<double> scatter(data_size / size); int scatter_size = static_cast<int>(scatter.size()); for (double& i : data) { i = ++k; } My_Scatter(data.data(), data_size / size, MPI_DOUBLE, recv.data(), data_size / size, MPI_DOUBLE, root, MPI_COMM_WORLD); MPI_Scatter(data.data(), data_size / size, MPI_DOUBLE, scatter.data(), data_size / size, MPI_DOUBLE, root, MPI_COMM_WORLD); MPI_Gather(recv.data(), recv_size, MPI_DOUBLE, data1.data(), recv_size, MPI_DOUBLE, root, MPI_COMM_WORLD); MPI_Gather(scatter.data(), scatter_size, MPI_DOUBLE, data2.data(), scatter_size, MPI_DOUBLE, root, MPI_COMM_WORLD); if (rank == root) { ASSERT_EQ(data1, data2); } } TEST(MPI_Scatter, char_to_char) { const int root = 0; int rank, size; char k = '1'; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<char> data(40); int data_size = static_cast<int>(data.size()); std::vector<char> data1(40); std::vector<char> data2(40); std::vector<char> recv(data_size / size); int recv_size = static_cast<int>(recv.size()); std::vector<char> scatter(data_size / size); int scatter_size = static_cast<int>(scatter.size()); for (char& i : data) { i = ++k; } My_Scatter(data.data(), data_size / size, MPI_CHAR, recv.data(), data_size / size, MPI_CHAR, root, MPI_COMM_WORLD); MPI_Scatter(data.data(), data_size / size, MPI_CHAR, scatter.data(), data_size / size, MPI_CHAR, root, MPI_COMM_WORLD); MPI_Gather(recv.data(), recv_size, MPI_CHAR, data1.data(), recv_size, MPI_CHAR, root, MPI_COMM_WORLD); MPI_Gather(scatter.data(), scatter_size, MPI_CHAR, data2.data(), scatter_size, MPI_CHAR, root, MPI_COMM_WORLD); if (rank == root) { ASSERT_EQ(data1, data2); } } TEST(MPI_Scatter, error_count_send) { const int root = 0; int rank, size; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> data(20); int data_size = static_cast<int>(data.size()); std::vector<char> recv(data_size / size); ASSERT_EQ(My_Scatter(data.data(), -1, MPI_INT, recv.data(), data_size / size, MPI_INT, root, MPI_COMM_WORLD), MPI_ERR_COUNT); } TEST(MPI_Scatter, error_count_recv) { const int root = 0; int rank, size; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> data(20); int data_size = static_cast<int>(data.size()); std::vector<char> recv(data_size / size); ASSERT_EQ(My_Scatter(data.data(), data_size, MPI_INT, recv.data(), -1, MPI_INT, root, MPI_COMM_WORLD), MPI_ERR_COUNT); } TEST(MPI_Scatter, error_both_count) { const int root = 0; int rank, size; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> data(20); int data_size = static_cast<int>(data.size()); std::vector<char> recv(data_size / size); int recv_size = static_cast<int>(recv.size()); ASSERT_EQ(My_Scatter(data.data(), data_size, MPI_INT, recv.data(), recv_size, MPI_INT, root, MPI_COMM_WORLD), MPI_ERR_COUNT); } TEST(MPI_Scatter, error_data) { const int root = 0; int rank, size; MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> data(20); int data_size = static_cast<int>(data.size()); std::vector<int> recv(20); int recv_size = static_cast<int>(recv.size()); ASSERT_EQ(My_Scatter(nullptr, data_size, MPI_INT, recv.data(), recv_size, MPI_INT, root, MPI_COMM_WORLD), MPI_ERR_BUFFER); } int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); MPI_Init(&argc, &argv); ::testing::AddGlobalTestEnvironment(new GTestMPIListener::MPIEnvironment); ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); listeners.Release(listeners.default_result_printer()); listeners.Release(listeners.default_xml_generator()); listeners.Append(new GTestMPIListener::MPIMinimalistPrinter); return RUN_ALL_TESTS(); }
34.607656
80
0.651597
[ "vector" ]
96be5e809b1f831bb4299ec412d267084ea863f6
3,047
cpp
C++
Mercury/Mode/AutoMode.cpp
glensand/Mercury
94c54d32028c8bfc762890906fa642920508995b
[ "MIT" ]
3
2021-01-14T03:43:03.000Z
2021-05-07T15:09:47.000Z
Mercury/Mode/AutoMode.cpp
glensand/Mercury
94c54d32028c8bfc762890906fa642920508995b
[ "MIT" ]
null
null
null
Mercury/Mode/AutoMode.cpp
glensand/Mercury
94c54d32028c8bfc762890906fa642920508995b
[ "MIT" ]
null
null
null
#include "AutoMode.h" #include "App/GameInterface.h" #include "World/Robot/Robot.h" #include "World/Terrain/Terrain.h" #include "Player/Player.h" #include <algorithm> #include <vector> namespace merc { AutoMode::AutoMode(GameInterface& gameInterface, Mode modeType) : ModeBase(gameInterface, modeType) { m_directions[Direction::Up] = [](const Point& p) { return Up(p); }; m_directions[Direction::Down] = [](const Point& p) { return Down(p); }; m_directions[Direction::Left] = [](const Point& p) { return Left(p); }; m_directions[Direction::Right] = [](const Point& p) { return Right(p); }; } AutoMode::Point AutoMode::Up(const Point& p) { return { p.X, p.Y - 1, &p }; } AutoMode::Point AutoMode::Down(const Point& p) { return { p.X, p.Y + 1, &p }; } AutoMode::Point AutoMode::Right(const Point& p) { return { p.X + 1, p.Y, &p }; } AutoMode::Point AutoMode::Left(const Point& p) { return { p.X - 1, p.Y, &p }; } bool AutoMode::ExploreMap(std::deque<Point>& points, CellType desiredCell, const std::vector<CellType>& forbiddenCells) const { const auto& cur = points.back(); auto&& terrain = m_gameInterface.Player->GetExploredTerrain(); for (std::size_t i{ 0 }; i < std::size_t(Direction::Count); ++i) { const auto point = m_directions[Direction(i)](cur); if (!terrain.IsCellOnBoard(point.X, point.Y) || std::find(std::cbegin(points), std::cend(points), point) != std::cend(points)) continue; auto&& cell = terrain.GetCell(point.X, point.Y); if (cell.GetRobot() != nullptr) continue; if(cell.GetType() == desiredCell) { points.emplace_back(point); return true; } if(std::find(std::cbegin(forbiddenCells), std::cend(forbiddenCells), cell.GetType()) == std::cend(forbiddenCells)) { points.emplace_back(point); if (ExploreMap(points, desiredCell, forbiddenCells)) return true; } } return false; } std::deque<Direction> AutoMode::Convert(const std::deque<Point>& points) const { std::deque<Direction> result; auto* point = &points.back(); while(point->Prev != nullptr) { result.push_front(ComputeDirection(*point->Prev, *point)); point = point->Prev; } return result; } Direction AutoMode::ComputeDirection(const Point& from, const Point& to) const { for (std::size_t i{ 0 }; i < std::size_t(Direction::Count); ++i) { if (m_directions[Direction(i)](from) == to) return Direction(i); } return Direction::Count; } std::deque<Direction> AutoMode::FindPath(const Robot& robot, CellType desiredCell, const std::vector<CellType>& forbiddenCells) const { std::deque<Point> points; std::deque<Direction> directions; const auto& [x, y] = robot.GetPosition(); points.emplace_back(Point{ x, y }); if(ExploreMap(points, desiredCell, forbiddenCells)) { directions = Convert(points); } return directions; } }
28.476636
134
0.624549
[ "vector" ]
96bf0df9679ee5c5a81d5f4917f0372f24817e34
962
cpp
C++
Ares/src/Ares/Renderer/Shader.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
Ares/src/Ares/Renderer/Shader.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
Ares/src/Ares/Renderer/Shader.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
#include "AresPCH.h" #include "Ares/Renderer/Shader.h" #include "Ares/Renderer/Renderer.h" #include "Platform/OpenGL/OpenGLShader.h" namespace Ares { std::vector<Ref<Shader>> Shader::s_AllShaders; std::unordered_map<std::string, Ref<Shader>> Shader::s_ShaderMap; Ref<Shader> Shader::Create(const std::string& filePath) { switch (Renderer::GetAPI()) { case RendererAPI::API::None: ARES_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr; case RendererAPI::API::OpenGL: Ref<Shader> result = CreateRef<OpenGLShader>(filePath); s_AllShaders.push_back(result); return result; } ARES_CORE_ASSERT(false, "Unknow RendererAPI"); return nullptr; } Ref<Shader> Shader::Find(const std::string& filePath) { if (s_ShaderMap.find(filePath) != s_ShaderMap.end()) return s_ShaderMap.at(filePath); Ref<Shader> shader = Create(filePath); s_ShaderMap[filePath] = shader; return shader; } }
23.463415
76
0.718295
[ "vector" ]
96bf4ebfde3988aa9f0d2121c59d3f097a87ce3a
1,628
hpp
C++
deps/win32/zeromq/src/mailbox.hpp
asimihsan/masspinger
51e483b6c1aaabce8ed0e7d289348870588113ce
[ "MIT" ]
4
2015-12-23T09:02:57.000Z
2021-01-02T18:06:46.000Z
deps/win32/zeromq/src/mailbox.hpp
asimihsan/masspinger
51e483b6c1aaabce8ed0e7d289348870588113ce
[ "MIT" ]
null
null
null
deps/win32/zeromq/src/mailbox.hpp
asimihsan/masspinger
51e483b6c1aaabce8ed0e7d289348870588113ce
[ "MIT" ]
2
2016-04-05T19:08:31.000Z
2021-01-03T01:42:26.000Z
/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __ZMQ_MAILBOX_HPP_INCLUDED__ #define __ZMQ_MAILBOX_HPP_INCLUDED__ #include <stddef.h> #include "platform.hpp" #include "fd.hpp" #include "stdint.hpp" #include "config.hpp" #include "command.hpp" namespace zmq { class mailbox_t { public: mailbox_t (); ~mailbox_t (); fd_t get_fd (); void send (const command_t &cmd_); int recv (command_t *cmd_, bool block_); private: // Write & read end of the socketpair. fd_t w; fd_t r; // Platform-dependent function to create a socketpair. static int make_socketpair (fd_t *r_, fd_t *w_); // Disable copying of mailbox_t object. mailbox_t (const mailbox_t&); const mailbox_t &operator = (const mailbox_t&); }; } #endif
25.84127
76
0.673219
[ "object" ]
96bf5e771f24d6d0e78f10eda01e96c2e867dace
514
hpp
C++
Keditor/Source/Panels/SceneHierarchyPanel.hpp
KingKiller100/Krakatoa-Engine
ff07f7328d428c04e06b561b6afd315eea39865c
[ "Apache-2.0" ]
1
2020-04-05T13:37:48.000Z
2020-04-05T13:37:48.000Z
Keditor/Source/Panels/SceneHierarchyPanel.hpp
KingKiller100/Krakoa-Engine
0f2a5a5109e256a384abe8dc21eacaa45c1de610
[ "Apache-2.0" ]
null
null
null
Keditor/Source/Panels/SceneHierarchyPanel.hpp
KingKiller100/Krakoa-Engine
0f2a5a5109e256a384abe8dc21eacaa45c1de610
[ "Apache-2.0" ]
null
null
null
#pragma once #include <Core/PointerTypes.hpp> #include <Scene/iScene.hpp> #include "iScenePanel.hpp" namespace krakoa::scene::panels { class SceneHierarchyPanel { public: SceneHierarchyPanel(); void OnRender(); USE_RESULT ecs::EntityUID GetSelectedEntity() const; private: void DrawEntityNode(const scene::ecs::Entity& entity); void DrawComponentNode(const scene::ecs::Entity& entity); private: Multi_Ptr<ecs::EntityUID> selectedEntityID; std::vector<Solo_Ptr<iScenePanel>> panels; }; }
18.357143
59
0.745136
[ "vector" ]
96bfad30d5314d74249c965ea22a1924bfce90b6
11,272
cc
C++
tests/lossless/test_color_cache.cc
RReverser/libwebp2
c90b5b476004c9a98731ae1c175cebab5de50fbf
[ "Apache-2.0" ]
4
2020-11-10T17:46:57.000Z
2022-03-22T06:24:17.000Z
tests/lossless/test_color_cache.cc
RReverser/libwebp2
c90b5b476004c9a98731ae1c175cebab5de50fbf
[ "Apache-2.0" ]
null
null
null
tests/lossless/test_color_cache.cc
RReverser/libwebp2
c90b5b476004c9a98731ae1c175cebab5de50fbf
[ "Apache-2.0" ]
null
null
null
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ----------------------------------------------------------------------------- // // Test color caches. // // Author: Maryla (maryla@google.com) #include "src/common/lossless/color_cache.h" #include "src/common/symbols.h" #include "src/utils/random.h" #include "tests/include/helpers.h" namespace WP2L { namespace { TEST(HashColorCache, Simple) { HashColorCache cache; ASSERT_TRUE(cache.Allocate(/*hash_bits=*/2)); const int16_t kBlack[] = {255, 0, 0, 0}; const int16_t kGreen[] = {255, 0, 225, 0}; const int16_t kRed[] = {255, 255, 0, 0}; uint32_t index; EXPECT_FALSE(cache.Contains(kBlack, &index)); EXPECT_FALSE(cache.Contains(kGreen, &index)); EXPECT_FALSE(cache.Contains(kRed, &index)); // Insert black. EXPECT_TRUE(cache.Insert(kBlack, &index)); const uint32_t black_index = index; int16_t color[4]; cache.Lookup(black_index, color); EXPECT_THAT(color, testing::ElementsAreArray(kBlack)); EXPECT_TRUE(cache.Contains(kBlack, &index)); EXPECT_FALSE(cache.Contains(kGreen, &index)); EXPECT_FALSE(cache.Contains(kRed, &index)); // Insert green. EXPECT_TRUE(cache.Insert(kGreen, &index)); const uint32_t green_index = index; const bool black_was_removed = (green_index == black_index); cache.Lookup(green_index, color); EXPECT_THAT(color, testing::ElementsAreArray(kGreen)); EXPECT_TRUE(cache.Contains(kGreen, &index)); EXPECT_EQ(cache.Contains(kBlack, &index), black_index != green_index); if (!black_was_removed) { cache.Lookup(black_index, color); EXPECT_THAT(color, testing::ElementsAreArray(kBlack)); } // Re insert black, check the index hasn't changed. EXPECT_EQ(cache.Insert(kBlack, &index), black_was_removed); EXPECT_EQ(black_index, index); // Insert red. EXPECT_TRUE(cache.Insert(kRed, &index)); const uint32_t red_index = index; cache.Lookup(red_index, color); EXPECT_THAT(color, testing::ElementsAreArray(kRed)); EXPECT_EQ(cache.Contains(kBlack, &index), red_index != black_index); EXPECT_EQ(cache.Contains(kGreen, &index), red_index != green_index); } // Tests that the cache API is consistent: e.g. a color that is present // can be retrieved, a color that was just inserted is present, etc. static void TestColorCacheAPI(uint32_t num_colors, ColorCache* const cache, WP2::UniformIntDistribution* const random) { const uint32_t num_pixels = num_colors * 10; std::vector<int16_t> colors(num_colors * 4); for (uint32_t i = 0; i < colors.size(); ++i) { colors[i] = random->Get(0, 255); } std::vector<bool> color_seen(num_colors, false); std::vector<uint32_t> color_indices(num_pixels); const uint32_t kNotInCache = std::numeric_limits<uint32_t>::max(); std::vector<uint32_t> cache_indices(num_pixels, kNotInCache); // Simulates encoding stage. for (uint32_t i = 0; i < num_pixels; ++i) { const uint32_t color_index = random->Get<uint32_t>(0, num_colors - 1); color_indices[i] = color_index; const int16_t* const color = &colors[color_index * 4]; // If we've never seen this color, it shouldn't be in the cache // (but it's not necessarily in the cache even if we've seen it before). const bool present = cache->Contains(color, &cache_indices[i]); if (!color_seen[color_index]) { EXPECT_FALSE(present); } color_seen[color_index] = true; int16_t lookup[4]; if (present) { cache->Lookup(cache_indices[i], lookup); EXPECT_THAT(lookup, testing::ElementsAre(color[0], color[1], color[2], color[3])); } uint32_t insert_index; const bool inserted = cache->Insert(color, &insert_index); EXPECT_NE(inserted, present); if (present) { EXPECT_EQ(insert_index, cache_indices[i]); } // A color that was just inserted is in the cache. uint32_t new_index; EXPECT_TRUE(cache->Contains(color, &new_index)); cache->Lookup(new_index, lookup); EXPECT_THAT(lookup, testing::ElementsAre(color[0], color[1], color[2], color[3])); } cache->Reset(); // Simulates decoding stage. for (uint32_t i = 0; i < num_pixels; ++i) { const int16_t* const expected_color = &colors[color_indices[i] * 4]; if (cache_indices[i] == kNotInCache) { uint32_t cache_index; EXPECT_FALSE(cache->Contains(expected_color, &cache_index)); } else { uint32_t cache_index; EXPECT_TRUE(cache->Contains(expected_color, &cache_index)); int16_t lookup[4]; cache->Lookup(cache_indices[i], lookup); EXPECT_THAT(lookup, testing::ElementsAre(expected_color[0], expected_color[1], expected_color[2], expected_color[3])); } cache->Insert(expected_color, nullptr); } } TEST(HashColorCache, Random) { for (uint32_t bits = 1; bits < 5; ++bits) { WP2::UniformIntDistribution random; HashColorCache cache; ASSERT_TRUE(cache.Allocate(bits)); const uint32_t num_colors = random.Get(1 << (bits - 1), 1 << (bits + 1)); TestColorCacheAPI(num_colors, &cache, &random); } } TEST(FifoColorCache, Simple) { FifoColorCache cache; ASSERT_TRUE(cache.Allocate(/*cache_bits=*/2)); int16_t kColors[5 * 4] = {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}; uint32_t index = 0; EXPECT_FALSE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_TRUE(cache.Insert(&kColors[4 * 0], &index)); EXPECT_EQ(cache.IndexRange(), 1u); EXPECT_TRUE(cache.Insert(&kColors[4 * 1], &index)); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(index, 1u); EXPECT_EQ(cache.IndexRange(), 2u); EXPECT_FALSE(cache.Insert(&kColors[4 * 0], &index)); EXPECT_EQ(index, 1u); EXPECT_TRUE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 1u); EXPECT_EQ(cache.IndexRange(), 2u); EXPECT_TRUE(cache.Insert(&kColors[4 * 2], &index)); EXPECT_TRUE(cache.Contains(&kColors[4 * 2], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(index, 1u); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 2u); EXPECT_EQ(cache.IndexRange(), 3u); EXPECT_TRUE(cache.Insert(&kColors[4 * 3], &index)); EXPECT_TRUE(cache.Contains(&kColors[4 * 3], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 2], &index)); EXPECT_EQ(index, 1u); EXPECT_TRUE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(index, 2u); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 3u); EXPECT_EQ(cache.IndexRange(), 4u); EXPECT_FALSE(cache.Insert(&kColors[4 * 1], &index)); EXPECT_EQ(index, 3u); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 3], &index)); EXPECT_EQ(index, 1u); EXPECT_TRUE(cache.Contains(&kColors[4 * 2], &index)); EXPECT_EQ(index, 2u); EXPECT_TRUE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(index, 3u); EXPECT_EQ(cache.IndexRange(), 4u); EXPECT_TRUE(cache.Insert(&kColors[4 * 4], &index)); EXPECT_TRUE(cache.Contains(&kColors[4 * 4], &index)); EXPECT_EQ(index, 0u); EXPECT_TRUE(cache.Contains(&kColors[4 * 1], &index)); EXPECT_EQ(index, 1u); EXPECT_TRUE(cache.Contains(&kColors[4 * 3], &index)); EXPECT_EQ(index, 2u); EXPECT_TRUE(cache.Contains(&kColors[4 * 2], &index)); EXPECT_EQ(index, 3u); EXPECT_FALSE(cache.Contains(&kColors[4 * 0], &index)); EXPECT_EQ(cache.IndexRange(), 4u); } TEST(FifoColorCache, Random) { for (uint32_t bits = 1; bits < 5; ++bits) { WP2::UniformIntDistribution random; FifoColorCache cache; ASSERT_TRUE(cache.Allocate(bits)); const uint32_t num_colors = random.Get(1 << (bits - 1), 1 << (bits + 1)); TestColorCacheAPI(num_colors, &cache, &random); } } TEST(HybridColorCache, Random) { FifoColorCache fifo_cache; const uint32_t fifo_bits = 2; ASSERT_TRUE(fifo_cache.Allocate(fifo_bits)); HashColorCache hash_cache; const uint32_t hash_bits = 8; ASSERT_TRUE(hash_cache.Allocate(hash_bits)); const uint32_t bits = fifo_bits + hash_bits; HybridColorCache hybrid_cache; hybrid_cache.Init(&fifo_cache, &hash_cache); WP2::UniformIntDistribution random; const uint32_t num_colors = random.Get(1 << (bits - 1), 1 << (bits + 1)); TestColorCacheAPI(num_colors, &hybrid_cache, &random); } TEST(MoveToFrontCache, Simple) { MoveToFrontCache cache; ASSERT_WP2_OK(cache.Init(/*enabled=*/true, /*num_colors=*/4)); EXPECT_EQ(cache.GetIndex(0), 0); EXPECT_EQ(cache.GetIndex(1), 1); EXPECT_EQ(cache.GetIndex(2), 2); EXPECT_EQ(cache.GetIndex(3), 3); EXPECT_EQ(cache.GetColor(0), 0); EXPECT_EQ(cache.GetColor(1), 1); EXPECT_EQ(cache.GetColor(2), 2); EXPECT_EQ(cache.GetColor(3), 3); cache.MoveToFront(2); EXPECT_EQ(cache.GetIndex(2), 0); EXPECT_EQ(cache.GetIndex(0), 1); EXPECT_EQ(cache.GetIndex(1), 2); EXPECT_EQ(cache.GetIndex(3), 3); EXPECT_EQ(cache.GetColor(0), 2); EXPECT_EQ(cache.GetColor(1), 0); EXPECT_EQ(cache.GetColor(2), 1); EXPECT_EQ(cache.GetColor(3), 3); for (uint32_t i = 0; i < 2; ++i) { cache.MoveToFront(3); EXPECT_EQ(cache.GetIndex(3), 0); EXPECT_EQ(cache.GetIndex(2), 1); EXPECT_EQ(cache.GetIndex(0), 2); EXPECT_EQ(cache.GetIndex(1), 3); EXPECT_EQ(cache.GetColor(0), 3); EXPECT_EQ(cache.GetColor(1), 2); EXPECT_EQ(cache.GetColor(2), 0); EXPECT_EQ(cache.GetColor(3), 1); } cache.MoveToFront(0); EXPECT_EQ(cache.GetIndex(0), 0); EXPECT_EQ(cache.GetIndex(3), 1); EXPECT_EQ(cache.GetIndex(2), 2); EXPECT_EQ(cache.GetIndex(1), 3); EXPECT_EQ(cache.GetColor(0), 0); EXPECT_EQ(cache.GetColor(1), 3); EXPECT_EQ(cache.GetColor(2), 2); EXPECT_EQ(cache.GetColor(3), 1); } TEST(MoveToFrontCache, RandomTest) { constexpr uint32_t kNumColors = 100; for (bool enabled : {true, false}) { std::vector<uint16_t> colors(kNumColors); std::iota(colors.begin(), colors.end(), 0); WP2::Shuffle(colors.begin(), colors.end(), /*seed=*/0); MoveToFrontCache cache; ASSERT_WP2_OK(cache.Init(enabled, kNumColors)); for (uint32_t i = 0; i < kNumColors; ++i) { cache.MoveToFront(colors[kNumColors - i - 1]); } for (uint32_t i = 0; i < kNumColors; ++i) { if (enabled) { EXPECT_EQ(cache.GetIndex(colors[i]), i); EXPECT_EQ(cache.GetColor(i), colors[i]); } else { EXPECT_EQ(cache.GetIndex(i), i); EXPECT_EQ(cache.GetColor(i), i); } } } } } // namespace } // namespace WP2L
33.349112
80
0.669269
[ "vector" ]
96cd90c92aede21e4bf0f44c6bb444ca7aaf8c01
4,008
cpp
C++
extrude.cpp
arvidsson/extrude
f5320a2b3cf38a6c18a30a561e1ce0ca56876e3e
[ "MIT" ]
4
2016-03-28T00:33:58.000Z
2019-04-01T15:15:23.000Z
extrude.cpp
arvidsson/extrude
f5320a2b3cf38a6c18a30a561e1ce0ca56876e3e
[ "MIT" ]
null
null
null
extrude.cpp
arvidsson/extrude
f5320a2b3cf38a6c18a30a561e1ce0ca56876e3e
[ "MIT" ]
null
null
null
#include <allegro5/allegro.h> #include <allegro5/allegro_image.h> #include <vector> #include <string> #include <memory> #include <iostream> using namespace std; void extrude(shared_ptr<ALLEGRO_BITMAP> bmp, int pad) { al_set_target_bitmap(bmp.get()); int w = al_get_bitmap_width(bmp.get()); int h = al_get_bitmap_height(bmp.get()); int x = 0, y = 0; for (x = 0; x < w; x++) { auto color = al_get_pixel(bmp.get(), x, y + 1); al_put_pixel(x, y, color); } y = h - 1; for (x = 0; x < w; x++) { auto color = al_get_pixel(bmp.get(), x, y - 1); al_put_pixel(x, y, color); } x = 0; for (y = 0; y < h; y++) { auto color = al_get_pixel(bmp.get(), x + 1, y); al_put_pixel(x, y, color); } x = w - 1; for (y = 0; y < h; y++) { auto color = al_get_pixel(bmp.get(), x - 1, y); al_put_pixel(x, y, color); } } int main(int argc, char *argv[]) { al_init(); al_init_image_addon(); vector<string> args(argv + 1, argv + argc); if (args.size() < 2) { cout << "Usage: extrude <input> [<options>] <output>" << endl << endl << "Options:" << endl << " size\t Tile size in pixels, default size=32" << endl << " pad\t How much to extrude the tiles in pixels, default pad=1" << endl << " space\t Empty space between tiles after extrusions in pixels, default space=0" << endl; return 0; } string input = args[0]; string output = args[args.size() - 1]; int size = 32; int pad = 1; int space = 0; string sizeopt("size="); string padopt("pad="); string spaceopt("space="); for (unsigned int i = 1; i < args.size() - 1; i++) { if (!args[i].compare(0, sizeopt.size(), sizeopt)) { size = atoi(args[i].substr(sizeopt.size()).c_str()); } else if (!args[i].compare(0, padopt.size(), padopt)) { pad = atoi(args[i].substr(padopt.size()).c_str()); } else if (!args[i].compare(0, spaceopt.size(), spaceopt)) { space = atoi(args[i].substr(spaceopt.size()).c_str()); } } if (!al_filename_exists(input.c_str())) { cout << "Error: " << input << " doesn't exist!" << endl; return 0; } shared_ptr<ALLEGRO_BITMAP> src(al_load_bitmap(input.c_str()), al_destroy_bitmap); if (!src) { cout << "Error: " << input << " couldn't be loaded!" << endl; return 0; } int src_w = al_get_bitmap_width(src.get()); int src_h = al_get_bitmap_height(src.get()); if (src_w % size != 0 || src_h % size != 0) { cout << "Error: " << input << " not evenly divisible by " << size << endl; return 0; } int tiles_x = src_w / size; int tiles_y = src_h / size; int dst_w = tiles_x * (size + pad * 2 + space); int dst_h = tiles_y * (size + pad * 2 + space); shared_ptr<ALLEGRO_BITMAP> dst(al_create_bitmap(dst_w, dst_h), al_destroy_bitmap); al_set_target_bitmap(dst.get()); al_clear_to_color(al_map_rgba(0, 0, 0, 0)); for (int i = 0; i < tiles_x; i++) { for (int j = 0; j < tiles_y; j++) { int x = i * size; int y = j * size; shared_ptr<ALLEGRO_BITMAP> tile(al_create_sub_bitmap(src.get(), x, y, size, size), al_destroy_bitmap); shared_ptr<ALLEGRO_BITMAP> extrudedTile(al_create_bitmap(size + pad * 2, size + pad * 2), al_destroy_bitmap); al_set_target_bitmap(extrudedTile.get()); al_clear_to_color(al_map_rgba(0, 0, 0, 0)); al_draw_bitmap(tile.get(), pad, pad, 0); extrude(extrudedTile, pad); int dx = i * (size + pad * 2 + space) + (space != 0 ? 1 : 0); int dy = j * (size + pad * 2 + space) + (space != 0 ? 1 : 0); al_set_target_bitmap(dst.get()); al_draw_bitmap(extrudedTile.get(), dx, dy, 0); } } al_save_bitmap(output.c_str(), dst.get()); return 0; }
32.585366
121
0.544411
[ "vector" ]
96d18a9e962a4cde902c25cd1bc278ea935f00ee
4,823
cpp
C++
polybench/covariance.cpp
sbalint98/sycl-bench
49c35274e6bd88936b85da0b8a409f2542fa430a
[ "BSD-3-Clause" ]
24
2019-11-27T08:09:15.000Z
2021-09-30T13:26:13.000Z
polybench/covariance.cpp
sbalint98/sycl-bench
49c35274e6bd88936b85da0b8a409f2542fa430a
[ "BSD-3-Clause" ]
24
2020-01-16T10:25:06.000Z
2022-01-18T04:27:53.000Z
polybench/covariance.cpp
sbalint98/sycl-bench
49c35274e6bd88936b85da0b8a409f2542fa430a
[ "BSD-3-Clause" ]
11
2020-01-16T09:23:21.000Z
2022-02-23T03:20:30.000Z
#include <string> #include <vector> #include <cmath> #include <cstdlib> #include <CL/sycl.hpp> #include "common.h" #include "polybenchUtilFuncts.h" using DATA_TYPE = float; class CovarianceMean; class CovarianceReduce; class CovarianceCovar; constexpr DATA_TYPE float_n = 3214212.01; void init_arrays(DATA_TYPE* data, size_t size) { const auto M = size; const auto N = size; for(size_t i = 0; i < M; i++) { for(size_t j = 0; j < N; j++) { data[i * (N + 1) + j] = ((DATA_TYPE)i * j) / M; } } } void covariance(DATA_TYPE* data, DATA_TYPE* symmat, DATA_TYPE* mean, size_t size) { const auto M = size; const auto N = size; // Determine mean of column vectors of input data matrix for(size_t j = 1; j <= M; j++) { mean[j] = 0.0; for(size_t i = 1; i <= N; i++) { mean[j] += data[i * (M + 1) + j]; } mean[j] /= float_n; } // Center the column vectors. for(size_t i = 1; i <= N; i++) { for(size_t j = 1; j <= M; j++) { data[i * (M + 1) + j] -= mean[j]; } } // Calculate the m * m covariance matrix. for(size_t j1 = 1; j1 <= M; j1++) { for(size_t j2 = j1; j2 <= M; j2++) { symmat[j1 * (M + 1) + j2] = 0.0; for(size_t i = 1; i <= N; i++) { symmat[j1 * (M + 1) + j2] += data[i * (M + 1) + j1] * data[i * (M + 1) + j2]; } symmat[j2 * (M + 1) + j1] = symmat[j1 * (M + 1) + j2]; } } } class Polybench_Covariance { public: Polybench_Covariance(const BenchmarkArgs& args) : args(args), size(args.problem_size) {} void setup() { data.resize((size + 1) * (size + 1)); symmat.resize((size + 1) * (size + 1)); mean.resize(size + 1); init_arrays(data.data(), size); data_buffer.initialize(args.device_queue, data.data(), cl::sycl::range<2>(size + 1, size + 1)); symmat_buffer.initialize(args.device_queue, symmat.data(), cl::sycl::range<2>(size + 1, size + 1)); mean_buffer.initialize(args.device_queue, mean.data(), cl::sycl::range<1>(size + 1)); } void run(std::vector<cl::sycl::event>& events) { using namespace cl::sycl; events.push_back(args.device_queue.submit([&](handler& cgh) { auto data = data_buffer.get_access<access::mode::read>(cgh); auto mean = mean_buffer.get_access<access::mode::discard_write>(cgh); cgh.parallel_for<CovarianceMean>(range<1>(size), id<1>(1), [=, N_ = size](item<1> item) { const auto j = item[0]; mean[item] = 0; for(size_t i = 1; i <= N_; i++) { mean[item] += data[{i, j}]; } mean[item] /= float_n; }); })); events.push_back(args.device_queue.submit([&](handler& cgh) { auto mean = mean_buffer.get_access<access::mode::read>(cgh); auto data = data_buffer.get_access<access::mode::read_write>(cgh); cgh.parallel_for<CovarianceReduce>(range<2>(size, size), id<2>(1, 1), [=](item<2> item) { const auto j = item[1]; data[item] -= mean[j]; }); })); events.push_back(args.device_queue.submit([&](handler& cgh) { auto data = data_buffer.get_access<access::mode::read>(cgh); auto symmat = symmat_buffer.get_access<access::mode::discard_write>(cgh); auto symmat2 = symmat_buffer.get_access<access::mode::discard_write>(cgh); cgh.parallel_for<CovarianceCovar>(range<1>(size), id<1>(1), [=, M_ = size, N_ = size](item<1> item) { const auto j1 = item[0]; symmat[{j1, j1}] = 1.0; for(size_t j2 = j1; j2 <= M_; j2++) { symmat[{j1, j2}] = 0.0; for(size_t i = 1; i <= N_; i++) { symmat[{j1, j2}] += data[{i, j1}] * data[{i, j2}]; } symmat2[{j2, j1}] = symmat[{j1, j2}]; } }); })); } bool verify(VerificationSetting&) { constexpr auto ERROR_THRESHOLD = 0.05; std::vector<DATA_TYPE> data_cpu((size + 1) * (size + 1)); std::vector<DATA_TYPE> symmat_cpu((size + 1) * (size + 1)); std::vector<DATA_TYPE> mean_cpu(size + 1); // Trigger writeback symmat_buffer.reset(); init_arrays(data_cpu.data(), size); covariance(data_cpu.data(), symmat_cpu.data(), mean_cpu.data(), size); for(size_t i = 1; i < size + 1; i++) { for(size_t j = 1; j < size + 1; j++) { const auto diff = percentDiff(symmat_cpu[i * (size + 1) + j], symmat[i * (size + 1) + j]); if(diff > ERROR_THRESHOLD) return false; } } return true; } static std::string getBenchmarkName() { return "Polybench_Covariance"; } private: BenchmarkArgs args; const size_t size; std::vector<DATA_TYPE> data; std::vector<DATA_TYPE> symmat; std::vector<DATA_TYPE> mean; PrefetchedBuffer<DATA_TYPE, 2> data_buffer; PrefetchedBuffer<DATA_TYPE, 2> symmat_buffer; PrefetchedBuffer<DATA_TYPE, 1> mean_buffer; }; int main(int argc, char** argv) { BenchmarkApp app(argc, argv); app.run<Polybench_Covariance>(); return 0; }
27.878613
105
0.591748
[ "vector" ]
96e4ef8b461a2ecb6be8790dba239f6e64545df3
40,648
cpp
C++
src/game/server/swarm/asw_alien_shover.cpp
BenLubar/SwarmDirector2
78685d03eaa0d35e87c638ffa78f46f3aa8379a6
[ "Apache-2.0" ]
3
2015-05-17T02:33:00.000Z
2016-10-08T07:02:40.000Z
src/game/server/swarm/asw_alien_shover.cpp
BenLubar/SwarmDirector2
78685d03eaa0d35e87c638ffa78f46f3aa8379a6
[ "Apache-2.0" ]
null
null
null
src/game/server/swarm/asw_alien_shover.cpp
BenLubar/SwarmDirector2
78685d03eaa0d35e87c638ffa78f46f3aa8379a6
[ "Apache-2.0" ]
1
2019-10-16T15:21:56.000Z
2019-10-16T15:21:56.000Z
// Our Swarm Drone - the basic angry fighting alien #include "cbase.h" #include "asw_alien_shover.h" #include "ai_hint.h" #include "ai_memory.h" #include "ai_moveprobe.h" #include "npcevent.h" #include "IEffects.h" #include "ndebugoverlay.h" #include "soundent.h" #include "soundenvelope.h" #include "ai_squad.h" #include "ai_network.h" #include "ai_pathfinder.h" #include "ai_navigator.h" #include "ai_senses.h" #include "ai_blended_movement.h" #include "physics_prop_ragdoll.h" #include "iservervehicle.h" #include "player_pickup.h" #include "props.h" #include "antlion_dust.h" #include "decals.h" #include "prop_combine_ball.h" #include "eventqueue.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" #define ALIEN_SHOVER_MAX_OBJECTS 128 #define ALIEN_SHOVER_MIN_OBJECT_MASS 8 #define ALIEN_SHOVER_OBJECTFINDING_FOV 0.7 // stats for shove attack #define ALIEN_SHOVER_MELEE1_RANGE 156.0f #define ALIEN_SHOVER_MELEE1_CONE 0.7f #define ALIEN_SWAT_DELAY 5.0f #define SHOVER_PHYSICS_SEARCH_DEPTH 100 #define SHOVER_PLAYER_MAX_SWAT_DIST 1000 #define SHOVER_FARTHEST_PHYSICS_OBJECT 40.0*12.0 #define SHOVER_PHYSOBJ_SWATDIST 100 ConVar asw_debug_aliens("asw_debug_aliens", "0", FCVAR_CHEAT); ConVar asw_alien_shover_speed("asw_alien_shover_speed", "50", FCVAR_CHEAT, "Speed of a 75kg object thrown by an alien"); Activity ACT_ALIEN_SHOVER_SHOVE_PHYSOBJECT; Activity ACT_ALIEN_SHOVER_ROAR; // Anim events int AE_ALIEN_SHOVER_SHOVE_PHYSOBJECT; int AE_ALIEN_SHOVER_SHOVE; int AE_ALIEN_SHOVER_ROAR; CASW_Alien_Shover::CASW_Alien_Shover( void )// : CASW_Alien() { } LINK_ENTITY_TO_CLASS( asw_alien_shover, CASW_Alien_Shover ); BEGIN_DATADESC( CASW_Alien_Shover ) DEFINE_FIELD( m_hShoveTarget, FIELD_EHANDLE ), DEFINE_FIELD( m_hOldTarget, FIELD_EHANDLE ), DEFINE_FIELD( m_hLastFailedPhysicsTarget, FIELD_EHANDLE ), DEFINE_FIELD( m_hPhysicsTarget, FIELD_EHANDLE ), DEFINE_FIELD( m_vecPhysicsTargetStartPos, FIELD_POSITION_VECTOR ), DEFINE_FIELD( m_vecPhysicsHitPosition, FIELD_POSITION_VECTOR ), DEFINE_FIELD( m_flPhysicsCheckTime, FIELD_TIME ), DEFINE_FIELD( m_flNextSwat, FIELD_TIME ), DEFINE_FIELD( m_hObstructor, FIELD_EHANDLE ), DEFINE_FIELD( m_bCanRoar, FIELD_BOOLEAN ), DEFINE_FIELD( m_flNextRoarTime, FIELD_TIME ), DEFINE_INPUTFUNC( FIELD_STRING, "SetShoveTarget", InputSetShoveTarget ), END_DATADESC() //============================================================================================== // ALIEN SHOVER PHYSICS DAMAGE TABLE //============================================================================================== static impactentry_t alienShoverLinearTable[] = { { 100*100, 10 }, { 250*250, 25 }, { 350*350, 50 }, { 500*500, 75 }, { 1000*1000,100 }, }; static impactentry_t alienShoverAngularTable[] = { { 50* 50, 10 }, { 100*100, 25 }, { 150*150, 50 }, { 200*200, 75 }, }; impactdamagetable_t gAlienShoverImpactDamageTable = { alienShoverLinearTable, alienShoverAngularTable, ARRAYSIZE(alienShoverLinearTable), ARRAYSIZE(alienShoverAngularTable), 200*200,// minimum linear speed squared 180*180,// minimum angular speed squared (360 deg/s to cause spin/slice damage) 15, // can't take damage from anything under 15kg 10, // anything less than 10kg is "small" 5, // never take more than 1 pt of damage from anything under 15kg 128*128,// <15kg objects must go faster than 36 in/s to do damage 45, // large mass in kg 2, // large mass scale (anything over 500kg does 4X as much energy to read from damage table) 1, // large mass falling scale 0, // my min velocity }; //----------------------------------------------------------------------------- // Purpose: // Output : const impactdamagetable_t //----------------------------------------------------------------------------- const impactdamagetable_t &CASW_Alien_Shover::GetPhysicsImpactDamageTable( void ) { return gAlienShoverImpactDamageTable; } void CASW_Alien_Shover::Spawn() { m_flPhysicsCheckTime = 0; m_flNextSwat = gpGlobals->curtime; m_hShoveTarget = NULL; m_hPhysicsTarget = NULL; m_hLastFailedPhysicsTarget = NULL; m_bCanRoar = true; m_flNextRoarTime = 0; PrecacheScriptSound("ASW_Drone.Shove"); BaseClass::Spawn(); } void CASW_Alien_Shover::Activate( void ) { BaseClass::Activate(); // Find all nearby physics objects and add them to the list of objects we will sense CBaseEntity *pObject = NULL; while ( ( pObject = gEntList.FindEntityInSphere( pObject, WorldSpaceCenter(), 2500 ) ) != NULL ) { // Can't throw around debris if ( pObject->GetCollisionGroup() == COLLISION_GROUP_DEBRIS ) continue; // We can only throw a few types of things if ( !FClassnameIs( pObject, "prop_physics" ) && !FClassnameIs( pObject, "prop_physics_override" ) && !FClassnameIs( pObject, "func_physbox" ) ) continue; // Ensure it's mass is within range IPhysicsObject *pPhysObj = pObject->VPhysicsGetObject(); if( ( pPhysObj == NULL ) || ( pPhysObj->GetMass() > GetMaxShoverObjectMass() ) || ( pPhysObj->GetMass() < ALIEN_SHOVER_MIN_OBJECT_MASS ) ) continue; // Tell the AI sensing list that we want to consider this g_AI_SensedObjectsManager.AddEntity( pObject ); if ( asw_debug_aliens.GetInt() == 5 ) { Msg("Alien Shover: Added prop with model '%s' to sense list.\n", STRING(pObject->GetModelName()) ); pObject->m_debugOverlays |= OVERLAY_BBOX_BIT; } } } //----------------------------------------------------------------------------- // Purpose: Our enemy is unreachable. Select a schedule. //----------------------------------------------------------------------------- int CASW_Alien_Shover::SelectUnreachableSchedule( void ) { // Look for a physics objects nearby m_hLastFailedPhysicsTarget = NULL; UpdatePhysicsTarget( true ); if ( HasCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ) ) { //Msg("Alien shoving phys object from selectunreachableschedule\n"); return SCHED_ALIEN_SHOVER_PHYSICS_ATTACK; } // Otherwise, roar at the player if ( m_bCanRoar && HasCondition(COND_SEE_ENEMY) && m_flNextRoarTime < gpGlobals->curtime ) { m_flNextRoarTime = gpGlobals->curtime + RandomFloat( 20,40 ); return SCHED_ALIEN_SHOVER_ROAR; } return -1; } int CASW_Alien_Shover::SelectCombatSchedule( void ) { //Physics target if ( HasCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ) ) { //Msg("Alien shoving physics object from selectcombatschedule\n"); return SCHED_ALIEN_SHOVER_PHYSICS_ATTACK; } // Attack if we can if ( HasCondition(COND_CAN_MELEE_ATTACK1) ) return SCHED_MELEE_ATTACK1; // See if we can bash what's in our way, or roar if ( HasCondition( COND_ENEMY_UNREACHABLE ) ) { int iUnreach = SelectUnreachableSchedule(); if (iUnreach != -1) return iUnreach; } return BaseClass::SelectSchedule(); } int CASW_Alien_Shover::SelectSchedule( void ) { // Debug physics object finding if ( 0 ) //asw_debug_aliens.GetInt() == 3 ) { m_flPhysicsCheckTime = 0; UpdatePhysicsTarget( false ); return SCHED_IDLE_STAND; } // See if we need to clear a path to our enemy if ( HasCondition( COND_ENEMY_OCCLUDED ) || HasCondition( COND_ENEMY_UNREACHABLE ) ) { CBaseEntity *pBlocker = GetEnemyOccluder(); if ( ( pBlocker != NULL ) && ( FClassnameIs( pBlocker, "prop_physics" ) || FClassnameIs( pBlocker, "func_physbox" ) ) ) { m_hPhysicsTarget = pBlocker; //Msg("Alien shoving physics object from selectschedule as enemy is occluded\n"); return SCHED_ALIEN_SHOVER_PHYSICS_ATTACK; } } //Only do these in combat states if ( m_NPCState == NPC_STATE_COMBAT && GetEnemy() ) return SelectCombatSchedule(); return BaseClass::SelectSchedule(); } void CASW_Alien_Shover::Shove( void ) { if ( GetNextAttack() > gpGlobals->curtime ) return; CBaseEntity *pHurt = NULL; CBaseEntity *pTarget; pTarget = ( m_hShoveTarget == NULL ) ? GetEnemy() : m_hShoveTarget.Get(); if ( pTarget == NULL ) { m_hShoveTarget = NULL; return; } //Always damage bullseyes if we're scripted to hit them if ( pTarget->Classify() == CLASS_BULLSEYE ) { pTarget->TakeDamage( CTakeDamageInfo( this, this, 1.0f, DMG_CRUSH ) ); m_hShoveTarget = NULL; return; } //float damage = ( pTarget->IsPlayer() ) ? sk_antlionguard_dmg_shove.GetFloat() : 250; float damage = 250.0f; // If the target's still inside the shove cone, ensure we hit him Vector vecForward, vecEnd; AngleVectors( GetAbsAngles(), &vecForward ); float flDistSqr = ( pTarget->WorldSpaceCenter() - WorldSpaceCenter() ).LengthSqr(); Vector2D v2LOS = ( pTarget->WorldSpaceCenter() - WorldSpaceCenter() ).AsVector2D(); Vector2DNormalize(v2LOS); float flDot = DotProduct2D (v2LOS, vecForward.AsVector2D() ); if ( flDistSqr < (ALIEN_SHOVER_MELEE1_RANGE*ALIEN_SHOVER_MELEE1_RANGE) && flDot >= ALIEN_SHOVER_MELEE1_CONE ) { vecEnd = pTarget->WorldSpaceCenter(); } else { vecEnd = WorldSpaceCenter() + ( BodyDirection3D() * ALIEN_SHOVER_MELEE1_RANGE ); } // Use the melee trace to ensure we hit everything there trace_t tr; CTakeDamageInfo dmgInfo( this, this, damage, DMG_SLASH ); CTraceFilterMelee traceFilter( this, COLLISION_GROUP_NONE, &dmgInfo, 1.0, true ); Ray_t ray; ray.Init( WorldSpaceCenter(), vecEnd, Vector(-16,-16,-16), Vector(16,16,16) ); enginetrace->TraceRay( ray, MASK_SHOT_HULL, &traceFilter, &tr ); pHurt = tr.m_pEnt; // Knock things around //ImpactShock( tr.endpos, 100.0f, 250.0f ); if ( pHurt ) { Vector traceDir = ( tr.endpos - tr.startpos ); VectorNormalize( traceDir ); // Generate enough force to make a 75kg guy move away at 600 in/sec Vector vecForce = traceDir * ImpulseScale( 75, asw_alien_shover_speed.GetFloat() ); CTakeDamageInfo info( this, this, vecForce, tr.endpos, damage, DMG_CLUB ); pHurt->TakeDamage( info ); m_hShoveTarget = NULL; EmitSound( "ASW_Drone.Shove" ); // If the player, throw him around if ( pHurt->IsPlayer() ) { //Punch the view pHurt->ViewPunch( QAngle(20,0,-20) ); //Shake the screen UTIL_ScreenShake( pHurt->GetAbsOrigin(), 100.0, 1.5, 1.0, 2, SHAKE_START ); //Red damage indicator color32 red = {128,0,0,128}; UTIL_ScreenFade( pHurt, red, 1.0f, 0.1f, FFADE_IN ); Vector forward, up; AngleVectors( GetLocalAngles(), &forward, NULL, &up ); pHurt->ApplyAbsVelocityImpulse( forward * 400 + up * 150 ); } else { CBaseCombatCharacter *pVictim = ToBaseCombatCharacter( pHurt ); if ( pVictim ) { pVictim->ApplyAbsVelocityImpulse( BodyDirection2D() * 400 + Vector( 0, 0, 250 ) ); } m_hShoveTarget = NULL; } } } void CASW_Alien_Shover::HandleAnimEvent( animevent_t *pEvent ) { int nEvent = pEvent->Event(); if ( nEvent == AE_ALIEN_SHOVER_SHOVE_PHYSOBJECT ) { if ( m_hPhysicsTarget == NULL ) { // Disrupt other objects near us anyway ImpactShock( WorldSpaceCenter(), 150, 250.0f ); return; } //Setup the throw velocity IPhysicsObject *physObj = m_hPhysicsTarget->VPhysicsGetObject(); Vector targetDir = ( GetEnemy()->GetAbsOrigin() - m_hPhysicsTarget->WorldSpaceCenter() ); float targetDist = VectorNormalize( targetDir ); // Must still be close enough to our target if ( UTIL_DistApprox( WorldSpaceCenter(), m_hPhysicsTarget->WorldSpaceCenter() ) > 300 ) { m_hPhysicsTarget = NULL; return; } if ( targetDist < 512 ) targetDist = 512; if ( targetDist > 1024 ) targetDist = 1024; targetDir *= targetDist * 3 * physObj->GetMass(); //FIXME: Scale by skill targetDir[2] += physObj->GetMass() * 350.0f; //Display dust Vector vecRandom = RandomVector( -1, 1); VectorNormalize( vecRandom ); g_pEffects->Dust( m_hPhysicsTarget->WorldSpaceCenter(), vecRandom, 64.0f, 32 ); // If it's being held by the player, break that bond Pickup_ForcePlayerToDropThisObject( m_hPhysicsTarget ); EmitSound( "ASW_Drone.Shove" ); //Send it flying AngularImpulse angVel( random->RandomFloat(-180, 180), 100, random->RandomFloat(-360, 360) ); physObj->ApplyForceCenter( targetDir ); physObj->AddVelocity( NULL, &angVel ); //Clear the state information, we're done ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID ); // Disrupt other objects near it ImpactShock( m_hPhysicsTarget->WorldSpaceCenter(), 150, 250.0f, m_hPhysicsTarget ); m_hPhysicsTarget = NULL; m_flPhysicsCheckTime = gpGlobals->curtime + ALIEN_SWAT_DELAY; return; } if ( nEvent == AE_ALIEN_SHOVER_SHOVE ) { EmitSound("NPC_AntlionGuard.StepLight", pEvent->eventtime ); Shove(); return; } if ( nEvent == AE_ALIEN_SHOVER_ROAR ) { EmitSound( "NPC_AntlionGuard.Roar" ); return; } BaseClass::HandleAnimEvent( pEvent ); } void CASW_Alien_Shover::StartTask( const Task_t *pTask ) { switch ( pTask->iTask ) { case TASK_ALIEN_SHOVER_SHOVE_PHYSOBJECT: { if ( ( m_hPhysicsTarget == NULL ) || ( GetEnemy() == NULL ) ) { TaskFail( "Tried to shove a NULL physics target!\n" ); break; } //Get the direction and distance to our thrown object Vector dirToTarget = ( m_hPhysicsTarget->WorldSpaceCenter() - WorldSpaceCenter() ); float distToTarget = VectorNormalize( dirToTarget ); dirToTarget.z = 0; //Validate it's still close enough to shove //FIXME: Real numbers if ( distToTarget > 256.0f ) { m_hLastFailedPhysicsTarget = NULL; m_hPhysicsTarget = NULL; TaskFail( "Shove target moved\n" ); break; } //Validate its offset from our facing float targetYaw = UTIL_VecToYaw( dirToTarget ); float offset = UTIL_AngleDiff( targetYaw, UTIL_AngleMod( GetLocalAngles().y ) ); if ( fabs( offset ) > 55 ) { m_hLastFailedPhysicsTarget = NULL; m_hPhysicsTarget = NULL; TaskFail( "Shove target off-center\n" ); break; } //Blend properly //SetPoseParameter( "throw", offset ); RemoveAllGestures(); //Start playing the animation SetActivity( ACT_ALIEN_SHOVER_SHOVE_PHYSOBJECT ); } break; case TASK_ALIEN_SHOVER_FIND_PHYSOBJECT: { // Force the antlion guard to find a physobject m_flPhysicsCheckTime = 0; UpdatePhysicsTarget( true, 1024 ); if ( m_hPhysicsTarget ) { TaskComplete(); } else { TaskFail( "Failed to find a physobject.\n" ); } } break; case TASK_ALIEN_SHOVER_GET_PATH_TO_PHYSOBJECT: { Vector vecGoalPos; Vector vecDir; if (!m_hPhysicsTarget.IsValid()) { AI_NavGoal_t goal( GetAbsOrigin() ); GetNavigator()->SetGoal(goal); TaskComplete(); break; } vecDir = GetLocalOrigin() - m_hPhysicsTarget->GetLocalOrigin(); VectorNormalize(vecDir); vecDir.z = 0; AI_NavGoal_t goal( m_hPhysicsTarget->WorldSpaceCenter() ); goal.pTarget = m_hPhysicsTarget; GetNavigator()->SetGoal( goal ); if ( asw_debug_aliens.GetInt() == 1 ) { NDebugOverlay::Cross3D( vecGoalPos, Vector(8,8,8), -Vector(8,8,8), 0, 255, 0, true, 2.0f ); NDebugOverlay::Line( vecGoalPos, m_hPhysicsTarget->WorldSpaceCenter(), 0, 255, 0, true, 2.0f ); NDebugOverlay::Line( m_hPhysicsTarget->WorldSpaceCenter(), GetEnemy()->WorldSpaceCenter(), 0, 255, 0, true, 2.0f ); } TaskComplete(); /* if ( ( m_hPhysicsTarget == NULL ) || ( GetEnemy() == NULL ) ) { TaskFail( "Tried to find a path to NULL physics target!\n" ); break; } Vector vecGoalPos; Vector vecDir; vecDir = GetLocalOrigin() - m_hPhysicsTarget->GetLocalOrigin(); VectorNormalize(vecDir); vecDir.z = 0; AI_NavGoal_t goal( m_hPhysicsTarget->WorldSpaceCenter() ); goal.pTarget = m_hPhysicsTarget; //GetNavigator()->SetGoal( goal ); //TaskComplete(); //Vector vecGoalPos = m_vecPhysicsHitPosition; //AI_NavGoal_t goal( GOALTYPE_LOCATION, vecGoalPos, ACT_RUN ); if ( GetNavigator()->SetGoal( goal ) ) { if ( asw_debug_aliens.GetInt() == 1 ) { NDebugOverlay::Cross3D( vecGoalPos, Vector(8,8,8), -Vector(8,8,8), 0, 255, 0, true, 2.0f ); NDebugOverlay::Line( vecGoalPos, m_hPhysicsTarget->WorldSpaceCenter(), 0, 255, 0, true, 2.0f ); NDebugOverlay::Line( m_hPhysicsTarget->WorldSpaceCenter(), GetEnemy()->WorldSpaceCenter(), 0, 255, 0, true, 2.0f ); } // Face the enemy GetNavigator()->SetArrivalDirection( GetEnemy() ); TaskComplete(); } else { if ( asw_debug_aliens.GetInt() == 1 ) { NDebugOverlay::Cross3D( vecGoalPos, Vector(8,8,8), -Vector(8,8,8), 255, 0, 0, true, 2.0f ); NDebugOverlay::Line( vecGoalPos, m_hPhysicsTarget->WorldSpaceCenter(), 255, 0, 0, true, 2.0f ); NDebugOverlay::Line( m_hPhysicsTarget->WorldSpaceCenter(), GetEnemy()->WorldSpaceCenter(), 255, 0, 0, true, 2.0f ); } m_hLastFailedPhysicsTarget = m_hPhysicsTarget; m_hPhysicsTarget = NULL; TaskFail( "Unable to navigate to physics attack target!\n" ); break; } */ } break; case TASK_ALIEN_SHOVER_OPPORTUNITY_THROW: { // If we've got some live antlions, look for a physics object to throw if ( RandomFloat(0,1) > 0.3 ) { m_hLastFailedPhysicsTarget = NULL; UpdatePhysicsTarget( true ); if ( HasCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ) ) { //Msg("Alien shoving from opportunity throw\n"); SetSchedule( SCHED_ALIEN_SHOVER_PHYSICS_ATTACK ); } } TaskComplete(); } break; default: BaseClass::StartTask(pTask); break; } } void CASW_Alien_Shover::RunTask( const Task_t *pTask ) { switch (pTask->iTask) { case TASK_ALIEN_SHOVER_SHOVE_PHYSOBJECT: if ( IsActivityFinished() ) { TaskComplete(); } break; default: BaseClass::RunTask(pTask); break; } } void CASW_Alien_Shover::InputSetShoveTarget( inputdata_t &inputdata ) { if ( IsAlive() == false ) return; CBaseEntity *pTarget = gEntList.FindEntityByName( NULL, inputdata.value.String(), NULL, inputdata.pActivator, inputdata.pCaller ); if ( pTarget == NULL ) { Warning( "**Alien Shover %s cannot find shove target %s\n", GetClassname(), inputdata.value.String() ); m_hShoveTarget = NULL; return; } m_hShoveTarget = pTarget; } void CASW_Alien_Shover::UpdatePhysicsTarget( bool bAllowFartherObjects, float flRadius ) { if ( GetEnemy() == NULL ) return; /*if ( m_hPhysicsTarget != NULL ) { //Check to see if it's moved too much since we first picked it up if ( UTIL_DistApprox( m_hPhysicsTarget->WorldSpaceCenter(), m_vecPhysicsTargetStartPos ) > 256.0f ) { ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); SetCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID ); } else { SetCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID ); } if ( asw_debug_aliens.GetInt() == 3 ) { NDebugOverlay::Cross3D( m_hPhysicsTarget->WorldSpaceCenter(), -Vector(32,32,32), Vector(32,32,32), 255, 255, 255, true, 0.1f ); } return; }*/ if ( m_flPhysicsCheckTime <= gpGlobals->curtime ) FindNearestPhysicsObject(GetMaxShoverObjectMass()); // max ma //m_hPhysicsTarget = FindPhysicsObjectTarget( GetEnemy(), flRadius, ALIEN_SHOVER_OBJECTFINDING_FOV, bAllowFartherObjects ); return; if ( m_hPhysicsTarget != NULL ) { SetCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); m_vecPhysicsTargetStartPos = m_hPhysicsTarget->WorldSpaceCenter(); m_hLastFailedPhysicsTarget = NULL; // We must steer around this obstacle until we've thrown it, this stops us from // shoving it out of the way while we travel there m_hPhysicsTarget->SetNavIgnore(); } m_flPhysicsCheckTime = gpGlobals->curtime + 2.0f; } //----------------------------------------------------------------------------- // Purpose: Push and sweep away small mass items //----------------------------------------------------------------------------- void CASW_Alien_Shover::SweepPhysicsDebris( void ) { CBaseEntity *pList[ALIEN_SHOVER_MAX_OBJECTS]; CBaseEntity *pObject; IPhysicsObject *pPhysObj; Vector vecDelta(128,128,8); int i; if ( asw_debug_aliens.GetInt() == 1 ) { NDebugOverlay::Box( GetAbsOrigin(), vecDelta, -vecDelta, 255, 0, 0, true, 0.1f ); } int count = UTIL_EntitiesInBox( pList, ALIEN_SHOVER_MAX_OBJECTS, GetAbsOrigin() - vecDelta, GetAbsOrigin() + vecDelta, 0 ); for( i = 0, pObject = pList[0]; i < count; i++, pObject = pList[i] ) { if ( pObject == NULL ) continue; // Don't ignore our shoving target if ( pObject == m_hPhysicsTarget ) continue; pPhysObj = pObject->VPhysicsGetObject(); if( pPhysObj == NULL || pPhysObj->GetMass() > GetMaxShoverObjectMass() ) continue; if ( FClassnameIs( pObject, "prop_physics" ) == false ) continue; pObject->SetNavIgnore(); } } void CASW_Alien_Shover::PrescheduleThink( void ) { BaseClass::PrescheduleThink(); // Don't do anything after death if ( m_NPCState == NPC_STATE_DEAD ) return; // Check our current physics target if ( m_hPhysicsTarget != NULL ) { if ( asw_debug_aliens.GetInt() == 1 ) { NDebugOverlay::Cross3D( m_hPhysicsTarget->WorldSpaceCenter(), Vector(15,15,15), -Vector(15,15,15), 0, 255, 0, true, 0.1f ); } } // Automatically update our physics target when chasing enemies if ( IsCurSchedule( SCHED_CHASE_ENEMY ) ) { UpdatePhysicsTarget( false ); } else if ( !IsCurSchedule( SCHED_ALIEN_SHOVER_PHYSICS_ATTACK ) ) { ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); m_hPhysicsTarget = NULL; } //SweepPhysicsDebris(); } //----------------------------------------------------------------------------- // Purpose: Return the point at which the alien wants to stand on to knock the physics object at the enemy //----------------------------------------------------------------------------- Vector CASW_Alien_Shover::GetPhysicsHitPosition( CBaseEntity *pObject, Vector &vecTrajectory, float &flClearDistance ) { Assert( GetEnemy() ); // Get the trajectory we want to knock the object along vecTrajectory = GetEnemy()->WorldSpaceCenter() - pObject->WorldSpaceCenter(); VectorNormalize( vecTrajectory ); vecTrajectory.z = 0; // Get the distance we want to be from the object when we hit it IPhysicsObject *pPhys = pObject->VPhysicsGetObject(); Vector extent = physcollision->CollideGetExtent( pPhys->GetCollide(), pObject->GetAbsOrigin(), pObject->GetAbsAngles(), -vecTrajectory ); flClearDistance = ( extent - pObject->WorldSpaceCenter() ).Length() + CollisionProp()->BoundingRadius(); // asw rem + 32.0f; return (pObject->WorldSpaceCenter() + ( vecTrajectory * -flClearDistance )); } // zombie style search for a phys object bool CASW_Alien_Shover::FindNearestPhysicsObject( int iMaxMass ) { CBaseEntity *pList[ SHOVER_PHYSICS_SEARCH_DEPTH ]; CBaseEntity *pNearest = NULL; float flDist; IPhysicsObject *pPhysObj; int i; Vector vecDirToEnemy; Vector vecDirToObject; if ( !GetEnemy() ) { // Can't swat, or no enemy, so no swat. m_hPhysicsTarget = NULL; return false; } vecDirToEnemy = GetEnemy()->GetAbsOrigin() - GetAbsOrigin(); float dist = VectorNormalize(vecDirToEnemy); vecDirToEnemy.z = 0; if( dist > SHOVER_PLAYER_MAX_SWAT_DIST ) { // Player is too far away. Don't bother // trying to swat anything at them until // they are closer. return false; } float flNearestDist = MIN( dist, SHOVER_FARTHEST_PHYSICS_OBJECT * 0.5 ); Vector vecDelta( flNearestDist, flNearestDist, GetHullHeight() * 2.0 ); class CShoverSwatEntitiesEnum : public CFlaggedEntitiesEnum { public: CShoverSwatEntitiesEnum( CBaseEntity **pList, int listMax, int iMaxMass ) : CFlaggedEntitiesEnum( pList, listMax, 0 ), m_iMaxMass( iMaxMass ) { } virtual IterationRetval_t EnumElement( IHandleEntity *pHandleEntity ) { CBaseEntity *pEntity = gEntList.GetBaseEntity( pHandleEntity->GetRefEHandle() ); if ( pEntity && pEntity->VPhysicsGetObject() && pEntity->VPhysicsGetObject()->GetMass() <= m_iMaxMass && pEntity->VPhysicsGetObject()->IsAsleep() && pEntity->VPhysicsGetObject()->IsMoveable() ) { return CFlaggedEntitiesEnum::EnumElement( pHandleEntity ); } return ITERATION_CONTINUE; } int m_iMaxMass; }; CShoverSwatEntitiesEnum swatEnum( pList, SHOVER_PHYSICS_SEARCH_DEPTH, iMaxMass ); int count = UTIL_EntitiesInBox( GetAbsOrigin() - vecDelta, GetAbsOrigin() + vecDelta, &swatEnum ); // magically know where they are Vector vecZombieKnees; CollisionProp()->NormalizedToWorldSpace( Vector( 0.5f, 0.5f, 0.25f ), &vecZombieKnees ); for( i = 0 ; i < count ; i++ ) { pPhysObj = pList[ i ]->VPhysicsGetObject(); Assert( !( !pPhysObj || pPhysObj->GetMass() > iMaxMass || !pPhysObj->IsAsleep() ) ); Vector center = pList[ i ]->WorldSpaceCenter(); flDist = UTIL_DistApprox2D( GetAbsOrigin(), center ); if( flDist >= flNearestDist ) continue; // This object is closer... but is it between the player and the zombie? vecDirToObject = pList[ i ]->WorldSpaceCenter() - GetAbsOrigin(); VectorNormalize(vecDirToObject); vecDirToObject.z = 0; if( DotProduct( vecDirToEnemy, vecDirToObject ) < 0.8 ) continue; if( flDist >= UTIL_DistApprox2D( center, GetEnemy()->GetAbsOrigin() ) ) continue; // don't swat things where the highest point is under my knees // NOTE: This is a rough test; a more exact test is going to occur below if ( (center.z + pList[i]->BoundingRadius()) < vecZombieKnees.z ) continue; // don't swat things that are over my head. if( center.z > EyePosition().z ) continue; vcollide_t *pCollide = modelinfo->GetVCollide( pList[i]->GetModelIndex() ); if (!pCollide) continue; Vector objMins, objMaxs; physcollision->CollideGetAABB( &objMins, &objMaxs, pCollide->solids[0], pList[i]->GetAbsOrigin(), pList[i]->GetAbsAngles() ); if ( objMaxs.z < vecZombieKnees.z ) continue; if ( !FVisible( pList[i] ) ) continue; // Make this the last check, since it makes a string. // Don't swat server ragdolls! if ( FClassnameIs( pList[ i ], "physics_prop_ragdoll" ) ) continue; if ( FClassnameIs( pList[ i ], "prop_ragdoll" ) ) continue; // The object must also be closer to the zombie than it is to the enemy pNearest = pList[ i ]; flNearestDist = flDist; } m_hPhysicsTarget = pNearest; if( m_hPhysicsTarget == NULL ) { return false; } else { return true; } } // antlion style search for a phys object CBaseEntity *CASW_Alien_Shover::FindPhysicsObjectTarget( CBaseEntity *pTarget, float radius, float targetCone, bool allowFartherObjects ) { CBaseEntity *pNearest = NULL; // If we're allowed to look for farther objects, find the nearest object to the guard. // Otherwise, find the nearest object to the vector to the target. float flNearestDist = -1.0; if ( allowFartherObjects ) { flNearestDist = radius; } Vector vecDirToTarget = pTarget->GetAbsOrigin() - GetAbsOrigin(); VectorNormalize( vecDirToTarget ); vecDirToTarget.z = 0; bool bDebug = asw_debug_aliens.GetInt() == 3; if ( bDebug ) { if ( m_hLastFailedPhysicsTarget ) { NDebugOverlay::Cross3D( m_hLastFailedPhysicsTarget->WorldSpaceCenter(), -Vector(32,32,32), Vector(32,32,32) , 255, 255, 0, true, 1.0f ); } } // Traipse through the sensed object list AISightIter_t iter; CBaseEntity *pObject; for ( pObject = GetSenses()->GetFirstSeenEntity( &iter, SEEN_MISC ); pObject; pObject = GetSenses()->GetNextSeenEntity( &iter ) ) { // If we couldn't shove this object last time, don't try again if ( pObject == m_hLastFailedPhysicsTarget ) continue; IPhysicsObject *pPhysObj = pObject->VPhysicsGetObject(); if ( !pPhysObj ) continue; // Ignore motion disabled props if ( !pPhysObj->IsMoveable() ) continue; // Ignore physics objects that are too low to really be noticed by the player Vector vecAbsMins, vecAbsMaxs; pObject->CollisionProp()->WorldSpaceAABB( &vecAbsMins, &vecAbsMaxs ); if ( fabs(vecAbsMaxs.z - vecAbsMins.z) < 28 ) continue; // Ignore objects moving too fast Vector velocity; pPhysObj->GetVelocity( &velocity, NULL ); if ( velocity.LengthSqr() > (16*16) ) continue; Vector center = pObject->WorldSpaceCenter(); Vector vecDirToObject = pObject->WorldSpaceCenter() - GetAbsOrigin(); VectorNormalize( vecDirToObject ); vecDirToObject.z = 0; float flDist = 0; if ( !allowFartherObjects ) { // Validate our cone of sight if ( DotProduct( vecDirToTarget, vecDirToObject ) < targetCone ) { if ( bDebug ) { NDebugOverlay::Cross3D( center, Vector(15,15,15), -Vector(15,15,15), 255, 0, 255, true, 1.0f ); } continue; } // Object must be closer than our target if ( UTIL_DistApprox2D( GetAbsOrigin(), center ) > UTIL_DistApprox2D( GetAbsOrigin(), GetEnemy()->GetAbsOrigin() ) ) { if ( bDebug ) { NDebugOverlay::Cross3D( center, Vector(15,15,15), -Vector(15,15,15), 0, 255, 255, true, 1.0f ); } continue; } // Must be closer to the line towards the target than a previously valid object flDist = DotProduct( vecDirToTarget, vecDirToObject ); if ( flDist < flNearestDist ) { if ( bDebug ) { NDebugOverlay::Cross3D( center, Vector(15,15,15), -Vector(15,15,15), 255, 0, 0, true, 1.0f ); } continue; } } else { // Must be closer than the nearest phys object flDist = UTIL_DistApprox2D( GetAbsOrigin(), center ); if ( flDist > flNearestDist ) { if ( bDebug ) { NDebugOverlay::Cross3D( center, Vector(15,15,15), -Vector(15,15,15), 255, 0, 0, true, 1.0f ); } continue; } } // Check for a clear shove path (roughly) trace_t tr; UTIL_TraceLine( pObject->WorldSpaceCenter(), GetEnemy()->WorldSpaceCenter(), MASK_SOLID_BRUSHONLY, this, COLLISION_GROUP_NONE, &tr ); // See how close to our target we got if ( ( tr.endpos - GetEnemy()->WorldSpaceCenter() ).LengthSqr() > (256*256) ) continue; // Get the position we want to be at to swing at the object float flClearDistance; Vector vecTrajectory; Vector vecHitPosition = GetPhysicsHitPosition( pObject, vecTrajectory, flClearDistance ); Vector vecObjectPosition = pObject->WorldSpaceCenter(); if ( bDebug ) { NDebugOverlay::Box( vecObjectPosition, NAI_Hull::Mins( HULL_MEDIUM ), NAI_Hull::Maxs( HULL_MEDIUM ), 255, 0, 0, true, 1.0f ); NDebugOverlay::Box( vecHitPosition, NAI_Hull::Mins( HULL_MEDIUM ), NAI_Hull::Maxs( HULL_MEDIUM ), 0, 255, 0, true, 1.0f ); } // Can we move to the spot behind the prop? UTIL_TraceHull( vecHitPosition, vecHitPosition, WorldAlignMins(), WorldAlignMaxs(), MASK_NPCSOLID, this, COLLISION_GROUP_NONE, &tr ); if ( tr.startsolid || tr.allsolid || (tr.m_pEnt && tr.m_pEnt != pObject) ) { if ( bDebug ) { NDebugOverlay::Box( vecHitPosition, WorldAlignMins(), WorldAlignMaxs(), 255, 0, 0, 8, 1.0f ); NDebugOverlay::Line( vecObjectPosition, vecHitPosition, 255, 0, 0, true, 1.0f ); } // Can we get at it at from an angle on the side of it we're on? Vector vecUp(0,0,1); Vector vecRight; CrossProduct( vecUp, vecTrajectory, vecRight ); // Is the guard to the right? or the left? Vector vecToGuard = ( WorldSpaceCenter() - vecObjectPosition ); VectorNormalize( vecToGuard ); if ( DotProduct( vecRight, vecToGuard ) > 0 ) { vecHitPosition = vecHitPosition + (vecRight * 64) + (vecTrajectory * 64); } else { vecHitPosition = vecHitPosition - (vecRight * 64) + (vecTrajectory * 64); } if ( asw_debug_aliens.GetInt() == 4 ) { NDebugOverlay::Box( vecHitPosition, NAI_Hull::Mins( HULL_MEDIUM ), NAI_Hull::Maxs( HULL_MEDIUM ), 0, 255, 0, true, 1.0f ); NDebugOverlay::Line( vecObjectPosition, vecHitPosition, 255, 0, 0, true, 1.0f ); } // Now try and move from the side position UTIL_TraceHull( vecHitPosition, vecHitPosition, WorldAlignMins(), WorldAlignMaxs(), MASK_NPCSOLID, this, COLLISION_GROUP_NONE, &tr ); if ( tr.startsolid || tr.allsolid || (tr.m_pEnt && tr.m_pEnt != pObject) ) { if ( asw_debug_aliens.GetInt() == 4 ) { NDebugOverlay::Box( vecHitPosition, WorldAlignMins(), WorldAlignMaxs(), 255, 0, 0, 8, 1.0f ); NDebugOverlay::Line( vecObjectPosition, vecHitPosition, 255, 0, 0, true, 1.0f ); } continue; } } // Take this as the best object so far pNearest = pObject; flNearestDist = flDist; m_vecPhysicsHitPosition = vecHitPosition; if ( bDebug ) { NDebugOverlay::Cross3D( center, Vector(15,15,15), -Vector(15,15,15), 255, 255, 0, true, 0.5f ); } } if ( pNearest && bDebug ) { NDebugOverlay::Cross3D( pNearest->WorldSpaceCenter(), Vector(30,30,30), -Vector(30,30,30), 255, 255, 255, true, 0.5f ); } return pNearest; } void CASW_Alien_Shover::ImpactShock( const Vector &origin, float radius, float magnitude, CBaseEntity *pIgnored ) { // Also do a local physics explosion to push objects away float adjustedDamage, flDist; Vector vecSpot; float falloff = 1.0f / 2.5f; CBaseEntity *pEntity = NULL; // Find anything within our radius while ( ( pEntity = gEntList.FindEntityInSphere( pEntity, origin, radius ) ) != NULL ) { // Don't affect the ignored target if ( pEntity == pIgnored ) continue; if ( pEntity == this ) continue; // UNDONE: Ask the object if it should get force if it's not MOVETYPE_VPHYSICS? if ( pEntity->GetMoveType() == MOVETYPE_VPHYSICS || ( pEntity->VPhysicsGetObject() && pEntity->IsPlayer() == false ) ) { vecSpot = pEntity->BodyTarget( GetAbsOrigin() ); // decrease damage for an ent that's farther from the bomb. flDist = ( GetAbsOrigin() - vecSpot ).Length(); if ( radius == 0 || flDist <= radius ) { adjustedDamage = flDist * falloff; adjustedDamage = magnitude - adjustedDamage; if ( adjustedDamage < 1 ) { adjustedDamage = 1; } CTakeDamageInfo info( this, this, adjustedDamage, DMG_BLAST ); CalculateExplosiveDamageForce( &info, (vecSpot - GetAbsOrigin()), GetAbsOrigin() ); pEntity->VPhysicsTakeDamage( info ); } } } } int CASW_Alien_Shover::TranslateSchedule( int scheduleType ) { switch( scheduleType ) { case SCHED_CHASE_ENEMY: { return SCHED_SHOVER_CHASE_ENEMY; } break; case SCHED_CHASE_ENEMY_FAILED: { int baseType = BaseClass::TranslateSchedule(scheduleType); if ( baseType != SCHED_CHASE_ENEMY_FAILED ) return baseType; int iUnreach = SelectUnreachableSchedule(); if (iUnreach != -1) return iUnreach; } break; case SCHED_ALIEN_SHOVER_PHYSICS_ATTACK: // If the object is far away, move and swat it. If it's close, just swat it. if (random->RandomFloat() < 0.5f) { if( DistToPhysicsEnt() > SHOVER_PHYSOBJ_SWATDIST ) { return SCHED_ALIEN_SHOVER_PHYSICS_ATTACK_MOVE; } else { return SCHED_ALIEN_SHOVER_PHYSICS_ATTACK; } } else { if( DistToPhysicsEnt() > SHOVER_PHYSOBJ_SWATDIST ) { return SCHED_ALIEN_SHOVER_PHYSICS_ATTACKITEM_MOVE; } else { return SCHED_ALIEN_ATTACKITEM; } } break; } return BaseClass::TranslateSchedule( scheduleType ); } void CASW_Alien_Shover::GatherConditions( void ) { BaseClass::GatherConditions(); if( m_NPCState == NPC_STATE_COMBAT ) { UpdatePhysicsTarget( false ); } if( (m_hPhysicsTarget != NULL) && gpGlobals->curtime >= m_flNextSwat && HasCondition( COND_SEE_ENEMY ) && m_AlienOrders == AOT_None) // don't try and throw physics objects if we have specific alien orders to follow { SetCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); } else { ClearCondition( COND_ALIEN_SHOVER_PHYSICS_TARGET ); } } int CASW_Alien_Shover::SelectFailSchedule( int failedSchedule, int failedTask, AI_TaskFailureCode_t taskFailCode ) { // If we can swat physics objects, see if we can swat our obstructor if ( IsPathTaskFailure( taskFailCode ) && m_hObstructor != NULL && m_hObstructor->VPhysicsGetObject() && m_hObstructor->VPhysicsGetObject()->GetMass() < 100 ) { m_hPhysicsTarget = m_hObstructor; m_hObstructor = NULL; //Msg("Alien shoving phys object from fail schedule\n"); return SCHED_ALIEN_ATTACKITEM; } m_hObstructor = NULL; return BaseClass::SelectFailSchedule( failedSchedule, failedTask, taskFailCode ); } bool CASW_Alien_Shover::OnInsufficientStopDist( AILocalMoveGoal_t *pMoveGoal, float distClear, AIMoveResult_t *pResult ) { if ( pMoveGoal->directTrace.fStatus == AIMR_BLOCKED_ENTITY && gpGlobals->curtime >= m_flNextSwat ) { //Msg("Alien setting obstructor\n"); m_hObstructor = pMoveGoal->directTrace.pObstruction; } return false; } float CASW_Alien_Shover::DistToPhysicsEnt( void ) { //return ( GetLocalOrigin() - m_hPhysicsEnt->GetLocalOrigin() ).Length(); if ( m_hPhysicsTarget != NULL ) return UTIL_DistApprox2D( GetAbsOrigin(), m_hPhysicsTarget->WorldSpaceCenter() ); return SHOVER_PHYSOBJ_SWATDIST + 1; } AI_BEGIN_CUSTOM_NPC( npc_alien_shover, CASW_Alien_Shover ) //Tasks DECLARE_TASK( TASK_ALIEN_SHOVER_GET_PATH_TO_PHYSOBJECT ) DECLARE_TASK( TASK_ALIEN_SHOVER_SHOVE_PHYSOBJECT ) DECLARE_TASK( TASK_ALIEN_SHOVER_OPPORTUNITY_THROW ) DECLARE_TASK( TASK_ALIEN_SHOVER_FIND_PHYSOBJECT ) //Activities DECLARE_ACTIVITY( ACT_ALIEN_SHOVER_SHOVE_PHYSOBJECT ) DECLARE_ACTIVITY( ACT_ALIEN_SHOVER_ROAR ) //Adrian: events go here DECLARE_ANIMEVENT( AE_ALIEN_SHOVER_SHOVE_PHYSOBJECT ) DECLARE_ANIMEVENT( AE_ALIEN_SHOVER_SHOVE ) DECLARE_ANIMEVENT( AE_ALIEN_SHOVER_ROAR ) DECLARE_CONDITION( COND_ALIEN_SHOVER_PHYSICS_TARGET ) DECLARE_CONDITION( COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID ) DEFINE_SCHEDULE ( SCHED_ALIEN_ATTACKITEM, " Tasks" " TASK_FACE_ENEMY 0" " TASK_MELEE_ATTACK1 0" " " " Interrupts" " COND_ENEMY_DEAD" " COND_NEW_ENEMY" ) DEFINE_SCHEDULE ( SCHED_ALIEN_SHOVER_PHYSICS_ATTACKITEM_MOVE, " Tasks" " TASK_SET_FAIL_SCHEDULE SCHEDULE:SCHED_CHASE_ENEMY" " TASK_ALIEN_SHOVER_GET_PATH_TO_PHYSOBJECT 0" " TASK_RUN_PATH 0" " TASK_WAIT_FOR_MOVEMENT 0" " TASK_FACE_ENEMY 0" " TASK_MELEE_ATTACK1 0" "" " Interrupts" " COND_TASK_FAILED" " COND_ENEMY_DEAD" " COND_LOST_ENEMY" " COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID" ) //================================================== // SCHED_ALIEN_SHOVER_PHYSICS_ATTACK //================================================== DEFINE_SCHEDULE ( SCHED_ALIEN_SHOVER_PHYSICS_ATTACK_MOVE, " Tasks" " TASK_SET_FAIL_SCHEDULE SCHEDULE:SCHED_CHASE_ENEMY" " TASK_ALIEN_SHOVER_GET_PATH_TO_PHYSOBJECT 0" " TASK_RUN_PATH 0" " TASK_WAIT_FOR_MOVEMENT 0" " TASK_FACE_ENEMY 0" " TASK_ALIEN_SHOVER_SHOVE_PHYSOBJECT 0" "" " Interrupts" " COND_TASK_FAILED" " COND_ENEMY_DEAD" " COND_LOST_ENEMY" " COND_ALIEN_SHOVER_PHYSICS_TARGET_INVALID" ) DEFINE_SCHEDULE ( SCHED_ALIEN_SHOVER_PHYSICS_ATTACK, " Tasks" " TASK_SET_FAIL_SCHEDULE SCHEDULE:SCHED_CHASE_ENEMY" " TASK_FACE_ENEMY 0" " TASK_ALIEN_SHOVER_SHOVE_PHYSOBJECT 0" "" " Interrupts" " COND_ENEMY_DEAD" " COND_LOST_ENEMY" ) //================================================== // SCHED_FORCE_ALIEN_SHOVER_PHYSICS_ATTACK //================================================== DEFINE_SCHEDULE ( SCHED_FORCE_ALIEN_SHOVER_PHYSICS_ATTACK, " Tasks" " TASK_SET_FAIL_SCHEDULE SCHEDULE:SCHED_ALIEN_SHOVER_CANT_ATTACK" " TASK_ALIEN_SHOVER_FIND_PHYSOBJECT 0" " TASK_SET_SCHEDULE SCHEDULE:SCHED_ALIEN_SHOVER_PHYSICS_ATTACK" "" " Interrupts" ) //================================================== // SCHED_ANTLIONGUARD_ROAR //================================================== DEFINE_SCHEDULE ( SCHED_ALIEN_SHOVER_ROAR, " Tasks" " TASK_STOP_MOVING 0" " TASK_FACE_ENEMY 0" " TASK_PLAY_SEQUENCE ACTIVITY:ACT_ALIEN_SHOVER_ROAR" " " " Interrupts" ) DEFINE_SCHEDULE ( SCHED_ALIEN_SHOVER_CANT_ATTACK, " Tasks" " TASK_SET_ROUTE_SEARCH_TIME 5" // Spend 5 seconds trying to build a path if stuck " TASK_GET_PATH_TO_RANDOM_NODE 200" " TASK_WALK_PATH 0" " TASK_WAIT_FOR_MOVEMENT 0" " TASK_WAIT_PVS 0" "" " Interrupts" " COND_GIVE_WAY" " COND_NEW_ENEMY" ) DEFINE_SCHEDULE ( SCHED_SHOVER_CHASE_ENEMY, " Tasks" " TASK_SET_FAIL_SCHEDULE SCHEDULE:SCHED_CHASE_ENEMY_FAILED" //" TASK_SET_TOLERANCE_DISTANCE 24" " TASK_GET_CHASE_PATH_TO_ENEMY 300" " TASK_RUN_PATH 0" " TASK_WAIT_FOR_MOVEMENT 0" //" TASK_FACE_ENEMY 0" " " " Interrupts" " COND_NEW_ENEMY" " COND_ENEMY_DEAD" " COND_ENEMY_UNREACHABLE" " COND_CAN_RANGE_ATTACK1" " COND_CAN_MELEE_ATTACK1" " COND_CAN_RANGE_ATTACK2" " COND_CAN_MELEE_ATTACK2" " COND_TOO_CLOSE_TO_ATTACK" " COND_TASK_FAILED" " COND_ALIEN_SHOVER_PHYSICS_TARGET" ) AI_END_CUSTOM_NPC()
28.345886
146
0.684929
[ "object", "vector", "model" ]
96ebaf4399be117a1c3251bf82fc2db4b50dcb6b
2,189
hpp
C++
template/PixFuTemplate/PixFu.Framework/Versions/A/Headers/ext/world/Terrain.hpp
nebular/PixFu_macOS_src
fbe6630fa0bc035a83c4f900e0e7f6006f45da2e
[ "CC-BY-4.0" ]
1
2020-03-02T00:57:04.000Z
2020-03-02T00:57:04.000Z
template/PixFuTemplate/PixFu.Framework/Versions/A/Headers/ext/world/Terrain.hpp
nebular/PixFu_macOS
fbe6630fa0bc035a83c4f900e0e7f6006f45da2e
[ "CC-BY-4.0" ]
null
null
null
template/PixFuTemplate/PixFu.Framework/Versions/A/Headers/ext/world/Terrain.hpp
nebular/PixFu_macOS
fbe6630fa0bc035a83c4f900e0e7f6006f45da2e
[ "CC-BY-4.0" ]
null
null
null
// // Terrain.hpp // PixEngine // // Created by rodo on 25/02/2020. // Copyright © 2020 rodo. All rights reserved. // #pragma once #include "Canvas2D.hpp" #include "Texture2D.hpp" #include "LayerVao.hpp" #include "ObjLoader.hpp" #include "TerrainShader.hpp" namespace Pix { class Terrain : public LayerVao { static std::string TAG; Texture2D *pTexture = nullptr; // Terrain texture Texture2D *pDirtTexture = nullptr; // 3D canvas texture Canvas2D *pDirtCanvas = nullptr; // 3D canvas over the texture Drawable *pHeightMap = nullptr; // Height Map ObjLoader *pLoader = nullptr; // 3D model loader /** Terrain Size */ glm::vec2 mSize; /** Whether terrain has been inited */ bool bInited = false; /** Inits the terrain */ void init(TerrainShader *shader); public: const TerrainConfig_t CONFIG; const WorldConfig_t PLANET; Terrain(WorldConfig_t planetConfig, TerrainConfig_t config); virtual ~Terrain(); /** Renders the terrain */ void render(TerrainShader *shader); /** Queries heightmap */ float getHeight(glm::vec3 &posWorld); /** Whether the absolute coordinates belong to this terrain (mult-terrain world) */ bool contains(glm::vec3 &posWorld); /** draws a debug grid */ void wireframe(int inc = 100); /** Canvas rendered over the 3D texture */ Canvas2D *canvas(); /** Gets Terrain pixel dimensions. Terrain pixel dimensions are the ones of the supporting texture. */ int xPixels(); int zPixels(); }; inline int Terrain::xPixels() { return pTexture->width(); } inline int Terrain::zPixels() { return pTexture->height(); } inline float Terrain::getHeight(glm::vec3 &posWorld3d) { return (pHeightMap != nullptr) ? CONFIG.scaleHeight * 1000 * pHeightMap->getPixel(posWorld3d.x - CONFIG.origin.x, (posWorld3d.z) - CONFIG.origin.y).r / (float) 255 : 0; } inline bool Terrain::contains(glm::vec3 &posWorld) { return posWorld.x >= CONFIG.origin.x && posWorld.z >= CONFIG.origin.y && posWorld.x <= CONFIG.origin.x + mSize.x && posWorld.z <= CONFIG.origin.y + mSize.y; } inline Canvas2D *Terrain::canvas() { return pDirtCanvas; } }
24.322222
126
0.671996
[ "render", "model", "3d" ]
96f0ad324647fd648499177e11667887628fdd96
2,258
cpp
C++
codeforces/B - Maximum Product/Wrong answer on test 2.cpp
kzvd4729/Problem-Solving
13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab
[ "MIT" ]
1
2022-02-11T16:55:36.000Z
2022-02-11T16:55:36.000Z
codeforces/B - Maximum Product/Wrong answer on test 2.cpp
kzvd4729/Problem-Solving
13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab
[ "MIT" ]
null
null
null
codeforces/B - Maximum Product/Wrong answer on test 2.cpp
kzvd4729/Problem-Solving
13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab
[ "MIT" ]
null
null
null
/**************************************************************************************** * @author: kzvd4729# created: Apr/18/2021 22:24 * solution_verdict: Wrong answer on test 2 language: GNU C++17 (64) * run_time: 77 ms memory_used: 4800 KB * problem: https://codeforces.com/contest/1406/problem/B ****************************************************************************************/ #include<iostream> #include<vector> #include<cstring> #include<map> #include<bitset> #include<assert.h> #include<algorithm> #include<iomanip> #include<cmath> #include<set> #include<queue> #include<sstream> #include<unordered_map> #include<unordered_set> #include<chrono> #include<stack> #include<deque> #include<random> #define long long long using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); const int N=1e6,inf=1e9,mod=1e9+7; int a[N+2]; int main() { ios_base::sync_with_stdio(0);cin.tie(0); int t;cin>>t; while(t--) { int n;cin>>n; vector<int>ng,ps; for(int i=1;i<=n;i++) { cin>>a[i]; if(a[i]<0)ng.push_back(a[i]); else ps.push_back(a[i]); } if(n==5) { cout<<1LL*a[1]*a[2]*a[3]*a[4]*a[5]<<endl; continue; } sort(ng.begin(),ng.end()); sort(ps.begin(),ps.end()); if((int)ps.size()==0) { cout<<1LL*ng[1]*ng[2]*ng[3]*ng[4]*ng[0]<<endl; continue; } long ans=-1LL*inf*inf; long ml=1; if((int)ps.size()>=5) { for(int i=(int)ps.size()-1;i>=(int)ps.size()-5;i--) ml*=ps[i]; ans=max(ans,ml); } ml=1; if((int)ps.size()>=3 && (int)ng.size()>=2) { for(int i=(int)ps.size()-1;i>=(int)ps.size()-3;i--) ml*=ps[i]; for(int i=0;i<2;i++) ml*=ng[i]; ans=max(ans,ml); } ml=1; if((int)ps.size()>=1 && (int)ng.size()>=4) { //cout<<"HERE"<<endl; for(int i=(int)ps.size()-1;i>=(int)ps.size()-1;i--) ml*=ps[i]; for(int i=0;i<4;i++) ml*=ng[i]; ans=max(ans,ml); } cout<<ans<<endl; } return 0; }
26.255814
111
0.460142
[ "vector" ]
96f2876ec9049c29227053a12370e9a97eb801bc
1,039
hh
C++
coding/Reactor/v2/EventLoop.hh
snow-tyan/learn-cpp
ecab0fae7999005ed7fdb60ff4954b4014b2c2e6
[ "MulanPSL-1.0" ]
null
null
null
coding/Reactor/v2/EventLoop.hh
snow-tyan/learn-cpp
ecab0fae7999005ed7fdb60ff4954b4014b2c2e6
[ "MulanPSL-1.0" ]
null
null
null
coding/Reactor/v2/EventLoop.hh
snow-tyan/learn-cpp
ecab0fae7999005ed7fdb60ff4954b4014b2c2e6
[ "MulanPSL-1.0" ]
null
null
null
#pragma once #include "TCPConnection.hh" #include <map> #include <memory> #include <sys/epoll.h> #include <vector> using std::map; using std::shared_ptr; using std::vector; namespace wd { class Acceptor; class EventLoop { public: EventLoop(Acceptor &); // peerfd,sockfd void loop(); void unloop(); // 回调函数,转交给TCPConnection去做 void setConnectionCallback(TCPCallback &&cb); void setMessageCallback(TCPCallback &&cb); void setCloseCallback(TCPCallback &&cb); private: void epollWait(); void handleNewConnection(); void handleNewMessage(int); // peerfd int epollCreate(); void addEpollFdRead(int); void delEpollFdRead(int); bool isConnectClosed(int); // 连接是否断开 private: int _epfd; Acceptor &_acceptor; vector<struct epoll_event> _eventList; // {peerfd: tcp*} // shared_ptr<TCPConnection>; map<int, TCPConnectionPtr> _conns; bool _isLooping; TCPCallback _onConnection; TCPCallback _onMessage; TCPCallback _onClose; }; } // end of namespace wd
20.78
49
0.693936
[ "vector" ]
96f6805dc629f77a38bf77f10863a15b2369b107
1,796
cpp
C++
zh/appendix C++11 standards/test_code/mystudy-right-reference4/test.cpp
xiangbingj/Cplusplus-Concurrency-In-Practice
e0efd276ac49ec63b216ee32940e5701f808511f
[ "MIT" ]
null
null
null
zh/appendix C++11 standards/test_code/mystudy-right-reference4/test.cpp
xiangbingj/Cplusplus-Concurrency-In-Practice
e0efd276ac49ec63b216ee32940e5701f808511f
[ "MIT" ]
null
null
null
zh/appendix C++11 standards/test_code/mystudy-right-reference4/test.cpp
xiangbingj/Cplusplus-Concurrency-In-Practice
e0efd276ac49ec63b216ee32940e5701f808511f
[ "MIT" ]
null
null
null
#include "stdio.h" #include<iostream> #include<cstring> #include<vector> using namespace std; class A { public: A() :m_ptr(NULL), m_nSize(0){} A(int *ptr, int nSize) { m_nSize = nSize; m_ptr = new int[nSize]; if (m_ptr) { memcpy(m_ptr, ptr, sizeof(sizeof(int) * nSize)); } } A(const A& other) // 拷贝构造函数实现深拷贝 { m_nSize = other.m_nSize; if (other.m_ptr) { m_ptr = new int[m_nSize]; memcpy(m_ptr, other.m_ptr, sizeof(sizeof(int)* m_nSize)); } else { m_ptr = NULL; } cout << "A(const int &i)" << endl; } // 右值应用构造函数 A(A &&other) { m_ptr = NULL; m_nSize = other.m_nSize; if (other.m_ptr) { m_ptr = move(other.m_ptr); // 移动语义 other.m_ptr = NULL; } } ~A() { if (m_ptr) { delete[] m_ptr; m_ptr = NULL; } } void deleteptr() { if (m_ptr) { delete[] m_ptr; m_ptr = NULL; } } int *m_ptr; int m_nSize; }; int main() { int arr[] = { 1, 2, 3 }; A a(arr, sizeof(arr)/sizeof(arr[0])); cout << "m_ptr in a Addr: 0x" << a.m_ptr << endl; A b(a); cout << "m_ptr in b Addr: 0x" << b.m_ptr << endl; b.deleteptr(); A c(std::forward<A>(a)); // 完美转换 cout << "m_ptr in c Addr: 0x" << c.m_ptr << endl; c.deleteptr(); vector<int> vect{ 1, 2, 3, 4, 5 }; cout << "before move vect size: " << vect.size() << endl; vector<int> vect1 = move(vect); cout << "after move vect size: " << vect.size() << endl; cout << "new vect1 size: " << vect1.size() << endl; return 0; }
20.409091
69
0.455457
[ "vector" ]
8c00f6713958e8c1f80d789a27401bf3c7274382
10,879
cpp
C++
src/opticalFlowTracker.cpp
baowenqi/opticalFlowTracker
29c23f3ce642ab0afd0d77d9d643ae8eea0b91f3
[ "MIT" ]
5
2019-11-21T09:25:04.000Z
2022-02-26T07:36:03.000Z
src/opticalFlowTracker.cpp
baowenqi/opticalFlowTracker
29c23f3ce642ab0afd0d77d9d643ae8eea0b91f3
[ "MIT" ]
null
null
null
src/opticalFlowTracker.cpp
baowenqi/opticalFlowTracker
29c23f3ce642ab0afd0d77d9d643ae8eea0b91f3
[ "MIT" ]
1
2021-02-10T09:40:21.000Z
2021-02-10T09:40:21.000Z
#include <assert.h> #include <stdint.h> #include <string.h> #include <math.h> #include <list> #include <algorithm> #include <iostream> #include <sys/time.h> #include "opticalFlowTracker.hpp" using namespace std; ofTracker::ofTracker ( int32_t i_imgWidth, int32_t i_imgHeight ) : m_imgWidth(i_imgWidth), m_imgHeight(i_imgHeight) { #if 0 // ---------------------------------- // // allocate the warping matrix // // in this example, we set the final // // warping model as similarity with // // 3 dof: // // 1+s, 0, t1, // // 0, 1+s, t2, // // ---------------------------------- // outW = new float[m_dof * 2]; // ---------------------------------- // // setup template and target pyramids // // each has 4 level, scale down by 2 // // ---------------------------------- // for(int i = (m_numPyramid - 1); i >= 0; i--) { int32_t imgWidth, imgHeight; if(i == m_numPyramid - 1) { imgWidth = m_imgWidth; imgHeight = m_imgHeight; } else { imgWidth = m_imgPyd0[i + 1]->w >> 1; imgHeight = m_imgPyd0[i + 1]->h >> 1; } m_imgPyd0[i] = new image(imgWidth, imgHeight); m_imgPyd1[i] = new image(imgWidth, imgHeight); m_boxPyd[i] = new box; } #endif } ofTracker::~ofTracker() { #if 0 if(outW != nullptr) delete []outW; for(int i = (m_numPyramid - 1); i >= 0; i--) { if(m_imgPyd0[i] != nullptr) delete m_imgPyd0[i]; if(m_imgPyd1[i] != nullptr) delete m_imgPyd1[i]; if(m_boxPyd[i] != nullptr) delete m_boxPyd[i]; } #endif } ofTracker::status_t ofTracker::f_convolution ( const matrix<float>& src, const matrix<float>& knl, matrix<float>& dst ) { assert(src.cols == dst.cols && src.rows == dst.rows); int32_t kwRad = (knl.cols >> 1); int32_t khRad = (knl.rows >> 1); int32_t wPad = src.cols + kwRad * 2; int32_t hPad = src.rows + khRad * 2; // ---------------------------------------------- // // pad the boundry of the src image with 0s // // ---------------------------------------------- // float* srcPad = new float[wPad * hPad]; memset(srcPad, 0, wPad * hPad * sizeof(float)); for(int y = 0; y < src.rows; y++) { for(int x = 0; x < src.cols; x++) { int srcAddr = y * src.cols + x; int padAddr = (y + khRad) * wPad + (x + kwRad); *(srcPad + padAddr) = *(src.data + srcAddr); } } // ---------------------------------------------- // // convolve the srcPad with knl // // ---------------------------------------------- // for(int y = 0; y < dst.rows; y++) { for(int x = 0; x < dst.cols; x++) { float result = 0.0f; for(int v = 0; v < knl.rows; v++) { for(int u = 0; u < knl.cols; u++) { int knlAddr = v * knl.cols + u; int srcAddr = (y + v) * wPad + (x + u); float knlData = *(knl.data + knlAddr); float srcData = *(srcPad + srcAddr); result += srcData * knlData; } } int dstAddr = y * dst.cols + x; *(dst.data + dstAddr) = result; } } delete []srcPad; return SUCCESS; } #if 0 ofTracker::status_t ofTracker::f_buildPyramid ( float* frame, image* (&pyramid)[m_numPyramid] ) { // ---------------------------------------------- // // gaussian filter kernel // // ---------------------------------------------- // float knl[9] = {0.0625, 0.125, 0.0625, \ 0.125, 0.25, 0.125, \ 0.0625, 0.125, 0.0625 }; image knlImg(3, 3, knl); // ---------------------------------------------- // // the bottom level is just a copy of input frame // // the upper-3 level is down-scaled by 2 each // // ---------------------------------------------- // for(int l = m_numPyramid - 1; l >= 0; l--) { if(l == m_numPyramid - 1) { memcpy(pyramid[l]->data, frame, pyramid[l]->w * pyramid[l]->h * sizeof(float)); } else { image gaussianImg(pyramid[l+1]->w, pyramid[l+1]->h); f_convolution(*(pyramid[l+1]), knlImg, gaussianImg); for(int y = 0; y < pyramid[l]->h; y++) { float fltY = y * 2.0f + 0.5f; for(int x = 0; x < pyramid[l]->w; x++) { float fltX = x * 2.0f + 0.5f; float sampleData = f_sample(gaussianImg, fltX, fltY); int addr = y * pyramid[l]->w + x; *(pyramid[l]->data + addr) = sampleData; } } } } return SUCCESS; } #endif ofTracker::status_t ofTracker::track ( box& inputBox ) { *(m_boxPyd[0]) = inputBox * 0.125f; cout << *(m_boxPyd[0]) << endl; return SUCCESS; } ofTracker::status_t ofTracker::f_align ( matrix<float>& tmpImg, matrix<float>& tgtImg, box& tmpBox, box& tgtBox ) { // ----------------------------------------------- // // initial the warping matrix // // we use scaling + translation model: // // 1+s, 0, b1, // // 0, 1+s, b2 // // ----------------------------------------------- // matrix<float> W(2, 3, {1, 0, 0, 0, 1, 0}); // ----------------------------------------------- // // initial the hessian matrix // // ----------------------------------------------- // matrix<float> H(3, 3); matrix<float> invH(3, 3); // ----------------------------------------------- // // STEP 3 // // compute the gradient of template image // // we use sobel filter here // // ----------------------------------------------- // matrix<float> sobelX(3, 3, {-1, 0, 1, -2, 0, 2, -1, 0, 1}); matrix<float> sobelY(3, 3, {-1, -2, -1, 0, 0, 0, 1, 2, 1}); matrix<float> tmpImgGx(tmpImg.rows, tmpImg.cols); matrix<float> tmpImgGy(tmpImg.rows, tmpImg.cols); f_convolution(tmpImg, sobelX, tmpImgGx); f_convolution(tmpImg, sobelY, tmpImgGy); // ----------------------------------------------- // // STEP 4 // // pre compute the Jacobian for given rect // // STEP 5 // // compute the steepest descent images // // STEP 6 // // compute the hessian matrix // // accumulate to H // // compute the inverse of H // // ----------------------------------------------- // matrix<float>* sdiTArray[tmpBox.h][tmpBox.w]; for(int v = 0; v < tmpBox.h; v++) { for(int u = 0; u < tmpBox.w; u++) { matrix<float> jacobian(2, 3); jacobian << u, 1, 0, v, 0, 1; float gx = tmpImgGx.at(tmpBox.y + v, tmpBox.x + u); float gy = tmpImgGy.at(tmpBox.y + v, tmpBox.x + u); matrix<float> gradient(1, 2, {gx, gy}); matrix<float> sdi = gradient * jacobian; matrix<float> sdiT = sdi.transpose(); matrix<float> h = sdiT * sdi; H += h; sdiTArray[v][u] = new matrix<float>(3, 1); *(sdiTArray[v][u]) = sdiT; } } invH = H.inverse(); // --------------------------------------------------- // // iterating... // // --------------------------------------------------- // for(int i = 0; i < 500; i++) { // ----------------------------------------------- // // initial the error-weigthed sdi // // ----------------------------------------------- // matrix<float> S(3, 1); for(int v = 0; v < tmpBox.h; v++) { for(int u = 0; u < tmpBox.w; u++) { // ----------------------------------------------- // // STEP 1 // // compute the warp image // // STEP 2 // // compute the error image // // ----------------------------------------------- // matrix<float> x(3, 1); x << u, v, 1; matrix<float> wx = W * x; float uw = wx.at(0); float vw = wx.at(1); float tgtData = tgtImg.at(tmpBox.y + vw, tmpBox.x + uw); float tmpData = tmpImg.at(tmpBox.y + v, tmpBox.x + u ); float error = tgtData - tmpData; // --------------------------------------- // // STEP 7 // // aggregate the error-weigthed sdi // // --------------------------------------- // matrix<float> sdiT = *(sdiTArray[v][u]); matrix<float> s = sdiT * error; S += s; } } // ----------------------------------------------- // // STEP 8 // // solve the delta p // // ----------------------------------------------- // matrix<float> deltaP = invH * S; // ----------------------------------------------- // // STEP 9 // // and update warping matrix (ic) // // ----------------------------------------------- // float deltaS = deltaP.at(0); float deltaB1 = deltaP.at(1); float deltaB2 = deltaP.at(2); W.at(0, 0) /= (1 + deltaS); W.at(1, 1) = W.at(0, 0); W.at(0, 2) -= W.at(0, 0) * deltaB1; W.at(1, 2) -= W.at(0, 0) * deltaB2; cout << "----" << i << "----" << endl; cout << deltaP << endl; } cout << W << endl; return SUCCESS; }
31.997059
91
0.344057
[ "model" ]
8c04e94ba578212bb99ce14d1d4dda4f5df856c2
5,081
hpp
C++
source/framework/algorithm/include/lue/framework/algorithm/unique_id.hpp
computationalgeography/lue
71993169bae67a9863d7bd7646d207405dc6f767
[ "MIT" ]
2
2021-02-26T22:45:56.000Z
2021-05-02T10:28:48.000Z
source/framework/algorithm/include/lue/framework/algorithm/unique_id.hpp
computationalgeography/lue
71993169bae67a9863d7bd7646d207405dc6f767
[ "MIT" ]
131
2020-10-27T13:09:16.000Z
2022-03-29T10:24:26.000Z
source/framework/algorithm/include/lue/framework/algorithm/unique_id.hpp
computationalgeography/lue
71993169bae67a9863d7bd7646d207405dc6f767
[ "MIT" ]
null
null
null
#pragma once #include "lue/framework/partitioned_array.hpp" #include "lue/framework/core/annotate.hpp" #include <numeric> namespace lue { namespace detail { template< typename InputPartition> [[nodiscard]] hpx::future<void> unique_id_partition( InputPartition input_partition, // Can't call .then on a const& ElementT<InputPartition> const start_value) { // - Create a new collection of data elements // - Assign unique IDs to the cells // - Assign the collection of data elements // - Return a future that becomes ready once the data has been // assigned to the existing partition using Data = DataT<InputPartition>; using Shape = ShapeT<InputPartition>; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wattributes" auto task = [start_value]( InputPartition input_partition) { // Given the partition's shape, we can create a new // collection for partition elements return input_partition.shape().then( hpx::unwrapping( [input_partition, start_value]( Shape const& shape) mutable { AnnotateFunction annotation{"unique_id_partition"}; Data data{shape}; std::iota(data.begin(), data.end(), start_value); return input_partition.set_data(std::move(data)); } ) ); }; #pragma GCC diagnostic pop // Given the logic below, input_partition should be already ready. In // the general case (we might be called from some other algorithm) // it is not. return input_partition.is_ready() ? task(input_partition) : input_partition.then(task) ; } template< typename Element, Rank rank> struct UniqueIDPartitionAction { }; } // namespace detail template< typename Partition> struct UniqueIDPartitionAction: hpx::actions::make_action< decltype(&detail::unique_id_partition<Partition>), &detail::unique_id_partition<Partition>, UniqueIDPartitionAction<Partition>>::type {}; /*! @brief Fill a partitioned array in-place with unique IDs @tparam Element Type of elements in the array @tparam rank Rank of the array @param input_array Partitioned array @return Future that becomes ready once the algorithm has finished The existing @a input_array passed in is updated. Use the returned future if you need to know when the filling is done. */ template< typename Element, Rank rank> [[nodiscard]] hpx::future<void> unique_id( PartitionedArray<Element, rank>& input_array) { // - Iterate over all partitions // - Determine first value for partition // - Call action that fills the partition with unique IDs // - Return future that becomes ready once all partitions are done // assigning values to all cells using InputArray = PartitionedArray<Element, rank>; using InputPartitions = PartitionsT<InputArray>; using InputPartition = PartitionT<InputArray>; InputPartitions const& input_partitions{input_array.partitions()}; Count const nr_partitions{input_partitions.nr_elements()}; std::vector<hpx::future<Count>> partition_sizes(nr_partitions); { // Request the sizes of all partitions and wait until they are // available. We need this to be able to offset each partition's // ID with the number of previous elements (see start_value below). for(Index p = 0; p < nr_partitions; ++p) { partition_sizes[p] = hpx::dataflow( hpx::launch::async, [](InputPartition const& partition) { AnnotateFunction annotation{"unique_id"}; return partition.nr_elements(); }, input_partitions[p]); } } UniqueIDPartitionAction<InputPartition> action{}; return hpx::when_all(partition_sizes).then(hpx::unwrapping( [localities=input_array.localities(), input_partitions, action]( std::vector<hpx::future<Count>>&& partition_sizes) { AnnotateFunction annotation{"unique_id"}; Element start_value = 0; Count const nr_partitions{input_partitions.nr_elements()}; std::vector<hpx::future<void>> unique_id_partitions(nr_partitions); for(Index p = 0; p < nr_partitions; ++p) { lue_hpx_assert(input_partitions[p].is_ready()); unique_id_partitions[p] = hpx::async( action, localities[p], input_partitions[p], start_value); start_value += partition_sizes[p].get(); } return hpx::when_all(unique_id_partitions); } )); } } // namespace lue
31.364198
83
0.61051
[ "shape", "vector" ]
8c1480dc93b5bf9ffd2711f7e9942dfa9fb2579d
8,519
cpp
C++
avr-node/actor.cpp
MasterQ32/MESH
5b4b9c92a226e324f8ae2baef3acc94fa3f3c973
[ "MIT" ]
null
null
null
avr-node/actor.cpp
MasterQ32/MESH
5b4b9c92a226e324f8ae2baef3acc94fa3f3c973
[ "MIT" ]
null
null
null
avr-node/actor.cpp
MasterQ32/MESH
5b4b9c92a226e324f8ae2baef3acc94fa3f3c973
[ "MIT" ]
null
null
null
#include <util/delay.h> #include <stdint.h> #include <avr/io.h> void delay_ms(unsigned time) { while(time > 0) { _delay_ms(1); --time; } } void delay_us(unsigned time) { while(time > 0) { _delay_us(1); --time; } } #define BAUD 9600UL // Baudrate // Berechnungen #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) // clever runden #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1))) // Reale Baudrate #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD) // Fehler in Promille, 1000 = kein Fehler. #if ((BAUD_ERROR<980) || (BAUD_ERROR>1020)) #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) #error Systematischer Fehler der Baudrate grösser 1% und damit zu hoch! #endif void USART_Transmit( uint8_t data ) { /* Wait for empty transmit buffer */ while ( !( UCSRA & (1<<UDRE)) ) ; /* Put data into buffer, sends the data */ UDR = data; } uint8_t USART_Receive( void ) { /* Wait for data to be received */ while ( !(UCSRA & (1<<RXC)) ) ; /* Get and return received data from buffer */ return UDR; } bool USART_CanRead(void) { return (UCSRA & (1<<RXC)); } namespace mesh { uint8_t localAddress; enum class errid : uint8_t { undefined = 0x00, invalidChecksum = 0x01, invalidRegister = 0x02, invalidDeviceInfo = 0x03, unknownCommand = 0x04, dataTooSmall = 0x05, }; struct { uint8_t devclass; uint16_t vendor; uint16_t device; uint8_t serialNo[6]; uint8_t hwRevision; uint8_t swRevision; } __attribute__((packed)) const deviceInfo { 0x20, 0x0001, // MQ Productions (or similar :P) 0x0001, // 8 Bit Switch { 0x12, 0x00, 0xF8, 0xB2, 0x61, 0x84 }, 0xFF, // hw rev 0 0xBB // sw rev 0 }; const char deviceName[] = "Experimental Actor (8 Bit)"; struct message_t { uint8_t magic; uint8_t flags; uint8_t sender; uint8_t receiver; uint8_t command; uint8_t length; void * data; uint8_t checksum; }; message_t * receive(); // returns always nullptr message_t * discard(message_t * in, errid error, uint8_t errinfo); namespace callback { void writeReg8(uint8_t regNum, uint8_t value); void writeReg16(uint8_t regNum, uint16_t value); uint8_t readReg8(uint8_t regNum); uint16_t readReg16(uint8_t regNum); } } namespace mesh { namespace callback { void writeReg8(uint8_t reg, uint8_t value) { uint8_t ind; switch(reg) { case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: ind = reg - 0x10; if(value >= 0x80) { PORTB &= ~(1<<ind); } else { PORTB |= (1<<ind); } return; } } uint8_t readReg8(uint8_t reg) { uint8_t ind; switch(reg) { case 0x00: return 0x13; // Bitfield case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: ind = reg - 0x10; return (PORTB & (1<<ind)) ? 0x00 : 0xFF; default: return 0xFF; } } void writeReg16(uint8_t reg, uint16_t val) { switch(reg) { case 0x80: PORTB = ~(val & 0xFF); return; } } uint16_t readReg16(uint8_t reg) { switch(reg) { case 0x80: return ~PORTB; case 0x81: return 0x0000; case 0x82: return 0xFFFF; default: return 0xFFFF; } } } } int main() { UCSRB |= (1 << TXEN) | (1 << RXEN); UCSRC = (1<<URSEL)|(1 << UCSZ1)|(1 << UCSZ0); UBRRL = (UBRR_VAL >> 0) & 0xFF; UBRRH = (UBRR_VAL >> 8) & 0xFF; DDRB = 0xFF; for(int i = 0; i < 8; i++) { PORTB = ~(1<<i); delay_ms(125); } for(int i = 6; i >= 0; i--) { PORTB = ~(1<<i); delay_ms(125); } PORTB = 0xFF; mesh::localAddress = 0x42; uint8_t counter = 0; USART_Transmit(counter); while(1) { mesh::message_t * msg = mesh::receive(); if(msg) { USART_Transmit(++counter); } } } // Test Packets: /* Discover any (not broadcast) device: 77 20 00 FE 01 00 00 Query Device Info: 77 20 00 FE 02 01 01 01 Query Device Name: 77 20 00 FE 02 01 02 02 Read register(0): 77 20 00 FE 06 01 00 00 Read register(15): (LED 5) 77 20 00 FE 06 01 15 15 Write register(80, AA): 77 20 00 FE 05 03 80 AA 00 2A Write register(80, 55): 77 20 00 FE 05 03 80 55 00 D5 */ namespace mesh { static uint8_t messageBuffer[256]; static message_t receivedMessage = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, messageBuffer, 0x00 }; static message_t * receiveRaw(uint8_t & checksum) { message_t * msg = &receivedMessage; msg->magic = USART_Receive(); if(msg->magic != 0x77) { return nullptr; } msg->flags = USART_Receive(); msg->receiver = USART_Receive(); msg->sender = USART_Receive(); msg->command = USART_Receive(); msg->length = USART_Receive(); checksum = 0; for(int i = 0; i < msg->length; i++) { messageBuffer[i] = USART_Receive(); checksum += messageBuffer[i]; } msg->checksum = USART_Receive(); return msg; } static uint8_t write(void const * buffer, uint16_t len) { uint8_t cs = 0; uint8_t const * buf = reinterpret_cast<uint8_t const *>(buffer); for(uint16_t i = 0; i < len; i++) { cs += buf[i]; USART_Transmit(buf[i]); } return cs; } message_t * discard(message_t * in, errid error, uint8_t errinfo) { USART_Transmit(0x77); // magic USART_Transmit(0x21); // v1.0 rsp USART_Transmit(in->sender); USART_Transmit(localAddress); USART_Transmit(0x04); // cmd USART_Transmit(0x03); // len USART_Transmit(in->command); USART_Transmit(uint8_t(error)); USART_Transmit(errinfo); USART_Transmit(in->command + uint8_t(error) + errinfo); // cs return nullptr; } message_t * receive() { uint8_t checksum; message_t * msg = receiveRaw(checksum); if(msg == nullptr) { return nullptr; } if(msg->receiver != localAddress && msg->receiver != 0x00 && msg->receiver != 0xFF) { // This message was not meant for us return nullptr; } if(msg->checksum != checksum) { return discard(msg, errid::invalidChecksum, checksum); } if(msg->flags & 0x01) { // Always return responses return msg; } uint8_t cs; switch(msg->command) { case 0x01: // discover USART_Transmit(0x77); // magic USART_Transmit(0x21); // v1.0 rsp USART_Transmit(msg->sender); USART_Transmit(localAddress); USART_Transmit(0x01); // cmd USART_Transmit(0x00); // len USART_Transmit(0x00); // cs return nullptr; case 0x02: if(msg->length < 1) { return nullptr; } switch(*((uint8_t*)msg->data)) { case 0x01: // query device info USART_Transmit(0x77); // magic USART_Transmit(0x21); // v1.0 rsp USART_Transmit(msg->sender); USART_Transmit(localAddress); USART_Transmit(0x01); // cmd USART_Transmit(sizeof(deviceInfo) + 1); // len USART_Transmit(0x01); // id cs = write(&deviceInfo, sizeof(deviceInfo)); USART_Transmit(cs + 0x01); // cs return nullptr; case 0x02: // Query device name USART_Transmit(0x77); // magic USART_Transmit(0x21); // v1.0 rsp USART_Transmit(msg->sender); USART_Transmit(localAddress); USART_Transmit(0x01); // cmd USART_Transmit(sizeof(deviceName) + 1); // len USART_Transmit(0x02); // id cs = write(&deviceName, sizeof(deviceName)); USART_Transmit(cs + 0x02); // cs return nullptr; default: return discard(msg, errid::invalidDeviceInfo, *((uint8_t*)msg->data)); } case 0x05: // write { if(msg->length < 3) { return nullptr; } struct data { uint8_t reg; uint16_t val; }; data * d = reinterpret_cast<data*>(msg->data); if(d->reg < 0x80) { callback::writeReg8(d->reg, uint8_t(d->val)); } else { callback::writeReg16(d->reg, d->val); } return nullptr; } case 0x06: // read { if(msg->length < 1) { return nullptr; } uint8_t * reg = reinterpret_cast<uint8_t*>(msg->data); uint16_t value; if(*reg < 0x80) { value = callback::readReg8(*reg); } else { value = callback::readReg16(*reg); } USART_Transmit(0x77); // magic USART_Transmit(0x21); // v1.0 rsp USART_Transmit(msg->sender); USART_Transmit(localAddress); USART_Transmit(0x06); // cmd USART_Transmit(0x03); // len USART_Transmit(*reg); // register cs = write(&value, sizeof value); USART_Transmit(cs + *reg); // cs return nullptr; } default: return msg; } } }
19.719907
85
0.61087
[ "mesh" ]
22c9db343e9d2903a15248f16832bed2943f9e6c
21,465
cpp
C++
Shading via Lighting and Colors/shading_v2.cpp
mmagallanes/cmsi_371
34c3e31e3b404d75ac13175be709769ddb0616d1
[ "MIT" ]
null
null
null
Shading via Lighting and Colors/shading_v2.cpp
mmagallanes/cmsi_371
34c3e31e3b404d75ac13175be709769ddb0616d1
[ "MIT" ]
null
null
null
Shading via Lighting and Colors/shading_v2.cpp
mmagallanes/cmsi_371
34c3e31e3b404d75ac13175be709769ddb0616d1
[ "MIT" ]
null
null
null
/*** Assignment-3: Shading via Lighting and Colors Name: Magallanes, Merci Collaborators: 371 Spring 2018 Class ** Note: although the assignment should be completed individually you may speak with classmates on high level algorithmic concepts. Please list their names in this section Project Summary: In the resubmission of this assignment, I attempted to recreate the bedroom from the film, 2001: A Space Odyssey. I created the bed, the bench at the foot of the bed, a side table, and the monolith from the movie. In the scene, the lighting comes from the floor, but in this recreation, the lighting comes from the side, leaving half of the room in shadow, including the monolith, which is all black. ***/ #ifdef __APPLE__ #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <GLUT/glut.h> #else #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> #endif #include <math.h> #include <vector> using namespace std; /************************************************** * Object Model Class * * * * Stores the points of the object as a vector * * along with the colors and normals for each * * point. Normals are computed from the points. * * * *************************************************/ class ObjectModel { vector<GLfloat> _points; vector<GLfloat> _normals; vector<GLfloat> _base_colors; vector<GLfloat> _colors; public: ObjectModel() { }; vector<GLfloat> get_points() { return _points; }; vector<GLfloat> get_normals() { return _normals; }; vector<GLfloat> get_base_colors() { return _base_colors; }; vector<GLfloat> get_colors() { return _colors; }; void set_points(vector<GLfloat> points) { _points = points; }; void set_normals(vector<GLfloat> normals) { _normals = normals; }; void set_base_colors(vector<GLfloat> base_colors) { _base_colors = base_colors; }; void set_colors(vector<GLfloat> colors) { _colors = colors; }; }; /************************************************** * Rectangular Prisms via Hierarchical Modeling * * * * Using planes as building blocks, build a unit * * cube with transformations that will serve as * * a primitive for modeling objects in the scene.* * * *************************************************/ // Initializes a square plane of unit lengths vector<GLfloat> init_plane() { vector<GLfloat> vertices = { +0.5, +0.5, +0.0, -0.5, +0.5, +0.0, -0.5, -0.5, +0.0, +0.5, -0.5, +0.0 }; return vertices; } // Converts a vector to an array GLfloat* vector2array(vector<GLfloat> vec) { GLfloat* arr = new GLfloat[vec.size()]; for (int i = 0; i < vec.size(); i++) { arr[i] = vec[i]; } return arr; } // Converts Cartesian coordinates to homogeneous coordinates vector<GLfloat> to_homogenous_coord(vector<GLfloat> cartesian_coords) { vector<GLfloat> result; for (int i = 0; i < cartesian_coords.size(); i+=3) { result.push_back(cartesian_coords[i]); result.push_back(cartesian_coords[i+1]); result.push_back(cartesian_coords[i+2]); result.push_back(1.0); } return result; } // Converts Cartesian coordinates to homogeneous coordinates vector<GLfloat> to_cartesian_coord(vector<GLfloat> homogenous_coords) { vector<GLfloat> result; for (int i = 0; i < homogenous_coords.size(); i+=4) { result.push_back(homogenous_coords[i]); result.push_back(homogenous_coords[i+1]); result.push_back(homogenous_coords[i+2]); } return result; } // Definition of a translation matrix vector<GLfloat> translation_matrix (float dx, float dy, float dz) { vector<GLfloat> translate_mat; translate_mat = { 1.0, 0.0, 0.0, dx, 0.0, 1.0, 0.0, dy, 0.0, 0.0, 1.0, dz, 0.0, 0.0, 0.0, 1.0 }; return translate_mat; } // Definition of a scaling matrix vector<GLfloat> scaling_matrix (float sx, float sy, float sz) { vector<GLfloat> scale_mat; scale_mat = { sx, 0.0, 0.0, 0.0, 0.0, sy, 0.0, 0.0, 0.0, 0.0, sz, 0.0, 0.0, 0.0, 0.0, 1.0 }; return scale_mat; } // Definition of a rotation matrix along the x-axis theta degrees vector<GLfloat> rotation_matrix_x (float theta) { vector<GLfloat> rotate_mat_x; rotate_mat_x = { 1.0, 0.0, 0.0, 0.0, 0.0, cos(theta), -sin(theta), 0.0, 0.0, sin(theta), cos(theta), 0.0, 0.0, 0.0, 0.0, 1.0 }; return rotate_mat_x; } // Definition of a rotation matrix along the y-axis by theta degrees vector<GLfloat> rotation_matrix_y (float theta) { vector<GLfloat> rotate_mat_y; rotate_mat_y = { cos(theta), 0.0, sin(theta), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(theta), 0.0, cos(theta), 0.0, 0.0, 0.0, 0.0, 1.0 }; return rotate_mat_y; } // Definition of a rotation matrix along the z-axis by theta degrees vector<GLfloat> rotation_matrix_z (float theta) { vector<GLfloat> rotate_mat_z; rotate_mat_z = { cos(theta), -sin(theta), 0.0, 0.0, sin(theta), cos(theta), 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 }; return rotate_mat_z; } // Perform matrix multiplication for A B vector<GLfloat> mat_mult(vector<GLfloat> A, vector<GLfloat> B) { vector<GLfloat> result; for (int j = 0; j < B.size(); j += 4) { for (int i = 0; i < 16; i += 4) { result.push_back(A[i]*B[j]+A[i+1]*B[j+1]+A[i+2]*B[j+2]+A[i+3]*B[j+3]); } } return result; } // Simplification of vectors vector<GLfloat> combine(vector<GLfloat> part, vector<GLfloat> combo) { for (int i = 0; i < part.size(); i++){ combo.push_back(part[i]); } return combo; } // Builds a unit cube centered at the origin vector<GLfloat> build_cube() { vector<GLfloat> result; vector<GLfloat> frontPanel = to_cartesian_coord(mat_mult(translation_matrix(0.0, 0.0, 0.5), to_homogenous_coord(init_plane()))); vector<GLfloat> rightPanel = to_cartesian_coord(mat_mult(translation_matrix(0.5, 0.0, 0.0), mat_mult(rotation_matrix_y(M_PI/2), to_homogenous_coord(init_plane())))); vector<GLfloat> leftPanel = to_cartesian_coord(mat_mult(translation_matrix(-0.5, 0.0, 0.0), mat_mult(rotation_matrix_y(M_PI/2), to_homogenous_coord(init_plane())))); vector<GLfloat> backPanel = to_cartesian_coord(mat_mult(translation_matrix(0.0, 0.0, -0.5), to_homogenous_coord(init_plane()))); vector<GLfloat> bottomPanel = to_cartesian_coord(mat_mult(translation_matrix(0.0, -0.5, 0.0), mat_mult(rotation_matrix_x(M_PI/2), to_homogenous_coord(init_plane())))); vector<GLfloat> topPanel = to_cartesian_coord(mat_mult(translation_matrix(0.0, 0.5, 0.0), mat_mult(rotation_matrix_x(M_PI/2), to_homogenous_coord(init_plane())))); result = combine(bottomPanel, combine(topPanel, combine(leftPanel, combine(rightPanel, combine(backPanel, combine(frontPanel, result)))))); return result; } /************************************************** * Generating Surface Normals * * * * Generate the surface normals of the objects * * using the cross product between two vectors * * that lie on the surface (plane) of interest. * * Recall that the direction of the normal to a * * surface follows the Right Hand Rule. * * * *************************************************/ // Performs the cross product between two vectors vector<GLfloat> cross_product(vector<GLfloat> A, vector<GLfloat> B) { vector<GLfloat> C; C = { (A[1]*B[2]) - (A[2]*B[1]), (A[0]*B[2]) - (A[2]*B[0]), (A[0]*B[1]) - (A[1]*B[0])}; return C; } // Generates the normals to each surface (plane) vector<GLfloat> generate_normals(vector<GLfloat> points) { // Note: each plane (quad) contains 4 points, choose the points // to generate your vectors such that the normals (given by the // cross product, point to the correct direction vector<GLfloat> normals; vector<GLfloat> vector_A; vector<GLfloat> vector_B; vector<GLfloat> q0 = {points[0], points[1], points[2]}; vector<GLfloat> q1 = {points[3], points[4], points[5]}; vector<GLfloat> q2 = {points[6], points[7], points[8]}; vector<GLfloat> q3 = {points[9], points[10], points[11]}; GLfloat xA = q1[0] - q0[0]; GLfloat yA = q1[1] - q0[1]; GLfloat zA = q1[2] - q0[2]; vector_A.push_back(xA); vector_A.push_back(yA); vector_A.push_back(zA); // return slideLeft; // return slideDown; // // normals = combine(cross_product(slideDown, slideLeft), normals); return normals; } /************************************************** * Shading via Lighting and Color * * * * Generate the set of colors for each face of * * the planes that compose the objects in the * * scene. Based on the light source and surface * * normals, render the colors of the objects by * * applying the shading equation. * * * *************************************************/ // Initializes the base color of a plane to a single color vector<GLfloat> init_base_color(GLfloat r, GLfloat g, GLfloat b) { vector<GLfloat> base_color = { r, g, b, r, g, b, r, g, b, r, g, b }; return base_color; } // Initializes the base color of a plane by specifying the color of each point vector<GLfloat> init_base_color(GLfloat r0, GLfloat g0, GLfloat b0, GLfloat r1, GLfloat g1, GLfloat b1, GLfloat r2, GLfloat g2, GLfloat b2, GLfloat r3, GLfloat g3, GLfloat b3) { // This enables OpenGL to use interpolation for (Gouraud) shading the plane vector<GLfloat> base_color = { r0, g0, b0, r1, g1, b1, r2, g2, b2, r3, g3, b3 }; return base_color; } // Generates the colors of a set of surfaces based on the light source, surface normals, and base color of the surface ObjectModel apply_shading(ObjectModel object_model, vector<GLfloat> light_source, vector<GLfloat> camera) { vector<GLfloat> colors; object_model.set_colors(colors); return object_model; } // Allows for ambience (a vector of 3 values), diffusion (vector of 3 x n values) and specular (vector of 3 x n values) // as input to the shading equation ObjectModel apply_shading(ObjectModel object_model, vector<GLfloat> light_source, vector<GLfloat> camera, vector<GLfloat> amb, vector<GLfloat> diff, vector<GLfloat> spec) { vector<GLfloat> colors; object_model.set_colors(colors); return object_model; } // Performs the dot product between two vectors GLfloat dot_product(vector<GLfloat> A, vector<GLfloat> B) { GLfloat sum = 0.0; for (int i = 0; i < A.size(); i++) { for(int j = 0; j < B.size(); j++) { sum += A[i]*B[i]; } } return sum; } /************************************************** * Camera and World Modeling * * * * Create a scene by applying transformations to * * the objects built from planes and position * * the camera to view the scene by using setting * * the projection viewing matrices * * * *************************************************/ float theta = 0.0; void setup() { // Enable the vertex array functionality glEnableClientState(GL_VERTEX_ARRAY); // Enable the color array functionality (so we can specify a color for each vertex) glEnableClientState(GL_COLOR_ARRAY); // Enable depth test glEnable(GL_DEPTH_TEST); // Enable colors glEnable(GL_COLOR_MATERIAL); // Accept fragment if it closer to the camera than the former one glDepthFunc(GL_LESS); // Set up some default base color glColor3f(0.5, 0.5, 0.5); // Set up white background glClearColor(0.941, 1.000, 0.941, 0.0); } void init_camera() { // Camera parameters glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(50.0, 1.0, 2.0, 50.0); gluLookAt(2.0, 6.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); // original // Lighting GLfloat position[] = {0.0, 0.0, 0.0}; GLfloat ambience[] = {0.35, 0.35, 0.35, 1.0}; GLfloat diffusion[] = {1.0, 1.0, 1.0, 1.0}; GLfloat specular[] = {1.0, 1.0, 1.0, 2.0}; glLightfv(GL_LIGHT0, GL_POSITION, position); glLightfv(GL_LIGHT0, GL_AMBIENT, ambience); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffusion); glLightfv(GL_LIGHT0, GL_SPECULAR, specular); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); } vector<GLfloat> build_bed() { vector<GLfloat> result; vector<GLfloat> mattress = to_cartesian_coord(mat_mult(translation_matrix(-0.625, 0.0, 0.5), mat_mult(scaling_matrix(0.25, 0.5, 1.5), to_homogenous_coord(build_cube())))); vector<GLfloat> duvet = to_cartesian_coord(mat_mult(translation_matrix(0.0, 0.0, 0.5), mat_mult(scaling_matrix(1.0, 0.5, 1.5), to_homogenous_coord(build_cube())))); vector<GLfloat> headboard = to_cartesian_coord(mat_mult(translation_matrix(-0.78, 0.35, 0.5), mat_mult(scaling_matrix(0.05, 1.2, 1.5), to_homogenous_coord(build_cube())))); vector<GLfloat> pillow = to_cartesian_coord(mat_mult(translation_matrix(-0.6, 0.3, 0.5), mat_mult(scaling_matrix(0.2, 0.07, 0.5), to_homogenous_coord(build_cube())))); result = combine(duvet, combine(pillow, combine(headboard, combine(mattress, result)))); return result; } vector<GLfloat> build_bedroom_bench() { vector<GLfloat> result; vector<GLfloat> table = to_cartesian_coord(mat_mult(translation_matrix(0.68, 0.0, 0.5), mat_mult(scaling_matrix(0.3, 0.08, 1.0), to_homogenous_coord(build_cube())))); vector<GLfloat> back_right_leg = to_cartesian_coord(mat_mult(translation_matrix(0.548, -0.17, 0.016), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))); vector<GLfloat> back_left_leg = to_cartesian_coord(mat_mult(translation_matrix(0.548, -0.17, 0.984), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))); vector<GLfloat> front_left_leg = to_cartesian_coord(mat_mult(translation_matrix(0.814, -0.17, 0.984), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))); vector<GLfloat> front_right_leg = to_cartesian_coord(mat_mult(translation_matrix(0.814, -0.17, 0.016), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))); result = combine(front_right_leg, combine(front_left_leg, combine(back_left_leg, combine(back_right_leg, combine(table, result))))); return result; } vector<GLfloat> build_table() { vector<GLfloat> result; vector<GLfloat> table = to_cartesian_coord(mat_mult(rotation_matrix_y(M_PI-(M_PI/4)), (mat_mult(translation_matrix(-1.7, 0.0, -1.5), mat_mult(scaling_matrix(0.3, 0.08, 1.0), to_homogenous_coord(build_cube())))))); vector<GLfloat> front_left_leg = to_cartesian_coord(mat_mult(rotation_matrix_y(M_PI-(M_PI/4)), (mat_mult(translation_matrix(-1.835, -0.17, -1.987), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))))); vector<GLfloat> front_right_leg = to_cartesian_coord(mat_mult(rotation_matrix_y(M_PI-(M_PI/4)), (mat_mult(translation_matrix(-1.83, -0.17, -1.016), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))))); vector<GLfloat> back_right_leg = to_cartesian_coord(mat_mult(rotation_matrix_y(M_PI-(M_PI/4)), (mat_mult(translation_matrix(-1.56, -0.17, -1.016), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))))); vector<GLfloat> back_left_leg = to_cartesian_coord(mat_mult(rotation_matrix_y(M_PI-(M_PI/4)), (mat_mult(translation_matrix(-1.559, -0.17, -1.984), mat_mult(scaling_matrix(0.03, 0.25, 0.03), to_homogenous_coord(build_cube())))))); result = combine(front_right_leg, combine(front_left_leg, combine(back_left_leg, combine(back_right_leg, combine(table, result))))); return result; } vector<GLfloat> monolith() { vector<GLfloat> monolith; vector<GLfloat> space_oddity = to_cartesian_coord(mat_mult(translation_matrix(3.0, 0.9, 0.5), mat_mult(scaling_matrix(0.07, 2.5, 0.8), to_homogenous_coord(build_cube())))); monolith = combine(space_oddity, monolith); return monolith; } // Construct the scene using objects built from cubes/prisms GLfloat* init_scene() { vector<GLfloat> result; result = combine(monolith(), combine(build_table(), combine(build_bedroom_bench(), combine(build_bed(), result)))); GLfloat* arr = new GLfloat[result.size()]; arr = vector2array(result); return arr; } // Construct the color mapping of the scene GLfloat* init_color() { vector<GLfloat> coloring; // mattress color for (int i = 0; i < 24.0; i++) { coloring.push_back(0.686); coloring.push_back(0.933); coloring.push_back(0.933); } // headboard color for (int i = 25; i < 48.0; i++) { coloring.push_back(0.00); coloring.push_back(0.192); coloring.push_back(0.00); } // pillow color for (int i = 49; i < 70.0; i++) { coloring.push_back(0.482); coloring.push_back(0.820); coloring.push_back(0.800); } // duvet color for (int i = 71.0; i < 96.0; i++) { coloring.push_back(0.961); coloring.push_back(0.871); coloring.push_back(0.702); } // bed bench for (int i = 97.0; i < 124.0; i++) { coloring.push_back(0.741); coloring.push_back(0.718); coloring.push_back(0.420); } // bed bench legs for (int i = 125.0; i < 220.0; i++) { coloring.push_back(1.0); coloring.push_back(1.0); coloring.push_back(1.0); } // side table for (int i = 221.0; i < 244.0; i++) { coloring.push_back(1.00); coloring.push_back(0.855); coloring.push_back(0.725); } // side table legs for (int i = 245.0; i < 342.0; i++) { coloring.push_back(1.0); coloring.push_back(1.0); coloring.push_back(1.0); } // monolith for (int i = 343.0; i < 824.0; i++) { coloring.push_back(0.0); } return vector2array(coloring); } void display_func() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glRotatef(theta, 0.0, 1.0, 0.0); //glRotatef(theta, 1.0, 0.0, 0.0); // Perform display functions GLfloat* vertices = init_scene(); GLfloat* colors = init_color(); glVertexPointer(3, // 3 components (x, y, z) GL_FLOAT, // Vertex type is GL_FLOAT 0, // Start position in referenced memory vertices); // Pointer to memory location to read from //pass the color pointer glColorPointer(3, // 3 components (r, g, b) GL_FLOAT, // Vertex type is GL_FLOAT 0, // Start position in referenced memory colors); // Pointer to memory location to read from // Draw quad point planes: each 4 vertices glDrawArrays(GL_QUADS, 0, (4*6)*15); glFlush(); //Finish rendering glutSwapBuffers(); } void idle_func() { theta = theta+0.5; display_func(); } int main (int argc, char **argv) { // Initialize GLUT glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutInitWindowSize(800, 600); // Create a window with rendering context and everything else we need glutCreateWindow("Assignment 3"); setup(); init_camera(); // Set up our display function glutDisplayFunc(display_func); glutIdleFunc(idle_func); // Render our world glutMainLoop(); delete init_scene(); delete init_color(); return 0; }
32.375566
418
0.586723
[ "render", "object", "vector", "model" ]
22cec8b0a4b6c992ae589ece1f52cc86d9dbacf2
484
cpp
C++
boids_examples/flocking/flocking/src/geometry.cpp
ankurshaswat/Starlings
f69147b13a47804b2d76c40b1f84ee07d57bbe60
[ "MIT" ]
null
null
null
boids_examples/flocking/flocking/src/geometry.cpp
ankurshaswat/Starlings
f69147b13a47804b2d76c40b1f84ee07d57bbe60
[ "MIT" ]
null
null
null
boids_examples/flocking/flocking/src/geometry.cpp
ankurshaswat/Starlings
f69147b13a47804b2d76c40b1f84ee07d57bbe60
[ "MIT" ]
null
null
null
/******************************************************************** * @file geometry.cpp * @author Erik Larsson * @version 1.0 * @section DESCRIPTION * *********************************************************************/ #include "geometry.h" Geometry::Geometry(std::vector<glm::vec2> vertexList) { mVertexList = vertexList; } int Geometry::getVertexCount() const { return mVertexList.size(); } std::vector<glm::vec2> Geometry::getVertices() const { return mVertexList; }
20.166667
70
0.508264
[ "geometry", "vector" ]
22cfb315f80aa79f3d080eaabb50e9e133c49d1b
2,750
cpp
C++
src/Formula.cpp
RonWuYi/cmakelean
a91488c925dd950f21183f86c401ad041e5c6eec
[ "MIT" ]
null
null
null
src/Formula.cpp
RonWuYi/cmakelean
a91488c925dd950f21183f86c401ad041e5c6eec
[ "MIT" ]
null
null
null
src/Formula.cpp
RonWuYi/cmakelean
a91488c925dd950f21183f86c401ad041e5c6eec
[ "MIT" ]
null
null
null
#include "Formula.h" int sum(vector<int> v) { int sum = 0; for (auto i : v) { sum += i; } return sum; } int min_element(vector<int> v) { int min = v[0]; for (auto i : v) { if (i < min) { min = i; } } return min; } int Formula::bla(int arg1) { return arg1 * 2; } int EasySolution::maxSubArray(vector<int>& nums) { int sum = nums[0]; int temp = nums[0]; for (size_t i = 1; i < nums.size(); ++i) { temp = max(nums[i], temp + nums[i]); sum = max(sum, temp); } return sum; } vector<int> EasySolution::preorderTraversal(TreeNode* root) { vector<int> result; if (root == nullptr) { return result; } result.push_back(root->val); vector<int> left = preorderTraversal(root->left); vector<int> right = preorderTraversal(root->right); result.insert(result.end(), left.begin(), left.end()); result.insert(result.end(), right.begin(), right.end()); return result; } vector<int> EasySolution::preorderTraversaliterative(TreeNode* root) { vector<int> answer; stack<TreeNode*> s; if (root) { s.push(root); } TreeNode* cur; while (!s.empty()){ cur = s.top(); s.pop(); answer.push_back(cur->val); if (cur->right) { s.push(cur->right); } if (cur->left) { s.push(cur->left); } } return answer; } vector<int> EasySolution::inorderTraversal(TreeNode* root) { vector<int> result; if (root = nullptr) { return result; } vector<int> left = inorderTraversal(root->left); vector<int> right = inorderTraversal(root->right); result.insert(result.end(), left.begin(), left.end()); result.push_back(root->val); result.insert(result.end(), right.begin(), right.end()); return result; } vector<int> EasySolution::postorderTraversal(TreeNode* root) { vector<int> result; if (root == nullptr) { return result; } vector<int> left = postorderTraversal(root->left); vector<int> right = postorderTraversal(root->right); result.insert(result.end(), left.begin(), left.end()); result.insert(result.end(), right.begin(), right.end()); result.push_back(root->val); return result; } bool MyQueue01::enQueue(int x) { data.push_back(x); return true; } bool MyQueue01::deQueue(){ if (isEmpty()) return false; p_start++; return true;} MovingAverageVector::MovingAverageVector(int size) { data.resize(size); capacity = size; sum = 0; } double MovingAverageVector::next(int val) { for (auto p: data) { sum += p; } return sum/capacity; }
21.653543
68
0.571636
[ "vector" ]
22d06b66a2b5a37f86ba11ee1b2b113b1ac1de08
333
cpp
C++
901-1000/910. Smallest Range II.cpp
erichuang1994/leetcode-solution
d5b3bb3ce2a428a3108f7369715a3700e2ba699d
[ "MIT" ]
null
null
null
901-1000/910. Smallest Range II.cpp
erichuang1994/leetcode-solution
d5b3bb3ce2a428a3108f7369715a3700e2ba699d
[ "MIT" ]
null
null
null
901-1000/910. Smallest Range II.cpp
erichuang1994/leetcode-solution
d5b3bb3ce2a428a3108f7369715a3700e2ba699d
[ "MIT" ]
null
null
null
class Solution { public: int smallestRangeII(vector<int> &A, int K) { sort(begin(A), end(A)); int ret = A.back() - A[0]; int BEGIN = A[0] + K; int END = A.back() - K; for (int i = 0; i < A.size() - 1; ++i) { ret = min(ret, max(A[i] + K, END) - min(A[i + 1] - K, BEGIN)); } return ret; } };
20.8125
68
0.468468
[ "vector" ]
22d70f6a1517bee739169ed8fc75e51c4b09c60f
4,530
cpp
C++
src/ompl/multilevel/datastructures/projections/src/RN_RM.cpp
AbdulrazzakJaroukh/OMPL
e1faf6da1067d1d708f40867c7fe9a18366630af
[ "BSD-3-Clause" ]
1
2022-03-31T14:07:03.000Z
2022-03-31T14:07:03.000Z
src/ompl/multilevel/datastructures/projections/src/RN_RM.cpp
AbdulrazzakJaroukh/OMPL
e1faf6da1067d1d708f40867c7fe9a18366630af
[ "BSD-3-Clause" ]
null
null
null
src/ompl/multilevel/datastructures/projections/src/RN_RM.cpp
AbdulrazzakJaroukh/OMPL
e1faf6da1067d1d708f40867c7fe9a18366630af
[ "BSD-3-Clause" ]
null
null
null
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2020, * Max Planck Institute for Intelligent Systems (MPI-IS). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the MPI-IS nor the names * of its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Andreas Orthey */ #include <ompl/multilevel/datastructures/projections/RN_RM.h> #include <ompl/base/spaces/RealVectorStateSpace.h> using namespace ompl::multilevel; Projection_RN_RM::Projection_RN_RM(ompl::base::StateSpacePtr BundleSpace, ompl::base::StateSpacePtr BaseSpace) : BaseT(BundleSpace, BaseSpace) { setType(PROJECTION_RN_RM); } void Projection_RN_RM::projectFiber(const ompl::base::State *xBundle, ompl::base::State *xFiber) const { const auto *xBundle_RN = xBundle->as<base::RealVectorStateSpace::StateType>(); auto *xFiber_RM = xFiber->as<base::RealVectorStateSpace::StateType>(); for (unsigned int k = getBaseDimension(); k < getDimension(); k++) { xFiber_RM->values[k - getBaseDimension()] = xBundle_RN->values[k]; } } void Projection_RN_RM::project(const ompl::base::State *xBundle, ompl::base::State *xBase) const { const auto *xBundle_RN = xBundle->as<base::RealVectorStateSpace::StateType>(); auto *xBase_RM = xBase->as<base::RealVectorStateSpace::StateType>(); for (unsigned int k = 0; k < getBaseDimension(); k++) { xBase_RM->values[k] = xBundle_RN->values[k]; } } void Projection_RN_RM::lift(const ompl::base::State *xBase, const ompl::base::State *xFiber, ompl::base::State *xBundle) const { auto *xBundle_RN = xBundle->as<base::RealVectorStateSpace::StateType>(); const auto *xBase_RM = xBase->as<base::RealVectorStateSpace::StateType>(); const auto *xFiber_RJ = xFiber->as<base::RealVectorStateSpace::StateType>(); for (unsigned int k = 0; k < getBaseDimension(); k++) { xBundle_RN->values[k] = xBase_RM->values[k]; } for (unsigned int k = getBaseDimension(); k < getDimension(); k++) { xBundle_RN->values[k] = xFiber_RJ->values[k - getBaseDimension()]; } } ompl::base::StateSpacePtr Projection_RN_RM::computeFiberSpace() { unsigned int N1 = getDimension(); unsigned int N0 = getBaseDimension(); unsigned int NX = N1 - N0; base::StateSpacePtr FiberSpace = std::make_shared<base::RealVectorStateSpace>(NX); base::RealVectorBounds Bundle_bounds = std::static_pointer_cast<base::RealVectorStateSpace>(getBundle())->getBounds(); std::vector<double> low; low.resize(NX); std::vector<double> high; high.resize(NX); base::RealVectorBounds Fiber_bounds(NX); for (unsigned int k = 0; k < NX; k++) { Fiber_bounds.setLow(k, Bundle_bounds.low.at(k + N0)); Fiber_bounds.setHigh(k, Bundle_bounds.high.at(k + N0)); } std::static_pointer_cast<base::RealVectorStateSpace>(FiberSpace)->setBounds(Fiber_bounds); return FiberSpace; }
40.446429
110
0.683885
[ "vector" ]
22d98321d911fdafea86270b0a1d60cf748a96d2
12,858
cpp
C++
shell/ext/sendmail/mail.cpp
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
shell/ext/sendmail/mail.cpp
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
shell/ext/sendmail/mail.cpp
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
#include "precomp.h" // pch file #include "mapi.h" #include "sendto.h" #pragma hdrstop // class that implement the MAPI send mail handler typedef struct { TCHAR szTempShortcut[MAX_PATH]; MapiMessage mm; MapiFileDesc mfd[0]; } MAPIFILES; class CMailRecipient : public CSendTo { public: CMailRecipient(); private: BOOL _GetDefaultMailHandler(LPTSTR pszMAPIDLL, DWORD cchMAPIDLL, BOOL *pbWantsCodePageInfo); HMODULE _LoadMailProvider(BOOL *pbWantsCodePageInfo); MAPIFILES *_AllocMAPIFiles(MRPARAM *pmp); void _FreeMAPIFiles(MAPIFILES *pmf); DWORD _grfKeyState; IStream *_pstrmDataObj; // marshalled IDataObject static DWORD CALLBACK s_MAPISendMailThread(void *pv); DWORD _MAPISendMailThread(); protected: HRESULT v_DropHandler(IDataObject *pdtobj, DWORD grfKeyState, DWORD dwEffect); }; // construct the sendto object with the appropriate CLSID. CMailRecipient::CMailRecipient() : CSendTo(CLSID_MailRecipient) { } // read the default mail handler from the regstiry #define MAIL_HANDLER TEXT("Software\\Clients\\Mail") #define MAIL_ATHENA_V1 TEXT("Internet Mail and News") #define MAIL_ATHENA_V2 TEXT("Outlook Express") BOOL CMailRecipient::_GetDefaultMailHandler(LPTSTR pszMAPIDLL, DWORD cchMAPIDLL, BOOL *pbWantsCodePageInfo) { TCHAR szDefaultProg[80]; DWORD cb = SIZEOF(szDefaultProg); *pbWantsCodePageInfo = FALSE; *pszMAPIDLL = 0; if (ERROR_SUCCESS == SHRegGetUSValue(MAIL_HANDLER, TEXT(""), NULL, szDefaultProg, &cb, FALSE, NULL, 0)) { HKEY hkey; TCHAR szProgKey[128]; StrCpyN(szProgKey, MAIL_HANDLER TEXT("\\"), ARRAYSIZE(szProgKey)); StrCpyN(szProgKey, szDefaultProg, ARRAYSIZE(szProgKey)); if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, szProgKey, 0, KEY_QUERY_VALUE, &hkey)) { // ugly, hard code this for OE *pbWantsCodePageInfo = (StrCmpI(szDefaultProg, MAIL_ATHENA_V2) == 0); cb = sizeof(*pszMAPIDLL)*cchMAPIDLL; if (ERROR_SUCCESS != SHQueryValueEx(hkey, TEXT("DLLPath"), 0, NULL, (LPBYTE)pszMAPIDLL, &cb)) { if (StrCmpI(szDefaultProg, MAIL_ATHENA_V1) == 0) { StrCpyN(pszMAPIDLL, TEXT("mailnews.dll"), cchMAPIDLL); } } RegCloseKey(hkey); } } return *pszMAPIDLL; } // load the mail provider, returning a suitable default if we can't read it from the registry HMODULE CMailRecipient::_LoadMailProvider(BOOL *pbWantsCodePageInfo) { TCHAR szMAPIDLL[MAX_PATH]; if (!_GetDefaultMailHandler(szMAPIDLL, ARRAYSIZE(szMAPIDLL), pbWantsCodePageInfo)) { // read win.ini (bogus hu!) for mapi dll provider if (GetProfileString(TEXT("Mail"), TEXT("CMCDLLName32"), TEXT(""), szMAPIDLL, ARRAYSIZE(szMAPIDLL)) <= 0) { StrCpyN(szMAPIDLL, TEXT("mapi32.dll"), ARRAYSIZE(szMAPIDLL)); } } return LoadLibrary(szMAPIDLL); } // allocate a list of MAPI files MAPIFILES* CMailRecipient::_AllocMAPIFiles(MRPARAM *pmp) { MAPIFILES *pmf; int n = SIZEOF(*pmf) + (pmp->nFiles * SIZEOF(pmf->mfd[0]));; pmf = (MAPIFILES*)GlobalAlloc(GPTR, n + (pmp->nFiles * pmp->cchFile * 2)); if (pmf) { pmf->mm.nFileCount = pmp->nFiles; if (pmp->nFiles) { int i; LPSTR pszA = (CHAR *)pmf + n; // thunk buffer pmf->mm.lpFiles = pmf->mfd; CFileEnum MREnum(pmp, NULL); MRFILEENTRY *pFile; i = 0; while (pFile = MREnum.Next()) { // if the first item is a folder, we will create a shortcut to // that instead of trying to mail the folder (that MAPI does not support) SHPathToAnsi(pFile->pszFileName, pszA, pmp->cchFile); pmf->mfd[i].lpszPathName = pszA; pmf->mfd[i].lpszFileName = PathFindFileNameA(pszA); pmf->mfd[i].nPosition = (UINT)-1; pszA += lstrlenA(pszA) + 1; ++i; } } } return pmf; } // free the list of mapi files void CMailRecipient::_FreeMAPIFiles(MAPIFILES *pmf) { if (pmf->szTempShortcut[0]) DeleteFile(pmf->szTempShortcut); GlobalFree(pmf); } // package up the parameters and then kick off a background thread which will do // the processing for the send mail. HRESULT CMailRecipient::v_DropHandler(IDataObject *pdo, DWORD grfKeyState, DWORD dwEffect) { _grfKeyState = grfKeyState; _pstrmDataObj = NULL; HRESULT hr = S_OK; if (pdo) hr = CoMarshalInterThreadInterfaceInStream(IID_IDataObject, pdo, &_pstrmDataObj); if (SUCCEEDED(hr)) { AddRef(); if (!SHCreateThread(s_MAPISendMailThread, this, CTF_PROCESS_REF|CTF_FREELIBANDEXIT|CTF_COINIT, NULL)) { Release(); hr = E_FAIL; } } if (FAILED(hr) && _pstrmDataObj) { _pstrmDataObj->Release(); _pstrmDataObj = NULL; } return hr; } DWORD CALLBACK CMailRecipient::s_MAPISendMailThread(void *pv) { CMailRecipient *pmr = (CMailRecipient *)pv; return pmr->_MAPISendMailThread(); } // handler for the drop. this creates a list of files and then passes the object to // another thread which inturn releases it. DWORD CMailRecipient::_MAPISendMailThread() { HRESULT hr = S_OK; MRPARAM *pmp = (MRPARAM*)GlobalAlloc(GPTR, SIZEOF(*pmp)); if (pmp) { // if we have an IDataObject stream then lets unmarshall it and // create the file list from it. if (_pstrmDataObj) { IDataObject *pdo; hr = CoGetInterfaceAndReleaseStream(_pstrmDataObj, IID_PPV_ARG(IDataObject, &pdo)); if (SUCCEEDED(hr)) { hr = CreateSendToFilesFromDataObj(pdo, _grfKeyState, pmp); pdo->Release(); } _pstrmDataObj = NULL; } // lets build the MAPI information so that we can send the files. if (SUCCEEDED(hr)) { MAPIFILES *pmf = _AllocMAPIFiles(pmp); if (pmf) { TCHAR szText[4096+512] ={0}; // body text (with enough room for prefix/postfix) TCHAR szTemp[4096] = {0}; TCHAR szTitle[256] = {0}; CHAR szTextA[ARRAYSIZE(szText)], szTitleA[ARRAYSIZE(szTitle)]; if (pmf->mm.nFileCount) { CFileEnum MREnum(pmp, NULL); MRFILEENTRY *pFile; LoadString(g_hinst, IDS_SENDMAIL_MSGTITLE, szTitle, ARRAYSIZE(szTitle)); // release our stream objects for (int iFile = 0; (NULL != (pFile = MREnum.Next())); iFile++) { if (iFile>0) { StrCatBuff(szTitle, TEXT(", "), ARRAYSIZE(szTitle)); StrCatBuff(szTemp, TEXT("\n\r"), ARRAYSIZE(szTemp)); } TCHAR szTarget[MAX_PATH]; hr = GetShortcutTarget(pFile->pszFileName, szTarget, ARRAYSIZE(szTarget)); if (SUCCEEDED(hr)) { TCHAR szFmt[128], szString[MAX_PATH+ARRAYSIZE(szFmt)]; LoadString(g_hinst, IDS_SENDMAIL_SHORTCUTTO, szFmt, ARRAYSIZE(szFmt)); StringCchPrintf(szString, ARRAYSIZE(szString), szFmt, szTarget); StrCatBuff(szTemp, szString, ARRAYSIZE(szTemp)); } else { StrCatBuff(szTemp, pFile->pszTitle, ARRAYSIZE(szTemp)); } StrCatBuff(szTitle, pFile->pszTitle, ARRAYSIZE(szTitle)); // can change this logic once CFileStream supports STGM_DELETE_ON_RELEASE ATOMICRELEASE(pFile->pStream); } LoadString(g_hinst, IDS_SENDMAIL_MSGBODY, szText, ARRAYSIZE(szText)); // prefix StrCatBuff(szText, szTemp, ARRAYSIZE(szText)); // file list LoadString(g_hinst, IDS_SENDMAIL_MSGPOSTFIX, szTemp, ARRAYSIZE(szTemp)); StrCatBuff(szText, szTemp, ARRAYSIZE(szText)); // postfix // Don't fill in lpszNoteText if we know we are sending documents because OE will puke on it SHTCharToAnsi(szText, szTextA, ARRAYSIZE(szTextA)); if (!(pmp->dwFlags & MRPARAM_DOC)) { pmf->mm.lpszNoteText = szTextA; } else { Assert(pmf->mm.lpszNoteText == NULL); } SHTCharToAnsi(szTitle, szTitleA, ARRAYSIZE(szTitleA)); pmf->mm.lpszSubject = szTitleA; } BOOL bWantsCodePageInfo = FALSE; HMODULE hmodMail = _LoadMailProvider(&bWantsCodePageInfo); if (bWantsCodePageInfo && (pmp->dwFlags & MRPARAM_USECODEPAGE)) { // When this flag is set, we know that we have just one file to send and we have a code page // Athena will then look at ulReserved for the code page // Will the other MAPI handlers puke on this? -- dli ASSERT(pmf->mm.nFileCount == 1); pmf->mfd[0].ulReserved = ((MRPARAM *)pmp)->uiCodePage; } if (hmodMail) { LPMAPISENDMAIL pfnSendMail = (LPMAPISENDMAIL)GetProcAddress(hmodMail, "MAPISendMail"); if (pfnSendMail) { pfnSendMail(0, 0, &pmf->mm, MAPI_LOGON_UI | MAPI_DIALOG, 0); } FreeLibrary(hmodMail); } _FreeMAPIFiles(pmf); } } CleanupPMP(pmp); } else { hr = E_OUTOFMEMORY; } Release(); return 0; } // construct the send to mail recipient object STDAPI MailRecipient_CreateInstance(IUnknown *punkOuter, IUnknown **ppunk, LPCOBJECTINFO poi) { *ppunk = NULL; // assume failure if ( punkOuter ) return CLASS_E_NOAGGREGATION; CMailRecipient *psm = new CMailRecipient; if ( !psm ) return E_OUTOFMEMORY; HRESULT hr = psm->QueryInterface(IID_PPV_ARG(IUnknown, ppunk)); psm->Release(); return hr; } // handle registration / link creation for the send mail verb #define SENDMAIL_EXTENSION TEXT("MAPIMail") #define EXCHANGE_EXTENSION TEXT("lnk") STDAPI MailRecipient_RegUnReg(BOOL bReg, HKEY hkCLSID, LPCTSTR pszCLSID, LPCTSTR pszModule) { TCHAR szFile[MAX_PATH]; if (bReg) { HKEY hk; CommonRegister(hkCLSID, pszCLSID, SENDMAIL_EXTENSION, IDS_MAIL_FILENAME); if (RegCreateKeyEx(hkCLSID, DEFAULTICON, 0, NULL, 0, KEY_SET_VALUE,NULL, &hk, NULL) == ERROR_SUCCESS) { TCHAR szIcon[MAX_PATH + 10]; StringCchPrintf(szIcon, ARRAYSIZE(szIcon), TEXT("%s,-%d"), pszModule, IDI_MAIL); RegSetValueEx(hk, NULL, 0, REG_SZ, (LPBYTE)szIcon, (lstrlen(szIcon) + 1) * SIZEOF(TCHAR)); RegCloseKey(hk); } // hide the exchange shortcut if (SUCCEEDED(GetDropTargetPath(szFile, ARRAYSIZE(szFile), IDS_MAIL_FILENAME, EXCHANGE_EXTENSION))) { SetFileAttributes(szFile, FILE_ATTRIBUTE_HIDDEN); } } else { if (SUCCEEDED(GetDropTargetPath(szFile, ARRAYSIZE(szFile), IDS_MAIL_FILENAME, SENDMAIL_EXTENSION))) { DeleteFile(szFile); } // unhide the exchange shortcut if (SUCCEEDED(GetDropTargetPath(szFile, ARRAYSIZE(szFile), IDS_MAIL_FILENAME, EXCHANGE_EXTENSION))) { SetFileAttributes(szFile, FILE_ATTRIBUTE_NORMAL); } } return S_OK; }
33.310881
114
0.545575
[ "object" ]
22e0611201fbf18cc2cfc1fa32da8d590f9e58c4
5,665
hpp
C++
include/optimization/cost_functors.hpp
andretag/gp
c969f4ef3a1e27a2d02af230a4c964681aaf3c5f
[ "BSD-3-Clause" ]
null
null
null
include/optimization/cost_functors.hpp
andretag/gp
c969f4ef3a1e27a2d02af230a4c964681aaf3c5f
[ "BSD-3-Clause" ]
null
null
null
include/optimization/cost_functors.hpp
andretag/gp
c969f4ef3a1e27a2d02af230a4c964681aaf3c5f
[ "BSD-3-Clause" ]
null
null
null
/* * Copyright (c) 2016, The Regents of the University of California (Regents). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * Please contact the author(s) of this library if you have any questions. * Authors: David Fridovich-Keil ( dfk@eecs.berkeley.edu ) */ /////////////////////////////////////////////////////////////////////////////// // // Cost functors for Ceres. // /////////////////////////////////////////////////////////////////////////////// #ifndef GP_OPTIMIZATION_COST_FUNCTORS_H #define GP_OPTIMIZATION_COST_FUNCTORS_H #include "../process/gaussian_process.hpp" #include "../kernels/kernel.hpp" #include <ceres/ceres.h> #include <glog/logging.h> #include <math.h> namespace gp { // Compute twice the negative log-likelihood of the training data of a GP // and the gradient against all the parameters of the kernel. class TrainingLogLikelihood : public ceres::FirstOrderFunction { public: // Inputs: training points, training targets, kernel, and noise. // Optimization variables: kernel parameters. TrainingLogLikelihood(const PointSet& points, const VectorXd* targets, const Kernel::Ptr& kernel, double noise) : points_(points), targets_(targets), kernel_(kernel), noise_(noise) { CHECK_NOTNULL(targets); CHECK_NOTNULL(points.get()); CHECK_NOTNULL(kernel.get()); CHECK_EQ(points->size(), targets->size()); CHECK_GE(points->size(), 1); CHECK_GT(noise, 0.0); } // Evaluate objective function and gradient. For details please see // R&W, pg. 113/4, eqs. 5.8/9. For simplicity we leave off the constant. bool Evaluate(const double* const parameters, double* cost, double* gradient) const { // Update the kernel. for (size_t ii = 0; ii < NumParameters(); ii++) kernel_->Params()(ii) = parameters[ii]; // Create a new GP model and extract computed variables. GaussianProcess gp(kernel_, noise_, points_, *targets_, points_->size()); const Eigen::LLT<MatrixXd>& llt = gp.ImmutableCholesky(); const VectorXd& regressed = gp.ImmutableRegressedTargets(); const MatrixXd& L = llt.matrixL(); const size_t N = points_->size(); // Compute log det of covariance matrix. double logdet = 0.0; for (size_t ii = 0; ii < N; ii++) logdet += std::log(L(ii, ii)); logdet *= 2.0; // Evaluate cost. Add a log barrier so that parameters don't go negative. double barrier = 0.0; const double kBarrierScaling = 1e3; for (size_t ii = 0; ii < NumParameters(); ii++) barrier -= std::log(kBarrierScaling * parameters[ii]); *cost = targets_->head(N).dot(regressed.head(N)) + logdet + barrier; // Maybe compute gradient. if (gradient) { MatrixXd dK(N, N); for (size_t ii = 0; ii < NumParameters(); ii++) { // Compute the derivative of covariance against the ii'th parameter. for (size_t jj = 0; jj < N; jj++) { dK(jj, jj) = kernel_->Partial(points_->at(jj), points_->at(jj), ii); for (size_t kk = 0; kk < jj; kk++) { dK(jj, kk) = kernel_->Partial(points_->at(jj), points_->at(kk), ii); dK(kk, jj) = dK(jj, kk); } } // Compute the gradient. Must add the gradient of the log barrier. gradient[ii] = llt.solve(dK).trace() - 1.0 / parameters[ii] - regressed.head(N).dot(dK * regressed.head(N)); } } return true; } // Number of parameters in the problem. int NumParameters() const { return static_cast<int>(kernel_->ImmutableParams().size()); } EIGEN_MAKE_ALIGNED_OPERATOR_NEW private: // Inputs: training points, training targets, kernel, and noise. // Optimization variables: kernel parameters. const PointSet points_; const VectorXd* targets_; const Kernel::Ptr kernel_; const double noise_; }; // struct TrainingLogLikelihood } // namespace gp #endif
37.516556
80
0.635128
[ "model" ]
22e0fd5aa0864236ed98d7d9f840a1d62b5e11a5
749
cpp
C++
c++/kmp.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
38
2018-09-17T18:16:24.000Z
2022-02-10T10:26:23.000Z
c++/kmp.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
1
2020-10-01T10:48:45.000Z
2020-10-04T11:27:44.000Z
c++/kmp.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
12
2018-11-13T13:36:41.000Z
2021-05-02T10:07:44.000Z
/// Name: KMP /// Description: Algorithm to match a given pattern with given string /// Detail: String, KMP, Maximum Suffix Prefix /// Guarantee: } // KMP vector<int> prefix_function(string s) { int n = (int)s.length(); vector<int> pi(n); for (int i = 1; i < n; i++) { int j = pi[i - 1]; while (j > 0 && s[i] != s[j]) j = pi[j - 1]; if (s[i] == s[j]) j++; pi[i] = j; } return pi; } int kmp(string &s, string &p) { string sp = s + "#" + p; auto pre = prefix_function(sp); int match = 0; for (int i = s.size() + 1; i < sp.size(); i++) { if (pre[i] == p.size()) match++; } return match; }
22.029412
70
0.440587
[ "vector" ]
22e3fcd3dbc33e8e949f8a445ac8bbb8e8573097
1,207
hpp
C++
third_party/boost/simd/function/negate.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
5
2018-02-20T11:21:12.000Z
2019-11-12T13:45:09.000Z
third_party/boost/simd/function/negate.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
null
null
null
third_party/boost/simd/function/negate.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
2
2017-12-12T12:29:52.000Z
2019-04-08T15:55:25.000Z
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //================================================================================================== #ifndef BOOST_SIMD_FUNCTION_NEGATE_HPP_INCLUDED #define BOOST_SIMD_FUNCTION_NEGATE_HPP_INCLUDED #if defined(DOXYGEN_ONLY) namespace boost { namespace simd { /*! @ingroup group-ieee Function object implementing negate capabilities Retuns the first element multiplied by the @ref sign of the second. @par Semantic: @code auto r = negate(x,y); @endcode is similar to: @code auto r = x*sign(y); @endcode @par Note If y is @ref Zero the result is zero. This can be avoided using @ref negatenz or @ref copysign. @see sign, negatenz, copysign, Mzero, is_positive, is_negative **/ Value negate(Value const & x, Value const& y); } } #endif #include <boost/simd/function/scalar/negate.hpp> #include <boost/simd/function/simd/negate.hpp> #endif
23.211538
100
0.584921
[ "object" ]
22e3fd14a8255ab98d0634c40b970ddfdf9cb593
3,141
cpp
C++
Biosphere/Source/bio/biocoenosis/flora/app/App.cpp
PMArkive/Biosphere
baf62450b084ce327c3fc2eb0aa918e32462164e
[ "MIT" ]
1
2021-09-10T17:18:51.000Z
2021-09-10T17:18:51.000Z
Biosphere/Source/bio/biocoenosis/flora/app/App.cpp
PMArkive/Biosphere
baf62450b084ce327c3fc2eb0aa918e32462164e
[ "MIT" ]
null
null
null
Biosphere/Source/bio/biocoenosis/flora/app/App.cpp
PMArkive/Biosphere
baf62450b084ce327c3fc2eb0aa918e32462164e
[ "MIT" ]
null
null
null
#include <bio/biocoenosis/flora/app/App.hpp> namespace bio::app { static bool ainit = false; static RunMode rmode = RunMode::Subprocess; static hipc::Object *apsrv = NULL; static hipc::Object *approxy = NULL; static applet::LibraryAppletCreator *lac = NULL; static applet::SelfController *sc = NULL; Result Initialize(RunMode Mode) { Result rc; if(!ainit) { sm::Initialize().AssertOk(); switch(Mode) { case RunMode::Application: apsrv = (hipc::Object*)applet::oe::Initialize().AssertOk(); approxy = (hipc::Object*)((applet::oe::OeService*)apsrv)->OpenApplicationProxy(0).AssertOk(); sc = ((applet::ApplicationProxy*)approxy)->GetSelfController().AssertOk(); lac = ((applet::ApplicationProxy*)approxy)->GetLibraryAppletCreator().AssertOk(); break; case RunMode::LibraryApplet: apsrv = (hipc::Object*)applet::ae::Initialize().AssertOk(); approxy = (hipc::Object*)((applet::ae::AeService*)apsrv)->OpenLibraryAppletProxyOld(0).AssertOk(); sc = ((applet::ae::LibraryAppletProxy*)approxy)->GetSelfController().AssertOk(); lac = ((applet::ae::LibraryAppletProxy*)approxy)->GetLibraryAppletCreator().AssertOk(); break; case RunMode::SystemApplet: apsrv = (hipc::Object*)applet::ae::Initialize().AssertOk(); approxy = (hipc::Object*)((applet::ae::AeService*)apsrv)->OpenSystemAppletProxy(0).AssertOk(); sc = ((applet::ae::LibraryAppletProxy*)approxy)->GetSelfController().AssertOk(); lac = ((applet::ae::LibraryAppletProxy*)approxy)->GetLibraryAppletCreator().AssertOk(); break; default: break; } rmode = Mode; ainit = true; } return rc; } void Finalize() { if(ainit) { if(IsAppletOrApplication()) { delete lac; delete sc; delete approxy; delete apsrv; } sm::Finalize(); ainit = false; } } bool HasInitialized() { return ainit; } bool IsApplet() { return ((rmode == RunMode::LibraryApplet) || (rmode == RunMode::SystemApplet) || (rmode == RunMode::OverlayApplet)); } bool IsApplication() { return ((rmode == RunMode::Application) || (rmode == RunMode::SystemApplication)); } bool IsAppletOrApplication() { return (rmode != RunMode::Subprocess); } bool IsSubprocess() { return !IsAppletOrApplication(); } hipc::Object *GetProxyObject() { return approxy; } applet::SelfController *GetSelfController() { return sc; } applet::LibraryAppletCreator *GetLibraryAppletCreator() { return lac; } }
30.794118
124
0.529449
[ "object" ]
22ea257458ad9a4adcfd063757983b5407683020
7,844
cpp
C++
010_safe_zone_detection.cpp
DreamVu/Code-Samples
2fccd9e649fbe7d9895df7d799cb1ec33066d1c2
[ "MIT" ]
null
null
null
010_safe_zone_detection.cpp
DreamVu/Code-Samples
2fccd9e649fbe7d9895df7d799cb1ec33066d1c2
[ "MIT" ]
null
null
null
010_safe_zone_detection.cpp
DreamVu/Code-Samples
2fccd9e649fbe7d9895df7d799cb1ec33066d1c2
[ "MIT" ]
null
null
null
/* CODE SAMPLE # 010: Safe Zone Detection This code sample allows users to run Safe Zone Detection. >>>>>> Compile this code using the following command.... g++ 010_safe_zone_detection.cpp /usr/src/tensorrt/bin/common/logger.o ../lib/libPAL.so ../lib/libPAL_CAMERA.so ../lib/libPAL_DEPTH_HQ.so ../lib/libPAL_DEPTH_128.so ../lib/libPAL_DE.so ../lib/libPAL_EDET.so `pkg-config --libs --cflags opencv` -g -o 010_safe_zone_detection.out -I../include/ -lv4l2 -lpthread -lcudart -L/usr/local/cuda/lib64 -lnvinfer -lnvvpi -lnvparsers -lnvinfer_plugin -lnvonnxparser -lmyelin -lnvrtc -lcudart -lcublas -lcudnn -lrt -ldl >>>>>> Execute the binary file by typing the following command... ./010_safe_zone_detection.out >>>>>> KEYBOARD CONTROLS: Press ESC to close the window Press f/F to toggle filter rgb property Press d/D to toggle fast depth property Press v/V to toggle vertical flip property Press r/R to toggle near range property Press l/L to switch floor mode Press i/I to switch intermediate mode Press t/T to switch table top mode Press c/C to switch ceiling mode Press a/A to switch auto mode */ # include <chrono> # include <stdio.h> # include <opencv2/opencv.hpp> # include "PAL.h" using namespace cv; using namespace std; using namespace std::chrono; namespace PAL { namespace Internal { void EnableDepth(bool flag); void MinimiseCompute(bool flag); } } void setLabel(cv::Mat& input, const std::string label, const cv::Point org, cv::Scalar clr) { int fontface = cv::FONT_HERSHEY_SIMPLEX; double scale = 0.8; int thickness = 2; int baseline = 0; cv::Size text = cv::getTextSize(label, fontface, scale, thickness, &baseline); cv::rectangle(input, org + cv::Point(0, baseline), org + cv::Point(text.width, -text.height), CV_RGB(0,0,0), cv::FILLED); cv::putText(input, label, org, fontface, scale, clr, thickness, 4); } int main(int argc, char *argv[]) { namedWindow( "PAL Safe Zone Detection", WINDOW_NORMAL ); // Create a window for display. //Depth should be enabled for this code sample as a prerequisite bool isDepthEnabled = true; PAL::Internal::EnableDepth(isDepthEnabled); PAL::Internal::MinimiseCompute(false); int width, height; if(PAL::Init(width, height,-1) != PAL::SUCCESS) //Connect to the PAL camera { printf("Camera Init failed\n"); return 1; } PAL::CameraProperties data; PAL::Acknowledgement ack = PAL::LoadProperties("../Explorer/SavedPalProperties.txt", &data); if(ack != PAL::SUCCESS) { printf("Error Loading settings\n"); } PAL::CameraProperties prop; unsigned int flag = PAL::MODE; flag = flag | PAL::FD; flag = flag | PAL::NR; flag = flag | PAL::FILTER_SPOTS; flag = flag | PAL::VERTICAL_FLIP; prop.mode = PAL::Mode::DETECTION; prop.fd = 1; prop.nr = 0; prop.filter_spots = 1; prop.vertical_flip =0; PAL::SetCameraProperties(&prop, &flag); //If a command line argument is passed then that will be taken as threshold float threshold = (argc>1) ? atof(argv[1]) : 0.35; float safe_distance = (argc>2) ? atof(argv[2]) : 200.0f; if(PAL::InitPersonDetection(threshold)!= PAL::SUCCESS) //Initialise person detection pipeline { printf("Safe Zone Detection Init failed\n"); return 1; } //width and height are the dimensions of each panorama. //Each of the panoramas are displayed at quarter their original resolution. //Since the left+right+disparity are vertically stacked, the window height should be thrice the quarter-height resizeWindow("PAL Safe Zone Detection", width/4, (height/4)*3); int key = ' '; printf("Press ESC to close the window\n"); printf("Press f/F to toggle filter rgb property\n"); printf("Press d/D to toggle fast depth property\n"); printf("Press v/V to toggle vertical flip property\n"); printf("Press r/R to toggle near range property\n"); printf("Press l/L to switch floor mode\n"); printf("Press i/I to switch intermediate mode\n"); printf("Press t/T to switch table top mode\n"); printf("Press c/C to switch ceiling mode\n"); printf("Press a/A to switch auto mode\n"); bool filter_spots = true; bool flip = false; bool fd = true; bool nr = false; //27 = esc key. Run the loop until the ESC key is pressed int k=0; while(key != 27) { cv::Mat rgb, depth, output,right; std::vector<PAL::BoundingBox> Boxes; vector<float> DepthValues; //Function to Query //Image data: rgb & depth panoramas //Person detection data: Bounding boxes of each person detected. PAL::GetPeopleDetection(rgb,right, depth, &Boxes, DepthValues); int num_of_persons = Boxes.size(); char text[128]; for(int i =0; i<num_of_persons; i++) { sprintf(text, "Depth:%.2fm", DepthValues[i]/100); if(DepthValues[i] > safe_distance) { cv::rectangle(rgb,Point(Boxes[i].x1, Boxes[i].y1), Point(Boxes[i].x2, Boxes[i].y2), cv::Scalar(0,255,0), 2); setLabel(rgb, text, Point(Boxes[i].x1, Boxes[i].y1), CV_RGB(0,255,0)); } else { cv::rectangle(rgb,Point(Boxes[i].x1, Boxes[i].y1), Point(Boxes[i].x2, Boxes[i].y2), cv::Scalar(0,0,255), 2); setLabel(rgb, text, Point(Boxes[i].x1, Boxes[i].y1), CV_RGB(255,0,0)); } } imshow( "PAL Safe Zone Detection", rgb); //Wait for the keypress - with a timeout of 1 ms key = waitKey(1) & 255; if (key == 'f' || key == 'F') { PAL::CameraProperties prop; filter_spots = !filter_spots; prop.filter_spots = filter_spots; unsigned int flags = PAL::FILTER_SPOTS; PAL::SetCameraProperties(&prop, &flags); } if (key == 'v' || key == 'V') { PAL::CameraProperties prop; flip = !flip; prop.vertical_flip = flip; unsigned int flags = PAL::VERTICAL_FLIP; PAL::SetCameraProperties(&prop, &flags); } if (key == 'l' || key == 'L') { PAL::CameraProperties prop; prop.mode = PAL::Mode::DETECTION; prop.detection_mode = PAL::FLOOR; unsigned int flags = PAL::DETECTION_MODE | PAL::MODE; PAL::SetCameraProperties(&prop, &flags); } if (key == 't' || key == 'T') { PAL::CameraProperties prop; prop.mode = PAL::Mode::DETECTION; prop.detection_mode = PAL::TABLE_TOP; unsigned int flags = PAL::DETECTION_MODE | PAL::MODE; PAL::SetCameraProperties(&prop, &flags); } if (key == 'c' || key == 'C') { PAL::CameraProperties prop; prop.mode = PAL::Mode::DETECTION; prop.detection_mode = PAL::CEILING; unsigned int flags = PAL::DETECTION_MODE | PAL::MODE; PAL::SetCameraProperties(&prop, &flags); } if (key == 'i' || key == 'I') { PAL::CameraProperties prop; prop.mode = PAL::Mode::DETECTION; prop.detection_mode = PAL::INTERMEDIATE; unsigned int flags = PAL::DETECTION_MODE | PAL::MODE; PAL::SetCameraProperties(&prop, &flags); } if (key == 'a' || key == 'A') { PAL::CameraProperties prop; prop.mode = PAL::Mode::DETECTION; prop.detection_mode = PAL::AUTO; unsigned int flags = PAL::DETECTION_MODE | PAL::MODE; PAL::SetCameraProperties(&prop, &flags); } if(key == 'd' || key == 'D') { PAL::CameraProperties prop; fd = !fd; prop.fd = fd; unsigned int flags = PAL::FD; PAL::SetCameraProperties(&prop, &flags); } if(key == 'r' || key == 'R') { PAL::CameraProperties prop; nr = !nr; prop.nr = nr; unsigned int flags = PAL::NR; PAL::SetCameraProperties(&prop, &flags); } PAL::CameraProperties properties; GetCameraProperties(&properties); filter_spots = properties.filter_spots; flip = properties.vertical_flip; fd = properties.fd; nr = properties.nr; } printf("exiting the application\n"); PAL::Destroy(); return 0; }
31.629032
464
0.649669
[ "vector" ]
22ea3c437b5f83e7005cd4173d4196dd3df39848
53,490
cc
C++
applications/surfel_meshing/src/surfel_meshing/octree.cc
ulricheck/surfelmeshing
bacaf70a1877185af844b31597cb59d4cbed0722
[ "BSD-3-Clause" ]
1
2018-11-10T06:10:24.000Z
2018-11-10T06:10:24.000Z
applications/surfel_meshing/src/surfel_meshing/octree.cc
ulricheck/surfelmeshing
bacaf70a1877185af844b31597cb59d4cbed0722
[ "BSD-3-Clause" ]
null
null
null
applications/surfel_meshing/src/surfel_meshing/octree.cc
ulricheck/surfelmeshing
bacaf70a1877185af844b31597cb59d4cbed0722
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2018 ETH Zürich, Thomas Schöps // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #define LIBVIS_ENABLE_TIMING #include "surfel_meshing/octree.h" #include <glog/logging.h> #include <libvis/timing.h> namespace vis { usize OctreeNode::CountSurfelsRecursive() const { usize result = surfels.size(); for (int i = 0; i < 8; ++ i) { if (children[i]) { result += children[i]->CountSurfelsRecursive(); } } return result; } CompressedOctree::CompressedOctree( usize max_surfels_per_node, std::vector<Surfel>* surfels, vector<SurfelTriangle>* triangles) { root_ = nullptr; max_surfels_per_node_ = max_surfels_per_node; surfels_ = surfels; triangles_ = triangles; numerical_issue_counter_ = 0; } CompressedOctree::~CompressedOctree() { if (root_) { DeleteNode(root_); } } void CompressedOctree::AddSurfel(u32 surfel_index, Surfel* surfel) { // Check if the root node has to be created. if (!root_) { CreateRootForSurfel(surfel_index, surfel); return; } // Check whether the surfel is outside the root node. if (!root_->Contains(surfel->position())) { ExtendRootForSurfel(surfel_index, surfel->position()); return; } // The new surfel is within the root node's extent. Lazily add it to the root // node's surfel list (it will be sorted down when needed). root_->AddSurfel(surfel_index, surfel); } void CompressedOctree::AddSurfelActive(u32 surfel_index, Surfel* surfel) { // Check if the root node has to be created. if (!root_) { CreateRootForSurfel(surfel_index, surfel); return; } // Check whether the surfel is outside the root node. if (!root_->Contains(surfel->position())) { ExtendRootForSurfel(surfel_index, surfel->position()); return; } // The new surfel is within the root node's extent. Locate the smallest // node containing the surfel. OctreeNode* node = root_; int child_index = 0; while (true) { child_index = node->ComputeChildIndex(surfel->position()); OctreeNode* child = node->children[child_index]; if (child == nullptr) { // Found the smallest node. break; } else if (child->Contains(surfel->position())) { // Descend. node = child; } else { // There is a child for this quarter, but it does not contain the new // surfel. Insert a new level in-between. We know that the new level // will be between the parent and the child level, so we can start by // determining the coordinates of the old child and the new surfel // in units of the old child size, within the parent. Then looking // at the bit representation of the coordinates gives us the suitable // in-between level. This is similar to one of the cases below. OctreeNode* new_node; if (!InsertIntermediateLevel(surfel->position(), node, child_index, child, &new_node)) { LOG(WARNING) << "Encountered a case which should not happen."; node->AddSurfel(surfel_index, surfel); return; } // Insert the new surfel into a new quarter leaf of the new node. SortSurfelDownwards(new_node, surfel_index); return; } } if (node->IsLeaf()) { // If the maximum surfel count for this node is not reached yet, add the // new surfel to this node. if (node->surfels.size() < max_surfels_per_node_) { node->AddSurfel(surfel_index, surfel); } else { // There are too many surfels in this leaf node. Split up the node // such that at least one surfel gets split into a different child // than the others: // * Determine the bounding box of the contained surfels. // * Compute the smallest node that contains the box and is compatible // with the containing node. This neccessarily splits up the // surfels (into different ones of its quarters), since any smaller // node would not contain the whole box anymore. // * Insert this node (if it is not equal to the containing node). // * Sort all surfels in the containing node into the new nodes // (and possibly additional new quarter leaves). // * If the containing node only contains one child as a result, // remove it (and directly use its child). Eigen::AlignedBox<float, 3> bbox; for (usize i = 0, size = node->surfels.size(); i < size; ++ i) { u32 index = node->surfels[i]; bbox.extend(surfels_->at(index).position()); } bbox.extend(surfel->position()); // Compute the level having the largest cells such that the surfels // can definitely be separated (from the x, y, z distances of the // surfels: choose the cell size to be at most the minimum distance). float dist_x = bbox.max().x() - bbox.min().x(); float dist_y = bbox.max().y() - bbox.min().y(); float dist_z = bbox.max().z() - bbox.min().z(); float dist_max; if (dist_x > dist_y) { if (dist_x > dist_z) { dist_max = dist_x; } else { dist_max = dist_z; } } else { if (dist_y > dist_z) { dist_max = dist_y; } else { dist_max = dist_z; } } if (dist_max == 0) { // We cannot separate these surfels. Give up and violate the maximum // surfel count (the next addition to this node will try again). // LOG(WARNING) << "Cannot separate surfels in a full cell, violating maximum surfel count"; node->AddSurfel(surfel_index, surfel); } else { float node_extent = 2 * node->half_extent; // Compute floor(-1 * std::log2f(dist_max / node_extent)) in a fast way. // Slow code: // int level = -1 * std::log2f(dist_max / node_extent); // Round down in cast to int. // Values of rounded_factor: // For dist_max in ]0.5, 1[ * node_extent: 1 // For dist_max in ]0.25, 0.5] * node_extent: 2 or 3 // For dist_max in ]0.125, 0.25] * node_extent: 4 or 5 or 6 or 7, ... unsigned int rounded_factor = node_extent / dist_max; // Round down in cast to int. if (rounded_factor == 0) { rounded_factor = 1; } // Count leading zeros in rounded_factor and invert the result to get // the number of "occupied" bits. Subtract 1 to get log2(rounded_factor). // Note that __builtin_clz() is undefined if its argument is 0. int level = (8 * sizeof(unsigned int)) - __builtin_clz(rounded_factor) - 1; // level is 0 if sorting the surfels into the quarters of the current // node will definitely separate them (their max distance is in // ]half_extent, 2 * half_extent[), 1 if a new node within a quarter // will definitely separate them (their max distance is in // [half_extent, 0.5 * half_extent[), etc. OctreeNode* current_node = node; if (level > 0) { float min_cell_quarter_extent = node_extent / (1 << (level + 1)); int level_difference_plus_one = GetMinLevelContaining(bbox.min(), bbox.max(), node->min, min_cell_quarter_extent); if (level_difference_plus_one == 0) { // Should not happen. Give up and violate the maximum // surfel count (the next addition to this node will try again). // LOG(WARNING) << "Cannot split up a full node because the surfels are still in the same node on the computed resolution. Violating the maximum surfel count."; node->AddSurfel(surfel_index, surfel); return; } else { level -= level_difference_plus_one - 1; if (level > 0) { // Create the new node on the level that was computed. int current_node_child_index; current_node = node->CreateChild(level, bbox.min(), &current_node_child_index, /*add_as_child*/ true); } } } // Sort all surfels into current_node, respectively additional new // quarter leaves in current_node and the containing node. usize size = node->surfels.size(); for (usize i = 0; i < size; ++ i) { u32 index = node->surfels[i]; SortSurfelDownwards(current_node, index); } node->EraseSurfels(0, size - 1); // Keep any surfels which may have been added to the back. SortSurfelDownwards(current_node, surfel_index); // If the containing node only contains one child as a result, // remove it (and directly use its child). if (node->child_count == 1 && node->IsEmpty()) { RemoveSingleChildNode(node); } } } } else { // Create a new leaf node in a previously unoccupied quarter. OctreeNode* child = new OctreeNode(node->GetQuarterMidpoint(child_index), 0.5f * node->half_extent); node->AddChild(child, child_index); child->AddSurfel(surfel_index, surfel); } } void CompressedOctree::RemoveSurfel(u32 surfel_index) { Surfel* surfel = &surfels_->at(surfel_index); OctreeNode* node = surfel->node(); #ifdef KEEP_TRIANGLES_IN_OCTREE // Remove the triangles connected to the surfel. for (int triangle_index_in_surfel = 0, end = surfel->GetTriangleCount(); triangle_index_in_surfel < end; ++ triangle_index_in_surfel) { u32 triangle_index = surfel->GetTriangle(triangle_index_in_surfel); const SurfelTriangle& triangle = triangles_->at(triangle_index); if (triangle.index(0) == surfel_index || triangle.index(1) == surfel_index || triangle.index(2) == surfel_index) { RemoveTriangle(triangle_index, triangle); } } #endif // Remove the surfel. node->EraseSurfel(surfel->index_in_node(), surfels_); if (node->IsEmpty()) { if (node->IsLeaf()) { RemoveEmptyLeaf(node); } else if (node->child_count == 1) { RemoveSingleChildNode(node); } } } #ifdef KEEP_TRIANGLES_IN_OCTREE void CompressedOctree::AddTriangle(u32 triangle_index, const SurfelTriangle& /*triangle*/) { if (!root_) { LOG(ERROR) << "AddTriangle() called, but no root node exists. This must not happen since at least 3 surfels (the triangle corners) should be in the octree. Not adding the triangle."; return; } root_->AddTriangle(triangle_index); } void CompressedOctree::RemoveTriangle(u32 triangle_index, const SurfelTriangle& triangle) { // Remove the triangle from the (up to 3) node(s) of its vertices. // This might not remove all references to it from the octree, but we don't // care about that (much): They will be removed later. surfels_->at(triangle.index(0)).node()->EraseTriangle(triangle_index); surfels_->at(triangle.index(1)).node()->EraseTriangle(triangle_index); surfels_->at(triangle.index(2)).node()->EraseTriangle(triangle_index); } #endif // Returns the next node, or nullptr if the caller should break out of the loop. template <bool include_completed_surfels, bool include_free_surfels> inline OctreeNode* FindNearestSurfelsWithinRadiusImpl( OctreeNode* node, vector<OctreeNode*>& nodes_to_search, const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices, int* result_count, float* max_distance_squared, const Surfel* surfels) { // Look for results in the current node. for (usize node_surfel_index = 0, size = node->surfels.size(); node_surfel_index < size; ++ node_surfel_index) { u32 surfel_index = node->surfels[node_surfel_index]; if (!include_completed_surfels && surfels[surfel_index].meshing_state() == Surfel::MeshingState::kCompleted) { continue; } if (!include_free_surfels && surfels[surfel_index].meshing_state() == Surfel::MeshingState::kFree) { continue; } float distance_squared = (surfels[surfel_index].position() - position).squaredNorm(); if (distance_squared <= *max_distance_squared) { // Consider adding this to the results. if (*result_count < max_result_count) { ++ *result_count; } int i; for (i = *result_count - 1; i > 0; -- i) { if (result_distances_squared[i - 1] > distance_squared) { result_distances_squared[i] = result_distances_squared[i - 1]; result_indices[i] = result_indices[i - 1]; } else { break; } } result_distances_squared[i] = distance_squared; result_indices[i] = node->surfels[node_surfel_index]; if (*result_count == max_result_count) { *max_distance_squared = result_distances_squared[max_result_count - 1]; } } } // Remember relevant child nodes other than the one in the same quarter as // the query point. int child_index = node->ComputeChildIndex(position); Vec3f mid_dists_squared = (position - node->midpoint).array().square(); // Component-wise squaring. int index; if (mid_dists_squared.x() > radius_squared) { if (mid_dists_squared.y() > radius_squared) { if (mid_dists_squared.z() > radius_squared) { // We only need to check the child in the query's quarter. } else { // The children with the same x and y, but both z must be checked. index = child_index ^ (1 << 2); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } } else { if (mid_dists_squared.z() > radius_squared) { // The children with the same x and z, but both y must be checked. index = child_index ^ (1 << 1); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } else { // The children with the same x but both y and z must be checked. index = child_index ^ (1 << 2); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ (1 << 1); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 1) | (1 << 2)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } } } else { if (mid_dists_squared.y() > radius_squared) { if (mid_dists_squared.z() > radius_squared) { // The children with the same y and z, but both x must be checked. index = child_index ^ (1 << 0); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } else { // The children with the same y, but both x and z must be checked. index = child_index ^ (1 << 2); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ (1 << 0); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 0) | (1 << 2)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } } else { if (mid_dists_squared.z() > radius_squared) { // The children with the same z, but both x and y must be checked. index = child_index ^ (1 << 1); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ (1 << 0); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 0) | (1 << 1)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } else { // All children must be checked. index = child_index ^ (1 << 0); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ (1 << 1); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ (1 << 2); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 0) | (1 << 1)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 0) | (1 << 2)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 1) | (1 << 2)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } index = child_index ^ ((1 << 0) | (1 << 1) | (1 << 2)); if (node->children[index]) { nodes_to_search.emplace_back(node->children[index]); } } } } // Descend into the child in the query's quarter, or abort. OctreeNode* child = node->children[child_index]; if (!child) { return nullptr; } else { float dist_child_squared = (position - child->ClosestPointTo(position)).squaredNorm(); if (dist_child_squared < std::numeric_limits<float>::epsilon()) { // Descend. return child; } else { nodes_to_search.emplace_back(child); return nullptr; } } } template <bool include_completed_surfels, bool include_free_surfels> int CompressedOctree::FindNearestSurfelsWithinRadius(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) { int result_count = 0; float max_distance_squared = radius_squared; nodes_to_search_.resize(1); nodes_to_search_[0] = root_; // Iterate over the work stack. while (!nodes_to_search_.empty()) { OctreeNode* node = nodes_to_search_.back(); nodes_to_search_.pop_back(); // Can we skip this node? if (result_count == max_result_count) { float dist_node_squared = (position - node->ClosestPointTo(position)).squaredNorm(); if (dist_node_squared >= max_distance_squared) { continue; } } // Find the smallest child node closest to the query point in this subtree, // while remembering other nodes if they might contain relevant results. while (true) { // If there are too many surfels in this node or there are surfels in a // non-leaf node, sort them down before continuing the search. if (node->surfels.size() > max_surfels_per_node_ || (!node->IsLeaf() && node->surfels.size() > 0)) { node = SortSurfelsInNodeDownwardsOneStep(node); } node = FindNearestSurfelsWithinRadiusImpl<include_completed_surfels, include_free_surfels>(node, nodes_to_search_, position, radius_squared, max_result_count, result_distances_squared, result_indices, &result_count, &max_distance_squared, surfels_->data()); if (!node) { break; } } } return result_count; } template int CompressedOctree::FindNearestSurfelsWithinRadius<false, false>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices); template int CompressedOctree::FindNearestSurfelsWithinRadius<false, true>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices); template int CompressedOctree::FindNearestSurfelsWithinRadius<true, false>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices); template int CompressedOctree::FindNearestSurfelsWithinRadius<true, true>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices); template <bool include_completed_surfels, bool include_free_surfels> int CompressedOctree::FindNearestSurfelsWithinRadiusPassive(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) const { int result_count = 0; float max_distance_squared = radius_squared; nodes_to_search_.resize(1); nodes_to_search_[0] = root_; // Iterate over the work stack. while (!nodes_to_search_.empty()) { OctreeNode* node = nodes_to_search_.back(); nodes_to_search_.pop_back(); // Can we skip this node? if (result_count == max_result_count) { float dist_node_squared = (position - node->ClosestPointTo(position)).squaredNorm(); if (dist_node_squared >= max_distance_squared) { continue; } } // Find the smallest child node closest to the query point in this subtree, // while remembering other nodes if they might contain relevant results. while (true) { node = FindNearestSurfelsWithinRadiusImpl<include_completed_surfels, include_free_surfels>(node, nodes_to_search_, position, radius_squared, max_result_count, result_distances_squared, result_indices, &result_count, &max_distance_squared, surfels_->data()); if (!node) { break; } } } return result_count; } template int CompressedOctree::FindNearestSurfelsWithinRadiusPassive<false, false>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) const; template int CompressedOctree::FindNearestSurfelsWithinRadiusPassive<false, true>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) const; template int CompressedOctree::FindNearestSurfelsWithinRadiusPassive<true, false>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) const; template int CompressedOctree::FindNearestSurfelsWithinRadiusPassive<true, true>(const Vec3f& position, float radius_squared, int max_result_count, float* result_distances_squared, u32* result_indices) const; void CompressedOctree::FindNearestTrianglesViaSurfelsImpl(const Vec3f& position, float radius_squared, int max_surfel_count, vector<u32>* result_indices) { surfel_distances_squared_.resize(max_surfel_count); surfel_indices_.resize(max_surfel_count); int surfel_count = FindNearestSurfelsWithinRadius<true, false>(position, radius_squared, max_surfel_count, surfel_distances_squared_.data(), surfel_indices_.data()); result_indices->clear(); result_indices->reserve(2 * surfel_count); for (int i = 0; i < surfel_count; ++ i) { Surfel* surfel = &surfels_->at(surfel_indices_[i]); for (int t = 0; t < surfel->GetTriangleCount(); ++ t) { u32 triangle_index = surfel->GetTriangle(t); // Insert the triangle index into result_indices while avoiding duplicates. bool found = false; for (usize r = 0, size = result_indices->size(); r < size; ++ r) { if (result_indices->at(r) == triangle_index) { found = true; break; } } if (!found) { result_indices->push_back(triangle_index); } } } } #ifdef KEEP_TRIANGLES_IN_OCTREE void CompressedOctree::FindNearestTrianglesIntersectingBoxImpl(const Vec3f& min, const Vec3f& max, vector<u32>* result_indices) { result_indices->clear(); if (!root_) { return; } nodes_to_search_.resize(1); nodes_to_search_[0] = root_; // Iterate over the work stack. while (!nodes_to_search_.empty()) { OctreeNode* node = nodes_to_search_.back(); nodes_to_search_.pop_back(); const float kEpsilon = 1e-3f * node->half_extent; // Look for results in the current node. At the same time: // * Drop any triangle indices in the current node whose bbox does not // intersect the node anymore, or which are invalid. // * Sort down any triangle indices whose bbox intersects only a child of // the node. for (unordered_set<u32>::iterator it = node->triangles.begin(), end = node->triangles.end(); it != end; ) { // Check whether the index is still valid. if (*it >= triangles_->size()) { it = node->triangles.erase(it); continue; } const SurfelTriangle& triangle = triangles_->at(*it); if (!triangle.IsValid()) { it = node->triangles.erase(it); continue; } // Compute the bbox of the triangle. Eigen::AlignedBox<float, 3> triangle_bbox(surfels_->at(triangle.index(0)).position()); triangle_bbox.extend(surfels_->at(triangle.index(1)).position()); triangle_bbox.extend(surfels_->at(triangle.index(2)).position()); // Check whether it can be dropped because it does not intersect the node // anymore. if (triangle_bbox.min().coeff(0) > node->max.coeff(0) || triangle_bbox.min().coeff(1) > node->max.coeff(1) || triangle_bbox.min().coeff(2) > node->max.coeff(2) || triangle_bbox.max().coeff(0) < node->min.coeff(0) || triangle_bbox.max().coeff(1) < node->min.coeff(1) || triangle_bbox.max().coeff(2) < node->min.coeff(2)) { it = node->triangles.erase(it); continue; } // Check whether it can be sorted down. Do not sort it down if its bbox // entirely contains the node bbox. if (!node->IsLeaf() && (triangle_bbox.min().coeff(0) > node->min.coeff(0) || triangle_bbox.min().coeff(1) > node->min.coeff(1) || triangle_bbox.min().coeff(2) > node->min.coeff(2) || triangle_bbox.max().coeff(0) < node->max.coeff(0) || triangle_bbox.max().coeff(1) < node->max.coeff(1) || triangle_bbox.max().coeff(2) < node->max.coeff(2))) { // Clamp the triangle bbox to the node bbox (minus an epsilon inset to // account for potentially slightly different decision boundaries of // child nodes). Eigen::AlignedBox<float, 3> clamped_triangle_bbox( Vec3f(std::max(triangle_bbox.min().coeff(0), node->min.coeff(0) + kEpsilon), std::max(triangle_bbox.min().coeff(1), node->min.coeff(1) + kEpsilon), std::max(triangle_bbox.min().coeff(2), node->min.coeff(2) + kEpsilon)), Vec3f(std::min(triangle_bbox.max().coeff(0), node->max.coeff(0) - kEpsilon), std::min(triangle_bbox.max().coeff(1), node->max.coeff(1) - kEpsilon), std::min(triangle_bbox.max().coeff(2), node->max.coeff(2) - kEpsilon))); // Sort it into all children which it intersects if it is entirely // contained by the union of the children. If not, do not sort it down. // Approach: // * Check which node quarters the triangle bbox intersects. // * For all intersected quarters, the child must entirely contain the // part of the triangle bbox within this quarter. bool intersects_x[2] = {triangle_bbox.min().coeff(0) <= node->midpoint.coeff(0), triangle_bbox.max().coeff(0) >= node->midpoint.coeff(0)}; bool intersects_y[2] = {triangle_bbox.min().coeff(1) <= node->midpoint.coeff(1), triangle_bbox.max().coeff(1) >= node->midpoint.coeff(1)}; bool intersects_z[2] = {triangle_bbox.min().coeff(2) <= node->midpoint.coeff(2), triangle_bbox.max().coeff(2) >= node->midpoint.coeff(2)}; bool contained_in_children = true; int child_index = 0; for (int dz = 0; dz <= 1; ++ dz) { if (!intersects_z[dz]) { child_index += 4; continue; } for (int dy = 0; dy <= 1; ++ dy) { if (!intersects_y[dy]) { child_index += 2; continue; } for (int dx = 0; dx <= 1; ++ dx) { if (!intersects_x[dx]) { child_index += 1; continue; } // The triangle intersects the quarter with this child_index. // Check whether the child entirely contains the part of the // triangle bbox within this quarter. OctreeNode* child = node->children[child_index]; if (!child) { contained_in_children = false; dy = 2; // break 2 dz = 2; // break 3 break; } // NOTE: This always checks for (float) equality with the midpoint, // even in the 3 directions where it does not play a role. // This is not harmful but unnecessary. if ((child->min.coeff(0) <= clamped_triangle_bbox.min().coeff(0) || fabsf(child->min.coeff(0) - node->midpoint.coeff(0)) <= kEpsilon) && (child->min.coeff(1) <= clamped_triangle_bbox.min().coeff(1) || fabsf(child->min.coeff(1) - node->midpoint.coeff(1)) <= kEpsilon) && (child->min.coeff(2) <= clamped_triangle_bbox.min().coeff(2) || fabsf(child->min.coeff(2) - node->midpoint.coeff(2)) <= kEpsilon) && (child->max.coeff(0) >= clamped_triangle_bbox.max().coeff(0) || fabsf(child->max.coeff(0) - node->midpoint.coeff(0)) <= kEpsilon) && (child->max.coeff(1) >= clamped_triangle_bbox.max().coeff(1) || fabsf(child->max.coeff(1) - node->midpoint.coeff(1)) <= kEpsilon) && (child->max.coeff(2) >= clamped_triangle_bbox.max().coeff(2) || fabsf(child->max.coeff(2) - node->midpoint.coeff(2)) <= kEpsilon)) { // Ok, triangle (part) contained in child. } else { contained_in_children = false; dy = 2; // break 2 dz = 2; // break 3 break; } child_index += 1; } } } if (contained_in_children) { // Sort the triangle down. child_index = 0; for (int dz = 0; dz <= 1; ++ dz) { if (!intersects_z[dz]) { child_index += 4; continue; } for (int dy = 0; dy <= 1; ++ dy) { if (!intersects_y[dy]) { child_index += 2; continue; } for (int dx = 0; dx <= 1; ++ dx) { if (!intersects_x[dx]) { child_index += 1; continue; } OctreeNode* child = node->children[child_index]; child->AddTriangle(*it); child_index += 1; } } } it = node->triangles.erase(it); continue; } // end if contained_in_children } // end if it can be potentially sorted down // Test the triangle for intersection with the query box. if (!(min.coeff(0) > triangle_bbox.max().coeff(0) || min.coeff(1) > triangle_bbox.max().coeff(1) || min.coeff(2) > triangle_bbox.max().coeff(2) || max.coeff(0) < triangle_bbox.min().coeff(0) || max.coeff(1) < triangle_bbox.min().coeff(1) || max.coeff(2) < triangle_bbox.min().coeff(2))) { // Make sure that each triangle is only returned once. // NOTE: Depending on how many results are returned usually, it might be // faster to use a set or to manually do insertion sort into the // vector while keeping it ordered. // Currently this assumes that usually only few triangles are // returned. bool found = false; for (u32 index : *result_indices) { if (index == *it) { found = true; break; } } if (!found) { result_indices->push_back(*it); } } ++ it; } // DEBUG: // if (node->triangles.size() > 200) { // LOG(WARNING) << "Many triangles in node: " << node->triangles.size(); // LOG(WARNING) << "IsLeaf: " << node->IsLeaf(); // for (int i = 0; i < 8; ++ i) { // LOG(WARNING) << "Child " << i << ": " << node->children[i]; // } // } // Descend into the child nodes. if (!node->IsLeaf()) { for (int i = 0; i < 8; ++ i) { OctreeNode* child = node->children[i]; if (child && !(min.coeff(0) > child->max.coeff(0) || min.coeff(1) > child->max.coeff(1) || min.coeff(2) > child->max.coeff(2) || max.coeff(0) < child->min.coeff(0) || max.coeff(1) < child->min.coeff(1) || max.coeff(2) < child->min.coeff(2))) { nodes_to_search_.push_back(child); } } } } } #endif usize CompressedOctree::CountSurfelsSlow() { if (root_) { return root_->CountSurfelsRecursive(); } else { return 0; } } bool CompressedOctree::FindSurfelAnywhereSlow(u32 surfel_index, const Surfel& surfel, OctreeNode* start_node, OctreeNode** node, usize* index) const { if (!start_node) { return false; } // Check the current node. for (usize i = 0; i < start_node->surfels.size(); ++ i) { if (start_node->surfels[i] == surfel_index) { *node = start_node; *index = i; return true; } } // Check the children. for (int i = 0; i < 8; ++ i) { if (FindSurfelAnywhereSlow(surfel_index, surfel, start_node->children[i], node, index)) { return true; } } return false; } void CompressedOctree::SortSurfelDownwards(OctreeNode* node, u32 surfel_index) { Surfel* surfel = &surfels_->at(surfel_index); int child_index = 0; while (true) { child_index = node->ComputeChildIndex(surfel->position()); if (node->children[child_index] == nullptr) { // Create a new leaf node for the surfel. OctreeNode* child = new OctreeNode(node->GetQuarterMidpoint(child_index), 0.5f * node->half_extent); node->AddChild(child, child_index); child->AddSurfel(surfel_index, surfel); return; } else if (node->children[child_index]->Contains(surfel->position())) { // Descend. node = node->children[child_index]; // Not checking for the maximum surfel count per leaf here. if (node->IsLeaf()) { // if (node->surfels.size() == max_surfels_per_node_) { // LOG(WARNING) << "SortSurfelDownwards() is violating the maximum surfel count."; // } ++ numerical_issue_counter_; node->AddSurfel(surfel_index, surfel); return; } } else { // There is a child for this quarter, but it does not contain the new // surfel. In principle one should insert a new level in-between now, but // this function is lazy and just adds the surfel to the last node. ++ numerical_issue_counter_; // LOG(WARNING) << "CompressedOctree::SortSurfelDownwards(): Should create an intermediate level, but lazily adding the surfel to the top node instead."; node->AddSurfel(surfel_index, surfel); return; } } } OctreeNode* CompressedOctree::SortSurfelsInNodeDownwardsOneStep(OctreeNode* node) { Eigen::AlignedBox<float, 3> bbox; // Compute the quarter (child) index for each of the surfels in the node. If // they fall into an existing child node, directly put them into the child. // Otherwise, compute their bounding box. for (int i = node->surfels.size() - 1; i >= 0; -- i) { u32* surfel_index = &node->surfels[i]; Surfel* surfel = &surfels_->at(*surfel_index); int child_index = node->ComputeChildIndex(surfel->position()); OctreeNode* child = node->children[child_index]; if (child && child->Contains(surfel->position())) { // Simply move the surfel into the child. child->AddSurfel(*surfel_index, surfel); node->EraseSurfel(i, surfels_); } else { // The surfel does not lie within the child node (if any). Add it to the // bounding box of new surfels for that quarter. bbox.extend(surfel->position()); } } usize size = node->surfels.size(); usize remaining_surfel_count = node->surfels.size(); if (remaining_surfel_count == 0) { node->EraseAllSurfels(); if (node->child_count == 1) { return RemoveSingleChildNode(node); } else { return node; } } // Create new nodes for surfels that did not fall into existing children. // The goal here for avoiding overly many steps is that at least two surfels // should fall into different nodes as a result. // Compute the level having the largest cells such that the surfels // can definitely be separated (from the x, y, z distances of the // surfels: choose the cell size to be at most the minimum distance). float dist_x = bbox.max().x() - bbox.min().x(); float dist_y = bbox.max().y() - bbox.min().y(); float dist_z = bbox.max().z() - bbox.min().z(); float dist_max; if (dist_x > dist_y) { if (dist_x > dist_z) { dist_max = dist_x; } else { dist_max = dist_z; } } else { if (dist_y > dist_z) { dist_max = dist_y; } else { dist_max = dist_z; } } if (dist_max == 0) { // This is a single point only (that is maybe duplicated). // * If this is a leaf node, we cannot do anything since it is not possible // to separate the point(s) further. if (node->IsLeaf()) { CHECK_EQ(remaining_surfel_count, node->surfels.size()); return node; } // * If this node does not have a child yet in the points' quarter but it // has children in other quarters, create a quarter leaf and put the // point(s) inside to have them separated from the other children. int child_index = node->ComputeChildIndex(bbox.min()); if (!node->children[child_index]) { OctreeNode* child = new OctreeNode(node->GetQuarterMidpoint(child_index), 0.5f * node->half_extent); node->AddChild(child, child_index); child->surfels.reserve(remaining_surfel_count); for (usize i = 0; i < size; ++ i) { child->AddSurfel(node->surfels[i], &surfels_->at(node->surfels[i])); } node->EraseSurfels(0, size - 1); return node; } // * If there already is a child in the same quarter, use the same strategy // as for active point insertion in this case: add an intermediate node. OctreeNode* new_node; if (!InsertIntermediateLevel(bbox.min(), node, child_index, node->children[child_index], &new_node)) { // Error. Give up. ++ numerical_issue_counter_; // LOG(WARNING) << "Probable numerical issue, tried to insert intermediate node but cannot."; return node; } // node->CheckContains(new_node, 0.001f); // Create a new quarter leaf in the new intermediate node and insert all // surfels there. int new_node_child_index = new_node->ComputeChildIndex(bbox.min()); OctreeNode* child = new OctreeNode(new_node->GetQuarterMidpoint(new_node_child_index), 0.5f * new_node->half_extent); // CHECK(new_node->children[new_node_child_index] == nullptr); new_node->AddChild(child, new_node_child_index); child->surfels.reserve(remaining_surfel_count); for (usize i = 0; i < size; ++ i) { child->AddSurfel(node->surfels[i], &surfels_->at(node->surfels[i])); } node->EraseSurfels(0, size - 1); // Keep any surfels which may have been added to the back. return node; } float node_extent = 2 * node->half_extent; // Compute floor(-1 * std::log2f(dist_max / node_extent)) in a fast way. // Slow code: // int level = -1 * std::log2f(dist_max / node_extent); // Round down in cast to int. // Values of rounded_factor: // For dist_max in ]0.5, 1[ * node_extent: 1 // For dist_max in ]0.25, 0.5] * node_extent: 2 or 3 // For dist_max in ]0.125, 0.25] * node_extent: 4 or 5 or 6 or 7, ... unsigned int rounded_factor = node_extent / dist_max; // Round down in cast to int. if (rounded_factor == 0) { rounded_factor = 1; } // Count leading zeros in rounded_factor and invert the result to get // the number of "occupied" bits. Subtract 1 to get log2(rounded_factor). // Note that __builtin_clz() is undefined if its argument is 0. int level = (8 * sizeof(unsigned int)) - __builtin_clz(rounded_factor) - 1; // If level > 0, a new node in a quarter must be created to separate the // points. If level == 0, the base node itself separates the points using // its quarters. OctreeNode* current_node = node; if (level > 0) { float min_cell_quarter_extent = node_extent * 1.0f / (1 << (level + 1)); int level_difference_plus_one = GetMinLevelContaining(bbox.min(), bbox.max(), node->min, min_cell_quarter_extent); if (level_difference_plus_one == 0) { // Should not happen. Give up. ++ numerical_issue_counter_; // LOG(WARNING) << "Encountered a case which should not happen."; return node; } level -= level_difference_plus_one - 1; if (level > 0) { // Create the new node on the level that was computed. int current_node_child_index; current_node = node->CreateChild(level, 0.5f * (bbox.min() + bbox.max()), &current_node_child_index, /*add_as_child*/ false); // Robustness check: Due to numerical issues it can happen that this tries // to create a child in a place where there is one already. Catch this // case. OctreeNode* existing_child = node->children[current_node_child_index]; float difference_factor = existing_child ? (existing_child->half_extent / current_node->half_extent) : 0; // Should be 0.5 or less if the situation is valid. if (difference_factor > 0.75f && existing_child->Contains(current_node->midpoint)) { // Emergency handling: use the existing child instead of creating a new // one. delete current_node; current_node = existing_child; } else { // node->CheckContains(current_node, 0.001f); // Connect to the existing parent and child, if any. if (existing_child) { if (current_node->Contains(existing_child->midpoint)) { // Add the existing child as a child of the new node. Add the new node // as a child of the containing node: // node --> current_node --> existing_child current_node->children[current_node->ComputeChildIndex(existing_child->midpoint)] = existing_child; ++ current_node->child_count; current_node->CheckChildCount(); existing_child->parent = current_node; node->children[current_node_child_index] = current_node; current_node->parent = node; // current_node->CheckContains(existing_child, 0.001f); } else { // Add an intermediate node as a child of the containing node, having // existing_child and current_node as children: // node --> intermediate_node --> existing_child // \-> current_node float smaller_extent; int smaller_level; if (current_node->half_extent < existing_child->half_extent) { smaller_extent = current_node->half_extent; smaller_level = level; } else { smaller_extent = existing_child->half_extent; int int_factor = (existing_child->half_extent / current_node->half_extent) + 0.5f; // Round. smaller_level = level + (8 * sizeof(unsigned int)) - __builtin_clz(int_factor) - 1; } int level_difference_plus_one = GetMinLevelContaining(existing_child->midpoint, current_node->midpoint, node->min, smaller_extent); int intermediate_level = smaller_level - (level_difference_plus_one - 1); if (level_difference_plus_one <= 0 || intermediate_level <= 0) { // Error. Give up. ++ numerical_issue_counter_; // LOG(WARNING) << "Encountered a case which should not happen: level_difference_plus_one: " << level_difference_plus_one << ", intermediate_level: " << intermediate_level; delete current_node; return node; } int intermediate_node_child_index; OctreeNode* intermediate_node = node->CreateChild(intermediate_level, current_node->midpoint, &intermediate_node_child_index, /*add_as_child*/ false); // CHECK(intermediate_node->Contains(current_node->midpoint)); // CHECK(intermediate_node->Contains(existing_child->midpoint)); // Add the existing and new child as children of the intermediate node. int child_index_1 = intermediate_node->ComputeChildIndex(current_node->midpoint); int child_index_2 = intermediate_node->ComputeChildIndex(existing_child->midpoint); if (child_index_1 == child_index_2) { // Error. Give up. ++ numerical_issue_counter_; // LOG(ERROR) << "Encountered a case which should not happen."; delete current_node; delete intermediate_node; return node; } intermediate_node->AddChild(current_node, child_index_1); intermediate_node->AddChild(existing_child, child_index_2); // Set the intermediate node as child of the containing node. node->children[intermediate_node_child_index] = intermediate_node; intermediate_node->parent = node; // intermediate_node->CheckContains(current_node, 0.001f); // intermediate_node->CheckContains(existing_child, 0.001f); } } else { // if (!existing_child) { // node --> current_node node->AddChild(current_node, current_node_child_index); } } } } // Sort the remaining surfels into current_node, creating new quarter leaves // if necessary that cover the whole quarter and include a potentially // existing child. bool created_quarter_leaf[8] = {false, false, false, false, false, false, false, false}; for (usize i = 0; i < size; ++ i) { Surfel* surfel = &surfels_->at(node->surfels[i]); // // DEBUG // float distance_to_node = (surfel.position() - current_node->ClosestPointTo(surfel.position())).norm(); // if (distance_to_node > 0.01f) { // LOG(ERROR) << "Inserting a surfel into a node which does not contain it! Distance: " << distance_to_node << ", bbox size: " << bbox.sizes().transpose(); // } int child_index = current_node->ComputeChildIndex(surfel->position()); if (!created_quarter_leaf[child_index]) { OctreeNode* existing_child = current_node->children[child_index]; float child_half_extent = 0.5f * current_node->half_extent; // Robustness check: Due to numerical issues it can happen that this tries // to create a child in a place where there is one already. Catch this // case. float difference_factor = existing_child ? (existing_child->half_extent / child_half_extent) : 0; // Should be 0.5 or less if the situation is valid. if (difference_factor > 0.75f) { // Emergency handling: use the existing child instead of creating a new // one. } else { OctreeNode* child = new OctreeNode(current_node->GetQuarterMidpoint(child_index), child_half_extent); if (existing_child) { // current_node --> child --> existing_child current_node->children[child_index] = child; child->parent = current_node; child->children[child->ComputeChildIndex(existing_child->midpoint)] = existing_child; ++ child->child_count; child->CheckChildCount(); existing_child->parent = child; // current_node->CheckContains(child, 0.001f); // child->CheckContains(existing_child, 0.001f); } else { // current_node --> child current_node->AddChild(child, child_index); // current_node->CheckContains(child, 0.001f); } } created_quarter_leaf[child_index] = true; } // Add the surfel to the quarter leaf. current_node->children[child_index]->AddSurfel(node->surfels[i], surfel); } // Check whether the current node could be deleted. if (node->child_count == 1 && node->surfels.size() == remaining_surfel_count) { return RemoveSingleChildNode(node); } else { node->EraseSurfels(0, size - 1); return node; } } void CompressedOctree::CreateRootForSurfel(u32 surfel_index, Surfel* surfel) { // The initial extent is arbitrary, it will be adapted once more surfels are added. root_ = new OctreeNode(surfel->position(), 1.0f); root_->parent = nullptr; root_->AddSurfel(surfel_index, surfel); } OctreeNode* CompressedOctree::RemoveSingleChildNode(OctreeNode* node) { // Find the single child. OctreeNode** single_child = &node->children[0]; while (*single_child == nullptr) { ++ single_child; } CHECK_LE(single_child, &node->children[7]); // Find the child pointer in the parent. OctreeNode** child_pointer; OctreeNode* triangle_dest; if (node->parent == nullptr) { triangle_dest = *single_child; child_pointer = &root_; } else { triangle_dest = node->parent; child_pointer = &triangle_dest->children[0]; while (*child_pointer != node) { ++ child_pointer; } } // // DEBUG // CHECK_EQ(node->child_count, 1); // CHECK_EQ((*single_child)->parent, node); // CHECK_EQ(node->surfel_count, 0u); #ifdef KEEP_TRIANGLES_IN_OCTREE // Move all triangles (if any) to the triangle_dest node. for (unordered_set<u32>::iterator it = node->triangles.begin(), end = node->triangles.end(); it != end; ++ it) { triangle_dest->AddTriangle(*it); } #endif // Connect the parent to the child directly and delete the node // which was in-between. *child_pointer = *single_child; (*single_child)->parent = node->parent; OctreeNode* single_child_ptr = *single_child; // Copy pointer before deleting the object containing it. delete node; return single_child_ptr; } void CompressedOctree::RemoveEmptyLeaf(OctreeNode* node) { // // DEBUG // CHECK_EQ(node->surfel_count, 0u); // CHECK_EQ(node->child_count, 0u); if (node->parent == nullptr) { // The node is the root node. delete node; root_ = nullptr; return; } OctreeNode* parent = node->parent; #ifdef KEEP_TRIANGLES_IN_OCTREE // Move all triangles (if any) to the parent node. for (unordered_set<u32>::iterator it = node->triangles.begin(), end = node->triangles.end(); it != end; ++ it) { parent->AddTriangle(*it); } #endif // Find the child pointer in the parent and set it to nullptr. OctreeNode** child_pointer; child_pointer = &parent->children[0]; while (*child_pointer != node) { ++ child_pointer; } *child_pointer = nullptr; -- parent->child_count; parent->CheckChildCount(); delete node; // If the parent became a single-child node, remove it. if (parent->child_count == 1 && parent->IsEmpty()) { RemoveSingleChildNode(parent); } } void CompressedOctree::DeleteNode(OctreeNode* node) { if (node->child_count > 0) { for (int i = 0; i < 8; ++ i) { if (node->children[i]) { DeleteNode(node->children[i]); } } } delete node; } }
42.251185
263
0.626042
[ "object", "vector" ]
22ed81c70b427d2735ab0c5bc39d9c9fe92a390f
4,371
cpp
C++
CPCCoreEmu/Z84C30.cpp
Tom1975/CPCCore
8a898d80533d5f955898893fbe09be024a64e861
[ "MIT" ]
5
2020-01-24T17:48:40.000Z
2021-01-29T10:48:31.000Z
CPCCoreEmu/Z84C30.cpp
Tom1975/CPCCore
8a898d80533d5f955898893fbe09be024a64e861
[ "MIT" ]
null
null
null
CPCCoreEmu/Z84C30.cpp
Tom1975/CPCCore
8a898d80533d5f955898893fbe09be024a64e861
[ "MIT" ]
1
2021-09-16T08:45:22.000Z
2021-09-16T08:45:22.000Z
#include "stdafx.h" #include "Z84C30.h" Z84C30::CTCCounter::CTCCounter() : output_(nullptr), interrupt_(nullptr), prescaler_(0), wait_for_time_constraint_(false), control_(0), count_enabled_(false), decrement_(0), time_constant_(0), down_counter_(0) { } Z84C30::CTCCounter::~CTCCounter() { } void Z84C30::CTCCounter::SetOutput(IClockable* output, IClockable* interrupt) { output_ = output; interrupt_ = interrupt; } int Z84C30::CTCCounter::Trg(bool up) { if (((control_ & CTRL_EDGE) && up) ||((control_ & CTRL_EDGE) == 0 && (!up))) { decrement_ = true; } if (!count_enabled_) { prescaler_ = (control_ & CTRL_PRESCALER) ? 256 : 16; count_enabled_ = true; //down_counter_ = time_constant_; reload_ = true; } return 1; } void Z84C30::CTCCounter::Out(unsigned char data) { if (wait_for_time_constraint_) { time_constant_ = (data==0)?256:data; wait_for_time_constraint_ = false; count_enabled_ = ((control_ & CTRL_TIMER)==0) ; // todo : if count_enabled_, add shift for counter (compute from write cycle to T2 of next M1 operation // If timer mode & CTRL_TIMER, trigger it if (count_enabled_) { prescaler_ = (control_ & CTRL_PRESCALER) ? 256 : 16; //down_counter_ = time_constant_; reload_ = true; } enabled_ = true; } else { control_ = data; wait_for_time_constraint_ = control_ & CTRL_TIME_CST; enabled_ = true; // Something to set ? if (control_ & CTRL_RESET) { // Software reset Reset(false); } } } void Z84C30::CTCCounter::Reset(bool hard) { if (hard) { wait_for_time_constraint_ = false; // Terminate all down-counts down_counter_ = 0; // Disable interrupts control_ &= 0x7F; enabled_ = false; } else { // Stop counting count_enabled_ = false; } } unsigned int Z84C30::CTCCounter::Tick() { // Timer mode if (count_enabled_ && (wait_for_time_constraint_ == false ) && enabled_) { if (reload_) { down_counter_ = time_constant_; reload_ = false; } else { if (control_ & CTRL_MODE) { // Decrement ? if (decrement_) { decrement_ = false; --down_counter_; } } else { --prescaler_; if (prescaler_ == 0) { prescaler_ = (control_ & CTRL_PRESCALER) ? 256 : 16; --down_counter_; } } } if (down_counter_ == 0) { reload_ = true; // Triger or interrupt ! if (control_ & CTRL_INTERRUPT) { if (interrupt_) { interrupt_->Tick(); } } //else { if (output_) { output_->Tick(); } } } } return 1; } Z84C30::Z84C30() { } Z84C30::~Z84C30(void) { } void Z84C30::Init(ChannelId channel, IClockable* out_line, IClockable* int_line) { channel_[channel].SetOutput(out_line, int_line); } void Z84C30::HardReset() { // IE0 = IEI channel_[0].Reset(true); channel_[1].Reset(true); channel_[2].Reset(true); channel_[3].Reset(true); } IClockable* Z84C30::GetCounter(ChannelId channel) { switch (channel) { case CHANNEL_0: return &channel_[0]; case CHANNEL_1: return &channel_[1]; case CHANNEL_2: return &channel_[2]; case CHANNEL_3: return &channel_[3]; } return nullptr; } unsigned int Z84C30::Tick() { channel_[0].Tick(); channel_[1].Tick(); channel_[2].Tick(); channel_[3].Tick(); return 1; } void Z84C30::M1() { // Arbitrate the CTC internal priorities // Set interrupt vector } // address : 2 bits : CS0, CS1 void Z84C30::Out(unsigned short address, unsigned char data) { // Send control word to proper channel if (address == 0 && ((data & 0x1) == 0) && (channel_[0].wait_for_time_constraint_ == false)) { interrupt_vector_ = data; } else { channel_[address & 0x3].Out(data); } } void Z84C30::In(unsigned char* data, unsigned short address) { }
19.004348
122
0.553191
[ "vector" ]
22f306e422b1cc071f766bdcad5de67846f39fa4
1,076
cpp
C++
tools_for_debug/get_mu_sigma.cpp
xbai0624/dnn
51f53a41b3cbc60afca22e88447866a7e7d6e506
[ "MIT" ]
2
2020-10-12T00:19:40.000Z
2020-10-12T00:20:50.000Z
tools_for_debug/get_mu_sigma.cpp
xbai0624/dnn
51f53a41b3cbc60afca22e88447866a7e7d6e506
[ "MIT" ]
null
null
null
tools_for_debug/get_mu_sigma.cpp
xbai0624/dnn
51f53a41b3cbc60afca22e88447866a7e7d6e506
[ "MIT" ]
null
null
null
#include <iostream> #include <cmath> #include <vector> #include <sstream> #include <string> using namespace std; vector<float> parseLine(string _line) { vector<float> res; float s; istringstream line(_line); cout<<"_line: "<<_line<<endl; while(line>>s) { res.push_back(s); } return res; } void get(float &mu, float &var, vector<float> &vec) { for(auto &i: vec) cout<<i<<endl; cout<<"...."<<endl; mu = 0; var = 0; for(auto &i: vec) mu += i; float s = vec.size(); cout<<"mu: "<<mu<<", size: "<<s<<endl; mu /= s; for(auto &i: vec) { var += (i-mu)*(i-mu); } var /= s; if(s > 1) var = s/(s-1) * var; var = sqrt(var); } int main(int argc[[maybe_unused]], char* argv[][[maybe_unused]]) { string line = "1 0 0"; vector<float> r = parseLine(line); float mu, sigma; get(mu, sigma, r); cout<<"mu: "<<mu<<", sigma: "<<sigma<<endl; cout<<"after: affine transform: "<<endl; for(auto &i: r) cout<< (i-mu)/sigma<<endl; return 0; }
18.551724
64
0.521375
[ "vector", "transform" ]
22f614072eeffa828aa8fba71807c31119645a44
1,578
cpp
C++
platforms/linux/src/Application/Packets/Commands/SetScanResponse/SetScanResponse.cpp
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
13
2018-07-04T16:35:37.000Z
2021-03-03T10:41:07.000Z
platforms/linux/src/Application/Packets/Commands/SetScanResponse/SetScanResponse.cpp
iotile/baBLE
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
11
2018-06-01T20:32:32.000Z
2019-01-21T17:03:47.000Z
platforms/linux/src/Application/Packets/Commands/SetScanResponse/SetScanResponse.cpp
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
null
null
null
#include <utils/string_formats.hpp> #include "SetScanResponse.hpp" #include "Application/Packets/Events/CommandComplete/CommandComplete.hpp" using namespace std; namespace Packet { namespace Commands { SetScanResponse::SetScanResponse() : HostToControllerPacket(Packet::Id::SetScanResponse, final_type(), final_packet_code()) { m_response_packet_code = Format::HCI::EventCode::CommandComplete; m_scan_response_length = 0; m_scan_response = vector<uint8_t>(Format::HCI::advertising_data_length); } vector<uint8_t> SetScanResponse::serialize(HCIFormatBuilder& builder) const { HostToControllerPacket::serialize(builder); builder .add(m_scan_response_length) .add(m_scan_response); return builder.build(Format::HCI::Type::Command); } void SetScanResponse::set_scan_response_data(const vector<uint8_t>& scan_response) { if (scan_response.size() > Format::HCI::advertising_data_length) { throw Exceptions::BaBLEException(BaBLE::StatusCode::WrongFormat, "Scan response exceeds 31 bytes", m_uuid_request); } m_scan_response_length = static_cast<uint8_t>(scan_response.size()); copy(scan_response.begin(),scan_response.end(), m_scan_response.begin()); } const string SetScanResponse::stringify() const { stringstream result; result << "<SetScanResponse> " << AbstractPacket::stringify() << ", " << "Scan response data: " << Utils::format_bytes_array(m_scan_response); return result.str(); } } }
30.941176
123
0.698352
[ "vector" ]
22f6f6eac4c9f817d6122c9a44f94f309eaa5d4d
27,105
hpp
C++
include/eepp/base/string.hpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
include/eepp/base/string.hpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
include/eepp/base/string.hpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// /** NOTE: ** The class was modified to fit EEPP own needs. This is not the original implementation from SFML2. ** Functions and methods are the same that in std::string to facilitate portability. ** Also added a lot of utilities for string manipulation **/ #ifndef EE_STRING_HPP #define EE_STRING_HPP #include <eepp/declares.hpp> #include <eepp/base/utf.hpp> #include <locale> #include <string> #include <cstring> #include <cstdlib> #include <fstream> #include <sstream> #include <vector> namespace EE { /** @brief Utility string class that automatically handles conversions between types and encodings **/ class EE_API String { public : typedef Uint32 StringBaseType; typedef std::basic_string<StringBaseType> StringType; typedef StringType::iterator Iterator; //! Iterator type typedef StringType::const_iterator ConstIterator; //! Constant iterator type typedef StringType::reverse_iterator ReverseIterator; //! Reverse Iterator type typedef StringType::const_reverse_iterator ConstReverseIterator; //! Constant iterator type static const std::size_t InvalidPos; ///< Represents an invalid position in the string /** @return string hash */ static Uint32 Hash( const Uint8 * str ); /** @return string hash */ static Uint32 Hash( const char * str ); /** @return string hash */ static Uint32 Hash( const std::string& str ); /** @return string hash. Note: String::Hash( std::string( "text" ) ) is != to String::Hash( String( "text" ) ) */ static Uint32 Hash( const String& str ); /** @return If the value passed is a character */ static bool IsCharacter( const eeInt& mValue ); /** @return If the value passed is a number */ static bool IsNumber( const eeInt& mValue, bool AllowDot = false ); /** @return If the value passed is a letter */ static bool IsLetter( const eeInt& mValue ); /** Split a String and hold it on a vector */ static std::vector < String > Split( const String& str, const Uint32& splitchar = '\n', const bool& pushEmptyString = false ); /** Split a string and hold it on a vector */ static std::vector < std::string > Split( const std::string& str, const Int8& splitchar = '\n', const bool& pushEmptyString = false ); /** Remove the first space on the string */ static std::string LTrim( const std::string & str ); /** Removes all spaces on the string */ static std::string Trim( const std::string & str ); /** Convert the string into upper case string */ static void ToUpper( std::string & str ); /** Convert the string into lower case string */ static void ToLower( std::string & str ); /** Convert the string to an std::vector<Uint8> */ static std::vector<Uint8> StringToUint8( const std::string& str ); /** Convert the std::vector<Uint8> to an string */ static std::string Uint8ToString( const std::vector<Uint8> v ); /** Insert a char into String on pos (added this function to avoid a bug on String) */ static void InsertChar( String& str, const eeUint& pos, const Uint32& tchar ); /** Copy a string to another * @param Dst Destination String * @param Src Source String * @param DstSize Destination Size */ static void StrCopy( char * Dst, const char * Src, eeUint DstSize ); /** Compare two strings from its beginning. * @param Start String start * @param Str String to compare * @return The position of the last char compared ( -1 if fails ) */ static Int32 StartsWith( const std::string& Start, const std::string Str ); /** Compare two strings from its beginning. * @param Start String start * @param Str String to compare * @return The position of the last char compared ( -1 if fails ) */ static Int32 StartsWith( const String& Start, const String Str ); /** Replaces a substring by another string inside a string */ static void ReplaceSubStr(std::string &target, const std::string& that, const std::string& with ); /** Removes the numbers at the end of the string */ static std::string RemoveNumbersAtEnd( std::string txt ); /** Converts from any basic type to std::string */ template <class T> static std::string ToStr(const T& i) { std::ostringstream ss; ss << i; return ss.str(); } /** Converts from a string to type */ template <class T> static bool FromString(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&) = std::dec ) { std::istringstream iss(s); return !(iss >> f >> t).fail(); } /** Converts from a String to type */ template <class T> static bool FromString(T& t, const String& s, std::ios_base& (*f)(std::ios_base&) = std::dec ) { std::istringstream iss( s.ToUtf8() ); return !(iss >> f >> t).fail(); } /** Returning a std::string from a formated string */ static std::string StrFormated( const char* format, ... ) #ifdef __GNUC__ /* This attribute is nice: it even works through gettext invokation. For example, gcc will complain that StrFormat(_("%s"), 42) is ill-formed. */ __attribute__((format(printf, 1, 2))) #endif ; /** Format a char buffer */ static void StrFormat( char * Buffer, int BufferSize, const char * format, ... ); /** @brief Construct from an UTF-8 string to UTF-32 according ** @param utf8String UTF-8 string to convert **/ static String FromUtf8( const std::string& utf8String ); /** @brief Default constructor ** This constructor creates an empty string. **/ String(); /** @brief Construct from a single ANSI character and a locale ** The source character is converted to UTF-32 according ** to the given locale. If you want to use the current global ** locale, rather use the other constructor. ** @param ansiChar ANSI character to convert ** @param locale Locale to use for conversion **/ String( char ansiChar, const std::locale& locale = std::locale() ); #ifndef EE_NO_WIDECHAR /** @brief Construct from single wide character ** @param wideChar Wide character to convert **/ String( wchar_t wideChar ); #endif /** @brief Construct from single UTF-32 character ** @param utf32Char UTF-32 character to convert **/ String( StringBaseType utf32Char ); /** @brief Construct from an from a null-terminated C-style UTF-8 string to UTF-32 ** @param uf8String UTF-8 string to convert **/ String( const char* uf8String ); /** @brief Construct from an UTF-8 string to UTF-32 according ** @param utf8String UTF-8 string to convert **/ String( const std::string& utf8String ); /** @brief Construct from a null-terminated C-style ANSI string and a locale ** The source string is converted to UTF-32 according ** to the given locale. If you want to use the current global ** locale, rather use the other constructor. ** @param ansiString ANSI string to convert ** @param locale Locale to use for conversion **/ String( const char* ansiString, const std::locale& locale ); /** @brief Construct from an ANSI string and a locale ** The source string is converted to UTF-32 according ** to the given locale. If you want to use the current global ** locale, rather use the other constructor. ** @param ansiString ANSI string to convert ** @param locale Locale to use for conversion **/ String( const std::string& ansiString, const std::locale& locale ); #ifndef EE_NO_WIDECHAR /** @brief Construct from null-terminated C-style wide string ** @param wideString Wide string to convert **/ String( const wchar_t* wideString ); /** @brief Construct from a wide string ** @param wideString Wide string to convert **/ String( const std::wstring& wideString ); #endif /** @brief Construct from a null-terminated C-style UTF-32 string ** @param utf32String UTF-32 string to assign **/ String( const StringBaseType* utf32String ); /** @brief Construct from an UTF-32 string ** @param utf32String UTF-32 string to assign **/ String( const StringType& utf32String ); /** @brief Copy constructor ** @param str Instance to copy **/ String( const String& str ); /** @brief Create a new String from a UTF-8 encoded string ** @param begin Forward iterator to the begining of the UTF-8 sequence ** @param end Forward iterator to the end of the UTF-8 sequence ** @return A String containing the source string ** @see FromUtf16, FromUtf32 */ template <typename T> static String FromUtf8(T begin, T end) { String string; Utf8::ToUtf32(begin, end, std::back_inserter(string.mString)); return string; } /** @brief Create a new String from a UTF-16 encoded string ** @param begin Forward iterator to the begining of the UTF-16 sequence ** @param end Forward iterator to the end of the UTF-16 sequence ** @return A String containing the source string ** @see FromUtf8, FromUtf32 */ template <typename T> static String FromUtf16(T begin, T end) { String string; Utf16::ToUtf32(begin, end, std::back_inserter(string.mString)); return string; } /** @brief Create a new String from a UTF-32 encoded string ** @param begin Forward iterator to the begining of the UTF-32 sequence ** @param end Forward iterator to the end of the UTF-32 sequence ** @return A String containing the source string ** @see FromUtf8, FromUtf32 */ template <typename T> static String FromUtf32(T begin, T end) { String string; Utf32::ToUtf32(begin, end, std::back_inserter(string.mString)); return string; } /** @brief Implicit cast operator to std::string (ANSI string) ** The current global locale is used for conversion. If you ** want to explicitely specify a locale, see ToAnsiString. ** Characters that do not fit in the target encoding are ** discarded from the returned string. ** This operator is defined for convenience, and is equivalent ** to calling ToAnsiString(). ** @return Converted ANSI string ** @see ToAnsiString, operator String **/ operator std::string() const; /** @brief Convert the unicode string to an ANSI string ** The UTF-32 string is converted to an ANSI string in ** the encoding defined by \a locale. If you want to use ** the current global locale, see the other overload ** of ToAnsiString. ** Characters that do not fit in the target encoding are ** discarded from the returned string. ** @param locale Locale to use for conversion ** @return Converted ANSI string ** @see ToWideString, operator std::string **/ std::string ToAnsiString( const std::locale& locale = std::locale() ) const; #ifndef EE_NO_WIDECHAR /** @brief Convert the unicode string to a wide string ** Characters that do not fit in the target encoding are ** discarded from the returned string. ** @return Converted wide string ** @see ToAnsiString, operator String **/ std::wstring ToWideString() const; #endif /** Convert the string to a UTF-8 string */ std::string ToUtf8() const; /** Convert the string to a UTF-16 string */ std::basic_string<Uint16> ToUtf16() const; /** @return The hash code of the String */ Uint32 GetHash() const; /** @brief Overload of assignment operator ** @param right Instance to assign ** @return Reference to self **/ String& operator =(const String& right); String& operator =( const StringBaseType& right ); /** @brief Overload of += operator to append an UTF-32 string ** @param right String to append ** @return Reference to self **/ String& operator +=(const String& right); String& operator +=( const StringBaseType& right ); /** @brief Overload of [] operator to access a character by its position ** This function provides read-only access to characters. ** Note: this function doesn't throw if \a index is out of range. ** @param index Index of the character to get ** @return Character at position \a index **/ StringBaseType operator [](std::size_t index) const; /** @brief Overload of [] operator to access a character by its position ** This function provides read and write access to characters. ** Note: this function doesn't throw if \a index is out of range. ** @param index Index of the character to get ** @return Reference to the character at position \a index **/ StringBaseType& operator [](std::size_t index); /** @brief Get character in string ** Performs a range check, throwing an exception of type out_of_range in case that pos is not an actual position in the string. ** @return The character at position pos in the string. */ StringBaseType at( std::size_t index ) const; /** @brief clear the string ** This function removes all the characters from the string. ** @see empty, erase **/ void clear(); /** @brief Get the size of the string ** @return Number of characters in the string ** @see empty **/ std::size_t size() const; /** @see size() */ std::size_t length() const; /** @brief Check whether the string is empty or not ** @return True if the string is empty (i.e. contains no character) ** @see clear, size **/ bool empty() const; /** @brief Erase one or more characters from the string ** This function removes a sequence of \a count characters ** starting from \a position. ** @param position Position of the first character to erase ** @param count Number of characters to erase **/ void erase(std::size_t position, std::size_t count = 1); /** @brief Insert one or more characters into the string ** This function inserts the characters of \a str ** into the string, starting from \a position. ** @param position Position of insertion ** @param str Characters to insert **/ String& insert(std::size_t position, const String& str); String& insert( std::size_t pos1, const String& str, std::size_t pos2, std::size_t n ); String& insert ( std::size_t pos1, const char* s, std::size_t n ); String& insert ( std::size_t pos1, const char* s ); String& insert ( std::size_t pos1, size_t n, char c ); Iterator insert ( Iterator p, char c ); void insert ( Iterator p, std::size_t n, char c ); template<class InputIterator> void insert ( Iterator p, InputIterator first, InputIterator last ) { mString.insert( p, first, last ); } /** @brief Find a sequence of one or more characters in the string ** This function searches for the characters of \a str ** into the string, starting from \a start. ** @param str Characters to find ** @param start Where to begin searching ** @return Position of \a str in the string, or String::InvalidPos if not found **/ std::size_t find( const String& str, std::size_t start = 0 ) const; std::size_t find ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t find ( const char* s, std::size_t pos = 0 ) const; std::size_t find ( char c, std::size_t pos = 0 ) const; /** @brief Get a pointer to the C-style array of characters ** This functions provides a read-only access to a ** null-terminated C-style representation of the string. ** The returned pointer is temporary and is meant only for ** immediate use, thus it is not recommended to store it. ** @return Read-only pointer to the array of characters **/ const StringBaseType* c_str() const; /** @brief Get string data ** Notice that no terminating null character is appended (see member c_str for such a functionality). ** The returned array points to an internal location which should not be modified directly in the program. ** Its contents are guaranteed to remain unchanged only until the next call to a non-constant member function of the string object. ** @return Pointer to an internal array containing the same content as the string. **/ const StringBaseType* data() const; /** @brief Return an iterator to the beginning of the string ** @return Read-write iterator to the beginning of the string characters ** @see end **/ Iterator begin(); /** @brief Return an iterator to the beginning of the string ** @return Read-only iterator to the beginning of the string characters ** @see end **/ ConstIterator begin() const; /** @brief Return an iterator to the beginning of the string ** The end iterator refers to 1 position past the last character; ** thus it represents an invalid character and should never be ** accessed. ** @return Read-write iterator to the end of the string characters ** @see begin **/ Iterator end(); /** @brief Return an iterator to the beginning of the string ** The end iterator refers to 1 position past the last character; ** thus it represents an invalid character and should never be ** accessed. ** @return Read-only iterator to the end of the string characters ** @see begin **/ ConstIterator end() const; /** @brief Return an reverse iterator to the beginning of the string ** @return Read-write reverse iterator to the beginning of the string characters ** @see end **/ ReverseIterator rbegin(); /** @brief Return an reverse iterator to the beginning of the string ** @return Read-only reverse iterator to the beginning of the string characters ** @see end **/ ConstReverseIterator rbegin() const; /** @brief Return an reverse iterator to the beginning of the string ** The end reverse iterator refers to 1 position past the last character; ** thus it represents an invalid character and should never be ** accessed. ** @return Read-write reverse iterator to the end of the string characters ** @see begin **/ ReverseIterator rend(); /** @brief Return an reverse iterator to the beginning of the string ** The end reverse iterator refers to 1 position past the last character; ** thus it represents an invalid character and should never be ** accessed. ** @return Read-only reverse iterator to the end of the string characters ** @see begin **/ ConstReverseIterator rend() const; /** @brief Resize String */ void resize ( std::size_t n, StringBaseType c ); /** @brief Resize String */ void resize ( std::size_t n ); /** @return Maximum size of string */ std::size_t max_size() const; /** @brief Request a change in capacity */ void reserve ( size_t res_arg=0 ); /** @return Size of allocated storage */ std::size_t capacity() const; /** @brief Append character to string */ void push_back( StringBaseType c ); /** @brief Swap contents with another string */ void swap ( String& str ); String& assign ( const String& str ); String& assign ( const String& str, std::size_t pos, std::size_t n ); String& assign ( const char* s, std::size_t n ); String& assign ( const char* s ); String& assign ( std::size_t n, char c ); template <class InputIterator> String& assign ( InputIterator first, InputIterator last ) { mString.assign( first, last ); return *this; } String& append ( const String& str ); String& append ( const String& str, std::size_t pos, std::size_t n ); String& append ( const char* s, std::size_t n ); String& append ( const char* s ); String& append ( std::size_t n, char c ); String& append ( std::size_t n, StringBaseType c ); template <class InputIterator> String& append ( InputIterator first, InputIterator last ) { mString.append( first, last ); return *this; } String& replace ( std::size_t pos1, std::size_t n1, const String& str ); String& replace ( Iterator i1, Iterator i2, const String& str ); String& replace ( std::size_t pos1, std::size_t n1, const String& str, std::size_t pos2, std::size_t n2 ); String& replace ( std::size_t pos1, std::size_t n1, const char* s, std::size_t n2 ); String& replace ( Iterator i1, Iterator i2, const char* s, std::size_t n2 ); String& replace ( std::size_t pos1, std::size_t n1, const char* s ); String& replace ( Iterator i1, Iterator i2, const char* s ); String& replace ( std::size_t pos1, std::size_t n1, std::size_t n2, char c ); String& replace ( Iterator i1, Iterator i2, std::size_t n2, char c ); template<class InputIterator> String& replace ( Iterator i1, Iterator i2, InputIterator j1, InputIterator j2 ) { mString.replace( i1, i2, j1, j2 ); return *this; } std::size_t rfind ( const String& str, std::size_t pos = StringType::npos ) const; std::size_t rfind ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t rfind ( const char* s, std::size_t pos = StringType::npos ) const; std::size_t rfind ( char c, std::size_t pos = StringType::npos ) const; String substr ( std::size_t pos = 0, std::size_t n = StringType::npos ) const; std::size_t copy ( StringBaseType* s, std::size_t n, std::size_t pos = 0 ) const; int compare ( const String& str ) const; int compare ( const char* s ) const; int compare ( std::size_t pos1, std::size_t n1, const String& str ) const; int compare ( std::size_t pos1, std::size_t n1, const char* s) const; int compare ( std::size_t pos1, std::size_t n1, const String& str, std::size_t pos2, std::size_t n2 ) const; int compare ( std::size_t pos1, std::size_t n1, const char* s, std::size_t n2) const; std::size_t find_first_of ( const String& str, std::size_t pos = 0 ) const; std::size_t find_first_of ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t find_first_of ( const char* s, std::size_t pos = 0 ) const; std::size_t find_first_of ( StringBaseType c, std::size_t pos = 0 ) const; std::size_t find_last_of ( const String& str, std::size_t pos = StringType::npos ) const; std::size_t find_last_of ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t find_last_of ( const char* s, std::size_t pos = StringType::npos ) const; std::size_t find_last_of ( StringBaseType c, std::size_t pos = StringType::npos ) const; std::size_t find_first_not_of ( const String& str, std::size_t pos = 0 ) const; std::size_t find_first_not_of ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t find_first_not_of ( const char* s, std::size_t pos = 0 ) const; std::size_t find_first_not_of ( StringBaseType c, std::size_t pos = 0 ) const; std::size_t find_last_not_of ( const String& str, std::size_t pos = StringType::npos ) const; std::size_t find_last_not_of ( const char* s, std::size_t pos, std::size_t n ) const; std::size_t find_last_not_of ( const char* s, std::size_t pos = StringType::npos ) const; std::size_t find_last_not_of ( StringBaseType c, std::size_t pos = StringType::npos ) const; private : friend EE_API bool operator ==(const String& left, const String& right); friend EE_API bool operator <(const String& left, const String& right); StringType mString; ///< Internal string of UTF-32 characters }; /** @relates String ** @brief Overload of == operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if both strings are equal **/ EE_API bool operator ==(const String& left, const String& right); /** @relates String ** @brief Overload of != operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if both strings are different **/ EE_API bool operator !=(const String& left, const String& right); /** @relates String ** @brief Overload of < operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if \a left is alphabetically lesser than \a right **/ EE_API bool operator <(const String& left, const String& right); /** @relates String ** @brief Overload of > operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if \a left is alphabetically greater than \a right **/ EE_API bool operator >(const String& left, const String& right); /** @relates String ** @brief Overload of <= operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if \a left is alphabetically lesser or equal than \a right **/ EE_API bool operator <=(const String& left, const String& right); /** @relates String ** @brief Overload of >= operator to compare two UTF-32 strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return True if \a left is alphabetically greater or equal than \a right **/ EE_API bool operator >=(const String& left, const String& right); /** @relates String ** @brief Overload of binary + operator to concatenate two strings ** @param left Left operand (a string) ** @param right Right operand (a string) ** @return Concatenated string **/ EE_API String operator +( const String& left, const String& right ); } #endif /** @class EE::String EE::String is a utility string class defined mainly for convenience. It is a Unicode string (implemented using UTF-32), thus it can store any character in the world (european, chinese, arabic, hebrew, etc.). It automatically handles conversions from/to ANSI and wide strings, so that you can work with standard string classes and still be compatible with functions taking a EE::String. @code EE::String s; std::string s1 = s; // automatically converted to ANSI string String s2 = s; // automatically converted to wide string s = "hello"; // automatically converted from ANSI string s = L"hello"; // automatically converted from wide string s += 'a'; // automatically converted from ANSI string s += L'a'; // automatically converted from wide string @endcode Conversions involving ANSI strings use the default user locale. However it is possible to use a custom locale if necessary: @code std::locale locale; EE::String s; ... std::string s1 = s.ToAnsiString(locale); s = EE::String("hello", locale); @endcode EE::String defines the most important functions of the standard std::string class: removing, random access, iterating, appending, comparing, etc. However it is a simple class provided for convenience, and you may have to consider using a more optimized class if your program requires complex string handling. The automatic conversion functions will then take care of converting your string to EE::String whenever EE requires it. Please note that EE also defines a low-level, generic interface for Unicode handling, see the EE::Utf classes. All credits to Laurent Gomila, i just modified and expanded a little bit the implementation. */
35.338983
135
0.706807
[ "object", "vector" ]
22fbaa74942a7a51e1469691f4e0fdc8dad86f86
1,661
cc
C++
tests/ecru/EcruTest.cc
novel/ecru
b798d5a0cfa481af5af3974a950558dcf1dd37dc
[ "BSD-2-Clause" ]
1
2016-05-08T13:29:29.000Z
2016-05-08T13:29:29.000Z
tests/ecru/EcruTest.cc
novel/ecru
b798d5a0cfa481af5af3974a950558dcf1dd37dc
[ "BSD-2-Clause" ]
null
null
null
tests/ecru/EcruTest.cc
novel/ecru
b798d5a0cfa481af5af3974a950558dcf1dd37dc
[ "BSD-2-Clause" ]
1
2021-07-13T06:57:41.000Z
2021-07-13T06:57:41.000Z
#include <string> #include <cppunit/extensions/HelperMacros.h> #include "ecru.h" using namespace std; class EcruTest : public CPPUNIT_NS::TestFixture { private: CPPUNIT_TEST_SUITE( EcruTest ); CPPUNIT_TEST( testStripString ); CPPUNIT_TEST( testStripNewLines ); CPPUNIT_TEST( testExecuteCommandWithValidCommand ); CPPUNIT_TEST_SUITE_END(); public: void testStripString(); void testStripNewLines(); void testExecuteCommandWithValidCommand(); }; CPPUNIT_TEST_SUITE_REGISTRATION( EcruTest ); void EcruTest::testStripString() { // typical usage string unstripped = " somestr "; string stripped = ecru::stripString(unstripped); CPPUNIT_ASSERT_EQUAL(unstripped.size(), stripped.size() + 4); CPPUNIT_ASSERT(stripped == "somestr"); // find out what's going on if we pass empty string string empty = ecru::stripString(""); CPPUNIT_ASSERT(empty == ""); // check if it doesn't modify a string that doesn't need // to be stripped string alreadyStripped; string doubleStrip = ecru::stripString(alreadyStripped); CPPUNIT_ASSERT(doubleStrip == alreadyStripped); } void EcruTest::testStripNewLines() { // typical usage string stringWithNewLines = "hello\nhow are\nyou doing\n"; string stripped = ecru::stripNewLines(stringWithNewLines); CPPUNIT_ASSERT(stripped.find("\n") == string::npos); // empty CPPUNIT_ASSERT("" == ecru::stripNewLines("")); // without new lines CPPUNIT_ASSERT("foo" == ecru::stripNewLines("foo")); } void EcruTest::testExecuteCommandWithValidCommand() { vector<string> args; args.push_back("-a"); int status = ecru::executeCommand("/usr/bin/uname", args); CPPUNIT_ASSERT(status == 0); }
22.753425
62
0.735099
[ "vector" ]
22fbe81253f3c947a2cc21f1fb691bda0d7e57cf
12,569
cpp
C++
Rendara3D/Demos/OutBreak/OutBreakLevel.cpp
physteo/ggj19
0e14c110c00d95fe0b61f677c7de70860a08d1c3
[ "Apache-2.0" ]
1
2019-04-18T16:15:08.000Z
2019-04-18T16:15:08.000Z
Rendara3D/Demos/OutBreak/OutBreakLevel.cpp
physteo/ggj19
0e14c110c00d95fe0b61f677c7de70860a08d1c3
[ "Apache-2.0" ]
null
null
null
Rendara3D/Demos/OutBreak/OutBreakLevel.cpp
physteo/ggj19
0e14c110c00d95fe0b61f677c7de70860a08d1c3
[ "Apache-2.0" ]
null
null
null
#include "OutBreakLevel.h" OutBreakLevel::OutBreakLevel(Window& window, std::map<std::string, Texture>* loadedTextures) : /************ models ************/ woodBrickModel{ "./res/model/container/container.obj", glm::vec3{1.0f,0.0f,1.0f}, loadedTextures }, paperBrickModel{ "./res/model/container/container_cardboard.obj", glm::vec3{0.2f,0.2f,8.0f}, loadedTextures }, ironBrickModel{ "./res/model/container/container_hard.obj", glm::vec3{0.5f,0.5f,0.5f}, loadedTextures }, parquetModel{ "./res/model/parquet/parquet.obj", loadedTextures }, playerModel{ "./res/model/cube/cube.obj", glm::vec3{240,60.f,30.f}/255.f, loadedTextures }, ballModel{ "./res/model/sphere/sphere.obj", loadedTextures }, quad{ "./res/model/quad/quad.obj", loadedTextures }, /************ lighting ************/ sun{ sunPosition, sunCenter, sunAmbient0, sunDiffuse0, sunSpecular}, pointLight{ pointLightPosition, ambient, diffuse, specular, constant, linear, quadratic }, pointShadow{ 1024, 1024 }, hdrQuad{}, /************ instance sets ************/ bricksIron{50}, bricksWood{50}, bricksPaper{50}, particles{1000}, coloredQuads{1000} { // generate textures for shadows //sunShadowMap = ShadowMap2D{}; // create shaders objectsShader = std::move(Shader{ "./res/shaders/objects_wlights.shader" }); sunShadowShader = std::move(Shader{ "./res/shaders/depth.shader" }); cubeDepthShader = std::move(Shader{ "./res/shaders/cubeDepth.shader" }); instancesSunShadowShader = std::move(Shader{ "./res/shaders/instances_depth.shader"}); instancesCubeDepthShader = std::move(Shader{ "./res/shaders/instances_cubeDepth.shader"}); instancesColoredQuadsShader= std::move(Shader{ "./res/shaders/instances_colored_quads.shader" }); hdrShader = std::move(Shader{ "./res/shaders/hdr.shader"}); instancesObjectsShader = std::move(Shader{ "./res/shaders/instances_objects_wlights.shader"}); // HDR framebuffer initialization hdrFB.attach2DTexture(GL_COLOR_ATTACHMENT0, window.getWidth(), window.getHeight(), 4, RGBA16, GL_FLOAT); hdrFB.attachRenderBuffer(GL_DEPTH_COMPONENT, window.getWidth(), window.getHeight()); if (!hdrFB.iscomplete()) { std::cerr << "Framebuffer not complete!" << std::endl; } hdrShader.bind(); hdrShader.setUniformValue("exposure", 1.0f); hdrShader.unbind(); } // Example for level creation: // std::vector<std::vector<int> > layout = { {2,3,2,3,2,3,2,3,2,3,2,3}, // {3,2,3,2,3,2,3,2,3,2,3,2}, // {1,0,1,0,0,1,0,1,0,0,0,1} }; // 0 : empty // 1 : non destroyable // 2+: destroyable. Each number differs in color // 100+: for later: special bricks void OutBreakLevel::load(const std::vector<std::vector<int> >& layout) { //int numRows = layout.size(); int maxCols = 0; for (size_t i = 0; i < layout.size(); i++) { for (size_t j = 0; j < layout.at(i).size(); j++) { if (layout.at(i).size() > maxCols) { maxCols = layout.at(i).size(); } if (layout.at(i).at(j) != 0) { Brick brick; brick.transform.position = glm::vec3{i,0,j}; brick.transform.scale = glm::vec3{1.0f}; if (layout.at(i).at(j) == 1) { brick.model = &ironBrickModel; brick.destructible = false; bricksIron.push_back(brick); } else if (layout.at(i).at(j) == 2) { brick.model = &woodBrickModel; brick.destructible = true; bricksWood.push_back(brick); } else if (layout.at(i).at(j) == 3) { brick.model = &paperBrickModel; brick.destructible = true; bricksPaper.push_back(brick); } } } } bricksPaper.setModel(&paperBrickModel); bricksWood.setModel(&woodBrickModel); bricksIron.setModel(&ironBrickModel); particles.setModel(&ironBrickModel); coloredQuads.setModel(&quad); // borders of the level float bricksize = 1.0; float max_x = 0.0f + 0.5f * bricksize; float min_x = -(maxCols)-0.5f * bricksize + 1; float min_z = -(maxCols)-0.5f * bricksize + 1; float max_z = 0.0f + 0.5f * bricksize; // construct the proper orthographic projection projection = glm::ortho(min_x, max_x, min_z, max_z, 1.0f, 10.0f); // camera camera = Camera{ glm::vec3{0.0f, 5.0f, 0.0f}, glm::vec3{0.0f, 0.0f, 0.0f}, glm::vec3{-1.0f, 0.0f, 0.0f} }; // position of the sun sun.eye = glm::vec3{ -(max_x + min_x) / 2.0, 6.0f, -(max_z + min_z) / 2.0 }; // background initialization background.transform.scale = glm::vec3{1.2f}; background.transform.position = glm::vec3{ maxCols / 2.0 - 0.5f * bricksize, 0.0f,maxCols / 2.0 - 0.5f * bricksize }; background.transform.rotation = glm::vec3{ 0.0f,0.0f,0.0f }; background.model = &parquetModel; // player initialization player.transform.scale = glm::vec3{0.5f,1.0f,2.0f}; player.transform.position = glm::vec3{ 10.0f,0.0f,7.5f }; player.transform.rotation = glm::vec3{ 0.0f,0.0f,0.0f }; player.model = &playerModel; // ball initialization ball.radius = 0.25f; ball.transform.scale = glm::vec3{1.0f}; ball.transform.position = player.transform.position -2.0f * glm::vec3{ 1.0f,-0.0f,0.25f }; ball.transform.rotation = glm::vec3{ 0.0f, 0.0f, 0.0f }; ball.velocity = 2.0f * glm::vec3{ -2.5f, 0.0f, +2.5f }; ball.model = &ballModel; // walls normalVectorWall1 = glm::vec3{ 0.0f, 0.0f, 1.0f }; normalVectorWall2 = glm::vec3{ -1.0f, 0.0f, 0.0f }; normalVectorWall3 = glm::vec3{ 0.0f, 0.0f, 1.0f }; offsetVectorWall1 = glm::vec3{ 0.0f, 0.0f, -0.5f * bricksize }; offsetVectorWall2 = glm::vec3{ 0.0f, 0.0f, 0.0f }; offsetVectorWall3 = glm::vec3{ 0.0f, 0.0f, (maxCols) + 0.5f * bricksize - 1 }; } void OutBreakLevel::render(Window& window) { // submit to simple3Drenderer objects that do not need instancing simple3DRenderer.submit({player.model, player.transform, &objectsShader}); simple3DRenderer.submit({ball.model, ball.transform, &objectsShader}); simple3DRenderer.submit({background.model, background.transform,&objectsShader}); // clear shadows sunShadowMap.clearShadows(); pointShadow.clearShadows(); // calculate sunlight's shadows sunShadowMap.startShadows(window, sunShadowShader, &sun); simple3DRenderer.draw(&sunShadowShader); sunShadowMap.stopShadows(window, sunShadowShader); sunShadowMap.startShadows(window, instancesSunShadowShader, &sun); bricksIron.drawInstances(instancesSunShadowShader); bricksWood.drawInstances(instancesSunShadowShader); bricksPaper.drawInstances(instancesSunShadowShader); particles.drawInstances(instancesSunShadowShader); sunShadowMap.stopShadows(window, instancesSunShadowShader); // calculate pointlight's shadows pointShadow.startShadows(window, cubeDepthShader, pointLight); simple3DRenderer.draw(&cubeDepthShader); pointShadow.stopShadows(window, cubeDepthShader); pointShadow.startShadows(window, instancesCubeDepthShader, pointLight); bricksIron.drawInstances(instancesCubeDepthShader); bricksWood.drawInstances(instancesCubeDepthShader); bricksPaper.drawInstances(instancesCubeDepthShader); particles.drawInstances(instancesCubeDepthShader); pointShadow.stopShadows(window, instancesCubeDepthShader); // render the scene // enable HDR framebuffer hdrFB.bind(); window.clearColorBufferBit(0.5f, 0.5f, 0.5f, 1.0f); objectsShader.bind(); objectsShader.setUniformMatrix("view", camera.getViewMatrix(), false); objectsShader.setUniformMatrix("projection", projection, false); objectsShader.setUniformValue("cameraPos", camera.getEye()); // cast the light and use the shadow sun.cast("sun[0]", objectsShader); sunShadowMap.passUniforms(objectsShader, "shadowMap[0]", "lightSpaceMatrix[0]", sun.getViewMatrix()); pointLight.cast("pointLights[0]", objectsShader); pointShadow.passUniforms(objectsShader, "cubeDepthMap[0]", "farPlane"); // now the instances instancesObjectsShader.bind(); instancesObjectsShader.setUniformMatrix("view", camera.getViewMatrix(), false); instancesObjectsShader.setUniformMatrix("projection", projection, false); instancesObjectsShader.setUniformValue("cameraPos", camera.getEye()); sun.cast("sun[0]", instancesObjectsShader); sunShadowMap.passUniforms(instancesObjectsShader, "shadowMap[0]", "lightSpaceMatrix[0]", sun.getViewMatrix()); pointLight.cast("pointLights[0]", instancesObjectsShader); pointShadow.passUniforms(instancesObjectsShader, "cubeDepthMap[0]", "farPlane"); // draw new stuff renderer simple3DRenderer.draw(); simple3DRenderer.clear(); bricksIron.drawInstances( instancesObjectsShader); bricksWood.drawInstances( instancesObjectsShader); bricksPaper.drawInstances(instancesObjectsShader); particles.drawInstances(instancesObjectsShader); instancesColoredQuadsShader.bind(); instancesColoredQuadsShader.setUniformMatrix("view", camera.getViewMatrix(), false); instancesColoredQuadsShader.setUniformMatrix("projection", projection, false); instancesColoredQuadsShader.setUniformValue("brightness", 1.0f); coloredQuads.drawInstances(instancesColoredQuadsShader); // disable HDR framebuffer hdrFB.unbind(); // render on screen hdrShader.bind(); hdrShader.setTexture(GL_TEXTURE_2D, "hdrBuffer", hdrFB.getAttachedTextureID(0)); hdrQuad.draw(); hdrShader.unbind(); } void OutBreakLevel::update(Window& window) { float t = window.getCurrentTime(); float dt = window.getLastFrameTime(); // manage particles emitted by ball Particle newParticle; newParticle.transform.position = ball.transform.position + glm::vec3{ 0.2f * (rand() / (RAND_MAX + 1.0f)) }; newParticle.transform.scale = glm::vec3{ 0.2f * (rand() / (RAND_MAX + 1.0f)) }; newParticle.transform.rotation = glm::vec3{ 0.0f, 360.0f * rand() / (RAND_MAX + 1.0f), 0.0f };//glm::vec3{ 360.0f * rand() / (RAND_MAX + 1.0f) }; float random_green = 0.5 * (rand()) / (RAND_MAX + 1.0); newParticle.color = glm::vec4{1.0f, random_green, random_green / 5.0f, 1.0f}; newParticle.tau = 0.25f; coloredQuads.push_back(newParticle); // update time of all particles and kill old particles for (size_t i = 0; i < coloredQuads.size(); i++) { Particle particle = coloredQuads.getElement(i); particle.tau -= dt; if (particle.tau <= 0.0f) coloredQuads.deleteElement(i); else coloredQuads.setElement(i, particle); } // update position of the ball ball.move(dt); // check for collisions if (ball.collisionWithRectangle(player.transform.position, player.transform.scale.x, player.transform.scale.y, player.transform.scale.z)) { } else if (ball.collisionWithPlane(normalVectorWall1, offsetVectorWall1)) { } else if (ball.collisionWithPlane(normalVectorWall2, offsetVectorWall2)) { } else if (ball.collisionWithPlane(normalVectorWall3, offsetVectorWall3)) { } else { bool collided = false; for (size_t i = 0; i < bricksWood.size(); i++) { const Brick& brick = bricksWood.getElement(i); if (ball.collisionWithRectangle(brick.transform.position, brick.transform.scale.x, brick.transform.scale.y, brick.transform.scale.z)) { if (brick.destructible) { bricksWood.deleteElement(i); collided = true; break; } } } if (!collided) { for (size_t i = 0; i < bricksPaper.size(); i++) { const Brick& brick = bricksPaper.getElement(i); if (ball.collisionWithRectangle(brick.transform.position, brick.transform.scale.x, brick.transform.scale.y, brick.transform.scale.z)) { if (brick.destructible) { bricksPaper.deleteElement(i); collided = true; break; } } } } if (!collided) { for (size_t i = 0; i < bricksIron.size(); i++) { const Brick& brick = bricksIron.getElement(i); if (ball.collisionWithRectangle(brick.transform.position, brick.transform.scale.x, brick.transform.scale.y, brick.transform.scale.z)) { if (brick.destructible) { bricksIron.deleteElement(i); collided = true; break; } } } } } //pointLight.eye = ball.transform.position + glm::vec3{0.0f, 2.0f, 0.0f}; pointLight.eye = glm::vec3{ 5.0 + 4.5* sin(1.0 * t), 1.5, 4.5 + 5.5*cos(1.0 * t) }; //sun.eye = glm::vec3{ 5.0 - 10.0* sin(0.3 * t), 10.0, 5.0 - 10.0*cos(0.3 * t) }; processCommands(window); } void OutBreakLevel::processCommands(Window& window) { float t = window.getCurrentTime(); float dt = window.getLastFrameTime(); //camera.processCommands(window); player.processCommands(window, dt, t, 20.0f); ball.processCommands(window, dt, 10.0f); } GameState OutBreakLevel::status() { if (ball.transform.position.x >= 12.0) { return GameState::GAME_LOST; } if (bricksPaper.size() == 0 && bricksWood.size() == 0) { return GAME_WIN; } return GameState::GAME_ACTIVE; }
33.076316
146
0.697669
[ "render", "vector", "model", "transform" ]
22fdf991990804f99d8d86476a1c5f89cec7b9ae
969
cpp
C++
1007-minimum-domino-rotations-for-equal-row/1007-minimum-domino-rotations-for-equal-row.cpp
sahib-pratap-singh/Leetcode
0df2053dcf51c61c1d32ae2d20f58c11b2c25b24
[ "MIT" ]
null
null
null
1007-minimum-domino-rotations-for-equal-row/1007-minimum-domino-rotations-for-equal-row.cpp
sahib-pratap-singh/Leetcode
0df2053dcf51c61c1d32ae2d20f58c11b2c25b24
[ "MIT" ]
null
null
null
1007-minimum-domino-rotations-for-equal-row/1007-minimum-domino-rotations-for-equal-row.cpp
sahib-pratap-singh/Leetcode
0df2053dcf51c61c1d32ae2d20f58c11b2c25b24
[ "MIT" ]
null
null
null
class Solution { public: int minDominoRotations(vector<int>& tops, vector<int>& bottoms) { int n=tops.size(); int countA=0; int countB=0; for(int i=0;i<n;i++){ if(tops[i]==tops[0] || bottoms[i]==tops[0]){ if(tops[i]!=tops[0]) countA++; if(bottoms[i]!=tops[0]) countB++; if(i==n-1) return min(countA,countB); }else{ break; } } countA=0; countB=0; for(int i=0;i<n;i++){ if(tops[i]==bottoms[0] || bottoms[i]==bottoms[0]){ if(tops[i]!=bottoms[0]) countA++; if(bottoms[i]!=bottoms[0]) countB++; if(i==n-1) return min(countA,countB); }else{ break; } } return -1; } };
27.685714
69
0.365325
[ "vector" ]
22fff910a89facd6c2b6a20daefd31488f168e82
2,605
cc
C++
backend/reg-alloc/color-ssa-td/src/lib/live-now.cc
obs145628/cle
4a4a18b2ab5a6fbf26629f6845147541edabd7c9
[ "MIT" ]
null
null
null
backend/reg-alloc/color-ssa-td/src/lib/live-now.cc
obs145628/cle
4a4a18b2ab5a6fbf26629f6845147541edabd7c9
[ "MIT" ]
null
null
null
backend/reg-alloc/color-ssa-td/src/lib/live-now.cc
obs145628/cle
4a4a18b2ab5a6fbf26629f6845147541edabd7c9
[ "MIT" ]
null
null
null
#include "live-now.hh" #include "../isa/isa.hh" #include <logia/program.hh> namespace { std::ostream &operator<<(std::ostream &os, const LiveNow::set_t &set) { os << "{"; std::size_t rem = set.size(); for (const auto &it : set) { os << it; if (--rem) os << ", "; } return os << "}"; } std::ostream &operator<<(std::ostream &os, const std::vector<LiveNow::Pos> &pos) { for (const auto &p : pos) os << "(" << p.bb->name() << ", " << p.ins_pos << ") "; return os; } } // namespace LiveNow::LiveNow(const isa::Function &fun) : isa::FunctionAnalysis(fun), _liveout(fun.get_analysis<LiveOut>()) { _doc = logia::Program::instance().add_doc<logia::MdGfmDoc>("LiveNow: @" + fun.name()); _build(); _dump(); _doc = nullptr; } void LiveNow::_build() { for (auto bb : fun().bbs()) _build(*bb); } void LiveNow::_build(const isa::BasicBlock &bb) { auto &lives = _livenow[&bb]; auto now = _liveout.liveout(bb); lives.resize(bb.code().size() + 1); lives.back() = now; // Start from liveout: livenow after last instruction // Compute livenow before each instruction from bottom to top // First remove defs (they are killed before the ins) // And add uses (they are live before the ins) // This order (defs then uses) is required for things such as add %x, %x, 2 // It ensures x is still lives before, even if redefined for (std::size_t i = bb.code().size() - 1; i < bb.code().size(); --i) { isa::Ins cins(fun().parent().ctx(), bb.code()[i]); for (const auto &r : cins.args_defs()) { now.erase(r); _defs_pos[r].emplace_back(&bb, i); } for (const auto &r : cins.args_uses()) { if (!now.count(r)) _ends_pos[r].emplace_back(&bb, i); now.insert(r); } lives[i] = now; } } void LiveNow::_dump() { { auto ch = _doc->code("asm"); auto &os = ch.os(); os << fun().name() << ":\n"; os << ".fun\n\n"; for (auto bb : fun().bbs()) { _dump(os, *bb); os << "\n"; } } *_doc << "## Live Ranges\n"; for (auto r : _defs_pos) *_doc << "- `Def(" << r.first << ") = " << r.second << "`\n"; for (auto r : _ends_pos) *_doc << "- `End(" << r.first << ") = " << r.second << "`\n"; } void LiveNow::_dump(std::ostream &os, const isa::BasicBlock &bb) { os << bb.name() << ":\n" << " ; Entry: " << live_before(bb, 0) << "\n"; for (std::size_t i = 0; i < bb.code().size(); ++i) { bb.dump_ins(os, i); os << " ; " << live_after(bb, i) << "\n"; } }
24.809524
77
0.526296
[ "vector" ]
fe00d5440fc9df6da48b71b1e46c2c6a70a777aa
501
cpp
C++
sudokuSolver.cpp
voltrevo/sudokuSolver
7e06f8239f458086fc3b36d52cac849fcb4df505
[ "MIT" ]
null
null
null
sudokuSolver.cpp
voltrevo/sudokuSolver
7e06f8239f458086fc3b36d52cac849fcb4df505
[ "MIT" ]
null
null
null
sudokuSolver.cpp
voltrevo/sudokuSolver
7e06f8239f458086fc3b36d52cac849fcb4df505
[ "MIT" ]
null
null
null
#include <iostream> #include "solver.hpp" int main() { Solver solver; while (true) { State puzzle; std::cin >> puzzle; if (!std::cin) { break; } std::vector<State> solutions = solver.Solve(puzzle); bool first = true; for (State& s : solutions) { if (!first) std::cout << ","; std::cout << s; } std::cout << std::endl; } return 0; }
14.735294
61
0.417166
[ "vector" ]
fe05df7abc9138688a7e37bdccec76ac81f9be33
6,981
cc
C++
dali/kernels/signal/fft/fft_cpu_impl_ffts.cc
L-Net-1992/DALI
982224d8b53e1156ae092f73f5a7d600982a1eb9
[ "ECL-2.0", "Apache-2.0" ]
2
2022-02-17T19:54:05.000Z
2022-02-17T19:54:08.000Z
dali/kernels/signal/fft/fft_cpu_impl_ffts.cc
L-Net-1992/DALI
982224d8b53e1156ae092f73f5a7d600982a1eb9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali/kernels/signal/fft/fft_cpu_impl_ffts.cc
L-Net-1992/DALI
982224d8b53e1156ae092f73f5a7d600982a1eb9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
// Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "dali/kernels/signal/fft/fft_cpu_impl_ffts.h" #include <ffts.h> #include <cmath> #include <complex> #include <utility> #include <vector> #include "dali/core/common.h" #include "dali/core/convert.h" #include "dali/core/error_handling.h" #include "dali/core/format.h" #include "dali/core/util.h" #include "dali/kernels/kernel.h" #include "dali/kernels/signal/fft/fft_cpu_impl_utils.h" #include "dali/kernels/common/for_axis.h" #include "dali/kernels/common/utils.h" namespace dali { namespace kernels { namespace signal { namespace fft { namespace impl { namespace { inline bool can_use_real_impl(int64_t n) { // Real impl can be selected when doing forward transform and n is a power of 2 return is_pow2(n); } inline int64_t size_in_buf(int64_t n) { // Real impl input needs: N real numbers -> N floats // Complex impl input needs: N complex numbers -> 2*N floats return can_use_real_impl(n) ? n : 2*n; } inline int64_t size_out_buf(int64_t n) { // Real impl output needs: (N/2)+1 complex numbers -> N+2 floats // Complex impl output needs: N complex numbers -> 2*N floats return can_use_real_impl(n) ? n+2 : 2*n; } } // namespace template <typename OutputType, typename InputType, int Dims> KernelRequirements Fft1DImplFfts<OutputType, InputType, Dims>::Setup( KernelContext &context, const InTensorCPU<InputType, Dims> &in, const FftArgs &args) { constexpr bool is_complex_out = std::is_same<OutputType, std::complex<float>>::value; constexpr bool is_real_out = std::is_same<OutputType, float>::value; DALI_ENFORCE((is_complex_out && args.spectrum_type == FFT_SPECTRUM_COMPLEX) || (is_real_out && args.spectrum_type != FFT_SPECTRUM_COMPLEX), "Output type should be complex<float> or float depending on the requested spectrum type"); transform_axis_ = args.transform_axis >= 0 ? args.transform_axis : Dims-1; DALI_ENFORCE(transform_axis_ >= 0 && transform_axis_ < Dims, make_string("Transform axis ", transform_axis_, " is out of bounds [0, ", Dims, ")")); const auto n = in.shape[transform_axis_]; auto nfft = args.nfft > 0 ? args.nfft : n; KernelRequirements req; auto out_shape = in.shape; ScratchpadEstimator se; se.add<mm::memory_kind::host, float>(size_in_buf(nfft), 32); se.add<mm::memory_kind::host, float>(size_out_buf(nfft), 32); req.scratch_sizes = se.sizes; out_shape[transform_axis_] = nfft / 2 + 1; req.output_shapes = {TensorListShape<DynamicDimensions>({out_shape})}; if (!plan_ || nfft != nfft_) { if (can_use_real_impl(nfft)) { plan_ = {ffts_init_1d_real(nfft, FFTS_FORWARD), ffts_free}; } else { plan_ = {ffts_init_1d(nfft, FFTS_FORWARD), ffts_free}; } DALI_ENFORCE(plan_ != nullptr, "Could not initialize ffts plan"); nfft_ = nfft; } return req; } template <typename OutputType, typename InputType, int Dims> void Fft1DImplFfts<OutputType, InputType, Dims>::Run( KernelContext &context, const OutTensorCPU<OutputType, Dims> &out, const InTensorCPU<InputType, Dims> &in, const FftArgs &args) { const auto n = in.shape[transform_axis_]; // Those should be already calculated assert(transform_axis_ >= 0); assert(nfft_ > 0); assert(n <= nfft_); // When the nfft is larger than the window lenght, we center the window // (padding with zeros on both side) int in_win_start = n < nfft_ ? (nfft_ - n) / 2 : 0; bool use_real_impl = can_use_real_impl(nfft_); auto in_buf_sz = size_in_buf(nfft_); // ffts requires 32-byte aligned memory float* in_buf = context.scratchpad->AllocateHost<float>(in_buf_sz, 32); memset(in_buf, 0, in_buf_sz*sizeof(float)); auto out_buf_sz = size_out_buf(nfft_); // ffts requires 32-byte aligned memory float* out_buf = context.scratchpad->AllocateHost<float>(out_buf_sz, 32); memset(out_buf, 0, out_buf_sz*sizeof(float)); auto in_shape = in.shape; auto in_strides = GetStrides(in_shape); auto out_shape = out.shape; auto out_strides = GetStrides(out_shape); ForAxis( out.data, in.data, out_shape.data(), out_strides.data(), in_shape.data(), in_strides.data(), transform_axis_, out.dim(), [this, &args, use_real_impl, out_buf, in_buf, in_win_start]( OutputType *out_data, const InputType *in_data, int64_t out_size, int64_t out_stride, int64_t in_size, int64_t in_stride) { int64_t in_idx = 0; if (use_real_impl) { for (int i = 0; i < in_size; i++) { in_buf[in_win_start + i] = ConvertSat<float>(in_data[in_idx]); in_idx += in_stride; } } else { for (int i = 0; i < in_size; i++) { int64_t off = 2 * (in_win_start + i); in_buf[off] = ConvertSat<float>(in_data[in_idx]); in_buf[off + 1] = 0.0f; in_idx += in_stride; } } ffts_execute(plan_.get(), in_buf, out_buf); // For complex impl, out_buf_sz contains the whole spectrum, // for real impl, the second half of the spectrum is ommited // In any case, we are interested in the first half of the spectrum only auto *complex_fft = reinterpret_cast<std::complex<float> *>(out_buf); if (args.spectrum_type == FFT_SPECTRUM_COMPLEX) { auto *complex_out = reinterpret_cast<std::complex<float> *>(out_data); for (int i = 0; i < nfft_/2+1; i++) { complex_out[i*out_stride] = complex_fft[i]; } } else { MagnitudeSpectrumCalculator().Calculate( args.spectrum_type, out_data, complex_fft, out_size, out_stride, 1); } }); } // 1 Dim, typically input (time), producing output (frequency) template class Fft1DImplFfts<std::complex<float>, float, 1>; // complex fft template class Fft1DImplFfts<float, float, 1>; // magnitude // 2 Dims, typically input (channels, time), producing output (channels, frequency) template class Fft1DImplFfts<std::complex<float>, float, 2>; template class Fft1DImplFfts<float, float, 2>; // 3 Dims, typically input (channels, frames, time), producing output (channels, frames, frequency) template class Fft1DImplFfts<std::complex<float>, float, 3>; template class Fft1DImplFfts<float, float, 3>; } // namespace impl } // namespace fft } // namespace signal } // namespace kernels } // namespace dali
36.742105
99
0.688297
[ "shape", "vector", "transform" ]
fe07a4f42267a4e6a8e07a9f6a271da657cb51f4
2,396
cpp
C++
OpenGL Engine/src/components/Entity.cpp
nfwGytautas/GLEngine-v2
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
null
null
null
OpenGL Engine/src/components/Entity.cpp
nfwGytautas/GLEngine-v2
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
26
2018-06-14T21:06:56.000Z
2018-07-28T16:56:42.000Z
OpenGL Engine/src/components/Entity.cpp
nfwGytautas/SGE
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
null
null
null
#include "Entity.h" #include "..\SGEDefs.h" #include "EntityManager.h" void Entity::init() { for (unsigned int i = 0; i < maxComponents; i++) { if(m_componentArray[i] != nullptr) { m_componentArray[i]->init(); } } } void Entity::update(float frameTime) { for (unsigned int i = 0; i < maxComponents; i++) { if (m_componentArray[i] != nullptr) { m_componentArray[i]->update(frameTime); } } } void Entity::preRender() { for (unsigned int i = 0; i < maxComponents; i++) { if (m_componentArray[i] != nullptr) { m_componentArray[i]->preRender(); } } } void Entity::render() { for (unsigned int i = 0; i < maxComponents; i++) { if (m_componentArray[i] != nullptr) { m_componentArray[i]->render(); } } } void Entity::postRender() { for (unsigned int i = 0; i < maxComponents; i++) { if (m_componentArray[i] != nullptr) { m_componentArray[i]->postRender(); } } } bool Entity::isActive() const { return m_active; } void Entity::deactivate() { m_active = false; } void Entity::activate() { m_active = true; } bool Entity::isAlive() const { return m_alive; } void Entity::destroy() { m_alive = false; } bool Entity::hasGroup(Group mGroup) const noexcept { return m_groupBitset[mGroup]; } void Entity::delGroup(Group mGroup) noexcept { m_groupBitset[mGroup] = false; } void Entity::addGroup(Group mGroup) noexcept { m_groupBitset[mGroup] = true; SGE::Instances::instances->entityManagerInstance->addToGroup(this, mGroup); } Entity::Entity() { for (unsigned int i = 0; i < maxComponents; i++) { m_componentArray[i] = nullptr; } SGE::Instances::instances->entityManagerInstance->registerEntity(this); } Entity::Entity(EntityBlueprint& mBlueprint) { m_componentBitset = mBlueprint.m_componentBitset; for (unsigned int i = 0; i < maxComponents; i++) { m_componentArray[i] = nullptr; if (mBlueprint.m_componentArray[i] != nullptr) { Component* comp = mBlueprint.m_componentArray[i]->clone(); comp->entity = this; comp->init(); m_componentArray[i] = comp; } } SGE::Instances::instances->entityManagerInstance->registerEntity(this); } Entity::~Entity() { releaseMemory(); } void Entity::releaseMemory() { if(!m_memoryReleased) { for (unsigned int i = 0; i < maxComponents; i++) { if (m_componentArray[i] != nullptr) { delete m_componentArray[i]; } } m_memoryReleased = true; } }
17.362319
76
0.663606
[ "render" ]
fe09de7faa4be13077e835f4278276954117e813
7,865
cpp
C++
decrypt-log/DecryptLog.cpp
parsiya/Parsia-Code
e75bd9f7f295e6d8e584de67f90dd02cb75ae915
[ "MIT" ]
21
2018-09-10T03:09:17.000Z
2022-02-07T09:20:03.000Z
decrypt-log/DecryptLog.cpp
parsiya/Parsia-Code
e75bd9f7f295e6d8e584de67f90dd02cb75ae915
[ "MIT" ]
1
2019-11-10T21:17:23.000Z
2020-01-19T04:36:19.000Z
decrypt-log/DecryptLog.cpp
parsiya/Parsia-Code
e75bd9f7f295e6d8e584de67f90dd02cb75ae915
[ "MIT" ]
8
2019-10-11T23:29:58.000Z
2021-05-26T12:11:43.000Z
// DecryptLog.cpp : Decrypts encrypted log files. // Lots of useless utility methods to warm up. I had not written C++ in forever. #include <iostream> #include <random> #include <string> #include <fstream> #include <stdio.h> #include <cstddef> // To get byte in Visual C++. // 1. Right-click on the solution. // 2. Properties > C/C++ > Language. // 3. Change "C++ Language Standard" to "ISO C++17 Standard (/std:c++17)" // 4. Add <cstddef>. // 5. Now you can use std::byte. using namespace std; // charToByteVector converts vector<char> to vector<byte>. // Modified from: https://stackoverflow.com/a/52629891. vector<byte> charToByteVector(const vector<char> chars) { vector<byte> bytes; for (char c : chars) bytes.push_back(static_cast<byte>(c)); return bytes; } // byteToCharVector converts vector<byte> to vector<char>. vector<char> byteToCharVector(const vector<byte> bytes) { vector<char> chars; for (byte b : bytes) chars.push_back(static_cast<char>(b)); return chars; } // stringToCharVector converts a string to vector<char>. vector<char> stringToCharVector(const string s) { vector<char> chars(s.begin(), s.end()); return chars; } // stringToByteVector converts a string to vector<byte>. vector<byte> stringToByteVector(const string s) { return charToByteVector(stringToCharVector(s)); } // byteVectorTostring converts a vector<byte> to string. string byteVectorTostring(const vector<byte> bytes) { vector<char> chars = byteToCharVector(bytes); return string(chars.data(), chars.size()); } // slice returns a slice of vector v from indices m to n. // Copied from: https://www.techiedelight.com/get-slice-sub-vector-from-vector-cpp/. template<typename T> std::vector<T> slice(std::vector<T>& v, int m, int n) { std::vector<T> vec; std::copy(v.begin() + m, v.begin() + n + 1, std::back_inserter(vec)); return vec; } // readFileString reads a file and returns it a string // Modified from: https://stackoverflow.com/a/525103. string readFileString(const string& filename) { ifstream inFile(filename.c_str(), ios::in | ios::binary | ios::ate); ifstream::pos_type fileSize = inFile.tellg(); inFile.seekg(0, ios::beg); vector<char> fileBytes(fileSize); inFile.read(fileBytes.data(), fileSize); inFile.close(); return string(fileBytes.data(), fileSize); } // readFileChar reads a file and returns a vector<char>. // Note the vector is not NULL-terminated. // Modified from https://stackoverflow.com/a/50317432. vector<char> readFileChar(const string& filename) { ifstream inFile(filename.c_str(), ios::in | ios::binary | ios::ate); std::vector<char> fileBytes( (istreambuf_iterator<char>(inFile)), (istreambuf_iterator<char>())); inFile.close(); return fileBytes; } // readFileByte reads a file and returns a vector<byte>. vector<byte> readFileByte(const string& filename) { ifstream inFile(filename.c_str(), ios::in | ios::binary | ios::ate); ifstream::pos_type fileSize = inFile.tellg(); inFile.seekg(0, ios::beg); vector<char> fileBytes(fileSize); inFile.read(fileBytes.data(), fileSize); inFile.close(); return charToByteVector(fileBytes); } // writeFileString writes the string to file. Overwrites the existing file if it // exists. void writeFileString(const string data, const string filename) { ofstream outFile(filename.c_str(), ios::binary); outFile << data; outFile.close(); } // writeFileByte writes a vector<byte> to file. Overwrites the existing file if it // exists. void writeFileByte(const vector<byte> data, const string filename) { ofstream outFile(filename.c_str(), ios::binary); outFile << byteVectorTostring(data); outFile.close(); } // getKeys seeds the 32-bit mt19937 with 0x25082011 and returns a vector<byte> // with num keys. Where key is the largest byte of the uint32 number generated // by the mt19937 engine. vector<byte> getKeys(const int num) { vector<byte> keys; // Custom seed. mt19937 generator(0x25082011); for (size_t i = 0; i < num; i++) { unsigned int num = generator(); // Get the byte in AL. num = (num & 0xFF000000) >> 24; // Store it in the vector. keys.push_back(byte(num)); } return keys; } const string s_LOGZ = "LOGZ"; // checkFileHeader compares the first 4 bytes of input with LOGZ. // Returns true if they match. bool checkHeader(vector<byte> input) { // Convert s_LOGZ to vector<byte> vector<byte> vectorLOGZ = stringToByteVector(s_LOGZ); // 3.1.2 Get the first 4 bytes of input file (vector<byte> enc). vector<byte> fileHeader = slice(input, 0, 3); return (vectorLOGZ == fileHeader); } const vector<byte> version{ byte{0x20}, byte{0x10}, byte{0xAB}, byte{0x01} }; // checkVersion compares the second 4 bytes of input with version. bool checkVersion(vector<byte> input) { vector<byte> fileVersion = slice(input, 4, 7); return (fileVersion == version); } int main(int argc, char* argv[], char* envp[]) { // 1. Read command line parameters. // 1.1 First should be the input file and second the output file. string usage("Usage: DecryptLog EncryptedLogFile DecryptedFilePath"); // 1.2 If we do not have 3 arguments (including the executable name) if (argc != 3) { cout << "Please provide two arguments." << endl; cout << usage; return 1; } // 1.3 Open the first argument. string inPath = argv[1]; string outPath = argv[2]; // cout << "Got argv[1]: " << inPath << endl; // cout << "Got argv[2]: " << outPath << endl; vector<byte> inputBytes; // 2. Read the data from inputFile. cout << "Reading from " << inPath << endl; try { inputBytes = readFileByte(inPath); } catch (const std::exception& e) { cerr << "Exception opening input file at " << inPath << " - Error: " << e.what() << endl; return 1; } // 3. Check the header // 3.1 Check the first 4 bytes. They should be LOGZ. if (checkHeader(inputBytes)) { cout << "File header is correct." << endl; } else { cout << "File header is incorrect. Wanted: " << s_LOGZ << " , got: " << slice(inputBytes,0,3).data() << endl; return 1; } // 3.2 Check the version. Next 4 bytes should be 0x20, 0x10, 0xAB, 0x01. if (checkVersion(inputBytes)) { cout << "File version is correct." << endl; } else { cout << "File version is incorrect. Wanted: " << version.data() << " , got: " << slice(inputBytes, 4, 7).data() << endl; return 1; } // 4. Decrypt. cout << "Decrypting." << endl; // 4.1 Create the plaintext vector<byte>. // First 8 bytes are already accounted for. vector<byte> ciphertext = slice(inputBytes, 8, inputBytes.size()-1); vector<byte> plaintext; // 4.2 Get the key stream. vector<byte> key = getKeys(ciphertext.size()); // 4.3 XOR key and ciphertext for (size_t i = 0; i < ciphertext.size(); i++) { plaintext.push_back(ciphertext[i] ^ key[i]); } cout << "Ciphertext size: " << ciphertext.size() << endl; cout << "Plaintext size : " << plaintext.size() << endl; // 5. Write it to the outfile. cout << "Writing the output to " << outPath << endl; try { writeFileByte(plaintext, outPath); } catch (const std::exception& e) { cerr << "Exception writing to file at " << inPath << " - Error: " << e.what() << endl; return 1; } return 0; }
30.603113
129
0.62314
[ "vector" ]
fe0bc30914c0a63aaf3bec0621cddbadeff41056
9,008
cpp
C++
shadow/operators/kernels/deconv.cpp
junluan/shadow
067d1c51d7c38bc1c985008a2e2e1599bbf11a8c
[ "Apache-2.0" ]
20
2017-07-04T11:22:47.000Z
2022-01-16T03:58:32.000Z
shadow/operators/kernels/deconv.cpp
junluan/shadow
067d1c51d7c38bc1c985008a2e2e1599bbf11a8c
[ "Apache-2.0" ]
2
2017-12-03T13:07:39.000Z
2021-01-13T11:11:52.000Z
shadow/operators/kernels/deconv.cpp
junluan/shadow
067d1c51d7c38bc1c985008a2e2e1599bbf11a8c
[ "Apache-2.0" ]
10
2017-09-30T05:06:30.000Z
2020-11-13T05:43:44.000Z
#include "deconv.hpp" namespace Shadow { namespace Vision { template <> void Col2Im2D<DeviceType::kCPU, float>(const float* col_data, const VecInt& in_shape, int kernel_size_h, int kernel_size_w, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w, const VecInt& out_shape, float* out_data, Context* context) { int in_h = in_shape[2], in_w = in_shape[3]; int out_c = out_shape[1], out_h = out_shape[2], out_w = out_shape[3]; int ke_h = (kernel_size_h - 1) * dilation_h + 1; int ke_w = (kernel_size_w - 1) * dilation_w + 1; for (int c = 0; c < out_c; ++c, col_data += in_h * in_w * kernel_size_h * kernel_size_w) { for (int h = pad_h; h < out_h + pad_h; ++h) { for (int w = pad_w; w < out_w + pad_w; ++w) { int hstart = h < ke_h ? 0 : (h - ke_h) / stride_h + 1; int hend = std::min(h / stride_h + 1, in_h); int wstart = w < ke_w ? 0 : (w - ke_w) / stride_w + 1; int wend = std::min(w / stride_w + 1, in_w); double sum_val = 0; for (int h_in = hstart; h_in < hend; ++h_in) { int h_k = h - h_in * stride_h; if (h_k % dilation_h == 0) { for (int w_in = wstart; w_in < wend; ++w_in) { int w_k = w - w_in * stride_w; if (w_k % dilation_w == 0) { sum_val += col_data[((h_k / dilation_h * kernel_size_w + w_k / dilation_w) * in_h + h_in) * in_w + w_in]; } } } } *out_data++ = static_cast<float>(sum_val); } } } } template <> void Col2Im3D<DeviceType::kCPU, float>( const float* col_data, const VecInt& in_shape, int kernel_size_d, int kernel_size_h, int kernel_size_w, int stride_d, int stride_h, int stride_w, int pad_d, int pad_h, int pad_w, int dilation_d, int dilation_h, int dilation_w, const VecInt& out_shape, float* out_data, Context* context) { int in_d = in_shape[2], in_h = in_shape[3], in_w = in_shape[4]; int out_c = out_shape[1], out_d = out_shape[2], out_h = out_shape[3], out_w = out_shape[4]; int ke_d = (kernel_size_d - 1) * dilation_d + 1; int ke_h = (kernel_size_h - 1) * dilation_h + 1; int ke_w = (kernel_size_w - 1) * dilation_w + 1; for (int c = 0; c < out_c; ++c, col_data += in_d * in_h * in_w * kernel_size_d * kernel_size_h * kernel_size_w) { for (int d = pad_d; d < out_d + pad_d; ++d) { for (int h = pad_h; h < out_h + pad_h; ++h) { for (int w = pad_w; w < out_w + pad_w; ++w) { int dstart = d < ke_d ? 0 : (d - ke_d) / stride_d + 1; int dend = std::min(d / stride_d + 1, in_d); int hstart = h < ke_h ? 0 : (h - ke_h) / stride_h + 1; int hend = std::min(h / stride_h + 1, in_h); int wstart = w < ke_w ? 0 : (w - ke_w) / stride_w + 1; int wend = std::min(w / stride_w + 1, in_w); double sum_val = 0; for (int d_in = dstart; d_in < dend; ++d_in) { int d_k = d - d_in * stride_d; if (d_k % dilation_d == 0) { for (int h_in = hstart; h_in < hend; ++h_in) { int h_k = h - h_in * stride_h; if (h_k % dilation_h == 0) { for (int w_in = wstart; w_in < wend; ++w_in) { int w_k = w - w_in * stride_w; if (w_k % dilation_w == 0) { sum_val += col_data[((((d_k / dilation_d * kernel_size_h + h_k / dilation_h) * kernel_size_w + w_k / dilation_w) * in_d + d_in) * in_h + h_in) * in_w + w_in]; } } } } } } *out_data++ = static_cast<float>(sum_val); } } } } } } // namespace Vision } // namespace Shadow namespace Shadow { REGISTER_OP_KERNEL_DEFAULT(DeconvCPU, DeconvKernelDefault<DeviceType::kCPU>); #if defined(USE_DNNL) class DeconvKernelDNNL : public DeconvKernel { public: void Run(const std::shared_ptr<Blob>& input, const std::shared_ptr<Blob>& weight, const std::shared_ptr<Blob>& bias, std::shared_ptr<Blob>& output, Workspace* ws, int num_output, int kernel_size_h, int kernel_size_w, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w, int group, bool bias_term, int activate_type) override { int in_c = input->shape(1); const auto& src_desc = idnnl::create_memory_desc<float>( input->shape(), dnnl::memory::format_tag::nchw); const auto& dst_desc = idnnl::create_memory_desc<float>( output->shape(), dnnl::memory::format_tag::nchw); dnnl::memory::desc weight_desc; if (group == 1) { weight_desc = idnnl::create_memory_desc<float>( {num_output, in_c, kernel_size_h, kernel_size_w}, dnnl::memory::format_tag::iohw); } else { weight_desc = idnnl::create_memory_desc<float>( {group, num_output / group, in_c / group, kernel_size_h, kernel_size_w}, dnnl::memory::format_tag::giohw); } const auto& bias_desc = idnnl::create_memory_desc<float>( {num_output}, bias_term ? dnnl::memory::format_tag::x : dnnl::memory::format_tag::undef); const auto& deconv_desc = dnnl::deconvolution_forward::desc( dnnl::prop_kind::forward_inference, dnnl::algorithm::deconvolution_direct, src_desc, weight_desc, bias_desc, dst_desc, {stride_h, stride_w}, {dilation_h - 1, dilation_w - 1}, {pad_h, pad_w}, {pad_h, pad_w}); idnnl::common_forward<dnnl::deconvolution_forward>( ws->Ctx()->dnnl_handle(), deconv_desc, input->data<float>(), weight->data<float>(), bias_term ? bias->data<float>() : nullptr, output->mutable_data<float>(), activate_type); } void Run(const std::shared_ptr<Blob>& input, const std::shared_ptr<Blob>& weight, const std::shared_ptr<Blob>& bias, std::shared_ptr<Blob>& output, Workspace* ws, int num_output, int kernel_size_d, int kernel_size_h, int kernel_size_w, int stride_d, int stride_h, int stride_w, int pad_d, int pad_h, int pad_w, int dilation_d, int dilation_h, int dilation_w, int group, bool bias_term, int activate_type) override { int in_c = input->shape(1); const auto& src_desc = idnnl::create_memory_desc<float>( input->shape(), dnnl::memory::format_tag::ncdhw); const auto& dst_desc = idnnl::create_memory_desc<float>( output->shape(), dnnl::memory::format_tag::ncdhw); dnnl::memory::desc weight_desc; if (group == 1) { weight_desc = idnnl::create_memory_desc<float>( {num_output, in_c, kernel_size_d, kernel_size_h, kernel_size_w}, dnnl::memory::format_tag::iodhw); } else { weight_desc = idnnl::create_memory_desc<float>( {group, num_output / group, in_c / group, kernel_size_d, kernel_size_h, kernel_size_w}, dnnl::memory::format_tag::giodhw); } const auto& bias_desc = idnnl::create_memory_desc<float>( {num_output}, bias_term ? dnnl::memory::format_tag::x : dnnl::memory::format_tag::undef); const auto& deconv_desc = dnnl::deconvolution_forward::desc( dnnl::prop_kind::forward_inference, dnnl::algorithm::deconvolution_direct, src_desc, weight_desc, bias_desc, dst_desc, {stride_d, stride_h, stride_w}, {dilation_d - 1, dilation_h - 1, dilation_w - 1}, {pad_d, pad_h, pad_w}, {pad_d, pad_h, pad_w}); idnnl::common_forward<dnnl::deconvolution_forward>( ws->Ctx()->dnnl_handle(), deconv_desc, input->data<float>(), weight->data<float>(), bias_term ? bias->data<float>() : nullptr, output->mutable_data<float>(), activate_type); } DeviceType device_type() const override { return DeviceType::kCPU; } std::string kernel_type() const override { return "DNNL"; } }; REGISTER_OP_KERNEL_DNNL(DeconvCPU, DeconvKernelDNNL); #endif } // namespace Shadow
42.490566
80
0.534969
[ "shape" ]
fe25271716ece540dd8d22118eb5ebcb5d082e68
7,420
cpp
C++
server.cpp
Aleksej10/checkersAI
d696d092023b1f2da85ca3810819bf3765ea8d78
[ "MIT" ]
null
null
null
server.cpp
Aleksej10/checkersAI
d696d092023b1f2da85ca3810819bf3765ea8d78
[ "MIT" ]
null
null
null
server.cpp
Aleksej10/checkersAI
d696d092023b1f2da85ca3810819bf3765ea8d78
[ "MIT" ]
null
null
null
#include <bits/stdint-uintn.h> #include <cstdlib> #include <websocketpp/config/asio_no_tls_client.hpp> #include <websocketpp/client.hpp> #include "pos.hpp" #include "node.hpp" #include "model.hpp" #include <iostream> #include <map> #include <string> #include <vector> #include <future> #include <chrono> #include "json.hpp" typedef websocketpp::client<websocketpp::config::asio_client> client; using websocketpp::lib::placeholders::_1; using websocketpp::lib::placeholders::_2; using websocketpp::lib::bind; using json = nlohmann::json; typedef websocketpp::config::asio_client::message_type::ptr message_ptr; json move_to_json(Move m){ int type; mType t = m.type; if(t == mType::silent) type = 0; else if(t == mType::capture) type = 1; else if(t == mType::promotion) type = 2; else{ std::cout << "type " << t << " not recognized\n"; exit(EXIT_FAILURE); } return json {{"_captureSquare" , m.captureSquare}, {"_fromSquare", m.fromSquare}, {"_toSquare", m.toSquare}, {"_type", type} }; } Move json_to_move(json j){ mType type; int t = j["_type"].get<int>(); if(t == 0) type = mType::silent; else if(t == 1) type = mType::capture; else if(t == 2) type = mType::promotion; else{ std::cout << "type " << t << " not recognized\n"; exit(EXIT_FAILURE); } return Move(type, std::stoull(j["_fromSquare"].get<std::string>()), std::stoull(j["_captureSquare"].get<std::string>()), std::stoull(j["_toSquare"].get<std::string>())); } std::string userID; class Game{ private: std::string id_; int playerSide_; unsigned lvl_; public: Node* node_; ~Game(){ delete node_; } Game(const std::string & id, int s, unsigned lvl): id_(id), playerSide_(s), lvl_(lvl), node_(new Node()){} int get_pSide(){ return playerSide_; } std::vector<Move> playMove(Move m){ if(node_->get_side() != playerSide_){//TODO: premove? currently used to play first move for AI std::cout << "playing first move in game " << id_ << '\n'; return std::vector<Move> { Node::pick_n_play(node_, lvl_) }; } else{ Node::playMove(node_, m); std::cout << "played opponents move in game " << id_ << '\n'; if(node_->get_side() == playerSide_){ std::cout << "still opponents turn in game " << id_ << '\n'; return std::vector<Move> {}; } else{ std::vector<Move> moves; while((node_->get_side() != playerSide_) && (!node_->over())){ moves.push_back(Node::pick_n_play(node_, lvl_)); } std::cout << "played " << moves.size() << " move(s) in game " << id_ << '\n'; if(node_->over()){ std::cout << "game " << id_ << " ended\n"; } return moves; } } } void show(){ node_->show(); } }; class Server{ public: std::map<std::string, Game*> games_; Model* m; ~Server(){ for(auto [_, g]: games_) delete g; } Server(){ m = new Model(); m->load(); Node::install_net(m->get_net()); } std::vector<Move> addGame(const std::string & id, int s, unsigned lvl){ std::cout << "game " << id << " added\n"; games_[id] = new Game(id, s, lvl); if(s == 1){ /* Move token; */ return games_[id]->playMove(Move()); } else{ return std::vector<Move> {}; } } }; Server server; void on_message(client* c, websocketpp::connection_hdl hdl, message_ptr message) { json msg = json::parse(message->get_payload()); std::string msg0 = msg[0].get<std::string>(); websocketpp::lib::error_code ec; if(msg0 == "handshake"){ // ['handshake', userID], userID = msg[1].get<std::string>(); json ret = {"signin", userID, "ai", "e2e5a999af141629ba7fdd8d6dd50d59475d20ebbd763c70c39eecc648f4d1e1"}; c->send(hdl, ret.dump(), message->get_opcode(), ec); } else if(msg0 == "signed"){ // ['signed', status, name, elo], if(msg[1].get<std::string>() != "success"){ std::cout << "couldn't sign in" << '\n'; exit(EXIT_FAILURE); } } else if(msg0 == "game"){ // ['game', gameID, side, level, start_time], std::string gameID = msg[1].get<std::string>(); int side = msg[2].get<int>(); unsigned level = msg[3].get<unsigned>(); unsigned millis = msg[4].get<unsigned>(); auto t0 = std::chrono::high_resolution_clock::now(); auto fut = std::async(std::launch::async, [gameID, side, level]{return server.addGame(gameID, side, level);}); std::vector<Move> moves = fut.get(); auto t1 = std::chrono::high_resolution_clock::now(); auto t = millis - std::chrono::duration_cast<std::chrono::milliseconds>(t1-t0).count(); if(moves.size() == 1){ json ret = {"move", gameID, userID, move_to_json(moves[0]), t}; c->send(hdl, ret.dump(), message->get_opcode(), ec); } } else if(msg0 == "move"){ // ['move', gameID, move, time] std::string gameID = msg[1].get<std::string>(); Move move = json_to_move(msg[2]); unsigned millis = msg[3].get<unsigned>(); auto t0 = std::chrono::high_resolution_clock::now(); auto fut = std::async(std::launch::async, [move, gameID]{return server.games_[gameID]->playMove(move);}); std::vector<Move> moves = fut.get(); auto t1 = std::chrono::high_resolution_clock::now(); auto t = millis - std::chrono::duration_cast<std::chrono::milliseconds>(t1-t0).count(); for(auto m: moves){ json ret = {"move", gameID, userID, move_to_json(m), t}; c->send(hdl, ret.dump(), message->get_opcode(), ec); } } else if(msg0 == "end"){ // ['end', gameID, score, rating_shift] std::string gameID = msg[1].get<std::string>(); std::cout << "game " << gameID << " ended\n"; std::pair<torch::Tensor, torch::Tensor> p = Node::get_training_set(server.games_[gameID]->node_); torch::Tensor xs = p.first; torch::Tensor ys = p.second; server.games_.erase(gameID); std::cout << "loss: " << server.m->train(xs, ys) << '\n'; server.m->save(); } else{ std::cout << "unrecognized message:\n"; std::cout << msg.dump(2) << '\n'; } if(ec){ std::cout << "Error sending message: " << ec.message() << '\n'; } } int main(int argc, char *argv[]) { client c; std::string uri = "ws://localhost:8081"; try { c.clear_access_channels(websocketpp::log::alevel::all); c.init_asio(); c.set_message_handler(bind(&on_message,&c,::_1,::_2)); websocketpp::lib::error_code ec; client::connection_ptr con = c.get_connection(uri, ec); if (ec) { std::cout << "could not create connection because: " << ec.message() << std::endl; return 0; } c.connect(con); c.run(); } catch (websocketpp::exception const & e) { std::cout << e.what() << std::endl; } return 0; }
31.308017
122
0.543127
[ "vector", "model" ]
fe325e98f4f7bbc5a9926410ae422778ce6c9379
500
hpp
C++
include/algodts/algos/product_except_self.hpp
paulpan05/algodts-cpp
db02a8d18668afb004bc63a1814fcc6fe32729ef
[ "Apache-2.0" ]
null
null
null
include/algodts/algos/product_except_self.hpp
paulpan05/algodts-cpp
db02a8d18668afb004bc63a1814fcc6fe32729ef
[ "Apache-2.0" ]
null
null
null
include/algodts/algos/product_except_self.hpp
paulpan05/algodts-cpp
db02a8d18668afb004bc63a1814fcc6fe32729ef
[ "Apache-2.0" ]
null
null
null
#ifndef PRODUCTEXCEPTSELF_HPP_ #define PRODUCTEXCEPTSELF_HPP_ #include <vector> std::vector<int> productExceptSelf(std::vector<int>& nums) { std::vector<int> tmp(nums); if (nums.empty()) { return nums; } for (int i = 1; i < nums.size(); ++i) { nums[i] *= nums[i - 1]; } nums[nums.size() - 1] = nums[nums.size() - 2]; for (int i = nums.size() - 2; i > 0; --i) { tmp[i] *= tmp[i + 1]; nums[i] = tmp[i + 1] * nums[i - 1]; } nums[0] = tmp[1]; return nums; } #endif
20.833333
60
0.554
[ "vector" ]
fe40d49b13c14f69402c458674de53cc54343121
5,880
cpp
C++
src/Util.cpp
nagy/GQ
a00f4ed73064797c627887d5be7b8bee41d7223f
[ "MIT" ]
null
null
null
src/Util.cpp
nagy/GQ
a00f4ed73064797c627887d5be7b8bee41d7223f
[ "MIT" ]
null
null
null
src/Util.cpp
nagy/GQ
a00f4ed73064797c627887d5be7b8bee41d7223f
[ "MIT" ]
null
null
null
/* * This is a heavily modified fork of gumbo-query by Hoping White aka LazyTiger. * The original software can be found at: https://github.com/lazytiger/gumbo-query * * gumbo-query is based on cascadia, written by Andy Balholm. * * Copyright (c) 2011 Andy Balholm. All rights reserved. * Copyright (c) 2015 Hoping White aka LazyTiger (hoping@baimashi.com) * Copyright (c) 2015 Jesse Nicholson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "Util.hpp" #include "Node.hpp" #include <locale> namespace gq { Util::Util() { } Util::~Util() { } std::string Util::NodeText(const Node* node) { std::string text; WriteNodeText(node->m_node, text); return text; } std::string Util::NodeOwnText(const Node* node) { std::string text; if (node->m_node == nullptr || node->m_node->type != GUMBO_NODE_ELEMENT) { return text; } const GumboVector* children = &node->m_node->v.element.children; for (unsigned int i = 0; i < children->length; i++) { GumboNode* child = static_cast<GumboNode*>(children->data[i]); if (child->type == GUMBO_NODE_TEXT) { text.append(child->v.text.text); } } return text; } bool Util::NodeExists(const std::vector< const Node* >& nodeCollection, const GumboNode* search) { if (search == nullptr) { return false; } return std::find_if(nodeCollection.begin(), nodeCollection.end(), [search](const Node* item) { return item->m_node == search; }) != nodeCollection.end(); } void Util::RemoveDuplicates(std::vector< const Node* >& primaryCollection) { std::sort(primaryCollection.begin(), primaryCollection.end(), [](const Node* lhs, const Node* rhs) { return lhs->m_node < rhs->m_node; } ); auto last = std::unique(primaryCollection.begin(), primaryCollection.end(), [](const Node* lhs, const Node* rhs) { return lhs->m_node == rhs->m_node; } ); primaryCollection.erase(last, primaryCollection.end()); } void Util::UnionNodes(std::vector< const Node* >& primaryCollection, const std::vector< const Node* >& collection) { primaryCollection.reserve(primaryCollection.size() + collection.size()); primaryCollection.insert(primaryCollection.end(), collection.begin(), collection.end()); RemoveDuplicates(primaryCollection); } std::string_view Util::TrimEnclosingQuotes(std::string_view str) { if (str.length() >= 2) { switch (str[0]) { case '\'': case '"': { if (str[str.length() - 1] == str[0]) { size_t end = str.length() - 2; if (end == 0) { // Just so that it's not nullptr internall return std::string_view(str.data(), 0); } str = str.substr(1, end); } } break; default: break; } } return str; } std::string_view Util::Trim(std::string_view str) { #ifdef _MSC_VER std::locale loc(""); #endif size_t si = 0; for (size_t si = 0; si < str.size(); ++si) { #ifdef _MSC_VER if (std::isspace(str[0], loc)) #else if (std::isspace(str[0])) #endif { continue; } else { break; } } if (si < str.size()) { str = str.substr(si); } if (str.size() > 0) { size_t ei = str.size() - 1; for (ei = str.size() - 1; ei > 0; --ei) { #ifdef _MSC_VER if (std::isspace(str[0], loc)) #else if (std::isspace(str[0])) #endif { continue; } else { break; } } if (ei >= 0) { // +1 because we've got a zero based index passed as length, which isn't. str = str.substr(0, ei+1); } } return str; } std::string Util::GetNodeTagName(const GumboNode* node) { std::string tagName; if (node == nullptr) { return tagName; } switch (node->type) { case GUMBO_NODE_DOCUMENT: { tagName = u8"document"; } break; default: { tagName = std::string(gumbo_normalized_tagname(node->v.element.tag)); } break; } // Handle unknown tag right here. if (tagName.empty()) { const GumboStringPiece* piece = &node->v.element.original_tag; if (piece != nullptr) { GumboStringPiece gsp = *piece; gumbo_tag_from_original_text(&gsp); tagName = std::string(gsp.data, gsp.length); } } return tagName; } void Util::WriteNodeText(const GumboNode* node, std::string& stringContainer) { if (node == nullptr) { return; } switch (node->type) { case GUMBO_NODE_TEXT: { stringContainer.append(node->v.text.text); break; } break; case GUMBO_NODE_ELEMENT: { const GumboVector* children = &node->v.element.children; for (unsigned int i = 0; i < children->length; i++) { GumboNode* child = static_cast<GumboNode*>(children->data[i]); WriteNodeText(child, stringContainer); } } break; default: break; } } } /* namespace gq */
20.925267
115
0.638946
[ "vector" ]
fe42da50f0e74ebe5e7ef87e00599ce87548e10b
27,816
hpp
C++
include/mersenne.hpp
libtcod/treeburner
ace0eab18d55db77475f509f1bcd8b647cc46c3b
[ "MIT" ]
null
null
null
include/mersenne.hpp
libtcod/treeburner
ace0eab18d55db77475f509f1bcd8b647cc46c3b
[ "MIT" ]
null
null
null
include/mersenne.hpp
libtcod/treeburner
ace0eab18d55db77475f509f1bcd8b647cc46c3b
[ "MIT" ]
null
null
null
/* * libtcod 1.5.1 * Copyright (c) 2008,2009,2010 Jice & Mingos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * The name of Jice or Mingos may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _TCOD_RANDOM_HPP #define _TCOD_RANDOM_HPP #include "mersenne_types.h" /** @PageName random @PageCategory Base toolkits @PageTitle Pseudorandom number generator @PageDesc This toolkit is an implementation of two fast and high quality pseudorandom number generators: * a Mersenne twister generator, * a Complementary-Multiply-With-Carry generator. CMWC is faster than MT (see table below) and has a much better period (1039460 vs. 106001). It is the default algo since libtcod 1.5.0. Relative performances in two independent tests (lower is better) : <table class="param"> <tr> <th>Algorithm</th> <th>Numbers generated</th> <th>Perf (1)</th> <th>Perf (2)</th> </tr> <tr class="hilite"> <td>MT</td> <td>integer</td> <td>62</td> <td>50</td> </tr> <tr> <td>MT</td> <td>float</td> <td>54</td> <td>45</td> </tr> <tr class="hilite"> <td>CMWC</td> <td>integer</td> <td>21</td> <td>34</td> </tr> <tr> <td>CMWC</td> <td>float</td> <td>32</td> <td>27</td> </tr> </table> <h6>For python users:</h6> Python already has great builtin random generators. But some parts of the Doryen library (noise, heightmap, ...) uses RNG as parameters. If you intend to use those functions, you must provide a RNG created with the library. <h6>For C# users:</h6> .NET already has great builtin random generators. But some parts of the Doryen library (noise, heightmap, ...) uses RNG as parameters. If you intend to use those functions, you must provide a RNG created with the library. */ class TCODLIB_API TCODRandom { public : /** @PageName random_init @PageFather random @PageTitle Creating a generator @FuncTitle Default generator @FuncDesc The simplest way to get random number is to use the default generator. The first time you get this generator, it is initialized by calling TCOD_random_new. Then, on successive calls, this function returns the same generator (singleton pattern). @Cpp static TCODRandom * TCODRandom::getInstance (void) @C TCOD_random_t TCOD_random_get_instance (void) @Py random_get_instance () @C# static TCODRandom TCODRandom::getInstance() @Param algo The PRNG algorithm the generator should be using. Possible values are: * TCOD_RNG_MT for Mersenne Twister, * TCOD_RNG_CMWC for Complementary Multiply-With-Carry. */ static TCODRandom * getInstance(void); /** @PageName random_init @FuncTitle Generators with random seeds @FuncDesc You can also create as many generators as you want with a random seed (the number of seconds since Jan 1 1970 at the time the constructor is called). Warning ! If you call this function several times in the same second, it will return the same generator. @Cpp TCODRandom::TCODRandom (TCOD_random_algo_t algo = TCOD_RNG_CMWC) @C TCOD_random_t TCOD_random_new (TCOD_random_algo_t algo) @Py random_new (algo = RNG_CMWC) @C# TCODRandom::TCODRandom() // Defaults to ComplementaryMultiplyWithCarry TCODRandom::TCODRandom(TCODRandomType algo) @Param algo The PRNG algorithm the generator should be using. */ TCODRandom(TCOD_random_algo_t algo = TCOD_RNG_CMWC, bool allocate = true); /** @PageName random_init @FuncTitle Generators with user defined seeds @FuncDesc Finally, you can create generators with a specific seed. Those allow you to get a reproducible set of random numbers. You can for example save a dungeon in a file by saving only the seed used for its generation (provided you have a determinist generation algorithm) @Cpp TCODRandom::TCODRandom (uint32 seed, TCOD_random_algo_t algo = TCOD_RNG_CMWC); @C TCOD_random_t TCOD_random_new_from_seed (TCOD_random_algo_t algo, uint32 seed); @Py random_new_from_seed(seed, algo=RNG_CMWC) @C# TCODRandom::TCODRandom(uint32 seed) // Defaults to ComplementaryMultiplyWithCarry TCODRandom::TCODRandom(uint32 seed, TCODRandomType algo) @Param seed The 32 bits seed used to initialize the generator. Two generators created with the same seed will generate the same set of pseudorandom numbers. @Param algo The PRNG algorithm the generator should be using. @CppEx // default generator TCODRandom * default = TCODRandom::getInstance(); // another random generator TCODRandom * myRandom = new TCODRandom(); // a random generator with a specific seed TCODRandom * myDeterministRandom = new TCODRandom(0xdeadbeef); @CEx // default generator TCOD_random_t default = TCOD_random_get_instance(); // another random generator TCOD_random_t my_random = TCOD_random_new(TCOD_RNG_CMWC); // a random generator with a specific seed TCOD_random_t my_determinist_random = TCOD_random_new_from_seed(TCOD_RNG_CMWC,0xdeadbeef); @PyEx # default generator default = libtcod.random_get_instance() # another random generator my_random = libtcod.random_new() # a random generator with a specific seed my_determinist_random = libtcod.random_new_from_seed(0xdeadbeef) */ TCODRandom(uint32 seed, TCOD_random_algo_t algo = TCOD_RNG_CMWC); /** @PageName random_init @FuncTitle Destroying a RNG @FuncDesc To release ressources used by a generator, use those functions : NB : do not delete the default random generator ! @Cpp TCODRandom::~TCODRandom() @C void TCOD_random_delete(TCOD_random_t mersenne) @Py random_delete(mersenne) @C# void TCODRandom::Dispose() @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. @CppEx // create a generator TCODRandom *rnd = new TCODRandom(); // use it ... // destroy it delete rnd; @CEx // create a generator TCOD_random_t rnd = TCOD_random_new(); // use it ... // destroy it TCOD_random_delete(rnd); @PyEx # create a generator rnd = libtcod.random_new() # use it ... # destroy it libtcod.random_delete(rnd) */ virtual ~TCODRandom(); /** @PageName random_use @PageFather random @PageTitle Using a generator @FuncTitle Getting an integer @FuncDesc Once you obtained a generator (using one of those methods), you can get random numbers using following functions, using either the explicit or simplified API where applicable: @Cpp //explicit API: int TCODRandom::getInt(int min, int max) //simplified API: int TCODRandom::get(int min, int max) @C int TCOD_random_get_int(TCOD_random_t mersenne, int min, int max) @Py random_get_int(mersenne, mi, ma) @C# int TCODRandom::getInt(int min, int max) @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. If NULL, the default generator is used.. @Param min,max Range of values returned. Each time you call this function, you get a number between (including) min and max */ inline int getInt(int min, int max) { return TCOD_random_get_int(data,min,max); } inline int get(int min, int max) { return TCOD_random_get_int(data,min,max); } /** @PageName random_use @FuncTitle Getting a float @FuncDesc To get a random floating point number, using either the explicit or simplified API where applicable @Cpp //explicit API: float TCODRandom::getFloat(float min, float max) //simplified API: float TCODRandom::get(float min, float max) @C float TCOD_random_get_float(TCOD_random_t mersenne, float min, float max) @Py random_get_float(mersenne, mi, ma) @C# float TCODRandom::getFloat(float min, float max) @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. If NULL, the default generator is used. @Param min,max Range of values returned. Each time you call this function, you get a number between (including) min and max @CppEx // default generator TCODRandom * default = TCODRandom::getInstance(); int aRandomIntBetween0And1000 = default->getInt(0,1000); int anotherRandomInt = default->get(0,1000); // another random generator TCODRandom *myRandom = new TCODRandom(); float aRandomFloatBetween0And1000 = myRandom->getFloat(0.0f,1000.0f); float anotherRandomFloat = myRandom->get(0.0f,1000.0f); @CEx // default generator int a_random_int_between_0_and_1000 = TCOD_random_get_float(NULL,0,1000); // another random generator TCOD_random_t my_random = TCOD_random_new(); float a_random_float_between_0_and_1000 = TCOD_random_get_float(my_random,0.0f,1000.0f); @PyEx # default generator a_random_int_between_0_and_1000 = libtcod.random_get_float(0,0,1000) # another random generator my_random = libtcod.random_new() a_random_float_between_0_and_1000 = libtcod.random_get_float(my_random,0.0,1000.0) */ inline float getFloat(float min, float max) { return TCOD_random_get_float(data,min,max); } inline float get(float min, float max) { return TCOD_random_get_float(data,min,max); } /** @PageName random_use @FuncTitle Getting numbers with a Gaussian distribution @FuncDesc To get a random number, either integer or floating point, with a Gaussian (normal) distribution: Due to the Gaussian distribution, most values are near (min+max)/2 The algorithm used is Box-Muller transform, Marsaglia polar method. You can use the algorithm in three ways: 1. Specify the mean and standard deviation. The mean will be the central (most probable) value. 99.7% of all the obtained values will be within a 3 standard deviations radius from the mean. In other words, for instance, if the mean is 15 and standard deviance is 5, the effective range of the obtained numbers will be 0-30, with 0.3% of the results beyond this scope. 2. Specify minimum and maximum values. The mean will be right in the middle between minimum and maximum values. Standard deviance will be calculated automatically to fit the specified range of numbers. 3. Specify minimum and maximum values, as well as the mean, which may be any number, even outside the minimum-maximum range. Standard deviance will be calculated to fit the specified range of numbers. You can use either the explicit or the simplified API where applicable. @Cpp //explicit API: double getGaussianDouble (double mean, double stdDeviation) float getGaussianFloat (float mean, float stdDeviation) int getGaussianInt (int mean, int stdDeviation) double getGaussianRangeDouble (double min, double max) float getGaussianRangeFloat (float min, float max) int getGaussianRangeInt (int min, int max) double getGaussianRangeDoubleCustom (double min, double max, double mean) float getGaussianRangeFloatCustom (float min, float max, float mean) int getGaussianRangeIntCustom (int min, int max, int mean) //simplified API: double getGaussian (double mean, double stdDeviation) float getGaussian (float mean, float stdDeviation) int getGaussian (int mean, int stdDeviation) double getGaussianRange (double min, double max) float getGaussianRange (float min, float max) int getGaussianRange (int min, int max) double getGaussianRange (double min, double max, double mean) float getGaussianRange (float min, float max, float mean) int getGaussianRange (int min, int max, int mean) @C double TCOD_random_get_gaussian_double (TCOD_random_t mersenne, double mean, double std_deviation) float TCOD_random_get_gaussian_float (TCOD_random_t mersenne, float mean, float std_deviation) int TCOD_random_get_gaussian_int (TCOD_random_t mersenne, int mean, int std_deviation) double TCOD_random_get_gaussian_double_range (TCOD_random_t mersenne, double min, double max) float TCOD_random_get_gaussian_float_range (TCOD_random_t mersenne, float min, float max) int TCOD_random_get_gaussian_int_range (TCOD_random_t mersenne, int min, int max) double TCOD_random_get_gaussian_double_range_custom (TCOD_random_t mersenne, double min, double max, double mean) float TCOD_random_get_gaussian_float_range_custom (TCOD_random_t mersenne, float min, float max, float mean) int TCOD_random_get_gaussian_int_range_custom (TCOD_random_t mersenne, int min, int max, int mean) @Py random_get_gaussian_double(mersenne, mean, std_deviation) random_get_gaussian_float(mersenne, mean, std_deviation) random_get_gaussian_int(mersenne, mean, std_deviation) random_get_gaussian_double_range(mersenne, mi, ma, mean=None) random_get_gaussian_float_range(mersenne, mi, ma, mean=None) random_get_gaussian_int_range(mersenne, mi, ma, mean=None) @C# double TCODRandom::getGaussianDouble(double mean, double stdDeviation) float TCODRandom::getGaussianFloat(float mean, float stdDeviation) int TCODRandom::getGaussianInt(int mean, int stdDeviation) double TCODRandom::getGaussianRangeDouble(double min, double max) float TCODRandom::getGaussianRangeFloat(float min, float max) int TCODRandom::getGaussianRangeInt int min, int max) double TCODRandom::getGaussianRangeDouble(double min, double max, double mean) float TCODRandom::getGaussianRangeFloat(float min, float max, float mean) int TCODRandom::getGaussianRangeInt(int min, int max, int mean) @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. If NULL, the default generator is used. @Param min,max Range of values returned. Each time you call one of these functions, you get a number between (including) min and max. @Param mean The mean, or the value that should be randomly selected with the highest frequency (the peak of the bell curve). @Param stdDeviation The standard deviation from the mean. The random values will fall within 1 standard deviation from the mean 68% of times, within 2 standard deviations from the mean, 95% of times, within 3 standard deviation from the mean, 99.7% of times (according to the three-sigma rule). */ inline double getGaussianDouble (double mean, double stdDeviation) { return TCOD_random_get_gaussian_double(data,mean,stdDeviation); } inline float getGaussianFloat (float mean, float stdDeviation) { return TCOD_random_get_gaussian_float(data,mean,stdDeviation); } inline int getGaussianInt (int mean, int stdDeviation) { return TCOD_random_get_gaussian_int(data,mean,stdDeviation); } inline double getGaussianRangeDouble (double min, double max) { return TCOD_random_get_gaussian_double_range(data,min,max); } inline float getGaussianRangeFloat (float min, float max) { return TCOD_random_get_gaussian_float_range(data,min,max); } inline int getGaussianRangeInt (int min, int max) { return TCOD_random_get_gaussian_int_range(data,min,max); } inline double getGaussianRangeDoubleCustom (double min, double max, double mean) { return TCOD_random_get_gaussian_double_range_custom(data,min,max,mean); } inline float getGaussianRangeFloatCustom (float min, float max, float mean) { return TCOD_random_get_gaussian_float_range_custom(data,min,max,mean); } inline int getGaussianRangeIntCustom (int min, int max, int mean) { return TCOD_random_get_gaussian_int_range_custom(data,min,max,mean); } // simplified API: inline double getGaussian (double mean, double stdDeviation) { return TCOD_random_get_gaussian_double(data,mean,stdDeviation); } inline float getGaussian (float mean, float stdDeviation) { return TCOD_random_get_gaussian_float(data,mean,stdDeviation); } inline int getGaussian (int mean, int stdDeviation) { return TCOD_random_get_gaussian_int(data,mean,stdDeviation); } inline double getGaussianRange (double min, double max) { return TCOD_random_get_gaussian_double_range(data,min,max); } inline float getGaussianRange (float min, float max) { return TCOD_random_get_gaussian_float_range(data,min,max); } inline int getGaussianRange (int min, int max) { return TCOD_random_get_gaussian_int_range(data,min,max); } inline double getGaussianRange (double min, double max, double mean) { return TCOD_random_get_gaussian_double_range_custom(data,min,max,mean); } inline float getGaussianRange (float min, float max, float mean) { return TCOD_random_get_gaussian_float_range_custom(data,min,max,mean); } inline int getGaussianRange (int min, int max, int mean) { return TCOD_random_get_gaussian_int_range_custom(data,min,max,mean); } /** @PageName random_use @FuncTitle Getting numbers with an inverse Gaussian distribution @FuncDesc The inverse Gaussian distribution works prettu much the same way Gaussian distribution does, only that values near the chosen mean have the least chance of being selected, while the extreme values are the most probable. This is an approximation, since it uses +/- 3 standard deviations from the mean as the extreme values, which means that the algorithm will be slightly inaccurate 0.3% of times. You can use either the explicit or the simplified API where applicable. @Cpp //Explicit API: double getGaussianDoubleInv (double mean, double stdDeviation) float getGaussianFloatInv (float mean, float stdDeviation) int getGaussianIntInv (int mean, int stdDeviation) double getGaussianRangeDoubleInv (double min, double max) float getGaussianRangeFloatInv (float min, float max) int getGaussianRangeIntInv (int min, int max) double getGaussianRangeDoubleCustomInv (double min, double max, double mean) float getGaussianRangeFloatCustomInv (float min, float max, float mean) int getGaussianRangeIntCustomInv (int min, int max, int mean) //simplified API: double getGaussianInv (double mean, double stdDeviation) float getGaussianInv (float mean, float stdDeviation) int getGaussianInv (int mean, int stdDeviation) double getGaussianRangeInv (double min, double max) float getGaussianRangeInv (float min, float max) int getGaussianRangeInv (int min, int max) double getGaussianRangeInv (double min, double max, double mean) float getGaussianRangeInv (float min, float max, float mean) int getGaussianRangeInv (int min, int max, int mean) @C double TCOD_random_get_gaussian_double_inv (TCOD_random_t mersenne, double mean, double std_deviation); float TCOD_random_get_gaussian_float_inv (TCOD_random_t mersenne, float mean, float std_deviation); int TCOD_random_get_gaussian_int_inv (TCOD_random_t mersenne, int mean, int std_deviation); double TCOD_random_get_gaussian_double_range_inv (TCOD_random_t mersenne, double min, double max); float TCOD_random_get_gaussian_float_range_inv (TCOD_random_t mersenne, float min, float max); int TCOD_random_get_gaussian_int_range_inv (TCOD_random_t mersenne, int min, int max); double TCOD_random_get_gaussian_double_range_custom_inv (TCOD_random_t mersenne, double min, double max, double mean); float TCOD_random_get_gaussian_float_range_custom_inv (TCOD_random_t mersenne, float min, float max, float mean); int TCOD_random_get_gaussian_int_range_custom_inv (TCOD_random_t mersenne, int min, int max, int mean); @Py random_get_gaussian_double_inv(mersenne, mean, std_deviation) random_get_gaussian_float_inv(mersenne, mean, std_deviation) random_get_gaussian_int_inv(mersenne, mean, std_deviation) random_get_gaussian_double_range_inv(mersenne, mi, ma, mean=None) random_get_gaussian_float_range_inv(mersenne, mi, ma, mean=None) random_get_gaussian_int_range_inv(mersenne, mi, ma, mean=None) @C# double TCODRandom::getGaussianDoubleInv(double mean, double stdDeviation) float TCODRandom::getGaussianFloatInv(float mean, float stdDeviation) int TCODRandom::getGaussianIntInv(int mean, int stdDeviation) double TCODRandom::getGaussianRangeDoubleInv(double min, double max) float TCODRandom::getGaussianRangeFloatInv(float min, float max) int TCODRandom::getGaussianRangeIntInv(int min, int max) double TCODRandom::getGaussianRangeDoubleCustomInv(double min, double max, double mean) float TCODRandom::getGaussianRangeFloatCustomInv(float min, float max, float mean) int TCODRandom::getGaussianRangeIntCustomInv(int min, int max, int mean) @Param mersenne In the C version, the generator handler, returned by the initialization functions. If NULL, the default generator is used. @Param min, max Range of values returned. Each time you call this function, you get a number between (including) min and max. In the inverted version of the Gaussian distribution toolkit, these are the extreme values, with the most probability of appearing. @Param mean The mean, or the value that should be randomly selected with the highest frequency (the peak of the bell curve). In the inverted version of the Gaussian distribution toolkit, this is the value that has the LEAST probability of being selected (again, this is slightly inaccurate in 0.3% of cases). @Param stdDeviation The standard deviation from the mean. In the inverted version of the Gaussian distribution toolkit, this is actually the standard deviation from the extreme values, not from the mean. */ inline double getGaussianDoubleInv (double mean, double stdDeviation) { return TCOD_random_get_gaussian_double_inv(data,mean,stdDeviation); } inline float getGaussianFloatInv (float mean, float stdDeviation) { return TCOD_random_get_gaussian_float_inv(data,mean,stdDeviation); } inline int getGaussianIntInv (int mean, int stdDeviation) { return TCOD_random_get_gaussian_int_inv(data,mean,stdDeviation); } inline double getGaussianRangeDoubleInv (double min, double max) { return TCOD_random_get_gaussian_double_range_inv(data,min,max); } inline float getGaussianRangeFloatInv (float min, float max) { return TCOD_random_get_gaussian_float_range_inv(data,min,max); } inline int getGaussianRangeIntInv (int min, int max) { return TCOD_random_get_gaussian_int_range_inv(data,min,max); } inline double getGaussianRangeDoubleCustomInv (double min, double max, double mean) { return TCOD_random_get_gaussian_double_range_custom_inv(data,min,max,mean); } inline float getGaussianRangeFloatCustomInv (float min, float max, float mean) { return TCOD_random_get_gaussian_float_range_custom_inv(data,min,max,mean); } inline int getGaussianRangeIntCustomInv (int min, int max, int mean) { return TCOD_random_get_gaussian_int_range_custom_inv(data,min,max,mean); } //simplified API: inline double getGaussianInv (double mean, double stdDeviation) { return TCOD_random_get_gaussian_double_inv(data,mean,stdDeviation); } inline float getGaussianInv (float mean, float stdDeviation) { return TCOD_random_get_gaussian_float_inv(data,mean,stdDeviation); } inline int getGaussianInv (int mean, int stdDeviation) { return TCOD_random_get_gaussian_int_inv(data,mean,stdDeviation); } inline double getGaussianRangeInv (double min, double max) { return TCOD_random_get_gaussian_double_range_inv(data,min,max); } inline float getGaussianRangeInv (float min, float max) { return TCOD_random_get_gaussian_float_range_inv(data,min,max); } inline int getGaussianRangeInv (int min, int max) { return TCOD_random_get_gaussian_int_range_inv(data,min,max); } inline double getGaussianRangeInv (double min, double max, double mean) { return TCOD_random_get_gaussian_double_range_custom_inv(data,min,max,mean); } inline float getGaussianRangeInv (float min, float max, float mean) { return TCOD_random_get_gaussian_float_range_custom_inv(data,min,max,mean); } inline int getGaussianRangeInv (int min, int max, int mean) { return TCOD_random_get_gaussian_int_range_custom_inv(data,min,max,mean); } /** @PageName random_use @FuncTitle Saving a RNG state @FuncDesc You can save the state of a generator with : @Cpp TCODRandom *TCODRandom::save() const @C TCOD_random_t TCOD_random_save(TCOD_random_t mersenne) @Py random_save(mersenne) @C# TCODRandom TCODRandom::save() @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. If NULL, the default generator is used. */ TCODRandom * save() const; /** @PageName random_use @FuncTitle Restoring a saved state @FuncDesc And restore it later. This makes it possible to get the same serie of number several times with a single generator. @Cpp void TCODRandom::restore(const TCODRandom *backup) @C void TCOD_random_restore(TCOD_random_t mersenne, TCOD_random_t backup) @Py random_restore(mersenne, backup) @C# void TCODRandom::restore(TCODRandom backup) @Param mersenne In the C and Python versions, the generator handler, returned by the initialization functions. If NULL, the default generator is used. @CppEx // default generator TCODRandom * default = TCODRandom::getInstance(); // save the state TCODRandom *backup=default->save(); // get a random number (or several) int number1 = default->getInt(0,1000); // restore the state default->restore(backup); // get a random number int number2 = default->getInt(0,1000); // => number1 == number2 @CEx // save default generator state TCOD_random_t backup=TCOD_random_save(NULL); // get a random number int number1 = TCOD_random_get_float(NULL,0,1000); // restore the state TCOD_random_restore(NULL,backup); // get a random number int number2 = TCOD_random_get_float(NULL,0,1000); // number1 == number2 @PyEx # save default generator state backup=libtcod.random_save(0) # get a random number number1 = libtcod.random_get_float(0,0,1000) # restore the state libtcod.random_restore(0,backup) # get a random number number2 = libtcod.random_get_float(0,0,1000) # number1 == number2 */ void restore(const TCODRandom *backup); protected : friend class TCODLIB_API TCODNoise; friend class TCODLIB_API TCODHeightMap; friend class TCODLIB_API TCODNamegen; friend class TCODNameGenerator; // Used for SWIG interface, does NOT need TCODLIB_API TCOD_random_t data; }; #endif
54.01165
371
0.756291
[ "transform" ]
1cfa81471b879cc3b5098e9f5b4f2331a79862ac
2,515
cpp
C++
cpp/unittest/gis/cuda/functor_distance_tests.cpp
shengjh/arctern
6b52bacf29d84ec41d97f9dd67aa7e36da266287
[ "Apache-2.0" ]
1
2020-04-25T04:21:01.000Z
2020-04-25T04:21:01.000Z
cpp/unittest/gis/cuda/functor_distance_tests.cpp
shengjh/arctern
6b52bacf29d84ec41d97f9dd67aa7e36da266287
[ "Apache-2.0" ]
null
null
null
cpp/unittest/gis/cuda/functor_distance_tests.cpp
shengjh/arctern
6b52bacf29d84ec41d97f9dd67aa7e36da266287
[ "Apache-2.0" ]
null
null
null
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. #include <gtest/gtest.h> #include <cmath> #include "gis/cuda/common/gis_definitions.h" #include "gis/cuda/functor/st_distance.h" #include "gis/cuda/test_common/test_common.h" using std::vector; namespace arctern { namespace gis { namespace cuda { TEST(FunctorDistance, naive) { ASSERT_TRUE(true); // TODO use gdal to convert better good // POINT(3 1), copy from WKB WKT convertor // uint8_t data_left[] = {0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0xf0, 0x3f}; auto vec_left = hexstring_to_binary("01010000000000000000000840000000000000f03f"); vector<char> vec_right(1 + 4 + 16); // char data[1 + 4 + 16]; int num = 5; uint8_t byte_order = 0x1; memcpy(vec_right.data() + 0, &byte_order, sizeof(byte_order)); uint32_t point_tag = 1; memcpy(vec_right.data() + 1, &point_tag, sizeof(point_tag)); vector<vector<char>> lists_left; vector<vector<char>> lists_right; for (int i = 0; i < num; ++i) { double x = i; double y = i + 1; memcpy(vec_right.data() + 5, &x, sizeof(x)); memcpy(vec_right.data() + 5 + 8, &y, sizeof(y)); lists_left.push_back(vec_left); lists_right.push_back(vec_right); } vector<double> result(5); auto gvec_left = GeometryVectorFactory::CreateFromWkbs(lists_left); auto gvec_right = GeometryVectorFactory::CreateFromWkbs(lists_right); ST_Distance(gvec_left, gvec_right, result.data()); for (int i = 0; i < num; ++i) { auto std = sqrt(pow(i - 3, 2) + pow(i + 1 - 1, 2)); ASSERT_DOUBLE_EQ(result[i], std); } } } // namespace cuda } // namespace gis } // namespace arctern
33.533333
84
0.682704
[ "vector" ]
e80f1bb04e6abb752c27bcde1eb22a68fdc0ae0d
2,306
cpp
C++
CmdLine/synch/synch.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
67
2018-03-02T10:50:02.000Z
2022-03-23T18:20:29.000Z
CmdLine/synch/synch.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
null
null
null
CmdLine/synch/synch.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
9
2018-03-01T16:38:28.000Z
2021-03-02T16:17:09.000Z
//------------------------------------ // (c) Reliable Software, 2000 - 2008 //------------------------------------ #include "precompiled.h" #include "CmdArgs.h" #include "SccErrorOut.h" #include "SccProxyEx.h" #include "PathClassifier.h" #include "CmdLineVersionLabel.h" #include <Ex/WinEx.h> #include <Ex/Error.h> #include <iostream> int main (int count, char * args []) { int retCode = 0; try { StandardSwitch validSwitch; CmdArgs cmdArgs (count, args, validSwitch, true); // Expecting only paths not file names if (cmdArgs.IsHelp () || cmdArgs.IsEmpty ()) { std::cout << CMDLINE_VERSION_LABEL << ".\n\n"; std::cout << "Unpack and accept all incomming scripts in the Code Co-op project.\n\n"; std::cout << "synch <project root folders>\n"; } else { SccProxyEx sccProxy (&SccErrorOut); PathClassifier classifier (cmdArgs.Size (), cmdArgs.GetFilePaths ()); std::vector<std::string> const & unrecognizedPaths = classifier.GetUnrecognizedPaths (); if (!unrecognizedPaths.empty ()) { std::cerr << "synch: Cannot locate Code Co-op project(s):" << std::endl; for (std::vector<std::string>::const_iterator iter = unrecognizedPaths.begin (); iter != unrecognizedPaths.end (); ++iter) { std::string const & path = *iter; std::cerr << " " << path << std::endl; } } // Unpack scripts in the known projects std::vector<int> const & projectIds = classifier.GetProjectIds (); for (std::vector<int>::const_iterator iter = projectIds.begin (); iter != projectIds.end (); ++iter) { if (!sccProxy.CoopCmd (*iter, "All_Synch", false, true))// Skip GUI Co-op in the project { // Execute command without timeout std::cerr << "synch: Cannot synchronize the project with id: " << *iter << std::endl; retCode = 1; } } } } catch (Win::Exception e) { std::cerr << "synch: " << e.GetMessage () << std::endl; SysMsg msg (e.GetError ()); if (msg) std::cerr << "System tells us: " << msg.Text (); std::string objectName (e.GetObjectName ()); if (!objectName.empty ()) std::cerr << " " << objectName << std::endl; retCode = 1; } catch (...) { Win::ClearError (); std::cerr << "synch: Unknown problem" << std::endl; retCode = 1; } return retCode; }
28.825
92
0.601041
[ "vector" ]
e823172e18331c11f91a2bdc014ba84213aa4d5a
1,557
cpp
C++
objects/remove.cpp
Fundot/fundot
5dbafcbadb570331e0db7aa755161b518f2c5d44
[ "MIT" ]
7
2020-04-10T18:40:50.000Z
2020-04-18T06:49:49.000Z
objects/remove.cpp
fundot/fundot
5dbafcbadb570331e0db7aa755161b518f2c5d44
[ "MIT" ]
null
null
null
objects/remove.cpp
fundot/fundot
5dbafcbadb570331e0db7aa755161b518f2c5d44
[ "MIT" ]
4
2021-01-27T00:47:47.000Z
2021-12-28T04:23:05.000Z
#include "fundot/fundot.h" using namespace fundot; Object remove(const UnorderedSet& owner, const Object& value) { UnorderedSet ret = owner; auto iter = std::find(ret.value.begin(), ret.value.end(), value); if (iter == ret.value.end()) { return {Null()}; } ret.value.erase(iter); return {ret}; } Object remove(const Vector& owner, const Object& value) { Vector ret = owner; auto iter = std::find(ret.value.begin(), ret.value.end(), value); if (iter == ret.value.end()) { return {Null()}; } ret.value.erase(iter); return {ret}; } Object remove(const List& owner, const Object& value) { List ret = owner; auto iter = std::find(ret.value.begin(), ret.value.end(), value); if (iter == ret.value.end()) { return {Null()}; } ret.value.erase(iter); return {ret}; } Object remove(const Object& owner, const Object& value) { if (owner.value.type() == typeid(UnorderedSet)) { return remove(std::any_cast<const UnorderedSet&>(owner.value), value); } if (owner.value.type() == typeid(Vector)) { return remove(std::any_cast<const Vector&>(owner.value), value); } if (owner.value.type() == typeid(List)) { return remove(std::any_cast<const List&>(owner.value), value); } return {Null()}; } Object remove_(const List& list) { if (list.value.size() < 3) { return {Null()}; } auto iter = ++list.value.begin(); return remove(*iter, *++iter); } Object remove_obj = {PrimitiveFunction({remove_})};
25.112903
78
0.603725
[ "object", "vector" ]
e8272aeedf8e755b1bdc751385d059da445b5dd7
1,258
cpp
C++
boboleetcode/Play-Leetcode-master/0729-My Calendar-I/cpp-0729/main2.cpp
mcuallen/CodeLrn2019
adc727d92904c5c5d445a2621813dfa99474206d
[ "Apache-2.0" ]
2
2019-03-20T17:05:59.000Z
2019-10-15T07:56:45.000Z
boboleetcode/Play-Leetcode-master/0729-My Calendar-I/cpp-0729/main2.cpp
mcuallen/CodeLrn2019
adc727d92904c5c5d445a2621813dfa99474206d
[ "Apache-2.0" ]
6
2019-12-04T06:08:32.000Z
2021-05-10T20:22:47.000Z
boboleetcode/Play-Leetcode-master/0729-My Calendar-I/cpp-0729/main2.cpp
mcuallen/CodeLrn2019
adc727d92904c5c5d445a2621813dfa99474206d
[ "Apache-2.0" ]
null
null
null
/// Source : https://leetcode.com/problems/my-calendar-i/description/ /// Author : liuyubobobo /// Time : 2017-11-20 #include <iostream> #include <vector> using namespace std; /// Brute Force with easy overlapped check /// Time Complexity: book: O(n) /// total: O(n^2) /// Space Complexity: O(n) class MyCalendar { private: vector<pair<int, int>> calendar; public: MyCalendar() { calendar.clear(); } bool book(int start, int end) { pair<int, int> newp = make_pair(start, end); for(pair<int, int> p: calendar) if(overlapped(p, newp)) return false; calendar.push_back(newp); return true; } private: // Another easy way to check whether pa and pb overlapped // pa.start < pb.end && pa.end > pb.start bool overlapped(const pair<int, int>&pa, const pair<int, int>& pb){ return pa.first < pb.second && pa.second > pb.first; } }; void printBool(bool res){ cout << (res ? "True" : "False" ) << endl; } int main() { MyCalendar calendar; printBool(calendar.book(10, 20)); // returns true printBool(calendar.book(15, 25)); // returns false printBool(calendar.book(20, 30)); // returns true return 0; }
22.872727
71
0.599364
[ "vector" ]
e832de475509572bac786357a7a83334f343c2c6
2,375
cpp
C++
tests/juliet/testcases/CWE23_Relative_Path_Traversal/s03/CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad.cpp
RanerL/analyzer
a401da4680f163201326881802ee535d6cf97f5a
[ "MIT" ]
28
2017-01-20T15:25:54.000Z
2020-03-17T00:28:31.000Z
testcases/CWE23_Relative_Path_Traversal/s03/CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad.cpp
mellowCS/cwe_checker_juliet_suite
ae604f6fd94964251fbe88ef04d5287f6c1ffbe2
[ "MIT" ]
1
2017-01-20T15:26:27.000Z
2018-08-20T00:55:37.000Z
testcases/CWE23_Relative_Path_Traversal/s03/CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad.cpp
mellowCS/cwe_checker_juliet_suite
ae604f6fd94964251fbe88ef04d5287f6c1ffbe2
[ "MIT" ]
2
2019-07-15T19:07:04.000Z
2019-09-07T14:21:04.000Z
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-84_bad.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: console Read input from the console * GoodSource: Use a fixed file name * Sinks: fopen * BadSink : Open the file named in data using fopen() * Flow Variant: 84 Data flow: data passed to class constructor and destructor by declaring the class object on the heap and deleting it after use * * */ #ifndef OMITBAD #include "std_testcase.h" #include "CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84.h" #ifdef _WIN32 #define FOPEN _wfopen #else #define FOPEN fopen #endif namespace CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84 { CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad::CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad(wchar_t * dataCopy) { data = dataCopy; { /* Read input from the console */ size_t dataLen = wcslen(data); /* if there is room in data, read into it from the console */ if (FILENAME_MAX-dataLen > 1) { /* POTENTIAL FLAW: Read data from the console */ if (fgetws(data+dataLen, (int)(FILENAME_MAX-dataLen), stdin) != NULL) { /* The next few lines remove the carriage return from the string that is * inserted by fgetws() */ dataLen = wcslen(data); if (dataLen > 0 && data[dataLen-1] == L'\n') { data[dataLen-1] = L'\0'; } } else { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } } } } CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad::~CWE23_Relative_Path_Traversal__wchar_t_console_fopen_84_bad() { { FILE *pFile = NULL; /* POTENTIAL FLAW: Possibly opening a file without validating the file name or path */ pFile = FOPEN(data, L"wb+"); if (pFile != NULL) { fclose(pFile); } } } } #endif /* OMITBAD */
32.534247
147
0.616
[ "object" ]
e83662fb83e500d4cafdec209d61bdbb02f4470c
39,519
cc
C++
wrappers/8.1.1/vtkTextureWrap.cc
axkibe/node-vtk
900ad7b5500f672519da5aa24c99aa5a96466ef3
[ "BSD-3-Clause" ]
6
2016-02-03T12:48:36.000Z
2020-09-16T15:07:51.000Z
wrappers/8.1.1/vtkTextureWrap.cc
axkibe/node-vtk
900ad7b5500f672519da5aa24c99aa5a96466ef3
[ "BSD-3-Clause" ]
4
2016-02-13T01:30:43.000Z
2020-03-30T16:59:32.000Z
wrappers/8.1.1/vtkTextureWrap.cc
axkibe/node-vtk
900ad7b5500f672519da5aa24c99aa5a96466ef3
[ "BSD-3-Clause" ]
null
null
null
/* this file has been autogenerated by vtkNodeJsWrap */ /* editing this might proof futile */ #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include <nan.h> #include "vtkImageAlgorithmWrap.h" #include "vtkTextureWrap.h" #include "vtkObjectBaseWrap.h" #include "vtkRendererWrap.h" #include "vtkWindowWrap.h" #include "vtkImageDataWrap.h" #include "vtkScalarsToColorsWrap.h" #include "vtkUnsignedCharArrayWrap.h" #include "vtkTransformWrap.h" #include "../../plus/plus.h" using namespace v8; extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap; Nan::Persistent<v8::FunctionTemplate> VtkTextureWrap::ptpl; VtkTextureWrap::VtkTextureWrap() { } VtkTextureWrap::VtkTextureWrap(vtkSmartPointer<vtkTexture> _native) { native = _native; } VtkTextureWrap::~VtkTextureWrap() { } void VtkTextureWrap::Init(v8::Local<v8::Object> exports) { Nan::SetAccessor(exports, Nan::New("vtkTexture").ToLocalChecked(), ConstructorGetter); Nan::SetAccessor(exports, Nan::New("Texture").ToLocalChecked(), ConstructorGetter); } void VtkTextureWrap::ConstructorGetter( v8::Local<v8::String> property, const Nan::PropertyCallbackInfo<v8::Value>& info) { InitPtpl(); info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction()); } void VtkTextureWrap::InitPtpl() { if (!ptpl.IsEmpty()) return; v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New); VtkImageAlgorithmWrap::InitPtpl( ); tpl->Inherit(Nan::New<FunctionTemplate>(VtkImageAlgorithmWrap::ptpl)); tpl->SetClassName(Nan::New("VtkTextureWrap").ToLocalChecked()); tpl->InstanceTemplate()->SetInternalFieldCount(1); Nan::SetPrototypeMethod(tpl, "CubeMapOff", CubeMapOff); Nan::SetPrototypeMethod(tpl, "cubeMapOff", CubeMapOff); Nan::SetPrototypeMethod(tpl, "CubeMapOn", CubeMapOn); Nan::SetPrototypeMethod(tpl, "cubeMapOn", CubeMapOn); Nan::SetPrototypeMethod(tpl, "EdgeClampOff", EdgeClampOff); Nan::SetPrototypeMethod(tpl, "edgeClampOff", EdgeClampOff); Nan::SetPrototypeMethod(tpl, "EdgeClampOn", EdgeClampOn); Nan::SetPrototypeMethod(tpl, "edgeClampOn", EdgeClampOn); Nan::SetPrototypeMethod(tpl, "GetBlendingMode", GetBlendingMode); Nan::SetPrototypeMethod(tpl, "getBlendingMode", GetBlendingMode); Nan::SetPrototypeMethod(tpl, "GetColorMode", GetColorMode); Nan::SetPrototypeMethod(tpl, "getColorMode", GetColorMode); Nan::SetPrototypeMethod(tpl, "GetCubeMap", GetCubeMap); Nan::SetPrototypeMethod(tpl, "getCubeMap", GetCubeMap); Nan::SetPrototypeMethod(tpl, "GetEdgeClamp", GetEdgeClamp); Nan::SetPrototypeMethod(tpl, "getEdgeClamp", GetEdgeClamp); Nan::SetPrototypeMethod(tpl, "GetInput", GetInput); Nan::SetPrototypeMethod(tpl, "getInput", GetInput); Nan::SetPrototypeMethod(tpl, "GetInterpolate", GetInterpolate); Nan::SetPrototypeMethod(tpl, "getInterpolate", GetInterpolate); Nan::SetPrototypeMethod(tpl, "GetLookupTable", GetLookupTable); Nan::SetPrototypeMethod(tpl, "getLookupTable", GetLookupTable); Nan::SetPrototypeMethod(tpl, "GetMapColorScalarsThroughLookupTable", GetMapColorScalarsThroughLookupTable); Nan::SetPrototypeMethod(tpl, "getMapColorScalarsThroughLookupTable", GetMapColorScalarsThroughLookupTable); Nan::SetPrototypeMethod(tpl, "GetMappedScalars", GetMappedScalars); Nan::SetPrototypeMethod(tpl, "getMappedScalars", GetMappedScalars); Nan::SetPrototypeMethod(tpl, "GetMipmap", GetMipmap); Nan::SetPrototypeMethod(tpl, "getMipmap", GetMipmap); Nan::SetPrototypeMethod(tpl, "GetPremultipliedAlpha", GetPremultipliedAlpha); Nan::SetPrototypeMethod(tpl, "getPremultipliedAlpha", GetPremultipliedAlpha); Nan::SetPrototypeMethod(tpl, "GetQuality", GetQuality); Nan::SetPrototypeMethod(tpl, "getQuality", GetQuality); Nan::SetPrototypeMethod(tpl, "GetRepeat", GetRepeat); Nan::SetPrototypeMethod(tpl, "getRepeat", GetRepeat); Nan::SetPrototypeMethod(tpl, "GetRestrictPowerOf2ImageSmaller", GetRestrictPowerOf2ImageSmaller); Nan::SetPrototypeMethod(tpl, "getRestrictPowerOf2ImageSmaller", GetRestrictPowerOf2ImageSmaller); Nan::SetPrototypeMethod(tpl, "GetTextureUnit", GetTextureUnit); Nan::SetPrototypeMethod(tpl, "getTextureUnit", GetTextureUnit); Nan::SetPrototypeMethod(tpl, "GetTransform", GetTransform); Nan::SetPrototypeMethod(tpl, "getTransform", GetTransform); Nan::SetPrototypeMethod(tpl, "GetUseSRGBColorSpace", GetUseSRGBColorSpace); Nan::SetPrototypeMethod(tpl, "getUseSRGBColorSpace", GetUseSRGBColorSpace); Nan::SetPrototypeMethod(tpl, "InterpolateOff", InterpolateOff); Nan::SetPrototypeMethod(tpl, "interpolateOff", InterpolateOff); Nan::SetPrototypeMethod(tpl, "InterpolateOn", InterpolateOn); Nan::SetPrototypeMethod(tpl, "interpolateOn", InterpolateOn); Nan::SetPrototypeMethod(tpl, "IsTranslucent", IsTranslucent); Nan::SetPrototypeMethod(tpl, "isTranslucent", IsTranslucent); Nan::SetPrototypeMethod(tpl, "Load", Load); Nan::SetPrototypeMethod(tpl, "load", Load); Nan::SetPrototypeMethod(tpl, "MapColorScalarsThroughLookupTableOff", MapColorScalarsThroughLookupTableOff); Nan::SetPrototypeMethod(tpl, "mapColorScalarsThroughLookupTableOff", MapColorScalarsThroughLookupTableOff); Nan::SetPrototypeMethod(tpl, "MapColorScalarsThroughLookupTableOn", MapColorScalarsThroughLookupTableOn); Nan::SetPrototypeMethod(tpl, "mapColorScalarsThroughLookupTableOn", MapColorScalarsThroughLookupTableOn); Nan::SetPrototypeMethod(tpl, "MipmapOff", MipmapOff); Nan::SetPrototypeMethod(tpl, "mipmapOff", MipmapOff); Nan::SetPrototypeMethod(tpl, "MipmapOn", MipmapOn); Nan::SetPrototypeMethod(tpl, "mipmapOn", MipmapOn); Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance); Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance); Nan::SetPrototypeMethod(tpl, "PostRender", PostRender); Nan::SetPrototypeMethod(tpl, "postRender", PostRender); Nan::SetPrototypeMethod(tpl, "PremultipliedAlphaOff", PremultipliedAlphaOff); Nan::SetPrototypeMethod(tpl, "premultipliedAlphaOff", PremultipliedAlphaOff); Nan::SetPrototypeMethod(tpl, "PremultipliedAlphaOn", PremultipliedAlphaOn); Nan::SetPrototypeMethod(tpl, "premultipliedAlphaOn", PremultipliedAlphaOn); Nan::SetPrototypeMethod(tpl, "ReleaseGraphicsResources", ReleaseGraphicsResources); Nan::SetPrototypeMethod(tpl, "releaseGraphicsResources", ReleaseGraphicsResources); Nan::SetPrototypeMethod(tpl, "Render", Render); Nan::SetPrototypeMethod(tpl, "render", Render); Nan::SetPrototypeMethod(tpl, "RepeatOff", RepeatOff); Nan::SetPrototypeMethod(tpl, "repeatOff", RepeatOff); Nan::SetPrototypeMethod(tpl, "RepeatOn", RepeatOn); Nan::SetPrototypeMethod(tpl, "repeatOn", RepeatOn); Nan::SetPrototypeMethod(tpl, "RestrictPowerOf2ImageSmallerOff", RestrictPowerOf2ImageSmallerOff); Nan::SetPrototypeMethod(tpl, "restrictPowerOf2ImageSmallerOff", RestrictPowerOf2ImageSmallerOff); Nan::SetPrototypeMethod(tpl, "RestrictPowerOf2ImageSmallerOn", RestrictPowerOf2ImageSmallerOn); Nan::SetPrototypeMethod(tpl, "restrictPowerOf2ImageSmallerOn", RestrictPowerOf2ImageSmallerOn); Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast); Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast); Nan::SetPrototypeMethod(tpl, "SetBlendingMode", SetBlendingMode); Nan::SetPrototypeMethod(tpl, "setBlendingMode", SetBlendingMode); Nan::SetPrototypeMethod(tpl, "SetColorMode", SetColorMode); Nan::SetPrototypeMethod(tpl, "setColorMode", SetColorMode); Nan::SetPrototypeMethod(tpl, "SetColorModeToDefault", SetColorModeToDefault); Nan::SetPrototypeMethod(tpl, "setColorModeToDefault", SetColorModeToDefault); Nan::SetPrototypeMethod(tpl, "SetColorModeToDirectScalars", SetColorModeToDirectScalars); Nan::SetPrototypeMethod(tpl, "setColorModeToDirectScalars", SetColorModeToDirectScalars); Nan::SetPrototypeMethod(tpl, "SetColorModeToMapScalars", SetColorModeToMapScalars); Nan::SetPrototypeMethod(tpl, "setColorModeToMapScalars", SetColorModeToMapScalars); Nan::SetPrototypeMethod(tpl, "SetCubeMap", SetCubeMap); Nan::SetPrototypeMethod(tpl, "setCubeMap", SetCubeMap); Nan::SetPrototypeMethod(tpl, "SetEdgeClamp", SetEdgeClamp); Nan::SetPrototypeMethod(tpl, "setEdgeClamp", SetEdgeClamp); Nan::SetPrototypeMethod(tpl, "SetInterpolate", SetInterpolate); Nan::SetPrototypeMethod(tpl, "setInterpolate", SetInterpolate); Nan::SetPrototypeMethod(tpl, "SetLookupTable", SetLookupTable); Nan::SetPrototypeMethod(tpl, "setLookupTable", SetLookupTable); Nan::SetPrototypeMethod(tpl, "SetMapColorScalarsThroughLookupTable", SetMapColorScalarsThroughLookupTable); Nan::SetPrototypeMethod(tpl, "setMapColorScalarsThroughLookupTable", SetMapColorScalarsThroughLookupTable); Nan::SetPrototypeMethod(tpl, "SetMipmap", SetMipmap); Nan::SetPrototypeMethod(tpl, "setMipmap", SetMipmap); Nan::SetPrototypeMethod(tpl, "SetPremultipliedAlpha", SetPremultipliedAlpha); Nan::SetPrototypeMethod(tpl, "setPremultipliedAlpha", SetPremultipliedAlpha); Nan::SetPrototypeMethod(tpl, "SetQuality", SetQuality); Nan::SetPrototypeMethod(tpl, "setQuality", SetQuality); Nan::SetPrototypeMethod(tpl, "SetQualityTo16Bit", SetQualityTo16Bit); Nan::SetPrototypeMethod(tpl, "setQualityTo16Bit", SetQualityTo16Bit); Nan::SetPrototypeMethod(tpl, "SetQualityTo32Bit", SetQualityTo32Bit); Nan::SetPrototypeMethod(tpl, "setQualityTo32Bit", SetQualityTo32Bit); Nan::SetPrototypeMethod(tpl, "SetQualityToDefault", SetQualityToDefault); Nan::SetPrototypeMethod(tpl, "setQualityToDefault", SetQualityToDefault); Nan::SetPrototypeMethod(tpl, "SetRepeat", SetRepeat); Nan::SetPrototypeMethod(tpl, "setRepeat", SetRepeat); Nan::SetPrototypeMethod(tpl, "SetRestrictPowerOf2ImageSmaller", SetRestrictPowerOf2ImageSmaller); Nan::SetPrototypeMethod(tpl, "setRestrictPowerOf2ImageSmaller", SetRestrictPowerOf2ImageSmaller); Nan::SetPrototypeMethod(tpl, "SetTransform", SetTransform); Nan::SetPrototypeMethod(tpl, "setTransform", SetTransform); Nan::SetPrototypeMethod(tpl, "SetUseSRGBColorSpace", SetUseSRGBColorSpace); Nan::SetPrototypeMethod(tpl, "setUseSRGBColorSpace", SetUseSRGBColorSpace); Nan::SetPrototypeMethod(tpl, "UseSRGBColorSpaceOff", UseSRGBColorSpaceOff); Nan::SetPrototypeMethod(tpl, "useSRGBColorSpaceOff", UseSRGBColorSpaceOff); Nan::SetPrototypeMethod(tpl, "UseSRGBColorSpaceOn", UseSRGBColorSpaceOn); Nan::SetPrototypeMethod(tpl, "useSRGBColorSpaceOn", UseSRGBColorSpaceOn); #ifdef VTK_NODE_PLUS_VTKTEXTUREWRAP_INITPTPL VTK_NODE_PLUS_VTKTEXTUREWRAP_INITPTPL #endif ptpl.Reset( tpl ); } void VtkTextureWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info) { if(!info.IsConstructCall()) { Nan::ThrowError("Constructor not called in a construct call."); return; } if(info.Length() == 0) { vtkSmartPointer<vtkTexture> native = vtkSmartPointer<vtkTexture>::New(); VtkTextureWrap* obj = new VtkTextureWrap(native); obj->Wrap(info.This()); } else { if(info[0]->ToObject() != vtkNodeJsNoWrap ) { Nan::ThrowError("Parameter Error"); return; } } info.GetReturnValue().Set(info.This()); } void VtkTextureWrap::CubeMapOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->CubeMapOff(); } void VtkTextureWrap::CubeMapOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->CubeMapOn(); } void VtkTextureWrap::EdgeClampOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->EdgeClampOff(); } void VtkTextureWrap::EdgeClampOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->EdgeClampOn(); } void VtkTextureWrap::GetBlendingMode(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetBlendingMode(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetColorMode(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetColorMode(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetCubeMap(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); bool r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetCubeMap(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetEdgeClamp(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetEdgeClamp(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetInput(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); vtkImageData * r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetInput(); VtkImageDataWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkImageDataWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkImageDataWrap *w = new VtkImageDataWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); } void VtkTextureWrap::GetInterpolate(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetInterpolate(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetLookupTable(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); vtkScalarsToColors * r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetLookupTable(); VtkScalarsToColorsWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkScalarsToColorsWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkScalarsToColorsWrap *w = new VtkScalarsToColorsWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); } void VtkTextureWrap::GetMapColorScalarsThroughLookupTable(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetMapColorScalarsThroughLookupTable(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetMappedScalars(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); vtkUnsignedCharArray * r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetMappedScalars(); VtkUnsignedCharArrayWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkUnsignedCharArrayWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkUnsignedCharArrayWrap *w = new VtkUnsignedCharArrayWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); } void VtkTextureWrap::GetMipmap(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); bool r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetMipmap(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetPremultipliedAlpha(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); bool r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetPremultipliedAlpha(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetQuality(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetQuality(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetRepeat(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetRepeat(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetRestrictPowerOf2ImageSmaller(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetRestrictPowerOf2ImageSmaller(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetTextureUnit(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetTextureUnit(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::GetTransform(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); vtkTransform * r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetTransform(); VtkTransformWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkTransformWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkTransformWrap *w = new VtkTransformWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); } void VtkTextureWrap::GetUseSRGBColorSpace(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); bool r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->GetUseSRGBColorSpace(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::InterpolateOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->InterpolateOff(); } void VtkTextureWrap::InterpolateOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->InterpolateOn(); } void VtkTextureWrap::IsTranslucent(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); int r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->IsTranslucent(); info.GetReturnValue().Set(Nan::New(r)); } void VtkTextureWrap::Load(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkRendererWrap::ptpl))->HasInstance(info[0])) { VtkRendererWrap *a0 = ObjectWrap::Unwrap<VtkRendererWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->Load( (vtkRenderer *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::MapColorScalarsThroughLookupTableOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->MapColorScalarsThroughLookupTableOff(); } void VtkTextureWrap::MapColorScalarsThroughLookupTableOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->MapColorScalarsThroughLookupTableOn(); } void VtkTextureWrap::MipmapOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->MipmapOff(); } void VtkTextureWrap::MipmapOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->MipmapOn(); } void VtkTextureWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); vtkTexture * r; if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } r = native->NewInstance(); VtkTextureWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkTextureWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkTextureWrap *w = new VtkTextureWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); } void VtkTextureWrap::PostRender(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkRendererWrap::ptpl))->HasInstance(info[0])) { VtkRendererWrap *a0 = ObjectWrap::Unwrap<VtkRendererWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->PostRender( (vtkRenderer *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::PremultipliedAlphaOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->PremultipliedAlphaOff(); } void VtkTextureWrap::PremultipliedAlphaOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->PremultipliedAlphaOn(); } void VtkTextureWrap::ReleaseGraphicsResources(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkWindowWrap::ptpl))->HasInstance(info[0])) { VtkWindowWrap *a0 = ObjectWrap::Unwrap<VtkWindowWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->ReleaseGraphicsResources( (vtkWindow *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::Render(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkRendererWrap::ptpl))->HasInstance(info[0])) { VtkRendererWrap *a0 = ObjectWrap::Unwrap<VtkRendererWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->Render( (vtkRenderer *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::RepeatOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->RepeatOff(); } void VtkTextureWrap::RepeatOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->RepeatOn(); } void VtkTextureWrap::RestrictPowerOf2ImageSmallerOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->RestrictPowerOf2ImageSmallerOff(); } void VtkTextureWrap::RestrictPowerOf2ImageSmallerOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->RestrictPowerOf2ImageSmallerOn(); } void VtkTextureWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0])) { VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject()); vtkTexture * r; if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } r = native->SafeDownCast( (vtkObjectBase *) a0->native.GetPointer() ); VtkTextureWrap::InitPtpl(); v8::Local<v8::Value> argv[1] = { Nan::New(vtkNodeJsNoWrap) }; v8::Local<v8::Function> cons = Nan::New<v8::FunctionTemplate>(VtkTextureWrap::ptpl)->GetFunction(); v8::Local<v8::Object> wo = cons->NewInstance(1, argv); VtkTextureWrap *w = new VtkTextureWrap(); w->native = r; w->Wrap(wo); info.GetReturnValue().Set(wo); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetBlendingMode(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetBlendingMode( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetColorMode(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetColorMode( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetColorModeToDefault(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetColorModeToDefault(); } void VtkTextureWrap::SetColorModeToDirectScalars(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetColorModeToDirectScalars(); } void VtkTextureWrap::SetColorModeToMapScalars(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetColorModeToMapScalars(); } void VtkTextureWrap::SetCubeMap(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsBoolean()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetCubeMap( info[0]->BooleanValue() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetEdgeClamp(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetEdgeClamp( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetInterpolate(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetInterpolate( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetLookupTable(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkScalarsToColorsWrap::ptpl))->HasInstance(info[0])) { VtkScalarsToColorsWrap *a0 = ObjectWrap::Unwrap<VtkScalarsToColorsWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetLookupTable( (vtkScalarsToColors *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetMapColorScalarsThroughLookupTable(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetMapColorScalarsThroughLookupTable( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetMipmap(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsBoolean()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetMipmap( info[0]->BooleanValue() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetPremultipliedAlpha(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsBoolean()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetPremultipliedAlpha( info[0]->BooleanValue() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetQuality(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetQuality( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetQualityTo16Bit(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetQualityTo16Bit(); } void VtkTextureWrap::SetQualityTo32Bit(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetQualityTo32Bit(); } void VtkTextureWrap::SetQualityToDefault(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->SetQualityToDefault(); } void VtkTextureWrap::SetRepeat(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetRepeat( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetRestrictPowerOf2ImageSmaller(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsInt32()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetRestrictPowerOf2ImageSmaller( info[0]->Int32Value() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetTransform(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkTransformWrap::ptpl))->HasInstance(info[0])) { VtkTransformWrap *a0 = ObjectWrap::Unwrap<VtkTransformWrap>(info[0]->ToObject()); if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetTransform( (vtkTransform *) a0->native.GetPointer() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::SetUseSRGBColorSpace(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() > 0 && info[0]->IsBoolean()) { if(info.Length() != 1) { Nan::ThrowError("Too many parameters."); return; } native->SetUseSRGBColorSpace( info[0]->BooleanValue() ); return; } Nan::ThrowError("Parameter mismatch"); } void VtkTextureWrap::UseSRGBColorSpaceOff(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->UseSRGBColorSpaceOff(); } void VtkTextureWrap::UseSRGBColorSpaceOn(const Nan::FunctionCallbackInfo<v8::Value>& info) { VtkTextureWrap *wrapper = ObjectWrap::Unwrap<VtkTextureWrap>(info.Holder()); vtkTexture *native = (vtkTexture *)wrapper->native.GetPointer(); if(info.Length() != 0) { Nan::ThrowError("Too many parameters."); return; } native->UseSRGBColorSpaceOn(); }
31.564696
111
0.73056
[ "render", "object" ]
e8492b18167cfbbe7e218dc3acebfc3f06748d65
161
cpp
C++
chapter17/exercise17_2.cpp
zerenlu/primer_Cpp
4882e244ef90c9f69e344171468b8cfc8308b2c4
[ "MIT" ]
null
null
null
chapter17/exercise17_2.cpp
zerenlu/primer_Cpp
4882e244ef90c9f69e344171468b8cfc8308b2c4
[ "MIT" ]
null
null
null
chapter17/exercise17_2.cpp
zerenlu/primer_Cpp
4882e244ef90c9f69e344171468b8cfc8308b2c4
[ "MIT" ]
null
null
null
#include<tuple> #include<string> #include<vector> #include<map> int main() { std::tuple<std::string, std::vector<std::string>, std::pair<std::string, int>> t; }
20.125
82
0.68323
[ "vector" ]
e84c0cb88a74c18089b80c7b85244175eb42afbf
3,629
cpp
C++
callbacks.cpp
adamvan101/OpenGLTextBox
cdee2f44469c5c4ca659f7ad561bdf99aed8b8ab
[ "Apache-2.0" ]
null
null
null
callbacks.cpp
adamvan101/OpenGLTextBox
cdee2f44469c5c4ca659f7ad561bdf99aed8b8ab
[ "Apache-2.0" ]
null
null
null
callbacks.cpp
adamvan101/OpenGLTextBox
cdee2f44469c5c4ca659f7ad561bdf99aed8b8ab
[ "Apache-2.0" ]
1
2018-12-11T19:13:04.000Z
2018-12-11T19:13:04.000Z
#include "callbacks.h" double mouseX, mouseY; double mouseMoveX, mouseMoveY; int WIDTH = 300, HEIGHT = 400; std::vector<std::string> _chatText; std::vector<std::string> _chatLog; int _chatTextIndex = 0; std::string name = "Adam"; void recvMsg(std::string s) { s = name + ": " + s; int stride = (WIDTH - (3*LINE_WIDTH))/LINE_WIDTH - 3; std::istringstream ss(s); std::string hold; while(std::getline(ss, hold, '\n')){ for (int i = 0; i < hold.length(); i+=stride) { _chatLog.push_back(hold.substr(i, stride)); } } } void sendMsg(std::vector<std::string> s) { std::string entireMsg = ""; for (int i = 0; i < s.size(); i++) { entireMsg += s[i]; // entireMsg += '\n'; } recvMsg(entireMsg); } void reshapeCallback(int width, int height) { HEIGHT=height; WIDTH=width; glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, WIDTH, 0,HEIGHT); glViewport(0, 0, (GLsizei)width, (GLsizei)height); glMatrixMode(GL_MODELVIEW); } // int glutGetModifiers(void); // GLUT_ACTIVE_SHIFT // Set if the Shift modifier or Caps Lock is active. // GLUT_ACTIVE_CTRL // Set if the Ctrl modifier is active. // GLUT_ACTIVE_ALT // Set if the Alt modifier is active. void keyboardCallback(unsigned char key, GLint x, GLint y) { switch (key) { // ESCAPE case 27: exit (0); break; // RETURN case 13: if (glutGetModifiers() & GLUT_ACTIVE_SHIFT) { if (_chatText.size() == 0) { _chatText.push_back(""); } _chatTextIndex++; _chatText.push_back("\n"); } else { sendMsg(_chatText); _chatText.clear(); _chatTextIndex = 0; } break; // BACKSPACE case 127: if (isChatTextEmpty()) { break; } if (_chatText.size() > 0) { if (_chatText[_chatTextIndex].length() <= 0) { _chatText.pop_back(); _chatTextIndex--; if (_chatTextIndex < 0) { _chatTextIndex = 0; } } if (_chatText.size() > 0 && _chatText[_chatTextIndex].length() > 0) { // printf("Char: %d\n", _chatText[_chatTextIndex].back()); // if (_chatText[_chatTextIndex].back() == '\n') { // _chatText[_chatTextIndex] = _chatText[_chatTextIndex].substr(0, _chatText[_chatTextIndex].size() - 1); // } _chatText[_chatTextIndex] = _chatText[_chatTextIndex].substr(0, _chatText[_chatTextIndex].size() - 1); } } break; default: if (_chatText.size() == 0) { _chatText.push_back(""); } int stride = (WIDTH - (3*LINE_WIDTH))/LINE_WIDTH - 3; if (_chatText[_chatTextIndex].length() >= stride) { _chatTextIndex++; _chatText.push_back(""); } _chatText[_chatTextIndex] += key; break; } glutPostRedisplay(); } // button = { GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON } // state = { GLUT_UP, GLUT_DOWN } void mouseCallback(int button, int state, int x, int y) { switch (button) { case GLUT_LEFT_BUTTON: if (state == GLUT_UP) { } break; } }
26.881481
133
0.505373
[ "vector" ]
e84e2a15d06846415a93a8f61e03bf288487ec7d
5,559
cxx
C++
phys-services/private/phys-services/I3EventCounter.cxx
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
1
2020-12-24T22:00:01.000Z
2020-12-24T22:00:01.000Z
phys-services/private/phys-services/I3EventCounter.cxx
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
null
null
null
phys-services/private/phys-services/I3EventCounter.cxx
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
3
2020-07-17T09:20:29.000Z
2021-03-30T16:44:18.000Z
#include <sstream> #include <fstream> #include "phys-services/I3EventCounter.h" #include "dataclasses/physics/I3EventHeader.h" using std::ostringstream; I3_MODULE(I3EventCounter); I3EventCounter :: I3EventCounter(const I3Context& ctx) : I3Module(ctx), physCount_(0), statusCount_(0), geometryCount_(0), calibCount_(0), counterStep_(100), nevents_(0), dump_(false), eventHeaderName_("I3EventHeader"), physicsCounterName_("Events"), geoCounterName_(""), calibCounterName_(""), statusCounterName_("") { AddOutBox("OutBox"); path_="stdout"; AddParameter("filename","The file we'll write to or ('stdout' | 'stderr'). ", path_); fmt_ ="\nphysics frames: %d"; fmt_+="\ngeometry frames: %d"; fmt_+="\ncalibration frames: %d"; fmt_+="\ndetector status frames: %d"; AddParameter("formatstr","Format string for frame counts. ", fmt_); AddParameter("CounterStep", "Only print out event number if divisible by this", counterStep_); AddParameter("Dump", "Whether to dump the current frame to screen", dump_); AddParameter("NEvents", "Number of events to process", nevents_); AddParameter("EventHeaderName", "Name of event header in the frame", eventHeaderName_); AddParameter("PhysicsCounterName", "String label for physics frame counter", physicsCounterName_); AddParameter("GeometryCounterName", "String label for geometry frame counter", geoCounterName_); AddParameter("CalibrationCounterName", "String label for calibration frame counter", calibCounterName_); AddParameter("DetectorStatusCounterName", "String label for detector status frame counter", statusCounterName_); } void I3EventCounter :: Configure() { GetParameter("filename", path_); log_info("(%s) Writting event count to : %s", GetName().c_str(), path_.c_str()); GetParameter("formatstr", fmt_); log_info("(%s) : How counter output should be formatted. %s", GetName().c_str(), fmt_.c_str()); GetParameter("CounterStep", counterStep_); log_info("(%s) Event Counter Step: %i", GetName().c_str(), counterStep_); GetParameter("Dump", dump_); log_info("(%s) Whether to dump frame to screen: %i", GetName().c_str(), dump_); GetParameter("NEvents", nevents_); log_info("(%s) NEvents: %i", GetName().c_str(), nevents_); GetParameter("EventHeaderName", eventHeaderName_); GetParameter("PhysicsCounterName", physicsCounterName_); GetParameter("GeometryCounterName", geoCounterName_); GetParameter("CalibrationCounterName", calibCounterName_); GetParameter("DetectorStatusCounterName", statusCounterName_); if (path_ == "stdout") { out = &std::cout; } else if (path_ == "stderr") { out = &std::cerr; } else { out = new std::ofstream(path_.c_str(), std::ios::out); } } namespace { const char* myordinal(int i){ static char ordinal[256]; if ( ( (i%10) > 3 ) || ((i%10)==0) || (((i/10)%10)==1) ){ sprintf(ordinal,"%dth",i); } else { switch(i%10){ case 1: sprintf(ordinal,"%dst",i); break; case 2: sprintf(ordinal,"%dnd",i); break; case 3: sprintf(ordinal,"%drd",i); break; default: log_fatal("programming error i=%d",i); } } return ordinal; } } void I3EventCounter :: Physics(I3FramePtr frame) { physCount_++; I3EventHeaderConstPtr eh = frame->Get<I3EventHeaderConstPtr>(eventHeaderName_); if (eh) { // Frame might not have an event header if (physCount_%counterStep_ == 0) { log_info("(%s) Processing %s event (EventID=%i, RunID=%i)", GetName().c_str(),myordinal(physCount_), eh->GetEventID(), eh->GetRunID()); } } if (dump_) { ostringstream oss; oss << *frame; log_info("(%s) Current frame (%d):\n%s", GetName().c_str(), physCount_, oss.str().c_str() ); } if (physCount_ >= nevents_ && nevents_ != 0) RequestSuspension(); PushFrame(frame,"OutBox"); } void I3EventCounter::Geometry(I3FramePtr frame) { geometryCount_++; log_debug("frame %d", geometryCount_); PushFrame(frame,"OutBox"); } void I3EventCounter::Calibration(I3FramePtr frame) { calibCount_++; log_debug("frame %d", calibCount_); PushFrame(frame,"OutBox"); } void I3EventCounter::DetectorStatus(I3FramePtr frame) { statusCount_++; log_debug("frame %d", statusCount_); PushFrame(frame,"OutBox"); } void I3EventCounter :: Finish() { log_info("(%s) Total number of physics events: %d", GetName().c_str(), physCount_); // format string with values sprintf(buffer,fmt_.c_str(),physCount_,geometryCount_,calibCount_,statusCount_); if (!summary_) summary_= context_.Get<I3MapStringDoublePtr>("I3SummaryService"); // Write values to summary service if (summary_) { if (!physicsCounterName_.empty()) (*summary_)[physicsCounterName_] += physCount_; if (!geoCounterName_.empty()) (*summary_)[geoCounterName_] += geometryCount_; if (!calibCounterName_.empty()) (*summary_)[calibCounterName_] += calibCount_; if (!statusCounterName_.empty()) (*summary_)[statusCounterName_] += statusCount_; } else { // No summary service found log_warn("No I3SummaryService found."); // out put string to stream (*out) << buffer << std::endl; } }
26.855072
88
0.635906
[ "geometry" ]
e8516746b29eaa352a5a4a7e23933684e2c0ff20
28,721
cpp
C++
tests/Unit/Evolution/Systems/Cce/Test_BoundaryData.cpp
desperadoshi/spectre
b61c12dce108a98a875a1e9476e5630bea634119
[ "MIT" ]
null
null
null
tests/Unit/Evolution/Systems/Cce/Test_BoundaryData.cpp
desperadoshi/spectre
b61c12dce108a98a875a1e9476e5630bea634119
[ "MIT" ]
null
null
null
tests/Unit/Evolution/Systems/Cce/Test_BoundaryData.cpp
desperadoshi/spectre
b61c12dce108a98a875a1e9476e5630bea634119
[ "MIT" ]
null
null
null
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Framework/TestingFramework.hpp" #include <cstddef> #include "DataStructures/ComplexDataVector.hpp" #include "DataStructures/DataBox/TagName.hpp" #include "DataStructures/DataVector.hpp" #include "DataStructures/SpinWeighted.hpp" #include "DataStructures/Tensor/Tensor.hpp" #include "DataStructures/Tensor/TypeAliases.hpp" #include "Evolution/Systems/Cce/BoundaryData.hpp" #include "Framework/CheckWithRandomValues.hpp" #include "Framework/SetupLocalPythonEnvironment.hpp" #include "Helpers/DataStructures/MakeWithRandomValues.hpp" #include "Helpers/Evolution/Systems/Cce/BoundaryTestHelpers.hpp" #include "NumericalAlgorithms/Spectral/SwshCollocation.hpp" #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/KerrSchild.hpp" #include "PointwiseFunctions/GeneralRelativity/ComputeGhQuantities.hpp" #include "PointwiseFunctions/GeneralRelativity/ComputeSpacetimeQuantities.hpp" #include "Utilities/Gsl.hpp" namespace Cce { namespace { void pypp_test_worldtube_computation_steps() noexcept { pypp::SetupLocalPythonEnvironment local_python_env{"Evolution/Systems/Cce/"}; const size_t num_pts = 5; pypp::check_with_random_values<1>( &cartesian_to_spherical_coordinates_and_jacobians, "BoundaryData", {"cartesian_to_angular_coordinates", "cartesian_to_angular_jacobian", "cartesian_to_angular_inverse_jacobian"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&null_metric_and_derivative, "BoundaryData", {"du_null_metric", "null_metric"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&worldtube_normal_and_derivatives, "BoundaryData", {"worldtube_normal", "dt_worldtube_normal"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&null_vector_l_and_derivatives, "BoundaryData", {"du_null_vector_l", "null_vector_l"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>( &dlambda_null_metric_and_inverse, "BoundaryData", {"dlambda_null_metric", "inverse_dlambda_null_metric"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&beta_worldtube_data, "BoundaryData", {"bondi_beta_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&bondi_u_worldtube_data, "BoundaryData", {"bondi_u_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}, 1.0e-11); pypp::check_with_random_values<1>(&bondi_w_worldtube_data, "BoundaryData", {"bondi_w_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}, 1.0e-11); pypp::check_with_random_values<1>(&bondi_j_worldtube_data, "BoundaryData", {"bondi_j_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>( &dr_bondi_j, "BoundaryData", {"dr_bondi_j_worldtube_data", "dr_bondi_j_denominator"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&d2lambda_bondi_r, "BoundaryData", {"d2lambda_bondi_r"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>( &bondi_q_worldtube_data, "BoundaryData", {"bondi_q_worldtube_data", "dr_bondi_u_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}, 1.0e-10); pypp::check_with_random_values<1>(&bondi_h_worldtube_data, "BoundaryData", {"bondi_h_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}); pypp::check_with_random_values<1>(&du_j_worldtube_data, "BoundaryData", {"du_j_worldtube_data"}, {{{1.0, 5.0}}}, DataVector{num_pts}); } template <typename Generator> void test_trigonometric_function_identities( const gsl::not_null<Generator*> gen) noexcept { UniformCustomDistribution<size_t> l_dist(3, 6); const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); Scalar<DataVector> cos_phi{number_of_angular_points}; Scalar<DataVector> cos_theta{number_of_angular_points}; Scalar<DataVector> sin_phi{number_of_angular_points}; Scalar<DataVector> sin_theta{number_of_angular_points}; trigonometric_functions_on_swsh_collocation( make_not_null(&cos_phi), make_not_null(&cos_theta), make_not_null(&sin_phi), make_not_null(&sin_theta), l_max); const DataVector unity{number_of_angular_points, 1.0}; { INFO("Trigonometric identities"); CHECK_ITERABLE_APPROX(square(get(cos_phi)) + square(get(sin_phi)), unity); CHECK_ITERABLE_APPROX(square(get(cos_theta)) + square(get(sin_theta)), unity); } tnsr::I<DataVector, 3> cartesian_coords{number_of_angular_points}; SphericaliCartesianJ cartesian_to_angular_jacobian{number_of_angular_points}; CartesianiSphericalJ inverse_cartesian_to_angular_jacobian{ number_of_angular_points}; UniformCustomDistribution<double> radius_dist{10.0, 100.0}; const double extraction_radius = radius_dist(*gen); cartesian_to_spherical_coordinates_and_jacobians( make_not_null(&cartesian_coords), make_not_null(&cartesian_to_angular_jacobian), make_not_null(&inverse_cartesian_to_angular_jacobian), cos_phi, cos_theta, sin_phi, sin_theta, extraction_radius); DataVector jacobian_identity{number_of_angular_points}; const DataVector zero{number_of_angular_points, 0.0}; { INFO("Jacobian identity") for (size_t i = 0; i < 3; ++i) { for (size_t j = 0; j < 3; ++j) { jacobian_identity = cartesian_to_angular_jacobian.get(i, 0) * inverse_cartesian_to_angular_jacobian.get(0, j); for (size_t k = 1; k < 3; ++k) { jacobian_identity += cartesian_to_angular_jacobian.get(i, k) * inverse_cartesian_to_angular_jacobian.get(k, j); } if (i == j) { CHECK_ITERABLE_APPROX(jacobian_identity, unity); } else { CHECK_ITERABLE_APPROX(jacobian_identity, zero); } } } } } template <typename Generator> void test_bondi_r(const gsl::not_null<Generator*> gen) noexcept { UniformCustomDistribution<size_t> l_dist(3, 6); const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); UniformCustomDistribution<double> value_dist{0.1, 0.5}; tnsr::iaa<DataVector, 3> expected_phi{number_of_angular_points}; fill_with_random_values(make_not_null(&expected_phi), gen, make_not_null(&value_dist)); tnsr::aa<DataVector, 3> expected_psi{number_of_angular_points}; fill_with_random_values(make_not_null(&expected_psi), gen, make_not_null(&value_dist)); get<0, 0>(expected_psi) -= 1.0; for (size_t a = 1; a < 4; ++a) { expected_psi.get(a, a) += 1.0; } tnsr::aa<DataVector, 3> expected_dt_psi{number_of_angular_points}; fill_with_random_values(make_not_null(&expected_dt_psi), gen, make_not_null(&value_dist)); // test bondi_r now that we have an appropriate angular metric tnsr::ii<DataVector, 2> angular_psi{number_of_angular_points}; for (size_t A = 0; A < 2; ++A) { for (size_t B = A; B < 2; ++B) { angular_psi.get(A, B) = expected_psi.get(A + 2, B + 2); } } tnsr::aa<DataVector, 3, Frame::RadialNull> expected_psi_null_coords{ number_of_angular_points}; for (size_t a = 0; a < 4; ++a) { for (size_t b = a; b < 4; ++b) { expected_psi_null_coords.get(a, b) = expected_psi.get(a, b); } } Scalar<SpinWeighted<ComplexDataVector, 0>> local_bondi_r{ number_of_angular_points}; bondi_r(make_not_null(&local_bondi_r), expected_psi_null_coords); Scalar<SpinWeighted<ComplexDataVector, 0>> expected_bondi_r{ number_of_angular_points}; get(expected_bondi_r).data() = std::complex<double>(1.0, 0.0) * pow(get(determinant_and_inverse(angular_psi).first), 0.25); CHECK_ITERABLE_APPROX(get(local_bondi_r).data(), get(expected_bondi_r).data()); } template <typename Generator> void test_d_bondi_r_identities(const gsl::not_null<Generator*> gen) noexcept { // more resolution needed because we want high precision on the angular // derivative check. UniformCustomDistribution<size_t> l_dist(8, 12); // distribution chosen to be not too far from the scale of the diagnonal // elements in the matrix UniformCustomDistribution<double> value_dist{0.1, 0.2}; const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); Scalar<SpinWeighted<ComplexDataVector, 0>> bondi_r{number_of_angular_points}; // simple test function so that we can easily work out what the expected // angular derivatives should be. const auto& collocation = Spectral::Swsh::cached_collocation_metadata< Spectral::Swsh::ComplexRepresentation::Interleaved>(l_max); for (const auto& collocation_point : collocation) { get(bondi_r).data()[collocation_point.offset] = 5.0 + sin(collocation_point.theta) * cos(collocation_point.phi); } tnsr::aa<DataVector, 3, Frame::RadialNull> null_metric{ number_of_angular_points}; fill_with_random_values(make_not_null(&null_metric), gen, make_not_null(&value_dist)); // to make the inverse more well-behaved. for (size_t a = 0; a < 4; ++a) { null_metric.get(a, a) += 1.0; } const auto inverse_null_metric = determinant_and_inverse(null_metric).second; tnsr::aa<DataVector, 3, Frame::RadialNull> dlambda_null_metric{ number_of_angular_points}; fill_with_random_values(make_not_null(&dlambda_null_metric), gen, make_not_null(&value_dist)); tnsr::aa<DataVector, 3, Frame::RadialNull> du_null_metric{ number_of_angular_points}; fill_with_random_values(make_not_null(&du_null_metric), gen, make_not_null(&value_dist)); // initialize the du_null_metric in a way that allows a trace identity to be // used to check the calculation tnsr::ii<DataVector, 2> angular_inverse_null_metric{number_of_angular_points}; for (size_t A = 0; A < 2; ++A) { for (size_t B = 0; B < 2; ++B) { angular_inverse_null_metric.get(A, B) = inverse_null_metric.get(A + 2, B + 2); } } const tnsr::II<DataVector, 2> trace_identity_angular_null_metric = determinant_and_inverse(angular_inverse_null_metric).second; double random_scaling = value_dist(*gen); for (size_t A = 0; A < 2; ++A) { for (size_t B = 0; B < 2; ++B) { du_null_metric.get(A + 2, B + 2) = random_scaling * trace_identity_angular_null_metric.get(A, B); } } tnsr::a<DataVector, 3, Frame::RadialNull> d_bondi_r{number_of_angular_points}; Cce::d_bondi_r(make_not_null(&d_bondi_r), bondi_r, dlambda_null_metric, du_null_metric, inverse_null_metric, l_max); DataVector expected_dtheta_r{number_of_angular_points}; DataVector expected_dphi_r{number_of_angular_points}; for (const auto& collocation_point : collocation) { expected_dtheta_r[collocation_point.offset] = cos(collocation_point.theta) * cos(collocation_point.phi); // note 'pfaffian' derivative with the 1/sin(theta) expected_dphi_r[collocation_point.offset] = -sin(collocation_point.phi); } Approx angular_derivative_approx = Approx::custom() .epsilon(std::numeric_limits<double>::epsilon() * 1.0e5) .scale(1.0); CHECK_ITERABLE_CUSTOM_APPROX(get<2>(d_bondi_r), expected_dtheta_r, angular_derivative_approx); CHECK_ITERABLE_CUSTOM_APPROX(get<3>(d_bondi_r), expected_dphi_r, angular_derivative_approx); // a slightly different calculational path to improve test robustness DataVector expected_dlambda_r{number_of_angular_points, 0.0}; for (size_t A = 0; A < 2; ++A) { for (size_t B = 0; B < 2; ++B) { expected_dlambda_r += inverse_null_metric.get(A + 2, B + 2) * dlambda_null_metric.get(A + 2, B + 2); } } Approx trace_product_approx = Approx::custom() .epsilon(std::numeric_limits<double>::epsilon() * 1.0e5) .scale(1.0); expected_dlambda_r *= 0.25 * real(get(bondi_r).data()); CHECK_ITERABLE_CUSTOM_APPROX(expected_dlambda_r, get<1>(d_bondi_r), trace_product_approx); // use the trace identity to evaluate the du_r in the contrived case where the // du_null metric is proportional to null_metric. DataVector expected_du_r{number_of_angular_points, random_scaling * 2.0}; expected_du_r *= 0.25 * real(get(bondi_r).data()); CHECK_ITERABLE_CUSTOM_APPROX(expected_du_r, get<0>(d_bondi_r), trace_product_approx); } template <typename Generator> void test_dyad_identities(const gsl::not_null<Generator*> gen) noexcept { UniformCustomDistribution<size_t> l_dist(3, 6); const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); tnsr::I<ComplexDataVector, 2, Frame::RadialNull> up_dyad{ number_of_angular_points}; tnsr::i<ComplexDataVector, 2, Frame::RadialNull> down_dyad{ number_of_angular_points}; Cce::dyads(make_not_null(&down_dyad), make_not_null(&up_dyad)); const ComplexDataVector two{number_of_angular_points, std::complex<double>(2.0, 0.0)}; const ComplexDataVector zero{number_of_angular_points, std::complex<double>(0.0, 0.0)}; ComplexDataVector dyad_product{number_of_angular_points, 0.0}; for (size_t A = 0; A < 2; ++A) { dyad_product += up_dyad.get(A) * down_dyad.get(A); } CHECK_ITERABLE_APPROX(dyad_product, zero); dyad_product = 0.0; for (size_t A = 0; A < 2; ++A) { dyad_product += up_dyad.get(A) * conj(down_dyad.get(A)); } CHECK_ITERABLE_APPROX(dyad_product, two); } template <typename DataBoxTagList, typename AnalyticSolution> void dispatch_to_gh_worldtube_computation_from_analytic( const gsl::not_null<db::DataBox<DataBoxTagList>*> box, const AnalyticSolution& solution, const double extraction_radius, const size_t l_max) noexcept { const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); // create the vector of collocation points that we want to interpolate to tnsr::I<DataVector, 3> collocation_points{number_of_angular_points}; const auto& collocation = Spectral::Swsh::cached_collocation_metadata< Spectral::Swsh::ComplexRepresentation::Interleaved>(l_max); for (const auto& collocation_point : collocation) { get<0>(collocation_points)[collocation_point.offset] = extraction_radius * sin(collocation_point.theta) * cos(collocation_point.phi); get<1>(collocation_points)[collocation_point.offset] = extraction_radius * sin(collocation_point.theta) * sin(collocation_point.phi); get<2>(collocation_points)[collocation_point.offset] = extraction_radius * cos(collocation_point.theta); } const auto kerr_schild_variables = solution.variables( collocation_points, 0.0, gr::Solutions::KerrSchild::tags<DataVector>{}); // direct collocation quantities for processing into the GH form of the // worldtube function const auto& lapse = get<gr::Tags::Lapse<DataVector>>(kerr_schild_variables); const auto& dt_lapse = get<::Tags::dt<gr::Tags::Lapse<DataVector>>>(kerr_schild_variables); const auto& d_lapse = get<gr::Solutions::KerrSchild::DerivLapse<DataVector>>( kerr_schild_variables); const auto& shift = get<gr::Tags::Shift<3, ::Frame::Inertial, DataVector>>( kerr_schild_variables); const auto& dt_shift = get<::Tags::dt<gr::Tags::Shift<3, ::Frame::Inertial, DataVector>>>( kerr_schild_variables); const auto& d_shift = get<gr::Solutions::KerrSchild::DerivShift<DataVector>>( kerr_schild_variables); const auto& spatial_metric = get<gr::Tags::SpatialMetric<3, ::Frame::Inertial, DataVector>>( kerr_schild_variables); const auto& dt_spatial_metric = get< ::Tags::dt<gr::Tags::SpatialMetric<3, ::Frame::Inertial, DataVector>>>( kerr_schild_variables); const auto& d_spatial_metric = get<gr::Solutions::KerrSchild::DerivSpatialMetric<DataVector>>( kerr_schild_variables); const auto phi = GeneralizedHarmonic::phi(lapse, d_lapse, shift, d_shift, spatial_metric, d_spatial_metric); const auto psi = gr::spacetime_metric(lapse, shift, spatial_metric); const auto pi = GeneralizedHarmonic::pi( lapse, dt_lapse, shift, dt_shift, spatial_metric, dt_spatial_metric, phi); create_bondi_boundary_data(box, phi, pi, psi, extraction_radius, l_max); } template <typename DataBoxTagList, typename AnalyticSolution> void dispatch_to_modal_worldtube_computation_from_analytic( const gsl::not_null<db::DataBox<DataBoxTagList>*> box, const AnalyticSolution& solution, const double extraction_radius, const size_t l_max) noexcept { const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); // create the vector of collocation points that we want to interpolate to tnsr::I<DataVector, 3> collocation_coordinates{number_of_angular_points}; for (const auto& collocation_point : Spectral::Swsh::cached_collocation_metadata< Spectral::Swsh::ComplexRepresentation::Interleaved>(l_max)) { get<0>(collocation_coordinates)[collocation_point.offset] = extraction_radius * sin(collocation_point.theta) * cos(collocation_point.phi); get<1>(collocation_coordinates)[collocation_point.offset] = extraction_radius * sin(collocation_point.theta) * sin(collocation_point.phi); get<2>(collocation_coordinates)[collocation_point.offset] = extraction_radius * cos(collocation_point.theta); } const auto kerr_schild_variables = solution.variables(collocation_coordinates, 0.0, gr::Solutions::KerrSchild::tags<DataVector>{}); // direct collocation quantities for processing into the GH form of the // worldtube function const Scalar<DataVector>& lapse = get<gr::Tags::Lapse<DataVector>>(kerr_schild_variables); const Scalar<DataVector>& dt_lapse = get<::Tags::dt<gr::Tags::Lapse<DataVector>>>(kerr_schild_variables); const auto& d_lapse = get<gr::Solutions::KerrSchild::DerivLapse<DataVector>>( kerr_schild_variables); const auto& shift = get<gr::Tags::Shift<3, ::Frame::Inertial, DataVector>>( kerr_schild_variables); const auto& dt_shift = get<::Tags::dt<gr::Tags::Shift<3, ::Frame::Inertial, DataVector>>>( kerr_schild_variables); const auto& d_shift = get<gr::Solutions::KerrSchild::DerivShift<DataVector>>( kerr_schild_variables); const auto& spatial_metric = get<gr::Tags::SpatialMetric<3, ::Frame::Inertial, DataVector>>( kerr_schild_variables); const auto& dt_spatial_metric = get< ::Tags::dt<gr::Tags::SpatialMetric<3, ::Frame::Inertial, DataVector>>>( kerr_schild_variables); const auto& d_spatial_metric = get<gr::Solutions::KerrSchild::DerivSpatialMetric<DataVector>>( kerr_schild_variables); Scalar<DataVector> dr_lapse{number_of_angular_points}; get(dr_lapse) = (get<0>(collocation_coordinates) * get<0>(d_lapse) + get<1>(collocation_coordinates) * get<1>(d_lapse) + get<2>(collocation_coordinates) * get<2>(d_lapse)) / extraction_radius; tnsr::I<DataVector, 3> dr_shift{number_of_angular_points}; for (size_t i = 0; i < 3; ++i) { dr_shift.get(i) = (get<0>(collocation_coordinates) * d_shift.get(0, i) + get<1>(collocation_coordinates) * d_shift.get(1, i) + get<2>(collocation_coordinates) * d_shift.get(2, i)) / extraction_radius; } tnsr::ii<DataVector, 3> dr_spatial_metric{number_of_angular_points}; for (size_t i = 0; i < 3; ++i) { for (size_t j = i; j < 3; ++j) { dr_spatial_metric.get(i, j) = (get<0>(collocation_coordinates) * d_spatial_metric.get(0, i, j) + get<1>(collocation_coordinates) * d_spatial_metric.get(1, i, j) + get<2>(collocation_coordinates) * d_spatial_metric.get(2, i, j)) / extraction_radius; } } const auto lapse_coefficients = TestHelpers::tensor_to_libsharp_coefficients(lapse, l_max); const auto dt_lapse_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dt_lapse, l_max); const auto dr_lapse_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dr_lapse, l_max); const auto shift_coefficients = TestHelpers::tensor_to_libsharp_coefficients(shift, l_max); const auto dt_shift_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dt_shift, l_max); const auto dr_shift_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dr_shift, l_max); const auto spatial_metric_coefficients = TestHelpers::tensor_to_libsharp_coefficients(spatial_metric, l_max); const auto dt_spatial_metric_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dt_spatial_metric, l_max); const auto dr_spatial_metric_coefficients = TestHelpers::tensor_to_libsharp_coefficients(dr_spatial_metric, l_max); create_bondi_boundary_data( box, spatial_metric_coefficients, dt_spatial_metric_coefficients, dr_spatial_metric_coefficients, shift_coefficients, dt_shift_coefficients, dr_shift_coefficients, lapse_coefficients, dt_lapse_coefficients, dr_lapse_coefficients, extraction_radius, l_max); } // this tests that the method using modal construction of metric components // and derivatives gives the same answer as the version that just takes the GH // quantities. template <typename Generator> void test_kerr_schild_boundary_consistency( const gsl::not_null<Generator*> gen) noexcept { UniformCustomDistribution<double> value_dist{0.1, 0.5}; // first prepare the input for the modal version const double mass = value_dist(*gen); const std::array<double, 3> spin{ {value_dist(*gen), value_dist(*gen), value_dist(*gen)}}; const std::array<double, 3> center{ {value_dist(*gen), value_dist(*gen), value_dist(*gen)}}; gr::Solutions::KerrSchild solution{mass, spin, center}; const double extraction_radius = 100.0 * value_dist(*gen); UniformCustomDistribution<size_t> l_dist(12, 18); const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); using boundary_variables_tag = ::Tags::Variables< Tags::characteristic_worldtube_boundary_tags<Tags::BoundaryValue>>; auto gh_boundary_box = db::create<db::AddSimpleTags<boundary_variables_tag>>( db::item_type<boundary_variables_tag>{number_of_angular_points}); auto modal_boundary_box = db::create<db::AddSimpleTags<boundary_variables_tag>>( db::item_type<boundary_variables_tag>{number_of_angular_points}); dispatch_to_gh_worldtube_computation_from_analytic( make_not_null(&gh_boundary_box), solution, extraction_radius, l_max); dispatch_to_modal_worldtube_computation_from_analytic( make_not_null(&modal_boundary_box), solution, extraction_radius, l_max); // This can be tightened further with higher l_max above. Q, for instance, has // aliasing trouble Approx angular_derivative_approx = Approx::custom() .epsilon(std::numeric_limits<double>::epsilon() * 1.0e5) .scale(1.0); tmpl::for_each< Tags::characteristic_worldtube_boundary_tags<Tags::BoundaryValue>>( [&gh_boundary_box, &modal_boundary_box, &angular_derivative_approx](auto tag_v) { using tag = typename decltype(tag_v)::type; INFO(db::tag_name<tag>()); const auto& test_lhs = db::get<tag>(gh_boundary_box); const auto& test_rhs = db::get<tag>(modal_boundary_box); CHECK_ITERABLE_CUSTOM_APPROX(test_lhs, test_rhs, angular_derivative_approx); }); } // this tests that both execution pathways in Schwarzschild produce the expected // Bondi-like scalar quantities. template <typename Generator> void test_schwarzschild_solution(const gsl::not_null<Generator*> gen) noexcept { UniformCustomDistribution<double> value_dist{0.1, 0.5}; // first prepare the input for the modal version const double mass = value_dist(*gen); const std::array<double, 3> spin{{0.0, 0.0, 0.0}}; const std::array<double, 3> center{{0.0, 0.0, 0.0}}; gr::Solutions::KerrSchild solution{mass, spin, center}; const double extraction_radius = 100.0 * value_dist(*gen); UniformCustomDistribution<size_t> l_dist(10, 14); const size_t l_max = l_dist(*gen); const size_t number_of_angular_points = Spectral::Swsh::number_of_swsh_collocation_points(l_max); using boundary_variables_tag = ::Tags::Variables< Tags::characteristic_worldtube_boundary_tags<Tags::BoundaryValue>>; auto gh_boundary_box = db::create<db::AddSimpleTags<boundary_variables_tag>>( db::item_type<boundary_variables_tag>{number_of_angular_points}); auto modal_boundary_box = db::create<db::AddSimpleTags<boundary_variables_tag>>( db::item_type<boundary_variables_tag>{number_of_angular_points}); auto expected_box = db::create<db::AddSimpleTags<boundary_variables_tag>>( db::item_type<boundary_variables_tag>{number_of_angular_points, 0.0}); dispatch_to_gh_worldtube_computation_from_analytic( make_not_null(&gh_boundary_box), solution, extraction_radius, l_max); dispatch_to_modal_worldtube_computation_from_analytic( make_not_null(&modal_boundary_box), solution, extraction_radius, l_max); db::mutate<Tags::BoundaryValue<Tags::BondiW>, Tags::BoundaryValue<Tags::BondiR>>( make_not_null(&expected_box), [&extraction_radius, & mass ](const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> bondi_w, const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> bondi_r) noexcept { get(*bondi_r).data() = extraction_radius; get(*bondi_w).data() = -2.0 * mass / pow<2>(extraction_radius); }); // This can be tightened further with higher l_max above. Approx angular_derivative_approx = Approx::custom() .epsilon(std::numeric_limits<double>::epsilon() * 1.0e4) .scale(1.0); tmpl::for_each< Tags::characteristic_worldtube_boundary_tags<Tags::BoundaryValue>>( [&gh_boundary_box, &modal_boundary_box, &expected_box, &angular_derivative_approx](auto tag_v) { using tag = typename decltype(tag_v)::type; INFO(db::tag_name<tag>()); const auto& test_lhs_0 = db::get<tag>(gh_boundary_box); const auto& test_rhs_0 = db::get<tag>(expected_box); CHECK_ITERABLE_CUSTOM_APPROX(test_lhs_0, test_rhs_0, angular_derivative_approx); const auto& test_lhs_1 = db::get<tag>(modal_boundary_box); const auto& test_rhs_1 = db::get<tag>(expected_box); CHECK_ITERABLE_CUSTOM_APPROX(test_lhs_1, test_rhs_1, angular_derivative_approx); }); } } // namespace SPECTRE_TEST_CASE("Unit.Evolution.Systems.Cce.BoundaryData", "[Unit][Cce]") { pypp_test_worldtube_computation_steps(); MAKE_GENERATOR(gen); test_trigonometric_function_identities(make_not_null(&gen)); test_bondi_r(make_not_null(&gen)); test_d_bondi_r_identities(make_not_null(&gen)); test_dyad_identities(make_not_null(&gen)); test_kerr_schild_boundary_consistency(make_not_null(&gen)); test_schwarzschild_solution(make_not_null(&gen)); } } // namespace Cce
45.588889
80
0.695449
[ "vector" ]
e85b9a5281c50fbbe7375f3e15c64a4441bf3b4f
369
cpp
C++
examples/appearance/axes/axes_2.cpp
lpea/matplotplusplus
642f04b5bc2f7c7ec0f4b81c683bbd30bcbc4ed8
[ "MIT" ]
1
2022-03-22T11:09:19.000Z
2022-03-22T11:09:19.000Z
examples/appearance/axes/axes_2.cpp
lpea/matplotplusplus
642f04b5bc2f7c7ec0f4b81c683bbd30bcbc4ed8
[ "MIT" ]
null
null
null
examples/appearance/axes/axes_2.cpp
lpea/matplotplusplus
642f04b5bc2f7c7ec0f4b81c683bbd30bcbc4ed8
[ "MIT" ]
1
2022-03-22T11:46:39.000Z
2022-03-22T11:46:39.000Z
#include <iostream> #include <matplot/matplot.h> #include <set> #include <thread> #include <vector> int main() { using namespace matplot; auto ax1 = axes({0.1, 0.1, 0.7, 0.7}); auto ax2 = axes({0.65, 0.65, 0.28, 0.28}); auto [X, Y, Z] = peaks(20); contour(ax1, X, Y, Z); colorbar(ax1, off); surf(ax2, X, Y, Z); wait(); return 0; }
19.421053
46
0.555556
[ "vector" ]
e85c4a60db6b480216d07729eb05c507a15cb0b0
154
hpp
C++
drape_frontend/animation_utils.hpp
smartyw/organicmaps
9b10eb9d3ed6833861cef294c2416cc98b15e10d
[ "Apache-2.0" ]
4,879
2015-09-30T10:56:36.000Z
2022-03-31T18:43:03.000Z
drape_frontend/animation_utils.hpp
smartyw/organicmaps
9b10eb9d3ed6833861cef294c2416cc98b15e10d
[ "Apache-2.0" ]
7,549
2015-09-30T10:52:53.000Z
2022-03-31T22:04:22.000Z
drape_frontend/animation_utils.hpp
smartyw/organicmaps
9b10eb9d3ed6833861cef294c2416cc98b15e10d
[ "Apache-2.0" ]
1,493
2015-09-30T10:43:06.000Z
2022-03-21T09:16:49.000Z
#pragma once #include "geometry/screenbase.hpp" namespace df { bool IsAnimationAllowed(double duration, ScreenBase const & screen); } // namespace df
14
68
0.75974
[ "geometry" ]
e861c6a5fb9cf821803eb5aa7c94ab2711a10db1
1,881
hpp
C++
Flow3D/Flow3D/src/Flow3D/ResourceManager.hpp
florianvoelkers/Flow3D
017d2f321f943dfecc360bec9fc6f17c77ffde68
[ "MIT" ]
2
2020-05-09T10:06:00.000Z
2021-03-10T00:10:41.000Z
Flow3D/Flow3D/src/Flow3D/ResourceManager.hpp
florianvoelkers/Flow3D
017d2f321f943dfecc360bec9fc6f17c77ffde68
[ "MIT" ]
1
2022-03-04T09:17:15.000Z
2022-03-04T09:17:15.000Z
Flow3D/Flow3D/src/Flow3D/ResourceManager.hpp
florianvoelkers/Flow3D
017d2f321f943dfecc360bec9fc6f17c77ffde68
[ "MIT" ]
2
2020-02-17T00:43:03.000Z
2020-11-26T11:55:19.000Z
#pragma once #include "Rendering/Shader.hpp" #include "Rendering/Texture.hpp" #include "Rendering/Model.hpp" #include "Rendering/Skybox.hpp" enum class ResourceType { Shader, Texture, Model }; class ResourceManager { public: ResourceManager(); inline static ResourceManager& Get() { return *s_Instance; } void AddTexture(std::shared_ptr<Texture> texture) { textures.push_back(texture); } void RemoveTexture(int index) { textures.erase(textures.begin() + index); } std::shared_ptr<Texture> FindTexture(std::string path); void AddShader(std::shared_ptr<Shader> shader) { shaders.push_back(shader); } void RemoveShader(int index) { shaders.erase(shaders.begin() + index); } std::shared_ptr<Shader> FindShader(std::string name); void AddModel(std::shared_ptr<Model> model) { models.push_back(model); } void RemoveModel(int index) { models.erase(models.begin() + index); } std::shared_ptr<Model> FindModel(std::string path); void AddSkybox(std::shared_ptr<Skybox> skybox) { skyboxes.push_back(skybox); } void RemoveSkybox(int index) { skyboxes.erase(skyboxes.begin() + index); } std::shared_ptr<Skybox> FindSkybox(std::string name); void AddSceneName(std::string sceneName) { sceneNames.push_back(sceneName); } std::vector<std::shared_ptr<Texture>> GetAllTextures() { return textures; } std::vector<std::shared_ptr<Shader>> GetAllShaders() { return shaders; } std::vector<std::shared_ptr<Model>> GetAllModels() { return models; } std::vector<std::shared_ptr<Skybox>> GetAllSkyboxes() { return skyboxes; } std::vector<std::string> GetAllSceneNames() { return sceneNames; } private: static ResourceManager* s_Instance; std::vector<std::shared_ptr<Shader>> shaders; std::vector<std::shared_ptr<Texture>> textures; std::vector<std::shared_ptr<Model>> models; std::vector<std::shared_ptr<Skybox>> skyboxes; std::vector<std::string> sceneNames; };
36.173077
83
0.742158
[ "vector", "model" ]
e8663b6da16ef550c60a3fcfbdb37ffa5b9bad10
2,259
cpp
C++
Online Judges/UVA/10817/3690454_AC_1768ms_0kB.cpp
moni-roy/COPC
f5918304815413c18574ef4af2e23a604bd9f704
[ "MIT" ]
4
2017-02-20T17:41:14.000Z
2019-07-15T14:15:34.000Z
Online Judges/UVA/10817/3690454_AC_1768ms_0kB.cpp
moni-roy/COPC
f5918304815413c18574ef4af2e23a604bd9f704
[ "MIT" ]
null
null
null
Online Judges/UVA/10817/3690454_AC_1768ms_0kB.cpp
moni-roy/COPC
f5918304815413c18574ef4af2e23a604bd9f704
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long long unsigned llu; typedef double dl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef map<int,int> mii; typedef map<ll,ll> mll; typedef map<string,int> msi; typedef map<char,int> mci; #define PI acos(-1.0) #define S second #define F first #define PB push_back #define MP make_pair #define zero(a) memset(a,0,sizeof a) #define minus(a) memset(a,-1,sizeof a) #define setinf(a) memset(a,126,sizeof a) #define FR(i,x,y) for(int i=x;i<=y;i++) #define FRV(i,x,y) for(int i=x;i>=y;i--) #define all(v) (v.begin(),v.end()) #define vsort(v) sort(v.begin(),v.end()) #define nl puts("") #define tcase(cs) printf("Case %d:",++cs) #define endl '\n' #define I_O ios_base::sync_with_stdio(0); cin.tie(0); template <class T> inline T BMOD(T p,T e,T m){T ret=1;while(e){if(e&1) ret=(ret*p)%m;p=(p*p)%m;e>>=1;}return (T)ret;} template <class T> inline T MODINV(T a,T m){return BMOD(a,m-2,m);} int Set(int N,int pos){return N=N | (1<<pos);} int reset(int N,int pos){return N= N & ~(1<<pos);} bool check(int N,int pos){return (bool)(N & (1<<pos));} int sv[110][1<<18],nn,s,n,m,c[1001]; vi sb[110]; int fun(int p,int ms){ if(ms==(1<<nn)-1) return 0; if(p>m) return 10000000; int &ret=sv[p][ms]; if(ret!=-1) return ret; int tmp=ms; for(int i=0;i<(int)sb[p].size();i++){ int y=sb[p][i]; if(!check(tmp,y-1)){ tmp=Set(tmp,y-1); } else { tmp=Set(tmp,y+s-1); } } ret=min(fun(p+1,ms),c[p]+fun(p+1,tmp)); return ret; } int main() { int cost,mk,x; string ss; while(cin>>s>>n>>m) { if(s+n+m==0) break; mk=0; cost=0; for(int i=0;i<n;i++){ cin>>x; cost+=x; getline(cin,ss); stringstream sss; sss<<ss; while(sss>>x){ if(!check(mk,x-1)){ mk=Set(mk,x-1); } else mk=Set(mk,x+s-1); } } for(int i=0;i<m;i++){ cin>>x; c[i]=x; getline(cin,ss); stringstream sss; sss<<ss; while(sss>>x){ sb[i].PB(x); } } minus(sv); nn=s; nn*=2; cout<<cost+fun(0,mk)<<endl; for(int i=0;i<m;i++) sb[i].clear(); } return 0; } /* 2 2 2 10000 1 20000 2 30000 1 2 40000 1 2 * */
21.11215
117
0.565737
[ "vector" ]
e8679179dc1268c9cf40427d98ce89f3862ed732
35,215
cpp
C++
src/modules/graphics/opengl/OpenGL.cpp
stepmania/six
0922ce212e129a5404bf116b64bc2f6f076c53cb
[ "Zlib" ]
16
2017-01-05T16:45:20.000Z
2019-04-13T12:44:19.000Z
src/modules/graphics/opengl/OpenGL.cpp
stepmania/six
0922ce212e129a5404bf116b64bc2f6f076c53cb
[ "Zlib" ]
null
null
null
src/modules/graphics/opengl/OpenGL.cpp
stepmania/six
0922ce212e129a5404bf116b64bc2f6f076c53cb
[ "Zlib" ]
3
2017-01-05T18:52:59.000Z
2020-02-12T09:58:53.000Z
/** * Copyright (c) 2006-2017 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // LOVE #include "common/config.h" #include "OpenGL.h" #include "Shader.h" #include "common/Exception.h" #include "graphics/Graphics.h" // C++ #include <algorithm> #include <limits> // C #include <cstring> #include <cstdio> // For SDL_GL_GetProcAddress. #include <SDL_video.h> #ifdef LOVE_IOS #include <SDL_syswm.h> #endif #ifdef LOVE_ANDROID #include <dlfcn.h> #endif namespace love { namespace graphics { namespace opengl { static void *LOVEGetProcAddress(const char *name) { #ifdef LOVE_ANDROID void *proc = dlsym(RTLD_DEFAULT, name); if (proc) return proc; #endif return SDL_GL_GetProcAddress(name); } OpenGL::OpenGL() : stats() , contextInitialized(false) , pixelShaderHighpSupported(false) , maxAnisotropy(1.0f) , maxTextureSize(0) , maxRenderTargets(1) , maxRenderbufferSamples(0) , maxTextureUnits(1) , vendor(VENDOR_UNKNOWN) , state() { state.constantColor = Colorf(1.0f, 1.0f, 1.0f, 1.0f); float nan = std::numeric_limits<float>::quiet_NaN(); state.lastConstantColor = Colorf(nan, nan, nan, nan); } bool OpenGL::initContext() { if (contextInitialized) return true; if (!gladLoadGLLoader(LOVEGetProcAddress)) return false; initOpenGLFunctions(); initVendor(); bugs = {}; #if defined(LOVE_WINDOWS) || defined(LOVE_LINUX) // See the comments in OpenGL.h. if (getVendor() == VENDOR_AMD) { bugs.clearRequiresDriverTextureStateUpdate = true; bugs.generateMipmapsRequiresTexture2DEnable = true; } #endif contextInitialized = true; return true; } void OpenGL::setupContext() { if (!contextInitialized) return; initMaxValues(); GLfloat glcolor[4] = {1.0f, 1.0f, 1.0f, 1.0f}; glVertexAttrib4fv(ATTRIB_COLOR, glcolor); glVertexAttrib4fv(ATTRIB_CONSTANTCOLOR, glcolor); GLint maxvertexattribs = 1; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxvertexattribs); state.enabledAttribArrays = (uint32) ((1ull << uint32(maxvertexattribs)) - 1); useVertexAttribArrays(0); // Get the current viewport. glGetIntegerv(GL_VIEWPORT, (GLint *) &state.viewport.x); // And the current scissor - but we need to compensate for GL scissors // starting at the bottom left instead of top left. glGetIntegerv(GL_SCISSOR_BOX, (GLint *) &state.scissor.x); state.scissor.y = state.viewport.h - (state.scissor.y + state.scissor.h); if (GLAD_VERSION_1_0) glGetFloatv(GL_POINT_SIZE, &state.pointSize); else state.pointSize = 1.0f; for (int i = 0; i < 2; i++) state.boundFramebuffers[i] = std::numeric_limits<GLuint>::max(); bindFramebuffer(FRAMEBUFFER_ALL, getDefaultFBO()); if (GLAD_VERSION_3_0 || GLAD_ARB_framebuffer_sRGB || GLAD_EXT_framebuffer_sRGB || GLAD_EXT_sRGB_write_control) { state.framebufferSRGBEnabled = (glIsEnabled(GL_FRAMEBUFFER_SRGB) == GL_TRUE); } else state.framebufferSRGBEnabled = false; for (int i = 0; i < (int) BUFFER_MAX_ENUM; i++) { state.boundBuffers[i] = 0; glBindBuffer(getGLBufferType((BufferType) i), 0); } // Initialize multiple texture unit support for shaders. state.boundTextures.clear(); state.boundTextures.resize(maxTextureUnits, 0); for (int i = 0; i < (int) state.boundTextures.size(); i++) { glActiveTexture(GL_TEXTURE0 + i); glBindTexture(GL_TEXTURE_2D, 0); } glActiveTexture(GL_TEXTURE0); state.curTextureUnit = 0; createDefaultTexture(); contextInitialized = true; } void OpenGL::deInitContext() { if (!contextInitialized) return; glDeleteTextures(1, &state.defaultTexture); state.defaultTexture = 0; contextInitialized = false; } void OpenGL::initVendor() { const char *vstr = (const char *) glGetString(GL_VENDOR); if (!vstr) { vendor = VENDOR_UNKNOWN; return; } // http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR // http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices if (strstr(vstr, "ATI Technologies")) vendor = VENDOR_AMD; else if (strstr(vstr, "NVIDIA")) vendor = VENDOR_NVIDIA; else if (strstr(vstr, "Intel")) vendor = VENDOR_INTEL; else if (strstr(vstr, "Mesa")) vendor = VENDOR_MESA_SOFT; else if (strstr(vstr, "Apple Computer") || strstr(vstr, "Apple Inc.")) vendor = VENDOR_APPLE; else if (strstr(vstr, "Microsoft")) vendor = VENDOR_MICROSOFT; else if (strstr(vstr, "Imagination")) vendor = VENDOR_IMGTEC; else if (strstr(vstr, "ARM")) vendor = VENDOR_ARM; else if (strstr(vstr, "Qualcomm")) vendor = VENDOR_QUALCOMM; else if (strstr(vstr, "Broadcom")) vendor = VENDOR_BROADCOM; else if (strstr(vstr, "Vivante")) vendor = VENDOR_VIVANTE; else vendor = VENDOR_UNKNOWN; } void OpenGL::initOpenGLFunctions() { // Alias extension-suffixed framebuffer functions to core versions since // there are so many different-named extensions that do the same things... if (!(GLAD_ES_VERSION_3_0 || GLAD_VERSION_3_0 || GLAD_ARB_framebuffer_object)) { if (GLAD_VERSION_1_0 && GLAD_EXT_framebuffer_object) { fp_glBindRenderbuffer = fp_glBindRenderbufferEXT; fp_glDeleteRenderbuffers = fp_glDeleteRenderbuffersEXT; fp_glGenRenderbuffers = fp_glGenRenderbuffersEXT; fp_glRenderbufferStorage = fp_glRenderbufferStorageEXT; fp_glGetRenderbufferParameteriv = fp_glGetRenderbufferParameterivEXT; fp_glBindFramebuffer = fp_glBindFramebufferEXT; fp_glDeleteFramebuffers = fp_glDeleteFramebuffersEXT; fp_glGenFramebuffers = fp_glGenFramebuffersEXT; fp_glCheckFramebufferStatus = fp_glCheckFramebufferStatusEXT; fp_glFramebufferTexture2D = fp_glFramebufferTexture2DEXT; fp_glFramebufferRenderbuffer = fp_glFramebufferRenderbufferEXT; fp_glGetFramebufferAttachmentParameteriv = fp_glGetFramebufferAttachmentParameterivEXT; fp_glGenerateMipmap = fp_glGenerateMipmapEXT; } if (GLAD_EXT_framebuffer_blit) fp_glBlitFramebuffer = fp_glBlitFramebufferEXT; else if (GLAD_ANGLE_framebuffer_blit) fp_glBlitFramebuffer = fp_glBlitFramebufferANGLE; else if (GLAD_NV_framebuffer_blit) fp_glBlitFramebuffer = fp_glBlitFramebufferNV; if (GLAD_EXT_framebuffer_multisample) fp_glRenderbufferStorageMultisample = fp_glRenderbufferStorageMultisampleEXT; else if (GLAD_APPLE_framebuffer_multisample) fp_glRenderbufferStorageMultisample = fp_glRenderbufferStorageMultisampleAPPLE; else if (GLAD_ANGLE_framebuffer_multisample) fp_glRenderbufferStorageMultisample = fp_glRenderbufferStorageMultisampleANGLE; else if (GLAD_NV_framebuffer_multisample) fp_glRenderbufferStorageMultisample = fp_glRenderbufferStorageMultisampleNV; } } void OpenGL::initMaxValues() { if (GLAD_ES_VERSION_2_0 && !GLAD_ES_VERSION_3_0) { GLint range = 0; GLint precision = 0; glGetShaderPrecisionFormat(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT, &range, &precision); pixelShaderHighpSupported = range > 0; } else pixelShaderHighpSupported = true; // We'll need this value to clamp anisotropy. if (GLAD_EXT_texture_filter_anisotropic) glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy); else maxAnisotropy = 1.0f; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); int maxattachments = 1; int maxdrawbuffers = 1; if (GLAD_ES_VERSION_3_0 || GLAD_VERSION_2_0) { glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &maxattachments); glGetIntegerv(GL_MAX_DRAW_BUFFERS, &maxdrawbuffers); } maxRenderTargets = std::max(std::min(maxattachments, maxdrawbuffers), 1); if (GLAD_ES_VERSION_3_0 || GLAD_VERSION_3_0 || GLAD_ARB_framebuffer_object || GLAD_EXT_framebuffer_multisample || GLAD_APPLE_framebuffer_multisample || GLAD_ANGLE_framebuffer_multisample) { glGetIntegerv(GL_MAX_SAMPLES, &maxRenderbufferSamples); } else maxRenderbufferSamples = 0; glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits); GLfloat limits[2]; glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, limits); maxPointSize = limits[1]; } void OpenGL::createDefaultTexture() { // Set the 'default' texture (id 0) as a repeating white pixel. Otherwise, // texture2D calls inside a shader would return black when drawing graphics // primitives, which would create the need to use different "passthrough" // shaders for untextured primitives vs images. GLuint curtexture = state.boundTextures[state.curTextureUnit]; glGenTextures(1, &state.defaultTexture); bindTextureToUnit(state.defaultTexture, 0, false); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); GLubyte pix[] = {255, 255, 255, 255}; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix); bindTextureToUnit(curtexture, 0, false); } void OpenGL::prepareDraw() { TempDebugGroup debuggroup("Prepare OpenGL draw"); // Make sure the active shader's love-provided uniforms are up to date. if (Shader::current != nullptr) ((Shader *)Shader::current)->updateBuiltinUniforms(); if (state.constantColor != state.lastConstantColor) { state.lastConstantColor = state.constantColor; Colorf c = state.constantColor; gammaCorrectColor(c); glVertexAttrib4f(ATTRIB_CONSTANTCOLOR, c.r, c.g, c.b, c.a); } } GLenum OpenGL::getGLBufferType(BufferType type) { switch (type) { case BUFFER_VERTEX: return GL_ARRAY_BUFFER; case BUFFER_INDEX: return GL_ELEMENT_ARRAY_BUFFER; case BUFFER_MAX_ENUM: return GL_ZERO; } } GLenum OpenGL::getGLBufferUsage(vertex::Usage usage) { switch (usage) { case vertex::USAGE_STREAM: return GL_STREAM_DRAW; case vertex::USAGE_DYNAMIC: return GL_DYNAMIC_DRAW; case vertex::USAGE_STATIC: return GL_STATIC_DRAW; default: return 0; } } void OpenGL::bindBuffer(BufferType type, GLuint buffer) { if (state.boundBuffers[type] != buffer) { glBindBuffer(getGLBufferType(type), buffer); state.boundBuffers[type] = buffer; } } void OpenGL::deleteBuffer(GLuint buffer) { glDeleteBuffers(1, &buffer); for (int i = 0; i < (int) BUFFER_MAX_ENUM; i++) { if (state.boundBuffers[i] == buffer) state.boundBuffers[i] = 0; } } void OpenGL::drawArrays(GLenum mode, GLint first, GLsizei count) { glDrawArrays(mode, first, count); ++stats.drawCalls; } void OpenGL::drawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) { glDrawElements(mode, count, type, indices); ++stats.drawCalls; } void OpenGL::useVertexAttribArrays(uint32 arraybits) { uint32 diff = arraybits ^ state.enabledAttribArrays; if (diff == 0) return; // Max 32 attributes. As of when this was written, no GL driver exposes more // than 32. Lets hope that doesn't change... for (uint32 i = 0; i < 32; i++) { uint32 bit = 1u << i; if (diff & bit) { if (arraybits & bit) glEnableVertexAttribArray(i); else glDisableVertexAttribArray(i); } } state.enabledAttribArrays = arraybits; // glDisableVertexAttribArray will make the constant value for a vertex // attribute undefined. We rely on the per-vertex color attribute being // white when no per-vertex color is used, so we set it here. // FIXME: Is there a better place to do this? if ((diff & ATTRIBFLAG_COLOR) && !(arraybits & ATTRIBFLAG_COLOR)) glVertexAttrib4f(ATTRIB_COLOR, 1.0f, 1.0f, 1.0f, 1.0f); } void OpenGL::setViewport(const Rect &v) { glViewport(v.x, v.y, v.w, v.h); state.viewport = v; } Rect OpenGL::getViewport() const { return state.viewport; } void OpenGL::setScissor(const Rect &v, bool canvasActive) { if (canvasActive) glScissor(v.x, v.y, v.w, v.h); else { // With no Canvas active, we need to compensate for glScissor starting // from the lower left of the viewport instead of the top left. glScissor(v.x, state.viewport.h - (v.y + v.h), v.w, v.h); } state.scissor = v; } void OpenGL::setConstantColor(const Colorf &color) { state.constantColor = color; } const Colorf &OpenGL::getConstantColor() const { return state.constantColor; } void OpenGL::setPointSize(float size) { if (GLAD_VERSION_1_0) glPointSize(size); state.pointSize = size; } float OpenGL::getPointSize() const { return state.pointSize; } void OpenGL::setFramebufferSRGB(bool enable) { if (enable) glEnable(GL_FRAMEBUFFER_SRGB); else glDisable(GL_FRAMEBUFFER_SRGB); state.framebufferSRGBEnabled = enable; } bool OpenGL::hasFramebufferSRGB() const { return state.framebufferSRGBEnabled; } void OpenGL::bindFramebuffer(FramebufferTarget target, GLuint framebuffer) { bool bindingmodified = false; if ((target & FRAMEBUFFER_DRAW) && state.boundFramebuffers[0] != framebuffer) { bindingmodified = true; state.boundFramebuffers[0] = framebuffer; } if ((target & FRAMEBUFFER_READ) && state.boundFramebuffers[1] != framebuffer) { bindingmodified = true; state.boundFramebuffers[1] = framebuffer; } if (bindingmodified) { GLenum gltarget = GL_FRAMEBUFFER; if (target == FRAMEBUFFER_DRAW) gltarget = GL_DRAW_FRAMEBUFFER; else if (target == FRAMEBUFFER_READ) gltarget = GL_READ_FRAMEBUFFER; glBindFramebuffer(gltarget, framebuffer); } } GLenum OpenGL::getFramebuffer(FramebufferTarget target) const { if (target & FRAMEBUFFER_DRAW) return state.boundFramebuffers[0]; else if (target & FRAMEBUFFER_READ) return state.boundFramebuffers[1]; else return 0; } void OpenGL::deleteFramebuffer(GLuint framebuffer) { glDeleteFramebuffers(1, &framebuffer); for (int i = 0; i < 2; i++) { if (state.boundFramebuffers[i] == framebuffer) state.boundFramebuffers[i] = 0; } } void OpenGL::useProgram(GLuint program) { glUseProgram(program); ++stats.shaderSwitches; } GLuint OpenGL::getDefaultFBO() const { #ifdef LOVE_IOS // Hack: iOS uses a custom FBO. SDL_SysWMinfo info = {}; SDL_VERSION(&info.version); SDL_GetWindowWMInfo(SDL_GL_GetCurrentWindow(), &info); return info.info.uikit.framebuffer; #else return 0; #endif } GLuint OpenGL::getDefaultTexture() const { return state.defaultTexture; } void OpenGL::setTextureUnit(int textureunit) { if (textureunit != state.curTextureUnit) glActiveTexture(GL_TEXTURE0 + textureunit); state.curTextureUnit = textureunit; } void OpenGL::bindTextureToUnit(GLuint texture, int textureunit, bool restoreprev) { if (texture != state.boundTextures[textureunit]) { int oldtextureunit = state.curTextureUnit; if (oldtextureunit != textureunit) glActiveTexture(GL_TEXTURE0 + textureunit); state.boundTextures[textureunit] = texture; glBindTexture(GL_TEXTURE_2D, texture); if (restoreprev && oldtextureunit != textureunit) glActiveTexture(GL_TEXTURE0 + oldtextureunit); else state.curTextureUnit = textureunit; } } void OpenGL::bindTextureToUnit(Texture *texture, int textureunit, bool restoreprev) { GLuint handle = texture != nullptr ? (GLuint) texture->getHandle() : getDefaultTexture(); bindTextureToUnit(handle, textureunit, restoreprev); } void OpenGL::deleteTexture(GLuint texture) { // glDeleteTextures binds texture 0 to all texture units the deleted texture // was bound to before deletion. for (GLuint &texid : state.boundTextures) { if (texid == texture) texid = 0; } glDeleteTextures(1, &texture); } void OpenGL::setTextureFilter(graphics::Texture::Filter &f) { GLint gmin, gmag; if (f.mipmap == Texture::FILTER_NONE) { if (f.min == Texture::FILTER_NEAREST) gmin = GL_NEAREST; else // f.min == Texture::FILTER_LINEAR gmin = GL_LINEAR; } else { if (f.min == Texture::FILTER_NEAREST && f.mipmap == Texture::FILTER_NEAREST) gmin = GL_NEAREST_MIPMAP_NEAREST; else if (f.min == Texture::FILTER_NEAREST && f.mipmap == Texture::FILTER_LINEAR) gmin = GL_NEAREST_MIPMAP_LINEAR; else if (f.min == Texture::FILTER_LINEAR && f.mipmap == Texture::FILTER_NEAREST) gmin = GL_LINEAR_MIPMAP_NEAREST; else if (f.min == Texture::FILTER_LINEAR && f.mipmap == Texture::FILTER_LINEAR) gmin = GL_LINEAR_MIPMAP_LINEAR; else gmin = GL_LINEAR; } switch (f.mag) { case Texture::FILTER_NEAREST: gmag = GL_NEAREST; break; case Texture::FILTER_LINEAR: default: gmag = GL_LINEAR; break; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gmin); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gmag); if (GLAD_EXT_texture_filter_anisotropic) { f.anisotropy = std::min(std::max(f.anisotropy, 1.0f), maxAnisotropy); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, f.anisotropy); } else f.anisotropy = 1.0f; } GLint OpenGL::getGLWrapMode(Texture::WrapMode wmode) { switch (wmode) { case Texture::WRAP_CLAMP: default: return GL_CLAMP_TO_EDGE; case Texture::WRAP_CLAMP_ZERO: return GL_CLAMP_TO_BORDER; case Texture::WRAP_REPEAT: return GL_REPEAT; case Texture::WRAP_MIRRORED_REPEAT: return GL_MIRRORED_REPEAT; } } void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, getGLWrapMode(w.s)); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, getGLWrapMode(w.t)); } bool OpenGL::isClampZeroTextureWrapSupported() const { return GLAD_VERSION_1_3 || GLAD_EXT_texture_border_clamp || GLAD_NV_texture_border_clamp; } bool OpenGL::isPixelShaderHighpSupported() const { return pixelShaderHighpSupported; } int OpenGL::getMaxTextureSize() const { return maxTextureSize; } int OpenGL::getMaxRenderTargets() const { return std::min(maxRenderTargets, MAX_COLOR_RENDER_TARGETS); } int OpenGL::getMaxRenderbufferSamples() const { return maxRenderbufferSamples; } int OpenGL::getMaxTextureUnits() const { return maxTextureUnits; } float OpenGL::getMaxPointSize() const { return maxPointSize; } float OpenGL::getMaxAnisotropy() const { return maxAnisotropy; } void OpenGL::updateTextureMemorySize(size_t oldsize, size_t newsize) { int64 memsize = (int64) stats.textureMemory + ((int64) newsize - (int64) oldsize); stats.textureMemory = (size_t) std::max(memsize, (int64) 0); } OpenGL::Vendor OpenGL::getVendor() const { return vendor; } OpenGL::TextureFormat OpenGL::convertPixelFormat(PixelFormat pixelformat, bool renderbuffer, bool &isSRGB) { TextureFormat f; if (pixelformat == PIXELFORMAT_RGBA8 && isSRGB) pixelformat = PIXELFORMAT_sRGBA8; else if (pixelformat == PIXELFORMAT_ETC1) { // The ETC2 format can load ETC1 textures. if (GLAD_ES_VERSION_3_0 || GLAD_VERSION_4_3 || GLAD_ARB_ES3_compatibility) pixelformat = PIXELFORMAT_ETC2_RGB; } switch (pixelformat) { case PIXELFORMAT_R8: if (GLAD_VERSION_3_0 || GLAD_ES_VERSION_3_0 || GLAD_ARB_texture_rg || GLAD_EXT_texture_rg) { f.internalformat = GL_R8; f.externalformat = GL_RED; } else { f.internalformat = GL_LUMINANCE8; f.externalformat = GL_LUMINANCE; } f.type = GL_UNSIGNED_BYTE; break; case PIXELFORMAT_RG8: f.internalformat = GL_RG8; f.externalformat = GL_RG; f.type = GL_UNSIGNED_BYTE; break; case PIXELFORMAT_RGBA8: f.internalformat = GL_RGBA8; f.externalformat = GL_RGBA; f.type = GL_UNSIGNED_BYTE; break; case PIXELFORMAT_sRGBA8: f.internalformat = GL_SRGB8_ALPHA8; f.type = GL_UNSIGNED_BYTE; if (GLAD_ES_VERSION_2_0 && !GLAD_ES_VERSION_3_0) f.externalformat = GL_SRGB_ALPHA; else f.externalformat = GL_RGBA; break; case PIXELFORMAT_R16: f.internalformat = GL_R16; f.externalformat = GL_RED; f.type = GL_UNSIGNED_SHORT; break; case PIXELFORMAT_RG16: f.internalformat = GL_RG16; f.externalformat = GL_RG; f.type = GL_UNSIGNED_SHORT; break; case PIXELFORMAT_RGBA16: f.internalformat = GL_RGBA16; f.externalformat = GL_RGBA; f.type = GL_UNSIGNED_SHORT; break; case PIXELFORMAT_R16F: f.internalformat = GL_R16F; f.externalformat = GL_RED; if (GLAD_OES_texture_half_float) f.type = GL_HALF_FLOAT_OES; else f.type = GL_HALF_FLOAT; break; case PIXELFORMAT_RG16F: f.internalformat = GL_RG16F; f.externalformat = GL_RG; if (GLAD_OES_texture_half_float) f.type = GL_HALF_FLOAT_OES; else f.type = GL_HALF_FLOAT; break; case PIXELFORMAT_RGBA16F: f.internalformat = GL_RGBA16F; f.externalformat = GL_RGBA; if (GLAD_OES_texture_half_float) f.type = GL_HALF_FLOAT_OES; else f.type = GL_HALF_FLOAT; break; case PIXELFORMAT_R32F: f.internalformat = GL_R32F; f.externalformat = GL_RED; f.type = GL_FLOAT; break; case PIXELFORMAT_RG32F: f.internalformat = GL_RG32F; f.externalformat = GL_RG; f.type = GL_FLOAT; break; case PIXELFORMAT_RGBA32F: f.internalformat = GL_RGBA32F; f.externalformat = GL_RGBA; f.type = GL_FLOAT; break; case PIXELFORMAT_LA8: f.internalformat = GL_LUMINANCE8_ALPHA8; f.externalformat = GL_LUMINANCE_ALPHA; f.type = GL_UNSIGNED_BYTE; break; case PIXELFORMAT_RGBA4: f.internalformat = GL_RGBA4; f.externalformat = GL_RGBA; f.type = GL_UNSIGNED_SHORT_4_4_4_4; break; case PIXELFORMAT_RGB5A1: f.internalformat = GL_RGB5_A1; f.externalformat = GL_RGBA; f.type = GL_UNSIGNED_SHORT_5_5_5_1; break; case PIXELFORMAT_RGB565: f.internalformat = GL_RGB565; f.externalformat = GL_RGB; f.type = GL_UNSIGNED_SHORT_5_6_5; break; case PIXELFORMAT_RGB10A2: f.internalformat = GL_RGB10_A2; f.externalformat = GL_RGBA; f.type = GL_UNSIGNED_INT_2_10_10_10_REV; break; case PIXELFORMAT_RG11B10F: f.internalformat = GL_R11F_G11F_B10F; f.externalformat = GL_RGB; f.type = GL_UNSIGNED_INT_10F_11F_11F_REV; break; case PIXELFORMAT_DXT1: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_S3TC_DXT1_EXT : GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break; case PIXELFORMAT_DXT3: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT : GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break; case PIXELFORMAT_DXT5: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT : GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break; case PIXELFORMAT_BC4: isSRGB = false; f.internalformat = GL_COMPRESSED_RED_RGTC1; break; case PIXELFORMAT_BC4s: isSRGB = false; f.internalformat = GL_COMPRESSED_SIGNED_RED_RGTC1; break; case PIXELFORMAT_BC5: isSRGB = false; f.internalformat = GL_COMPRESSED_RG_RGTC2; break; case PIXELFORMAT_BC5s: isSRGB = false; f.internalformat = GL_COMPRESSED_SIGNED_RG_RGTC2; break; case PIXELFORMAT_BC6H: isSRGB = false; f.internalformat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT; break; case PIXELFORMAT_BC6Hs: isSRGB = false; f.internalformat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT; break; case PIXELFORMAT_BC7: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM : GL_COMPRESSED_RGBA_BPTC_UNORM; break; case PIXELFORMAT_PVR1_RGB2: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT : GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; break; case PIXELFORMAT_PVR1_RGB4: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT : GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; break; case PIXELFORMAT_PVR1_RGBA2: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT : GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; break; case PIXELFORMAT_PVR1_RGBA4: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT : GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; break; case PIXELFORMAT_ETC1: isSRGB = false; f.internalformat = GL_ETC1_RGB8_OES; break; case PIXELFORMAT_ETC2_RGB: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ETC2 : GL_COMPRESSED_RGB8_ETC2; break; case PIXELFORMAT_ETC2_RGBA: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : GL_COMPRESSED_RGBA8_ETC2_EAC; break; case PIXELFORMAT_ETC2_RGBA1: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2; break; case PIXELFORMAT_EAC_R: isSRGB = false; f.internalformat = GL_COMPRESSED_R11_EAC; break; case PIXELFORMAT_EAC_Rs: isSRGB = false; f.internalformat = GL_COMPRESSED_SIGNED_R11_EAC; break; case PIXELFORMAT_EAC_RG: isSRGB = false; f.internalformat = GL_COMPRESSED_RG11_EAC; break; case PIXELFORMAT_EAC_RGs: isSRGB = false; f.internalformat = GL_COMPRESSED_SIGNED_RG11_EAC; break; case PIXELFORMAT_ASTC_4x4: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : GL_COMPRESSED_RGBA_ASTC_4x4_KHR; break; case PIXELFORMAT_ASTC_5x4: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : GL_COMPRESSED_RGBA_ASTC_5x4_KHR; break; case PIXELFORMAT_ASTC_5x5: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : GL_COMPRESSED_RGBA_ASTC_5x5_KHR; break; case PIXELFORMAT_ASTC_6x5: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : GL_COMPRESSED_RGBA_ASTC_6x5_KHR; break; case PIXELFORMAT_ASTC_6x6: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : GL_COMPRESSED_RGBA_ASTC_6x6_KHR; break; case PIXELFORMAT_ASTC_8x5: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : GL_COMPRESSED_RGBA_ASTC_8x5_KHR; break; case PIXELFORMAT_ASTC_8x6: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : GL_COMPRESSED_RGBA_ASTC_8x6_KHR; break; case PIXELFORMAT_ASTC_8x8: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : GL_COMPRESSED_RGBA_ASTC_8x8_KHR; break; case PIXELFORMAT_ASTC_10x5: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : GL_COMPRESSED_RGBA_ASTC_10x5_KHR; break; case PIXELFORMAT_ASTC_10x6: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : GL_COMPRESSED_RGBA_ASTC_10x6_KHR; break; case PIXELFORMAT_ASTC_10x8: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : GL_COMPRESSED_RGBA_ASTC_10x8_KHR; break; case PIXELFORMAT_ASTC_10x10: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : GL_COMPRESSED_RGBA_ASTC_10x10_KHR; break; case PIXELFORMAT_ASTC_12x10: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : GL_COMPRESSED_RGBA_ASTC_12x10_KHR; break; case PIXELFORMAT_ASTC_12x12: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : GL_COMPRESSED_RGBA_ASTC_12x12_KHR; break; default: printf("Unhandled pixel format when converting to OpenGL enums!"); break; } if (!isPixelFormatCompressed(pixelformat)) { if (GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 && pixelformat != PIXELFORMAT_LA8) && !renderbuffer) { f.internalformat = f.externalformat; } if (pixelformat != PIXELFORMAT_sRGBA8) isSRGB = false; } return f; } bool OpenGL::isPixelFormatSupported(PixelFormat pixelformat, bool rendertarget, bool isSRGB) { if (rendertarget && isPixelFormatCompressed(pixelformat)) return false; if (pixelformat == PIXELFORMAT_RGBA8 && isSRGB) pixelformat = PIXELFORMAT_sRGBA8; switch (pixelformat) { case PIXELFORMAT_R8: case PIXELFORMAT_RG8: if (GLAD_VERSION_3_0 || GLAD_ES_VERSION_3_0 || GLAD_ARB_texture_rg || GLAD_EXT_texture_rg) return true; else if (pixelformat == PIXELFORMAT_R8 && !rendertarget && (GLAD_ES_VERSION_2_0 || GLAD_VERSION_1_1)) return true; // We'll use OpenGL's luminance format internally. else return false; case PIXELFORMAT_RGBA8: if (rendertarget) return GLAD_VERSION_1_0 || GLAD_ES_VERSION_3_0 || GLAD_OES_rgb8_rgba8 || GLAD_ARM_rgba8; else return true; case PIXELFORMAT_sRGBA8: if (rendertarget) { if (GLAD_VERSION_1_0) { return GLAD_VERSION_3_0 || ((GLAD_ARB_framebuffer_sRGB || GLAD_EXT_framebuffer_sRGB) && (GLAD_VERSION_2_1 || GLAD_EXT_texture_sRGB)); } else return GLAD_ES_VERSION_3_0 || GLAD_EXT_sRGB; } else return GLAD_ES_VERSION_3_0 || GLAD_EXT_sRGB || GLAD_VERSION_2_1 || GLAD_EXT_texture_sRGB; case PIXELFORMAT_R16: case PIXELFORMAT_RG16: if (rendertarget) return false; else return (GLAD_VERSION_1_1 && GLAD_EXT_texture_rg) || (GLAD_EXT_texture_norm16 && (GLAD_ES_VERSION_3_0 || GLAD_EXT_texture_rg)); case PIXELFORMAT_RGBA16: if (rendertarget) return false; else return GLAD_VERSION_1_1 || GLAD_EXT_texture_norm16; case PIXELFORMAT_R16F: case PIXELFORMAT_RG16F: if (GLAD_VERSION_1_0) return GLAD_VERSION_3_0 || (GLAD_ARB_texture_float && GLAD_ARB_half_float_pixel && GLAD_ARB_texture_rg); else if (rendertarget && !GLAD_EXT_color_buffer_half_float) return false; else return GLAD_ES_VERSION_3_0 || (GLAD_OES_texture_half_float && GLAD_EXT_texture_rg); case PIXELFORMAT_RGBA16F: if (GLAD_VERSION_1_0) return GLAD_VERSION_3_0 || (GLAD_ARB_texture_float && GLAD_ARB_half_float_pixel); else if (rendertarget && !GLAD_EXT_color_buffer_half_float) return false; else return GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float; case PIXELFORMAT_R32F: case PIXELFORMAT_RG32F: if (GLAD_VERSION_1_0) return GLAD_VERSION_3_0 || (GLAD_ARB_texture_float && GLAD_ARB_texture_rg); else if (!rendertarget) return GLAD_ES_VERSION_3_0 || (GLAD_OES_texture_float && GLAD_EXT_texture_rg); else return false; case PIXELFORMAT_RGBA32F: if (GLAD_VERSION_1_0) return GLAD_VERSION_3_0 || GLAD_ARB_texture_float; else if (!rendertarget) return GLAD_ES_VERSION_3_0 || GLAD_OES_texture_float; else return false; case PIXELFORMAT_LA8: return !rendertarget; case PIXELFORMAT_RGBA4: case PIXELFORMAT_RGB5A1: return true; case PIXELFORMAT_RGB565: return GLAD_ES_VERSION_2_0 || GLAD_VERSION_4_2 || GLAD_ARB_ES2_compatibility; case PIXELFORMAT_RGB10A2: return GLAD_ES_VERSION_3_0 || GLAD_VERSION_1_0; case PIXELFORMAT_RG11B10F: if (rendertarget) return GLAD_VERSION_3_0 || GLAD_EXT_packed_float || GLAD_APPLE_color_buffer_packed_float; else return GLAD_VERSION_3_0 || GLAD_EXT_packed_float || GLAD_APPLE_texture_packed_float; case PIXELFORMAT_DXT1: return GLAD_EXT_texture_compression_s3tc || GLAD_EXT_texture_compression_dxt1; case PIXELFORMAT_DXT3: return GLAD_EXT_texture_compression_s3tc || GLAD_ANGLE_texture_compression_dxt3; case PIXELFORMAT_DXT5: return GLAD_EXT_texture_compression_s3tc || GLAD_ANGLE_texture_compression_dxt5; case PIXELFORMAT_BC4: case PIXELFORMAT_BC4s: case PIXELFORMAT_BC5: case PIXELFORMAT_BC5s: return (GLAD_VERSION_3_0 || GLAD_ARB_texture_compression_rgtc || GLAD_EXT_texture_compression_rgtc); case PIXELFORMAT_BC6H: case PIXELFORMAT_BC6Hs: case PIXELFORMAT_BC7: return GLAD_VERSION_4_2 || GLAD_ARB_texture_compression_bptc; case PIXELFORMAT_PVR1_RGB2: case PIXELFORMAT_PVR1_RGB4: case PIXELFORMAT_PVR1_RGBA2: case PIXELFORMAT_PVR1_RGBA4: return isSRGB ? GLAD_EXT_pvrtc_sRGB : GLAD_IMG_texture_compression_pvrtc; case PIXELFORMAT_ETC1: // ETC2 support guarantees ETC1 support as well. return GLAD_ES_VERSION_3_0 || GLAD_VERSION_4_3 || GLAD_ARB_ES3_compatibility || GLAD_OES_compressed_ETC1_RGB8_texture; case PIXELFORMAT_ETC2_RGB: case PIXELFORMAT_ETC2_RGBA: case PIXELFORMAT_ETC2_RGBA1: case PIXELFORMAT_EAC_R: case PIXELFORMAT_EAC_Rs: case PIXELFORMAT_EAC_RG: case PIXELFORMAT_EAC_RGs: return GLAD_ES_VERSION_3_0 || GLAD_VERSION_4_3 || GLAD_ARB_ES3_compatibility; case PIXELFORMAT_ASTC_4x4: case PIXELFORMAT_ASTC_5x4: case PIXELFORMAT_ASTC_5x5: case PIXELFORMAT_ASTC_6x5: case PIXELFORMAT_ASTC_6x6: case PIXELFORMAT_ASTC_8x5: case PIXELFORMAT_ASTC_8x6: case PIXELFORMAT_ASTC_8x8: case PIXELFORMAT_ASTC_10x5: case PIXELFORMAT_ASTC_10x6: case PIXELFORMAT_ASTC_10x8: case PIXELFORMAT_ASTC_10x10: case PIXELFORMAT_ASTC_12x10: case PIXELFORMAT_ASTC_12x12: return GLAD_ES_VERSION_3_2 || GLAD_KHR_texture_compression_astc_ldr; default: return false; } } bool OpenGL::hasTextureFilteringSupport(PixelFormat pixelformat) { switch (pixelformat) { case PIXELFORMAT_RGBA16F: return GLAD_VERSION_1_1 || GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float_linear; case PIXELFORMAT_RGBA32F: return GLAD_VERSION_1_1; default: return true; } } const char *OpenGL::errorString(GLenum errorcode) { switch (errorcode) { case GL_NO_ERROR: return "no error"; case GL_INVALID_ENUM: return "invalid enum"; case GL_INVALID_VALUE: return "invalid value"; case GL_INVALID_OPERATION: return "invalid operation"; case GL_OUT_OF_MEMORY: return "out of memory"; case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid framebuffer operation"; case GL_CONTEXT_LOST: return "OpenGL context has been lost"; default: break; } static char text[64] = {}; memset(text, 0, sizeof(text)); sprintf(text, "0x%x", errorcode); return text; } const char *OpenGL::framebufferStatusString(GLenum status) { switch (status) { case GL_FRAMEBUFFER_COMPLETE: return "complete (success)"; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: return "Texture format cannot be rendered to on this system."; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: return "Error in graphics driver (missing render texture attachment)"; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: return "Error in graphics driver (incomplete draw buffer)"; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: return "Error in graphics driver (incomplete read buffer)"; case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: return "Canvas with the specified MSAA count cannot be rendered to on this system."; case GL_FRAMEBUFFER_UNSUPPORTED: return "Renderable textures are unsupported"; default: break; } static char text[64] = {}; memset(text, 0, sizeof(text)); sprintf(text, "0x%x", status); return text; } const char *OpenGL::debugSeverityString(GLenum severity) { switch (severity) { case GL_DEBUG_SEVERITY_HIGH: return "high"; case GL_DEBUG_SEVERITY_MEDIUM: return "medium"; case GL_DEBUG_SEVERITY_LOW: return "low"; default: return "unknown"; } } const char *OpenGL::debugSourceString(GLenum source) { switch (source) { case GL_DEBUG_SOURCE_API: return "API"; case GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "window"; case GL_DEBUG_SOURCE_SHADER_COMPILER: return "shader"; case GL_DEBUG_SOURCE_THIRD_PARTY: return "external"; case GL_DEBUG_SOURCE_APPLICATION: return "LOVE"; case GL_DEBUG_SOURCE_OTHER: return "other"; default: return "unknown"; } } const char *OpenGL::debugTypeString(GLenum type) { switch (type) { case GL_DEBUG_TYPE_ERROR: return "error"; case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "deprecated behavior"; case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "undefined behavior"; case GL_DEBUG_TYPE_PERFORMANCE: return "performance"; case GL_DEBUG_TYPE_PORTABILITY: return "portability"; case GL_DEBUG_TYPE_OTHER: return "other"; default: return "unknown"; } } // OpenGL class instance singleton. OpenGL gl; } // opengl } // graphics } // love
26.984674
129
0.768508
[ "render" ]
e867d85d7ca119715bb478743ef2ebe5278f6132
2,231
cpp
C++
LeetCode/C++/Companies/Google/Medium/NumberOfMatchingSubsequences/solution.cpp
busebd12/InterviewPreparation
e68c41f16f7790e44b10a229548186e13edb5998
[ "MIT" ]
null
null
null
LeetCode/C++/Companies/Google/Medium/NumberOfMatchingSubsequences/solution.cpp
busebd12/InterviewPreparation
e68c41f16f7790e44b10a229548186e13edb5998
[ "MIT" ]
null
null
null
LeetCode/C++/Companies/Google/Medium/NumberOfMatchingSubsequences/solution.cpp
busebd12/InterviewPreparation
e68c41f16f7790e44b10a229548186e13edb5998
[ "MIT" ]
null
null
null
#include <deque> #include <string> #include <unordered_map> #include <vector> /* Solution: based on this post --> https://leetcode.com/problems/number-of-matching-subsequences/discuss/117598/Java-solution-using-HashMap-and-Queue Time complexity: O(n + (w * l)) [where n is the length of s, w is the number of words, and l is length of every word] Space complexity: O(w) */ class Solution { public: int numMatchingSubseq(string s, vector<string> & words) { int result=0; //Hashtable that maps a character to a deque of strings unordered_map<char, deque<string>> hashtable; //For each word in words, group each word in the hashtable based on the first letter for(auto & word : words) { hashtable[word[0]].emplace_back(word); } //Iterate through the s string for(char letter : s) { //If the letter is in the hashtable, then there are words that being with that letter if(hashtable.count(letter)) { int size=hashtable[letter].size(); //Iterate through the list of words beginning with the current letter for(int i=0;i<size;i++) { //Remove the first word string word=hashtable[letter].front(); hashtable[letter].pop_front(); //If the word size is one, then this subsequence is found within s, so increment result if(word.size()==1) { result++; } //Else, the word size is greater than one, so remove the first letter and add the remaining string to its bucket else { string rest=word.substr(1, string::npos); hashtable[rest[0]].emplace_back(rest); } } } } return result; } };
35.412698
147
0.487225
[ "vector" ]
e86d6f0d4354229a2626385014413dc475d655a0
6,575
cpp
C++
Acodemia/source/rendering/Displayable.cpp
jackflower/Acodemia
779d1ea76cf7c3841aa57e7a3f3c45591a5a2940
[ "MIT" ]
2
2019-11-26T09:50:56.000Z
2019-11-30T19:40:42.000Z
Acodemia/source/rendering/Displayable.cpp
jackflower/Acodemia
779d1ea76cf7c3841aa57e7a3f3c45591a5a2940
[ "MIT" ]
null
null
null
Acodemia/source/rendering/Displayable.cpp
jackflower/Acodemia
779d1ea76cf7c3841aa57e7a3f3c45591a5a2940
[ "MIT" ]
null
null
null
//////////////////////////////////////////////////////////// // // Acodemia Copyright (C) Jacek Kwiatek // e-mail: jackflower (at) poczta.onet.pl // acodemia.pl // // To oprogramowanie dostarczane jest w postaci takiej, // w jakiej jest, bez wyraźnych ani domniemanych gwarancji. // // W żadnym wypadku Autor nie ponosi odpowiedzialności // za jakiekolwiek szkody powstałe w wyniku korzystania // z tego oprogramowania.Zastrzega // // Zezwala się na korzystanie z tego oprogramowania // w dowolnym celu, także komercyjnym. Można je zmienić // i swobodnie rozpowszechniać. // // Zastrzega się następujące ograniczenia: // // 1. Jeśli używasz tego oprogramowania w swoich // produktach, potwierdzenie pochodzenia tego // oprogramowania w dokumentacji produktu, // byłoby docenione, ale nie jest wymagane. // //////////////////////////////////////////////////////////// #include "Displayable.h" namespace acodemia { namespace rendering { //Konstruktor domyślny Displayable::Displayable() : p_sprite(new Sprite()) { } //Konstruktor kopiujący Displayable::Displayable(const Displayable & copy) : p_sprite(new Sprite(*copy.p_sprite)) { } //Konstruktor przenoszący Displayable::Displayable(Displayable && other) : //kopiujemy pod wskaźnik dane obiektu źródłowego p_sprite(std::move(other.p_sprite)) { //zwalniamy wskaźnik na dane obiektu źródłowego tak, //aby destruktor nie zwalniał pamięci wielokrotnie other.p_sprite = nullptr; } //Destruktor Displayable::~Displayable() { if(p_sprite != nullptr) delete p_sprite; p_sprite = nullptr; } //Przeciążony operator przypisania kopiowania Displayable & Displayable::operator=(const Displayable & copy) { if (this != &copy) { //zwalaniamy dane pod wskaźnikiem delete p_sprite; //tworzymy nowy obiekt na podstawie obiektu źródłowego p_sprite = new Sprite(*copy.p_sprite); } return *this; } //Przeciążony operator przypisania przenoszenia Displayable & Displayable::operator=(Displayable && other) { if (this != & other) { //zwalaniamy dane pod wskaźnikiem delete p_sprite; //przenosimy pod wskaźnik dane z obiektu źródłowego p_sprite = other.p_sprite; //zwalniamy wskaźnik na dane obiektu źródłowego tak, //aby destruktor nie zwalniał pamięci wielokrotnie other.p_sprite = nullptr; } return *this; } //Metoda zwraca stałą referencję pozycji obiektu const sf::Vector2f & Displayable::getPosition() const { return p_sprite->getPosition(); } //Metoda ustawia pozycję obiektu void Displayable::setPosition(float x, float y) { if(p_sprite) p_sprite->setPosition(x, y); } //Metoda ustawia pozycję obiektu void Displayable::setPosition(const sf::Vector2f & vector) { setPosition(vector.x, vector.y); } //Metoda zwraca wartość obrotu float Displayable::getRotation() const { return p_sprite->getRotation(); } //Metoda ustawia wartość obrotu void Displayable::setRotation(float rotation_value) { if (p_sprite) p_sprite->setRotation(rotation_value); } //Metoda obraca wartość obrotu void Displayable::rotate(float angle) { if (p_sprite) p_sprite->rotate(angle); } //Metoda zwraca skalę const sf::Vector2f & Displayable::getScale() const { return p_sprite->getScale(); } //Metoda ustawia skalę void Displayable::setScale(float x, float y) { if (p_sprite) p_sprite->setScale(x, y); } //Metoda ustawia skalę void Displayable::setScale(const sf::Vector2f & new_scale_value) { p_sprite->setScale(new_scale_value); } //Metoda ustawia skalę void Displayable::setScale(float factors) { if (p_sprite) setScale(factors, factors); } //Metoda ustawia skalę w stosunku do obecnej skali void Displayable::scale(float factorX, float factorY) { p_sprite->scale(factorX, factorY); } //Metoda ustawia skalę w stosunku do obecnej skali void Displayable::scale(const sf::Vector2f & factor) { if (p_sprite) p_sprite->scale(factor); } //Metoda zwraca współrzędne punktu uchwytu obiektu const sf::Vector2f & Displayable::getOrigin() const { return p_sprite->getOrigin(); } //Metoda ustawia współrzędne punktu uchwytu obiektu void Displayable::setOrigin(float x, float y) { if (p_sprite) p_sprite->setOrigin(x, y); } //Metoda ustawia współrzędne punktu uchwytu obiektu void Displayable::setOrigin(const sf::Vector2f & origin) { if (p_sprite) p_sprite->setOrigin(origin); } //Metoda zwraca obszar prostokątny zajmowany przez teksturę const sf::IntRect & Displayable::getTextureRect() const { return p_sprite->getTextureRect(); } //Metoda ustawia obszar prostokątny zajmowany przez teksturę void Displayable::setTextureRect(int rectLeft, int rectTop, int rectWidth, int rectHeight) { setTextureRect(sf::IntRect(rectLeft, rectTop, rectWidth, rectHeight)); } //Metoda ustawia obszar prostokątny zajmowany przez teksturę void Displayable::setTextureRect (const sf::IntRect& rectangle) { if (p_sprite) p_sprite->setTextureRect(rectangle); } //Metoda zwraca granice obiektu w lokalnym w układzie współrzędnych sf::FloatRect Displayable::getLocalBounds() const { return p_sprite->getLocalBounds(); } //Metoda zwraca granice obiektu w globalnym w układzie współrzędnych sf::FloatRect Displayable::getGlobalBounds() const { return p_sprite->getGlobalBounds(); } //Metoda przemieszcza obiekt o wartość podaną w parametrach względem aktualnej pozycji void Displayable::move(float offsetX, float offsetY) { if (p_sprite) p_sprite->move(offsetX, offsetY); } //Metoda przemieszcza obiekt o wartość wektora przesunięcia void Displayable::move(const sf::Vector2f & offset) { if (p_sprite) p_sprite->move(offset); } //Metoda zwraca kolor obiektu const sf::Color& Displayable::getColor() const { return p_sprite->getColor(); } //Metoda ustawia kolor obiektu void Displayable::setColor(const sf::Color & color) { if (p_sprite) p_sprite->setColor(color); } //Metoda ustawia teksturę dla sprite void Displayable::setTexture(const Texture & texture) { if(p_sprite) p_sprite->setTexture(texture); } //Wirtualna metoda renderująca obiekt void Displayable::draw(sf::RenderWindow & render) const { if (p_sprite)//na wszelki wypadek, gdyby wskaźnik stracił adres... render.draw(*p_sprite); //rysujemy obiekt } }//namespace rendering }//namespace acodemia
24.718045
92
0.697034
[ "render", "vector" ]
e87f994d304339b248b4f5ba831b36da11102c48
15,497
cpp
C++
src/primitives/PrfOpenSSL.cpp
zpleefly/libscapi
27d7d964d645ed111c2cc9870087971cf13e24f4
[ "MIT" ]
null
null
null
src/primitives/PrfOpenSSL.cpp
zpleefly/libscapi
27d7d964d645ed111c2cc9870087971cf13e24f4
[ "MIT" ]
2
2021-03-20T05:38:48.000Z
2021-03-31T20:14:11.000Z
src/primitives/PrfOpenSSL.cpp
zpleefly/libscapi
27d7d964d645ed111c2cc9870087971cf13e24f4
[ "MIT" ]
null
null
null
/** * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% * * Copyright (c) 2016 LIBSCAPI (http://crypto.biu.ac.il/SCAPI) * This file is part of the SCAPI project. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * We request that any publication and/or code referring to and/or based on SCAPI contain an appropriate citation to SCAPI, including a reference to * http://crypto.biu.ac.il/SCAPI. * * Libscapi uses several open source libraries. Please see these projects for any further licensing issues. * For more information , See https://github.com/cryptobiu/libscapi/blob/master/LICENSE.MD * * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% * */ #include "../../include/primitives/PrfOpenSSL.hpp" #include <algorithm> /*************************************************/ /**** OpenSSLPRP ***/ /*************************************************/ SecretKey OpenSSLPRP::generateKey(int keySize) { //Generate random bytes to set as the key. vector<byte> vec(keySize / 8); prg->getPRGBytes(vec, 0, keySize / 8); SecretKey sk(vec, getAlgorithmName()); return sk; } void OpenSSLPRP::computeBlock(const vector<byte> & inBytes, int inOff, vector<byte> &outBytes, int outOff) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Checks that the offset and length are correct. if ((inOff > (int)inBytes.size()) || (inOff + getBlockSize() > (int)inBytes.size())) throw out_of_range("wrong offset for the given input buffer"); const byte* input = & inBytes[inOff]; int size; int blockSize = getBlockSize(); //Make anough space in the output vector. if ((int) outBytes.size() - outOff < blockSize) outBytes.resize(outOff + blockSize); // Compute the prp on the given input array, put the result in ret. EVP_EncryptUpdate(computeP, outBytes.data() + outOff, &size, input, blockSize); } void OpenSSLPRP::optimizedCompute(const vector<byte> & inBytes, vector<byte> &outBytes) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); if ((inBytes.size() % getBlockSize()) != 0) throw out_of_range("inBytes should be aligned to the block size"); int size = inBytes.size(); //Make anough space in the output vector. if ((int) outBytes.size() < size) outBytes.resize(size); // Compute the prp on each block and put the result in the output array. EVP_EncryptUpdate(computeP, outBytes.data(), &size, &inBytes[0], size); } void OpenSSLPRP::computeBlock(const vector<byte> & inBytes, int inOff, int inLen, vector<byte> &outBytes, int outOff, int outLen) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // the checks on the offset and length are done in the computeBlock(inBytes, inOff, outBytes, outOff). if (inLen == outLen && inLen == getBlockSize()) //Checks that the lengths are the same as the block size. computeBlock(inBytes, inOff, outBytes, outOff); else throw out_of_range("Wrong size"); } void OpenSSLPRP::computeBlock(const vector<byte> & inBytes, int inOffset, int inLen, vector<byte> &outBytes, int outOffset) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // The checks on the offset and length is done in the computeBlock (inBytes, inOffset, outBytes, outOffset). if (inLen == getBlockSize()) //Checks that the input length is the same as the block size. computeBlock(inBytes, inOffset, outBytes, outOffset); else throw out_of_range("Wrong size"); } void OpenSSLPRP::invertBlock(const vector<byte> & inBytes, int inOff, vector<byte>& outBytes, int outOff) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Checks that the offsets are correct. if ((inOff > (int)inBytes.size()) || (inOff + getBlockSize() > (int)inBytes.size())) throw out_of_range("wrong offset for the given input buffer"); //Make anough space in the output vector. if ((int) outBytes.size() - outOff < getBlockSize()) outBytes.resize(getBlockSize() + outOff); int size; //Invert the prp on the given input array, put the result in ret. EVP_DecryptUpdate(invertP, outBytes.data(), &size, &inBytes[inOff], getBlockSize()); } void OpenSSLPRP::optimizedInvert(const vector<byte> & inBytes, vector<byte> &outBytes) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); if ((inBytes.size() % getBlockSize()) != 0) throw out_of_range("inBytes should be aligned to the block size"); int size = inBytes.size(); //Make anough space in the output vector. if ((int) outBytes.size()< size) outBytes.resize(size); // compute the prp on each block and put the result in the output array. EVP_DecryptUpdate(invertP, outBytes.data(), &size, &inBytes[0], size); } void OpenSSLPRP::invertBlock(const vector<byte> & inBytes, int inOff, vector<byte>& outBytes, int outOff, int len) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // the checks of the offset and lengths are done in the invertBlock(inBytes, inOff, outBytes, outOff) if (len == getBlockSize()) //Checks that the length is the same as the block size invertBlock(inBytes, inOff, outBytes, outOff); else throw out_of_range("Wrong size"); } OpenSSLPRP::~OpenSSLPRP() { //Delete the underlying Openssl's objects. EVP_CIPHER_CTX_cleanup(computeP); EVP_CIPHER_CTX_cleanup(invertP); EVP_CIPHER_CTX_free(computeP); EVP_CIPHER_CTX_free(invertP); } /*************************************************/ /**** OpenSSLAES ***/ /*************************************************/ OpenSSLAES::OpenSSLAES(const shared_ptr<PrgFromOpenSSLAES> & setRandom) { //Create the underlying Openssl's AES objects. prg = setRandom; computeP = EVP_CIPHER_CTX_new(); invertP = EVP_CIPHER_CTX_new(); } void OpenSSLAES::setKey(SecretKey & secretKey) { auto keyVec = secretKey.getEncoded(); int len = keyVec.size(); // AES key size should be 128/192/256 bits long. if (len != 16 && len != 24 && len != 32) throw InvalidKeyException("AES key size should be 128/192/256 bits long"); // Set the key to the underlying objects. byte* keyBytes = &keyVec[0]; int bitLen = len * 8; //number of bits in key. // Create the requested block cipher. const EVP_CIPHER* cipher=NULL; switch (bitLen) { case 128: cipher = EVP_aes_128_ecb(); break; case 192: cipher = EVP_aes_192_ecb(); break; case 256: cipher = EVP_aes_256_ecb(); break; default: break; } // Initialize the AES objects with the key. EVP_EncryptInit(computeP, cipher, keyBytes, NULL); EVP_DecryptInit(invertP, cipher, keyBytes, NULL); // Set the AES objects with NO PADDING. EVP_CIPHER_CTX_set_padding(computeP, 0); EVP_CIPHER_CTX_set_padding(invertP, 0); _isKeySet = true; } /*************************************************/ /**** OpenSSLHMAC ***/ /*************************************************/ OpenSSLHMAC::OpenSSLHMAC(string hashName, const shared_ptr<PrgFromOpenSSLAES> & random) { //Create the underlying Openssl's Hmac object. hmac = new HMAC_CTX; OpenSSL_add_all_digests(); HMAC_CTX_init(hmac); /* * The way we call the hash is not the same as OpenSSL. For example: we call "SHA-1" while OpenSSL calls it "SHA1". * So the hyphen should be deleted. */ hashName.erase(remove(hashName.begin(), hashName.end(), '-'), hashName.end()); // Get the underlying hash function. const EVP_MD *md = EVP_get_digestbyname(hashName.c_str()); // Create an Hmac object and initialize it with the created hash and default key. int res = HMAC_Init_ex(hmac, "012345678", 0, md, NULL); if (0 == res) throw runtime_error("failed to create hmac"); this->random = random; } void OpenSSLHMAC::setKey(SecretKey & secretKey) { // Initialize the Hmac object with the given key. auto secVec = secretKey.getEncoded(); HMAC_Init_ex(hmac, &secVec[0], secVec.size(), NULL, NULL); _isKeySet = true; } string OpenSSLHMAC::getAlgorithmName() { int type = EVP_MD_type(hmac->md); // Convert the type to a name. const char* name = OBJ_nid2sn(type); return "Hmac/" + string(name); } void OpenSSLHMAC::computeBlock(const vector<byte> & inBytes, int inOff, vector<byte> &outBytes, int outOff) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); throw out_of_range("Size of input is not specified"); } void OpenSSLHMAC::computeBlock(const vector<byte> & inBytes, int inOff, int inLen, vector<byte> &outBytes, int outOff, int outLen) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // The checks of the offsets and lengths are done in the conputeBlock (inBytes, inOff, inLen, outBytes, outOff). // make sure the output size is correct. if (outLen == getBlockSize()) computeBlock(inBytes, inOff, inLen, outBytes, outOff); else throw out_of_range("Output size is incorrect"); } void OpenSSLHMAC::computeBlock(const vector<byte> & inBytes, int inOffset, int inLen, vector<byte> &outBytes, int outOffset) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Check that the offset and length are correct. if ((inOffset > (int) inBytes.size()) || (inOffset + inLen > (int) inBytes.size())) throw out_of_range("wrong offset for the given input buffer"); // Update the Hmac object. HMAC_Update(hmac, &inBytes[inOffset], inLen); int size = EVP_MD_size(hmac->md); // Get the size of the hash output. if ((int)outBytes.size() < outOffset + size) outBytes.resize(outOffset + size); //Compute the final function and copy the output the the given output array. if (0 == (HMAC_Final(hmac, outBytes.data(), NULL))) throw runtime_error("failed to init hmac object"); // initialize the Hmac again in order to enable repeated calls. if (0 == (HMAC_Init_ex(hmac, hmac->key, hmac->key_length, hmac->md, NULL))) throw runtime_error("failed to init hmac object"); } SecretKey OpenSSLHMAC::generateKey(int keySize) { // Generate a random string of bits of length keySize, which has to be greater that zero. // If the key size is zero or less - throw exception. if (keySize <= 0) throw invalid_argument("key size must be greater than 0"); // The key size has to be a multiple of 8 so that we can obtain an array of random bytes which we use // to create the SecretKey. if ((keySize % 8) != 0) throw invalid_argument("Wrong key size: must be a multiple of 8"); vector<byte> genBytes(keySize / 8); // Creates a byte vector of size keySize. random->getPRGBytes(genBytes, 0, keySize / 8); // Generates the bytes using the random. return SecretKey(genBytes.data(), keySize/8, ""); } vector<byte> OpenSSLHMAC::mac(const vector<byte> &msg, int offset, int msgLen) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Creates the tag. vector<byte> tag(getMacSize()); // Computes the hmac operation. computeBlock(msg, offset, msgLen, tag, 0); //Returns the tag. return tag; } bool OpenSSLHMAC::verify(const vector<byte> &msg, int offset, int msgLength, vector<byte>& tag) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // If the tag size is not the mac size - returns false. if ((int) tag.size() != getMacSize()) return false; // Calculate the mac on the msg to get the real tag. vector<byte> macTag = mac(msg, offset, msgLength); // Compares the real tag to the given tag. // for code-security reasons, the comparison is fully performed. that is, even if we know already after the first few bits // that the tag is not equal to the mac, we continue the checking until the end of the tag bits. bool equal = true; int length = macTag.size(); for (int i = 0; i<length; i++) { if (macTag[i] != tag[i]) { equal = false; } } return equal; } void OpenSSLHMAC::update(vector<byte> & msg, int offset, int msgLen) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Update the Hmac object. HMAC_Update(hmac, &msg[offset], msgLen); } void OpenSSLHMAC::doFinal(vector<byte> & msg, int offset, int msgLength, vector<byte> & tag_res) { if (!isKeySet()) throw IllegalStateException("secret key isn't set"); // Update the last msg block. update(msg, offset, msgLength); if ((int) tag_res.size() < getMacSize()) tag_res.resize(getMacSize()); // compute the final function and copy the output the the given output array if (0 == (HMAC_Final(hmac, tag_res.data(), NULL))) throw runtime_error("failed to init hmac object"); //initialize the Hmac again in order to enable repeated calls. if (0 == (HMAC_Init_ex(hmac, hmac->key, hmac->key_length, hmac->md, NULL))) throw runtime_error("failed to init hmac object"); } OpenSSLHMAC::~OpenSSLHMAC() { //Delete the underlying openssl's object. HMAC_CTX_cleanup(hmac); delete hmac; } /*************************************************/ /**** OpenSSLTripleDES ***/ /*************************************************/ OpenSSLTripleDES::OpenSSLTripleDES() { // Create the underlying openssl's objects. computeP = EVP_CIPHER_CTX_new(); invertP = EVP_CIPHER_CTX_new(); prg = get_seeded_prg(); } void OpenSSLTripleDES::setKey(SecretKey & secretKey) { vector<byte> keyBytesVector = secretKey.getEncoded(); int len = keyBytesVector.size(); // TripleDES key size should be 128/192 bits long. if (len != 16 && len != 24) throw InvalidKeyException("TripleDES key size should be 128/192 bits long"); // Create the requested block cipher. const EVP_CIPHER* cipher = EVP_des_ede3(); // Initialize the Triple DES objects with the key. EVP_EncryptInit(computeP, cipher, &keyBytesVector[0], NULL); EVP_DecryptInit(invertP, cipher, &keyBytesVector[0], NULL); // Set the Triple DES objects with NO PADDING. EVP_CIPHER_CTX_set_padding(computeP, 0); EVP_CIPHER_CTX_set_padding(invertP, 0); _isKeySet= true; } std::shared_ptr<PseudorandomFunction> PseudorandomFunction::get_new_prf(string algName) { if (algName == "AES") return make_shared<OpenSSLAES>(); if (algName == "TripleDES") return make_shared<OpenSSLTripleDES>(); if (algName == "HMAC") return make_shared<OpenSSLHMAC>(); // Wrong algorithm name throw invalid_argument("unexpected prf name"); }
38.645885
158
0.677615
[ "object", "vector" ]
e88179f73478d00715ce1af50f86f5607f9750d8
11,827
cpp
C++
DEM/run/normal/bub.cpp
plaveczlambert/nonlinearbubbledynamics
190c5170f7ff6068badeee818c01226c55aaec97
[ "MIT" ]
null
null
null
DEM/run/normal/bub.cpp
plaveczlambert/nonlinearbubbledynamics
190c5170f7ff6068badeee818c01226c55aaec97
[ "MIT" ]
null
null
null
DEM/run/normal/bub.cpp
plaveczlambert/nonlinearbubbledynamics
190c5170f7ff6068badeee818c01226c55aaec97
[ "MIT" ]
null
null
null
/*Deep Euler implementation of a sonochemical bubble model*/ #include <iostream> #include <fstream> #define _USE_MATH_DEFINES #include <cmath> #include <vector> #include <string> #include <chrono> #include <torch/script.h> #include <Eigen/Core> #include <boost/numeric/odeint.hpp> const double rho_L = 9.970639504998557e+02; const double p_inf = 1.0e+5; const double sigma = 0.071977583160056; const double gamma = 1.33; const double c_L = 1.497251785455527e+03; // water 25 Celsius const double mu_L = 8.902125058209557e-04; //25 Celsius const double lambda = 0.6084; //water 25 Celsius const double T_inf = 298.15; // 25 Celsius const double R_E = 10e-6; //1...10u const double p_A = 0.5e5; //0.5..2 bar const double f = 100e3; //20 kHz... 2 MHz using namespace std; const int N = 16; const int N_z = N / 2 - 1; const int nn_inputs = 2 + 3 + N_z; const int nn_outputs = 3 + N_z; const int system_order = nn_outputs + 1; c10::TensorOptions global_tensor_op; //Modify these to load the correct model string file_name = "../simulations/bub_dem_1e-5.txt"; string model_file = "../../../training/traced_model_bub1_e185_2111101855.pt"; string scaler_file = "../../../training/scaler_bub1_2111101855.psca"; typedef double value_type; typedef vector<value_type> state_type; typedef Eigen::Matrix<value_type, N / 2, N / 2> matrix_type; struct std_scaler { torch::Tensor mean; torch::Tensor scale; torch::Tensor operator()(torch::Tensor tensor) { return (tensor - mean) / scale; } torch::Tensor inverse_transform(torch::Tensor tensor) { return tensor * scale + mean; } void parse(istream& is, int numel) { mean = torch::ones({ 1, numel }); is.get(); double temp = 0.0; for (int i = 0; i < numel; i++) { is >> temp; mean[0][i] = temp; } is.get(); is.get(); scale = torch::ones({ 1, numel }); is.get(); for (int i = 0; i < numel; i++) { is >> temp; scale[0][i] = temp; } is.get(); is.get(); } }; struct norm_scaler { torch::Tensor data_min; torch::Tensor data_max; double min = 0; double max = 0; torch::Tensor operator()(torch::Tensor tensor) { torch::Tensor X_std = (tensor - data_min) / (data_max - data_min); return X_std * (max - min) + min; } torch::Tensor inverse_transform(torch::Tensor tensor) { torch::Tensor Y_std = (tensor - min) / (max - min); return Y_std * (data_max - data_min) + data_min; } void parse(istream& is) { data_min = torch::ones({ 1,nn_outputs }); is.get(); double temp = 0.0; for (int i = 0; i < nn_outputs; i++) { is >> temp; data_min[0][i] = temp; } is.get(); is.get(); data_max = torch::ones({ 1, nn_outputs }); is.get(); for (int i = 0; i < nn_outputs; i++) { is >> temp; data_max[0][i] = temp; } is.get(); //']' is.get(); //'\n' is >> min; is >> max; } }; //ode function of Van der Pol equation class BubDyn { double mu = 1.5; public: torch::jit::script::Module model; //the neural network torch::Tensor inputs; //reused tensor of inputs std_scaler in_transf; std_scaler out_transf; std::vector<value_type> C; //constants of the right hand side Eigen::Matrix<value_type, N / 2, 1> y; //collocation points (half) Eigen::Matrix<value_type, N / 2, 1> y_sq; //same, every entry squared matrix_type D_E; //Derivative matrix for even functions matrix_type D_O; //Derivative matrix for odd functions BubDyn() { //---------------------------------------------------------- //bubblemodel initializations //---------------------------------------------------------- const double omega = 2 * M_PI * f; value_type pi2wRE = 2 * M_PI / (omega * R_E); //constants C = std::vector<value_type>(13); C[0] = omega * R_E / (2 * M_PI * c_L); C[1] = 4 * mu_L / (c_L * rho_L * R_E); C[2] = 4 * mu_L / (rho_L * R_E) * pi2wRE; C[3] = 2 * sigma * pi2wRE * pi2wRE / (rho_L * R_E); C[4] = p_inf / rho_L * pi2wRE * pi2wRE; C[5] = p_A / rho_L * pi2wRE * pi2wRE; C[6] = pi2wRE * p_inf / (c_L * rho_L); C[7] = pi2wRE * p_A / (c_L * rho_L); C[8] = 2 * M_PI * pi2wRE * p_A / (c_L * rho_L); C[9] = lambda * (gamma - 1) / gamma * pi2wRE / R_E * T_inf / p_inf; C[10] = lambda * (gamma - 1) * pi2wRE / R_E * T_inf / p_inf; C[11] = (gamma - 1) / gamma; C[12] = 1.0 / (3.0 * gamma); //Derivative matrices Eigen::Matrix<value_type, N, 1> y_full(N); value_type rec_cpn = 1.0 / (N - 1); for (int i = 0; i < N; i++) { y_full[i] = cos(M_PI * i * rec_cpn); //std::cout << y_full[i] << std::endl; } Eigen::Matrix<value_type, N, N> D(N, N); for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (i == j) { if (i == N - 1) { D(N - 1, N - 1) = -(1 + 2 * (N - 1) * (N - 1)) / 6.0; } else if (i == 0) { D(0, 0) = (1 + 2 * (N - 1) * (N - 1)) / 6.0; } else { D(i, i) = -y_full[i] / (2.0 * (1.0 - y_full[i] * y_full[i])); } } else { D(i, j) = std::pow(-1, i + j) * (i == 0 || i == N - 1 ? 2.0 : 1.0) / ((j == 0 || j == N - 1 ? 2.0 : 1.0) * (y_full[i] - y_full[j])); } } } D_E = matrix_type(N / 2, N / 2); D_O = matrix_type(N / 2, N / 2); for (int i = 0; i < N / 2; i++) { for (int j = 0; j < N / 2; j++) { D_E(i, j) = D(i, j) + D(i, N - 1 - j); } } for (int i = 0; i < N / 2; i++) { for (int j = 0; j < N / 2; j++) { D_O(i, j) = D(i, j) - D(i, N - 1 - j); } } y = y_full.head<N / 2>(); y_sq = y.cwiseProduct(y); //--------------------------------------------------------- //neural network initializations //--------------------------------------------------------- inputs = torch::ones({ 1, nn_inputs }, global_tensor_op); try { model = torch::jit::load(model_file); std::vector<torch::jit::IValue> inp; inp.push_back(torch::ones({ 1, nn_inputs }, global_tensor_op)); std::cout << inp << endl; // Execute the model and turn its output into a tensor. at::Tensor output = model.forward(inp).toTensor().detach(); std::cout << output << endl; } catch (const c10::Error& e) { std::cerr << "Error loading the model: " << e.what() << endl; exit(-1); } ifstream in(scaler_file); if (!in) { std::cerr << "Error loading the scalers." << endl; exit(-1); } out_transf.parse(in, nn_outputs); in_transf.parse(in, nn_inputs); in.close(); } //Rewrites the errors array with the predicted local truncation errors double* local_error(double t, double t_next, const double* x, double* errors) { //updating inputs inputs[0][0] = t_next - t; for (int i = 0; i < nn_inputs - 1; i++) { inputs[0][i + 1] = x[i]; } inputs[0][nn_inputs - 1] = sin(2 * M_PI * t); //scaling torch::Tensor scaled = in_transf(inputs); std::vector<torch::jit::IValue> inps; inps.push_back(scaled); //evaluating torch::Tensor loc_trun_err = model.forward(inps).toTensor().detach(); loc_trun_err = out_transf.inverse_transform(loc_trun_err); for (int i = 0; i < 3; i++) { errors[i] = loc_trun_err[0][i].item<double>(); } errors[3] = 0.0; //boundary condition for (int i = 3; i < nn_outputs; i++) { errors[i + 1] = loc_trun_err[0][i].item<double>(); } return errors; } //ODE function. In the pointer x the values are rewritten with the computed slopes void operator()(double t, const double* x, double* dxdt) { value_type rec_xR = 1.0 / x[0]; value_type rec_xp = 1.0 / x[2]; Eigen::Map<const Eigen::Matrix<value_type, N / 2, 1>> z(x + 3); Eigen::Map<Eigen::Matrix<value_type, N / 2, 1>> dzdt(dxdt + 3); Eigen::Matrix<value_type, N / 2, 1> De_x = D_E * z; //derivative of z (dimless temperature) /*for(int i = 0; i < N/2; i++){ std::cout << "t" << y_sq[i] << std::endl; }*/ //bubble pressure evolution dxdt[2] = 3 * rec_xR * (C[10] * rec_xR * De_x[0] - gamma * x[1] * x[2]); //discretized PDE of bubble temperature dzdt = De_x.cwiseProduct(x[1] * rec_xR * y - C[9] * rec_xR * rec_xR * rec_xp * De_x //this might show error, but it will not fail at compile time, valid syntax + C[12] * rec_xp * dxdt[2] * y) + C[11] * rec_xp * dxdt[2] * z + C[9] * rec_xp * rec_xR * rec_xR * z .cwiseProduct(y_sq.cwiseInverse()).cwiseProduct(D_O * (y_sq.cwiseProduct(De_x))); dxdt[3] = 0.0; //Boundary condition //Keller-Miksis equation dxdt[0] = x[1]; value_type sin2pit = sin(2 * M_PI * t); value_type den = x[0] - C[0] * x[0] * x[1] + C[1]; value_type nom = 0.5 * C[0] * x[1] * x[1] * x[1] - 1.5 * x[1] * x[1] - C[2] * x[1] * rec_xR - C[3] * rec_xR + C[4] * x[2] - C[4] - C[5] * sin2pit + C[6] * x[1] * x[2] - C[6] * x[1] - C[7] * x[1] * sin2pit - C[8] * x[0] * cos(2 * M_PI * t) + C[6] * x[0] * dxdt[2]; dxdt[1] = nom / den; } }; class ODESolver { public: ODESolver(int order) :order(order) {}; bool setInitialCondition(double* conds, double at) { begin_t = at; init_conds = (double*)malloc(sizeof(double) * order); for (int u = 0; u < order; u++) { init_conds[u] = conds[u]; } return true; } void setTimeStep(double dt) { delta_t = dt; } bool setStepNumber(int steps) { max_l = steps; return true; } void solve(BubDyn& sys, ostream& os) { double* vector = (double*)malloc(sizeof(double) * order); for (int u = 0; u < order; u++) { vector[u] = init_conds[u]; } //preparations double* k = (double*)malloc(sizeof(double) * order); double* local_error = (double*)malloc(sizeof(double) * order); double t = begin_t; int l = 0; os << t; for (int i = 0; i < order; i++) { os << " " << vector[i]; } os << endl; #pragma warning(disable:6011) while (l < max_l) { sys.local_error(t, t + delta_t, vector, local_error); sys(t, vector, k); for (int j = 0; j < order; j++) { vector[j] = vector[j] + delta_t * k[j] + delta_t * delta_t * local_error[j]; //To change to Euler Method uncomment the following, comment out the previous //vector[j] = vector[j] + delta_t * k[j]; } l++; t += delta_t; os << t; for (int i = 0; i < order; i++) { os << " " << vector[i]; } os << endl; } free(k); free(vector); } ~ODESolver() { free(init_conds); } private: int type = 0; int order = 1; double* init_conds = 0; double begin_t = 0; double delta_t = 0.1; int max_l = 10; double distance(double a, double b) { if (a < b)return b - a; else return a - b; } }; int main() { global_tensor_op = torch::TensorOptions().dtype(torch::kFloat64); cout << "BubbleDynamics with DEM started\n" << setprecision(17) << endl; ofstream ofs(file_name); if (!ofs.is_open()) { cout << "File could not be opened: " << file_name << endl; exit(-1); } ofs.precision(17); ofs.flags(ios::scientific); cout << "Writing file: " << file_name << endl; //initial conditions double* x = new double[system_order] {1.0, 0.0, 1.0 + 2.0 * sigma / (R_E * p_inf), 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}; double t_start = 0.0; cout << "Rarrrr" << endl; BubDyn bubi; ODESolver solver(system_order); solver.setInitialCondition(x, 0.0); solver.setTimeStep(2e-5); solver.setStepNumber(5/2e-5); cout << "Solving..." << endl; auto t1 = chrono::high_resolution_clock::now(); solver.solve(bubi, ofs); auto t2 = chrono::high_resolution_clock::now(); //Not valid measurement of DEM computational time. Just a slight indicator cout << "Time (ms):" << std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count() << endl; ofs.flush(); ofs.close(); cout << "Ready" << endl; return 0; }
29.202469
162
0.558637
[ "vector", "model" ]
e88225f8a9a4cc01004c06bc505d01577101409d
22,840
cpp
C++
src/terminal_renderer/TextRenderer.cpp
GoldsteinE/contour
a828b50b4024c692b3ff60dc38e0bdae36aac300
[ "Apache-2.0" ]
null
null
null
src/terminal_renderer/TextRenderer.cpp
GoldsteinE/contour
a828b50b4024c692b3ff60dc38e0bdae36aac300
[ "Apache-2.0" ]
null
null
null
src/terminal_renderer/TextRenderer.cpp
GoldsteinE/contour
a828b50b4024c692b3ff60dc38e0bdae36aac300
[ "Apache-2.0" ]
null
null
null
/** * This file is part of the "libterminal" project * Copyright (c) 2019-2020 Christian Parpart <christian@parpart.family> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <terminal_renderer/TextRenderer.h> #include <terminal_renderer/GridMetrics.h> #include <crispy/algorithm.h> #include <crispy/debuglog.h> #include <crispy/times.h> #include <crispy/range.h> #include <unicode/convert.h> #include <fmt/format.h> #include <fmt/ostream.h> using crispy::copy; using crispy::times; using unicode::out; using std::array; using std::get; using std::make_unique; using std::max; using std::move; using std::nullopt; using std::optional; using std::pair; using std::u32string; using std::u32string_view; using std::vector; using namespace std::placeholders; namespace terminal::renderer { namespace // {{{ helpers { auto const TextRendererTag = crispy::debugtag::make("renderer.text", "Logs details about text rendering."); text::font_key getFontForStyle(FontKeys const& _fonts, TextStyle _style) { switch (_style) { case TextStyle::Invalid: break; case TextStyle::Regular: return _fonts.regular; case TextStyle::Bold: return _fonts.bold; case TextStyle::Italic: return _fonts.italic; case TextStyle::BoldItalic: return _fonts.boldItalic; } return _fonts.regular; } } // }}} TextRenderer::TextRenderer(GridMetrics const& _gridMetrics, text::shaper& _textShaper, FontDescriptions& _fontDescriptions, FontKeys const& _fonts) : gridMetrics_{ _gridMetrics }, fontDescriptions_{ _fontDescriptions }, fonts_{ _fonts }, textShaper_{ _textShaper } { setTextShapingMethod(fontDescriptions_.textShapingMethod); } void TextRenderer::setTextShapingMethod(TextShapingMethod _method) { switch (_method) { case TextShapingMethod::Complex: textRenderingEngine_ = make_unique<ComplexTextShaper>( gridMetrics_, textShaper_, fonts_, std::bind(&TextRenderer::renderRun, this, _1, _2, _3) ); return; case TextShapingMethod::Simple: textRenderingEngine_ = make_unique<SimpleTextShaper>( gridMetrics_, textShaper_, fonts_, std::bind(&TextRenderer::renderRun, this, _1, _2, _3) ); return; } } void TextRenderer::setRenderTarget(RenderTarget& _renderTarget) { Renderable::setRenderTarget(_renderTarget); clearCache(); } void TextRenderer::clearCache() { monochromeAtlas_ = make_unique<TextureAtlas>(renderTarget().monochromeAtlasAllocator()); colorAtlas_ = make_unique<TextureAtlas>(renderTarget().coloredAtlasAllocator()); lcdAtlas_ = make_unique<TextureAtlas>(renderTarget().lcdAtlasAllocator()); textRenderingEngine_->clearCache(); } void TextRenderer::updateFontMetrics() { setTextShapingMethod(fontDescriptions_.textShapingMethod); if (!renderTargetAvailable()) return; clearCache(); } void TextRenderer::renderCell(RenderCell const& _cell) { auto const style = [](auto mask) constexpr -> TextStyle { if (contains_all(mask, CellFlags::Bold | CellFlags::Italic)) return TextStyle::BoldItalic; if (mask & CellFlags::Bold) return TextStyle::Bold; if (mask & CellFlags::Italic) return TextStyle::Italic; return TextStyle::Regular; }(_cell.flags); auto const codepoints = crispy::span(_cell.codepoints.data(), _cell.codepoints.size()); if (_cell.flags & CellFlags::CellSequenceStart) textRenderingEngine_->setTextPosition(gridMetrics_.map(_cell.position)); textRenderingEngine_->appendCell(codepoints, style, _cell.foregroundColor); if (_cell.flags & CellFlags::CellSequenceEnd) textRenderingEngine_->endSequence(); } void TextRenderer::start() { textRenderingEngine_->beginFrame(); } void TextRenderer::finish() { textRenderingEngine_->endSequence(); } void TextRenderer::renderRun(crispy::Point _pos, crispy::span<text::glyph_position const> _glyphPositions, RGBColor _color) { crispy::Point pen = _pos; auto const advanceX = gridMetrics_.cellSize.width; for (text::glyph_position const& gpos: _glyphPositions) { if (optional<DataRef> const ti = getTextureInfo(gpos.glyph); ti.has_value()) { renderTexture(pen, _color, get<0>(*ti).get(), // TextureInfo get<1>(*ti).get(), // Metadata gpos); } if (gpos.advance.x) { // Only advance horizontally, as we're (guess what) a terminal. :-) // Only advance in fixed-width steps. // Only advance iff there harfbuzz told us to. pen.x += advanceX; } } } TextRenderer::TextureAtlas& TextRenderer::atlasForFont(text::font_key _font) { if (textShaper_.has_color(_font)) return *colorAtlas_; switch (fontDescriptions_.renderMode) { case text::render_mode::lcd: // fallthrough; return lcdAtlas_; return *lcdAtlas_; case text::render_mode::color: return *colorAtlas_; case text::render_mode::light: case text::render_mode::gray: case text::render_mode::bitmap: return *monochromeAtlas_; } return *monochromeAtlas_; } optional<TextRenderer::DataRef> TextRenderer::getTextureInfo(text::glyph_key const& _id) { if (auto i = glyphToTextureMapping_.find(_id); i != glyphToTextureMapping_.end()) if (TextureAtlas* ta = atlasForBitmapFormat(i->second); ta != nullptr) if (optional<DataRef> const dataRef = ta->get(_id); dataRef.has_value()) return dataRef; bool const colored = textShaper_.has_color(_id.font); auto theGlyphOpt = textShaper_.rasterize(_id, fontDescriptions_.renderMode); if (!theGlyphOpt.has_value()) return nullopt; text::rasterized_glyph& glyph = theGlyphOpt.value(); auto const numCells = colored ? 2 : 1; // is this the only case - with colored := Emoji presentation? // FIXME: this `2` is a hack of my bad knowledge. FIXME. // As I only know of emojis being colored fonts, and those take up 2 cell with units. debuglog(TextRendererTag).write("Glyph metrics: {}", glyph); // {{{ scale bitmap down iff bitmap is emoji and overflowing in diemensions if (glyph.format == text::bitmap_format::rgba) { assert(colored && "RGBA should be only used on colored (i.e. emoji) fonts."); assert(numCells >= 2); auto const cellSize = gridMetrics_.cellSize; if (numCells > 1 && // XXX for now, only if emoji glyph (glyph.size.width > cellSize.width * numCells || glyph.size.height > cellSize.height)) { auto const newSize = crispy::Size{cellSize.width * numCells, cellSize.height}; auto [scaled, factor] = text::scale(glyph, newSize); glyph.size = scaled.size; // TODO: there shall be only one with'x'height. // center the image in the middle of the cell glyph.position.y = gridMetrics_.cellSize.height - gridMetrics_.baseline; glyph.position.x = (gridMetrics_.cellSize.width * numCells - glyph.size.width) / 2; // (old way) // glyph.metrics.bearing.x /= factor; // glyph.metrics.bearing.y /= factor; glyph.bitmap = move(scaled.bitmap); // XXX currently commented out because it's not used. // TODO: But it should be used for cutting the image off the right edge with unnecessary // transparent pixels. // // int const rightEdge = [&]() { // auto rightEdge = std::numeric_limits<int>::max(); // for (int x = glyph.bitmap.width - 1; x >= 0; --x) { // for (int y = 0; y < glyph.bitmap.height; ++y) // { // auto const& pixel = &glyph.bitmap.data.at(y * glyph.bitmap.width * 4 + x * 4); // if (pixel[3] > 20) // rightEdge = x; // } // if (rightEdge != std::numeric_limits<int>::max()) // break; // } // return rightEdge; // }(); // if (rightEdge != std::numeric_limits<int>::max()) // debuglog(TextRendererTag).write("right edge found. {} < {}.", rightEdge+1, glyph.bitmap.width); } } // }}} auto const yMax = gridMetrics_.baseline + glyph.position.y; auto const yMin = yMax - glyph.size.height; auto const ratio = !colored ? 1.0f : max(float(gridMetrics_.cellSize.width * numCells) / float(glyph.size.width), float(gridMetrics_.cellSize.height) / float(glyph.size.height)); auto const yOverflow = gridMetrics_.cellSize.height - yMax; if (crispy::logging_sink::for_debug().enabled()) debuglog(TextRendererTag).write("insert glyph {}: {}; ratio:{}; yOverflow({}, {}); {}", _id.index, colored ? "emoji" : "text", ratio, yOverflow < 0 ? yOverflow : 0, yMin < 0 ? yMin : 0, glyph); auto && [userFormat, targetAtlas] = [this](bool _colorFont, text::bitmap_format _glyphFormat) -> pair<int, TextureAtlas&> { // {{{ // this format ID is used by the fragment shader to select the right texture atlas if (_colorFont) return {1, *colorAtlas_}; switch (_glyphFormat) { case text::bitmap_format::rgba: return {1, *colorAtlas_}; case text::bitmap_format::rgb: return {2, *lcdAtlas_}; case text::bitmap_format::alpha_mask: return {0, *monochromeAtlas_}; } return {0, *monochromeAtlas_}; }(colored, glyph.format); // }}} glyphToTextureMapping_[_id] = glyph.format; if (yOverflow < 0) { debuglog(TextRendererTag).write("Cropping {} overflowing bitmap rows.", -yOverflow); glyph.size.height += yOverflow; glyph.position.y += yOverflow; } if (yMin < 0) { auto const rowCount = -yMin; auto const pixelCount = rowCount * glyph.size.width * text::pixel_size(glyph.format); debuglog(TextRendererTag).write("Cropping {} underflowing bitmap rows.", rowCount); glyph.size.height += yMin; auto& data = glyph.bitmap; assert(pixelCount >= 0); data.erase(begin(data), next(begin(data), pixelCount)); // XXX asan hit (size = -2) } GlyphMetrics metrics{}; metrics.bitmapSize = glyph.size; metrics.bearing = glyph.position; if (crispy::logging_sink::for_debug().enabled()) debuglog(TextRendererTag).write("textureAtlas ({}) insert glyph {}: {}; ratio:{}; yOverflow({}, {}); {}", targetAtlas.allocator().name(), _id.index, colored ? "emoji" : "text", ratio, yOverflow < 0 ? yOverflow : 0, yMin < 0 ? yMin : 0, glyph); return targetAtlas.insert(_id, glyph.size, glyph.size * ratio, move(glyph.bitmap), userFormat, metrics); } void TextRenderer::renderTexture(crispy::Point const& _pos, RGBAColor const& _color, atlas::TextureInfo const& _textureInfo, GlyphMetrics const& _glyphMetrics, text::glyph_position const& _glyphPos) { auto const colored = textShaper_.has_color(_glyphPos.glyph.font); if (colored) { auto const x = _pos.x + _glyphMetrics.bearing.x + _glyphPos.offset.x ; auto const y = _pos.y; renderTexture(crispy::Point{x, y}, _color, _textureInfo); } else { auto const x = _pos.x + _glyphMetrics.bearing.x + _glyphPos.offset.x ; auto const y = _pos.y // bottom left + _glyphPos.offset.y // -> harfbuzz adjustment + gridMetrics_.baseline // -> baseline + _glyphMetrics.bearing.y // -> bitmap top - _glyphMetrics.bitmapSize.height // -> bitmap height ; renderTexture(crispy::Point{x, y}, _color, _textureInfo); } #if 0 if (crispy::logging_sink::for_debug().enabled()) debuglog(TextRendererTag).write("xy={}:{} pos=({}:{}) tex={}x{}, gpos=({}:{}), baseline={}, descender={}", x, y, _pos.x(), _pos.y(), _textureInfo.width, _textureInfo.height, _glyphPos.offset.x, _glyphPos.offset.y, textShaper_.metrics(_glyphPos.glyph.font).baseline(), _glyph.descender); #endif } void TextRenderer::renderTexture(crispy::Point const& _pos, RGBAColor const& _color, atlas::TextureInfo const& _textureInfo) { // TODO: actually make x/y/z all signed (for future work, i.e. smooth scrolling!) auto const x = _pos.x; auto const y = _pos.y; auto const z = 0; auto const color = array{ float(_color.red()) / 255.0f, float(_color.green()) / 255.0f, float(_color.blue()) / 255.0f, float(_color.alpha()) / 255.0f, }; textureScheduler().renderTexture({_textureInfo, x, y, z, color}); } void TextRenderer::debugCache(std::ostream& _textOutput) const { std::map<u32string, CacheKey> orderedKeys; _textOutput << fmt::format("TextRenderer: {} cache entries:\n", orderedKeys.size()); for (auto && [word, key] : orderedKeys) { auto const vword = u32string_view(word); _textOutput << fmt::format(" {}\n", unicode::convert_to<char>(vword)); } } // {{{ ComplexTextShaper ComplexTextShaper::ComplexTextShaper(GridMetrics const& _gridMetrics, text::shaper& _textShaper, FontKeys const& _fonts, RenderGlyphs _renderGlyphs): gridMetrics_{ _gridMetrics }, fonts_{ _fonts }, textShaper_{ _textShaper }, renderGlyphs_{ std::move(_renderGlyphs) } { } void ComplexTextShaper::clearCache() { cacheKeyStorage_.clear(); cache_.clear(); } void ComplexTextShaper::appendCell(crispy::span<char32_t const> _codepoints, TextStyle _style, RGBColor _color) { bool const attribsChanged = _color != color_ || _style != style_; bool const hasText = !_codepoints.empty() && _codepoints[0] != 0x20; bool const noText = !hasText; bool const textStartFound = !textStartFound_ && hasText; if (noText) textStartFound_ = false; if (attribsChanged || textStartFound || noText) { if (cellCount_) endSequence(); // also increments text start position color_ = _color; style_ = _style; textStartFound_ = textStartFound; } for (char32_t const codepoint: _codepoints) { codepoints_.emplace_back(codepoint); clusters_.emplace_back(cellCount_); } cellCount_++; } void ComplexTextShaper::beginFrame() { assert(codepoints_.empty()); assert(clusters_.empty()); auto constexpr DefaultColor = RGBColor{}; style_ = TextStyle::Invalid; color_ = DefaultColor; } void ComplexTextShaper::setTextPosition(crispy::Point _position) { textPosition_ = _position; // std::cout << fmt::format("ComplexTextShaper.sequenceStart: {}\n", textPosition_); } void ComplexTextShaper::endSequence() { // std::cout << fmt::format("ComplexTextShaper.equenceEnd({}): {}+{}\n", // textPosition_.x / gridMetrics_.cellSize.width, // textPosition_, cellCount_); if (!codepoints_.empty()) { text::shape_result const& glyphPositions = cachedGlyphPositions(); renderGlyphs_(textPosition_, crispy::span(glyphPositions.data(), glyphPositions.size()), color_); } codepoints_.clear(); clusters_.clear(); textPosition_.x += gridMetrics_.cellSize.width * cellCount_; cellCount_ = 0; textStartFound_ = false; } text::shape_result const& ComplexTextShaper::cachedGlyphPositions() { auto const codepoints = u32string_view(codepoints_.data(), codepoints_.size()); if (auto const cached = cache_.find(TextCacheKey{codepoints, style_}); cached != cache_.end()) return cached->second; cacheKeyStorage_.emplace_back(u32string{codepoints}); auto const cacheKeyFromStorage = TextCacheKey{ cacheKeyStorage_.back(), style_ }; return cache_[cacheKeyFromStorage] = requestGlyphPositions(); } text::shape_result ComplexTextShaper::requestGlyphPositions() { text::shape_result glyphPositions; unicode::run_segmenter::range run; auto rs = unicode::run_segmenter(codepoints_.data(), codepoints_.size()); while (rs.consume(out(run))) crispy::copy(shapeRun(run), std::back_inserter(glyphPositions)); return glyphPositions; } text::shape_result ComplexTextShaper::shapeRun(unicode::run_segmenter::range const& _run) { bool const isEmojiPresentation = std::get<unicode::PresentationStyle>(_run.properties) == unicode::PresentationStyle::Emoji; auto const font = isEmojiPresentation ? fonts_.emoji : getFontForStyle(fonts_, style_); // TODO(where to apply cell-advances) auto const advanceX = gridMetrics_.cellSize.width; auto const count = static_cast<int>(_run.end - _run.start); auto const codepoints = u32string_view(codepoints_.data() + _run.start, count); auto const clusters = crispy::span(clusters_.data() + _run.start, count); text::shape_result gpos; textShaper_.shape( font, codepoints, clusters, std::get<unicode::Script>(_run.properties), gpos ); if (crispy::logging_sink::for_debug().enabled() && !gpos.empty()) { auto msg = debuglog(TextRendererTag); msg.write("Shaped codepoints: {}", unicode::convert_to<char>(codepoints)); msg.write(" (presentation: {}/{})", isEmojiPresentation ? "emoji" : "text", get<unicode::PresentationStyle>(_run.properties)); msg.write(" ("); for (auto const [i, codepoint] : crispy::indexed(codepoints)) { if (i) msg.write(" "); msg.write("U+{:04X}", unsigned(codepoint)); } msg.write(")\n"); // A single shape run always uses the same font, // so it is sufficient to just print that. // auto const& font = gpos.front().glyph.font; // msg.write("using font: \"{}\" \"{}\" \"{}\"\n", font.familyName(), font.styleName(), font.filePath()); msg.write("with metrics:"); for (text::glyph_position const& gp : gpos) msg.write(" {}", gp); } return gpos; } // }}} // {{{ SimpleTextShaper SimpleTextShaper::SimpleTextShaper(GridMetrics const& _gridMetrics, text::shaper& _textShaper, FontKeys const& _fonts, RenderGlyphs _renderGlyphs): gridMetrics_{ _gridMetrics }, fonts_{ _fonts }, textShaper_{ _textShaper }, renderGlyphs_{ std::move(_renderGlyphs) } { } void SimpleTextShaper::setTextPosition(crispy::Point _position) { textPosition_ = _position; } void SimpleTextShaper::appendCell(crispy::span<char32_t const> _codepoints, TextStyle _style, RGBColor _color) { if (color_ != _color) { flush(); color_ = _color; } optional<text::glyph_position> glyphPositionOpt = textShaper_.shape(getFontForStyle(fonts_, _style), _codepoints[0]); if (!glyphPositionOpt.has_value()) return; glyphPositions_.emplace_back(glyphPositionOpt.value()); cellCount_++; } text::shape_result SimpleTextShaper::cachedGlyphPositions(crispy::span<char32_t const> _codepoints, TextStyle _style) { auto const codepoints = u32string_view(&_codepoints[0], _codepoints.size()); if (auto const cached = cache_.find(TextCacheKey{codepoints, _style}); cached != cache_.end()) return cached->second; auto glyphPositionOpt = textShaper_.shape(getFontForStyle(fonts_, _style), _codepoints[0]); if (!glyphPositionOpt.has_value()) return {}; cacheKeyStorage_.emplace_back(u32string{codepoints}); auto const cacheKeyFromStorage = TextCacheKey{ cacheKeyStorage_.back(), _style }; return cache_[cacheKeyFromStorage] = {glyphPositionOpt.value()}; } void SimpleTextShaper::endSequence() { flush(); } void SimpleTextShaper::flush() { if (glyphPositions_.empty()) return; text::shape_result const& glyphPositions = glyphPositions_; renderGlyphs_(textPosition_, crispy::span(glyphPositions.data(), glyphPositions.size()), color_); glyphPositions_.clear(); textPosition_.x += gridMetrics_.cellSize.width * cellCount_; cellCount_ = 0; } // }}} } // end namespace
34.658574
134
0.588967
[ "shape", "vector" ]
e8838d9342b2423da5a39a2cbc8e4d721fa9cca4
2,508
cpp
C++
src/MotionTrack.cpp
thomasmunoz13/surveillance
19aea0ca9d5e349dbc2c848376d1e3b048b6e420
[ "MIT" ]
null
null
null
src/MotionTrack.cpp
thomasmunoz13/surveillance
19aea0ca9d5e349dbc2c848376d1e3b048b6e420
[ "MIT" ]
4
2016-03-21T08:33:14.000Z
2016-03-21T08:55:43.000Z
src/MotionTrack.cpp
thomasmunoz13/surveillance
19aea0ca9d5e349dbc2c848376d1e3b048b6e420
[ "MIT" ]
5
2016-06-20T22:56:22.000Z
2021-03-06T16:39:11.000Z
/** * @author Thomas Munoz */ #include <chrono> #include <thread> #include "MotionTrack.h" MotionTrack::MotionTrack(Webcam webcam) : webcam(webcam) {} #if DEBUG == 1 void MotionTrack::drawContour(cv::Mat & frame, std::vector<std::vector<cv::Point>> contours) { // In this part we will assume that the largest moving object is the one we want to track // todo : enable multiple object tracking std::vector<std::vector<cv::Point>> largestContour; largestContour.push_back(contours.at(contours.size() - 1)); // Surround the moving object by a rectangle cv::Rect rectangle = cv::boundingRect(largestContour.at(0)); // Set the center of the rectangle (moving object position) //int x = rectangle.x + rectangle.width / 2; //int y = rectangle.y + rectangle.height / 2; //cv::circle(frame, cv::Point(x, y), 20, cv::Scalar(0, 255, 0), 2); // Draw a rectangle surrounding the moving object cv::rectangle(frame, rectangle, cv::Scalar(0, 255, 0)); } #endif bool MotionTrack::detect() { // We first get two frames (we will compare them cv::Mat first = this->webcam.getCurrentFrame(); // Sleep for 333 ms (3fps) std::this_thread::sleep_for(std::chrono::milliseconds(333)); cv::Mat second = this->webcam.getCurrentFrame(); this->lastFrame = second; // Convert both frames in gray (it's better to detect motion) cv::Mat grayFirst, graySecond; cv::cvtColor(first, grayFirst, cv::COLOR_BGR2GRAY); cv::cvtColor(second, graySecond, cv::COLOR_BGR2GRAY); // We compute the absolute difference between the two frames cv::Mat difference; cv::absdiff(grayFirst, graySecond, difference); // Generate the threshold image that will show the intensity of the difference cv::Mat threshold; cv::threshold(difference, threshold, SENSITIVITY, 255, CV_THRESH_BINARY); // Temporary frame in order to draw the contours cv::Mat temp; threshold.copyTo(temp); std::vector<std::vector<cv::Point>> contours; std::vector<cv::Vec4i> hierarchy; // Retrieves external contours cv::findContours(temp, contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE); // We find an object (a motion) if(contours.size() > 0){ #if DEBUG == 1 std::cout << "Motion detected !" << std::endl; drawContour(second, contours); #endif } return contours.size() > 0; } const cv::Mat & MotionTrack::getLastFrame() { return this->lastFrame; }
31.35
94
0.668262
[ "object", "vector" ]
e887b0784f82feb43c8b6e1521a9bc5002fe834e
5,720
cpp
C++
src/database/Database.cpp
graydon/stellar-core-old
b73f254ceb48a63250cb145166ff225606880211
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
src/database/Database.cpp
graydon/stellar-core-old
b73f254ceb48a63250cb145166ff225606880211
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
src/database/Database.cpp
graydon/stellar-core-old
b73f254ceb48a63250cb145166ff225606880211
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
// Copyright 2014 Stellar Development Foundation and contributors. Licensed // under the ISC License. See the COPYING file at the top-level directory of // this distribution or at http://opensource.org/licenses/ISC #include "database/Database.h" #include "generated/StellarXDR.h" #include "overlay/OverlayManager.h" #include "main/Application.h" #include "main/Config.h" #include "main/PersistentState.h" #include "crypto/Hex.h" #include "crypto/Base58.h" #include "util/Logging.h" #include "ledger/LedgerHeaderFrame.h" #include "transactions/TransactionFrame.h" #include "util/types.h" #include "util/make_unique.h" #include "medida/metrics_registry.h" #include "medida/timer.h" #include "bucket/BucketManager.h" #include <stdexcept> #include <vector> #include <sstream> #include <thread> extern "C" void register_factory_sqlite3(); #ifdef USE_POSTGRES extern "C" void register_factory_postgresql(); #endif // NOTE: soci will just crash and not throw // if you misname a column in a query. yay! namespace stellar { using namespace soci; using namespace std; bool Database::gDriversRegistered = false; static void setSerializable(soci::session& sess) { sess << "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL " "SERIALIZABLE"; } void Database::registerDrivers() { if (!gDriversRegistered) { register_factory_sqlite3(); #ifdef USE_POSTGRES register_factory_postgresql(); #endif gDriversRegistered = true; } } Database::Database(Application& app) : mApp(app) { registerDrivers(); CLOG(INFO, "Database") << "Connecting to: " << app.getConfig().DATABASE; mSession.open(app.getConfig().DATABASE); if (isSqlite()) { mSession << "PRAGMA journal_mode = WAL"; } else { setSerializable(mSession); } } medida::TimerContext Database::getInsertTimer(std::string const& entityName) { return mApp.getMetrics() .NewTimer({"database", "insert", entityName}) .TimeScope(); } medida::TimerContext Database::getSelectTimer(std::string const& entityName) { return mApp.getMetrics() .NewTimer({"database", "select", entityName}) .TimeScope(); } medida::TimerContext Database::getDeleteTimer(std::string const& entityName) { return mApp.getMetrics() .NewTimer({"database", "delete", entityName}) .TimeScope(); } medida::TimerContext Database::getUpdateTimer(std::string const& entityName) { return mApp.getMetrics() .NewTimer({"database", "update", entityName}) .TimeScope(); } bool Database::isSqlite() const { return mApp.getConfig().DATABASE.find("sqlite3:") != std::string::npos; } bool Database::canUsePool() const { return !(mApp.getConfig().DATABASE == ("sqlite3://:memory:")); } void Database::initialize() { AccountFrame::dropAll(*this); OfferFrame::dropAll(*this); TrustFrame::dropAll(*this); OverlayManager::dropAll(*this); PersistentState::dropAll(*this); LedgerHeaderFrame::dropAll(*this); TransactionFrame::dropAll(*this); BucketManager::dropAll(mApp); } soci::connection_pool& Database::getPool() { if (!mPool) { std::string const& c = mApp.getConfig().DATABASE; if (!canUsePool()) { std::string s("Can't create connection pool to "); s += c; throw std::runtime_error(s); } size_t n = std::thread::hardware_concurrency(); LOG(INFO) << "Establishing " << n << "-entry connection pool to: " << c; mPool = make_unique<soci::connection_pool>(n); for (size_t i = 0; i < n; ++i) { LOG(DEBUG) << "Opening pool entry " << i; soci::session& sess = mPool->at(i); sess.open(c); if (!isSqlite()) { setSerializable(sess); } } } assert(mPool); return *mPool; } class SQLLogContext : NonCopyable { std::string mName; soci::session& mSess; std::ostringstream mCapture; public: SQLLogContext(std::string const& name, soci::session& sess) : mName(name) , mSess(sess) { mSess.set_log_stream(&mCapture); } ~SQLLogContext() { mSess.set_log_stream(nullptr); std::string captured = mCapture.str(); std::istringstream rd(captured); std::string buf; CLOG(INFO, "Database") << ""; CLOG(INFO, "Database") << ""; CLOG(INFO, "Database") << "[SQL] -----------------------"; CLOG(INFO, "Database") << "[SQL] begin capture: " << mName; CLOG(INFO, "Database") << "[SQL] -----------------------"; while (std::getline(rd, buf)) { CLOG(INFO, "Database") << "[SQL:" << mName << "] " << buf; buf.clear(); } CLOG(INFO, "Database") << "[SQL] -----------------------"; CLOG(INFO, "Database") << "[SQL] end capture: " << mName; CLOG(INFO, "Database") << "[SQL] -----------------------"; CLOG(INFO, "Database") << ""; CLOG(INFO, "Database") << ""; } }; StatementContext Database::getPreparedStatement(std::string const& query) { auto i = mStatements.find(query); std::shared_ptr<soci::statement> p; if (i == mStatements.end()) { p = std::make_shared<soci::statement>(mSession); p->alloc(); p->prepare(query); mStatements.insert(std::make_pair(query, p)); } else { p = i->second; } StatementContext sc(p); return sc; } std::shared_ptr<SQLLogContext> Database::captureAndLogSQL(std::string contextName) { return make_shared<SQLLogContext>(contextName, mSession); } }
24.869565
80
0.608392
[ "vector" ]
e88836009092f52abf8f21fdb86fede9ff228282
15,478
cpp
C++
src/crypto/mbedtls/key_pair.cpp
Perfumiste777/CCF
d3ef3e88b8997d7e1b033f687e45f0de17f26ce6
[ "Apache-2.0" ]
1
2021-05-10T10:10:24.000Z
2021-05-10T10:10:24.000Z
src/crypto/mbedtls/key_pair.cpp
Perfumiste777/CCF
d3ef3e88b8997d7e1b033f687e45f0de17f26ce6
[ "Apache-2.0" ]
null
null
null
src/crypto/mbedtls/key_pair.cpp
Perfumiste777/CCF
d3ef3e88b8997d7e1b033f687e45f0de17f26ce6
[ "Apache-2.0" ]
null
null
null
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the Apache 2.0 License. #include "key_pair.h" #include "curve.h" #include "ds/net.h" #include "entropy.h" #include "hash.h" #define FMT_HEADER_ONLY #include <fmt/format.h> #include <iomanip> #include <limits> #include <mbedtls/asn1write.h> #include <mbedtls/bignum.h> #include <mbedtls/error.h> #include <mbedtls/md.h> #include <mbedtls/oid.h> #include <mbedtls/pem.h> #include <mbedtls/pk.h> #include <mbedtls/x509.h> #include <mbedtls/x509_crt.h> #include <memory> #include <string> namespace crypto { using namespace mbedtls; static mbedtls_ecp_group_id get_mbedtls_group_id(CurveID gid) { switch (gid) { case CurveID::NONE: return MBEDTLS_ECP_DP_NONE; case CurveID::SECP384R1: return MBEDTLS_ECP_DP_SECP384R1; case CurveID::SECP256R1: return MBEDTLS_ECP_DP_SECP256R1; default: throw std::logic_error(fmt::format("unsupported CurveID {}", gid)); } return MBEDTLS_ECP_DP_NONE; } KeyPair_mbedTLS::KeyPair_mbedTLS(CurveID cid) : PublicKey_mbedTLS() { mbedtls_ecp_group_id ec = get_mbedtls_group_id(cid); EntropyPtr entropy = create_entropy(); int rc = mbedtls_pk_setup(ctx.get(), mbedtls_pk_info_from_type(MBEDTLS_PK_ECKEY)); if (rc != 0) { throw std::logic_error( "Could not set up ECDSA context: " + error_string(rc)); } rc = mbedtls_ecp_gen_key( ec, mbedtls_pk_ec(*ctx), entropy->get_rng(), entropy->get_data()); if (rc != 0) { throw std::logic_error( "Could not generate ECDSA keypair: " + error_string(rc)); } const auto actual_ec = get_mbedtls_ec_from_context(*ctx); if (actual_ec != ec) { throw std::logic_error( "Created key and received unexpected type: " + std::to_string(actual_ec) + " != " + error_string(ec)); } } KeyPair_mbedTLS::KeyPair_mbedTLS(const Pem& pem, CBuffer pw) { // keylen is +1 to include terminating null byte int rc = mbedtls_pk_parse_key(ctx.get(), pem.data(), pem.size(), pw.p, pw.n); if (rc != 0) { throw std::logic_error( "Could not parse private key: " + error_string(rc)); } } KeyPair_mbedTLS::KeyPair_mbedTLS(mbedtls::PKContext&& k) : PublicKey_mbedTLS(std::move(k)) {} Pem KeyPair_mbedTLS::private_key_pem() const { uint8_t data[max_pem_key_size]; int rc = mbedtls_pk_write_key_pem(ctx.get(), data, max_pem_key_size); if (rc != 0) { throw std::logic_error("mbedtls_pk_write_key_pem: " + error_string(rc)); } const size_t len = strlen((char const*)data); return Pem(data, len); } Pem KeyPair_mbedTLS::public_key_pem() const { return PublicKey_mbedTLS::public_key_pem(); } std::vector<uint8_t> KeyPair_mbedTLS::public_key_der() const { return PublicKey_mbedTLS::public_key_der(); } bool KeyPair_mbedTLS::verify( const std::vector<uint8_t>& contents, const std::vector<uint8_t>& signature) { return PublicKey_mbedTLS::verify(contents, signature); } bool KeyPair_mbedTLS::verify( const uint8_t* contents, size_t contents_size, const uint8_t* signature, size_t signature_size) { return PublicKey_mbedTLS::verify( contents, contents_size, signature, signature_size); } std::vector<uint8_t> KeyPair_mbedTLS::sign(CBuffer d, MDType md_type) const { if (md_type == MDType::NONE) { md_type = get_md_for_ec(get_curve_id()); } MBedHashProvider hp; HashBytes hash = hp.Hash(d.p, d.rawSize(), md_type); return sign_hash(hash.data(), hash.size()); } int KeyPair_mbedTLS::sign( CBuffer d, size_t* sig_size, uint8_t* sig, MDType md_type) const { if (md_type == MDType::NONE) { md_type = get_md_for_ec(get_curve_id()); } MBedHashProvider hp; HashBytes hash = hp.Hash(d.p, d.rawSize(), md_type); return sign_hash(hash.data(), hash.size(), sig_size, sig); } std::vector<uint8_t> KeyPair_mbedTLS::sign_hash( const uint8_t* hash, size_t hash_size) const { std::vector<uint8_t> sig(MBEDTLS_ECDSA_MAX_LEN); size_t written = sizeof(sig); if (sign_hash(hash, hash_size, &written, sig.data()) != 0) { return {}; } sig.resize(written); return sig; } static int ecdsa_sign_nondet( mbedtls_pk_context* ctx, const uint8_t* hash, size_t hash_size, uint8_t* sig, size_t* sig_size) { EntropyPtr entropy = create_entropy(); mbedtls_ecdsa_context* ecdsa_ctx = (mbedtls_ecdsa_context*)ctx->pk_ctx; mbedtls_mpi sr, ss; mbedtls_mpi_init(&sr); mbedtls_mpi_init(&ss); int r = mbedtls_ecdsa_sign( &ecdsa_ctx->grp, &sr, &ss, &ecdsa_ctx->d, hash, hash_size, entropy->get_rng(), entropy->get_data()); unsigned char buf[MBEDTLS_ECDSA_MAX_LEN]; unsigned char* p = buf + sizeof(buf); size_t len = 0; len += mbedtls_asn1_write_mpi(&p, buf, &ss); len += mbedtls_asn1_write_mpi(&p, buf, &sr); len += mbedtls_asn1_write_len(&p, buf, len); len += mbedtls_asn1_write_tag( &p, buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); memcpy(sig, p, len); *sig_size = len; mbedtls_mpi_free(&sr); mbedtls_mpi_free(&ss); return 0; } int KeyPair_mbedTLS::sign_hash( const uint8_t* hash, size_t hash_size, size_t* sig_size, uint8_t* sig) const { EntropyPtr entropy = create_entropy(); const auto mmdt = get_md_type(get_md_for_ec(get_curve_id())); #ifdef DETERMINISTIC_ECDSA return mbedtls_pk_sign( ctx.get(), mmdt, hash, hash_size, sig, sig_size, entropy->get_rng(), entropy->get_data()); #else return ecdsa_sign_nondet(ctx.get(), hash, hash_size, sig, sig_size); #endif } Pem KeyPair_mbedTLS::create_csr(const std::string& name) const { auto csr = mbedtls::make_unique<mbedtls::X509WriteCsr>(); mbedtls_x509write_csr_set_md_alg(csr.get(), MBEDTLS_MD_SHA512); if (mbedtls_x509write_csr_set_subject_name(csr.get(), name.c_str()) != 0) return {}; mbedtls_x509write_csr_set_key(csr.get(), ctx.get()); uint8_t buf[4096]; memset(buf, 0, sizeof(buf)); EntropyPtr entropy = create_entropy(); if ( mbedtls_x509write_csr_pem( csr.get(), buf, sizeof(buf), entropy->get_rng(), entropy->get_data()) != 0) return {}; auto len = strlen((char*)buf); return Pem(buf, len); } static void MCHK(int rc) { if (rc != 0) { throw std::logic_error( fmt::format("mbedTLS error: {}", error_string(rc))); } } // Unfortunately, mbedtls does not provide a convenient API to write x509v3 // extensions for all supported Subject Alternative Name (SAN). Until they // do, we have to write raw ASN1 ourselves. // rfc5280 does not specify a maximum length for SAN, // but rfc1035 specified that 255 bytes is enough for a DNS name static constexpr auto max_san_length = 256; static constexpr auto max_san_entries = 8; // As per https://tools.ietf.org/html/rfc5280#section-4.2.1.6 enum san_type { other_name = 0, rfc822_name = 1, dns_name = 2, x400_address = 3, directory_name = 4, edi_party_name = 5, uniform_resource_identifier = 6, ip_address = 7, registeredID = 8 }; static inline int x509write_crt_set_subject_alt_name( mbedtls_x509write_cert* ctx, const char* name, san_type san) { uint8_t san_buf[max_san_length]; int ret = 0; size_t len = 0; // mbedtls asn1 write API writes backward in san_buf uint8_t* pc = san_buf + max_san_length; auto name_len = strlen(name); if (name_len > max_san_length) { throw std::logic_error(fmt::format( "Subject Alternative Name {} is too long ({}>{})", name, name_len, max_san_length)); } switch (san) { case san_type::dns_name: { MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( &pc, san_buf, (const unsigned char*)name, name_len)); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len(&pc, san_buf, name_len)); break; } // mbedtls (2.16.2) only supports parsing of subject alternative name // that is DNS= (so no IPAddress=). When connecting to a node that has // IPAddress set, mbedtls_ssl_set_hostname() should not be called. // However, it should work fine with a majority of other clients (e.g. // curl). case san_type::ip_address: { auto addr = ds::ip_to_binary(name); if (!addr.has_value()) { throw std ::logic_error(fmt::format( "Subject Alternative Name {} is not a valid IPv4 or " "IPv6 address", name)); } MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( &pc, san_buf, (const unsigned char*)&addr->buf, addr->size)); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len(&pc, san_buf, addr->size)); break; } default: { throw std::logic_error( fmt::format("Subject Alternative Name {} is not supported", san)); } } MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &pc, san_buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | san)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&pc, san_buf, len)); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &pc, san_buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); return mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_SUBJECT_ALT_NAME, MBEDTLS_OID_SIZE(MBEDTLS_OID_SUBJECT_ALT_NAME), 0, // Mark SAN as non-critical san_buf + max_san_length - len, len); } static inline int x509write_crt_set_subject_alt_names( mbedtls_x509write_cert* ctx, const std::vector<SubjectAltName>& sans) { if (sans.size() == 0) return 0; if (sans.size() > max_san_entries) { throw std::logic_error(fmt::format( "Cannot set more than {} subject alternative names", max_san_entries)); } // The factor of two is an extremely conservative provision for ASN.1 // metadata size_t buf_len = sans.size() * max_san_length * 2; std::vector<uint8_t> buf(buf_len); uint8_t* san_buf = buf.data(); int ret = 0; size_t len = 0; // mbedtls asn1 write API writes backward in san_buf uint8_t* pc = san_buf + buf_len; for (auto& san : sans) { if (san.san.size() > max_san_length) { throw std::logic_error(fmt::format( "Subject Alternative Name {} is too long ({}>{})", san.san, san.san.size(), max_san_length)); } if (san.is_ip) { // mbedtls (2.16.2) only supports parsing of subject alternative name // that is DNS= (so no IPAddress=). When connecting to a node that has // IPAddress set, mbedtls_ssl_set_hostname() should not be called. // However, it should work fine with a majority of other clients (e.g. // curl). auto addr = ds::ip_to_binary(san.san.c_str()); if (!addr.has_value()) { throw std ::logic_error(fmt::format( "Subject Alternative Name {} is not a valid IPv4 or " "IPv6 address", san.san)); } MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( &pc, san_buf, (const unsigned char*)&addr->buf, addr->size)); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len(&pc, san_buf, addr->size)); } else { MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( &pc, san_buf, (const unsigned char*)san.san.data(), san.san.size())); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len(&pc, san_buf, san.san.size())); } MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &pc, san_buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | (san.is_ip ? san_type::ip_address : san_type::dns_name))); } MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&pc, san_buf, len)); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &pc, san_buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); return mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_SUBJECT_ALT_NAME, MBEDTLS_OID_SIZE(MBEDTLS_OID_SUBJECT_ALT_NAME), 0, // Mark SAN as non-critical san_buf + buf_len - len, len); } Pem KeyPair_mbedTLS::sign_csr( const Pem& issuer_cert, const Pem& signing_request, const std::vector<SubjectAltName> subject_alt_names, bool ca) const { auto entropy = create_entropy(); auto csr = mbedtls::make_unique<mbedtls::X509Csr>(); auto serial = mbedtls::make_unique<mbedtls::MPI>(); auto crt = mbedtls::make_unique<mbedtls::X509WriteCrt>(); auto icrt = mbedtls::make_unique<mbedtls::X509Crt>(); MCHK(mbedtls_x509_csr_parse( csr.get(), signing_request.data(), signing_request.size())); char subject[512]; mbedtls_x509_dn_gets(subject, sizeof(subject), &csr->subject); mbedtls_x509write_crt_set_md_alg( crt.get(), get_mbedtls_md_for_ec(get_mbedtls_ec_from_context(*ctx))); mbedtls_x509write_crt_set_subject_key(crt.get(), &csr->pk); if (!issuer_cert.empty()) { MCHK(mbedtls_x509_crt_parse( icrt.get(), issuer_cert.data(), issuer_cert.size())); mbedtls_x509write_crt_set_issuer_key(crt.get(), ctx.get()); char issuer_name[512]; mbedtls_x509_dn_gets(issuer_name, sizeof(issuer_name), &icrt->subject); MCHK(mbedtls_x509write_crt_set_issuer_name(crt.get(), issuer_name)); } else { mbedtls_x509write_crt_set_issuer_key(crt.get(), ctx.get()); MCHK(mbedtls_x509write_crt_set_issuer_name(crt.get(), subject)); } MCHK(mbedtls_mpi_fill_random( serial.get(), 16, entropy->get_rng(), entropy->get_data())); MCHK(mbedtls_x509write_crt_set_subject_name(crt.get(), subject)); MCHK(mbedtls_x509write_crt_set_serial(crt.get(), serial.get())); // Note: 825-day validity range // https://support.apple.com/en-us/HT210176 MCHK(mbedtls_x509write_crt_set_validity( crt.get(), "20210311000000", "20230611235959")); MCHK(mbedtls_x509write_crt_set_basic_constraints(crt.get(), ca ? 1 : 0, 0)); MCHK(mbedtls_x509write_crt_set_subject_key_identifier(crt.get())); MCHK(mbedtls_x509write_crt_set_authority_key_identifier(crt.get())); // Because mbedtls does not support parsing x509v3 extensions from a // CSR (https://github.com/ARMmbed/mbedtls/issues/2912), the CA sets the // SAN directly instead of reading it from the CSR try { MCHK(x509write_crt_set_subject_alt_names(crt.get(), subject_alt_names)); } catch (const std::logic_error& err) { LOG_FAIL_FMT("Error writing SAN: {}", err.what()); return {}; } uint8_t buf[4096]; memset(buf, 0, sizeof(buf)); MCHK(mbedtls_x509write_crt_pem( crt.get(), buf, sizeof(buf), entropy->get_rng(), entropy->get_data())); auto len = strlen((char*)buf); return Pem(buf, len); } }
28.452206
80
0.642783
[ "vector" ]
e88954a136e9e6af539ee9cb3944efee339dcb14
2,682
cpp
C++
engine_base/DebugRenderer.cpp
Blubmin/intelligent_camera
0e9bf122f0f98681e4b5cdfb3ae6fa53ee5b7ce2
[ "Apache-2.0" ]
null
null
null
engine_base/DebugRenderer.cpp
Blubmin/intelligent_camera
0e9bf122f0f98681e4b5cdfb3ae6fa53ee5b7ce2
[ "Apache-2.0" ]
null
null
null
engine_base/DebugRenderer.cpp
Blubmin/intelligent_camera
0e9bf122f0f98681e4b5cdfb3ae6fa53ee5b7ce2
[ "Apache-2.0" ]
null
null
null
#include "DebugRenderer.h" #include <vector> #include <GL\glew.h> #include <GLFW\glfw3.h> #include <glm\glm.hpp> #include <glm\gtc\type_ptr.hpp> #include "Program.h" using namespace glm; using namespace std; DebugRenderer::DebugRenderer(GLuint texture, glm::vec2 pos, float scale) : IRenderer(0) { _prog = new Program("debug.vert", "debug.frag"); _tex = texture; int width, height; glfwGetWindowSize(glfwGetCurrentContext(), &width, &height); _pos = pos; _scale = scale; vector<vec3> verts; verts.push_back(vec3(1, 1, 0)); verts.push_back(vec3(1, -1, 0)); verts.push_back(vec3(-1, -1, 0)); verts.push_back(vec3(-1, 1, 0)); vector<vec2> tex; tex.push_back(vec2(1, 1)); tex.push_back(vec2(1, 0)); tex.push_back(vec2(0, 0)); tex.push_back(vec2(0, 1)); vector<GLuint> indices; indices.push_back(0); indices.push_back(3); indices.push_back(1); indices.push_back(2); indices.push_back(1); indices.push_back(3); glGenVertexArrays(1, &_vao); glBindVertexArray(_vao); GLuint vbo[2]; glGenBuffers(2, vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); glBufferData(GL_ARRAY_BUFFER, verts.size()*sizeof(vec3), verts.data(), GL_STATIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, vbo[1]); glBufferData(GL_ARRAY_BUFFER, tex.size()*sizeof(vec2), tex.data(), GL_STATIC_DRAW); glEnableVertexAttribArray(1); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, 0); GLuint ind; glGenBuffers(1, &ind); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ind); glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices.size()*sizeof(GLuint), indices.data(), GL_STATIC_DRAW); glBindVertexArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } DebugRenderer::~DebugRenderer() {} void DebugRenderer::draw(Scene * scene, ICamera * camera) { GLint viewport[4]; glGetIntegerv(GL_VIEWPORT, viewport); int width, height; glfwGetWindowSize(glfwGetCurrentContext(), &width, &height); glUseProgram(_prog->prog); glViewport(_pos.x, _pos.y, width * _scale, height * _scale); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, _tex); glUniform1i(_prog->uniform("uTex"), 0); glBindVertexArray(_vao); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); glBindVertexArray(0); glViewport(viewport[0], viewport[1], viewport[2], viewport[3]); glBindTexture(GL_TEXTURE_2D, 0); glUseProgram(0); } GLuint DebugRenderer::texture() { return _tex; }
25.788462
89
0.675242
[ "vector" ]
e8938b133350b7b4002c3079b59cdfcad1983e3f
944,199
cpp
C++
tx40_service/tx40_service/soapC.cpp
minhncedutw/tx40-robot-service
70593cbe24ac9685f670887ad2d07c4097929d2b
[ "Apache-2.0" ]
1
2022-02-21T02:44:17.000Z
2022-02-21T02:44:17.000Z
Qt/soapC.cpp
minhncedutw/control_staubli_tx60
249b613032a2f48735b2da98f7056d9dd0980fff
[ "MIT" ]
null
null
null
Qt/soapC.cpp
minhncedutw/control_staubli_tx60
249b613032a2f48735b2da98f7056d9dd0980fff
[ "MIT" ]
null
null
null
/* soapC.cpp Generated by gSOAP 2.7.13 from cs8server.h Copyright(C) 2000-2009, Robert van Engelen, Genivia Inc. All Rights Reserved. This part of the software is released under one of the following licenses: GPL, the gSOAP public license, or Genivia's license for commercial use. */ #if defined(__BORLANDC__) #pragma option push -w-8060 #pragma option push -w-8004 #endif #include "soapH.h" SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.13 2009-05-05 19:42:46 GMT") #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap) { if (soap->header) soap_serialize_SOAP_ENV__Header(soap, soap->header); } SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap) { if (soap->header) { soap->part = SOAP_IN_HEADER; if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, NULL)) return soap->error; soap->part = SOAP_END_HEADER; } return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap) { soap->part = SOAP_IN_HEADER; soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", NULL, NULL); soap->part = SOAP_END_HEADER; return soap->header == NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap) { if (!soap->header) { soap->header = soap_new_SOAP_ENV__Header(soap, -1); soap_default_SOAP_ENV__Header(soap, soap->header); } } SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) { if (!soap->fault) { soap->fault = soap_new_SOAP_ENV__Fault(soap, -1); if (!soap->fault) return; soap_default_SOAP_ENV__Fault(soap, soap->fault); } if (soap->version == 2 && !soap->fault->SOAP_ENV__Code) { soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap, -1); soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code); } if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason) { soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap, -1); soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason); } } SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap) { soap_fault(soap); if (soap->fault) soap_serialize_SOAP_ENV__Fault(soap, soap->fault); } SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap) { if (soap->fault) return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", NULL); return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap) { return (soap->fault = soap_get_SOAP_ENV__Fault(soap, NULL, "SOAP-ENV:Fault", NULL)) == NULL; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap) { soap_fault(soap); if (soap->version == 2) return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value; return (const char**)&soap->fault->faultcode; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap) { soap_fault(soap); if (soap->version == 2) { if (!soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode) { soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap, -1); soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode); } return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; } return (const char**)&soap->fault->faultcode; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap) { soap_fault(soap); if (soap->version == 2) return (const char**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text; return (const char**)&soap->fault->faultstring; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap) { soap_fault(soap); if (soap->version == 1) { if (!soap->fault->detail) { soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail)); soap_default_SOAP_ENV__Detail(soap, soap->fault->detail); } return (const char**)&soap->fault->detail->__any; } if (!soap->fault->SOAP_ENV__Detail) { soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap, -1); soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail); } return (const char**)&soap->fault->SOAP_ENV__Detail->__any; } #endif #ifndef WITH_NOIDREF SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap) { int t; for (;;) if (!soap_getelement(soap, &t)) if (soap->error || soap_ignore_element(soap)) break; if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF) soap->error = SOAP_OK; return soap->error; } #endif #ifndef WITH_NOIDREF #ifdef __cplusplus extern "C" { #endif SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type) { if (soap_peek_element(soap)) return NULL; if (!*soap->id || !(*type = soap_lookup_type(soap, soap->id))) *type = soap_lookup_type(soap, soap->href); switch (*type) { case SOAP_TYPE_byte: return soap_in_byte(soap, NULL, NULL, "xsd:byte"); case SOAP_TYPE_ns1__SessionId: return soap_in_ns1__SessionId(soap, NULL, NULL, "ns1:SessionId"); case SOAP_TYPE_int: return soap_in_int(soap, NULL, NULL, "xsd:int"); case SOAP_TYPE_double: return soap_in_double(soap, NULL, NULL, "xsd:double"); case SOAP_TYPE_unsignedByte: return soap_in_unsignedByte(soap, NULL, NULL, "xsd:unsignedByte"); case SOAP_TYPE_unsignedInt: return soap_in_unsignedInt(soap, NULL, NULL, "xsd:unsignedInt"); case SOAP_TYPE_bool: return soap_in_bool(soap, NULL, NULL, "xsd:boolean"); case SOAP_TYPE_ns6__PowerReturnCode: return soap_in_ns6__PowerReturnCode(soap, NULL, NULL, "ns6:PowerReturnCode"); case SOAP_TYPE_ns6__SchedulingMode: return soap_in_ns6__SchedulingMode(soap, NULL, NULL, "ns6:SchedulingMode"); case SOAP_TYPE_ns6__ReversingResult: return soap_in_ns6__ReversingResult(soap, NULL, NULL, "ns6:ReversingResult"); case SOAP_TYPE_ns6__MotionReturnCode: return soap_in_ns6__MotionReturnCode(soap, NULL, NULL, "ns6:MotionReturnCode"); case SOAP_TYPE_ns6__AboveBelowConfig: return soap_in_ns6__AboveBelowConfig(soap, NULL, NULL, "ns6:AboveBelowConfig"); case SOAP_TYPE_ns6__PositiveNegativeConfig: return soap_in_ns6__PositiveNegativeConfig(soap, NULL, NULL, "ns6:PositiveNegativeConfig"); case SOAP_TYPE_ns6__ShoulderConfig: return soap_in_ns6__ShoulderConfig(soap, NULL, NULL, "ns6:ShoulderConfig"); case SOAP_TYPE_ns6__BlendType: return soap_in_ns6__BlendType(soap, NULL, NULL, "ns6:BlendType"); case SOAP_TYPE_ns6__MoveType: return soap_in_ns6__MoveType(soap, NULL, NULL, "ns6:MoveType"); case SOAP_TYPE_ns1__DiameterAxis3: return soap_in_ns1__DiameterAxis3(soap, NULL, NULL, "ns1:DiameterAxis3"); case SOAP_TYPE_ns1__LengthAxis3: return soap_in_ns1__LengthAxis3(soap, NULL, NULL, "ns1:LengthAxis3"); case SOAP_TYPE_ns1__MountType: return soap_in_ns1__MountType(soap, NULL, NULL, "ns1:MountType"); case SOAP_TYPE_ns1__Kinematic: return soap_in_ns1__Kinematic(soap, NULL, NULL, "ns1:Kinematic"); case SOAP_TYPE_ns1__ServerExceptionCode: return soap_in_ns1__ServerExceptionCode(soap, NULL, NULL, "ns1:ServerExceptionCode"); case SOAP_TYPE_ns6__AllRobotsPos: return soap_in_ns6__AllRobotsPos(soap, NULL, NULL, "ns6:AllRobotsPos"); case SOAP_TYPE_ns6__RobotPos: return soap_in_ns6__RobotPos(soap, NULL, NULL, "ns6:RobotPos"); case SOAP_TYPE_ns6__MotionDesc: return soap_in_ns6__MotionDesc(soap, NULL, NULL, "ns6:MotionDesc"); case SOAP_TYPE_ns6__Config: return soap_in_ns6__Config(soap, NULL, NULL, "ns6:Config"); case SOAP_TYPE_ns6__VrbxConfig: return soap_in_ns6__VrbxConfig(soap, NULL, NULL, "ns6:VrbxConfig"); case SOAP_TYPE_ns6__ScaraConfig: return soap_in_ns6__ScaraConfig(soap, NULL, NULL, "ns6:ScaraConfig"); case SOAP_TYPE_ns6__AnthroConfig: return soap_in_ns6__AnthroConfig(soap, NULL, NULL, "ns6:AnthroConfig"); case SOAP_TYPE_ns6__Frame: return soap_in_ns6__Frame(soap, NULL, NULL, "ns6:Frame"); case SOAP_TYPE_ns6__Records: return soap_in_ns6__Records(soap, NULL, NULL, "ns6:Records"); case SOAP_TYPE_ns6__VALApplications: return soap_in_ns6__VALApplications(soap, NULL, NULL, "ns6:VALApplications"); case SOAP_TYPE_ns6__Robots: return soap_in_ns6__Robots(soap, NULL, NULL, "ns6:Robots"); case SOAP_TYPE_ns6__Versions: return soap_in_ns6__Versions(soap, NULL, NULL, "ns6:Versions"); case SOAP_TYPE_ns6__JointPos: return soap_in_ns6__JointPos(soap, NULL, NULL, "ns6:JointPos"); case SOAP_TYPE_ns5__AllRobotsPos: return soap_in_ns5__AllRobotsPos(soap, NULL, NULL, "ns5:AllRobotsPos"); case SOAP_TYPE_ns5__Records: return soap_in_ns5__Records(soap, NULL, NULL, "ns5:Records"); case SOAP_TYPE_ns5__VALApplications: return soap_in_ns5__VALApplications(soap, NULL, NULL, "ns5:VALApplications"); case SOAP_TYPE_ns5__Robots: return soap_in_ns5__Robots(soap, NULL, NULL, "ns5:Robots"); case SOAP_TYPE_ns5__Versions: return soap_in_ns5__Versions(soap, NULL, NULL, "ns5:Versions"); case SOAP_TYPE_ns5__JointPos: return soap_in_ns5__JointPos(soap, NULL, NULL, "ns5:JointPos"); case SOAP_TYPE_ns4__hexBinary: return soap_in_ns4__hexBinary(soap, NULL, NULL, "ns4:hexBinary"); case SOAP_TYPE_ns4__base64Binary: return soap_in_ns4__base64Binary(soap, NULL, NULL, "ns4:base64Binary"); case SOAP_TYPE_ns3__Include: return soap_in_ns3__Include(soap, NULL, NULL, "ns3:Include"); case SOAP_TYPE_ns2__JointRange: return soap_in_ns2__JointRange(soap, NULL, NULL, "ns2:JointRange"); case SOAP_TYPE_ns2__Records: return soap_in_ns2__Records(soap, NULL, NULL, "ns2:Records"); case SOAP_TYPE_ns2__Data: return soap_in_ns2__Data(soap, NULL, NULL, "ns2:Data"); case SOAP_TYPE_ns2__VALApplications: return soap_in_ns2__VALApplications(soap, NULL, NULL, "ns2:VALApplications"); case SOAP_TYPE_ns2__VALApplication: return soap_in_ns2__VALApplication(soap, NULL, NULL, "ns2:VALApplication"); case SOAP_TYPE_ns1__Parameters: return soap_in_ns1__Parameters(soap, NULL, NULL, "ns1:Parameters"); case SOAP_TYPE_ns1__Parameter: return soap_in_ns1__Parameter(soap, NULL, NULL, "ns1:Parameter"); case SOAP_TYPE_ns1__Robots: return soap_in_ns1__Robots(soap, NULL, NULL, "ns1:Robots"); case SOAP_TYPE_ns1__SoapServerVersion: return soap_in_ns1__SoapServerVersion(soap, NULL, NULL, "ns1:SoapServerVersion"); case SOAP_TYPE_ns1__Versions: return soap_in_ns1__Versions(soap, NULL, NULL, "ns1:Versions"); case SOAP_TYPE_ns1__Version: return soap_in_ns1__Version(soap, NULL, NULL, "ns1:Version"); case SOAP_TYPE_ns1__Robot: return soap_in_ns1__Robot(soap, NULL, NULL, "ns1:Robot"); case SOAP_TYPE_ns1__CartesianPos: return soap_in_ns1__CartesianPos(soap, NULL, NULL, "ns1:CartesianPos"); case SOAP_TYPE_ns1__JointPos: return soap_in_ns1__JointPos(soap, NULL, NULL, "ns1:JointPos"); case SOAP_TYPE_ns1__ServerException: return soap_in_ns1__ServerException(soap, NULL, NULL, "ns1:ServerException"); case SOAP_TYPE_xsd__hexBinary: return soap_in_xsd__hexBinary(soap, NULL, NULL, "xsd:hexBinary"); case SOAP_TYPE_xsd__base64Binary: return soap_in_xsd__base64Binary(soap, NULL, NULL, "xsd:base64Binary"); case SOAP_TYPE_xsd__anyURI: return soap_in_xsd__anyURI(soap, NULL, NULL, "xsd:anyURI"); case SOAP_TYPE_std__string: return soap_in_std__string(soap, NULL, NULL, "xsd:string"); case SOAP_TYPE_PointerTo_ns6__setPowerResponse: return soap_in_PointerTo_ns6__setPowerResponse(soap, NULL, NULL, "ns6:setPowerResponse"); case SOAP_TYPE_PointerTo_ns6__setPower: return soap_in_PointerTo_ns6__setPower(soap, NULL, NULL, "ns6:setPower"); case SOAP_TYPE_PointerTo_ns6__MotionAndRobotsPos: return soap_in_PointerTo_ns6__MotionAndRobotsPos(soap, NULL, NULL, "ns6:MotionAndRobotsPos"); case SOAP_TYPE_PointerTo_ns6__schedulerRefresh: return soap_in_PointerTo_ns6__schedulerRefresh(soap, NULL, NULL, "ns6:schedulerRefresh"); case SOAP_TYPE_PointerTo_ns6__setSchedulingModeResponse: return soap_in_PointerTo_ns6__setSchedulingModeResponse(soap, NULL, NULL, "ns6:setSchedulingModeResponse"); case SOAP_TYPE_PointerTo_ns6__setSchedulingMode: return soap_in_PointerTo_ns6__setSchedulingMode(soap, NULL, NULL, "ns6:setSchedulingMode"); case SOAP_TYPE_PointerTo_ns6__restartMotion: return soap_in_PointerTo_ns6__restartMotion(soap, NULL, NULL, "ns6:restartMotion"); case SOAP_TYPE_PointerTo_ns6__stopMotion: return soap_in_PointerTo_ns6__stopMotion(soap, NULL, NULL, "ns6:stopMotion"); case SOAP_TYPE_PointerTo_ns6__motionResponse: return soap_in_PointerTo_ns6__motionResponse(soap, NULL, NULL, "ns6:motionResponse"); case SOAP_TYPE_PointerTo_ns6__resetMotion: return soap_in_PointerTo_ns6__resetMotion(soap, NULL, NULL, "ns6:resetMotion"); case SOAP_TYPE_PointerTo_ns6__moveC: return soap_in_PointerTo_ns6__moveC(soap, NULL, NULL, "ns6:moveC"); case SOAP_TYPE_PointerTo_ns6__moveL: return soap_in_PointerTo_ns6__moveL(soap, NULL, NULL, "ns6:moveL"); case SOAP_TYPE_PointerTo_ns6__moveJC: return soap_in_PointerTo_ns6__moveJC(soap, NULL, NULL, "ns6:moveJC"); case SOAP_TYPE_PointerTo_ns6__moveResponse: return soap_in_PointerTo_ns6__moveResponse(soap, NULL, NULL, "ns6:moveResponse"); case SOAP_TYPE_PointerTo_ns6__moveJJ: return soap_in_PointerTo_ns6__moveJJ(soap, NULL, NULL, "ns6:moveJJ"); case SOAP_TYPE_PointerTo_ns6__reverseKinResponse: return soap_in_PointerTo_ns6__reverseKinResponse(soap, NULL, NULL, "ns6:reverseKinResponse"); case SOAP_TYPE_PointerTo_ns6__reverseKin: return soap_in_PointerTo_ns6__reverseKin(soap, NULL, NULL, "ns6:reverseKin"); case SOAP_TYPE_PointerTo_ns6__forwardKinResponse: return soap_in_PointerTo_ns6__forwardKinResponse(soap, NULL, NULL, "ns6:forwardKinResponse"); case SOAP_TYPE_PointerTo_ns6__forwardKin: return soap_in_PointerTo_ns6__forwardKin(soap, NULL, NULL, "ns6:forwardKin"); case SOAP_TYPE_PointerTo_ns2__getJointRangeResponse: return soap_in_PointerTo_ns2__getJointRangeResponse(soap, NULL, NULL, "ns2:getJointRangeResponse"); case SOAP_TYPE_PointerTo_ns2__getJointRange: return soap_in_PointerTo_ns2__getJointRange(soap, NULL, NULL, "ns2:getJointRange"); case SOAP_TYPE_PointerTo_ns2__getRecordResponse: return soap_in_PointerTo_ns2__getRecordResponse(soap, NULL, NULL, "ns2:getRecordResponse"); case SOAP_TYPE_PointerTo_ns2__getRecord: return soap_in_PointerTo_ns2__getRecord(soap, NULL, NULL, "ns2:getRecord"); case SOAP_TYPE_PointerTo_ns2__getRecordsResponse: return soap_in_PointerTo_ns2__getRecordsResponse(soap, NULL, NULL, "ns2:getRecordsResponse"); case SOAP_TYPE_PointerTo_ns2__getRecords: return soap_in_PointerTo_ns2__getRecords(soap, NULL, NULL, "ns2:getRecords"); case SOAP_TYPE_PointerTo_ns2__getApplicationDatasResponse: return soap_in_PointerTo_ns2__getApplicationDatasResponse(soap, NULL, NULL, "ns2:getApplicationDatasResponse"); case SOAP_TYPE_PointerTo_ns2__getApplicationDatas: return soap_in_PointerTo_ns2__getApplicationDatas(soap, NULL, NULL, "ns2:getApplicationDatas"); case SOAP_TYPE_PointerTo_ns2__getApplicationsResponse: return soap_in_PointerTo_ns2__getApplicationsResponse(soap, NULL, NULL, "ns2:getApplicationsResponse"); case SOAP_TYPE_PointerTo_ns2__getApplications: return soap_in_PointerTo_ns2__getApplications(soap, NULL, NULL, "ns2:getApplications"); case SOAP_TYPE_PointerTo_ns1__setRobotPosResponse: return soap_in_PointerTo_ns1__setRobotPosResponse(soap, NULL, NULL, "ns1:setRobotPosResponse"); case SOAP_TYPE_PointerTo_ns1__setRobotJointPos: return soap_in_PointerTo_ns1__setRobotJointPos(soap, NULL, NULL, "ns1:setRobotJointPos"); case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPosResponse: return soap_in_PointerTo_ns1__getRobotJntCartPosResponse(soap, NULL, NULL, "ns1:getRobotJntCartPosResponse"); case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPos: return soap_in_PointerTo_ns1__getRobotJntCartPos(soap, NULL, NULL, "ns1:getRobotJntCartPos"); case SOAP_TYPE_PointerTo_ns1__getRobotJointPosResponse: return soap_in_PointerTo_ns1__getRobotJointPosResponse(soap, NULL, NULL, "ns1:getRobotJointPosResponse"); case SOAP_TYPE_PointerTo_ns1__getRobotJointPos: return soap_in_PointerTo_ns1__getRobotJointPos(soap, NULL, NULL, "ns1:getRobotJointPos"); case SOAP_TYPE_PointerTo_ns1__getRobotsResponse: return soap_in_PointerTo_ns1__getRobotsResponse(soap, NULL, NULL, "ns1:getRobotsResponse"); case SOAP_TYPE_PointerTo_ns1__getRobots: return soap_in_PointerTo_ns1__getRobots(soap, NULL, NULL, "ns1:getRobots"); case SOAP_TYPE_PointerTo_ns1__logoutResponse: return soap_in_PointerTo_ns1__logoutResponse(soap, NULL, NULL, "ns1:logoutResponse"); case SOAP_TYPE_PointerTo_ns1__logout: return soap_in_PointerTo_ns1__logout(soap, NULL, NULL, "ns1:logout"); case SOAP_TYPE_PointerTo_ns1__loginResponse: return soap_in_PointerTo_ns1__loginResponse(soap, NULL, NULL, "ns1:loginResponse"); case SOAP_TYPE_PointerTo_ns1__login: return soap_in_PointerTo_ns1__login(soap, NULL, NULL, "ns1:login"); case SOAP_TYPE_PointerTo_ns1__getCS8VersionsResponse: return soap_in_PointerTo_ns1__getCS8VersionsResponse(soap, NULL, NULL, "ns1:getCS8VersionsResponse"); case SOAP_TYPE_PointerTo_ns1__getCS8Versions: return soap_in_PointerTo_ns1__getCS8Versions(soap, NULL, NULL, "ns1:getCS8Versions"); case SOAP_TYPE_PointerTo_ns1__pingResponse: return soap_in_PointerTo_ns1__pingResponse(soap, NULL, NULL, "ns1:pingResponse"); case SOAP_TYPE_PointerTo_ns1__ping: return soap_in_PointerTo_ns1__ping(soap, NULL, NULL, "ns1:ping"); case SOAP_TYPE_PointerTo_ns1__getSoapServerVersionResponse: return soap_in_PointerTo_ns1__getSoapServerVersionResponse(soap, NULL, NULL, "ns1:getSoapServerVersionResponse"); case SOAP_TYPE_PointerTo_ns1__getSoapServerVersion: return soap_in_PointerTo_ns1__getSoapServerVersion(soap, NULL, NULL, "ns1:getSoapServerVersion"); case SOAP_TYPE_PointerTons1__ServerException: return soap_in_PointerTons1__ServerException(soap, NULL, NULL, "ns1:ServerException"); case SOAP_TYPE_PointerTons1__SessionId: return soap_in_PointerTons1__SessionId(soap, NULL, NULL, "ns1:SessionId"); case SOAP_TYPE_PointerTons6__AllRobotsPos: return soap_in_PointerTons6__AllRobotsPos(soap, NULL, NULL, "ns6:AllRobotsPos"); case SOAP_TYPE_PointerTons6__MotionDesc: return soap_in_PointerTons6__MotionDesc(soap, NULL, NULL, "ns6:MotionDesc"); case SOAP_TYPE_PointerTons6__Config: return soap_in_PointerTons6__Config(soap, NULL, NULL, "ns6:Config"); case SOAP_TYPE_PointerTons6__Frame: return soap_in_PointerTons6__Frame(soap, NULL, NULL, "ns6:Frame"); case SOAP_TYPE_PointerTons6__VrbxConfig: return soap_in_PointerTons6__VrbxConfig(soap, NULL, NULL, "ns6:VrbxConfig"); case SOAP_TYPE_PointerTons6__ScaraConfig: return soap_in_PointerTons6__ScaraConfig(soap, NULL, NULL, "ns6:ScaraConfig"); case SOAP_TYPE_PointerTons6__AnthroConfig: return soap_in_PointerTons6__AnthroConfig(soap, NULL, NULL, "ns6:AnthroConfig"); case SOAP_TYPE_PointerTons6__RobotPos: return soap_in_PointerTons6__RobotPos(soap, NULL, NULL, "ns6:RobotPos"); case SOAP_TYPE_PointerTons2__JointRange: return soap_in_PointerTons2__JointRange(soap, NULL, NULL, "ns2:JointRange"); case SOAP_TYPE_PointerTons2__Records: return soap_in_PointerTons2__Records(soap, NULL, NULL, "ns2:Records"); case SOAP_TYPE_PointerTons2__VALApplications: return soap_in_PointerTons2__VALApplications(soap, NULL, NULL, "ns2:VALApplications"); case SOAP_TYPE_PointerTons3__Include: return soap_in_PointerTons3__Include(soap, NULL, NULL, "ns3:Include"); case SOAP_TYPE_PointerTons2__VALApplication: return soap_in_PointerTons2__VALApplication(soap, NULL, NULL, "ns2:VALApplication"); case SOAP_TYPE_PointerTons1__Parameters: return soap_in_PointerTons1__Parameters(soap, NULL, NULL, "ns1:Parameters"); case SOAP_TYPE_PointerTons1__CartesianPos: return soap_in_PointerTons1__CartesianPos(soap, NULL, NULL, "ns1:CartesianPos"); case SOAP_TYPE_PointerTons1__JointPos: return soap_in_PointerTons1__JointPos(soap, NULL, NULL, "ns1:JointPos"); case SOAP_TYPE_PointerTons1__Robots: return soap_in_PointerTons1__Robots(soap, NULL, NULL, "ns1:Robots"); case SOAP_TYPE_PointerTons1__Versions: return soap_in_PointerTons1__Versions(soap, NULL, NULL, "ns1:Versions"); case SOAP_TYPE_PointerTons1__SoapServerVersion: return soap_in_PointerTons1__SoapServerVersion(soap, NULL, NULL, "ns1:SoapServerVersion"); case SOAP_TYPE_PointerTons1__Parameter: return soap_in_PointerTons1__Parameter(soap, NULL, NULL, "ns1:Parameter"); case SOAP_TYPE_PointerTons1__Robot: return soap_in_PointerTons1__Robot(soap, NULL, NULL, "ns1:Robot"); case SOAP_TYPE_PointerTons1__Version: return soap_in_PointerTons1__Version(soap, NULL, NULL, "ns1:Version"); case SOAP_TYPE_PointerTostd__string: return soap_in_PointerTostd__string(soap, NULL, NULL, "xsd:string"); case SOAP_TYPE_PointerTounsignedByte: return soap_in_PointerTounsignedByte(soap, NULL, NULL, "xsd:unsignedByte"); case SOAP_TYPE__QName: { char **s; s = soap_in__QName(soap, NULL, NULL, "xsd:QName"); return s ? *s : NULL; } case SOAP_TYPE_string: { char **s; s = soap_in_string(soap, NULL, NULL, "xsd:string"); return s ? *s : NULL; } default: { const char *t = soap->type; if (!*t) t = soap->tag; if (!soap_match_tag(soap, t, "ns6:AllRobotsPos")) { *type = SOAP_TYPE_ns6__AllRobotsPos; return soap_in_ns6__AllRobotsPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:RobotPos")) { *type = SOAP_TYPE_ns6__RobotPos; return soap_in_ns6__RobotPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:MotionDesc")) { *type = SOAP_TYPE_ns6__MotionDesc; return soap_in_ns6__MotionDesc(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:Config")) { *type = SOAP_TYPE_ns6__Config; return soap_in_ns6__Config(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:VrbxConfig")) { *type = SOAP_TYPE_ns6__VrbxConfig; return soap_in_ns6__VrbxConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:ScaraConfig")) { *type = SOAP_TYPE_ns6__ScaraConfig; return soap_in_ns6__ScaraConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:AnthroConfig")) { *type = SOAP_TYPE_ns6__AnthroConfig; return soap_in_ns6__AnthroConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:Frame")) { *type = SOAP_TYPE_ns6__Frame; return soap_in_ns6__Frame(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:Records")) { *type = SOAP_TYPE_ns6__Records; return soap_in_ns6__Records(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:VALApplications")) { *type = SOAP_TYPE_ns6__VALApplications; return soap_in_ns6__VALApplications(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:Robots")) { *type = SOAP_TYPE_ns6__Robots; return soap_in_ns6__Robots(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:Versions")) { *type = SOAP_TYPE_ns6__Versions; return soap_in_ns6__Versions(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:JointPos")) { *type = SOAP_TYPE_ns6__JointPos; return soap_in_ns6__JointPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:AllRobotsPos")) { *type = SOAP_TYPE_ns5__AllRobotsPos; return soap_in_ns5__AllRobotsPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:Records")) { *type = SOAP_TYPE_ns5__Records; return soap_in_ns5__Records(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:VALApplications")) { *type = SOAP_TYPE_ns5__VALApplications; return soap_in_ns5__VALApplications(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:Robots")) { *type = SOAP_TYPE_ns5__Robots; return soap_in_ns5__Robots(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:Versions")) { *type = SOAP_TYPE_ns5__Versions; return soap_in_ns5__Versions(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns5:JointPos")) { *type = SOAP_TYPE_ns5__JointPos; return soap_in_ns5__JointPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns4:hexBinary")) { *type = SOAP_TYPE_ns4__hexBinary; return soap_in_ns4__hexBinary(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns4:base64Binary")) { *type = SOAP_TYPE_ns4__base64Binary; return soap_in_ns4__base64Binary(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns3:Include")) { *type = SOAP_TYPE_ns3__Include; return soap_in_ns3__Include(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:JointRange")) { *type = SOAP_TYPE_ns2__JointRange; return soap_in_ns2__JointRange(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:Records")) { *type = SOAP_TYPE_ns2__Records; return soap_in_ns2__Records(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:Data")) { *type = SOAP_TYPE_ns2__Data; return soap_in_ns2__Data(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:VALApplications")) { *type = SOAP_TYPE_ns2__VALApplications; return soap_in_ns2__VALApplications(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:VALApplication")) { *type = SOAP_TYPE_ns2__VALApplication; return soap_in_ns2__VALApplication(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Parameters")) { *type = SOAP_TYPE_ns1__Parameters; return soap_in_ns1__Parameters(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Parameter")) { *type = SOAP_TYPE_ns1__Parameter; return soap_in_ns1__Parameter(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Robots")) { *type = SOAP_TYPE_ns1__Robots; return soap_in_ns1__Robots(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:SoapServerVersion")) { *type = SOAP_TYPE_ns1__SoapServerVersion; return soap_in_ns1__SoapServerVersion(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Versions")) { *type = SOAP_TYPE_ns1__Versions; return soap_in_ns1__Versions(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Version")) { *type = SOAP_TYPE_ns1__Version; return soap_in_ns1__Version(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Robot")) { *type = SOAP_TYPE_ns1__Robot; return soap_in_ns1__Robot(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:CartesianPos")) { *type = SOAP_TYPE_ns1__CartesianPos; return soap_in_ns1__CartesianPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:JointPos")) { *type = SOAP_TYPE_ns1__JointPos; return soap_in_ns1__JointPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:ServerException")) { *type = SOAP_TYPE_ns1__ServerException; return soap_in_ns1__ServerException(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:hexBinary")) { *type = SOAP_TYPE_xsd__hexBinary; return soap_in_xsd__hexBinary(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:base64Binary")) { *type = SOAP_TYPE_xsd__base64Binary; return soap_in_xsd__base64Binary(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:anyURI")) { *type = SOAP_TYPE_xsd__anyURI; return soap_in_xsd__anyURI(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:string")) { *type = SOAP_TYPE_std__string; return soap_in_std__string(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:byte")) { *type = SOAP_TYPE_byte; return soap_in_byte(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:SessionId")) { *type = SOAP_TYPE_ns1__SessionId; return soap_in_ns1__SessionId(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:int")) { *type = SOAP_TYPE_int; return soap_in_int(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:double")) { *type = SOAP_TYPE_double; return soap_in_double(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:unsignedByte")) { *type = SOAP_TYPE_unsignedByte; return soap_in_unsignedByte(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:unsignedInt")) { *type = SOAP_TYPE_unsignedInt; return soap_in_unsignedInt(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:boolean")) { *type = SOAP_TYPE_bool; return soap_in_bool(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:PowerReturnCode")) { *type = SOAP_TYPE_ns6__PowerReturnCode; return soap_in_ns6__PowerReturnCode(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:SchedulingMode")) { *type = SOAP_TYPE_ns6__SchedulingMode; return soap_in_ns6__SchedulingMode(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:ReversingResult")) { *type = SOAP_TYPE_ns6__ReversingResult; return soap_in_ns6__ReversingResult(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:MotionReturnCode")) { *type = SOAP_TYPE_ns6__MotionReturnCode; return soap_in_ns6__MotionReturnCode(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:AboveBelowConfig")) { *type = SOAP_TYPE_ns6__AboveBelowConfig; return soap_in_ns6__AboveBelowConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:PositiveNegativeConfig")) { *type = SOAP_TYPE_ns6__PositiveNegativeConfig; return soap_in_ns6__PositiveNegativeConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:ShoulderConfig")) { *type = SOAP_TYPE_ns6__ShoulderConfig; return soap_in_ns6__ShoulderConfig(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:BlendType")) { *type = SOAP_TYPE_ns6__BlendType; return soap_in_ns6__BlendType(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:MoveType")) { *type = SOAP_TYPE_ns6__MoveType; return soap_in_ns6__MoveType(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:DiameterAxis3")) { *type = SOAP_TYPE_ns1__DiameterAxis3; return soap_in_ns1__DiameterAxis3(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:LengthAxis3")) { *type = SOAP_TYPE_ns1__LengthAxis3; return soap_in_ns1__LengthAxis3(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:MountType")) { *type = SOAP_TYPE_ns1__MountType; return soap_in_ns1__MountType(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:Kinematic")) { *type = SOAP_TYPE_ns1__Kinematic; return soap_in_ns1__Kinematic(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:ServerExceptionCode")) { *type = SOAP_TYPE_ns1__ServerExceptionCode; return soap_in_ns1__ServerExceptionCode(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "xsd:QName")) { char **s; *type = SOAP_TYPE__QName; s = soap_in__QName(soap, NULL, NULL, NULL); return s ? *s : NULL; } if (!soap_match_tag(soap, t, "xsd:string")) { char **s; *type = SOAP_TYPE_string; s = soap_in_string(soap, NULL, NULL, NULL); return s ? *s : NULL; } t = soap->tag; if (!soap_match_tag(soap, t, "ns6:setPowerResponse")) { *type = SOAP_TYPE__ns6__setPowerResponse; return soap_in__ns6__setPowerResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:setPower")) { *type = SOAP_TYPE__ns6__setPower; return soap_in__ns6__setPower(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:MotionAndRobotsPos")) { *type = SOAP_TYPE__ns6__MotionAndRobotsPos; return soap_in__ns6__MotionAndRobotsPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:schedulerRefresh")) { *type = SOAP_TYPE__ns6__schedulerRefresh; return soap_in__ns6__schedulerRefresh(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:setSchedulingModeResponse")) { *type = SOAP_TYPE__ns6__setSchedulingModeResponse; return soap_in__ns6__setSchedulingModeResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:setSchedulingMode")) { *type = SOAP_TYPE__ns6__setSchedulingMode; return soap_in__ns6__setSchedulingMode(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:restartMotion")) { *type = SOAP_TYPE__ns6__restartMotion; return soap_in__ns6__restartMotion(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:stopMotion")) { *type = SOAP_TYPE__ns6__stopMotion; return soap_in__ns6__stopMotion(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:motionResponse")) { *type = SOAP_TYPE__ns6__motionResponse; return soap_in__ns6__motionResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:resetMotion")) { *type = SOAP_TYPE__ns6__resetMotion; return soap_in__ns6__resetMotion(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:moveC")) { *type = SOAP_TYPE__ns6__moveC; return soap_in__ns6__moveC(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:moveL")) { *type = SOAP_TYPE__ns6__moveL; return soap_in__ns6__moveL(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:moveJC")) { *type = SOAP_TYPE__ns6__moveJC; return soap_in__ns6__moveJC(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:moveResponse")) { *type = SOAP_TYPE__ns6__moveResponse; return soap_in__ns6__moveResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:moveJJ")) { *type = SOAP_TYPE__ns6__moveJJ; return soap_in__ns6__moveJJ(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:reverseKinResponse")) { *type = SOAP_TYPE__ns6__reverseKinResponse; return soap_in__ns6__reverseKinResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:reverseKin")) { *type = SOAP_TYPE__ns6__reverseKin; return soap_in__ns6__reverseKin(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:forwardKinResponse")) { *type = SOAP_TYPE__ns6__forwardKinResponse; return soap_in__ns6__forwardKinResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns6:forwardKin")) { *type = SOAP_TYPE__ns6__forwardKin; return soap_in__ns6__forwardKin(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getJointRangeResponse")) { *type = SOAP_TYPE__ns2__getJointRangeResponse; return soap_in__ns2__getJointRangeResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getJointRange")) { *type = SOAP_TYPE__ns2__getJointRange; return soap_in__ns2__getJointRange(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getRecordResponse")) { *type = SOAP_TYPE__ns2__getRecordResponse; return soap_in__ns2__getRecordResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getRecord")) { *type = SOAP_TYPE__ns2__getRecord; return soap_in__ns2__getRecord(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getRecordsResponse")) { *type = SOAP_TYPE__ns2__getRecordsResponse; return soap_in__ns2__getRecordsResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getRecords")) { *type = SOAP_TYPE__ns2__getRecords; return soap_in__ns2__getRecords(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getApplicationDatasResponse")) { *type = SOAP_TYPE__ns2__getApplicationDatasResponse; return soap_in__ns2__getApplicationDatasResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getApplicationDatas")) { *type = SOAP_TYPE__ns2__getApplicationDatas; return soap_in__ns2__getApplicationDatas(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getApplicationsResponse")) { *type = SOAP_TYPE__ns2__getApplicationsResponse; return soap_in__ns2__getApplicationsResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns2:getApplications")) { *type = SOAP_TYPE__ns2__getApplications; return soap_in__ns2__getApplications(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getCS8CompatibilityResponse")) { *type = SOAP_TYPE__ns1__getCS8CompatibilityResponse; return soap_in__ns1__getCS8CompatibilityResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getCS8Compatibility")) { *type = SOAP_TYPE__ns1__getCS8Compatibility; return soap_in__ns1__getCS8Compatibility(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getControllerParametersResponse")) { *type = SOAP_TYPE__ns1__getControllerParametersResponse; return soap_in__ns1__getControllerParametersResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getControllerParameters")) { *type = SOAP_TYPE__ns1__getControllerParameters; return soap_in__ns1__getControllerParameters(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:findServerResponse")) { *type = SOAP_TYPE__ns1__findServerResponse; return soap_in__ns1__findServerResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:findServer")) { *type = SOAP_TYPE__ns1__findServer; return soap_in__ns1__findServer(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:setRobotPosResponse")) { *type = SOAP_TYPE__ns1__setRobotPosResponse; return soap_in__ns1__setRobotPosResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:setRobotJointPos")) { *type = SOAP_TYPE__ns1__setRobotJointPos; return soap_in__ns1__setRobotJointPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobotJntCartPosResponse")) { *type = SOAP_TYPE__ns1__getRobotJntCartPosResponse; return soap_in__ns1__getRobotJntCartPosResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobotJntCartPos")) { *type = SOAP_TYPE__ns1__getRobotJntCartPos; return soap_in__ns1__getRobotJntCartPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobotJointPosResponse")) { *type = SOAP_TYPE__ns1__getRobotJointPosResponse; return soap_in__ns1__getRobotJointPosResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobotJointPos")) { *type = SOAP_TYPE__ns1__getRobotJointPos; return soap_in__ns1__getRobotJointPos(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobotsResponse")) { *type = SOAP_TYPE__ns1__getRobotsResponse; return soap_in__ns1__getRobotsResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getRobots")) { *type = SOAP_TYPE__ns1__getRobots; return soap_in__ns1__getRobots(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:logoutResponse")) { *type = SOAP_TYPE__ns1__logoutResponse; return soap_in__ns1__logoutResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:logout")) { *type = SOAP_TYPE__ns1__logout; return soap_in__ns1__logout(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:loginResponse")) { *type = SOAP_TYPE__ns1__loginResponse; return soap_in__ns1__loginResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:login")) { *type = SOAP_TYPE__ns1__login; return soap_in__ns1__login(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getCS8VersionsResponse")) { *type = SOAP_TYPE__ns1__getCS8VersionsResponse; return soap_in__ns1__getCS8VersionsResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getCS8Versions")) { *type = SOAP_TYPE__ns1__getCS8Versions; return soap_in__ns1__getCS8Versions(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:pingResponse")) { *type = SOAP_TYPE__ns1__pingResponse; return soap_in__ns1__pingResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:ping")) { *type = SOAP_TYPE__ns1__ping; return soap_in__ns1__ping(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getSoapServerVersionResponse")) { *type = SOAP_TYPE__ns1__getSoapServerVersionResponse; return soap_in__ns1__getSoapServerVersionResponse(soap, NULL, NULL, NULL); } if (!soap_match_tag(soap, t, "ns1:getSoapServerVersion")) { *type = SOAP_TYPE__ns1__getSoapServerVersion; return soap_in__ns1__getSoapServerVersion(soap, NULL, NULL, NULL); } } } soap->error = SOAP_TAG_MISMATCH; return NULL; } #ifdef __cplusplus } #endif #endif SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap) { if (!soap_peek_element(soap)) { int t; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input (level=%u, %d)\n", soap->tag, soap->level, soap->body)); if (soap->mustUnderstand && !soap->other) return soap->error = SOAP_MUSTUNDERSTAND; if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:")) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag)); return soap->error = SOAP_TAG_MISMATCH; } if (!*soap->id || !soap_getelement(soap, &t)) { soap->peeked = 0; if (soap->fignore) soap->error = soap->fignore(soap, soap->tag); else soap->error = SOAP_OK; DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag)); if (!soap->error && soap->body) { soap->level++; while (!soap_ignore_element(soap)) ; if (soap->error == SOAP_NO_TAG) soap->error = soap_element_end_in(soap, NULL); } } } return soap->error; } #ifndef WITH_NOIDREF SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap) { int i; struct soap_plist *pp; if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH))) for (i = 0; i < SOAP_PTRHASH; i++) for (pp = soap->pht[i]; pp; pp = pp->next) if (pp->mark1 == 2 || pp->mark2 == 2) if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type)) return soap->error; return SOAP_OK; } #endif #ifndef WITH_NOIDREF #ifdef __cplusplus extern "C" { #endif SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, const char *tag, int id, int type) { switch (type) { case SOAP_TYPE_byte: return soap_out_byte(soap, tag, id, (const char *)ptr, "xsd:byte"); case SOAP_TYPE_ns1__SessionId: return soap_out_ns1__SessionId(soap, tag, id, (const int *)ptr, "ns1:SessionId"); case SOAP_TYPE_int: return soap_out_int(soap, tag, id, (const int *)ptr, "xsd:int"); case SOAP_TYPE_double: return soap_out_double(soap, tag, id, (const double *)ptr, "xsd:double"); case SOAP_TYPE_unsignedByte: return soap_out_unsignedByte(soap, tag, id, (const unsigned char *)ptr, "xsd:unsignedByte"); case SOAP_TYPE_unsignedInt: return soap_out_unsignedInt(soap, tag, id, (const unsigned int *)ptr, "xsd:unsignedInt"); case SOAP_TYPE_bool: return soap_out_bool(soap, tag, id, (const bool *)ptr, "xsd:boolean"); case SOAP_TYPE_ns6__PowerReturnCode: return soap_out_ns6__PowerReturnCode(soap, tag, id, (const enum ns6__PowerReturnCode *)ptr, "ns6:PowerReturnCode"); case SOAP_TYPE_ns6__SchedulingMode: return soap_out_ns6__SchedulingMode(soap, tag, id, (const enum ns6__SchedulingMode *)ptr, "ns6:SchedulingMode"); case SOAP_TYPE_ns6__ReversingResult: return soap_out_ns6__ReversingResult(soap, tag, id, (const enum ns6__ReversingResult *)ptr, "ns6:ReversingResult"); case SOAP_TYPE_ns6__MotionReturnCode: return soap_out_ns6__MotionReturnCode(soap, tag, id, (const enum ns6__MotionReturnCode *)ptr, "ns6:MotionReturnCode"); case SOAP_TYPE_ns6__AboveBelowConfig: return soap_out_ns6__AboveBelowConfig(soap, tag, id, (const enum ns6__AboveBelowConfig *)ptr, "ns6:AboveBelowConfig"); case SOAP_TYPE_ns6__PositiveNegativeConfig: return soap_out_ns6__PositiveNegativeConfig(soap, tag, id, (const enum ns6__PositiveNegativeConfig *)ptr, "ns6:PositiveNegativeConfig"); case SOAP_TYPE_ns6__ShoulderConfig: return soap_out_ns6__ShoulderConfig(soap, tag, id, (const enum ns6__ShoulderConfig *)ptr, "ns6:ShoulderConfig"); case SOAP_TYPE_ns6__BlendType: return soap_out_ns6__BlendType(soap, tag, id, (const enum ns6__BlendType *)ptr, "ns6:BlendType"); case SOAP_TYPE_ns6__MoveType: return soap_out_ns6__MoveType(soap, tag, id, (const enum ns6__MoveType *)ptr, "ns6:MoveType"); case SOAP_TYPE_ns1__DiameterAxis3: return soap_out_ns1__DiameterAxis3(soap, tag, id, (const enum ns1__DiameterAxis3 *)ptr, "ns1:DiameterAxis3"); case SOAP_TYPE_ns1__LengthAxis3: return soap_out_ns1__LengthAxis3(soap, tag, id, (const enum ns1__LengthAxis3 *)ptr, "ns1:LengthAxis3"); case SOAP_TYPE_ns1__MountType: return soap_out_ns1__MountType(soap, tag, id, (const enum ns1__MountType *)ptr, "ns1:MountType"); case SOAP_TYPE_ns1__Kinematic: return soap_out_ns1__Kinematic(soap, tag, id, (const enum ns1__Kinematic *)ptr, "ns1:Kinematic"); case SOAP_TYPE_ns1__ServerExceptionCode: return soap_out_ns1__ServerExceptionCode(soap, tag, id, (const enum ns1__ServerExceptionCode *)ptr, "ns1:ServerExceptionCode"); case SOAP_TYPE__ns6__setPowerResponse: return ((_ns6__setPowerResponse *)ptr)->soap_out(soap, "ns6:setPowerResponse", id, NULL); case SOAP_TYPE__ns6__setPower: return ((_ns6__setPower *)ptr)->soap_out(soap, "ns6:setPower", id, NULL); case SOAP_TYPE__ns6__MotionAndRobotsPos: return ((_ns6__MotionAndRobotsPos *)ptr)->soap_out(soap, "ns6:MotionAndRobotsPos", id, NULL); case SOAP_TYPE__ns6__schedulerRefresh: return ((_ns6__schedulerRefresh *)ptr)->soap_out(soap, "ns6:schedulerRefresh", id, NULL); case SOAP_TYPE__ns6__setSchedulingModeResponse: return ((_ns6__setSchedulingModeResponse *)ptr)->soap_out(soap, "ns6:setSchedulingModeResponse", id, NULL); case SOAP_TYPE__ns6__setSchedulingMode: return ((_ns6__setSchedulingMode *)ptr)->soap_out(soap, "ns6:setSchedulingMode", id, NULL); case SOAP_TYPE__ns6__restartMotion: return ((_ns6__restartMotion *)ptr)->soap_out(soap, "ns6:restartMotion", id, NULL); case SOAP_TYPE__ns6__stopMotion: return ((_ns6__stopMotion *)ptr)->soap_out(soap, "ns6:stopMotion", id, NULL); case SOAP_TYPE__ns6__motionResponse: return ((_ns6__motionResponse *)ptr)->soap_out(soap, "ns6:motionResponse", id, NULL); case SOAP_TYPE__ns6__resetMotion: return ((_ns6__resetMotion *)ptr)->soap_out(soap, "ns6:resetMotion", id, NULL); case SOAP_TYPE__ns6__moveC: return ((_ns6__moveC *)ptr)->soap_out(soap, "ns6:moveC", id, NULL); case SOAP_TYPE__ns6__moveL: return ((_ns6__moveL *)ptr)->soap_out(soap, "ns6:moveL", id, NULL); case SOAP_TYPE__ns6__moveJC: return ((_ns6__moveJC *)ptr)->soap_out(soap, "ns6:moveJC", id, NULL); case SOAP_TYPE__ns6__moveResponse: return ((_ns6__moveResponse *)ptr)->soap_out(soap, "ns6:moveResponse", id, NULL); case SOAP_TYPE__ns6__moveJJ: return ((_ns6__moveJJ *)ptr)->soap_out(soap, "ns6:moveJJ", id, NULL); case SOAP_TYPE__ns6__reverseKinResponse: return ((_ns6__reverseKinResponse *)ptr)->soap_out(soap, "ns6:reverseKinResponse", id, NULL); case SOAP_TYPE__ns6__reverseKin: return ((_ns6__reverseKin *)ptr)->soap_out(soap, "ns6:reverseKin", id, NULL); case SOAP_TYPE__ns6__forwardKinResponse: return ((_ns6__forwardKinResponse *)ptr)->soap_out(soap, "ns6:forwardKinResponse", id, NULL); case SOAP_TYPE__ns6__forwardKin: return ((_ns6__forwardKin *)ptr)->soap_out(soap, "ns6:forwardKin", id, NULL); case SOAP_TYPE_ns6__AllRobotsPos: return ((ns6__AllRobotsPos *)ptr)->soap_out(soap, tag, id, "ns6:AllRobotsPos"); case SOAP_TYPE_ns6__RobotPos: return ((ns6__RobotPos *)ptr)->soap_out(soap, tag, id, "ns6:RobotPos"); case SOAP_TYPE_ns6__MotionDesc: return ((ns6__MotionDesc *)ptr)->soap_out(soap, tag, id, "ns6:MotionDesc"); case SOAP_TYPE_ns6__Config: return ((ns6__Config *)ptr)->soap_out(soap, tag, id, "ns6:Config"); case SOAP_TYPE_ns6__VrbxConfig: return ((ns6__VrbxConfig *)ptr)->soap_out(soap, tag, id, "ns6:VrbxConfig"); case SOAP_TYPE_ns6__ScaraConfig: return ((ns6__ScaraConfig *)ptr)->soap_out(soap, tag, id, "ns6:ScaraConfig"); case SOAP_TYPE_ns6__AnthroConfig: return ((ns6__AnthroConfig *)ptr)->soap_out(soap, tag, id, "ns6:AnthroConfig"); case SOAP_TYPE_ns6__Frame: return ((ns6__Frame *)ptr)->soap_out(soap, tag, id, "ns6:Frame"); case SOAP_TYPE_ns6__Records: return ((ns6__Records *)ptr)->soap_out(soap, tag, id, "ns6:Records"); case SOAP_TYPE_ns6__VALApplications: return ((ns6__VALApplications *)ptr)->soap_out(soap, tag, id, "ns6:VALApplications"); case SOAP_TYPE_ns6__Robots: return ((ns6__Robots *)ptr)->soap_out(soap, tag, id, "ns6:Robots"); case SOAP_TYPE_ns6__Versions: return ((ns6__Versions *)ptr)->soap_out(soap, tag, id, "ns6:Versions"); case SOAP_TYPE_ns6__JointPos: return ((ns6__JointPos *)ptr)->soap_out(soap, tag, id, "ns6:JointPos"); case SOAP_TYPE_ns5__AllRobotsPos: return ((ns5__AllRobotsPos *)ptr)->soap_out(soap, tag, id, "ns5:AllRobotsPos"); case SOAP_TYPE_ns5__Records: return ((ns5__Records *)ptr)->soap_out(soap, tag, id, "ns5:Records"); case SOAP_TYPE_ns5__VALApplications: return ((ns5__VALApplications *)ptr)->soap_out(soap, tag, id, "ns5:VALApplications"); case SOAP_TYPE_ns5__Robots: return ((ns5__Robots *)ptr)->soap_out(soap, tag, id, "ns5:Robots"); case SOAP_TYPE_ns5__Versions: return ((ns5__Versions *)ptr)->soap_out(soap, tag, id, "ns5:Versions"); case SOAP_TYPE_ns5__JointPos: return ((ns5__JointPos *)ptr)->soap_out(soap, tag, id, "ns5:JointPos"); case SOAP_TYPE_ns4__hexBinary: return ((ns4__hexBinary *)ptr)->soap_out(soap, tag, id, "ns4:hexBinary"); case SOAP_TYPE_ns4__base64Binary: return ((ns4__base64Binary *)ptr)->soap_out(soap, tag, id, "ns4:base64Binary"); case SOAP_TYPE_ns3__Include: return ((ns3__Include *)ptr)->soap_out(soap, tag, id, "ns3:Include"); case SOAP_TYPE__ns2__getJointRangeResponse: return ((_ns2__getJointRangeResponse *)ptr)->soap_out(soap, "ns2:getJointRangeResponse", id, NULL); case SOAP_TYPE__ns2__getJointRange: return ((_ns2__getJointRange *)ptr)->soap_out(soap, "ns2:getJointRange", id, NULL); case SOAP_TYPE__ns2__getRecordResponse: return ((_ns2__getRecordResponse *)ptr)->soap_out(soap, "ns2:getRecordResponse", id, NULL); case SOAP_TYPE__ns2__getRecord: return ((_ns2__getRecord *)ptr)->soap_out(soap, "ns2:getRecord", id, NULL); case SOAP_TYPE__ns2__getRecordsResponse: return ((_ns2__getRecordsResponse *)ptr)->soap_out(soap, "ns2:getRecordsResponse", id, NULL); case SOAP_TYPE__ns2__getRecords: return ((_ns2__getRecords *)ptr)->soap_out(soap, "ns2:getRecords", id, NULL); case SOAP_TYPE__ns2__getApplicationDatasResponse: return ((_ns2__getApplicationDatasResponse *)ptr)->soap_out(soap, "ns2:getApplicationDatasResponse", id, NULL); case SOAP_TYPE__ns2__getApplicationDatas: return ((_ns2__getApplicationDatas *)ptr)->soap_out(soap, "ns2:getApplicationDatas", id, NULL); case SOAP_TYPE__ns2__getApplicationsResponse: return ((_ns2__getApplicationsResponse *)ptr)->soap_out(soap, "ns2:getApplicationsResponse", id, NULL); case SOAP_TYPE__ns2__getApplications: return ((_ns2__getApplications *)ptr)->soap_out(soap, "ns2:getApplications", id, NULL); case SOAP_TYPE_ns2__JointRange: return ((ns2__JointRange *)ptr)->soap_out(soap, tag, id, "ns2:JointRange"); case SOAP_TYPE_ns2__Records: return ((ns2__Records *)ptr)->soap_out(soap, tag, id, "ns2:Records"); case SOAP_TYPE_ns2__Data: return ((ns2__Data *)ptr)->soap_out(soap, tag, id, "ns2:Data"); case SOAP_TYPE_ns2__VALApplications: return ((ns2__VALApplications *)ptr)->soap_out(soap, tag, id, "ns2:VALApplications"); case SOAP_TYPE_ns2__VALApplication: return ((ns2__VALApplication *)ptr)->soap_out(soap, tag, id, "ns2:VALApplication"); case SOAP_TYPE__ns1__getCS8CompatibilityResponse: return ((_ns1__getCS8CompatibilityResponse *)ptr)->soap_out(soap, "ns1:getCS8CompatibilityResponse", id, NULL); case SOAP_TYPE__ns1__getCS8Compatibility: return ((_ns1__getCS8Compatibility *)ptr)->soap_out(soap, "ns1:getCS8Compatibility", id, NULL); case SOAP_TYPE__ns1__getControllerParametersResponse: return ((_ns1__getControllerParametersResponse *)ptr)->soap_out(soap, "ns1:getControllerParametersResponse", id, NULL); case SOAP_TYPE__ns1__getControllerParameters: return ((_ns1__getControllerParameters *)ptr)->soap_out(soap, "ns1:getControllerParameters", id, NULL); case SOAP_TYPE__ns1__findServerResponse: return ((_ns1__findServerResponse *)ptr)->soap_out(soap, "ns1:findServerResponse", id, NULL); case SOAP_TYPE__ns1__findServer: return ((_ns1__findServer *)ptr)->soap_out(soap, "ns1:findServer", id, NULL); case SOAP_TYPE__ns1__setRobotPosResponse: return ((_ns1__setRobotPosResponse *)ptr)->soap_out(soap, "ns1:setRobotPosResponse", id, NULL); case SOAP_TYPE__ns1__setRobotJointPos: return ((_ns1__setRobotJointPos *)ptr)->soap_out(soap, "ns1:setRobotJointPos", id, NULL); case SOAP_TYPE__ns1__getRobotJntCartPosResponse: return ((_ns1__getRobotJntCartPosResponse *)ptr)->soap_out(soap, "ns1:getRobotJntCartPosResponse", id, NULL); case SOAP_TYPE__ns1__getRobotJntCartPos: return ((_ns1__getRobotJntCartPos *)ptr)->soap_out(soap, "ns1:getRobotJntCartPos", id, NULL); case SOAP_TYPE__ns1__getRobotJointPosResponse: return ((_ns1__getRobotJointPosResponse *)ptr)->soap_out(soap, "ns1:getRobotJointPosResponse", id, NULL); case SOAP_TYPE__ns1__getRobotJointPos: return ((_ns1__getRobotJointPos *)ptr)->soap_out(soap, "ns1:getRobotJointPos", id, NULL); case SOAP_TYPE__ns1__getRobotsResponse: return ((_ns1__getRobotsResponse *)ptr)->soap_out(soap, "ns1:getRobotsResponse", id, NULL); case SOAP_TYPE__ns1__getRobots: return ((_ns1__getRobots *)ptr)->soap_out(soap, "ns1:getRobots", id, NULL); case SOAP_TYPE__ns1__logoutResponse: return ((_ns1__logoutResponse *)ptr)->soap_out(soap, "ns1:logoutResponse", id, NULL); case SOAP_TYPE__ns1__logout: return ((_ns1__logout *)ptr)->soap_out(soap, "ns1:logout", id, NULL); case SOAP_TYPE__ns1__loginResponse: return ((_ns1__loginResponse *)ptr)->soap_out(soap, "ns1:loginResponse", id, NULL); case SOAP_TYPE__ns1__login: return ((_ns1__login *)ptr)->soap_out(soap, "ns1:login", id, NULL); case SOAP_TYPE__ns1__getCS8VersionsResponse: return ((_ns1__getCS8VersionsResponse *)ptr)->soap_out(soap, "ns1:getCS8VersionsResponse", id, NULL); case SOAP_TYPE__ns1__getCS8Versions: return ((_ns1__getCS8Versions *)ptr)->soap_out(soap, "ns1:getCS8Versions", id, NULL); case SOAP_TYPE__ns1__pingResponse: return ((_ns1__pingResponse *)ptr)->soap_out(soap, "ns1:pingResponse", id, NULL); case SOAP_TYPE__ns1__ping: return ((_ns1__ping *)ptr)->soap_out(soap, "ns1:ping", id, NULL); case SOAP_TYPE__ns1__getSoapServerVersionResponse: return ((_ns1__getSoapServerVersionResponse *)ptr)->soap_out(soap, "ns1:getSoapServerVersionResponse", id, NULL); case SOAP_TYPE__ns1__getSoapServerVersion: return ((_ns1__getSoapServerVersion *)ptr)->soap_out(soap, "ns1:getSoapServerVersion", id, NULL); case SOAP_TYPE_ns1__Parameters: return ((ns1__Parameters *)ptr)->soap_out(soap, tag, id, "ns1:Parameters"); case SOAP_TYPE_ns1__Parameter: return ((ns1__Parameter *)ptr)->soap_out(soap, tag, id, "ns1:Parameter"); case SOAP_TYPE_ns1__Robots: return ((ns1__Robots *)ptr)->soap_out(soap, tag, id, "ns1:Robots"); case SOAP_TYPE_ns1__SoapServerVersion: return ((ns1__SoapServerVersion *)ptr)->soap_out(soap, tag, id, "ns1:SoapServerVersion"); case SOAP_TYPE_ns1__Versions: return ((ns1__Versions *)ptr)->soap_out(soap, tag, id, "ns1:Versions"); case SOAP_TYPE_ns1__Version: return ((ns1__Version *)ptr)->soap_out(soap, tag, id, "ns1:Version"); case SOAP_TYPE_ns1__Robot: return ((ns1__Robot *)ptr)->soap_out(soap, tag, id, "ns1:Robot"); case SOAP_TYPE_ns1__CartesianPos: return ((ns1__CartesianPos *)ptr)->soap_out(soap, tag, id, "ns1:CartesianPos"); case SOAP_TYPE_ns1__JointPos: return ((ns1__JointPos *)ptr)->soap_out(soap, tag, id, "ns1:JointPos"); case SOAP_TYPE_ns1__ServerException: return ((ns1__ServerException *)ptr)->soap_out(soap, tag, id, "ns1:ServerException"); case SOAP_TYPE_xsd__hexBinary: return ((xsd__hexBinary *)ptr)->soap_out(soap, tag, id, "xsd:hexBinary"); case SOAP_TYPE_xsd__base64Binary: return ((xsd__base64Binary *)ptr)->soap_out(soap, tag, id, "xsd:base64Binary"); case SOAP_TYPE_xsd__anyURI: return soap_out_xsd__anyURI(soap, tag, id, (const std::string *)ptr, "xsd:anyURI"); case SOAP_TYPE_std__string: return soap_out_std__string(soap, tag, id, (const std::string *)ptr, "xsd:string"); case SOAP_TYPE_PointerTo_ns6__setPowerResponse: return soap_out_PointerTo_ns6__setPowerResponse(soap, tag, id, (_ns6__setPowerResponse *const*)ptr, "ns6:setPowerResponse"); case SOAP_TYPE_PointerTo_ns6__setPower: return soap_out_PointerTo_ns6__setPower(soap, tag, id, (_ns6__setPower *const*)ptr, "ns6:setPower"); case SOAP_TYPE_PointerTo_ns6__MotionAndRobotsPos: return soap_out_PointerTo_ns6__MotionAndRobotsPos(soap, tag, id, (_ns6__MotionAndRobotsPos *const*)ptr, "ns6:MotionAndRobotsPos"); case SOAP_TYPE_PointerTo_ns6__schedulerRefresh: return soap_out_PointerTo_ns6__schedulerRefresh(soap, tag, id, (_ns6__schedulerRefresh *const*)ptr, "ns6:schedulerRefresh"); case SOAP_TYPE_PointerTo_ns6__setSchedulingModeResponse: return soap_out_PointerTo_ns6__setSchedulingModeResponse(soap, tag, id, (_ns6__setSchedulingModeResponse *const*)ptr, "ns6:setSchedulingModeResponse"); case SOAP_TYPE_PointerTo_ns6__setSchedulingMode: return soap_out_PointerTo_ns6__setSchedulingMode(soap, tag, id, (_ns6__setSchedulingMode *const*)ptr, "ns6:setSchedulingMode"); case SOAP_TYPE_PointerTo_ns6__restartMotion: return soap_out_PointerTo_ns6__restartMotion(soap, tag, id, (_ns6__restartMotion *const*)ptr, "ns6:restartMotion"); case SOAP_TYPE_PointerTo_ns6__stopMotion: return soap_out_PointerTo_ns6__stopMotion(soap, tag, id, (_ns6__stopMotion *const*)ptr, "ns6:stopMotion"); case SOAP_TYPE_PointerTo_ns6__motionResponse: return soap_out_PointerTo_ns6__motionResponse(soap, tag, id, (_ns6__motionResponse *const*)ptr, "ns6:motionResponse"); case SOAP_TYPE_PointerTo_ns6__resetMotion: return soap_out_PointerTo_ns6__resetMotion(soap, tag, id, (_ns6__resetMotion *const*)ptr, "ns6:resetMotion"); case SOAP_TYPE_PointerTo_ns6__moveC: return soap_out_PointerTo_ns6__moveC(soap, tag, id, (_ns6__moveC *const*)ptr, "ns6:moveC"); case SOAP_TYPE_PointerTo_ns6__moveL: return soap_out_PointerTo_ns6__moveL(soap, tag, id, (_ns6__moveL *const*)ptr, "ns6:moveL"); case SOAP_TYPE_PointerTo_ns6__moveJC: return soap_out_PointerTo_ns6__moveJC(soap, tag, id, (_ns6__moveJC *const*)ptr, "ns6:moveJC"); case SOAP_TYPE_PointerTo_ns6__moveResponse: return soap_out_PointerTo_ns6__moveResponse(soap, tag, id, (_ns6__moveResponse *const*)ptr, "ns6:moveResponse"); case SOAP_TYPE_PointerTo_ns6__moveJJ: return soap_out_PointerTo_ns6__moveJJ(soap, tag, id, (_ns6__moveJJ *const*)ptr, "ns6:moveJJ"); case SOAP_TYPE_PointerTo_ns6__reverseKinResponse: return soap_out_PointerTo_ns6__reverseKinResponse(soap, tag, id, (_ns6__reverseKinResponse *const*)ptr, "ns6:reverseKinResponse"); case SOAP_TYPE_PointerTo_ns6__reverseKin: return soap_out_PointerTo_ns6__reverseKin(soap, tag, id, (_ns6__reverseKin *const*)ptr, "ns6:reverseKin"); case SOAP_TYPE_PointerTo_ns6__forwardKinResponse: return soap_out_PointerTo_ns6__forwardKinResponse(soap, tag, id, (_ns6__forwardKinResponse *const*)ptr, "ns6:forwardKinResponse"); case SOAP_TYPE_PointerTo_ns6__forwardKin: return soap_out_PointerTo_ns6__forwardKin(soap, tag, id, (_ns6__forwardKin *const*)ptr, "ns6:forwardKin"); case SOAP_TYPE_PointerTo_ns2__getJointRangeResponse: return soap_out_PointerTo_ns2__getJointRangeResponse(soap, tag, id, (_ns2__getJointRangeResponse *const*)ptr, "ns2:getJointRangeResponse"); case SOAP_TYPE_PointerTo_ns2__getJointRange: return soap_out_PointerTo_ns2__getJointRange(soap, tag, id, (_ns2__getJointRange *const*)ptr, "ns2:getJointRange"); case SOAP_TYPE_PointerTo_ns2__getRecordResponse: return soap_out_PointerTo_ns2__getRecordResponse(soap, tag, id, (_ns2__getRecordResponse *const*)ptr, "ns2:getRecordResponse"); case SOAP_TYPE_PointerTo_ns2__getRecord: return soap_out_PointerTo_ns2__getRecord(soap, tag, id, (_ns2__getRecord *const*)ptr, "ns2:getRecord"); case SOAP_TYPE_PointerTo_ns2__getRecordsResponse: return soap_out_PointerTo_ns2__getRecordsResponse(soap, tag, id, (_ns2__getRecordsResponse *const*)ptr, "ns2:getRecordsResponse"); case SOAP_TYPE_PointerTo_ns2__getRecords: return soap_out_PointerTo_ns2__getRecords(soap, tag, id, (_ns2__getRecords *const*)ptr, "ns2:getRecords"); case SOAP_TYPE_PointerTo_ns2__getApplicationDatasResponse: return soap_out_PointerTo_ns2__getApplicationDatasResponse(soap, tag, id, (_ns2__getApplicationDatasResponse *const*)ptr, "ns2:getApplicationDatasResponse"); case SOAP_TYPE_PointerTo_ns2__getApplicationDatas: return soap_out_PointerTo_ns2__getApplicationDatas(soap, tag, id, (_ns2__getApplicationDatas *const*)ptr, "ns2:getApplicationDatas"); case SOAP_TYPE_PointerTo_ns2__getApplicationsResponse: return soap_out_PointerTo_ns2__getApplicationsResponse(soap, tag, id, (_ns2__getApplicationsResponse *const*)ptr, "ns2:getApplicationsResponse"); case SOAP_TYPE_PointerTo_ns2__getApplications: return soap_out_PointerTo_ns2__getApplications(soap, tag, id, (_ns2__getApplications *const*)ptr, "ns2:getApplications"); case SOAP_TYPE_PointerTo_ns1__setRobotPosResponse: return soap_out_PointerTo_ns1__setRobotPosResponse(soap, tag, id, (_ns1__setRobotPosResponse *const*)ptr, "ns1:setRobotPosResponse"); case SOAP_TYPE_PointerTo_ns1__setRobotJointPos: return soap_out_PointerTo_ns1__setRobotJointPos(soap, tag, id, (_ns1__setRobotJointPos *const*)ptr, "ns1:setRobotJointPos"); case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPosResponse: return soap_out_PointerTo_ns1__getRobotJntCartPosResponse(soap, tag, id, (_ns1__getRobotJntCartPosResponse *const*)ptr, "ns1:getRobotJntCartPosResponse"); case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPos: return soap_out_PointerTo_ns1__getRobotJntCartPos(soap, tag, id, (_ns1__getRobotJntCartPos *const*)ptr, "ns1:getRobotJntCartPos"); case SOAP_TYPE_PointerTo_ns1__getRobotJointPosResponse: return soap_out_PointerTo_ns1__getRobotJointPosResponse(soap, tag, id, (_ns1__getRobotJointPosResponse *const*)ptr, "ns1:getRobotJointPosResponse"); case SOAP_TYPE_PointerTo_ns1__getRobotJointPos: return soap_out_PointerTo_ns1__getRobotJointPos(soap, tag, id, (_ns1__getRobotJointPos *const*)ptr, "ns1:getRobotJointPos"); case SOAP_TYPE_PointerTo_ns1__getRobotsResponse: return soap_out_PointerTo_ns1__getRobotsResponse(soap, tag, id, (_ns1__getRobotsResponse *const*)ptr, "ns1:getRobotsResponse"); case SOAP_TYPE_PointerTo_ns1__getRobots: return soap_out_PointerTo_ns1__getRobots(soap, tag, id, (_ns1__getRobots *const*)ptr, "ns1:getRobots"); case SOAP_TYPE_PointerTo_ns1__logoutResponse: return soap_out_PointerTo_ns1__logoutResponse(soap, tag, id, (_ns1__logoutResponse *const*)ptr, "ns1:logoutResponse"); case SOAP_TYPE_PointerTo_ns1__logout: return soap_out_PointerTo_ns1__logout(soap, tag, id, (_ns1__logout *const*)ptr, "ns1:logout"); case SOAP_TYPE_PointerTo_ns1__loginResponse: return soap_out_PointerTo_ns1__loginResponse(soap, tag, id, (_ns1__loginResponse *const*)ptr, "ns1:loginResponse"); case SOAP_TYPE_PointerTo_ns1__login: return soap_out_PointerTo_ns1__login(soap, tag, id, (_ns1__login *const*)ptr, "ns1:login"); case SOAP_TYPE_PointerTo_ns1__getCS8VersionsResponse: return soap_out_PointerTo_ns1__getCS8VersionsResponse(soap, tag, id, (_ns1__getCS8VersionsResponse *const*)ptr, "ns1:getCS8VersionsResponse"); case SOAP_TYPE_PointerTo_ns1__getCS8Versions: return soap_out_PointerTo_ns1__getCS8Versions(soap, tag, id, (_ns1__getCS8Versions *const*)ptr, "ns1:getCS8Versions"); case SOAP_TYPE_PointerTo_ns1__pingResponse: return soap_out_PointerTo_ns1__pingResponse(soap, tag, id, (_ns1__pingResponse *const*)ptr, "ns1:pingResponse"); case SOAP_TYPE_PointerTo_ns1__ping: return soap_out_PointerTo_ns1__ping(soap, tag, id, (_ns1__ping *const*)ptr, "ns1:ping"); case SOAP_TYPE_PointerTo_ns1__getSoapServerVersionResponse: return soap_out_PointerTo_ns1__getSoapServerVersionResponse(soap, tag, id, (_ns1__getSoapServerVersionResponse *const*)ptr, "ns1:getSoapServerVersionResponse"); case SOAP_TYPE_PointerTo_ns1__getSoapServerVersion: return soap_out_PointerTo_ns1__getSoapServerVersion(soap, tag, id, (_ns1__getSoapServerVersion *const*)ptr, "ns1:getSoapServerVersion"); case SOAP_TYPE_PointerTons1__ServerException: return soap_out_PointerTons1__ServerException(soap, tag, id, (ns1__ServerException *const*)ptr, "ns1:ServerException"); case SOAP_TYPE_PointerTons1__SessionId: return soap_out_PointerTons1__SessionId(soap, tag, id, (int *const*)ptr, "ns1:SessionId"); case SOAP_TYPE_PointerTons6__AllRobotsPos: return soap_out_PointerTons6__AllRobotsPos(soap, tag, id, (ns6__AllRobotsPos *const*)ptr, "ns6:AllRobotsPos"); case SOAP_TYPE_PointerTons6__MotionDesc: return soap_out_PointerTons6__MotionDesc(soap, tag, id, (ns6__MotionDesc *const*)ptr, "ns6:MotionDesc"); case SOAP_TYPE_PointerTons6__Config: return soap_out_PointerTons6__Config(soap, tag, id, (ns6__Config *const*)ptr, "ns6:Config"); case SOAP_TYPE_PointerTons6__Frame: return soap_out_PointerTons6__Frame(soap, tag, id, (ns6__Frame *const*)ptr, "ns6:Frame"); case SOAP_TYPE_PointerTons6__VrbxConfig: return soap_out_PointerTons6__VrbxConfig(soap, tag, id, (ns6__VrbxConfig *const*)ptr, "ns6:VrbxConfig"); case SOAP_TYPE_PointerTons6__ScaraConfig: return soap_out_PointerTons6__ScaraConfig(soap, tag, id, (ns6__ScaraConfig *const*)ptr, "ns6:ScaraConfig"); case SOAP_TYPE_PointerTons6__AnthroConfig: return soap_out_PointerTons6__AnthroConfig(soap, tag, id, (ns6__AnthroConfig *const*)ptr, "ns6:AnthroConfig"); case SOAP_TYPE_PointerTons6__RobotPos: return soap_out_PointerTons6__RobotPos(soap, tag, id, (ns6__RobotPos *const*)ptr, "ns6:RobotPos"); case SOAP_TYPE_PointerTons2__JointRange: return soap_out_PointerTons2__JointRange(soap, tag, id, (ns2__JointRange *const*)ptr, "ns2:JointRange"); case SOAP_TYPE_PointerTons2__Records: return soap_out_PointerTons2__Records(soap, tag, id, (ns2__Records *const*)ptr, "ns2:Records"); case SOAP_TYPE_PointerTons2__VALApplications: return soap_out_PointerTons2__VALApplications(soap, tag, id, (ns2__VALApplications *const*)ptr, "ns2:VALApplications"); case SOAP_TYPE_PointerTons3__Include: return soap_out_PointerTons3__Include(soap, tag, id, (ns3__Include *const*)ptr, "ns3:Include"); case SOAP_TYPE_PointerTons2__VALApplication: return soap_out_PointerTons2__VALApplication(soap, tag, id, (ns2__VALApplication *const*)ptr, "ns2:VALApplication"); case SOAP_TYPE_PointerTons1__Parameters: return soap_out_PointerTons1__Parameters(soap, tag, id, (ns1__Parameters *const*)ptr, "ns1:Parameters"); case SOAP_TYPE_PointerTons1__CartesianPos: return soap_out_PointerTons1__CartesianPos(soap, tag, id, (ns1__CartesianPos *const*)ptr, "ns1:CartesianPos"); case SOAP_TYPE_PointerTons1__JointPos: return soap_out_PointerTons1__JointPos(soap, tag, id, (ns1__JointPos *const*)ptr, "ns1:JointPos"); case SOAP_TYPE_PointerTons1__Robots: return soap_out_PointerTons1__Robots(soap, tag, id, (ns1__Robots *const*)ptr, "ns1:Robots"); case SOAP_TYPE_PointerTons1__Versions: return soap_out_PointerTons1__Versions(soap, tag, id, (ns1__Versions *const*)ptr, "ns1:Versions"); case SOAP_TYPE_PointerTons1__SoapServerVersion: return soap_out_PointerTons1__SoapServerVersion(soap, tag, id, (ns1__SoapServerVersion *const*)ptr, "ns1:SoapServerVersion"); case SOAP_TYPE_PointerTons1__Parameter: return soap_out_PointerTons1__Parameter(soap, tag, id, (ns1__Parameter *const*)ptr, "ns1:Parameter"); case SOAP_TYPE_PointerTons1__Robot: return soap_out_PointerTons1__Robot(soap, tag, id, (ns1__Robot *const*)ptr, "ns1:Robot"); case SOAP_TYPE_PointerTons1__Version: return soap_out_PointerTons1__Version(soap, tag, id, (ns1__Version *const*)ptr, "ns1:Version"); case SOAP_TYPE_PointerTostd__string: return soap_out_PointerTostd__string(soap, tag, id, (std::string *const*)ptr, "xsd:string"); case SOAP_TYPE_PointerTounsignedByte: return soap_out_PointerTounsignedByte(soap, tag, id, (unsigned char *const*)ptr, "xsd:unsignedByte"); case SOAP_TYPE__QName: return soap_out_string(soap, tag, id, (char*const*)&ptr, "xsd:QName"); case SOAP_TYPE_string: return soap_out_string(soap, tag, id, (char*const*)&ptr, "xsd:string"); } return SOAP_OK; } #ifdef __cplusplus } #endif #endif #ifndef WITH_NOIDREF #ifdef __cplusplus extern "C" { #endif SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, int type) { (void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */ switch (type) { case SOAP_TYPE__ns6__setPowerResponse: ((_ns6__setPowerResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__setPower: ((_ns6__setPower *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__MotionAndRobotsPos: ((_ns6__MotionAndRobotsPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__schedulerRefresh: ((_ns6__schedulerRefresh *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__setSchedulingModeResponse: ((_ns6__setSchedulingModeResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__setSchedulingMode: ((_ns6__setSchedulingMode *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__restartMotion: ((_ns6__restartMotion *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__stopMotion: ((_ns6__stopMotion *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__motionResponse: ((_ns6__motionResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__resetMotion: ((_ns6__resetMotion *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__moveC: ((_ns6__moveC *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__moveL: ((_ns6__moveL *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__moveJC: ((_ns6__moveJC *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__moveResponse: ((_ns6__moveResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__moveJJ: ((_ns6__moveJJ *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__reverseKinResponse: ((_ns6__reverseKinResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__reverseKin: ((_ns6__reverseKin *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__forwardKinResponse: ((_ns6__forwardKinResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns6__forwardKin: ((_ns6__forwardKin *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__AllRobotsPos: ((ns6__AllRobotsPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__RobotPos: ((ns6__RobotPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__MotionDesc: ((ns6__MotionDesc *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__Config: ((ns6__Config *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__VrbxConfig: ((ns6__VrbxConfig *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__ScaraConfig: ((ns6__ScaraConfig *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__AnthroConfig: ((ns6__AnthroConfig *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__Frame: ((ns6__Frame *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__Records: ((ns6__Records *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__VALApplications: ((ns6__VALApplications *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__Robots: ((ns6__Robots *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__Versions: ((ns6__Versions *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns6__JointPos: ((ns6__JointPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__AllRobotsPos: ((ns5__AllRobotsPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__Records: ((ns5__Records *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__VALApplications: ((ns5__VALApplications *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__Robots: ((ns5__Robots *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__Versions: ((ns5__Versions *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns5__JointPos: ((ns5__JointPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns4__hexBinary: ((ns4__hexBinary *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns4__base64Binary: ((ns4__base64Binary *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns3__Include: ((ns3__Include *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getJointRangeResponse: ((_ns2__getJointRangeResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getJointRange: ((_ns2__getJointRange *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getRecordResponse: ((_ns2__getRecordResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getRecord: ((_ns2__getRecord *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getRecordsResponse: ((_ns2__getRecordsResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getRecords: ((_ns2__getRecords *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getApplicationDatasResponse: ((_ns2__getApplicationDatasResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getApplicationDatas: ((_ns2__getApplicationDatas *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getApplicationsResponse: ((_ns2__getApplicationsResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns2__getApplications: ((_ns2__getApplications *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns2__JointRange: ((ns2__JointRange *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns2__Records: ((ns2__Records *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns2__Data: ((ns2__Data *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns2__VALApplications: ((ns2__VALApplications *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns2__VALApplication: ((ns2__VALApplication *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getCS8CompatibilityResponse: ((_ns1__getCS8CompatibilityResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getCS8Compatibility: ((_ns1__getCS8Compatibility *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getControllerParametersResponse: ((_ns1__getControllerParametersResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getControllerParameters: ((_ns1__getControllerParameters *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__findServerResponse: ((_ns1__findServerResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__findServer: ((_ns1__findServer *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__setRobotPosResponse: ((_ns1__setRobotPosResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__setRobotJointPos: ((_ns1__setRobotJointPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobotJntCartPosResponse: ((_ns1__getRobotJntCartPosResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobotJntCartPos: ((_ns1__getRobotJntCartPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobotJointPosResponse: ((_ns1__getRobotJointPosResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobotJointPos: ((_ns1__getRobotJointPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobotsResponse: ((_ns1__getRobotsResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getRobots: ((_ns1__getRobots *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__logoutResponse: ((_ns1__logoutResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__logout: ((_ns1__logout *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__loginResponse: ((_ns1__loginResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__login: ((_ns1__login *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getCS8VersionsResponse: ((_ns1__getCS8VersionsResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getCS8Versions: ((_ns1__getCS8Versions *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__pingResponse: ((_ns1__pingResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__ping: ((_ns1__ping *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getSoapServerVersionResponse: ((_ns1__getSoapServerVersionResponse *)ptr)->soap_serialize(soap); break; case SOAP_TYPE__ns1__getSoapServerVersion: ((_ns1__getSoapServerVersion *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Parameters: ((ns1__Parameters *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Parameter: ((ns1__Parameter *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Robots: ((ns1__Robots *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__SoapServerVersion: ((ns1__SoapServerVersion *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Versions: ((ns1__Versions *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Version: ((ns1__Version *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__Robot: ((ns1__Robot *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__CartesianPos: ((ns1__CartesianPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__JointPos: ((ns1__JointPos *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_ns1__ServerException: ((ns1__ServerException *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_xsd__hexBinary: ((xsd__hexBinary *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_xsd__base64Binary: ((xsd__base64Binary *)ptr)->soap_serialize(soap); break; case SOAP_TYPE_xsd__anyURI: soap_serialize_xsd__anyURI(soap, (const std::string *)ptr); break; case SOAP_TYPE_std__string: soap_serialize_std__string(soap, (const std::string *)ptr); break; case SOAP_TYPE___ns6__setPower: soap_serialize___ns6__setPower(soap, (const struct __ns6__setPower *)ptr); break; case SOAP_TYPE___ns6__schedulerRefresh: soap_serialize___ns6__schedulerRefresh(soap, (const struct __ns6__schedulerRefresh *)ptr); break; case SOAP_TYPE___ns6__setSchedulingMode: soap_serialize___ns6__setSchedulingMode(soap, (const struct __ns6__setSchedulingMode *)ptr); break; case SOAP_TYPE___ns6__restartMotion: soap_serialize___ns6__restartMotion(soap, (const struct __ns6__restartMotion *)ptr); break; case SOAP_TYPE___ns6__stopMotion: soap_serialize___ns6__stopMotion(soap, (const struct __ns6__stopMotion *)ptr); break; case SOAP_TYPE___ns6__resetMotion: soap_serialize___ns6__resetMotion(soap, (const struct __ns6__resetMotion *)ptr); break; case SOAP_TYPE___ns6__moveC: soap_serialize___ns6__moveC(soap, (const struct __ns6__moveC *)ptr); break; case SOAP_TYPE___ns6__moveL: soap_serialize___ns6__moveL(soap, (const struct __ns6__moveL *)ptr); break; case SOAP_TYPE___ns6__moveJC: soap_serialize___ns6__moveJC(soap, (const struct __ns6__moveJC *)ptr); break; case SOAP_TYPE___ns6__moveJJ: soap_serialize___ns6__moveJJ(soap, (const struct __ns6__moveJJ *)ptr); break; case SOAP_TYPE___ns6__reverseKin: soap_serialize___ns6__reverseKin(soap, (const struct __ns6__reverseKin *)ptr); break; case SOAP_TYPE___ns6__forwardKin: soap_serialize___ns6__forwardKin(soap, (const struct __ns6__forwardKin *)ptr); break; case SOAP_TYPE___ns2__getJointRange: soap_serialize___ns2__getJointRange(soap, (const struct __ns2__getJointRange *)ptr); break; case SOAP_TYPE___ns2__getRecord: soap_serialize___ns2__getRecord(soap, (const struct __ns2__getRecord *)ptr); break; case SOAP_TYPE___ns2__getRecords: soap_serialize___ns2__getRecords(soap, (const struct __ns2__getRecords *)ptr); break; case SOAP_TYPE___ns2__getApplicationDatas: soap_serialize___ns2__getApplicationDatas(soap, (const struct __ns2__getApplicationDatas *)ptr); break; case SOAP_TYPE___ns2__getApplications: soap_serialize___ns2__getApplications(soap, (const struct __ns2__getApplications *)ptr); break; case SOAP_TYPE___ns1__setRobotJointPos: soap_serialize___ns1__setRobotJointPos(soap, (const struct __ns1__setRobotJointPos *)ptr); break; case SOAP_TYPE___ns1__getRobotJntCartPos: soap_serialize___ns1__getRobotJntCartPos(soap, (const struct __ns1__getRobotJntCartPos *)ptr); break; case SOAP_TYPE___ns1__getRobotJointPos: soap_serialize___ns1__getRobotJointPos(soap, (const struct __ns1__getRobotJointPos *)ptr); break; case SOAP_TYPE___ns1__getRobots: soap_serialize___ns1__getRobots(soap, (const struct __ns1__getRobots *)ptr); break; case SOAP_TYPE___ns1__logout: soap_serialize___ns1__logout(soap, (const struct __ns1__logout *)ptr); break; case SOAP_TYPE___ns1__login: soap_serialize___ns1__login(soap, (const struct __ns1__login *)ptr); break; case SOAP_TYPE___ns1__getCS8Versions: soap_serialize___ns1__getCS8Versions(soap, (const struct __ns1__getCS8Versions *)ptr); break; case SOAP_TYPE___ns1__ping: soap_serialize___ns1__ping(soap, (const struct __ns1__ping *)ptr); break; case SOAP_TYPE___ns1__getSoapServerVersion: soap_serialize___ns1__getSoapServerVersion(soap, (const struct __ns1__getSoapServerVersion *)ptr); break; case SOAP_TYPE_PointerTo_ns6__setPowerResponse: soap_serialize_PointerTo_ns6__setPowerResponse(soap, (_ns6__setPowerResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__setPower: soap_serialize_PointerTo_ns6__setPower(soap, (_ns6__setPower *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__MotionAndRobotsPos: soap_serialize_PointerTo_ns6__MotionAndRobotsPos(soap, (_ns6__MotionAndRobotsPos *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__schedulerRefresh: soap_serialize_PointerTo_ns6__schedulerRefresh(soap, (_ns6__schedulerRefresh *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__setSchedulingModeResponse: soap_serialize_PointerTo_ns6__setSchedulingModeResponse(soap, (_ns6__setSchedulingModeResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__setSchedulingMode: soap_serialize_PointerTo_ns6__setSchedulingMode(soap, (_ns6__setSchedulingMode *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__restartMotion: soap_serialize_PointerTo_ns6__restartMotion(soap, (_ns6__restartMotion *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__stopMotion: soap_serialize_PointerTo_ns6__stopMotion(soap, (_ns6__stopMotion *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__motionResponse: soap_serialize_PointerTo_ns6__motionResponse(soap, (_ns6__motionResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__resetMotion: soap_serialize_PointerTo_ns6__resetMotion(soap, (_ns6__resetMotion *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__moveC: soap_serialize_PointerTo_ns6__moveC(soap, (_ns6__moveC *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__moveL: soap_serialize_PointerTo_ns6__moveL(soap, (_ns6__moveL *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__moveJC: soap_serialize_PointerTo_ns6__moveJC(soap, (_ns6__moveJC *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__moveResponse: soap_serialize_PointerTo_ns6__moveResponse(soap, (_ns6__moveResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__moveJJ: soap_serialize_PointerTo_ns6__moveJJ(soap, (_ns6__moveJJ *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__reverseKinResponse: soap_serialize_PointerTo_ns6__reverseKinResponse(soap, (_ns6__reverseKinResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__reverseKin: soap_serialize_PointerTo_ns6__reverseKin(soap, (_ns6__reverseKin *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__forwardKinResponse: soap_serialize_PointerTo_ns6__forwardKinResponse(soap, (_ns6__forwardKinResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns6__forwardKin: soap_serialize_PointerTo_ns6__forwardKin(soap, (_ns6__forwardKin *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getJointRangeResponse: soap_serialize_PointerTo_ns2__getJointRangeResponse(soap, (_ns2__getJointRangeResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getJointRange: soap_serialize_PointerTo_ns2__getJointRange(soap, (_ns2__getJointRange *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getRecordResponse: soap_serialize_PointerTo_ns2__getRecordResponse(soap, (_ns2__getRecordResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getRecord: soap_serialize_PointerTo_ns2__getRecord(soap, (_ns2__getRecord *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getRecordsResponse: soap_serialize_PointerTo_ns2__getRecordsResponse(soap, (_ns2__getRecordsResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getRecords: soap_serialize_PointerTo_ns2__getRecords(soap, (_ns2__getRecords *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getApplicationDatasResponse: soap_serialize_PointerTo_ns2__getApplicationDatasResponse(soap, (_ns2__getApplicationDatasResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getApplicationDatas: soap_serialize_PointerTo_ns2__getApplicationDatas(soap, (_ns2__getApplicationDatas *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getApplicationsResponse: soap_serialize_PointerTo_ns2__getApplicationsResponse(soap, (_ns2__getApplicationsResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns2__getApplications: soap_serialize_PointerTo_ns2__getApplications(soap, (_ns2__getApplications *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__setRobotPosResponse: soap_serialize_PointerTo_ns1__setRobotPosResponse(soap, (_ns1__setRobotPosResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__setRobotJointPos: soap_serialize_PointerTo_ns1__setRobotJointPos(soap, (_ns1__setRobotJointPos *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPosResponse: soap_serialize_PointerTo_ns1__getRobotJntCartPosResponse(soap, (_ns1__getRobotJntCartPosResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobotJntCartPos: soap_serialize_PointerTo_ns1__getRobotJntCartPos(soap, (_ns1__getRobotJntCartPos *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobotJointPosResponse: soap_serialize_PointerTo_ns1__getRobotJointPosResponse(soap, (_ns1__getRobotJointPosResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobotJointPos: soap_serialize_PointerTo_ns1__getRobotJointPos(soap, (_ns1__getRobotJointPos *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobotsResponse: soap_serialize_PointerTo_ns1__getRobotsResponse(soap, (_ns1__getRobotsResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getRobots: soap_serialize_PointerTo_ns1__getRobots(soap, (_ns1__getRobots *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__logoutResponse: soap_serialize_PointerTo_ns1__logoutResponse(soap, (_ns1__logoutResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__logout: soap_serialize_PointerTo_ns1__logout(soap, (_ns1__logout *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__loginResponse: soap_serialize_PointerTo_ns1__loginResponse(soap, (_ns1__loginResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__login: soap_serialize_PointerTo_ns1__login(soap, (_ns1__login *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getCS8VersionsResponse: soap_serialize_PointerTo_ns1__getCS8VersionsResponse(soap, (_ns1__getCS8VersionsResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getCS8Versions: soap_serialize_PointerTo_ns1__getCS8Versions(soap, (_ns1__getCS8Versions *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__pingResponse: soap_serialize_PointerTo_ns1__pingResponse(soap, (_ns1__pingResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__ping: soap_serialize_PointerTo_ns1__ping(soap, (_ns1__ping *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getSoapServerVersionResponse: soap_serialize_PointerTo_ns1__getSoapServerVersionResponse(soap, (_ns1__getSoapServerVersionResponse *const*)ptr); break; case SOAP_TYPE_PointerTo_ns1__getSoapServerVersion: soap_serialize_PointerTo_ns1__getSoapServerVersion(soap, (_ns1__getSoapServerVersion *const*)ptr); break; case SOAP_TYPE_PointerTons1__ServerException: soap_serialize_PointerTons1__ServerException(soap, (ns1__ServerException *const*)ptr); break; case SOAP_TYPE_PointerTons1__SessionId: soap_serialize_PointerTons1__SessionId(soap, (int *const*)ptr); break; case SOAP_TYPE_PointerTons6__AllRobotsPos: soap_serialize_PointerTons6__AllRobotsPos(soap, (ns6__AllRobotsPos *const*)ptr); break; case SOAP_TYPE_PointerTons6__MotionDesc: soap_serialize_PointerTons6__MotionDesc(soap, (ns6__MotionDesc *const*)ptr); break; case SOAP_TYPE_PointerTons6__Config: soap_serialize_PointerTons6__Config(soap, (ns6__Config *const*)ptr); break; case SOAP_TYPE_PointerTons6__Frame: soap_serialize_PointerTons6__Frame(soap, (ns6__Frame *const*)ptr); break; case SOAP_TYPE_PointerTons6__VrbxConfig: soap_serialize_PointerTons6__VrbxConfig(soap, (ns6__VrbxConfig *const*)ptr); break; case SOAP_TYPE_PointerTons6__ScaraConfig: soap_serialize_PointerTons6__ScaraConfig(soap, (ns6__ScaraConfig *const*)ptr); break; case SOAP_TYPE_PointerTons6__AnthroConfig: soap_serialize_PointerTons6__AnthroConfig(soap, (ns6__AnthroConfig *const*)ptr); break; case SOAP_TYPE_PointerTons6__RobotPos: soap_serialize_PointerTons6__RobotPos(soap, (ns6__RobotPos *const*)ptr); break; case SOAP_TYPE_PointerTons2__JointRange: soap_serialize_PointerTons2__JointRange(soap, (ns2__JointRange *const*)ptr); break; case SOAP_TYPE_PointerTons2__Records: soap_serialize_PointerTons2__Records(soap, (ns2__Records *const*)ptr); break; case SOAP_TYPE_PointerTons2__VALApplications: soap_serialize_PointerTons2__VALApplications(soap, (ns2__VALApplications *const*)ptr); break; case SOAP_TYPE_PointerTons3__Include: soap_serialize_PointerTons3__Include(soap, (ns3__Include *const*)ptr); break; case SOAP_TYPE_PointerTons2__VALApplication: soap_serialize_PointerTons2__VALApplication(soap, (ns2__VALApplication *const*)ptr); break; case SOAP_TYPE_PointerTons1__Parameters: soap_serialize_PointerTons1__Parameters(soap, (ns1__Parameters *const*)ptr); break; case SOAP_TYPE_PointerTons1__CartesianPos: soap_serialize_PointerTons1__CartesianPos(soap, (ns1__CartesianPos *const*)ptr); break; case SOAP_TYPE_PointerTons1__JointPos: soap_serialize_PointerTons1__JointPos(soap, (ns1__JointPos *const*)ptr); break; case SOAP_TYPE_PointerTons1__Robots: soap_serialize_PointerTons1__Robots(soap, (ns1__Robots *const*)ptr); break; case SOAP_TYPE_PointerTons1__Versions: soap_serialize_PointerTons1__Versions(soap, (ns1__Versions *const*)ptr); break; case SOAP_TYPE_PointerTons1__SoapServerVersion: soap_serialize_PointerTons1__SoapServerVersion(soap, (ns1__SoapServerVersion *const*)ptr); break; case SOAP_TYPE_PointerTons1__Parameter: soap_serialize_PointerTons1__Parameter(soap, (ns1__Parameter *const*)ptr); break; case SOAP_TYPE_PointerTons1__Robot: soap_serialize_PointerTons1__Robot(soap, (ns1__Robot *const*)ptr); break; case SOAP_TYPE_PointerTons1__Version: soap_serialize_PointerTons1__Version(soap, (ns1__Version *const*)ptr); break; case SOAP_TYPE_PointerTostd__string: soap_serialize_PointerTostd__string(soap, (std::string *const*)ptr); break; case SOAP_TYPE_PointerTounsignedByte: soap_serialize_PointerTounsignedByte(soap, (unsigned char *const*)ptr); break; case SOAP_TYPE__QName: soap_serialize_string(soap, (char*const*)&ptr); break; case SOAP_TYPE_string: soap_serialize_string(soap, (char*const*)&ptr); break; } } #ifdef __cplusplus } #endif #endif SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap *soap, int t, const char *type, const char *arrayType, size_t *n) { switch (t) { case SOAP_TYPE_std__string: return (void*)soap_instantiate_std__string(soap, -1, type, arrayType, n); case SOAP_TYPE_xsd__base64Binary: return (void*)soap_instantiate_xsd__base64Binary(soap, -1, type, arrayType, n); case SOAP_TYPE_xsd__hexBinary: return (void*)soap_instantiate_xsd__hexBinary(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__ServerException: return (void*)soap_instantiate_ns1__ServerException(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__JointPos: return (void*)soap_instantiate_ns1__JointPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__CartesianPos: return (void*)soap_instantiate_ns1__CartesianPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Robot: return (void*)soap_instantiate_ns1__Robot(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Version: return (void*)soap_instantiate_ns1__Version(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Versions: return (void*)soap_instantiate_ns1__Versions(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__SoapServerVersion: return (void*)soap_instantiate_ns1__SoapServerVersion(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Robots: return (void*)soap_instantiate_ns1__Robots(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Parameter: return (void*)soap_instantiate_ns1__Parameter(soap, -1, type, arrayType, n); case SOAP_TYPE_ns1__Parameters: return (void*)soap_instantiate_ns1__Parameters(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getSoapServerVersion: return (void*)soap_instantiate__ns1__getSoapServerVersion(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getSoapServerVersionResponse: return (void*)soap_instantiate__ns1__getSoapServerVersionResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__ping: return (void*)soap_instantiate__ns1__ping(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__pingResponse: return (void*)soap_instantiate__ns1__pingResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getCS8Versions: return (void*)soap_instantiate__ns1__getCS8Versions(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getCS8VersionsResponse: return (void*)soap_instantiate__ns1__getCS8VersionsResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__login: return (void*)soap_instantiate__ns1__login(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__loginResponse: return (void*)soap_instantiate__ns1__loginResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__logout: return (void*)soap_instantiate__ns1__logout(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__logoutResponse: return (void*)soap_instantiate__ns1__logoutResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobots: return (void*)soap_instantiate__ns1__getRobots(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobotsResponse: return (void*)soap_instantiate__ns1__getRobotsResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobotJointPos: return (void*)soap_instantiate__ns1__getRobotJointPos(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobotJointPosResponse: return (void*)soap_instantiate__ns1__getRobotJointPosResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobotJntCartPos: return (void*)soap_instantiate__ns1__getRobotJntCartPos(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getRobotJntCartPosResponse: return (void*)soap_instantiate__ns1__getRobotJntCartPosResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__setRobotJointPos: return (void*)soap_instantiate__ns1__setRobotJointPos(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__setRobotPosResponse: return (void*)soap_instantiate__ns1__setRobotPosResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__findServer: return (void*)soap_instantiate__ns1__findServer(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__findServerResponse: return (void*)soap_instantiate__ns1__findServerResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getControllerParameters: return (void*)soap_instantiate__ns1__getControllerParameters(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getControllerParametersResponse: return (void*)soap_instantiate__ns1__getControllerParametersResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getCS8Compatibility: return (void*)soap_instantiate__ns1__getCS8Compatibility(soap, -1, type, arrayType, n); case SOAP_TYPE__ns1__getCS8CompatibilityResponse: return (void*)soap_instantiate__ns1__getCS8CompatibilityResponse(soap, -1, type, arrayType, n); case SOAP_TYPE_ns2__VALApplication: return (void*)soap_instantiate_ns2__VALApplication(soap, -1, type, arrayType, n); case SOAP_TYPE_ns2__VALApplications: return (void*)soap_instantiate_ns2__VALApplications(soap, -1, type, arrayType, n); case SOAP_TYPE_ns2__Data: return (void*)soap_instantiate_ns2__Data(soap, -1, type, arrayType, n); case SOAP_TYPE_ns2__Records: return (void*)soap_instantiate_ns2__Records(soap, -1, type, arrayType, n); case SOAP_TYPE_ns2__JointRange: return (void*)soap_instantiate_ns2__JointRange(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getApplications: return (void*)soap_instantiate__ns2__getApplications(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getApplicationsResponse: return (void*)soap_instantiate__ns2__getApplicationsResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getApplicationDatas: return (void*)soap_instantiate__ns2__getApplicationDatas(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getApplicationDatasResponse: return (void*)soap_instantiate__ns2__getApplicationDatasResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getRecords: return (void*)soap_instantiate__ns2__getRecords(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getRecordsResponse: return (void*)soap_instantiate__ns2__getRecordsResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getRecord: return (void*)soap_instantiate__ns2__getRecord(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getRecordResponse: return (void*)soap_instantiate__ns2__getRecordResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getJointRange: return (void*)soap_instantiate__ns2__getJointRange(soap, -1, type, arrayType, n); case SOAP_TYPE__ns2__getJointRangeResponse: return (void*)soap_instantiate__ns2__getJointRangeResponse(soap, -1, type, arrayType, n); case SOAP_TYPE_ns3__Include: return (void*)soap_instantiate_ns3__Include(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__JointPos: return (void*)soap_instantiate_ns5__JointPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__Versions: return (void*)soap_instantiate_ns5__Versions(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__Robots: return (void*)soap_instantiate_ns5__Robots(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__VALApplications: return (void*)soap_instantiate_ns5__VALApplications(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__Records: return (void*)soap_instantiate_ns5__Records(soap, -1, type, arrayType, n); case SOAP_TYPE_ns5__AllRobotsPos: return (void*)soap_instantiate_ns5__AllRobotsPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__JointPos: return (void*)soap_instantiate_ns6__JointPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__Versions: return (void*)soap_instantiate_ns6__Versions(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__Robots: return (void*)soap_instantiate_ns6__Robots(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__VALApplications: return (void*)soap_instantiate_ns6__VALApplications(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__Records: return (void*)soap_instantiate_ns6__Records(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__Frame: return (void*)soap_instantiate_ns6__Frame(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__AnthroConfig: return (void*)soap_instantiate_ns6__AnthroConfig(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__ScaraConfig: return (void*)soap_instantiate_ns6__ScaraConfig(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__VrbxConfig: return (void*)soap_instantiate_ns6__VrbxConfig(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__Config: return (void*)soap_instantiate_ns6__Config(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__MotionDesc: return (void*)soap_instantiate_ns6__MotionDesc(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__RobotPos: return (void*)soap_instantiate_ns6__RobotPos(soap, -1, type, arrayType, n); case SOAP_TYPE_ns6__AllRobotsPos: return (void*)soap_instantiate_ns6__AllRobotsPos(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__forwardKin: return (void*)soap_instantiate__ns6__forwardKin(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__forwardKinResponse: return (void*)soap_instantiate__ns6__forwardKinResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__reverseKin: return (void*)soap_instantiate__ns6__reverseKin(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__reverseKinResponse: return (void*)soap_instantiate__ns6__reverseKinResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__moveJJ: return (void*)soap_instantiate__ns6__moveJJ(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__moveResponse: return (void*)soap_instantiate__ns6__moveResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__moveJC: return (void*)soap_instantiate__ns6__moveJC(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__moveL: return (void*)soap_instantiate__ns6__moveL(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__moveC: return (void*)soap_instantiate__ns6__moveC(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__resetMotion: return (void*)soap_instantiate__ns6__resetMotion(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__motionResponse: return (void*)soap_instantiate__ns6__motionResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__stopMotion: return (void*)soap_instantiate__ns6__stopMotion(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__restartMotion: return (void*)soap_instantiate__ns6__restartMotion(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__setSchedulingMode: return (void*)soap_instantiate__ns6__setSchedulingMode(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__setSchedulingModeResponse: return (void*)soap_instantiate__ns6__setSchedulingModeResponse(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__schedulerRefresh: return (void*)soap_instantiate__ns6__schedulerRefresh(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__MotionAndRobotsPos: return (void*)soap_instantiate__ns6__MotionAndRobotsPos(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__setPower: return (void*)soap_instantiate__ns6__setPower(soap, -1, type, arrayType, n); case SOAP_TYPE__ns6__setPowerResponse: return (void*)soap_instantiate__ns6__setPowerResponse(soap, -1, type, arrayType, n); case SOAP_TYPE_ns4__base64Binary: return (void*)soap_instantiate_ns4__base64Binary(soap, -1, type, arrayType, n); case SOAP_TYPE_ns4__hexBinary: return (void*)soap_instantiate_ns4__hexBinary(soap, -1, type, arrayType, n); #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Header: return (void*)soap_instantiate_SOAP_ENV__Header(soap, -1, type, arrayType, n); #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Detail: return (void*)soap_instantiate_SOAP_ENV__Detail(soap, -1, type, arrayType, n); #endif case SOAP_TYPE___ns1__getSoapServerVersion: return (void*)soap_instantiate___ns1__getSoapServerVersion(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__ping: return (void*)soap_instantiate___ns1__ping(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__getCS8Versions: return (void*)soap_instantiate___ns1__getCS8Versions(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__login: return (void*)soap_instantiate___ns1__login(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__logout: return (void*)soap_instantiate___ns1__logout(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__getRobots: return (void*)soap_instantiate___ns1__getRobots(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__getRobotJointPos: return (void*)soap_instantiate___ns1__getRobotJointPos(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__getRobotJntCartPos: return (void*)soap_instantiate___ns1__getRobotJntCartPos(soap, -1, type, arrayType, n); case SOAP_TYPE___ns1__setRobotJointPos: return (void*)soap_instantiate___ns1__setRobotJointPos(soap, -1, type, arrayType, n); case SOAP_TYPE___ns2__getApplications: return (void*)soap_instantiate___ns2__getApplications(soap, -1, type, arrayType, n); case SOAP_TYPE___ns2__getApplicationDatas: return (void*)soap_instantiate___ns2__getApplicationDatas(soap, -1, type, arrayType, n); case SOAP_TYPE___ns2__getRecords: return (void*)soap_instantiate___ns2__getRecords(soap, -1, type, arrayType, n); case SOAP_TYPE___ns2__getRecord: return (void*)soap_instantiate___ns2__getRecord(soap, -1, type, arrayType, n); case SOAP_TYPE___ns2__getJointRange: return (void*)soap_instantiate___ns2__getJointRange(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__forwardKin: return (void*)soap_instantiate___ns6__forwardKin(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__reverseKin: return (void*)soap_instantiate___ns6__reverseKin(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__moveJJ: return (void*)soap_instantiate___ns6__moveJJ(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__moveJC: return (void*)soap_instantiate___ns6__moveJC(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__moveL: return (void*)soap_instantiate___ns6__moveL(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__moveC: return (void*)soap_instantiate___ns6__moveC(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__resetMotion: return (void*)soap_instantiate___ns6__resetMotion(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__stopMotion: return (void*)soap_instantiate___ns6__stopMotion(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__restartMotion: return (void*)soap_instantiate___ns6__restartMotion(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__setSchedulingMode: return (void*)soap_instantiate___ns6__setSchedulingMode(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__schedulerRefresh: return (void*)soap_instantiate___ns6__schedulerRefresh(soap, -1, type, arrayType, n); case SOAP_TYPE___ns6__setPower: return (void*)soap_instantiate___ns6__setPower(soap, -1, type, arrayType, n); #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Code: return (void*)soap_instantiate_SOAP_ENV__Code(soap, -1, type, arrayType, n); #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Reason: return (void*)soap_instantiate_SOAP_ENV__Reason(soap, -1, type, arrayType, n); #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Fault: return (void*)soap_instantiate_SOAP_ENV__Fault(soap, -1, type, arrayType, n); #endif case SOAP_TYPE_xsd__anyURI: return (void*)soap_instantiate_xsd__anyURI(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfPointerTons6__RobotPos: return (void*)soap_instantiate_std__vectorTemplateOfPointerTons6__RobotPos(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOf_XML: return (void*)soap_instantiate_std__vectorTemplateOf_XML(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfstd__string: return (void*)soap_instantiate_std__vectorTemplateOfstd__string(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfPointerTons2__VALApplication: return (void*)soap_instantiate_std__vectorTemplateOfPointerTons2__VALApplication(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Parameter: return (void*)soap_instantiate_std__vectorTemplateOfPointerTons1__Parameter(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Robot: return (void*)soap_instantiate_std__vectorTemplateOfPointerTons1__Robot(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Version: return (void*)soap_instantiate_std__vectorTemplateOfPointerTons1__Version(soap, -1, type, arrayType, n); case SOAP_TYPE_std__vectorTemplateOfdouble: return (void*)soap_instantiate_std__vectorTemplateOfdouble(soap, -1, type, arrayType, n); } return NULL; } SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist *p) { switch (p->type) { case SOAP_TYPE_std__string: if (p->size < 0) delete (std::string*)p->ptr; else delete[] (std::string*)p->ptr; break; case SOAP_TYPE_xsd__base64Binary: if (p->size < 0) delete (xsd__base64Binary*)p->ptr; else delete[] (xsd__base64Binary*)p->ptr; break; case SOAP_TYPE_xsd__hexBinary: if (p->size < 0) delete (xsd__hexBinary*)p->ptr; else delete[] (xsd__hexBinary*)p->ptr; break; case SOAP_TYPE_ns1__ServerException: if (p->size < 0) delete (ns1__ServerException*)p->ptr; else delete[] (ns1__ServerException*)p->ptr; break; case SOAP_TYPE_ns1__JointPos: if (p->size < 0) delete (ns1__JointPos*)p->ptr; else delete[] (ns1__JointPos*)p->ptr; break; case SOAP_TYPE_ns1__CartesianPos: if (p->size < 0) delete (ns1__CartesianPos*)p->ptr; else delete[] (ns1__CartesianPos*)p->ptr; break; case SOAP_TYPE_ns1__Robot: if (p->size < 0) delete (ns1__Robot*)p->ptr; else delete[] (ns1__Robot*)p->ptr; break; case SOAP_TYPE_ns1__Version: if (p->size < 0) delete (ns1__Version*)p->ptr; else delete[] (ns1__Version*)p->ptr; break; case SOAP_TYPE_ns1__Versions: if (p->size < 0) delete (ns1__Versions*)p->ptr; else delete[] (ns1__Versions*)p->ptr; break; case SOAP_TYPE_ns1__SoapServerVersion: if (p->size < 0) delete (ns1__SoapServerVersion*)p->ptr; else delete[] (ns1__SoapServerVersion*)p->ptr; break; case SOAP_TYPE_ns1__Robots: if (p->size < 0) delete (ns1__Robots*)p->ptr; else delete[] (ns1__Robots*)p->ptr; break; case SOAP_TYPE_ns1__Parameter: if (p->size < 0) delete (ns1__Parameter*)p->ptr; else delete[] (ns1__Parameter*)p->ptr; break; case SOAP_TYPE_ns1__Parameters: if (p->size < 0) delete (ns1__Parameters*)p->ptr; else delete[] (ns1__Parameters*)p->ptr; break; case SOAP_TYPE__ns1__getSoapServerVersion: if (p->size < 0) delete (_ns1__getSoapServerVersion*)p->ptr; else delete[] (_ns1__getSoapServerVersion*)p->ptr; break; case SOAP_TYPE__ns1__getSoapServerVersionResponse: if (p->size < 0) delete (_ns1__getSoapServerVersionResponse*)p->ptr; else delete[] (_ns1__getSoapServerVersionResponse*)p->ptr; break; case SOAP_TYPE__ns1__ping: if (p->size < 0) delete (_ns1__ping*)p->ptr; else delete[] (_ns1__ping*)p->ptr; break; case SOAP_TYPE__ns1__pingResponse: if (p->size < 0) delete (_ns1__pingResponse*)p->ptr; else delete[] (_ns1__pingResponse*)p->ptr; break; case SOAP_TYPE__ns1__getCS8Versions: if (p->size < 0) delete (_ns1__getCS8Versions*)p->ptr; else delete[] (_ns1__getCS8Versions*)p->ptr; break; case SOAP_TYPE__ns1__getCS8VersionsResponse: if (p->size < 0) delete (_ns1__getCS8VersionsResponse*)p->ptr; else delete[] (_ns1__getCS8VersionsResponse*)p->ptr; break; case SOAP_TYPE__ns1__login: if (p->size < 0) delete (_ns1__login*)p->ptr; else delete[] (_ns1__login*)p->ptr; break; case SOAP_TYPE__ns1__loginResponse: if (p->size < 0) delete (_ns1__loginResponse*)p->ptr; else delete[] (_ns1__loginResponse*)p->ptr; break; case SOAP_TYPE__ns1__logout: if (p->size < 0) delete (_ns1__logout*)p->ptr; else delete[] (_ns1__logout*)p->ptr; break; case SOAP_TYPE__ns1__logoutResponse: if (p->size < 0) delete (_ns1__logoutResponse*)p->ptr; else delete[] (_ns1__logoutResponse*)p->ptr; break; case SOAP_TYPE__ns1__getRobots: if (p->size < 0) delete (_ns1__getRobots*)p->ptr; else delete[] (_ns1__getRobots*)p->ptr; break; case SOAP_TYPE__ns1__getRobotsResponse: if (p->size < 0) delete (_ns1__getRobotsResponse*)p->ptr; else delete[] (_ns1__getRobotsResponse*)p->ptr; break; case SOAP_TYPE__ns1__getRobotJointPos: if (p->size < 0) delete (_ns1__getRobotJointPos*)p->ptr; else delete[] (_ns1__getRobotJointPos*)p->ptr; break; case SOAP_TYPE__ns1__getRobotJointPosResponse: if (p->size < 0) delete (_ns1__getRobotJointPosResponse*)p->ptr; else delete[] (_ns1__getRobotJointPosResponse*)p->ptr; break; case SOAP_TYPE__ns1__getRobotJntCartPos: if (p->size < 0) delete (_ns1__getRobotJntCartPos*)p->ptr; else delete[] (_ns1__getRobotJntCartPos*)p->ptr; break; case SOAP_TYPE__ns1__getRobotJntCartPosResponse: if (p->size < 0) delete (_ns1__getRobotJntCartPosResponse*)p->ptr; else delete[] (_ns1__getRobotJntCartPosResponse*)p->ptr; break; case SOAP_TYPE__ns1__setRobotJointPos: if (p->size < 0) delete (_ns1__setRobotJointPos*)p->ptr; else delete[] (_ns1__setRobotJointPos*)p->ptr; break; case SOAP_TYPE__ns1__setRobotPosResponse: if (p->size < 0) delete (_ns1__setRobotPosResponse*)p->ptr; else delete[] (_ns1__setRobotPosResponse*)p->ptr; break; case SOAP_TYPE__ns1__findServer: if (p->size < 0) delete (_ns1__findServer*)p->ptr; else delete[] (_ns1__findServer*)p->ptr; break; case SOAP_TYPE__ns1__findServerResponse: if (p->size < 0) delete (_ns1__findServerResponse*)p->ptr; else delete[] (_ns1__findServerResponse*)p->ptr; break; case SOAP_TYPE__ns1__getControllerParameters: if (p->size < 0) delete (_ns1__getControllerParameters*)p->ptr; else delete[] (_ns1__getControllerParameters*)p->ptr; break; case SOAP_TYPE__ns1__getControllerParametersResponse: if (p->size < 0) delete (_ns1__getControllerParametersResponse*)p->ptr; else delete[] (_ns1__getControllerParametersResponse*)p->ptr; break; case SOAP_TYPE__ns1__getCS8Compatibility: if (p->size < 0) delete (_ns1__getCS8Compatibility*)p->ptr; else delete[] (_ns1__getCS8Compatibility*)p->ptr; break; case SOAP_TYPE__ns1__getCS8CompatibilityResponse: if (p->size < 0) delete (_ns1__getCS8CompatibilityResponse*)p->ptr; else delete[] (_ns1__getCS8CompatibilityResponse*)p->ptr; break; case SOAP_TYPE_ns2__VALApplication: if (p->size < 0) delete (ns2__VALApplication*)p->ptr; else delete[] (ns2__VALApplication*)p->ptr; break; case SOAP_TYPE_ns2__VALApplications: if (p->size < 0) delete (ns2__VALApplications*)p->ptr; else delete[] (ns2__VALApplications*)p->ptr; break; case SOAP_TYPE_ns2__Data: if (p->size < 0) delete (ns2__Data*)p->ptr; else delete[] (ns2__Data*)p->ptr; break; case SOAP_TYPE_ns2__Records: if (p->size < 0) delete (ns2__Records*)p->ptr; else delete[] (ns2__Records*)p->ptr; break; case SOAP_TYPE_ns2__JointRange: if (p->size < 0) delete (ns2__JointRange*)p->ptr; else delete[] (ns2__JointRange*)p->ptr; break; case SOAP_TYPE__ns2__getApplications: if (p->size < 0) delete (_ns2__getApplications*)p->ptr; else delete[] (_ns2__getApplications*)p->ptr; break; case SOAP_TYPE__ns2__getApplicationsResponse: if (p->size < 0) delete (_ns2__getApplicationsResponse*)p->ptr; else delete[] (_ns2__getApplicationsResponse*)p->ptr; break; case SOAP_TYPE__ns2__getApplicationDatas: if (p->size < 0) delete (_ns2__getApplicationDatas*)p->ptr; else delete[] (_ns2__getApplicationDatas*)p->ptr; break; case SOAP_TYPE__ns2__getApplicationDatasResponse: if (p->size < 0) delete (_ns2__getApplicationDatasResponse*)p->ptr; else delete[] (_ns2__getApplicationDatasResponse*)p->ptr; break; case SOAP_TYPE__ns2__getRecords: if (p->size < 0) delete (_ns2__getRecords*)p->ptr; else delete[] (_ns2__getRecords*)p->ptr; break; case SOAP_TYPE__ns2__getRecordsResponse: if (p->size < 0) delete (_ns2__getRecordsResponse*)p->ptr; else delete[] (_ns2__getRecordsResponse*)p->ptr; break; case SOAP_TYPE__ns2__getRecord: if (p->size < 0) delete (_ns2__getRecord*)p->ptr; else delete[] (_ns2__getRecord*)p->ptr; break; case SOAP_TYPE__ns2__getRecordResponse: if (p->size < 0) delete (_ns2__getRecordResponse*)p->ptr; else delete[] (_ns2__getRecordResponse*)p->ptr; break; case SOAP_TYPE__ns2__getJointRange: if (p->size < 0) delete (_ns2__getJointRange*)p->ptr; else delete[] (_ns2__getJointRange*)p->ptr; break; case SOAP_TYPE__ns2__getJointRangeResponse: if (p->size < 0) delete (_ns2__getJointRangeResponse*)p->ptr; else delete[] (_ns2__getJointRangeResponse*)p->ptr; break; case SOAP_TYPE_ns3__Include: if (p->size < 0) delete (ns3__Include*)p->ptr; else delete[] (ns3__Include*)p->ptr; break; case SOAP_TYPE_ns5__JointPos: if (p->size < 0) delete (ns5__JointPos*)p->ptr; else delete[] (ns5__JointPos*)p->ptr; break; case SOAP_TYPE_ns5__Versions: if (p->size < 0) delete (ns5__Versions*)p->ptr; else delete[] (ns5__Versions*)p->ptr; break; case SOAP_TYPE_ns5__Robots: if (p->size < 0) delete (ns5__Robots*)p->ptr; else delete[] (ns5__Robots*)p->ptr; break; case SOAP_TYPE_ns5__VALApplications: if (p->size < 0) delete (ns5__VALApplications*)p->ptr; else delete[] (ns5__VALApplications*)p->ptr; break; case SOAP_TYPE_ns5__Records: if (p->size < 0) delete (ns5__Records*)p->ptr; else delete[] (ns5__Records*)p->ptr; break; case SOAP_TYPE_ns5__AllRobotsPos: if (p->size < 0) delete (ns5__AllRobotsPos*)p->ptr; else delete[] (ns5__AllRobotsPos*)p->ptr; break; case SOAP_TYPE_ns6__JointPos: if (p->size < 0) delete (ns6__JointPos*)p->ptr; else delete[] (ns6__JointPos*)p->ptr; break; case SOAP_TYPE_ns6__Versions: if (p->size < 0) delete (ns6__Versions*)p->ptr; else delete[] (ns6__Versions*)p->ptr; break; case SOAP_TYPE_ns6__Robots: if (p->size < 0) delete (ns6__Robots*)p->ptr; else delete[] (ns6__Robots*)p->ptr; break; case SOAP_TYPE_ns6__VALApplications: if (p->size < 0) delete (ns6__VALApplications*)p->ptr; else delete[] (ns6__VALApplications*)p->ptr; break; case SOAP_TYPE_ns6__Records: if (p->size < 0) delete (ns6__Records*)p->ptr; else delete[] (ns6__Records*)p->ptr; break; case SOAP_TYPE_ns6__Frame: if (p->size < 0) delete (ns6__Frame*)p->ptr; else delete[] (ns6__Frame*)p->ptr; break; case SOAP_TYPE_ns6__AnthroConfig: if (p->size < 0) delete (ns6__AnthroConfig*)p->ptr; else delete[] (ns6__AnthroConfig*)p->ptr; break; case SOAP_TYPE_ns6__ScaraConfig: if (p->size < 0) delete (ns6__ScaraConfig*)p->ptr; else delete[] (ns6__ScaraConfig*)p->ptr; break; case SOAP_TYPE_ns6__VrbxConfig: if (p->size < 0) delete (ns6__VrbxConfig*)p->ptr; else delete[] (ns6__VrbxConfig*)p->ptr; break; case SOAP_TYPE_ns6__Config: if (p->size < 0) delete (ns6__Config*)p->ptr; else delete[] (ns6__Config*)p->ptr; break; case SOAP_TYPE_ns6__MotionDesc: if (p->size < 0) delete (ns6__MotionDesc*)p->ptr; else delete[] (ns6__MotionDesc*)p->ptr; break; case SOAP_TYPE_ns6__RobotPos: if (p->size < 0) delete (ns6__RobotPos*)p->ptr; else delete[] (ns6__RobotPos*)p->ptr; break; case SOAP_TYPE_ns6__AllRobotsPos: if (p->size < 0) delete (ns6__AllRobotsPos*)p->ptr; else delete[] (ns6__AllRobotsPos*)p->ptr; break; case SOAP_TYPE__ns6__forwardKin: if (p->size < 0) delete (_ns6__forwardKin*)p->ptr; else delete[] (_ns6__forwardKin*)p->ptr; break; case SOAP_TYPE__ns6__forwardKinResponse: if (p->size < 0) delete (_ns6__forwardKinResponse*)p->ptr; else delete[] (_ns6__forwardKinResponse*)p->ptr; break; case SOAP_TYPE__ns6__reverseKin: if (p->size < 0) delete (_ns6__reverseKin*)p->ptr; else delete[] (_ns6__reverseKin*)p->ptr; break; case SOAP_TYPE__ns6__reverseKinResponse: if (p->size < 0) delete (_ns6__reverseKinResponse*)p->ptr; else delete[] (_ns6__reverseKinResponse*)p->ptr; break; case SOAP_TYPE__ns6__moveJJ: if (p->size < 0) delete (_ns6__moveJJ*)p->ptr; else delete[] (_ns6__moveJJ*)p->ptr; break; case SOAP_TYPE__ns6__moveResponse: if (p->size < 0) delete (_ns6__moveResponse*)p->ptr; else delete[] (_ns6__moveResponse*)p->ptr; break; case SOAP_TYPE__ns6__moveJC: if (p->size < 0) delete (_ns6__moveJC*)p->ptr; else delete[] (_ns6__moveJC*)p->ptr; break; case SOAP_TYPE__ns6__moveL: if (p->size < 0) delete (_ns6__moveL*)p->ptr; else delete[] (_ns6__moveL*)p->ptr; break; case SOAP_TYPE__ns6__moveC: if (p->size < 0) delete (_ns6__moveC*)p->ptr; else delete[] (_ns6__moveC*)p->ptr; break; case SOAP_TYPE__ns6__resetMotion: if (p->size < 0) delete (_ns6__resetMotion*)p->ptr; else delete[] (_ns6__resetMotion*)p->ptr; break; case SOAP_TYPE__ns6__motionResponse: if (p->size < 0) delete (_ns6__motionResponse*)p->ptr; else delete[] (_ns6__motionResponse*)p->ptr; break; case SOAP_TYPE__ns6__stopMotion: if (p->size < 0) delete (_ns6__stopMotion*)p->ptr; else delete[] (_ns6__stopMotion*)p->ptr; break; case SOAP_TYPE__ns6__restartMotion: if (p->size < 0) delete (_ns6__restartMotion*)p->ptr; else delete[] (_ns6__restartMotion*)p->ptr; break; case SOAP_TYPE__ns6__setSchedulingMode: if (p->size < 0) delete (_ns6__setSchedulingMode*)p->ptr; else delete[] (_ns6__setSchedulingMode*)p->ptr; break; case SOAP_TYPE__ns6__setSchedulingModeResponse: if (p->size < 0) delete (_ns6__setSchedulingModeResponse*)p->ptr; else delete[] (_ns6__setSchedulingModeResponse*)p->ptr; break; case SOAP_TYPE__ns6__schedulerRefresh: if (p->size < 0) delete (_ns6__schedulerRefresh*)p->ptr; else delete[] (_ns6__schedulerRefresh*)p->ptr; break; case SOAP_TYPE__ns6__MotionAndRobotsPos: if (p->size < 0) delete (_ns6__MotionAndRobotsPos*)p->ptr; else delete[] (_ns6__MotionAndRobotsPos*)p->ptr; break; case SOAP_TYPE__ns6__setPower: if (p->size < 0) delete (_ns6__setPower*)p->ptr; else delete[] (_ns6__setPower*)p->ptr; break; case SOAP_TYPE__ns6__setPowerResponse: if (p->size < 0) delete (_ns6__setPowerResponse*)p->ptr; else delete[] (_ns6__setPowerResponse*)p->ptr; break; case SOAP_TYPE_ns4__base64Binary: if (p->size < 0) delete (ns4__base64Binary*)p->ptr; else delete[] (ns4__base64Binary*)p->ptr; break; case SOAP_TYPE_ns4__hexBinary: if (p->size < 0) delete (ns4__hexBinary*)p->ptr; else delete[] (ns4__hexBinary*)p->ptr; break; case SOAP_TYPE_SOAP_ENV__Header: if (p->size < 0) delete (struct SOAP_ENV__Header*)p->ptr; else delete[] (struct SOAP_ENV__Header*)p->ptr; break; case SOAP_TYPE_SOAP_ENV__Detail: if (p->size < 0) delete (struct SOAP_ENV__Detail*)p->ptr; else delete[] (struct SOAP_ENV__Detail*)p->ptr; break; case SOAP_TYPE___ns1__getSoapServerVersion: if (p->size < 0) delete (struct __ns1__getSoapServerVersion*)p->ptr; else delete[] (struct __ns1__getSoapServerVersion*)p->ptr; break; case SOAP_TYPE___ns1__ping: if (p->size < 0) delete (struct __ns1__ping*)p->ptr; else delete[] (struct __ns1__ping*)p->ptr; break; case SOAP_TYPE___ns1__getCS8Versions: if (p->size < 0) delete (struct __ns1__getCS8Versions*)p->ptr; else delete[] (struct __ns1__getCS8Versions*)p->ptr; break; case SOAP_TYPE___ns1__login: if (p->size < 0) delete (struct __ns1__login*)p->ptr; else delete[] (struct __ns1__login*)p->ptr; break; case SOAP_TYPE___ns1__logout: if (p->size < 0) delete (struct __ns1__logout*)p->ptr; else delete[] (struct __ns1__logout*)p->ptr; break; case SOAP_TYPE___ns1__getRobots: if (p->size < 0) delete (struct __ns1__getRobots*)p->ptr; else delete[] (struct __ns1__getRobots*)p->ptr; break; case SOAP_TYPE___ns1__getRobotJointPos: if (p->size < 0) delete (struct __ns1__getRobotJointPos*)p->ptr; else delete[] (struct __ns1__getRobotJointPos*)p->ptr; break; case SOAP_TYPE___ns1__getRobotJntCartPos: if (p->size < 0) delete (struct __ns1__getRobotJntCartPos*)p->ptr; else delete[] (struct __ns1__getRobotJntCartPos*)p->ptr; break; case SOAP_TYPE___ns1__setRobotJointPos: if (p->size < 0) delete (struct __ns1__setRobotJointPos*)p->ptr; else delete[] (struct __ns1__setRobotJointPos*)p->ptr; break; case SOAP_TYPE___ns2__getApplications: if (p->size < 0) delete (struct __ns2__getApplications*)p->ptr; else delete[] (struct __ns2__getApplications*)p->ptr; break; case SOAP_TYPE___ns2__getApplicationDatas: if (p->size < 0) delete (struct __ns2__getApplicationDatas*)p->ptr; else delete[] (struct __ns2__getApplicationDatas*)p->ptr; break; case SOAP_TYPE___ns2__getRecords: if (p->size < 0) delete (struct __ns2__getRecords*)p->ptr; else delete[] (struct __ns2__getRecords*)p->ptr; break; case SOAP_TYPE___ns2__getRecord: if (p->size < 0) delete (struct __ns2__getRecord*)p->ptr; else delete[] (struct __ns2__getRecord*)p->ptr; break; case SOAP_TYPE___ns2__getJointRange: if (p->size < 0) delete (struct __ns2__getJointRange*)p->ptr; else delete[] (struct __ns2__getJointRange*)p->ptr; break; case SOAP_TYPE___ns6__forwardKin: if (p->size < 0) delete (struct __ns6__forwardKin*)p->ptr; else delete[] (struct __ns6__forwardKin*)p->ptr; break; case SOAP_TYPE___ns6__reverseKin: if (p->size < 0) delete (struct __ns6__reverseKin*)p->ptr; else delete[] (struct __ns6__reverseKin*)p->ptr; break; case SOAP_TYPE___ns6__moveJJ: if (p->size < 0) delete (struct __ns6__moveJJ*)p->ptr; else delete[] (struct __ns6__moveJJ*)p->ptr; break; case SOAP_TYPE___ns6__moveJC: if (p->size < 0) delete (struct __ns6__moveJC*)p->ptr; else delete[] (struct __ns6__moveJC*)p->ptr; break; case SOAP_TYPE___ns6__moveL: if (p->size < 0) delete (struct __ns6__moveL*)p->ptr; else delete[] (struct __ns6__moveL*)p->ptr; break; case SOAP_TYPE___ns6__moveC: if (p->size < 0) delete (struct __ns6__moveC*)p->ptr; else delete[] (struct __ns6__moveC*)p->ptr; break; case SOAP_TYPE___ns6__resetMotion: if (p->size < 0) delete (struct __ns6__resetMotion*)p->ptr; else delete[] (struct __ns6__resetMotion*)p->ptr; break; case SOAP_TYPE___ns6__stopMotion: if (p->size < 0) delete (struct __ns6__stopMotion*)p->ptr; else delete[] (struct __ns6__stopMotion*)p->ptr; break; case SOAP_TYPE___ns6__restartMotion: if (p->size < 0) delete (struct __ns6__restartMotion*)p->ptr; else delete[] (struct __ns6__restartMotion*)p->ptr; break; case SOAP_TYPE___ns6__setSchedulingMode: if (p->size < 0) delete (struct __ns6__setSchedulingMode*)p->ptr; else delete[] (struct __ns6__setSchedulingMode*)p->ptr; break; case SOAP_TYPE___ns6__schedulerRefresh: if (p->size < 0) delete (struct __ns6__schedulerRefresh*)p->ptr; else delete[] (struct __ns6__schedulerRefresh*)p->ptr; break; case SOAP_TYPE___ns6__setPower: if (p->size < 0) delete (struct __ns6__setPower*)p->ptr; else delete[] (struct __ns6__setPower*)p->ptr; break; case SOAP_TYPE_SOAP_ENV__Code: if (p->size < 0) delete (struct SOAP_ENV__Code*)p->ptr; else delete[] (struct SOAP_ENV__Code*)p->ptr; break; case SOAP_TYPE_SOAP_ENV__Reason: if (p->size < 0) delete (struct SOAP_ENV__Reason*)p->ptr; else delete[] (struct SOAP_ENV__Reason*)p->ptr; break; case SOAP_TYPE_SOAP_ENV__Fault: if (p->size < 0) delete (struct SOAP_ENV__Fault*)p->ptr; else delete[] (struct SOAP_ENV__Fault*)p->ptr; break; case SOAP_TYPE_xsd__anyURI: if (p->size < 0) delete (std::string*)p->ptr; else delete[] (std::string*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons6__RobotPos: if (p->size < 0) delete (std::vector<ns6__RobotPos * >*)p->ptr; else delete[] (std::vector<ns6__RobotPos * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOf_XML: if (p->size < 0) delete (std::vector<char * >*)p->ptr; else delete[] (std::vector<char * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfstd__string: if (p->size < 0) delete (std::vector<std::string >*)p->ptr; else delete[] (std::vector<std::string >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons2__VALApplication: if (p->size < 0) delete (std::vector<ns2__VALApplication * >*)p->ptr; else delete[] (std::vector<ns2__VALApplication * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Parameter: if (p->size < 0) delete (std::vector<ns1__Parameter * >*)p->ptr; else delete[] (std::vector<ns1__Parameter * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Robot: if (p->size < 0) delete (std::vector<ns1__Robot * >*)p->ptr; else delete[] (std::vector<ns1__Robot * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Version: if (p->size < 0) delete (std::vector<ns1__Version * >*)p->ptr; else delete[] (std::vector<ns1__Version * >*)p->ptr; break; case SOAP_TYPE_std__vectorTemplateOfdouble: if (p->size < 0) delete (std::vector<double >*)p->ptr; else delete[] (std::vector<double >*)p->ptr; break; default: return SOAP_ERR; } return SOAP_OK; } SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, const char *type, const char *arrayType) { return soap_id_enter(soap, id, p, t, n, 0, type, arrayType, soap_instantiate); } SOAP_FMAC3 void* SOAP_FMAC4 soap_container_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k) { return soap_id_forward(soap, href, p, len, st, tt, n, k, soap_container_insert); } SOAP_FMAC3 void SOAP_FMAC4 soap_container_insert(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) #ifdef WIN32 #pragma warning(push) #pragma warning(disable:4065) #endif { switch (tt) { case SOAP_TYPE_std__vectorTemplateOfPointerTons6__RobotPos: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<ns6__RobotPos * >*)p)[len] = *(ns6__RobotPos **)q; break; case SOAP_TYPE_std__vectorTemplateOf_XML: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<char * >*)p)[len] = *(char **)q; break; case SOAP_TYPE_std__vectorTemplateOfstd__string: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<std::string >*)p)[len] = *(std::string *)q; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons2__VALApplication: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<ns2__VALApplication * >*)p)[len] = *(ns2__VALApplication **)q; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Parameter: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<ns1__Parameter * >*)p)[len] = *(ns1__Parameter **)q; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Robot: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<ns1__Robot * >*)p)[len] = *(ns1__Robot **)q; break; case SOAP_TYPE_std__vectorTemplateOfPointerTons1__Version: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<ns1__Version * >*)p)[len] = *(ns1__Version **)q; break; case SOAP_TYPE_std__vectorTemplateOfdouble: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Container insert type=%d in %d location=%p object=%p len=%lu\n", st, tt, p, q, (unsigned long)len)); (*(std::vector<double >*)p)[len] = *(double *)q; break; default: DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not insert type=%d in %d\n", st, tt)); } #ifdef WIN32 #pragma warning(pop) #endif } SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap *soap, char *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_byte *a = SOAP_DEFAULT_byte; #else *a = (char)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap *soap, const char *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_byte); if (soap_out_byte(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type) { return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte); } SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap *soap, char *p, const char *tag, const char *type) { if ((p = soap_in_byte(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap *soap, const char *tag, char *a, const char *type) { char *p; p = soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte); return p; } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__SessionId(struct soap *soap, const int *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__SessionId); if (soap_out_ns1__SessionId(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__SessionId(struct soap *soap, const char *tag, int id, const int *a, const char *type) { return soap_outint(soap, tag, id, a, type, SOAP_TYPE_ns1__SessionId); } SOAP_FMAC3 int * SOAP_FMAC4 soap_get_ns1__SessionId(struct soap *soap, int *p, const char *tag, const char *type) { if ((p = soap_in_ns1__SessionId(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 int * SOAP_FMAC4 soap_in_ns1__SessionId(struct soap *soap, const char *tag, int *a, const char *type) { int *p; p = soap_inint(soap, tag, a, type, SOAP_TYPE_ns1__SessionId); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap *soap, int *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_int *a = SOAP_DEFAULT_int; #else *a = (int)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap *soap, const int *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_int); if (soap_out_int(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type) { return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int); } SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap *soap, int *p, const char *tag, const char *type) { if ((p = soap_in_int(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap *soap, const char *tag, int *a, const char *type) { int *p; p = soap_inint(soap, tag, a, type, SOAP_TYPE_int); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_double(struct soap *soap, double *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_double *a = SOAP_DEFAULT_double; #else *a = (double)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_double(struct soap *soap, const double *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_double); if (soap_out_double(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_double(struct soap *soap, const char *tag, int id, const double *a, const char *type) { return soap_outdouble(soap, tag, id, a, type, SOAP_TYPE_double); } SOAP_FMAC3 double * SOAP_FMAC4 soap_get_double(struct soap *soap, double *p, const char *tag, const char *type) { if ((p = soap_in_double(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 double * SOAP_FMAC4 soap_in_double(struct soap *soap, const char *tag, double *a, const char *type) { double *p; p = soap_indouble(soap, tag, a, type, SOAP_TYPE_double); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_unsignedByte(struct soap *soap, unsigned char *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_unsignedByte *a = SOAP_DEFAULT_unsignedByte; #else *a = (unsigned char)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_unsignedByte(struct soap *soap, const unsigned char *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_unsignedByte); if (soap_out_unsignedByte(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_unsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *a, const char *type) { return soap_outunsignedByte(soap, tag, id, a, type, SOAP_TYPE_unsignedByte); } SOAP_FMAC3 unsigned char * SOAP_FMAC4 soap_get_unsignedByte(struct soap *soap, unsigned char *p, const char *tag, const char *type) { if ((p = soap_in_unsignedByte(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 unsigned char * SOAP_FMAC4 soap_in_unsignedByte(struct soap *soap, const char *tag, unsigned char *a, const char *type) { unsigned char *p; p = soap_inunsignedByte(soap, tag, a, type, SOAP_TYPE_unsignedByte); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_unsignedInt(struct soap *soap, unsigned int *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_unsignedInt *a = SOAP_DEFAULT_unsignedInt; #else *a = (unsigned int)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_unsignedInt(struct soap *soap, const unsigned int *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_unsignedInt); if (soap_out_unsignedInt(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_unsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *a, const char *type) { return soap_outunsignedInt(soap, tag, id, a, type, SOAP_TYPE_unsignedInt); } SOAP_FMAC3 unsigned int * SOAP_FMAC4 soap_get_unsignedInt(struct soap *soap, unsigned int *p, const char *tag, const char *type) { if ((p = soap_in_unsignedInt(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 unsigned int * SOAP_FMAC4 soap_in_unsignedInt(struct soap *soap, const char *tag, unsigned int *a, const char *type) { unsigned int *p; p = soap_inunsignedInt(soap, tag, a, type, SOAP_TYPE_unsignedInt); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_bool(struct soap *soap, bool *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_bool *a = SOAP_DEFAULT_bool; #else *a = (bool)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_bool(struct soap *soap, const bool *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_bool); if (soap_out_bool(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_bool[] = { { (long)false, "false" }, { (long)true, "true" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_bool2s(struct soap *soap, bool n) { return soap_code_str(soap_codes_bool, n!=0); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_bool(struct soap *soap, const char *tag, int id, const bool *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_bool), type) || soap_send(soap, soap_bool2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 bool * SOAP_FMAC4 soap_get_bool(struct soap *soap, bool *p, const char *tag, const char *type) { if ((p = soap_in_bool(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2bool(struct soap *soap, const char *s, bool *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_bool, s); if (map) *a = (bool)(map->code != 0); else { long n; if (soap_s2long(soap, s, &n) || n < 0 || n > 1) return soap->error = SOAP_TYPE; *a = (bool)(n != 0); } return SOAP_OK; } SOAP_FMAC3 bool * SOAP_FMAC4 soap_in_bool(struct soap *soap, const char *tag, bool *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":boolean")) { soap->error = SOAP_TYPE; return NULL; } a = (bool *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_bool, sizeof(bool), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2bool(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (bool *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_bool, 0, sizeof(bool), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__PowerReturnCode(struct soap *soap, enum ns6__PowerReturnCode *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__PowerReturnCode *a = SOAP_DEFAULT_ns6__PowerReturnCode; #else *a = (enum ns6__PowerReturnCode)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__PowerReturnCode(struct soap *soap, const enum ns6__PowerReturnCode *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__PowerReturnCode); if (soap_out_ns6__PowerReturnCode(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__PowerReturnCode[] = { { (long)ns6__PowerReturnCode__POWER_NO_ERR, "POWER-NO-ERR" }, { (long)ns6__PowerReturnCode__POWER_CHANGE_WHILE_ROBOT_NOT_STOPPED, "POWER-CHANGE-WHILE-ROBOT-NOT-STOPPED" }, { (long)ns6__PowerReturnCode__POWER_ENABLE_TIMEOUT, "POWER-ENABLE-TIMEOUT" }, { (long)ns6__PowerReturnCode__POWER_DISABLE_TIMEOUT, "POWER-DISABLE-TIMEOUT" }, { (long)ns6__PowerReturnCode__POWER_CHANGE_ONLY_IN_REMOTE_MODE, "POWER-CHANGE-ONLY-IN-REMOTE-MODE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__PowerReturnCode2s(struct soap *soap, enum ns6__PowerReturnCode n) { const char *s = soap_code_str(soap_codes_ns6__PowerReturnCode, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__PowerReturnCode(struct soap *soap, const char *tag, int id, const enum ns6__PowerReturnCode *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__PowerReturnCode), type) || soap_send(soap, soap_ns6__PowerReturnCode2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__PowerReturnCode * SOAP_FMAC4 soap_get_ns6__PowerReturnCode(struct soap *soap, enum ns6__PowerReturnCode *p, const char *tag, const char *type) { if ((p = soap_in_ns6__PowerReturnCode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__PowerReturnCode(struct soap *soap, const char *s, enum ns6__PowerReturnCode *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__PowerReturnCode, s); if (map) *a = (enum ns6__PowerReturnCode)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 4))) return soap->error = SOAP_TYPE; *a = (enum ns6__PowerReturnCode)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__PowerReturnCode * SOAP_FMAC4 soap_in_ns6__PowerReturnCode(struct soap *soap, const char *tag, enum ns6__PowerReturnCode *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__PowerReturnCode *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__PowerReturnCode, sizeof(enum ns6__PowerReturnCode), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__PowerReturnCode(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__PowerReturnCode *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__PowerReturnCode, 0, sizeof(enum ns6__PowerReturnCode), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__SchedulingMode(struct soap *soap, enum ns6__SchedulingMode *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__SchedulingMode *a = SOAP_DEFAULT_ns6__SchedulingMode; #else *a = (enum ns6__SchedulingMode)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__SchedulingMode(struct soap *soap, const enum ns6__SchedulingMode *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__SchedulingMode); if (soap_out_ns6__SchedulingMode(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__SchedulingMode[] = { { (long)ns6__SchedulingMode__SCHEDULING_INTERNAL, "SCHEDULING-INTERNAL" }, { (long)ns6__SchedulingMode__SCHEDULING_EXTERNAL, "SCHEDULING-EXTERNAL" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__SchedulingMode2s(struct soap *soap, enum ns6__SchedulingMode n) { const char *s = soap_code_str(soap_codes_ns6__SchedulingMode, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__SchedulingMode(struct soap *soap, const char *tag, int id, const enum ns6__SchedulingMode *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__SchedulingMode), type) || soap_send(soap, soap_ns6__SchedulingMode2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__SchedulingMode * SOAP_FMAC4 soap_get_ns6__SchedulingMode(struct soap *soap, enum ns6__SchedulingMode *p, const char *tag, const char *type) { if ((p = soap_in_ns6__SchedulingMode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__SchedulingMode(struct soap *soap, const char *s, enum ns6__SchedulingMode *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__SchedulingMode, s); if (map) *a = (enum ns6__SchedulingMode)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 1))) return soap->error = SOAP_TYPE; *a = (enum ns6__SchedulingMode)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__SchedulingMode * SOAP_FMAC4 soap_in_ns6__SchedulingMode(struct soap *soap, const char *tag, enum ns6__SchedulingMode *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__SchedulingMode *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__SchedulingMode, sizeof(enum ns6__SchedulingMode), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__SchedulingMode(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__SchedulingMode *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__SchedulingMode, 0, sizeof(enum ns6__SchedulingMode), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__ReversingResult(struct soap *soap, enum ns6__ReversingResult *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__ReversingResult *a = SOAP_DEFAULT_ns6__ReversingResult; #else *a = (enum ns6__ReversingResult)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__ReversingResult(struct soap *soap, const enum ns6__ReversingResult *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__ReversingResult); if (soap_out_ns6__ReversingResult(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__ReversingResult[] = { { (long)ns6__ReversingResult__REVERSE_OK, "REVERSE-OK" }, { (long)ns6__ReversingResult__NO_CONVERGENCE, "NO-CONVERGENCE" }, { (long)ns6__ReversingResult__OUT_OF_JNT_RANGE, "OUT-OF-JNT-RANGE" }, { (long)ns6__ReversingResult__OUT_OF_WORKSPACE, "OUT-OF-WORKSPACE" }, { (long)ns6__ReversingResult__INVALID_CONFIG, "INVALID-CONFIG" }, { (long)ns6__ReversingResult__INVALID_ORIENTATION, "INVALID-ORIENTATION" }, { (long)ns6__ReversingResult__UNSUPPORTED_KINEMATICS, "UNSUPPORTED-KINEMATICS" }, { (long)ns6__ReversingResult__UNCONSTRAINT_FRAME, "UNCONSTRAINT-FRAME" }, { (long)ns6__ReversingResult__INVALID_ERROR_CODE, "INVALID-ERROR-CODE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__ReversingResult2s(struct soap *soap, enum ns6__ReversingResult n) { const char *s = soap_code_str(soap_codes_ns6__ReversingResult, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__ReversingResult(struct soap *soap, const char *tag, int id, const enum ns6__ReversingResult *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__ReversingResult), type) || soap_send(soap, soap_ns6__ReversingResult2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__ReversingResult * SOAP_FMAC4 soap_get_ns6__ReversingResult(struct soap *soap, enum ns6__ReversingResult *p, const char *tag, const char *type) { if ((p = soap_in_ns6__ReversingResult(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__ReversingResult(struct soap *soap, const char *s, enum ns6__ReversingResult *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__ReversingResult, s); if (map) *a = (enum ns6__ReversingResult)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 8))) return soap->error = SOAP_TYPE; *a = (enum ns6__ReversingResult)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__ReversingResult * SOAP_FMAC4 soap_in_ns6__ReversingResult(struct soap *soap, const char *tag, enum ns6__ReversingResult *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__ReversingResult *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__ReversingResult, sizeof(enum ns6__ReversingResult), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__ReversingResult(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__ReversingResult *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__ReversingResult, 0, sizeof(enum ns6__ReversingResult), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__MotionReturnCode(struct soap *soap, enum ns6__MotionReturnCode *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__MotionReturnCode *a = SOAP_DEFAULT_ns6__MotionReturnCode; #else *a = (enum ns6__MotionReturnCode)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__MotionReturnCode(struct soap *soap, const enum ns6__MotionReturnCode *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__MotionReturnCode); if (soap_out_ns6__MotionReturnCode(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__MotionReturnCode[] = { { (long)ns6__MotionReturnCode__SCSV3_MOT_NO_ERR, "SCSV3-MOT-NO-ERR" }, { (long)ns6__MotionReturnCode__SCSV3_MOT_NOT_READY, "SCSV3-MOT-NOT-READY" }, { (long)ns6__MotionReturnCode__SCSV3_MOT_ERR_PARAM, "SCSV3-MOT-ERR-PARAM" }, { (long)ns6__MotionReturnCode__SCSV3_MOT_ERR_MISUSE, "SCSV3-MOT-ERR-MISUSE" }, { (long)ns6__MotionReturnCode__SCSV3_MOT_ERR_UNEXPECTED, "SCSV3-MOT-ERR-UNEXPECTED" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__MotionReturnCode2s(struct soap *soap, enum ns6__MotionReturnCode n) { const char *s = soap_code_str(soap_codes_ns6__MotionReturnCode, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__MotionReturnCode(struct soap *soap, const char *tag, int id, const enum ns6__MotionReturnCode *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__MotionReturnCode), type) || soap_send(soap, soap_ns6__MotionReturnCode2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__MotionReturnCode * SOAP_FMAC4 soap_get_ns6__MotionReturnCode(struct soap *soap, enum ns6__MotionReturnCode *p, const char *tag, const char *type) { if ((p = soap_in_ns6__MotionReturnCode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__MotionReturnCode(struct soap *soap, const char *s, enum ns6__MotionReturnCode *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__MotionReturnCode, s); if (map) *a = (enum ns6__MotionReturnCode)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 4))) return soap->error = SOAP_TYPE; *a = (enum ns6__MotionReturnCode)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__MotionReturnCode * SOAP_FMAC4 soap_in_ns6__MotionReturnCode(struct soap *soap, const char *tag, enum ns6__MotionReturnCode *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__MotionReturnCode *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__MotionReturnCode, sizeof(enum ns6__MotionReturnCode), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__MotionReturnCode(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__MotionReturnCode *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__MotionReturnCode, 0, sizeof(enum ns6__MotionReturnCode), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__AboveBelowConfig(struct soap *soap, enum ns6__AboveBelowConfig *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__AboveBelowConfig *a = SOAP_DEFAULT_ns6__AboveBelowConfig; #else *a = (enum ns6__AboveBelowConfig)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__AboveBelowConfig(struct soap *soap, const enum ns6__AboveBelowConfig *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__AboveBelowConfig); if (soap_out_ns6__AboveBelowConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__AboveBelowConfig[] = { { (long)ns6__AboveBelowConfig__ABSAME, "ABSAME" }, { (long)ns6__AboveBelowConfig__ABOVE, "ABOVE" }, { (long)ns6__AboveBelowConfig__BELOW, "BELOW" }, { (long)ns6__AboveBelowConfig__ABFREE, "ABFREE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__AboveBelowConfig2s(struct soap *soap, enum ns6__AboveBelowConfig n) { const char *s = soap_code_str(soap_codes_ns6__AboveBelowConfig, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__AboveBelowConfig(struct soap *soap, const char *tag, int id, const enum ns6__AboveBelowConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__AboveBelowConfig), type) || soap_send(soap, soap_ns6__AboveBelowConfig2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__AboveBelowConfig * SOAP_FMAC4 soap_get_ns6__AboveBelowConfig(struct soap *soap, enum ns6__AboveBelowConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__AboveBelowConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__AboveBelowConfig(struct soap *soap, const char *s, enum ns6__AboveBelowConfig *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__AboveBelowConfig, s); if (map) *a = (enum ns6__AboveBelowConfig)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 3))) return soap->error = SOAP_TYPE; *a = (enum ns6__AboveBelowConfig)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__AboveBelowConfig * SOAP_FMAC4 soap_in_ns6__AboveBelowConfig(struct soap *soap, const char *tag, enum ns6__AboveBelowConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__AboveBelowConfig *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__AboveBelowConfig, sizeof(enum ns6__AboveBelowConfig), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__AboveBelowConfig(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__AboveBelowConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__AboveBelowConfig, 0, sizeof(enum ns6__AboveBelowConfig), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__PositiveNegativeConfig(struct soap *soap, enum ns6__PositiveNegativeConfig *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__PositiveNegativeConfig *a = SOAP_DEFAULT_ns6__PositiveNegativeConfig; #else *a = (enum ns6__PositiveNegativeConfig)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__PositiveNegativeConfig(struct soap *soap, const enum ns6__PositiveNegativeConfig *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__PositiveNegativeConfig); if (soap_out_ns6__PositiveNegativeConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__PositiveNegativeConfig[] = { { (long)ns6__PositiveNegativeConfig__PNSAME, "PNSAME" }, { (long)ns6__PositiveNegativeConfig__POSITIVE, "POSITIVE" }, { (long)ns6__PositiveNegativeConfig__NEGATIVE, "NEGATIVE" }, { (long)ns6__PositiveNegativeConfig__PNFREE, "PNFREE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__PositiveNegativeConfig2s(struct soap *soap, enum ns6__PositiveNegativeConfig n) { const char *s = soap_code_str(soap_codes_ns6__PositiveNegativeConfig, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__PositiveNegativeConfig(struct soap *soap, const char *tag, int id, const enum ns6__PositiveNegativeConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__PositiveNegativeConfig), type) || soap_send(soap, soap_ns6__PositiveNegativeConfig2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__PositiveNegativeConfig * SOAP_FMAC4 soap_get_ns6__PositiveNegativeConfig(struct soap *soap, enum ns6__PositiveNegativeConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__PositiveNegativeConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__PositiveNegativeConfig(struct soap *soap, const char *s, enum ns6__PositiveNegativeConfig *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__PositiveNegativeConfig, s); if (map) *a = (enum ns6__PositiveNegativeConfig)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 3))) return soap->error = SOAP_TYPE; *a = (enum ns6__PositiveNegativeConfig)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__PositiveNegativeConfig * SOAP_FMAC4 soap_in_ns6__PositiveNegativeConfig(struct soap *soap, const char *tag, enum ns6__PositiveNegativeConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__PositiveNegativeConfig *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__PositiveNegativeConfig, sizeof(enum ns6__PositiveNegativeConfig), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__PositiveNegativeConfig(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__PositiveNegativeConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__PositiveNegativeConfig, 0, sizeof(enum ns6__PositiveNegativeConfig), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__ShoulderConfig(struct soap *soap, enum ns6__ShoulderConfig *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__ShoulderConfig *a = SOAP_DEFAULT_ns6__ShoulderConfig; #else *a = (enum ns6__ShoulderConfig)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__ShoulderConfig(struct soap *soap, const enum ns6__ShoulderConfig *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__ShoulderConfig); if (soap_out_ns6__ShoulderConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__ShoulderConfig[] = { { (long)ns6__ShoulderConfig__SSAME, "SSAME" }, { (long)ns6__ShoulderConfig__LEFTY, "LEFTY" }, { (long)ns6__ShoulderConfig__RIGHTY, "RIGHTY" }, { (long)ns6__ShoulderConfig__SFREE, "SFREE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__ShoulderConfig2s(struct soap *soap, enum ns6__ShoulderConfig n) { const char *s = soap_code_str(soap_codes_ns6__ShoulderConfig, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__ShoulderConfig(struct soap *soap, const char *tag, int id, const enum ns6__ShoulderConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__ShoulderConfig), type) || soap_send(soap, soap_ns6__ShoulderConfig2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__ShoulderConfig * SOAP_FMAC4 soap_get_ns6__ShoulderConfig(struct soap *soap, enum ns6__ShoulderConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__ShoulderConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__ShoulderConfig(struct soap *soap, const char *s, enum ns6__ShoulderConfig *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__ShoulderConfig, s); if (map) *a = (enum ns6__ShoulderConfig)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 3))) return soap->error = SOAP_TYPE; *a = (enum ns6__ShoulderConfig)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__ShoulderConfig * SOAP_FMAC4 soap_in_ns6__ShoulderConfig(struct soap *soap, const char *tag, enum ns6__ShoulderConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__ShoulderConfig *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__ShoulderConfig, sizeof(enum ns6__ShoulderConfig), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__ShoulderConfig(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__ShoulderConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__ShoulderConfig, 0, sizeof(enum ns6__ShoulderConfig), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__BlendType(struct soap *soap, enum ns6__BlendType *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__BlendType *a = SOAP_DEFAULT_ns6__BlendType; #else *a = (enum ns6__BlendType)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__BlendType(struct soap *soap, const enum ns6__BlendType *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__BlendType); if (soap_out_ns6__BlendType(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__BlendType[] = { { (long)ns6__BlendType__BLEND_OFF, "BLEND-OFF" }, { (long)ns6__BlendType__BLEND_JOINT, "BLEND-JOINT" }, { (long)ns6__BlendType__BLEND_CART, "BLEND-CART" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__BlendType2s(struct soap *soap, enum ns6__BlendType n) { const char *s = soap_code_str(soap_codes_ns6__BlendType, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__BlendType(struct soap *soap, const char *tag, int id, const enum ns6__BlendType *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__BlendType), type) || soap_send(soap, soap_ns6__BlendType2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__BlendType * SOAP_FMAC4 soap_get_ns6__BlendType(struct soap *soap, enum ns6__BlendType *p, const char *tag, const char *type) { if ((p = soap_in_ns6__BlendType(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__BlendType(struct soap *soap, const char *s, enum ns6__BlendType *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__BlendType, s); if (map) *a = (enum ns6__BlendType)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 2))) return soap->error = SOAP_TYPE; *a = (enum ns6__BlendType)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__BlendType * SOAP_FMAC4 soap_in_ns6__BlendType(struct soap *soap, const char *tag, enum ns6__BlendType *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__BlendType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__BlendType, sizeof(enum ns6__BlendType), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__BlendType(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__BlendType *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__BlendType, 0, sizeof(enum ns6__BlendType), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns6__MoveType(struct soap *soap, enum ns6__MoveType *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns6__MoveType *a = SOAP_DEFAULT_ns6__MoveType; #else *a = (enum ns6__MoveType)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns6__MoveType(struct soap *soap, const enum ns6__MoveType *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns6__MoveType); if (soap_out_ns6__MoveType(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns6__MoveType[] = { { (long)ns6__MoveType__ABSOLUTE_MOVE, "ABSOLUTE-MOVE" }, { (long)ns6__MoveType__RELATIVE_MOVE, "RELATIVE-MOVE" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns6__MoveType2s(struct soap *soap, enum ns6__MoveType n) { const char *s = soap_code_str(soap_codes_ns6__MoveType, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__MoveType(struct soap *soap, const char *tag, int id, const enum ns6__MoveType *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__MoveType), type) || soap_send(soap, soap_ns6__MoveType2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns6__MoveType * SOAP_FMAC4 soap_get_ns6__MoveType(struct soap *soap, enum ns6__MoveType *p, const char *tag, const char *type) { if ((p = soap_in_ns6__MoveType(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns6__MoveType(struct soap *soap, const char *s, enum ns6__MoveType *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns6__MoveType, s); if (map) *a = (enum ns6__MoveType)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 1))) return soap->error = SOAP_TYPE; *a = (enum ns6__MoveType)n; } return SOAP_OK; } SOAP_FMAC3 enum ns6__MoveType * SOAP_FMAC4 soap_in_ns6__MoveType(struct soap *soap, const char *tag, enum ns6__MoveType *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns6__MoveType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__MoveType, sizeof(enum ns6__MoveType), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns6__MoveType(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns6__MoveType *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__MoveType, 0, sizeof(enum ns6__MoveType), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__DiameterAxis3(struct soap *soap, enum ns1__DiameterAxis3 *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns1__DiameterAxis3 *a = SOAP_DEFAULT_ns1__DiameterAxis3; #else *a = (enum ns1__DiameterAxis3)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__DiameterAxis3(struct soap *soap, const enum ns1__DiameterAxis3 *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__DiameterAxis3); if (soap_out_ns1__DiameterAxis3(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns1__DiameterAxis3[] = { { (long)ns1__DiameterAxis3__DIAMETERAXIS3_INVALID, "DIAMETERAXIS3-INVALID" }, { (long)ns1__DiameterAxis3__DIAMETERAXIS3_D20, "DIAMETERAXIS3-D20" }, { (long)ns1__DiameterAxis3__DIAMETERAXIS3_D25, "DIAMETERAXIS3-D25" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns1__DiameterAxis32s(struct soap *soap, enum ns1__DiameterAxis3 n) { const char *s = soap_code_str(soap_codes_ns1__DiameterAxis3, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__DiameterAxis3(struct soap *soap, const char *tag, int id, const enum ns1__DiameterAxis3 *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__DiameterAxis3), type) || soap_send(soap, soap_ns1__DiameterAxis32s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns1__DiameterAxis3 * SOAP_FMAC4 soap_get_ns1__DiameterAxis3(struct soap *soap, enum ns1__DiameterAxis3 *p, const char *tag, const char *type) { if ((p = soap_in_ns1__DiameterAxis3(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns1__DiameterAxis3(struct soap *soap, const char *s, enum ns1__DiameterAxis3 *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns1__DiameterAxis3, s); if (map) *a = (enum ns1__DiameterAxis3)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 2))) return soap->error = SOAP_TYPE; *a = (enum ns1__DiameterAxis3)n; } return SOAP_OK; } SOAP_FMAC3 enum ns1__DiameterAxis3 * SOAP_FMAC4 soap_in_ns1__DiameterAxis3(struct soap *soap, const char *tag, enum ns1__DiameterAxis3 *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns1__DiameterAxis3 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__DiameterAxis3, sizeof(enum ns1__DiameterAxis3), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns1__DiameterAxis3(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns1__DiameterAxis3 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__DiameterAxis3, 0, sizeof(enum ns1__DiameterAxis3), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__LengthAxis3(struct soap *soap, enum ns1__LengthAxis3 *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns1__LengthAxis3 *a = SOAP_DEFAULT_ns1__LengthAxis3; #else *a = (enum ns1__LengthAxis3)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__LengthAxis3(struct soap *soap, const enum ns1__LengthAxis3 *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__LengthAxis3); if (soap_out_ns1__LengthAxis3(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns1__LengthAxis3[] = { { (long)ns1__LengthAxis3__LENGTHAXIS3_INVALID, "LENGTHAXIS3-INVALID" }, { (long)ns1__LengthAxis3__LENGTHAXIS3_L100, "LENGTHAXIS3-L100" }, { (long)ns1__LengthAxis3__LENGTHAXIS3_L200, "LENGTHAXIS3-L200" }, { (long)ns1__LengthAxis3__LENGTHAXIS3_L400, "LENGTHAXIS3-L400" }, { (long)ns1__LengthAxis3__LENGTHAXIS3_L600, "LENGTHAXIS3-L600" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns1__LengthAxis32s(struct soap *soap, enum ns1__LengthAxis3 n) { const char *s = soap_code_str(soap_codes_ns1__LengthAxis3, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__LengthAxis3(struct soap *soap, const char *tag, int id, const enum ns1__LengthAxis3 *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__LengthAxis3), type) || soap_send(soap, soap_ns1__LengthAxis32s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns1__LengthAxis3 * SOAP_FMAC4 soap_get_ns1__LengthAxis3(struct soap *soap, enum ns1__LengthAxis3 *p, const char *tag, const char *type) { if ((p = soap_in_ns1__LengthAxis3(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns1__LengthAxis3(struct soap *soap, const char *s, enum ns1__LengthAxis3 *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns1__LengthAxis3, s); if (map) *a = (enum ns1__LengthAxis3)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 4))) return soap->error = SOAP_TYPE; *a = (enum ns1__LengthAxis3)n; } return SOAP_OK; } SOAP_FMAC3 enum ns1__LengthAxis3 * SOAP_FMAC4 soap_in_ns1__LengthAxis3(struct soap *soap, const char *tag, enum ns1__LengthAxis3 *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns1__LengthAxis3 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__LengthAxis3, sizeof(enum ns1__LengthAxis3), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns1__LengthAxis3(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns1__LengthAxis3 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__LengthAxis3, 0, sizeof(enum ns1__LengthAxis3), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__MountType(struct soap *soap, enum ns1__MountType *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns1__MountType *a = SOAP_DEFAULT_ns1__MountType; #else *a = (enum ns1__MountType)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__MountType(struct soap *soap, const enum ns1__MountType *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__MountType); if (soap_out_ns1__MountType(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns1__MountType[] = { { (long)ns1__MountType__MOUNTTYPE_INVALID, "MOUNTTYPE-INVALID" }, { (long)ns1__MountType__MOUNTTYPE_FLOOR, "MOUNTTYPE-FLOOR" }, { (long)ns1__MountType__MOUNTTYPE_CEILING, "MOUNTTYPE-CEILING" }, { (long)ns1__MountType__MOUNTTYPE_WALL, "MOUNTTYPE-WALL" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns1__MountType2s(struct soap *soap, enum ns1__MountType n) { const char *s = soap_code_str(soap_codes_ns1__MountType, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__MountType(struct soap *soap, const char *tag, int id, const enum ns1__MountType *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__MountType), type) || soap_send(soap, soap_ns1__MountType2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns1__MountType * SOAP_FMAC4 soap_get_ns1__MountType(struct soap *soap, enum ns1__MountType *p, const char *tag, const char *type) { if ((p = soap_in_ns1__MountType(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns1__MountType(struct soap *soap, const char *s, enum ns1__MountType *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns1__MountType, s); if (map) *a = (enum ns1__MountType)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 3))) return soap->error = SOAP_TYPE; *a = (enum ns1__MountType)n; } return SOAP_OK; } SOAP_FMAC3 enum ns1__MountType * SOAP_FMAC4 soap_in_ns1__MountType(struct soap *soap, const char *tag, enum ns1__MountType *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns1__MountType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__MountType, sizeof(enum ns1__MountType), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns1__MountType(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns1__MountType *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__MountType, 0, sizeof(enum ns1__MountType), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__Kinematic(struct soap *soap, enum ns1__Kinematic *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns1__Kinematic *a = SOAP_DEFAULT_ns1__Kinematic; #else *a = (enum ns1__Kinematic)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__Kinematic(struct soap *soap, const enum ns1__Kinematic *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__Kinematic); if (soap_out_ns1__Kinematic(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns1__Kinematic[] = { { (long)ns1__Kinematic__KINEMATIC_INVALID, "KINEMATIC-INVALID" }, { (long)ns1__Kinematic__KINEMATIC_ANTHROPOMORPH6, "KINEMATIC-ANTHROPOMORPH6" }, { (long)ns1__Kinematic__KINEMATIC_ANTHROPOMORPH5, "KINEMATIC-ANTHROPOMORPH5" }, { (long)ns1__Kinematic__KINEMATIC_SCARA, "KINEMATIC-SCARA" }, { (long)ns1__Kinematic__KINEMATIC_EISENMANN, "KINEMATIC-EISENMANN" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns1__Kinematic2s(struct soap *soap, enum ns1__Kinematic n) { const char *s = soap_code_str(soap_codes_ns1__Kinematic, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Kinematic(struct soap *soap, const char *tag, int id, const enum ns1__Kinematic *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Kinematic), type) || soap_send(soap, soap_ns1__Kinematic2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns1__Kinematic * SOAP_FMAC4 soap_get_ns1__Kinematic(struct soap *soap, enum ns1__Kinematic *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Kinematic(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns1__Kinematic(struct soap *soap, const char *s, enum ns1__Kinematic *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns1__Kinematic, s); if (map) *a = (enum ns1__Kinematic)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 4))) return soap->error = SOAP_TYPE; *a = (enum ns1__Kinematic)n; } return SOAP_OK; } SOAP_FMAC3 enum ns1__Kinematic * SOAP_FMAC4 soap_in_ns1__Kinematic(struct soap *soap, const char *tag, enum ns1__Kinematic *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns1__Kinematic *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Kinematic, sizeof(enum ns1__Kinematic), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns1__Kinematic(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns1__Kinematic *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Kinematic, 0, sizeof(enum ns1__Kinematic), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__ServerExceptionCode(struct soap *soap, enum ns1__ServerExceptionCode *a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_ns1__ServerExceptionCode *a = SOAP_DEFAULT_ns1__ServerExceptionCode; #else *a = (enum ns1__ServerExceptionCode)0; #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__ServerExceptionCode(struct soap *soap, const enum ns1__ServerExceptionCode *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__ServerExceptionCode); if (soap_out_ns1__ServerExceptionCode(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } static const struct soap_code_map soap_codes_ns1__ServerExceptionCode[] = { { (long)ns1__ServerExceptionCode__UNKNOWN_CODE, "UNKNOWN-CODE" }, { (long)ns1__ServerExceptionCode__INVALID_SESSION_ID_CODE, "INVALID-SESSION-ID-CODE" }, { (long)ns1__ServerExceptionCode__INVALID_ROBOT_ID_CODE, "INVALID-ROBOT-ID-CODE" }, { (long)ns1__ServerExceptionCode__READ_ACCESS_ERROR_CODE, "READ-ACCESS-ERROR-CODE" }, { (long)ns1__ServerExceptionCode__WRITE_ACCESS_ERROR_CODE, "WRITE-ACCESS-ERROR-CODE" }, { (long)ns1__ServerExceptionCode__SET_POS_NOT_SIMUL_CODE, "SET-POS-NOT-SIMUL-CODE" }, { (long)ns1__ServerExceptionCode__SET_POS_POWER_ON_CODE, "SET-POS-POWER-ON-CODE" }, { (long)ns1__ServerExceptionCode__FILE_NOT_FOUND_CODE, "FILE-NOT-FOUND-CODE" }, { (long)ns1__ServerExceptionCode__INVALID_CONFIG_CODE, "INVALID-CONFIG-CODE" }, { (long)ns1__ServerExceptionCode__INVALID_NUMBER_OF_AXIS_CODE, "INVALID-NUMBER-OF-AXIS-CODE" }, { (long)ns1__ServerExceptionCode__INVALID_MOT_DESC_CODE, "INVALID-MOT-DESC-CODE" }, { (long)ns1__ServerExceptionCode__CLIENT_ALREADY_CONNECTED, "CLIENT-ALREADY-CONNECTED" }, { (long)ns1__ServerExceptionCode__CLIENT_COMMUNICATION_ERROR, "CLIENT-COMMUNICATION-ERROR" }, { (long)ns1__ServerExceptionCode__APPLICATION_NOT_FOUND, "APPLICATION-NOT-FOUND" }, { (long)ns1__ServerExceptionCode__PROGRAM_NOT_FOUND, "PROGRAM-NOT-FOUND" }, { (long)ns1__ServerExceptionCode__TASK_NOT_FOUND, "TASK-NOT-FOUND" }, { (long)ns1__ServerExceptionCode__STACK_FRAME_NOT_FOUND, "STACK-FRAME-NOT-FOUND" }, { (long)ns1__ServerExceptionCode__TASK_ALREADY_LOCKED, "TASK-ALREADY-LOCKED" }, { (long)ns1__ServerExceptionCode__INVALID_SOAP_HANDLER, "INVALID-SOAP-HANDLER" }, { (long)ns1__ServerExceptionCode__INVALID_SOAP_HEADER, "INVALID-SOAP-HEADER" }, { (long)ns1__ServerExceptionCode__PROGRAM_LINE_NOT_FOUND, "PROGRAM-LINE-NOT-FOUND" }, { 0, NULL } }; SOAP_FMAC3S const char* SOAP_FMAC4S soap_ns1__ServerExceptionCode2s(struct soap *soap, enum ns1__ServerExceptionCode n) { const char *s = soap_code_str(soap_codes_ns1__ServerExceptionCode, (long)n); if (s) return s; return soap_long2s(soap, (long)n); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__ServerExceptionCode(struct soap *soap, const char *tag, int id, const enum ns1__ServerExceptionCode *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__ServerExceptionCode), type) || soap_send(soap, soap_ns1__ServerExceptionCode2s(soap, *a))) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 enum ns1__ServerExceptionCode * SOAP_FMAC4 soap_get_ns1__ServerExceptionCode(struct soap *soap, enum ns1__ServerExceptionCode *p, const char *tag, const char *type) { if ((p = soap_in_ns1__ServerExceptionCode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3S int SOAP_FMAC4S soap_s2ns1__ServerExceptionCode(struct soap *soap, const char *s, enum ns1__ServerExceptionCode *a) { const struct soap_code_map *map; if (!s) return SOAP_OK; map = soap_code(soap_codes_ns1__ServerExceptionCode, s); if (map) *a = (enum ns1__ServerExceptionCode)map->code; else { long n; if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 20))) return soap->error = SOAP_TYPE; *a = (enum ns1__ServerExceptionCode)n; } return SOAP_OK; } SOAP_FMAC3 enum ns1__ServerExceptionCode * SOAP_FMAC4 soap_in_ns1__ServerExceptionCode(struct soap *soap, const char *tag, enum ns1__ServerExceptionCode *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (enum ns1__ServerExceptionCode *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__ServerExceptionCode, sizeof(enum ns1__ServerExceptionCode), 0, NULL, NULL, NULL); if (!a) return NULL; if (soap->body && !*soap->href) { if (!a || soap_s2ns1__ServerExceptionCode(soap, soap_value(soap), a) || soap_element_end_in(soap, tag)) return NULL; } else { a = (enum ns1__ServerExceptionCode *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__ServerExceptionCode, 0, sizeof(enum ns1__ServerExceptionCode), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } void _ns6__setPowerResponse::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__PowerReturnCode(soap, &this->_ns6__setPowerResponse::code); /* transient soap skipped */ } void _ns6__setPowerResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__setPowerResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__setPowerResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__setPowerResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__setPowerResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__setPowerResponse(struct soap *soap, const char *tag, int id, const _ns6__setPowerResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__setPowerResponse), type)) return soap->error; if (soap_out_ns6__PowerReturnCode(soap, "code", -1, &(a->_ns6__setPowerResponse::code), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__setPowerResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__setPowerResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__setPowerResponse * SOAP_FMAC4 soap_get__ns6__setPowerResponse(struct soap *soap, _ns6__setPowerResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__setPowerResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__setPowerResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__setPowerResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__setPowerResponse * SOAP_FMAC4 soap_in__ns6__setPowerResponse(struct soap *soap, const char *tag, _ns6__setPowerResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__setPowerResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__setPowerResponse, sizeof(_ns6__setPowerResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__setPowerResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__setPowerResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_code1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_code1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__PowerReturnCode(soap, "code", &(a->_ns6__setPowerResponse::code), "ns6:PowerReturnCode")) { soap_flag_code1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__setPowerResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__setPowerResponse, 0, sizeof(_ns6__setPowerResponse), 0, soap_copy__ns6__setPowerResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_code1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__setPowerResponse * SOAP_FMAC4 soap_instantiate__ns6__setPowerResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__setPowerResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__setPowerResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__setPowerResponse; if (size) *size = sizeof(_ns6__setPowerResponse); ((_ns6__setPowerResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__setPowerResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__setPowerResponse); for (int i = 0; i < n; i++) ((_ns6__setPowerResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__setPowerResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__setPowerResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__setPowerResponse %p -> %p\n", q, p)); *(_ns6__setPowerResponse*)p = *(_ns6__setPowerResponse*)q; } void _ns6__setPower::soap_default(struct soap *soap) { this->soap = soap; soap_default_bool(soap, &this->_ns6__setPower::power); /* transient soap skipped */ } void _ns6__setPower::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__setPower::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__setPower); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__setPower::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__setPower(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__setPower(struct soap *soap, const char *tag, int id, const _ns6__setPower *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__setPower), type)) return soap->error; if (soap_out_bool(soap, "power", -1, &(a->_ns6__setPower::power), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__setPower::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__setPower(soap, this, tag, type); } SOAP_FMAC3 _ns6__setPower * SOAP_FMAC4 soap_get__ns6__setPower(struct soap *soap, _ns6__setPower *p, const char *tag, const char *type) { if ((p = soap_in__ns6__setPower(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__setPower::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__setPower(soap, tag, this, type); } SOAP_FMAC3 _ns6__setPower * SOAP_FMAC4 soap_in__ns6__setPower(struct soap *soap, const char *tag, _ns6__setPower *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__setPower *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__setPower, sizeof(_ns6__setPower), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__setPower) { soap_revert(soap); *soap->id = '\0'; return (_ns6__setPower *)a->soap_in(soap, tag, type); } } size_t soap_flag_power1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_power1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_bool(soap, "power", &(a->_ns6__setPower::power), "xsd:boolean")) { soap_flag_power1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__setPower *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__setPower, 0, sizeof(_ns6__setPower), 0, soap_copy__ns6__setPower); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_power1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__setPower * SOAP_FMAC4 soap_instantiate__ns6__setPower(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__setPower(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__setPower, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__setPower; if (size) *size = sizeof(_ns6__setPower); ((_ns6__setPower*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__setPower[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__setPower); for (int i = 0; i < n; i++) ((_ns6__setPower*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__setPower*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__setPower(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__setPower %p -> %p\n", q, p)); *(_ns6__setPower*)p = *(_ns6__setPower*)q; } void _ns6__MotionAndRobotsPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__SchedulingMode(soap, &this->_ns6__MotionAndRobotsPos::schedulingMode); soap_default_bool(soap, &this->_ns6__MotionAndRobotsPos::motionEmpty); this->_ns6__MotionAndRobotsPos::allRobotsPos = NULL; /* transient soap skipped */ } void _ns6__MotionAndRobotsPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__AllRobotsPos(soap, &this->_ns6__MotionAndRobotsPos::allRobotsPos); /* transient soap skipped */ } int _ns6__MotionAndRobotsPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__MotionAndRobotsPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__MotionAndRobotsPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__MotionAndRobotsPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__MotionAndRobotsPos(struct soap *soap, const char *tag, int id, const _ns6__MotionAndRobotsPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__MotionAndRobotsPos), type)) return soap->error; if (soap_out_ns6__SchedulingMode(soap, "schedulingMode", -1, &(a->_ns6__MotionAndRobotsPos::schedulingMode), "")) return soap->error; if (soap_out_bool(soap, "motionEmpty", -1, &(a->_ns6__MotionAndRobotsPos::motionEmpty), "")) return soap->error; if (soap_out_PointerTons6__AllRobotsPos(soap, "allRobotsPos", -1, &(a->_ns6__MotionAndRobotsPos::allRobotsPos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__MotionAndRobotsPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__MotionAndRobotsPos(soap, this, tag, type); } SOAP_FMAC3 _ns6__MotionAndRobotsPos * SOAP_FMAC4 soap_get__ns6__MotionAndRobotsPos(struct soap *soap, _ns6__MotionAndRobotsPos *p, const char *tag, const char *type) { if ((p = soap_in__ns6__MotionAndRobotsPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__MotionAndRobotsPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__MotionAndRobotsPos(soap, tag, this, type); } SOAP_FMAC3 _ns6__MotionAndRobotsPos * SOAP_FMAC4 soap_in__ns6__MotionAndRobotsPos(struct soap *soap, const char *tag, _ns6__MotionAndRobotsPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__MotionAndRobotsPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__MotionAndRobotsPos, sizeof(_ns6__MotionAndRobotsPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__MotionAndRobotsPos) { soap_revert(soap); *soap->id = '\0'; return (_ns6__MotionAndRobotsPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_schedulingMode1 = 1; size_t soap_flag_motionEmpty1 = 1; size_t soap_flag_allRobotsPos1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_schedulingMode1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__SchedulingMode(soap, "schedulingMode", &(a->_ns6__MotionAndRobotsPos::schedulingMode), "ns6:SchedulingMode")) { soap_flag_schedulingMode1--; continue; } if (soap_flag_motionEmpty1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_bool(soap, "motionEmpty", &(a->_ns6__MotionAndRobotsPos::motionEmpty), "xsd:boolean")) { soap_flag_motionEmpty1--; continue; } if (soap_flag_allRobotsPos1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__AllRobotsPos(soap, "allRobotsPos", &(a->_ns6__MotionAndRobotsPos::allRobotsPos), "ns6:AllRobotsPos")) { soap_flag_allRobotsPos1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__MotionAndRobotsPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__MotionAndRobotsPos, 0, sizeof(_ns6__MotionAndRobotsPos), 0, soap_copy__ns6__MotionAndRobotsPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_schedulingMode1 > 0 || soap_flag_motionEmpty1 > 0 || soap_flag_allRobotsPos1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__MotionAndRobotsPos * SOAP_FMAC4 soap_instantiate__ns6__MotionAndRobotsPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__MotionAndRobotsPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__MotionAndRobotsPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__MotionAndRobotsPos; if (size) *size = sizeof(_ns6__MotionAndRobotsPos); ((_ns6__MotionAndRobotsPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__MotionAndRobotsPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__MotionAndRobotsPos); for (int i = 0; i < n; i++) ((_ns6__MotionAndRobotsPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__MotionAndRobotsPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__MotionAndRobotsPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__MotionAndRobotsPos %p -> %p\n", q, p)); *(_ns6__MotionAndRobotsPos*)p = *(_ns6__MotionAndRobotsPos*)q; } void _ns6__schedulerRefresh::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns6__schedulerRefresh::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__schedulerRefresh::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__schedulerRefresh); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__schedulerRefresh::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__schedulerRefresh(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__schedulerRefresh(struct soap *soap, const char *tag, int id, const _ns6__schedulerRefresh *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__schedulerRefresh), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__schedulerRefresh::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__schedulerRefresh(soap, this, tag, type); } SOAP_FMAC3 _ns6__schedulerRefresh * SOAP_FMAC4 soap_get__ns6__schedulerRefresh(struct soap *soap, _ns6__schedulerRefresh *p, const char *tag, const char *type) { if ((p = soap_in__ns6__schedulerRefresh(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__schedulerRefresh::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__schedulerRefresh(soap, tag, this, type); } SOAP_FMAC3 _ns6__schedulerRefresh * SOAP_FMAC4 soap_in__ns6__schedulerRefresh(struct soap *soap, const char *tag, _ns6__schedulerRefresh *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__schedulerRefresh *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__schedulerRefresh, sizeof(_ns6__schedulerRefresh), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__schedulerRefresh) { soap_revert(soap); *soap->id = '\0'; return (_ns6__schedulerRefresh *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__schedulerRefresh *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__schedulerRefresh, 0, sizeof(_ns6__schedulerRefresh), 0, soap_copy__ns6__schedulerRefresh); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns6__schedulerRefresh * SOAP_FMAC4 soap_instantiate__ns6__schedulerRefresh(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__schedulerRefresh(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__schedulerRefresh, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__schedulerRefresh; if (size) *size = sizeof(_ns6__schedulerRefresh); ((_ns6__schedulerRefresh*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__schedulerRefresh[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__schedulerRefresh); for (int i = 0; i < n; i++) ((_ns6__schedulerRefresh*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__schedulerRefresh*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__schedulerRefresh(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__schedulerRefresh %p -> %p\n", q, p)); *(_ns6__schedulerRefresh*)p = *(_ns6__schedulerRefresh*)q; } void _ns6__setSchedulingModeResponse::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns6__setSchedulingModeResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__setSchedulingModeResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__setSchedulingModeResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__setSchedulingModeResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__setSchedulingModeResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__setSchedulingModeResponse(struct soap *soap, const char *tag, int id, const _ns6__setSchedulingModeResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__setSchedulingModeResponse), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__setSchedulingModeResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__setSchedulingModeResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__setSchedulingModeResponse * SOAP_FMAC4 soap_get__ns6__setSchedulingModeResponse(struct soap *soap, _ns6__setSchedulingModeResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__setSchedulingModeResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__setSchedulingModeResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__setSchedulingModeResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__setSchedulingModeResponse * SOAP_FMAC4 soap_in__ns6__setSchedulingModeResponse(struct soap *soap, const char *tag, _ns6__setSchedulingModeResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__setSchedulingModeResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__setSchedulingModeResponse, sizeof(_ns6__setSchedulingModeResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__setSchedulingModeResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__setSchedulingModeResponse *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__setSchedulingModeResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__setSchedulingModeResponse, 0, sizeof(_ns6__setSchedulingModeResponse), 0, soap_copy__ns6__setSchedulingModeResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns6__setSchedulingModeResponse * SOAP_FMAC4 soap_instantiate__ns6__setSchedulingModeResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__setSchedulingModeResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__setSchedulingModeResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__setSchedulingModeResponse; if (size) *size = sizeof(_ns6__setSchedulingModeResponse); ((_ns6__setSchedulingModeResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__setSchedulingModeResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__setSchedulingModeResponse); for (int i = 0; i < n; i++) ((_ns6__setSchedulingModeResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__setSchedulingModeResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__setSchedulingModeResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__setSchedulingModeResponse %p -> %p\n", q, p)); *(_ns6__setSchedulingModeResponse*)p = *(_ns6__setSchedulingModeResponse*)q; } void _ns6__setSchedulingMode::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__SchedulingMode(soap, &this->_ns6__setSchedulingMode::schedulingMode); /* transient soap skipped */ } void _ns6__setSchedulingMode::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__setSchedulingMode::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__setSchedulingMode); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__setSchedulingMode::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__setSchedulingMode(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__setSchedulingMode(struct soap *soap, const char *tag, int id, const _ns6__setSchedulingMode *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__setSchedulingMode), type)) return soap->error; if (soap_out_ns6__SchedulingMode(soap, "schedulingMode", -1, &(a->_ns6__setSchedulingMode::schedulingMode), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__setSchedulingMode::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__setSchedulingMode(soap, this, tag, type); } SOAP_FMAC3 _ns6__setSchedulingMode * SOAP_FMAC4 soap_get__ns6__setSchedulingMode(struct soap *soap, _ns6__setSchedulingMode *p, const char *tag, const char *type) { if ((p = soap_in__ns6__setSchedulingMode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__setSchedulingMode::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__setSchedulingMode(soap, tag, this, type); } SOAP_FMAC3 _ns6__setSchedulingMode * SOAP_FMAC4 soap_in__ns6__setSchedulingMode(struct soap *soap, const char *tag, _ns6__setSchedulingMode *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__setSchedulingMode *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__setSchedulingMode, sizeof(_ns6__setSchedulingMode), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__setSchedulingMode) { soap_revert(soap); *soap->id = '\0'; return (_ns6__setSchedulingMode *)a->soap_in(soap, tag, type); } } size_t soap_flag_schedulingMode1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_schedulingMode1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__SchedulingMode(soap, "schedulingMode", &(a->_ns6__setSchedulingMode::schedulingMode), "ns6:SchedulingMode")) { soap_flag_schedulingMode1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__setSchedulingMode *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__setSchedulingMode, 0, sizeof(_ns6__setSchedulingMode), 0, soap_copy__ns6__setSchedulingMode); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_schedulingMode1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__setSchedulingMode * SOAP_FMAC4 soap_instantiate__ns6__setSchedulingMode(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__setSchedulingMode(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__setSchedulingMode, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__setSchedulingMode; if (size) *size = sizeof(_ns6__setSchedulingMode); ((_ns6__setSchedulingMode*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__setSchedulingMode[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__setSchedulingMode); for (int i = 0; i < n; i++) ((_ns6__setSchedulingMode*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__setSchedulingMode*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__setSchedulingMode(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__setSchedulingMode %p -> %p\n", q, p)); *(_ns6__setSchedulingMode*)p = *(_ns6__setSchedulingMode*)q; } void _ns6__restartMotion::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns6__restartMotion::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__restartMotion::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__restartMotion); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__restartMotion::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__restartMotion(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__restartMotion(struct soap *soap, const char *tag, int id, const _ns6__restartMotion *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__restartMotion), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__restartMotion::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__restartMotion(soap, this, tag, type); } SOAP_FMAC3 _ns6__restartMotion * SOAP_FMAC4 soap_get__ns6__restartMotion(struct soap *soap, _ns6__restartMotion *p, const char *tag, const char *type) { if ((p = soap_in__ns6__restartMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__restartMotion::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__restartMotion(soap, tag, this, type); } SOAP_FMAC3 _ns6__restartMotion * SOAP_FMAC4 soap_in__ns6__restartMotion(struct soap *soap, const char *tag, _ns6__restartMotion *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__restartMotion *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__restartMotion, sizeof(_ns6__restartMotion), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__restartMotion) { soap_revert(soap); *soap->id = '\0'; return (_ns6__restartMotion *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__restartMotion *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__restartMotion, 0, sizeof(_ns6__restartMotion), 0, soap_copy__ns6__restartMotion); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns6__restartMotion * SOAP_FMAC4 soap_instantiate__ns6__restartMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__restartMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__restartMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__restartMotion; if (size) *size = sizeof(_ns6__restartMotion); ((_ns6__restartMotion*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__restartMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__restartMotion); for (int i = 0; i < n; i++) ((_ns6__restartMotion*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__restartMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__restartMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__restartMotion %p -> %p\n", q, p)); *(_ns6__restartMotion*)p = *(_ns6__restartMotion*)q; } void _ns6__stopMotion::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns6__stopMotion::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__stopMotion::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__stopMotion); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__stopMotion::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__stopMotion(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__stopMotion(struct soap *soap, const char *tag, int id, const _ns6__stopMotion *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__stopMotion), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__stopMotion::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__stopMotion(soap, this, tag, type); } SOAP_FMAC3 _ns6__stopMotion * SOAP_FMAC4 soap_get__ns6__stopMotion(struct soap *soap, _ns6__stopMotion *p, const char *tag, const char *type) { if ((p = soap_in__ns6__stopMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__stopMotion::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__stopMotion(soap, tag, this, type); } SOAP_FMAC3 _ns6__stopMotion * SOAP_FMAC4 soap_in__ns6__stopMotion(struct soap *soap, const char *tag, _ns6__stopMotion *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__stopMotion *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__stopMotion, sizeof(_ns6__stopMotion), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__stopMotion) { soap_revert(soap); *soap->id = '\0'; return (_ns6__stopMotion *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__stopMotion *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__stopMotion, 0, sizeof(_ns6__stopMotion), 0, soap_copy__ns6__stopMotion); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns6__stopMotion * SOAP_FMAC4 soap_instantiate__ns6__stopMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__stopMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__stopMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__stopMotion; if (size) *size = sizeof(_ns6__stopMotion); ((_ns6__stopMotion*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__stopMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__stopMotion); for (int i = 0; i < n; i++) ((_ns6__stopMotion*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__stopMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__stopMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__stopMotion %p -> %p\n", q, p)); *(_ns6__stopMotion*)p = *(_ns6__stopMotion*)q; } void _ns6__motionResponse::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__MotionReturnCode(soap, &this->_ns6__motionResponse::motRet); /* transient soap skipped */ } void _ns6__motionResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__motionResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__motionResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__motionResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__motionResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__motionResponse(struct soap *soap, const char *tag, int id, const _ns6__motionResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__motionResponse), type)) return soap->error; if (soap_out_ns6__MotionReturnCode(soap, "motRet", -1, &(a->_ns6__motionResponse::motRet), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__motionResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__motionResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__motionResponse * SOAP_FMAC4 soap_get__ns6__motionResponse(struct soap *soap, _ns6__motionResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__motionResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__motionResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__motionResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__motionResponse * SOAP_FMAC4 soap_in__ns6__motionResponse(struct soap *soap, const char *tag, _ns6__motionResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__motionResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__motionResponse, sizeof(_ns6__motionResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__motionResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__motionResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_motRet1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_motRet1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__MotionReturnCode(soap, "motRet", &(a->_ns6__motionResponse::motRet), "ns6:MotionReturnCode")) { soap_flag_motRet1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__motionResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__motionResponse, 0, sizeof(_ns6__motionResponse), 0, soap_copy__ns6__motionResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_motRet1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__motionResponse * SOAP_FMAC4 soap_instantiate__ns6__motionResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__motionResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__motionResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__motionResponse; if (size) *size = sizeof(_ns6__motionResponse); ((_ns6__motionResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__motionResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__motionResponse); for (int i = 0; i < n; i++) ((_ns6__motionResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__motionResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__motionResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__motionResponse %p -> %p\n", q, p)); *(_ns6__motionResponse*)p = *(_ns6__motionResponse*)q; } void _ns6__resetMotion::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns6__resetMotion::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__resetMotion::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__resetMotion); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__resetMotion::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__resetMotion(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__resetMotion(struct soap *soap, const char *tag, int id, const _ns6__resetMotion *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__resetMotion), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__resetMotion::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__resetMotion(soap, this, tag, type); } SOAP_FMAC3 _ns6__resetMotion * SOAP_FMAC4 soap_get__ns6__resetMotion(struct soap *soap, _ns6__resetMotion *p, const char *tag, const char *type) { if ((p = soap_in__ns6__resetMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__resetMotion::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__resetMotion(soap, tag, this, type); } SOAP_FMAC3 _ns6__resetMotion * SOAP_FMAC4 soap_in__ns6__resetMotion(struct soap *soap, const char *tag, _ns6__resetMotion *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__resetMotion *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__resetMotion, sizeof(_ns6__resetMotion), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__resetMotion) { soap_revert(soap); *soap->id = '\0'; return (_ns6__resetMotion *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__resetMotion *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__resetMotion, 0, sizeof(_ns6__resetMotion), 0, soap_copy__ns6__resetMotion); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns6__resetMotion * SOAP_FMAC4 soap_instantiate__ns6__resetMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__resetMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__resetMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__resetMotion; if (size) *size = sizeof(_ns6__resetMotion); ((_ns6__resetMotion*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__resetMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__resetMotion); for (int i = 0; i < n; i++) ((_ns6__resetMotion*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__resetMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__resetMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__resetMotion %p -> %p\n", q, p)); *(_ns6__resetMotion*)p = *(_ns6__resetMotion*)q; } void _ns6__moveC::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__moveC::robot); this->_ns6__moveC::frameB = NULL; this->_ns6__moveC::frameC = NULL; this->_ns6__moveC::mdesc = NULL; /* transient soap skipped */ } void _ns6__moveC::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__Frame(soap, &this->_ns6__moveC::frameB); soap_serialize_PointerTons6__Frame(soap, &this->_ns6__moveC::frameC); soap_serialize_PointerTons6__MotionDesc(soap, &this->_ns6__moveC::mdesc); /* transient soap skipped */ } int _ns6__moveC::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__moveC); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__moveC::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__moveC(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__moveC(struct soap *soap, const char *tag, int id, const _ns6__moveC *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__moveC), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__moveC::robot), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "frameB", -1, &(a->_ns6__moveC::frameB), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "frameC", -1, &(a->_ns6__moveC::frameC), "")) return soap->error; if (soap_out_PointerTons6__MotionDesc(soap, "mdesc", -1, &(a->_ns6__moveC::mdesc), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__moveC::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__moveC(soap, this, tag, type); } SOAP_FMAC3 _ns6__moveC * SOAP_FMAC4 soap_get__ns6__moveC(struct soap *soap, _ns6__moveC *p, const char *tag, const char *type) { if ((p = soap_in__ns6__moveC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__moveC::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__moveC(soap, tag, this, type); } SOAP_FMAC3 _ns6__moveC * SOAP_FMAC4 soap_in__ns6__moveC(struct soap *soap, const char *tag, _ns6__moveC *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__moveC *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__moveC, sizeof(_ns6__moveC), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__moveC) { soap_revert(soap); *soap->id = '\0'; return (_ns6__moveC *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_frameB1 = 1; size_t soap_flag_frameC1 = 1; size_t soap_flag_mdesc1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__moveC::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_frameB1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "frameB", &(a->_ns6__moveC::frameB), "ns6:Frame")) { soap_flag_frameB1--; continue; } if (soap_flag_frameC1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "frameC", &(a->_ns6__moveC::frameC), "ns6:Frame")) { soap_flag_frameC1--; continue; } if (soap_flag_mdesc1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__MotionDesc(soap, "mdesc", &(a->_ns6__moveC::mdesc), "ns6:MotionDesc")) { soap_flag_mdesc1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__moveC *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__moveC, 0, sizeof(_ns6__moveC), 0, soap_copy__ns6__moveC); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_frameB1 > 0 || soap_flag_frameC1 > 0 || soap_flag_mdesc1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__moveC * SOAP_FMAC4 soap_instantiate__ns6__moveC(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__moveC(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__moveC, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__moveC; if (size) *size = sizeof(_ns6__moveC); ((_ns6__moveC*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__moveC[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__moveC); for (int i = 0; i < n; i++) ((_ns6__moveC*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__moveC*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__moveC(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__moveC %p -> %p\n", q, p)); *(_ns6__moveC*)p = *(_ns6__moveC*)q; } void _ns6__moveL::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__moveL::robot); this->_ns6__moveL::frame = NULL; this->_ns6__moveL::mdesc = NULL; /* transient soap skipped */ } void _ns6__moveL::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__Frame(soap, &this->_ns6__moveL::frame); soap_serialize_PointerTons6__MotionDesc(soap, &this->_ns6__moveL::mdesc); /* transient soap skipped */ } int _ns6__moveL::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__moveL); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__moveL::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__moveL(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__moveL(struct soap *soap, const char *tag, int id, const _ns6__moveL *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__moveL), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__moveL::robot), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "frame", -1, &(a->_ns6__moveL::frame), "")) return soap->error; if (soap_out_PointerTons6__MotionDesc(soap, "mdesc", -1, &(a->_ns6__moveL::mdesc), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__moveL::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__moveL(soap, this, tag, type); } SOAP_FMAC3 _ns6__moveL * SOAP_FMAC4 soap_get__ns6__moveL(struct soap *soap, _ns6__moveL *p, const char *tag, const char *type) { if ((p = soap_in__ns6__moveL(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__moveL::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__moveL(soap, tag, this, type); } SOAP_FMAC3 _ns6__moveL * SOAP_FMAC4 soap_in__ns6__moveL(struct soap *soap, const char *tag, _ns6__moveL *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__moveL *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__moveL, sizeof(_ns6__moveL), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__moveL) { soap_revert(soap); *soap->id = '\0'; return (_ns6__moveL *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_frame1 = 1; size_t soap_flag_mdesc1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__moveL::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_frame1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "frame", &(a->_ns6__moveL::frame), "ns6:Frame")) { soap_flag_frame1--; continue; } if (soap_flag_mdesc1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__MotionDesc(soap, "mdesc", &(a->_ns6__moveL::mdesc), "ns6:MotionDesc")) { soap_flag_mdesc1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__moveL *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__moveL, 0, sizeof(_ns6__moveL), 0, soap_copy__ns6__moveL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_frame1 > 0 || soap_flag_mdesc1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__moveL * SOAP_FMAC4 soap_instantiate__ns6__moveL(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__moveL(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__moveL, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__moveL; if (size) *size = sizeof(_ns6__moveL); ((_ns6__moveL*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__moveL[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__moveL); for (int i = 0; i < n; i++) ((_ns6__moveL*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__moveL*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__moveL(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__moveL %p -> %p\n", q, p)); *(_ns6__moveL*)p = *(_ns6__moveL*)q; } void _ns6__moveJC::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__moveJC::robot); this->_ns6__moveJC::frame = NULL; this->_ns6__moveJC::mdesc = NULL; /* transient soap skipped */ } void _ns6__moveJC::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__Frame(soap, &this->_ns6__moveJC::frame); soap_serialize_PointerTons6__MotionDesc(soap, &this->_ns6__moveJC::mdesc); /* transient soap skipped */ } int _ns6__moveJC::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__moveJC); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__moveJC::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__moveJC(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__moveJC(struct soap *soap, const char *tag, int id, const _ns6__moveJC *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__moveJC), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__moveJC::robot), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "frame", -1, &(a->_ns6__moveJC::frame), "")) return soap->error; if (soap_out_PointerTons6__MotionDesc(soap, "mdesc", -1, &(a->_ns6__moveJC::mdesc), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__moveJC::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__moveJC(soap, this, tag, type); } SOAP_FMAC3 _ns6__moveJC * SOAP_FMAC4 soap_get__ns6__moveJC(struct soap *soap, _ns6__moveJC *p, const char *tag, const char *type) { if ((p = soap_in__ns6__moveJC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__moveJC::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__moveJC(soap, tag, this, type); } SOAP_FMAC3 _ns6__moveJC * SOAP_FMAC4 soap_in__ns6__moveJC(struct soap *soap, const char *tag, _ns6__moveJC *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__moveJC *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__moveJC, sizeof(_ns6__moveJC), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__moveJC) { soap_revert(soap); *soap->id = '\0'; return (_ns6__moveJC *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_frame1 = 1; size_t soap_flag_mdesc1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__moveJC::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_frame1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "frame", &(a->_ns6__moveJC::frame), "ns6:Frame")) { soap_flag_frame1--; continue; } if (soap_flag_mdesc1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__MotionDesc(soap, "mdesc", &(a->_ns6__moveJC::mdesc), "ns6:MotionDesc")) { soap_flag_mdesc1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__moveJC *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__moveJC, 0, sizeof(_ns6__moveJC), 0, soap_copy__ns6__moveJC); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_frame1 > 0 || soap_flag_mdesc1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__moveJC * SOAP_FMAC4 soap_instantiate__ns6__moveJC(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__moveJC(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__moveJC, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__moveJC; if (size) *size = sizeof(_ns6__moveJC); ((_ns6__moveJC*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__moveJC[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__moveJC); for (int i = 0; i < n; i++) ((_ns6__moveJC*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__moveJC*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__moveJC(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__moveJC %p -> %p\n", q, p)); *(_ns6__moveJC*)p = *(_ns6__moveJC*)q; } void _ns6__moveResponse::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__moveResponse::id); soap_default_ns6__MotionReturnCode(soap, &this->_ns6__moveResponse::motRet); /* transient soap skipped */ } void _ns6__moveResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns6__moveResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__moveResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__moveResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__moveResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__moveResponse(struct soap *soap, const char *tag, int id, const _ns6__moveResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__moveResponse), type)) return soap->error; if (soap_out_int(soap, "id", -1, &(a->_ns6__moveResponse::id), "")) return soap->error; if (soap_out_ns6__MotionReturnCode(soap, "motRet", -1, &(a->_ns6__moveResponse::motRet), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__moveResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__moveResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__moveResponse * SOAP_FMAC4 soap_get__ns6__moveResponse(struct soap *soap, _ns6__moveResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__moveResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__moveResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__moveResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__moveResponse * SOAP_FMAC4 soap_in__ns6__moveResponse(struct soap *soap, const char *tag, _ns6__moveResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__moveResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__moveResponse, sizeof(_ns6__moveResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__moveResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__moveResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_id1 = 1; size_t soap_flag_motRet1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_id1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "id", &(a->_ns6__moveResponse::id), "xsd:int")) { soap_flag_id1--; continue; } if (soap_flag_motRet1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__MotionReturnCode(soap, "motRet", &(a->_ns6__moveResponse::motRet), "ns6:MotionReturnCode")) { soap_flag_motRet1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__moveResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__moveResponse, 0, sizeof(_ns6__moveResponse), 0, soap_copy__ns6__moveResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_id1 > 0 || soap_flag_motRet1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__moveResponse * SOAP_FMAC4 soap_instantiate__ns6__moveResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__moveResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__moveResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__moveResponse; if (size) *size = sizeof(_ns6__moveResponse); ((_ns6__moveResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__moveResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__moveResponse); for (int i = 0; i < n; i++) ((_ns6__moveResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__moveResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__moveResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__moveResponse %p -> %p\n", q, p)); *(_ns6__moveResponse*)p = *(_ns6__moveResponse*)q; } void _ns6__moveJJ::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__moveJJ::robot); this->_ns6__moveJJ::joint = NULL; this->_ns6__moveJJ::mdesc = NULL; /* transient soap skipped */ } void _ns6__moveJJ::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns6__moveJJ::joint); soap_serialize_PointerTons6__MotionDesc(soap, &this->_ns6__moveJJ::mdesc); /* transient soap skipped */ } int _ns6__moveJJ::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__moveJJ); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__moveJJ::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__moveJJ(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__moveJJ(struct soap *soap, const char *tag, int id, const _ns6__moveJJ *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__moveJJ), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__moveJJ::robot), "")) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "joint", -1, &(a->_ns6__moveJJ::joint), "")) return soap->error; if (soap_out_PointerTons6__MotionDesc(soap, "mdesc", -1, &(a->_ns6__moveJJ::mdesc), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__moveJJ::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__moveJJ(soap, this, tag, type); } SOAP_FMAC3 _ns6__moveJJ * SOAP_FMAC4 soap_get__ns6__moveJJ(struct soap *soap, _ns6__moveJJ *p, const char *tag, const char *type) { if ((p = soap_in__ns6__moveJJ(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__moveJJ::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__moveJJ(soap, tag, this, type); } SOAP_FMAC3 _ns6__moveJJ * SOAP_FMAC4 soap_in__ns6__moveJJ(struct soap *soap, const char *tag, _ns6__moveJJ *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__moveJJ *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__moveJJ, sizeof(_ns6__moveJJ), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__moveJJ) { soap_revert(soap); *soap->id = '\0'; return (_ns6__moveJJ *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_joint1 = 1; size_t soap_flag_mdesc1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__moveJJ::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_joint1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "joint", &(a->_ns6__moveJJ::joint), "ns1:JointPos")) { soap_flag_joint1--; continue; } if (soap_flag_mdesc1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__MotionDesc(soap, "mdesc", &(a->_ns6__moveJJ::mdesc), "ns6:MotionDesc")) { soap_flag_mdesc1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__moveJJ *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__moveJJ, 0, sizeof(_ns6__moveJJ), 0, soap_copy__ns6__moveJJ); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_joint1 > 0 || soap_flag_mdesc1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__moveJJ * SOAP_FMAC4 soap_instantiate__ns6__moveJJ(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__moveJJ(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__moveJJ, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__moveJJ; if (size) *size = sizeof(_ns6__moveJJ); ((_ns6__moveJJ*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__moveJJ[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__moveJJ); for (int i = 0; i < n; i++) ((_ns6__moveJJ*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__moveJJ*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__moveJJ(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__moveJJ %p -> %p\n", q, p)); *(_ns6__moveJJ*)p = *(_ns6__moveJJ*)q; } void _ns6__reverseKinResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns6__reverseKinResponse::jointOut = NULL; soap_default_ns6__ReversingResult(soap, &this->_ns6__reverseKinResponse::reversingResult); /* transient soap skipped */ } void _ns6__reverseKinResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns6__reverseKinResponse::jointOut); /* transient soap skipped */ } int _ns6__reverseKinResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__reverseKinResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__reverseKinResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__reverseKinResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__reverseKinResponse(struct soap *soap, const char *tag, int id, const _ns6__reverseKinResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__reverseKinResponse), type)) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "jointOut", -1, &(a->_ns6__reverseKinResponse::jointOut), "")) return soap->error; if (soap_out_ns6__ReversingResult(soap, "reversingResult", -1, &(a->_ns6__reverseKinResponse::reversingResult), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__reverseKinResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__reverseKinResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__reverseKinResponse * SOAP_FMAC4 soap_get__ns6__reverseKinResponse(struct soap *soap, _ns6__reverseKinResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__reverseKinResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__reverseKinResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__reverseKinResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__reverseKinResponse * SOAP_FMAC4 soap_in__ns6__reverseKinResponse(struct soap *soap, const char *tag, _ns6__reverseKinResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__reverseKinResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__reverseKinResponse, sizeof(_ns6__reverseKinResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__reverseKinResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__reverseKinResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_jointOut1 = 1; size_t soap_flag_reversingResult1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_jointOut1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "jointOut", &(a->_ns6__reverseKinResponse::jointOut), "ns1:JointPos")) { soap_flag_jointOut1--; continue; } if (soap_flag_reversingResult1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__ReversingResult(soap, "reversingResult", &(a->_ns6__reverseKinResponse::reversingResult), "ns6:ReversingResult")) { soap_flag_reversingResult1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__reverseKinResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__reverseKinResponse, 0, sizeof(_ns6__reverseKinResponse), 0, soap_copy__ns6__reverseKinResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_jointOut1 > 0 || soap_flag_reversingResult1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__reverseKinResponse * SOAP_FMAC4 soap_instantiate__ns6__reverseKinResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__reverseKinResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__reverseKinResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__reverseKinResponse; if (size) *size = sizeof(_ns6__reverseKinResponse); ((_ns6__reverseKinResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__reverseKinResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__reverseKinResponse); for (int i = 0; i < n; i++) ((_ns6__reverseKinResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__reverseKinResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__reverseKinResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__reverseKinResponse %p -> %p\n", q, p)); *(_ns6__reverseKinResponse*)p = *(_ns6__reverseKinResponse*)q; } void _ns6__reverseKin::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__reverseKin::robot); this->_ns6__reverseKin::jointIn = NULL; this->_ns6__reverseKin::target = NULL; this->_ns6__reverseKin::config = NULL; this->_ns6__reverseKin::jointRange = NULL; /* transient soap skipped */ } void _ns6__reverseKin::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns6__reverseKin::jointIn); soap_serialize_PointerTons6__Frame(soap, &this->_ns6__reverseKin::target); soap_serialize_PointerTons6__Config(soap, &this->_ns6__reverseKin::config); soap_serialize_PointerTons2__JointRange(soap, &this->_ns6__reverseKin::jointRange); /* transient soap skipped */ } int _ns6__reverseKin::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__reverseKin); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__reverseKin::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__reverseKin(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__reverseKin(struct soap *soap, const char *tag, int id, const _ns6__reverseKin *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__reverseKin), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__reverseKin::robot), "")) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "jointIn", -1, &(a->_ns6__reverseKin::jointIn), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "target", -1, &(a->_ns6__reverseKin::target), "")) return soap->error; if (soap_out_PointerTons6__Config(soap, "config", -1, &(a->_ns6__reverseKin::config), "")) return soap->error; if (soap_out_PointerTons2__JointRange(soap, "jointRange", -1, &(a->_ns6__reverseKin::jointRange), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__reverseKin::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__reverseKin(soap, this, tag, type); } SOAP_FMAC3 _ns6__reverseKin * SOAP_FMAC4 soap_get__ns6__reverseKin(struct soap *soap, _ns6__reverseKin *p, const char *tag, const char *type) { if ((p = soap_in__ns6__reverseKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__reverseKin::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__reverseKin(soap, tag, this, type); } SOAP_FMAC3 _ns6__reverseKin * SOAP_FMAC4 soap_in__ns6__reverseKin(struct soap *soap, const char *tag, _ns6__reverseKin *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__reverseKin *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__reverseKin, sizeof(_ns6__reverseKin), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__reverseKin) { soap_revert(soap); *soap->id = '\0'; return (_ns6__reverseKin *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_jointIn1 = 1; size_t soap_flag_target1 = 1; size_t soap_flag_config1 = 1; size_t soap_flag_jointRange1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__reverseKin::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_jointIn1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "jointIn", &(a->_ns6__reverseKin::jointIn), "ns1:JointPos")) { soap_flag_jointIn1--; continue; } if (soap_flag_target1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "target", &(a->_ns6__reverseKin::target), "ns6:Frame")) { soap_flag_target1--; continue; } if (soap_flag_config1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Config(soap, "config", &(a->_ns6__reverseKin::config), "ns6:Config")) { soap_flag_config1--; continue; } if (soap_flag_jointRange1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons2__JointRange(soap, "jointRange", &(a->_ns6__reverseKin::jointRange), "ns2:JointRange")) { soap_flag_jointRange1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__reverseKin *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__reverseKin, 0, sizeof(_ns6__reverseKin), 0, soap_copy__ns6__reverseKin); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_jointIn1 > 0 || soap_flag_target1 > 0 || soap_flag_config1 > 0 || soap_flag_jointRange1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__reverseKin * SOAP_FMAC4 soap_instantiate__ns6__reverseKin(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__reverseKin(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__reverseKin, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__reverseKin; if (size) *size = sizeof(_ns6__reverseKin); ((_ns6__reverseKin*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__reverseKin[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__reverseKin); for (int i = 0; i < n; i++) ((_ns6__reverseKin*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__reverseKin*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__reverseKin(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__reverseKin %p -> %p\n", q, p)); *(_ns6__reverseKin*)p = *(_ns6__reverseKin*)q; } void _ns6__forwardKinResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns6__forwardKinResponse::position = NULL; this->_ns6__forwardKinResponse::config = NULL; /* transient soap skipped */ } void _ns6__forwardKinResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__Frame(soap, &this->_ns6__forwardKinResponse::position); soap_serialize_PointerTons6__Config(soap, &this->_ns6__forwardKinResponse::config); /* transient soap skipped */ } int _ns6__forwardKinResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__forwardKinResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__forwardKinResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__forwardKinResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__forwardKinResponse(struct soap *soap, const char *tag, int id, const _ns6__forwardKinResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__forwardKinResponse), type)) return soap->error; if (soap_out_PointerTons6__Frame(soap, "position", -1, &(a->_ns6__forwardKinResponse::position), "")) return soap->error; if (soap_out_PointerTons6__Config(soap, "config", -1, &(a->_ns6__forwardKinResponse::config), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__forwardKinResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__forwardKinResponse(soap, this, tag, type); } SOAP_FMAC3 _ns6__forwardKinResponse * SOAP_FMAC4 soap_get__ns6__forwardKinResponse(struct soap *soap, _ns6__forwardKinResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns6__forwardKinResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__forwardKinResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__forwardKinResponse(soap, tag, this, type); } SOAP_FMAC3 _ns6__forwardKinResponse * SOAP_FMAC4 soap_in__ns6__forwardKinResponse(struct soap *soap, const char *tag, _ns6__forwardKinResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__forwardKinResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__forwardKinResponse, sizeof(_ns6__forwardKinResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__forwardKinResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns6__forwardKinResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_position1 = 1; size_t soap_flag_config1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_position1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "position", &(a->_ns6__forwardKinResponse::position), "ns6:Frame")) { soap_flag_position1--; continue; } if (soap_flag_config1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Config(soap, "config", &(a->_ns6__forwardKinResponse::config), "ns6:Config")) { soap_flag_config1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__forwardKinResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__forwardKinResponse, 0, sizeof(_ns6__forwardKinResponse), 0, soap_copy__ns6__forwardKinResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_position1 > 0 || soap_flag_config1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__forwardKinResponse * SOAP_FMAC4 soap_instantiate__ns6__forwardKinResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__forwardKinResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__forwardKinResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__forwardKinResponse; if (size) *size = sizeof(_ns6__forwardKinResponse); ((_ns6__forwardKinResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__forwardKinResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__forwardKinResponse); for (int i = 0; i < n; i++) ((_ns6__forwardKinResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__forwardKinResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__forwardKinResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__forwardKinResponse %p -> %p\n", q, p)); *(_ns6__forwardKinResponse*)p = *(_ns6__forwardKinResponse*)q; } void _ns6__forwardKin::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns6__forwardKin::robot); this->_ns6__forwardKin::joint = NULL; /* transient soap skipped */ } void _ns6__forwardKin::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns6__forwardKin::joint); /* transient soap skipped */ } int _ns6__forwardKin::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns6__forwardKin); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns6__forwardKin::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns6__forwardKin(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__forwardKin(struct soap *soap, const char *tag, int id, const _ns6__forwardKin *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns6__forwardKin), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns6__forwardKin::robot), "")) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "joint", -1, &(a->_ns6__forwardKin::joint), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns6__forwardKin::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns6__forwardKin(soap, this, tag, type); } SOAP_FMAC3 _ns6__forwardKin * SOAP_FMAC4 soap_get__ns6__forwardKin(struct soap *soap, _ns6__forwardKin *p, const char *tag, const char *type) { if ((p = soap_in__ns6__forwardKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns6__forwardKin::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns6__forwardKin(soap, tag, this, type); } SOAP_FMAC3 _ns6__forwardKin * SOAP_FMAC4 soap_in__ns6__forwardKin(struct soap *soap, const char *tag, _ns6__forwardKin *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns6__forwardKin *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns6__forwardKin, sizeof(_ns6__forwardKin), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns6__forwardKin) { soap_revert(soap); *soap->id = '\0'; return (_ns6__forwardKin *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_joint1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns6__forwardKin::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_joint1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "joint", &(a->_ns6__forwardKin::joint), "ns1:JointPos")) { soap_flag_joint1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns6__forwardKin *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns6__forwardKin, 0, sizeof(_ns6__forwardKin), 0, soap_copy__ns6__forwardKin); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_joint1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns6__forwardKin * SOAP_FMAC4 soap_instantiate__ns6__forwardKin(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns6__forwardKin(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns6__forwardKin, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns6__forwardKin; if (size) *size = sizeof(_ns6__forwardKin); ((_ns6__forwardKin*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns6__forwardKin[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns6__forwardKin); for (int i = 0; i < n; i++) ((_ns6__forwardKin*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns6__forwardKin*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns6__forwardKin(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns6__forwardKin %p -> %p\n", q, p)); *(_ns6__forwardKin*)p = *(_ns6__forwardKin*)q; } void ns6__AllRobotsPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons6__RobotPos(soap, &this->ns6__AllRobotsPos::RobotsPos); /* transient soap skipped */ } void ns6__AllRobotsPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons6__RobotPos(soap, &this->ns6__AllRobotsPos::RobotsPos); /* transient soap skipped */ } int ns6__AllRobotsPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__AllRobotsPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__AllRobotsPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__AllRobotsPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__AllRobotsPos(struct soap *soap, const char *tag, int id, const ns6__AllRobotsPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__AllRobotsPos), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons6__RobotPos(soap, "RobotsPos", -1, &(a->ns6__AllRobotsPos::RobotsPos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__AllRobotsPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__AllRobotsPos(soap, this, tag, type); } SOAP_FMAC3 ns6__AllRobotsPos * SOAP_FMAC4 soap_get_ns6__AllRobotsPos(struct soap *soap, ns6__AllRobotsPos *p, const char *tag, const char *type) { if ((p = soap_in_ns6__AllRobotsPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__AllRobotsPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__AllRobotsPos(soap, tag, this, type); } SOAP_FMAC3 ns6__AllRobotsPos * SOAP_FMAC4 soap_in_ns6__AllRobotsPos(struct soap *soap, const char *tag, ns6__AllRobotsPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__AllRobotsPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__AllRobotsPos, sizeof(ns6__AllRobotsPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__AllRobotsPos) { soap_revert(soap); *soap->id = '\0'; return (ns6__AllRobotsPos *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons6__RobotPos(soap, "RobotsPos", &(a->ns6__AllRobotsPos::RobotsPos), "ns6:RobotPos")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__AllRobotsPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__AllRobotsPos, 0, sizeof(ns6__AllRobotsPos), 0, soap_copy_ns6__AllRobotsPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns6__AllRobotsPos * SOAP_FMAC4 soap_instantiate_ns6__AllRobotsPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__AllRobotsPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__AllRobotsPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__AllRobotsPos; if (size) *size = sizeof(ns6__AllRobotsPos); ((ns6__AllRobotsPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__AllRobotsPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__AllRobotsPos); for (int i = 0; i < n; i++) ((ns6__AllRobotsPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__AllRobotsPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__AllRobotsPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__AllRobotsPos %p -> %p\n", q, p)); *(ns6__AllRobotsPos*)p = *(ns6__AllRobotsPos*)q; } void ns6__RobotPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_bool(soap, &this->ns6__RobotPos::settled); this->ns6__RobotPos::joint = NULL; this->ns6__RobotPos::position = NULL; this->ns6__RobotPos::config = NULL; /* transient soap skipped */ } void ns6__RobotPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->ns6__RobotPos::joint); soap_serialize_PointerTons6__Frame(soap, &this->ns6__RobotPos::position); soap_serialize_PointerTons6__Config(soap, &this->ns6__RobotPos::config); /* transient soap skipped */ } int ns6__RobotPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__RobotPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__RobotPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__RobotPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__RobotPos(struct soap *soap, const char *tag, int id, const ns6__RobotPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__RobotPos), type)) return soap->error; if (soap_out_bool(soap, "settled", -1, &(a->ns6__RobotPos::settled), "")) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "joint", -1, &(a->ns6__RobotPos::joint), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "position", -1, &(a->ns6__RobotPos::position), "")) return soap->error; if (soap_out_PointerTons6__Config(soap, "config", -1, &(a->ns6__RobotPos::config), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__RobotPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__RobotPos(soap, this, tag, type); } SOAP_FMAC3 ns6__RobotPos * SOAP_FMAC4 soap_get_ns6__RobotPos(struct soap *soap, ns6__RobotPos *p, const char *tag, const char *type) { if ((p = soap_in_ns6__RobotPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__RobotPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__RobotPos(soap, tag, this, type); } SOAP_FMAC3 ns6__RobotPos * SOAP_FMAC4 soap_in_ns6__RobotPos(struct soap *soap, const char *tag, ns6__RobotPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__RobotPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__RobotPos, sizeof(ns6__RobotPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__RobotPos) { soap_revert(soap); *soap->id = '\0'; return (ns6__RobotPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_settled1 = 1; size_t soap_flag_joint1 = 1; size_t soap_flag_position1 = 1; size_t soap_flag_config1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_settled1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_bool(soap, "settled", &(a->ns6__RobotPos::settled), "xsd:boolean")) { soap_flag_settled1--; continue; } if (soap_flag_joint1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "joint", &(a->ns6__RobotPos::joint), "ns1:JointPos")) { soap_flag_joint1--; continue; } if (soap_flag_position1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "position", &(a->ns6__RobotPos::position), "ns6:Frame")) { soap_flag_position1--; continue; } if (soap_flag_config1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Config(soap, "config", &(a->ns6__RobotPos::config), "ns6:Config")) { soap_flag_config1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__RobotPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__RobotPos, 0, sizeof(ns6__RobotPos), 0, soap_copy_ns6__RobotPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_settled1 > 0 || soap_flag_joint1 > 0 || soap_flag_position1 > 0 || soap_flag_config1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__RobotPos * SOAP_FMAC4 soap_instantiate_ns6__RobotPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__RobotPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__RobotPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__RobotPos; if (size) *size = sizeof(ns6__RobotPos); ((ns6__RobotPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__RobotPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__RobotPos); for (int i = 0; i < n; i++) ((ns6__RobotPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__RobotPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__RobotPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__RobotPos %p -> %p\n", q, p)); *(ns6__RobotPos*)p = *(ns6__RobotPos*)q; } void ns6__MotionDesc::soap_default(struct soap *soap) { this->soap = soap; this->ns6__MotionDesc::tool = NULL; this->ns6__MotionDesc::frame = NULL; soap_default_ns6__MoveType(soap, &this->ns6__MotionDesc::absRel); this->ns6__MotionDesc::config = NULL; soap_default_ns6__BlendType(soap, &this->ns6__MotionDesc::blendType); soap_default_double(soap, &this->ns6__MotionDesc::distBlendPrev); soap_default_double(soap, &this->ns6__MotionDesc::distBlendNext); soap_default_double(soap, &this->ns6__MotionDesc::vel); soap_default_double(soap, &this->ns6__MotionDesc::acc); soap_default_double(soap, &this->ns6__MotionDesc::dec); soap_default_double(soap, &this->ns6__MotionDesc::transVel); soap_default_double(soap, &this->ns6__MotionDesc::rotVel); soap_default_double(soap, &this->ns6__MotionDesc::freq); /* transient soap skipped */ } void ns6__MotionDesc::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons6__Frame(soap, &this->ns6__MotionDesc::tool); soap_serialize_PointerTons6__Frame(soap, &this->ns6__MotionDesc::frame); soap_serialize_PointerTons6__Config(soap, &this->ns6__MotionDesc::config); /* transient soap skipped */ } int ns6__MotionDesc::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__MotionDesc); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__MotionDesc::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__MotionDesc(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__MotionDesc(struct soap *soap, const char *tag, int id, const ns6__MotionDesc *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__MotionDesc), type)) return soap->error; if (soap_out_PointerTons6__Frame(soap, "tool", -1, &(a->ns6__MotionDesc::tool), "")) return soap->error; if (soap_out_PointerTons6__Frame(soap, "frame", -1, &(a->ns6__MotionDesc::frame), "")) return soap->error; if (soap_out_ns6__MoveType(soap, "absRel", -1, &(a->ns6__MotionDesc::absRel), "")) return soap->error; if (soap_out_PointerTons6__Config(soap, "config", -1, &(a->ns6__MotionDesc::config), "")) return soap->error; if (soap_out_ns6__BlendType(soap, "blendType", -1, &(a->ns6__MotionDesc::blendType), "")) return soap->error; if (soap_out_double(soap, "distBlendPrev", -1, &(a->ns6__MotionDesc::distBlendPrev), "")) return soap->error; if (soap_out_double(soap, "distBlendNext", -1, &(a->ns6__MotionDesc::distBlendNext), "")) return soap->error; if (soap_out_double(soap, "vel", -1, &(a->ns6__MotionDesc::vel), "")) return soap->error; if (soap_out_double(soap, "acc", -1, &(a->ns6__MotionDesc::acc), "")) return soap->error; if (soap_out_double(soap, "dec", -1, &(a->ns6__MotionDesc::dec), "")) return soap->error; if (soap_out_double(soap, "transVel", -1, &(a->ns6__MotionDesc::transVel), "")) return soap->error; if (soap_out_double(soap, "rotVel", -1, &(a->ns6__MotionDesc::rotVel), "")) return soap->error; if (soap_out_double(soap, "freq", -1, &(a->ns6__MotionDesc::freq), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__MotionDesc::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__MotionDesc(soap, this, tag, type); } SOAP_FMAC3 ns6__MotionDesc * SOAP_FMAC4 soap_get_ns6__MotionDesc(struct soap *soap, ns6__MotionDesc *p, const char *tag, const char *type) { if ((p = soap_in_ns6__MotionDesc(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__MotionDesc::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__MotionDesc(soap, tag, this, type); } SOAP_FMAC3 ns6__MotionDesc * SOAP_FMAC4 soap_in_ns6__MotionDesc(struct soap *soap, const char *tag, ns6__MotionDesc *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__MotionDesc *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__MotionDesc, sizeof(ns6__MotionDesc), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__MotionDesc) { soap_revert(soap); *soap->id = '\0'; return (ns6__MotionDesc *)a->soap_in(soap, tag, type); } } size_t soap_flag_tool1 = 1; size_t soap_flag_frame1 = 1; size_t soap_flag_absRel1 = 1; size_t soap_flag_config1 = 1; size_t soap_flag_blendType1 = 1; size_t soap_flag_distBlendPrev1 = 1; size_t soap_flag_distBlendNext1 = 1; size_t soap_flag_vel1 = 1; size_t soap_flag_acc1 = 1; size_t soap_flag_dec1 = 1; size_t soap_flag_transVel1 = 1; size_t soap_flag_rotVel1 = 1; size_t soap_flag_freq1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_tool1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "tool", &(a->ns6__MotionDesc::tool), "ns6:Frame")) { soap_flag_tool1--; continue; } if (soap_flag_frame1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Frame(soap, "frame", &(a->ns6__MotionDesc::frame), "ns6:Frame")) { soap_flag_frame1--; continue; } if (soap_flag_absRel1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__MoveType(soap, "absRel", &(a->ns6__MotionDesc::absRel), "ns6:MoveType")) { soap_flag_absRel1--; continue; } if (soap_flag_config1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons6__Config(soap, "config", &(a->ns6__MotionDesc::config), "ns6:Config")) { soap_flag_config1--; continue; } if (soap_flag_blendType1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__BlendType(soap, "blendType", &(a->ns6__MotionDesc::blendType), "ns6:BlendType")) { soap_flag_blendType1--; continue; } if (soap_flag_distBlendPrev1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "distBlendPrev", &(a->ns6__MotionDesc::distBlendPrev), "xsd:double")) { soap_flag_distBlendPrev1--; continue; } if (soap_flag_distBlendNext1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "distBlendNext", &(a->ns6__MotionDesc::distBlendNext), "xsd:double")) { soap_flag_distBlendNext1--; continue; } if (soap_flag_vel1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "vel", &(a->ns6__MotionDesc::vel), "xsd:double")) { soap_flag_vel1--; continue; } if (soap_flag_acc1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "acc", &(a->ns6__MotionDesc::acc), "xsd:double")) { soap_flag_acc1--; continue; } if (soap_flag_dec1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "dec", &(a->ns6__MotionDesc::dec), "xsd:double")) { soap_flag_dec1--; continue; } if (soap_flag_transVel1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "transVel", &(a->ns6__MotionDesc::transVel), "xsd:double")) { soap_flag_transVel1--; continue; } if (soap_flag_rotVel1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "rotVel", &(a->ns6__MotionDesc::rotVel), "xsd:double")) { soap_flag_rotVel1--; continue; } if (soap_flag_freq1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "freq", &(a->ns6__MotionDesc::freq), "xsd:double")) { soap_flag_freq1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__MotionDesc *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__MotionDesc, 0, sizeof(ns6__MotionDesc), 0, soap_copy_ns6__MotionDesc); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_tool1 > 0 || soap_flag_frame1 > 0 || soap_flag_absRel1 > 0 || soap_flag_config1 > 0 || soap_flag_blendType1 > 0 || soap_flag_distBlendPrev1 > 0 || soap_flag_distBlendNext1 > 0 || soap_flag_vel1 > 0 || soap_flag_acc1 > 0 || soap_flag_dec1 > 0 || soap_flag_transVel1 > 0 || soap_flag_rotVel1 > 0 || soap_flag_freq1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__MotionDesc * SOAP_FMAC4 soap_instantiate_ns6__MotionDesc(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__MotionDesc(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__MotionDesc, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__MotionDesc; if (size) *size = sizeof(ns6__MotionDesc); ((ns6__MotionDesc*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__MotionDesc[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__MotionDesc); for (int i = 0; i < n; i++) ((ns6__MotionDesc*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__MotionDesc*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__MotionDesc(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__MotionDesc %p -> %p\n", q, p)); *(ns6__MotionDesc*)p = *(ns6__MotionDesc*)q; } void ns6__Config::soap_default(struct soap *soap) { this->soap = soap; this->ns6__Config::__union_Config = 0; /* transient soap skipped */ } void ns6__Config::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize__ns6__union_Config(soap, this->ns6__Config::__union_Config, &this->ns6__Config::union_Config); /* transient soap skipped */ } int ns6__Config::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__Config); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__Config::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__Config(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__Config(struct soap *soap, const char *tag, int id, const ns6__Config *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__Config), type)) return soap->error; if (soap_out__ns6__union_Config(soap, a->ns6__Config::__union_Config, &a->ns6__Config::union_Config)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__Config::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__Config(soap, this, tag, type); } SOAP_FMAC3 ns6__Config * SOAP_FMAC4 soap_get_ns6__Config(struct soap *soap, ns6__Config *p, const char *tag, const char *type) { if ((p = soap_in_ns6__Config(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__Config::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__Config(soap, tag, this, type); } SOAP_FMAC3 ns6__Config * SOAP_FMAC4 soap_in_ns6__Config(struct soap *soap, const char *tag, ns6__Config *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__Config *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__Config, sizeof(ns6__Config), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__Config) { soap_revert(soap); *soap->id = '\0'; return (ns6__Config *)a->soap_in(soap, tag, type); } } size_t soap_flag_union_Config1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_union_Config1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in__ns6__union_Config(soap, &a->ns6__Config::__union_Config, &a->ns6__Config::union_Config)) { soap_flag_union_Config1 = 0; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__Config *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__Config, 0, sizeof(ns6__Config), 0, soap_copy_ns6__Config); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_union_Config1)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__Config * SOAP_FMAC4 soap_instantiate_ns6__Config(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__Config(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__Config, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__Config; if (size) *size = sizeof(ns6__Config); ((ns6__Config*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__Config[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__Config); for (int i = 0; i < n; i++) ((ns6__Config*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__Config*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__Config(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__Config %p -> %p\n", q, p)); *(ns6__Config*)p = *(ns6__Config*)q; } void ns6__VrbxConfig::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__AboveBelowConfig(soap, &this->ns6__VrbxConfig::jnt1); soap_default_ns6__PositiveNegativeConfig(soap, &this->ns6__VrbxConfig::jnt3); soap_default_ns6__PositiveNegativeConfig(soap, &this->ns6__VrbxConfig::jnt5); /* transient soap skipped */ } void ns6__VrbxConfig::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int ns6__VrbxConfig::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__VrbxConfig); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__VrbxConfig::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__VrbxConfig(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__VrbxConfig(struct soap *soap, const char *tag, int id, const ns6__VrbxConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__VrbxConfig), type)) return soap->error; if (soap_out_ns6__AboveBelowConfig(soap, "jnt1", -1, &(a->ns6__VrbxConfig::jnt1), "")) return soap->error; if (soap_out_ns6__PositiveNegativeConfig(soap, "jnt3", -1, &(a->ns6__VrbxConfig::jnt3), "")) return soap->error; if (soap_out_ns6__PositiveNegativeConfig(soap, "jnt5", -1, &(a->ns6__VrbxConfig::jnt5), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__VrbxConfig::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__VrbxConfig(soap, this, tag, type); } SOAP_FMAC3 ns6__VrbxConfig * SOAP_FMAC4 soap_get_ns6__VrbxConfig(struct soap *soap, ns6__VrbxConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__VrbxConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__VrbxConfig::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__VrbxConfig(soap, tag, this, type); } SOAP_FMAC3 ns6__VrbxConfig * SOAP_FMAC4 soap_in_ns6__VrbxConfig(struct soap *soap, const char *tag, ns6__VrbxConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__VrbxConfig *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__VrbxConfig, sizeof(ns6__VrbxConfig), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__VrbxConfig) { soap_revert(soap); *soap->id = '\0'; return (ns6__VrbxConfig *)a->soap_in(soap, tag, type); } } size_t soap_flag_jnt11 = 1; size_t soap_flag_jnt31 = 1; size_t soap_flag_jnt51 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_jnt11 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__AboveBelowConfig(soap, "jnt1", &(a->ns6__VrbxConfig::jnt1), "ns6:AboveBelowConfig")) { soap_flag_jnt11--; continue; } if (soap_flag_jnt31 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__PositiveNegativeConfig(soap, "jnt3", &(a->ns6__VrbxConfig::jnt3), "ns6:PositiveNegativeConfig")) { soap_flag_jnt31--; continue; } if (soap_flag_jnt51 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__PositiveNegativeConfig(soap, "jnt5", &(a->ns6__VrbxConfig::jnt5), "ns6:PositiveNegativeConfig")) { soap_flag_jnt51--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__VrbxConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__VrbxConfig, 0, sizeof(ns6__VrbxConfig), 0, soap_copy_ns6__VrbxConfig); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_jnt11 > 0 || soap_flag_jnt31 > 0 || soap_flag_jnt51 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__VrbxConfig * SOAP_FMAC4 soap_instantiate_ns6__VrbxConfig(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__VrbxConfig(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__VrbxConfig, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__VrbxConfig; if (size) *size = sizeof(ns6__VrbxConfig); ((ns6__VrbxConfig*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__VrbxConfig[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__VrbxConfig); for (int i = 0; i < n; i++) ((ns6__VrbxConfig*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__VrbxConfig*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__VrbxConfig(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__VrbxConfig %p -> %p\n", q, p)); *(ns6__VrbxConfig*)p = *(ns6__VrbxConfig*)q; } void ns6__ScaraConfig::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__ShoulderConfig(soap, &this->ns6__ScaraConfig::shoulder); /* transient soap skipped */ } void ns6__ScaraConfig::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int ns6__ScaraConfig::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__ScaraConfig); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__ScaraConfig::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__ScaraConfig(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__ScaraConfig(struct soap *soap, const char *tag, int id, const ns6__ScaraConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__ScaraConfig), type)) return soap->error; if (soap_out_ns6__ShoulderConfig(soap, "shoulder", -1, &(a->ns6__ScaraConfig::shoulder), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__ScaraConfig::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__ScaraConfig(soap, this, tag, type); } SOAP_FMAC3 ns6__ScaraConfig * SOAP_FMAC4 soap_get_ns6__ScaraConfig(struct soap *soap, ns6__ScaraConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__ScaraConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__ScaraConfig::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__ScaraConfig(soap, tag, this, type); } SOAP_FMAC3 ns6__ScaraConfig * SOAP_FMAC4 soap_in_ns6__ScaraConfig(struct soap *soap, const char *tag, ns6__ScaraConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__ScaraConfig *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__ScaraConfig, sizeof(ns6__ScaraConfig), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__ScaraConfig) { soap_revert(soap); *soap->id = '\0'; return (ns6__ScaraConfig *)a->soap_in(soap, tag, type); } } size_t soap_flag_shoulder1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_shoulder1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__ShoulderConfig(soap, "shoulder", &(a->ns6__ScaraConfig::shoulder), "ns6:ShoulderConfig")) { soap_flag_shoulder1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__ScaraConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__ScaraConfig, 0, sizeof(ns6__ScaraConfig), 0, soap_copy_ns6__ScaraConfig); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_shoulder1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__ScaraConfig * SOAP_FMAC4 soap_instantiate_ns6__ScaraConfig(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__ScaraConfig(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__ScaraConfig, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__ScaraConfig; if (size) *size = sizeof(ns6__ScaraConfig); ((ns6__ScaraConfig*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__ScaraConfig[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__ScaraConfig); for (int i = 0; i < n; i++) ((ns6__ScaraConfig*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__ScaraConfig*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__ScaraConfig(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__ScaraConfig %p -> %p\n", q, p)); *(ns6__ScaraConfig*)p = *(ns6__ScaraConfig*)q; } void ns6__AnthroConfig::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns6__ShoulderConfig(soap, &this->ns6__AnthroConfig::shoulder); soap_default_ns6__PositiveNegativeConfig(soap, &this->ns6__AnthroConfig::elbow); soap_default_ns6__PositiveNegativeConfig(soap, &this->ns6__AnthroConfig::wrist); /* transient soap skipped */ } void ns6__AnthroConfig::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int ns6__AnthroConfig::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__AnthroConfig); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__AnthroConfig::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__AnthroConfig(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__AnthroConfig(struct soap *soap, const char *tag, int id, const ns6__AnthroConfig *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__AnthroConfig), type)) return soap->error; if (soap_out_ns6__ShoulderConfig(soap, "shoulder", -1, &(a->ns6__AnthroConfig::shoulder), "")) return soap->error; if (soap_out_ns6__PositiveNegativeConfig(soap, "elbow", -1, &(a->ns6__AnthroConfig::elbow), "")) return soap->error; if (soap_out_ns6__PositiveNegativeConfig(soap, "wrist", -1, &(a->ns6__AnthroConfig::wrist), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__AnthroConfig::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__AnthroConfig(soap, this, tag, type); } SOAP_FMAC3 ns6__AnthroConfig * SOAP_FMAC4 soap_get_ns6__AnthroConfig(struct soap *soap, ns6__AnthroConfig *p, const char *tag, const char *type) { if ((p = soap_in_ns6__AnthroConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__AnthroConfig::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__AnthroConfig(soap, tag, this, type); } SOAP_FMAC3 ns6__AnthroConfig * SOAP_FMAC4 soap_in_ns6__AnthroConfig(struct soap *soap, const char *tag, ns6__AnthroConfig *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__AnthroConfig *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__AnthroConfig, sizeof(ns6__AnthroConfig), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__AnthroConfig) { soap_revert(soap); *soap->id = '\0'; return (ns6__AnthroConfig *)a->soap_in(soap, tag, type); } } size_t soap_flag_shoulder1 = 1; size_t soap_flag_elbow1 = 1; size_t soap_flag_wrist1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_shoulder1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__ShoulderConfig(soap, "shoulder", &(a->ns6__AnthroConfig::shoulder), "ns6:ShoulderConfig")) { soap_flag_shoulder1--; continue; } if (soap_flag_elbow1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__PositiveNegativeConfig(soap, "elbow", &(a->ns6__AnthroConfig::elbow), "ns6:PositiveNegativeConfig")) { soap_flag_elbow1--; continue; } if (soap_flag_wrist1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns6__PositiveNegativeConfig(soap, "wrist", &(a->ns6__AnthroConfig::wrist), "ns6:PositiveNegativeConfig")) { soap_flag_wrist1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__AnthroConfig *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__AnthroConfig, 0, sizeof(ns6__AnthroConfig), 0, soap_copy_ns6__AnthroConfig); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_shoulder1 > 0 || soap_flag_elbow1 > 0 || soap_flag_wrist1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__AnthroConfig * SOAP_FMAC4 soap_instantiate_ns6__AnthroConfig(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__AnthroConfig(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__AnthroConfig, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__AnthroConfig; if (size) *size = sizeof(ns6__AnthroConfig); ((ns6__AnthroConfig*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__AnthroConfig[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__AnthroConfig); for (int i = 0; i < n; i++) ((ns6__AnthroConfig*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__AnthroConfig*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__AnthroConfig(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__AnthroConfig %p -> %p\n", q, p)); *(ns6__AnthroConfig*)p = *(ns6__AnthroConfig*)q; } void ns6__Frame::soap_default(struct soap *soap) { this->soap = soap; soap_default_double(soap, &this->ns6__Frame::nx); soap_default_double(soap, &this->ns6__Frame::ny); soap_default_double(soap, &this->ns6__Frame::nz); soap_default_double(soap, &this->ns6__Frame::ox); soap_default_double(soap, &this->ns6__Frame::oy); soap_default_double(soap, &this->ns6__Frame::oz); soap_default_double(soap, &this->ns6__Frame::ax); soap_default_double(soap, &this->ns6__Frame::ay); soap_default_double(soap, &this->ns6__Frame::az); soap_default_double(soap, &this->ns6__Frame::px); soap_default_double(soap, &this->ns6__Frame::py); soap_default_double(soap, &this->ns6__Frame::pz); /* transient soap skipped */ } void ns6__Frame::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int ns6__Frame::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__Frame); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__Frame::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__Frame(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__Frame(struct soap *soap, const char *tag, int id, const ns6__Frame *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__Frame), type)) return soap->error; if (soap_out_double(soap, "nx", -1, &(a->ns6__Frame::nx), "")) return soap->error; if (soap_out_double(soap, "ny", -1, &(a->ns6__Frame::ny), "")) return soap->error; if (soap_out_double(soap, "nz", -1, &(a->ns6__Frame::nz), "")) return soap->error; if (soap_out_double(soap, "ox", -1, &(a->ns6__Frame::ox), "")) return soap->error; if (soap_out_double(soap, "oy", -1, &(a->ns6__Frame::oy), "")) return soap->error; if (soap_out_double(soap, "oz", -1, &(a->ns6__Frame::oz), "")) return soap->error; if (soap_out_double(soap, "ax", -1, &(a->ns6__Frame::ax), "")) return soap->error; if (soap_out_double(soap, "ay", -1, &(a->ns6__Frame::ay), "")) return soap->error; if (soap_out_double(soap, "az", -1, &(a->ns6__Frame::az), "")) return soap->error; if (soap_out_double(soap, "px", -1, &(a->ns6__Frame::px), "")) return soap->error; if (soap_out_double(soap, "py", -1, &(a->ns6__Frame::py), "")) return soap->error; if (soap_out_double(soap, "pz", -1, &(a->ns6__Frame::pz), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__Frame::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__Frame(soap, this, tag, type); } SOAP_FMAC3 ns6__Frame * SOAP_FMAC4 soap_get_ns6__Frame(struct soap *soap, ns6__Frame *p, const char *tag, const char *type) { if ((p = soap_in_ns6__Frame(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__Frame::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__Frame(soap, tag, this, type); } SOAP_FMAC3 ns6__Frame * SOAP_FMAC4 soap_in_ns6__Frame(struct soap *soap, const char *tag, ns6__Frame *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__Frame *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__Frame, sizeof(ns6__Frame), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__Frame) { soap_revert(soap); *soap->id = '\0'; return (ns6__Frame *)a->soap_in(soap, tag, type); } } size_t soap_flag_nx1 = 1; size_t soap_flag_ny1 = 1; size_t soap_flag_nz1 = 1; size_t soap_flag_ox1 = 1; size_t soap_flag_oy1 = 1; size_t soap_flag_oz1 = 1; size_t soap_flag_ax1 = 1; size_t soap_flag_ay1 = 1; size_t soap_flag_az1 = 1; size_t soap_flag_px1 = 1; size_t soap_flag_py1 = 1; size_t soap_flag_pz1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_nx1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "nx", &(a->ns6__Frame::nx), "xsd:double")) { soap_flag_nx1--; continue; } if (soap_flag_ny1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "ny", &(a->ns6__Frame::ny), "xsd:double")) { soap_flag_ny1--; continue; } if (soap_flag_nz1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "nz", &(a->ns6__Frame::nz), "xsd:double")) { soap_flag_nz1--; continue; } if (soap_flag_ox1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "ox", &(a->ns6__Frame::ox), "xsd:double")) { soap_flag_ox1--; continue; } if (soap_flag_oy1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "oy", &(a->ns6__Frame::oy), "xsd:double")) { soap_flag_oy1--; continue; } if (soap_flag_oz1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "oz", &(a->ns6__Frame::oz), "xsd:double")) { soap_flag_oz1--; continue; } if (soap_flag_ax1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "ax", &(a->ns6__Frame::ax), "xsd:double")) { soap_flag_ax1--; continue; } if (soap_flag_ay1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "ay", &(a->ns6__Frame::ay), "xsd:double")) { soap_flag_ay1--; continue; } if (soap_flag_az1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "az", &(a->ns6__Frame::az), "xsd:double")) { soap_flag_az1--; continue; } if (soap_flag_px1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "px", &(a->ns6__Frame::px), "xsd:double")) { soap_flag_px1--; continue; } if (soap_flag_py1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "py", &(a->ns6__Frame::py), "xsd:double")) { soap_flag_py1--; continue; } if (soap_flag_pz1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "pz", &(a->ns6__Frame::pz), "xsd:double")) { soap_flag_pz1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__Frame *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__Frame, 0, sizeof(ns6__Frame), 0, soap_copy_ns6__Frame); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_nx1 > 0 || soap_flag_ny1 > 0 || soap_flag_nz1 > 0 || soap_flag_ox1 > 0 || soap_flag_oy1 > 0 || soap_flag_oz1 > 0 || soap_flag_ax1 > 0 || soap_flag_ay1 > 0 || soap_flag_az1 > 0 || soap_flag_px1 > 0 || soap_flag_py1 > 0 || soap_flag_pz1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__Frame * SOAP_FMAC4 soap_instantiate_ns6__Frame(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__Frame(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__Frame, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__Frame; if (size) *size = sizeof(ns6__Frame); ((ns6__Frame*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__Frame[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__Frame); for (int i = 0; i < n; i++) ((ns6__Frame*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__Frame*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__Frame(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__Frame %p -> %p\n", q, p)); *(ns6__Frame*)p = *(ns6__Frame*)q; } void ns6__Records::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfstd__string(soap, &this->ns6__Records::record); /* transient soap skipped */ } void ns6__Records::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfstd__string(soap, &this->ns6__Records::record); /* transient soap skipped */ } int ns6__Records::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__Records); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__Records::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__Records(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__Records(struct soap *soap, const char *tag, int id, const ns6__Records *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__Records), type)) return soap->error; if (soap_out_std__vectorTemplateOfstd__string(soap, "record", -1, &(a->ns6__Records::record), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__Records::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__Records(soap, this, tag, type); } SOAP_FMAC3 ns6__Records * SOAP_FMAC4 soap_get_ns6__Records(struct soap *soap, ns6__Records *p, const char *tag, const char *type) { if ((p = soap_in_ns6__Records(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__Records::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__Records(soap, tag, this, type); } SOAP_FMAC3 ns6__Records * SOAP_FMAC4 soap_in_ns6__Records(struct soap *soap, const char *tag, ns6__Records *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__Records *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__Records, sizeof(ns6__Records), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__Records) { soap_revert(soap); *soap->id = '\0'; return (ns6__Records *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfstd__string(soap, "record", &(a->ns6__Records::record), "xsd:string")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__Records *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__Records, 0, sizeof(ns6__Records), 0, soap_copy_ns6__Records); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns6__Records * SOAP_FMAC4 soap_instantiate_ns6__Records(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__Records(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__Records, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__Records; if (size) *size = sizeof(ns6__Records); ((ns6__Records*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__Records[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__Records); for (int i = 0; i < n; i++) ((ns6__Records*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__Records*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__Records(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__Records %p -> %p\n", q, p)); *(ns6__Records*)p = *(ns6__Records*)q; } void ns6__VALApplications::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns6__VALApplications::application); /* transient soap skipped */ } void ns6__VALApplications::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns6__VALApplications::application); /* transient soap skipped */ } int ns6__VALApplications::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__VALApplications); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__VALApplications::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__VALApplications(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__VALApplications(struct soap *soap, const char *tag, int id, const ns6__VALApplications *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__VALApplications), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", -1, &(a->ns6__VALApplications::application), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__VALApplications::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__VALApplications(soap, this, tag, type); } SOAP_FMAC3 ns6__VALApplications * SOAP_FMAC4 soap_get_ns6__VALApplications(struct soap *soap, ns6__VALApplications *p, const char *tag, const char *type) { if ((p = soap_in_ns6__VALApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__VALApplications::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__VALApplications(soap, tag, this, type); } SOAP_FMAC3 ns6__VALApplications * SOAP_FMAC4 soap_in_ns6__VALApplications(struct soap *soap, const char *tag, ns6__VALApplications *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__VALApplications *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__VALApplications, sizeof(ns6__VALApplications), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__VALApplications) { soap_revert(soap); *soap->id = '\0'; return (ns6__VALApplications *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", &(a->ns6__VALApplications::application), "ns2:VALApplication")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__VALApplications *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__VALApplications, 0, sizeof(ns6__VALApplications), 0, soap_copy_ns6__VALApplications); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns6__VALApplications * SOAP_FMAC4 soap_instantiate_ns6__VALApplications(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__VALApplications(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__VALApplications, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__VALApplications; if (size) *size = sizeof(ns6__VALApplications); ((ns6__VALApplications*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__VALApplications[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__VALApplications); for (int i = 0; i < n; i++) ((ns6__VALApplications*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__VALApplications*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__VALApplications(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__VALApplications %p -> %p\n", q, p)); *(ns6__VALApplications*)p = *(ns6__VALApplications*)q; } void ns6__Robots::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns6__Robots::Robots); /* transient soap skipped */ } void ns6__Robots::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns6__Robots::Robots); /* transient soap skipped */ } int ns6__Robots::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__Robots); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__Robots::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__Robots(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__Robots(struct soap *soap, const char *tag, int id, const ns6__Robots *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__Robots), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", -1, &(a->ns6__Robots::Robots), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__Robots::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__Robots(soap, this, tag, type); } SOAP_FMAC3 ns6__Robots * SOAP_FMAC4 soap_get_ns6__Robots(struct soap *soap, ns6__Robots *p, const char *tag, const char *type) { if ((p = soap_in_ns6__Robots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__Robots::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__Robots(soap, tag, this, type); } SOAP_FMAC3 ns6__Robots * SOAP_FMAC4 soap_in_ns6__Robots(struct soap *soap, const char *tag, ns6__Robots *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__Robots *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__Robots, sizeof(ns6__Robots), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__Robots) { soap_revert(soap); *soap->id = '\0'; return (ns6__Robots *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", &(a->ns6__Robots::Robots), "ns1:Robot")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__Robots *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__Robots, 0, sizeof(ns6__Robots), 0, soap_copy_ns6__Robots); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns6__Robots * SOAP_FMAC4 soap_instantiate_ns6__Robots(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__Robots(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__Robots, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__Robots; if (size) *size = sizeof(ns6__Robots); ((ns6__Robots*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__Robots[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__Robots); for (int i = 0; i < n; i++) ((ns6__Robots*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__Robots*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__Robots(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__Robots %p -> %p\n", q, p)); *(ns6__Robots*)p = *(ns6__Robots*)q; } void ns6__Versions::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns6__Versions::Versions); /* transient soap skipped */ } void ns6__Versions::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns6__Versions::Versions); /* transient soap skipped */ } int ns6__Versions::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__Versions); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__Versions::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__Versions(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__Versions(struct soap *soap, const char *tag, int id, const ns6__Versions *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__Versions), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", -1, &(a->ns6__Versions::Versions), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__Versions::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__Versions(soap, this, tag, type); } SOAP_FMAC3 ns6__Versions * SOAP_FMAC4 soap_get_ns6__Versions(struct soap *soap, ns6__Versions *p, const char *tag, const char *type) { if ((p = soap_in_ns6__Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__Versions::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__Versions(soap, tag, this, type); } SOAP_FMAC3 ns6__Versions * SOAP_FMAC4 soap_in_ns6__Versions(struct soap *soap, const char *tag, ns6__Versions *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__Versions *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__Versions, sizeof(ns6__Versions), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__Versions) { soap_revert(soap); *soap->id = '\0'; return (ns6__Versions *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", &(a->ns6__Versions::Versions), "ns1:Version")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__Versions *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__Versions, 0, sizeof(ns6__Versions), 0, soap_copy_ns6__Versions); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns6__Versions * SOAP_FMAC4 soap_instantiate_ns6__Versions(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__Versions(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__Versions, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__Versions; if (size) *size = sizeof(ns6__Versions); ((ns6__Versions*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__Versions[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__Versions); for (int i = 0; i < n; i++) ((ns6__Versions*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__Versions*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__Versions(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__Versions %p -> %p\n", q, p)); *(ns6__Versions*)p = *(ns6__Versions*)q; } void ns6__JointPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfdouble(soap, &this->ns6__JointPos::item); /* transient soap skipped */ } void ns6__JointPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfdouble(soap, &this->ns6__JointPos::item); /* transient soap skipped */ } int ns6__JointPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns6__JointPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns6__JointPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns6__JointPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns6__JointPos(struct soap *soap, const char *tag, int id, const ns6__JointPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns6__JointPos), type)) return soap->error; if (soap_out_std__vectorTemplateOfdouble(soap, "item", -1, &(a->ns6__JointPos::item), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns6__JointPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns6__JointPos(soap, this, tag, type); } SOAP_FMAC3 ns6__JointPos * SOAP_FMAC4 soap_get_ns6__JointPos(struct soap *soap, ns6__JointPos *p, const char *tag, const char *type) { if ((p = soap_in_ns6__JointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns6__JointPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns6__JointPos(soap, tag, this, type); } SOAP_FMAC3 ns6__JointPos * SOAP_FMAC4 soap_in_ns6__JointPos(struct soap *soap, const char *tag, ns6__JointPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns6__JointPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns6__JointPos, sizeof(ns6__JointPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns6__JointPos) { soap_revert(soap); *soap->id = '\0'; return (ns6__JointPos *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfdouble(soap, "item", &(a->ns6__JointPos::item), "xsd:double")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns6__JointPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns6__JointPos, 0, sizeof(ns6__JointPos), 0, soap_copy_ns6__JointPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (a->ns6__JointPos::item.size() > 100)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns6__JointPos * SOAP_FMAC4 soap_instantiate_ns6__JointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns6__JointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns6__JointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns6__JointPos; if (size) *size = sizeof(ns6__JointPos); ((ns6__JointPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns6__JointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns6__JointPos); for (int i = 0; i < n; i++) ((ns6__JointPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns6__JointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns6__JointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns6__JointPos %p -> %p\n", q, p)); *(ns6__JointPos*)p = *(ns6__JointPos*)q; } void ns5__AllRobotsPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons6__RobotPos(soap, &this->ns5__AllRobotsPos::RobotsPos); /* transient soap skipped */ } void ns5__AllRobotsPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons6__RobotPos(soap, &this->ns5__AllRobotsPos::RobotsPos); /* transient soap skipped */ } int ns5__AllRobotsPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__AllRobotsPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__AllRobotsPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__AllRobotsPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__AllRobotsPos(struct soap *soap, const char *tag, int id, const ns5__AllRobotsPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__AllRobotsPos), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons6__RobotPos(soap, "RobotsPos", -1, &(a->ns5__AllRobotsPos::RobotsPos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__AllRobotsPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__AllRobotsPos(soap, this, tag, type); } SOAP_FMAC3 ns5__AllRobotsPos * SOAP_FMAC4 soap_get_ns5__AllRobotsPos(struct soap *soap, ns5__AllRobotsPos *p, const char *tag, const char *type) { if ((p = soap_in_ns5__AllRobotsPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__AllRobotsPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__AllRobotsPos(soap, tag, this, type); } SOAP_FMAC3 ns5__AllRobotsPos * SOAP_FMAC4 soap_in_ns5__AllRobotsPos(struct soap *soap, const char *tag, ns5__AllRobotsPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__AllRobotsPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__AllRobotsPos, sizeof(ns5__AllRobotsPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__AllRobotsPos) { soap_revert(soap); *soap->id = '\0'; return (ns5__AllRobotsPos *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons6__RobotPos(soap, "RobotsPos", &(a->ns5__AllRobotsPos::RobotsPos), "ns6:RobotPos")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__AllRobotsPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__AllRobotsPos, 0, sizeof(ns5__AllRobotsPos), 0, soap_copy_ns5__AllRobotsPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns5__AllRobotsPos * SOAP_FMAC4 soap_instantiate_ns5__AllRobotsPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__AllRobotsPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__AllRobotsPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__AllRobotsPos; if (size) *size = sizeof(ns5__AllRobotsPos); ((ns5__AllRobotsPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__AllRobotsPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__AllRobotsPos); for (int i = 0; i < n; i++) ((ns5__AllRobotsPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__AllRobotsPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__AllRobotsPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__AllRobotsPos %p -> %p\n", q, p)); *(ns5__AllRobotsPos*)p = *(ns5__AllRobotsPos*)q; } void ns5__Records::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfstd__string(soap, &this->ns5__Records::record); /* transient soap skipped */ } void ns5__Records::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfstd__string(soap, &this->ns5__Records::record); /* transient soap skipped */ } int ns5__Records::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__Records); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__Records::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__Records(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__Records(struct soap *soap, const char *tag, int id, const ns5__Records *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__Records), type)) return soap->error; if (soap_out_std__vectorTemplateOfstd__string(soap, "record", -1, &(a->ns5__Records::record), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__Records::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__Records(soap, this, tag, type); } SOAP_FMAC3 ns5__Records * SOAP_FMAC4 soap_get_ns5__Records(struct soap *soap, ns5__Records *p, const char *tag, const char *type) { if ((p = soap_in_ns5__Records(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__Records::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__Records(soap, tag, this, type); } SOAP_FMAC3 ns5__Records * SOAP_FMAC4 soap_in_ns5__Records(struct soap *soap, const char *tag, ns5__Records *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__Records *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__Records, sizeof(ns5__Records), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__Records) { soap_revert(soap); *soap->id = '\0'; return (ns5__Records *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfstd__string(soap, "record", &(a->ns5__Records::record), "xsd:string")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__Records *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__Records, 0, sizeof(ns5__Records), 0, soap_copy_ns5__Records); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns5__Records * SOAP_FMAC4 soap_instantiate_ns5__Records(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__Records(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__Records, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__Records; if (size) *size = sizeof(ns5__Records); ((ns5__Records*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__Records[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__Records); for (int i = 0; i < n; i++) ((ns5__Records*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__Records*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__Records(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__Records %p -> %p\n", q, p)); *(ns5__Records*)p = *(ns5__Records*)q; } void ns5__VALApplications::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns5__VALApplications::application); /* transient soap skipped */ } void ns5__VALApplications::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns5__VALApplications::application); /* transient soap skipped */ } int ns5__VALApplications::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__VALApplications); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__VALApplications::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__VALApplications(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__VALApplications(struct soap *soap, const char *tag, int id, const ns5__VALApplications *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__VALApplications), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", -1, &(a->ns5__VALApplications::application), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__VALApplications::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__VALApplications(soap, this, tag, type); } SOAP_FMAC3 ns5__VALApplications * SOAP_FMAC4 soap_get_ns5__VALApplications(struct soap *soap, ns5__VALApplications *p, const char *tag, const char *type) { if ((p = soap_in_ns5__VALApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__VALApplications::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__VALApplications(soap, tag, this, type); } SOAP_FMAC3 ns5__VALApplications * SOAP_FMAC4 soap_in_ns5__VALApplications(struct soap *soap, const char *tag, ns5__VALApplications *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__VALApplications *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__VALApplications, sizeof(ns5__VALApplications), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__VALApplications) { soap_revert(soap); *soap->id = '\0'; return (ns5__VALApplications *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", &(a->ns5__VALApplications::application), "ns2:VALApplication")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__VALApplications *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__VALApplications, 0, sizeof(ns5__VALApplications), 0, soap_copy_ns5__VALApplications); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns5__VALApplications * SOAP_FMAC4 soap_instantiate_ns5__VALApplications(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__VALApplications(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__VALApplications, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__VALApplications; if (size) *size = sizeof(ns5__VALApplications); ((ns5__VALApplications*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__VALApplications[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__VALApplications); for (int i = 0; i < n; i++) ((ns5__VALApplications*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__VALApplications*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__VALApplications(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__VALApplications %p -> %p\n", q, p)); *(ns5__VALApplications*)p = *(ns5__VALApplications*)q; } void ns5__Robots::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns5__Robots::Robots); /* transient soap skipped */ } void ns5__Robots::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns5__Robots::Robots); /* transient soap skipped */ } int ns5__Robots::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__Robots); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__Robots::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__Robots(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__Robots(struct soap *soap, const char *tag, int id, const ns5__Robots *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__Robots), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", -1, &(a->ns5__Robots::Robots), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__Robots::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__Robots(soap, this, tag, type); } SOAP_FMAC3 ns5__Robots * SOAP_FMAC4 soap_get_ns5__Robots(struct soap *soap, ns5__Robots *p, const char *tag, const char *type) { if ((p = soap_in_ns5__Robots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__Robots::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__Robots(soap, tag, this, type); } SOAP_FMAC3 ns5__Robots * SOAP_FMAC4 soap_in_ns5__Robots(struct soap *soap, const char *tag, ns5__Robots *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__Robots *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__Robots, sizeof(ns5__Robots), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__Robots) { soap_revert(soap); *soap->id = '\0'; return (ns5__Robots *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", &(a->ns5__Robots::Robots), "ns1:Robot")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__Robots *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__Robots, 0, sizeof(ns5__Robots), 0, soap_copy_ns5__Robots); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns5__Robots * SOAP_FMAC4 soap_instantiate_ns5__Robots(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__Robots(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__Robots, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__Robots; if (size) *size = sizeof(ns5__Robots); ((ns5__Robots*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__Robots[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__Robots); for (int i = 0; i < n; i++) ((ns5__Robots*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__Robots*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__Robots(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__Robots %p -> %p\n", q, p)); *(ns5__Robots*)p = *(ns5__Robots*)q; } void ns5__Versions::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns5__Versions::Versions); /* transient soap skipped */ } void ns5__Versions::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns5__Versions::Versions); /* transient soap skipped */ } int ns5__Versions::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__Versions); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__Versions::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__Versions(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__Versions(struct soap *soap, const char *tag, int id, const ns5__Versions *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__Versions), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", -1, &(a->ns5__Versions::Versions), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__Versions::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__Versions(soap, this, tag, type); } SOAP_FMAC3 ns5__Versions * SOAP_FMAC4 soap_get_ns5__Versions(struct soap *soap, ns5__Versions *p, const char *tag, const char *type) { if ((p = soap_in_ns5__Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__Versions::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__Versions(soap, tag, this, type); } SOAP_FMAC3 ns5__Versions * SOAP_FMAC4 soap_in_ns5__Versions(struct soap *soap, const char *tag, ns5__Versions *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__Versions *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__Versions, sizeof(ns5__Versions), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__Versions) { soap_revert(soap); *soap->id = '\0'; return (ns5__Versions *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", &(a->ns5__Versions::Versions), "ns1:Version")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__Versions *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__Versions, 0, sizeof(ns5__Versions), 0, soap_copy_ns5__Versions); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns5__Versions * SOAP_FMAC4 soap_instantiate_ns5__Versions(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__Versions(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__Versions, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__Versions; if (size) *size = sizeof(ns5__Versions); ((ns5__Versions*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__Versions[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__Versions); for (int i = 0; i < n; i++) ((ns5__Versions*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__Versions*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__Versions(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__Versions %p -> %p\n", q, p)); *(ns5__Versions*)p = *(ns5__Versions*)q; } void ns5__JointPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfdouble(soap, &this->ns5__JointPos::item); /* transient soap skipped */ } void ns5__JointPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfdouble(soap, &this->ns5__JointPos::item); /* transient soap skipped */ } int ns5__JointPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns5__JointPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns5__JointPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns5__JointPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns5__JointPos(struct soap *soap, const char *tag, int id, const ns5__JointPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns5__JointPos), type)) return soap->error; if (soap_out_std__vectorTemplateOfdouble(soap, "item", -1, &(a->ns5__JointPos::item), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns5__JointPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns5__JointPos(soap, this, tag, type); } SOAP_FMAC3 ns5__JointPos * SOAP_FMAC4 soap_get_ns5__JointPos(struct soap *soap, ns5__JointPos *p, const char *tag, const char *type) { if ((p = soap_in_ns5__JointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns5__JointPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns5__JointPos(soap, tag, this, type); } SOAP_FMAC3 ns5__JointPos * SOAP_FMAC4 soap_in_ns5__JointPos(struct soap *soap, const char *tag, ns5__JointPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns5__JointPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns5__JointPos, sizeof(ns5__JointPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns5__JointPos) { soap_revert(soap); *soap->id = '\0'; return (ns5__JointPos *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfdouble(soap, "item", &(a->ns5__JointPos::item), "xsd:double")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns5__JointPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns5__JointPos, 0, sizeof(ns5__JointPos), 0, soap_copy_ns5__JointPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (a->ns5__JointPos::item.size() > 100)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns5__JointPos * SOAP_FMAC4 soap_instantiate_ns5__JointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns5__JointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns5__JointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns5__JointPos; if (size) *size = sizeof(ns5__JointPos); ((ns5__JointPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns5__JointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns5__JointPos); for (int i = 0; i < n; i++) ((ns5__JointPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns5__JointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns5__JointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns5__JointPos %p -> %p\n", q, p)); *(ns5__JointPos*)p = *(ns5__JointPos*)q; } void ns4__hexBinary::soap_default(struct soap *soap) { this->soap = soap; this->ns4__hexBinary::__item.xsd__hexBinary::soap_default(soap); this->ns4__hexBinary::ns4__contentType = NULL; /* transient soap skipped */ } void ns4__hexBinary::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ this->ns4__hexBinary::__item.soap_serialize(soap); /* transient soap skipped */ } int ns4__hexBinary::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns4__hexBinary); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns4__hexBinary::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns4__hexBinary(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns4__hexBinary(struct soap *soap, const char *tag, int id, const ns4__hexBinary *a, const char *type) { if (((ns4__hexBinary*)a)->ns4__contentType) soap_set_attr(soap, "ns4:contentType", ((ns4__hexBinary*)a)->ns4__contentType->c_str()); return (a->ns4__hexBinary::__item).soap_out(soap, tag, id, ""); } void *ns4__hexBinary::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns4__hexBinary(soap, this, tag, type); } SOAP_FMAC3 ns4__hexBinary * SOAP_FMAC4 soap_get_ns4__hexBinary(struct soap *soap, ns4__hexBinary *p, const char *tag, const char *type) { if ((p = soap_in_ns4__hexBinary(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns4__hexBinary::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns4__hexBinary(soap, tag, this, type); } SOAP_FMAC3 ns4__hexBinary * SOAP_FMAC4 soap_in_ns4__hexBinary(struct soap *soap, const char *tag, ns4__hexBinary *a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!(a = (ns4__hexBinary *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns4__hexBinary, sizeof(ns4__hexBinary), soap->type, soap->arrayType))) { soap->error = SOAP_TAG_MISMATCH; return NULL; } soap_revert(soap); *soap->id = '\0'; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns4__hexBinary) return (ns4__hexBinary *)a->soap_in(soap, tag, type); } { const char *t = soap_attr_value(soap, "ns4:contentType", 0); if (t) { char *s = NULL; if (soap_s2string(soap, t, &s)) return NULL; if (s) { ((ns4__hexBinary*)a)->ns4__contentType = soap_new_std__string(soap, -1); ((ns4__hexBinary*)a)->ns4__contentType->assign(s); } } } if (!(a->ns4__hexBinary::__item).soap_in(soap, tag, "ns4:hexBinary")) return NULL; return a; } SOAP_FMAC3 ns4__hexBinary * SOAP_FMAC4 soap_instantiate_ns4__hexBinary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns4__hexBinary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns4__hexBinary, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns4__hexBinary; if (size) *size = sizeof(ns4__hexBinary); ((ns4__hexBinary*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns4__hexBinary[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns4__hexBinary); for (int i = 0; i < n; i++) ((ns4__hexBinary*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns4__hexBinary*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns4__hexBinary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns4__hexBinary %p -> %p\n", q, p)); *(ns4__hexBinary*)p = *(ns4__hexBinary*)q; } void ns4__base64Binary::soap_default(struct soap *soap) { this->soap = soap; this->ns4__base64Binary::__item.xsd__base64Binary::soap_default(soap); this->ns4__base64Binary::ns4__contentType = NULL; /* transient soap skipped */ } void ns4__base64Binary::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ this->ns4__base64Binary::__item.soap_serialize(soap); /* transient soap skipped */ } int ns4__base64Binary::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns4__base64Binary); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns4__base64Binary::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns4__base64Binary(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns4__base64Binary(struct soap *soap, const char *tag, int id, const ns4__base64Binary *a, const char *type) { if (((ns4__base64Binary*)a)->ns4__contentType) soap_set_attr(soap, "ns4:contentType", ((ns4__base64Binary*)a)->ns4__contentType->c_str()); return (a->ns4__base64Binary::__item).soap_out(soap, tag, id, ""); } void *ns4__base64Binary::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns4__base64Binary(soap, this, tag, type); } SOAP_FMAC3 ns4__base64Binary * SOAP_FMAC4 soap_get_ns4__base64Binary(struct soap *soap, ns4__base64Binary *p, const char *tag, const char *type) { if ((p = soap_in_ns4__base64Binary(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns4__base64Binary::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns4__base64Binary(soap, tag, this, type); } SOAP_FMAC3 ns4__base64Binary * SOAP_FMAC4 soap_in_ns4__base64Binary(struct soap *soap, const char *tag, ns4__base64Binary *a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!(a = (ns4__base64Binary *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns4__base64Binary, sizeof(ns4__base64Binary), soap->type, soap->arrayType))) { soap->error = SOAP_TAG_MISMATCH; return NULL; } soap_revert(soap); *soap->id = '\0'; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns4__base64Binary) return (ns4__base64Binary *)a->soap_in(soap, tag, type); } { const char *t = soap_attr_value(soap, "ns4:contentType", 0); if (t) { char *s = NULL; if (soap_s2string(soap, t, &s)) return NULL; if (s) { ((ns4__base64Binary*)a)->ns4__contentType = soap_new_std__string(soap, -1); ((ns4__base64Binary*)a)->ns4__contentType->assign(s); } } } if (!(a->ns4__base64Binary::__item).soap_in(soap, tag, "ns4:base64Binary")) return NULL; return a; } SOAP_FMAC3 ns4__base64Binary * SOAP_FMAC4 soap_instantiate_ns4__base64Binary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns4__base64Binary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns4__base64Binary, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns4__base64Binary; if (size) *size = sizeof(ns4__base64Binary); ((ns4__base64Binary*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns4__base64Binary[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns4__base64Binary); for (int i = 0; i < n; i++) ((ns4__base64Binary*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns4__base64Binary*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns4__base64Binary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns4__base64Binary %p -> %p\n", q, p)); *(ns4__base64Binary*)p = *(ns4__base64Binary*)q; } void ns3__Include::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOf_XML(soap, &this->ns3__Include::__any); soap_default_xsd__anyURI(soap, &this->ns3__Include::href); this->ns3__Include::__anyAttribute = NULL; /* transient soap skipped */ } void ns3__Include::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOf_XML(soap, &this->ns3__Include::__any); /* transient soap skipped */ } int ns3__Include::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns3__Include); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns3__Include::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns3__Include(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns3__Include(struct soap *soap, const char *tag, int id, const ns3__Include *a, const char *type) { if (!((ns3__Include*)a)->href.empty()) soap_set_attr(soap, "href", ((ns3__Include*)a)->href.c_str()); if (((ns3__Include*)a)->__anyAttribute) soap_set_attr(soap, "-anyAttribute", ((ns3__Include*)a)->__anyAttribute); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns3__Include), type)) return soap->error; if (soap_out_std__vectorTemplateOf_XML(soap, "-any", -1, &(a->ns3__Include::__any), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns3__Include::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns3__Include(soap, this, tag, type); } SOAP_FMAC3 ns3__Include * SOAP_FMAC4 soap_get_ns3__Include(struct soap *soap, ns3__Include *p, const char *tag, const char *type) { if ((p = soap_in_ns3__Include(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns3__Include::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns3__Include(soap, tag, this, type); } SOAP_FMAC3 ns3__Include * SOAP_FMAC4 soap_in_ns3__Include(struct soap *soap, const char *tag, ns3__Include *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns3__Include *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns3__Include, sizeof(ns3__Include), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns3__Include) { soap_revert(soap); *soap->id = '\0'; return (ns3__Include *)a->soap_in(soap, tag, type); } } { const char *t = soap_attr_value(soap, "href", 1); if (t) { char *s; if (soap_s2string(soap, t, &s)) return NULL; ((ns3__Include*)a)->href.assign(s); } } if (soap_s2string(soap, soap_attr_value(soap, "-anyAttribute", 0), &((ns3__Include*)a)->__anyAttribute)) return NULL; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOf_XML(soap, "-any", &(a->ns3__Include::__any), "")) continue; if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns3__Include *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns3__Include, 0, sizeof(ns3__Include), 0, soap_copy_ns3__Include); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns3__Include * SOAP_FMAC4 soap_instantiate_ns3__Include(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns3__Include(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns3__Include, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns3__Include; if (size) *size = sizeof(ns3__Include); ((ns3__Include*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns3__Include[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns3__Include); for (int i = 0; i < n; i++) ((ns3__Include*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns3__Include*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns3__Include(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns3__Include %p -> %p\n", q, p)); *(ns3__Include*)p = *(ns3__Include*)q; } void _ns2__getJointRangeResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getJointRangeResponse::range = NULL; /* transient soap skipped */ } void _ns2__getJointRangeResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons2__JointRange(soap, &this->_ns2__getJointRangeResponse::range); /* transient soap skipped */ } int _ns2__getJointRangeResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getJointRangeResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getJointRangeResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getJointRangeResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getJointRangeResponse(struct soap *soap, const char *tag, int id, const _ns2__getJointRangeResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getJointRangeResponse), type)) return soap->error; if (soap_out_PointerTons2__JointRange(soap, "range", -1, &(a->_ns2__getJointRangeResponse::range), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getJointRangeResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getJointRangeResponse(soap, this, tag, type); } SOAP_FMAC3 _ns2__getJointRangeResponse * SOAP_FMAC4 soap_get__ns2__getJointRangeResponse(struct soap *soap, _ns2__getJointRangeResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getJointRangeResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getJointRangeResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getJointRangeResponse(soap, tag, this, type); } SOAP_FMAC3 _ns2__getJointRangeResponse * SOAP_FMAC4 soap_in__ns2__getJointRangeResponse(struct soap *soap, const char *tag, _ns2__getJointRangeResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getJointRangeResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getJointRangeResponse, sizeof(_ns2__getJointRangeResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getJointRangeResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getJointRangeResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_range1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_range1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons2__JointRange(soap, "range", &(a->_ns2__getJointRangeResponse::range), "ns2:JointRange")) { soap_flag_range1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getJointRangeResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getJointRangeResponse, 0, sizeof(_ns2__getJointRangeResponse), 0, soap_copy__ns2__getJointRangeResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_range1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getJointRangeResponse * SOAP_FMAC4 soap_instantiate__ns2__getJointRangeResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getJointRangeResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getJointRangeResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getJointRangeResponse; if (size) *size = sizeof(_ns2__getJointRangeResponse); ((_ns2__getJointRangeResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getJointRangeResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getJointRangeResponse); for (int i = 0; i < n; i++) ((_ns2__getJointRangeResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getJointRangeResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getJointRangeResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getJointRangeResponse %p -> %p\n", q, p)); *(_ns2__getJointRangeResponse*)p = *(_ns2__getJointRangeResponse*)q; } void _ns2__getJointRange::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns2__getJointRange::robot); /* transient soap skipped */ } void _ns2__getJointRange::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns2__getJointRange::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getJointRange); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getJointRange::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getJointRange(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getJointRange(struct soap *soap, const char *tag, int id, const _ns2__getJointRange *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getJointRange), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns2__getJointRange::robot), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getJointRange::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getJointRange(soap, this, tag, type); } SOAP_FMAC3 _ns2__getJointRange * SOAP_FMAC4 soap_get__ns2__getJointRange(struct soap *soap, _ns2__getJointRange *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getJointRange(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getJointRange::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getJointRange(soap, tag, this, type); } SOAP_FMAC3 _ns2__getJointRange * SOAP_FMAC4 soap_in__ns2__getJointRange(struct soap *soap, const char *tag, _ns2__getJointRange *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getJointRange *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getJointRange, sizeof(_ns2__getJointRange), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getJointRange) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getJointRange *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns2__getJointRange::robot), "xsd:int")) { soap_flag_robot1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getJointRange *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getJointRange, 0, sizeof(_ns2__getJointRange), 0, soap_copy__ns2__getJointRange); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getJointRange * SOAP_FMAC4 soap_instantiate__ns2__getJointRange(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getJointRange(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getJointRange, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getJointRange; if (size) *size = sizeof(_ns2__getJointRange); ((_ns2__getJointRange*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getJointRange[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getJointRange); for (int i = 0; i < n; i++) ((_ns2__getJointRange*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getJointRange*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getJointRange(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getJointRange %p -> %p\n", q, p)); *(_ns2__getJointRange*)p = *(_ns2__getJointRange*)q; } void _ns2__getRecordResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getRecordResponse::data.xsd__base64Binary::soap_default(soap); /* transient soap skipped */ } void _ns2__getRecordResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ this->_ns2__getRecordResponse::data.soap_serialize(soap); /* transient soap skipped */ } int _ns2__getRecordResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getRecordResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getRecordResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getRecordResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getRecordResponse(struct soap *soap, const char *tag, int id, const _ns2__getRecordResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getRecordResponse), type)) return soap->error; if ((a->_ns2__getRecordResponse::data).soap_out(soap, "data", -1, "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getRecordResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getRecordResponse(soap, this, tag, type); } SOAP_FMAC3 _ns2__getRecordResponse * SOAP_FMAC4 soap_get__ns2__getRecordResponse(struct soap *soap, _ns2__getRecordResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getRecordResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getRecordResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getRecordResponse(soap, tag, this, type); } SOAP_FMAC3 _ns2__getRecordResponse * SOAP_FMAC4 soap_in__ns2__getRecordResponse(struct soap *soap, const char *tag, _ns2__getRecordResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getRecordResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getRecordResponse, sizeof(_ns2__getRecordResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getRecordResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getRecordResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_data1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_data1 && soap->error == SOAP_TAG_MISMATCH) if ((a->_ns2__getRecordResponse::data).soap_in(soap, "data", "xsd:base64Binary")) { soap_flag_data1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getRecordResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getRecordResponse, 0, sizeof(_ns2__getRecordResponse), 0, soap_copy__ns2__getRecordResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_data1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getRecordResponse * SOAP_FMAC4 soap_instantiate__ns2__getRecordResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getRecordResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getRecordResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getRecordResponse; if (size) *size = sizeof(_ns2__getRecordResponse); ((_ns2__getRecordResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getRecordResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getRecordResponse); for (int i = 0; i < n; i++) ((_ns2__getRecordResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getRecordResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getRecordResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getRecordResponse %p -> %p\n", q, p)); *(_ns2__getRecordResponse*)p = *(_ns2__getRecordResponse*)q; } void _ns2__getRecord::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getRecord::name = NULL; /* transient soap skipped */ } void _ns2__getRecord::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns2__getRecord::name); /* transient soap skipped */ } int _ns2__getRecord::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getRecord); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getRecord::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getRecord(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getRecord(struct soap *soap, const char *tag, int id, const _ns2__getRecord *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getRecord), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "name", -1, &(a->_ns2__getRecord::name), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getRecord::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getRecord(soap, this, tag, type); } SOAP_FMAC3 _ns2__getRecord * SOAP_FMAC4 soap_get__ns2__getRecord(struct soap *soap, _ns2__getRecord *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getRecord(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getRecord::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getRecord(soap, tag, this, type); } SOAP_FMAC3 _ns2__getRecord * SOAP_FMAC4 soap_in__ns2__getRecord(struct soap *soap, const char *tag, _ns2__getRecord *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getRecord *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getRecord, sizeof(_ns2__getRecord), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getRecord) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getRecord *)a->soap_in(soap, tag, type); } } size_t soap_flag_name1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_name1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "name", &(a->_ns2__getRecord::name), "xsd:string")) { soap_flag_name1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getRecord *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getRecord, 0, sizeof(_ns2__getRecord), 0, soap_copy__ns2__getRecord); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns2__getRecord * SOAP_FMAC4 soap_instantiate__ns2__getRecord(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getRecord(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getRecord, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getRecord; if (size) *size = sizeof(_ns2__getRecord); ((_ns2__getRecord*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getRecord[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getRecord); for (int i = 0; i < n; i++) ((_ns2__getRecord*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getRecord*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getRecord(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getRecord %p -> %p\n", q, p)); *(_ns2__getRecord*)p = *(_ns2__getRecord*)q; } void _ns2__getRecordsResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getRecordsResponse::records = NULL; /* transient soap skipped */ } void _ns2__getRecordsResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons2__Records(soap, &this->_ns2__getRecordsResponse::records); /* transient soap skipped */ } int _ns2__getRecordsResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getRecordsResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getRecordsResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getRecordsResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getRecordsResponse(struct soap *soap, const char *tag, int id, const _ns2__getRecordsResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getRecordsResponse), type)) return soap->error; if (soap_out_PointerTons2__Records(soap, "records", -1, &(a->_ns2__getRecordsResponse::records), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getRecordsResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getRecordsResponse(soap, this, tag, type); } SOAP_FMAC3 _ns2__getRecordsResponse * SOAP_FMAC4 soap_get__ns2__getRecordsResponse(struct soap *soap, _ns2__getRecordsResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getRecordsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getRecordsResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getRecordsResponse(soap, tag, this, type); } SOAP_FMAC3 _ns2__getRecordsResponse * SOAP_FMAC4 soap_in__ns2__getRecordsResponse(struct soap *soap, const char *tag, _ns2__getRecordsResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getRecordsResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getRecordsResponse, sizeof(_ns2__getRecordsResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getRecordsResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getRecordsResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_records1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_records1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons2__Records(soap, "records", &(a->_ns2__getRecordsResponse::records), "ns2:Records")) { soap_flag_records1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getRecordsResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getRecordsResponse, 0, sizeof(_ns2__getRecordsResponse), 0, soap_copy__ns2__getRecordsResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_records1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getRecordsResponse * SOAP_FMAC4 soap_instantiate__ns2__getRecordsResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getRecordsResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getRecordsResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getRecordsResponse; if (size) *size = sizeof(_ns2__getRecordsResponse); ((_ns2__getRecordsResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getRecordsResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getRecordsResponse); for (int i = 0; i < n; i++) ((_ns2__getRecordsResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getRecordsResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getRecordsResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getRecordsResponse %p -> %p\n", q, p)); *(_ns2__getRecordsResponse*)p = *(_ns2__getRecordsResponse*)q; } void _ns2__getRecords::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns2__getRecords::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns2__getRecords::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getRecords); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getRecords::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getRecords(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getRecords(struct soap *soap, const char *tag, int id, const _ns2__getRecords *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getRecords), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getRecords::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getRecords(soap, this, tag, type); } SOAP_FMAC3 _ns2__getRecords * SOAP_FMAC4 soap_get__ns2__getRecords(struct soap *soap, _ns2__getRecords *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getRecords(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getRecords::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getRecords(soap, tag, this, type); } SOAP_FMAC3 _ns2__getRecords * SOAP_FMAC4 soap_in__ns2__getRecords(struct soap *soap, const char *tag, _ns2__getRecords *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getRecords *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getRecords, sizeof(_ns2__getRecords), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getRecords) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getRecords *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getRecords *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getRecords, 0, sizeof(_ns2__getRecords), 0, soap_copy__ns2__getRecords); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns2__getRecords * SOAP_FMAC4 soap_instantiate__ns2__getRecords(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getRecords(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getRecords, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getRecords; if (size) *size = sizeof(_ns2__getRecords); ((_ns2__getRecords*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getRecords[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getRecords); for (int i = 0; i < n; i++) ((_ns2__getRecords*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getRecords*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getRecords(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getRecords %p -> %p\n", q, p)); *(_ns2__getRecords*)p = *(_ns2__getRecords*)q; } void _ns2__getApplicationDatasResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getApplicationDatasResponse::data.xsd__base64Binary::soap_default(soap); /* transient soap skipped */ } void _ns2__getApplicationDatasResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ this->_ns2__getApplicationDatasResponse::data.soap_serialize(soap); /* transient soap skipped */ } int _ns2__getApplicationDatasResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getApplicationDatasResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getApplicationDatasResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getApplicationDatasResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getApplicationDatasResponse(struct soap *soap, const char *tag, int id, const _ns2__getApplicationDatasResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getApplicationDatasResponse), type)) return soap->error; if ((a->_ns2__getApplicationDatasResponse::data).soap_out(soap, "data", -1, "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getApplicationDatasResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getApplicationDatasResponse(soap, this, tag, type); } SOAP_FMAC3 _ns2__getApplicationDatasResponse * SOAP_FMAC4 soap_get__ns2__getApplicationDatasResponse(struct soap *soap, _ns2__getApplicationDatasResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getApplicationDatasResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getApplicationDatasResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getApplicationDatasResponse(soap, tag, this, type); } SOAP_FMAC3 _ns2__getApplicationDatasResponse * SOAP_FMAC4 soap_in__ns2__getApplicationDatasResponse(struct soap *soap, const char *tag, _ns2__getApplicationDatasResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getApplicationDatasResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getApplicationDatasResponse, sizeof(_ns2__getApplicationDatasResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getApplicationDatasResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getApplicationDatasResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_data1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_data1 && soap->error == SOAP_TAG_MISMATCH) if ((a->_ns2__getApplicationDatasResponse::data).soap_in(soap, "data", "xsd:base64Binary")) { soap_flag_data1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getApplicationDatasResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getApplicationDatasResponse, 0, sizeof(_ns2__getApplicationDatasResponse), 0, soap_copy__ns2__getApplicationDatasResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_data1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getApplicationDatasResponse * SOAP_FMAC4 soap_instantiate__ns2__getApplicationDatasResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getApplicationDatasResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getApplicationDatasResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getApplicationDatasResponse; if (size) *size = sizeof(_ns2__getApplicationDatasResponse); ((_ns2__getApplicationDatasResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getApplicationDatasResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getApplicationDatasResponse); for (int i = 0; i < n; i++) ((_ns2__getApplicationDatasResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getApplicationDatasResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getApplicationDatasResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getApplicationDatasResponse %p -> %p\n", q, p)); *(_ns2__getApplicationDatasResponse*)p = *(_ns2__getApplicationDatasResponse*)q; } void _ns2__getApplicationDatas::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getApplicationDatas::name = NULL; /* transient soap skipped */ } void _ns2__getApplicationDatas::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns2__getApplicationDatas::name); /* transient soap skipped */ } int _ns2__getApplicationDatas::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getApplicationDatas); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getApplicationDatas::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getApplicationDatas(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getApplicationDatas(struct soap *soap, const char *tag, int id, const _ns2__getApplicationDatas *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getApplicationDatas), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "name", -1, &(a->_ns2__getApplicationDatas::name), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getApplicationDatas::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getApplicationDatas(soap, this, tag, type); } SOAP_FMAC3 _ns2__getApplicationDatas * SOAP_FMAC4 soap_get__ns2__getApplicationDatas(struct soap *soap, _ns2__getApplicationDatas *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getApplicationDatas(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getApplicationDatas::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getApplicationDatas(soap, tag, this, type); } SOAP_FMAC3 _ns2__getApplicationDatas * SOAP_FMAC4 soap_in__ns2__getApplicationDatas(struct soap *soap, const char *tag, _ns2__getApplicationDatas *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getApplicationDatas *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getApplicationDatas, sizeof(_ns2__getApplicationDatas), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getApplicationDatas) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getApplicationDatas *)a->soap_in(soap, tag, type); } } size_t soap_flag_name1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_name1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "name", &(a->_ns2__getApplicationDatas::name), "xsd:string")) { soap_flag_name1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getApplicationDatas *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getApplicationDatas, 0, sizeof(_ns2__getApplicationDatas), 0, soap_copy__ns2__getApplicationDatas); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns2__getApplicationDatas * SOAP_FMAC4 soap_instantiate__ns2__getApplicationDatas(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getApplicationDatas(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getApplicationDatas, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getApplicationDatas; if (size) *size = sizeof(_ns2__getApplicationDatas); ((_ns2__getApplicationDatas*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getApplicationDatas[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getApplicationDatas); for (int i = 0; i < n; i++) ((_ns2__getApplicationDatas*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getApplicationDatas*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getApplicationDatas(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getApplicationDatas %p -> %p\n", q, p)); *(_ns2__getApplicationDatas*)p = *(_ns2__getApplicationDatas*)q; } void _ns2__getApplicationsResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns2__getApplicationsResponse::applications = NULL; /* transient soap skipped */ } void _ns2__getApplicationsResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons2__VALApplications(soap, &this->_ns2__getApplicationsResponse::applications); /* transient soap skipped */ } int _ns2__getApplicationsResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getApplicationsResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getApplicationsResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getApplicationsResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getApplicationsResponse(struct soap *soap, const char *tag, int id, const _ns2__getApplicationsResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getApplicationsResponse), type)) return soap->error; if (soap_out_PointerTons2__VALApplications(soap, "applications", -1, &(a->_ns2__getApplicationsResponse::applications), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getApplicationsResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getApplicationsResponse(soap, this, tag, type); } SOAP_FMAC3 _ns2__getApplicationsResponse * SOAP_FMAC4 soap_get__ns2__getApplicationsResponse(struct soap *soap, _ns2__getApplicationsResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getApplicationsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getApplicationsResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getApplicationsResponse(soap, tag, this, type); } SOAP_FMAC3 _ns2__getApplicationsResponse * SOAP_FMAC4 soap_in__ns2__getApplicationsResponse(struct soap *soap, const char *tag, _ns2__getApplicationsResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getApplicationsResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getApplicationsResponse, sizeof(_ns2__getApplicationsResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getApplicationsResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getApplicationsResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_applications1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_applications1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons2__VALApplications(soap, "applications", &(a->_ns2__getApplicationsResponse::applications), "ns2:VALApplications")) { soap_flag_applications1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getApplicationsResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getApplicationsResponse, 0, sizeof(_ns2__getApplicationsResponse), 0, soap_copy__ns2__getApplicationsResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_applications1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns2__getApplicationsResponse * SOAP_FMAC4 soap_instantiate__ns2__getApplicationsResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getApplicationsResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getApplicationsResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getApplicationsResponse; if (size) *size = sizeof(_ns2__getApplicationsResponse); ((_ns2__getApplicationsResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getApplicationsResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getApplicationsResponse); for (int i = 0; i < n; i++) ((_ns2__getApplicationsResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getApplicationsResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getApplicationsResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getApplicationsResponse %p -> %p\n", q, p)); *(_ns2__getApplicationsResponse*)p = *(_ns2__getApplicationsResponse*)q; } void _ns2__getApplications::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns2__getApplications::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns2__getApplications::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns2__getApplications); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns2__getApplications::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns2__getApplications(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns2__getApplications(struct soap *soap, const char *tag, int id, const _ns2__getApplications *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns2__getApplications), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns2__getApplications::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns2__getApplications(soap, this, tag, type); } SOAP_FMAC3 _ns2__getApplications * SOAP_FMAC4 soap_get__ns2__getApplications(struct soap *soap, _ns2__getApplications *p, const char *tag, const char *type) { if ((p = soap_in__ns2__getApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns2__getApplications::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns2__getApplications(soap, tag, this, type); } SOAP_FMAC3 _ns2__getApplications * SOAP_FMAC4 soap_in__ns2__getApplications(struct soap *soap, const char *tag, _ns2__getApplications *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns2__getApplications *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns2__getApplications, sizeof(_ns2__getApplications), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns2__getApplications) { soap_revert(soap); *soap->id = '\0'; return (_ns2__getApplications *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns2__getApplications *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns2__getApplications, 0, sizeof(_ns2__getApplications), 0, soap_copy__ns2__getApplications); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns2__getApplications * SOAP_FMAC4 soap_instantiate__ns2__getApplications(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns2__getApplications(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns2__getApplications, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns2__getApplications; if (size) *size = sizeof(_ns2__getApplications); ((_ns2__getApplications*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns2__getApplications[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns2__getApplications); for (int i = 0; i < n; i++) ((_ns2__getApplications*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns2__getApplications*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns2__getApplications(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns2__getApplications %p -> %p\n", q, p)); *(_ns2__getApplications*)p = *(_ns2__getApplications*)q; } void ns2__JointRange::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfdouble(soap, &this->ns2__JointRange::min_); soap_default_std__vectorTemplateOfdouble(soap, &this->ns2__JointRange::max_); /* transient soap skipped */ } void ns2__JointRange::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfdouble(soap, &this->ns2__JointRange::min_); soap_serialize_std__vectorTemplateOfdouble(soap, &this->ns2__JointRange::max_); /* transient soap skipped */ } int ns2__JointRange::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns2__JointRange); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns2__JointRange::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns2__JointRange(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns2__JointRange(struct soap *soap, const char *tag, int id, const ns2__JointRange *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns2__JointRange), type)) return soap->error; if (soap_out_std__vectorTemplateOfdouble(soap, "min", -1, &(a->ns2__JointRange::min_), "")) return soap->error; if (soap_out_std__vectorTemplateOfdouble(soap, "max", -1, &(a->ns2__JointRange::max_), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns2__JointRange::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns2__JointRange(soap, this, tag, type); } SOAP_FMAC3 ns2__JointRange * SOAP_FMAC4 soap_get_ns2__JointRange(struct soap *soap, ns2__JointRange *p, const char *tag, const char *type) { if ((p = soap_in_ns2__JointRange(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns2__JointRange::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns2__JointRange(soap, tag, this, type); } SOAP_FMAC3 ns2__JointRange * SOAP_FMAC4 soap_in_ns2__JointRange(struct soap *soap, const char *tag, ns2__JointRange *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns2__JointRange *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns2__JointRange, sizeof(ns2__JointRange), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns2__JointRange) { soap_revert(soap); *soap->id = '\0'; return (ns2__JointRange *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfdouble(soap, "min", &(a->ns2__JointRange::min_), "xsd:double")) continue; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfdouble(soap, "max", &(a->ns2__JointRange::max_), "xsd:double")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns2__JointRange *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns2__JointRange, 0, sizeof(ns2__JointRange), 0, soap_copy_ns2__JointRange); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns2__JointRange * SOAP_FMAC4 soap_instantiate_ns2__JointRange(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns2__JointRange(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns2__JointRange, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns2__JointRange; if (size) *size = sizeof(ns2__JointRange); ((ns2__JointRange*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns2__JointRange[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns2__JointRange); for (int i = 0; i < n; i++) ((ns2__JointRange*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns2__JointRange*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns2__JointRange(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns2__JointRange %p -> %p\n", q, p)); *(ns2__JointRange*)p = *(ns2__JointRange*)q; } void ns2__Records::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfstd__string(soap, &this->ns2__Records::record); /* transient soap skipped */ } void ns2__Records::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfstd__string(soap, &this->ns2__Records::record); /* transient soap skipped */ } int ns2__Records::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns2__Records); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns2__Records::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns2__Records(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns2__Records(struct soap *soap, const char *tag, int id, const ns2__Records *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns2__Records), type)) return soap->error; if (soap_out_std__vectorTemplateOfstd__string(soap, "record", -1, &(a->ns2__Records::record), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns2__Records::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns2__Records(soap, this, tag, type); } SOAP_FMAC3 ns2__Records * SOAP_FMAC4 soap_get_ns2__Records(struct soap *soap, ns2__Records *p, const char *tag, const char *type) { if ((p = soap_in_ns2__Records(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns2__Records::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns2__Records(soap, tag, this, type); } SOAP_FMAC3 ns2__Records * SOAP_FMAC4 soap_in_ns2__Records(struct soap *soap, const char *tag, ns2__Records *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns2__Records *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns2__Records, sizeof(ns2__Records), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns2__Records) { soap_revert(soap); *soap->id = '\0'; return (ns2__Records *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfstd__string(soap, "record", &(a->ns2__Records::record), "xsd:string")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns2__Records *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns2__Records, 0, sizeof(ns2__Records), 0, soap_copy_ns2__Records); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns2__Records * SOAP_FMAC4 soap_instantiate_ns2__Records(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns2__Records(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns2__Records, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns2__Records; if (size) *size = sizeof(ns2__Records); ((ns2__Records*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns2__Records[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns2__Records); for (int i = 0; i < n; i++) ((ns2__Records*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns2__Records*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns2__Records(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns2__Records %p -> %p\n", q, p)); *(ns2__Records*)p = *(ns2__Records*)q; } void ns2__Data::soap_default(struct soap *soap) { this->soap = soap; this->ns2__Data::ns3__Include_ = NULL; this->ns2__Data::ns4__contentType = NULL; /* transient soap skipped */ } void ns2__Data::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons3__Include(soap, &this->ns2__Data::ns3__Include_); /* transient soap skipped */ } int ns2__Data::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns2__Data); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns2__Data::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns2__Data(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns2__Data(struct soap *soap, const char *tag, int id, const ns2__Data *a, const char *type) { if (((ns2__Data*)a)->ns4__contentType) soap_set_attr(soap, "ns4:contentType", ((ns2__Data*)a)->ns4__contentType->c_str()); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns2__Data), type)) return soap->error; if (soap_out_PointerTons3__Include(soap, "ns3:Include", -1, &(a->ns2__Data::ns3__Include_), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns2__Data::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns2__Data(soap, this, tag, type); } SOAP_FMAC3 ns2__Data * SOAP_FMAC4 soap_get_ns2__Data(struct soap *soap, ns2__Data *p, const char *tag, const char *type) { if ((p = soap_in_ns2__Data(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns2__Data::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns2__Data(soap, tag, this, type); } SOAP_FMAC3 ns2__Data * SOAP_FMAC4 soap_in_ns2__Data(struct soap *soap, const char *tag, ns2__Data *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns2__Data *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns2__Data, sizeof(ns2__Data), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns2__Data) { soap_revert(soap); *soap->id = '\0'; return (ns2__Data *)a->soap_in(soap, tag, type); } } { const char *t = soap_attr_value(soap, "ns4:contentType", 0); if (t) { char *s = NULL; if (soap_s2string(soap, t, &s)) return NULL; if (s) { ((ns2__Data*)a)->ns4__contentType = soap_new_std__string(soap, -1); ((ns2__Data*)a)->ns4__contentType->assign(s); } } } size_t soap_flag_ns3__Include_1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns3__Include_1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons3__Include(soap, "ns3:Include", &(a->ns2__Data::ns3__Include_), "ns3:Include")) { soap_flag_ns3__Include_1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns2__Data *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns2__Data, 0, sizeof(ns2__Data), 0, soap_copy_ns2__Data); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_ns3__Include_1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns2__Data * SOAP_FMAC4 soap_instantiate_ns2__Data(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns2__Data(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns2__Data, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns2__Data; if (size) *size = sizeof(ns2__Data); ((ns2__Data*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns2__Data[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns2__Data); for (int i = 0; i < n; i++) ((ns2__Data*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns2__Data*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns2__Data(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns2__Data %p -> %p\n", q, p)); *(ns2__Data*)p = *(ns2__Data*)q; } void ns2__VALApplications::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns2__VALApplications::application); /* transient soap skipped */ } void ns2__VALApplications::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons2__VALApplication(soap, &this->ns2__VALApplications::application); /* transient soap skipped */ } int ns2__VALApplications::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns2__VALApplications); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns2__VALApplications::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns2__VALApplications(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns2__VALApplications(struct soap *soap, const char *tag, int id, const ns2__VALApplications *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns2__VALApplications), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", -1, &(a->ns2__VALApplications::application), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns2__VALApplications::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns2__VALApplications(soap, this, tag, type); } SOAP_FMAC3 ns2__VALApplications * SOAP_FMAC4 soap_get_ns2__VALApplications(struct soap *soap, ns2__VALApplications *p, const char *tag, const char *type) { if ((p = soap_in_ns2__VALApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns2__VALApplications::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns2__VALApplications(soap, tag, this, type); } SOAP_FMAC3 ns2__VALApplications * SOAP_FMAC4 soap_in_ns2__VALApplications(struct soap *soap, const char *tag, ns2__VALApplications *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns2__VALApplications *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns2__VALApplications, sizeof(ns2__VALApplications), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns2__VALApplications) { soap_revert(soap); *soap->id = '\0'; return (ns2__VALApplications *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons2__VALApplication(soap, "application", &(a->ns2__VALApplications::application), "ns2:VALApplication")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns2__VALApplications *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns2__VALApplications, 0, sizeof(ns2__VALApplications), 0, soap_copy_ns2__VALApplications); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns2__VALApplications * SOAP_FMAC4 soap_instantiate_ns2__VALApplications(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns2__VALApplications(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns2__VALApplications, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns2__VALApplications; if (size) *size = sizeof(ns2__VALApplications); ((ns2__VALApplications*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns2__VALApplications[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns2__VALApplications); for (int i = 0; i < n; i++) ((ns2__VALApplications*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns2__VALApplications*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns2__VALApplications(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns2__VALApplications %p -> %p\n", q, p)); *(ns2__VALApplications*)p = *(ns2__VALApplications*)q; } void ns2__VALApplication::soap_default(struct soap *soap) { this->soap = soap; this->ns2__VALApplication::name = NULL; soap_default_bool(soap, &this->ns2__VALApplication::loaded); /* transient soap skipped */ } void ns2__VALApplication::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->ns2__VALApplication::name); /* transient soap skipped */ } int ns2__VALApplication::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns2__VALApplication); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns2__VALApplication::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns2__VALApplication(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns2__VALApplication(struct soap *soap, const char *tag, int id, const ns2__VALApplication *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns2__VALApplication), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "name", -1, &(a->ns2__VALApplication::name), "")) return soap->error; if (soap_out_bool(soap, "loaded", -1, &(a->ns2__VALApplication::loaded), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns2__VALApplication::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns2__VALApplication(soap, this, tag, type); } SOAP_FMAC3 ns2__VALApplication * SOAP_FMAC4 soap_get_ns2__VALApplication(struct soap *soap, ns2__VALApplication *p, const char *tag, const char *type) { if ((p = soap_in_ns2__VALApplication(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns2__VALApplication::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns2__VALApplication(soap, tag, this, type); } SOAP_FMAC3 ns2__VALApplication * SOAP_FMAC4 soap_in_ns2__VALApplication(struct soap *soap, const char *tag, ns2__VALApplication *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns2__VALApplication *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns2__VALApplication, sizeof(ns2__VALApplication), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns2__VALApplication) { soap_revert(soap); *soap->id = '\0'; return (ns2__VALApplication *)a->soap_in(soap, tag, type); } } size_t soap_flag_name1 = 1; size_t soap_flag_loaded1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_name1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "name", &(a->ns2__VALApplication::name), "xsd:string")) { soap_flag_name1--; continue; } if (soap_flag_loaded1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_bool(soap, "loaded", &(a->ns2__VALApplication::loaded), "xsd:boolean")) { soap_flag_loaded1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns2__VALApplication *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns2__VALApplication, 0, sizeof(ns2__VALApplication), 0, soap_copy_ns2__VALApplication); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_loaded1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns2__VALApplication * SOAP_FMAC4 soap_instantiate_ns2__VALApplication(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns2__VALApplication(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns2__VALApplication, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns2__VALApplication; if (size) *size = sizeof(ns2__VALApplication); ((ns2__VALApplication*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns2__VALApplication[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns2__VALApplication); for (int i = 0; i < n; i++) ((ns2__VALApplication*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns2__VALApplication*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns2__VALApplication(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns2__VALApplication %p -> %p\n", q, p)); *(ns2__VALApplication*)p = *(ns2__VALApplication*)q; } void _ns1__getCS8CompatibilityResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getCS8CompatibilityResponse::compatibility = NULL; /* transient soap skipped */ } void _ns1__getCS8CompatibilityResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__getCS8CompatibilityResponse::compatibility); /* transient soap skipped */ } int _ns1__getCS8CompatibilityResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getCS8CompatibilityResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getCS8CompatibilityResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getCS8CompatibilityResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getCS8CompatibilityResponse(struct soap *soap, const char *tag, int id, const _ns1__getCS8CompatibilityResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getCS8CompatibilityResponse), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "compatibility", -1, &(a->_ns1__getCS8CompatibilityResponse::compatibility), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getCS8CompatibilityResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getCS8CompatibilityResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getCS8CompatibilityResponse * SOAP_FMAC4 soap_get__ns1__getCS8CompatibilityResponse(struct soap *soap, _ns1__getCS8CompatibilityResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getCS8CompatibilityResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getCS8CompatibilityResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getCS8CompatibilityResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getCS8CompatibilityResponse * SOAP_FMAC4 soap_in__ns1__getCS8CompatibilityResponse(struct soap *soap, const char *tag, _ns1__getCS8CompatibilityResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getCS8CompatibilityResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getCS8CompatibilityResponse, sizeof(_ns1__getCS8CompatibilityResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getCS8CompatibilityResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getCS8CompatibilityResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_compatibility1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_compatibility1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "compatibility", &(a->_ns1__getCS8CompatibilityResponse::compatibility), "xsd:string")) { soap_flag_compatibility1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getCS8CompatibilityResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getCS8CompatibilityResponse, 0, sizeof(_ns1__getCS8CompatibilityResponse), 0, soap_copy__ns1__getCS8CompatibilityResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getCS8CompatibilityResponse * SOAP_FMAC4 soap_instantiate__ns1__getCS8CompatibilityResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getCS8CompatibilityResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getCS8CompatibilityResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getCS8CompatibilityResponse; if (size) *size = sizeof(_ns1__getCS8CompatibilityResponse); ((_ns1__getCS8CompatibilityResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getCS8CompatibilityResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getCS8CompatibilityResponse); for (int i = 0; i < n; i++) ((_ns1__getCS8CompatibilityResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getCS8CompatibilityResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getCS8CompatibilityResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getCS8CompatibilityResponse %p -> %p\n", q, p)); *(_ns1__getCS8CompatibilityResponse*)p = *(_ns1__getCS8CompatibilityResponse*)q; } void _ns1__getCS8Compatibility::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__getCS8Compatibility::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__getCS8Compatibility::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getCS8Compatibility); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getCS8Compatibility::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getCS8Compatibility(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getCS8Compatibility(struct soap *soap, const char *tag, int id, const _ns1__getCS8Compatibility *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getCS8Compatibility), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getCS8Compatibility::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getCS8Compatibility(soap, this, tag, type); } SOAP_FMAC3 _ns1__getCS8Compatibility * SOAP_FMAC4 soap_get__ns1__getCS8Compatibility(struct soap *soap, _ns1__getCS8Compatibility *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getCS8Compatibility(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getCS8Compatibility::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getCS8Compatibility(soap, tag, this, type); } SOAP_FMAC3 _ns1__getCS8Compatibility * SOAP_FMAC4 soap_in__ns1__getCS8Compatibility(struct soap *soap, const char *tag, _ns1__getCS8Compatibility *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getCS8Compatibility *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getCS8Compatibility, sizeof(_ns1__getCS8Compatibility), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getCS8Compatibility) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getCS8Compatibility *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getCS8Compatibility *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getCS8Compatibility, 0, sizeof(_ns1__getCS8Compatibility), 0, soap_copy__ns1__getCS8Compatibility); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getCS8Compatibility * SOAP_FMAC4 soap_instantiate__ns1__getCS8Compatibility(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getCS8Compatibility(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getCS8Compatibility, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getCS8Compatibility; if (size) *size = sizeof(_ns1__getCS8Compatibility); ((_ns1__getCS8Compatibility*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getCS8Compatibility[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getCS8Compatibility); for (int i = 0; i < n; i++) ((_ns1__getCS8Compatibility*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getCS8Compatibility*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getCS8Compatibility(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getCS8Compatibility %p -> %p\n", q, p)); *(_ns1__getCS8Compatibility*)p = *(_ns1__getCS8Compatibility*)q; } void _ns1__getControllerParametersResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getControllerParametersResponse::out = NULL; /* transient soap skipped */ } void _ns1__getControllerParametersResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__Parameters(soap, &this->_ns1__getControllerParametersResponse::out); /* transient soap skipped */ } int _ns1__getControllerParametersResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getControllerParametersResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getControllerParametersResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getControllerParametersResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getControllerParametersResponse(struct soap *soap, const char *tag, int id, const _ns1__getControllerParametersResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getControllerParametersResponse), type)) return soap->error; if (soap_out_PointerTons1__Parameters(soap, "out", -1, &(a->_ns1__getControllerParametersResponse::out), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getControllerParametersResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getControllerParametersResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getControllerParametersResponse * SOAP_FMAC4 soap_get__ns1__getControllerParametersResponse(struct soap *soap, _ns1__getControllerParametersResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getControllerParametersResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getControllerParametersResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getControllerParametersResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getControllerParametersResponse * SOAP_FMAC4 soap_in__ns1__getControllerParametersResponse(struct soap *soap, const char *tag, _ns1__getControllerParametersResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getControllerParametersResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getControllerParametersResponse, sizeof(_ns1__getControllerParametersResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getControllerParametersResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getControllerParametersResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_out1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_out1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__Parameters(soap, "out", &(a->_ns1__getControllerParametersResponse::out), "ns1:Parameters")) { soap_flag_out1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getControllerParametersResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getControllerParametersResponse, 0, sizeof(_ns1__getControllerParametersResponse), 0, soap_copy__ns1__getControllerParametersResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_out1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getControllerParametersResponse * SOAP_FMAC4 soap_instantiate__ns1__getControllerParametersResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getControllerParametersResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getControllerParametersResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getControllerParametersResponse; if (size) *size = sizeof(_ns1__getControllerParametersResponse); ((_ns1__getControllerParametersResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getControllerParametersResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getControllerParametersResponse); for (int i = 0; i < n; i++) ((_ns1__getControllerParametersResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getControllerParametersResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getControllerParametersResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getControllerParametersResponse %p -> %p\n", q, p)); *(_ns1__getControllerParametersResponse*)p = *(_ns1__getControllerParametersResponse*)q; } void _ns1__getControllerParameters::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__getControllerParameters::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__getControllerParameters::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getControllerParameters); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getControllerParameters::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getControllerParameters(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getControllerParameters(struct soap *soap, const char *tag, int id, const _ns1__getControllerParameters *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getControllerParameters), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getControllerParameters::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getControllerParameters(soap, this, tag, type); } SOAP_FMAC3 _ns1__getControllerParameters * SOAP_FMAC4 soap_get__ns1__getControllerParameters(struct soap *soap, _ns1__getControllerParameters *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getControllerParameters(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getControllerParameters::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getControllerParameters(soap, tag, this, type); } SOAP_FMAC3 _ns1__getControllerParameters * SOAP_FMAC4 soap_in__ns1__getControllerParameters(struct soap *soap, const char *tag, _ns1__getControllerParameters *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getControllerParameters *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getControllerParameters, sizeof(_ns1__getControllerParameters), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getControllerParameters) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getControllerParameters *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getControllerParameters *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getControllerParameters, 0, sizeof(_ns1__getControllerParameters), 0, soap_copy__ns1__getControllerParameters); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getControllerParameters * SOAP_FMAC4 soap_instantiate__ns1__getControllerParameters(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getControllerParameters(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getControllerParameters, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getControllerParameters; if (size) *size = sizeof(_ns1__getControllerParameters); ((_ns1__getControllerParameters*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getControllerParameters[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getControllerParameters); for (int i = 0; i < n; i++) ((_ns1__getControllerParameters*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getControllerParameters*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getControllerParameters(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getControllerParameters %p -> %p\n", q, p)); *(_ns1__getControllerParameters*)p = *(_ns1__getControllerParameters*)q; } void _ns1__findServerResponse::soap_default(struct soap *soap) { this->soap = soap; soap_default_bool(soap, &this->_ns1__findServerResponse::found); /* transient soap skipped */ } void _ns1__findServerResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__findServerResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__findServerResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__findServerResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__findServerResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__findServerResponse(struct soap *soap, const char *tag, int id, const _ns1__findServerResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__findServerResponse), type)) return soap->error; if (soap_out_bool(soap, "found", -1, &(a->_ns1__findServerResponse::found), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__findServerResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__findServerResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__findServerResponse * SOAP_FMAC4 soap_get__ns1__findServerResponse(struct soap *soap, _ns1__findServerResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__findServerResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__findServerResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__findServerResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__findServerResponse * SOAP_FMAC4 soap_in__ns1__findServerResponse(struct soap *soap, const char *tag, _ns1__findServerResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__findServerResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__findServerResponse, sizeof(_ns1__findServerResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__findServerResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__findServerResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_found1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_found1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_bool(soap, "found", &(a->_ns1__findServerResponse::found), "xsd:boolean")) { soap_flag_found1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__findServerResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__findServerResponse, 0, sizeof(_ns1__findServerResponse), 0, soap_copy__ns1__findServerResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_found1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__findServerResponse * SOAP_FMAC4 soap_instantiate__ns1__findServerResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__findServerResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__findServerResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__findServerResponse; if (size) *size = sizeof(_ns1__findServerResponse); ((_ns1__findServerResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__findServerResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__findServerResponse); for (int i = 0; i < n; i++) ((_ns1__findServerResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__findServerResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__findServerResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__findServerResponse %p -> %p\n", q, p)); *(_ns1__findServerResponse*)p = *(_ns1__findServerResponse*)q; } void _ns1__findServer::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__findServer::serverName = NULL; /* transient soap skipped */ } void _ns1__findServer::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__findServer::serverName); /* transient soap skipped */ } int _ns1__findServer::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__findServer); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__findServer::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__findServer(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__findServer(struct soap *soap, const char *tag, int id, const _ns1__findServer *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__findServer), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "serverName", -1, &(a->_ns1__findServer::serverName), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__findServer::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__findServer(soap, this, tag, type); } SOAP_FMAC3 _ns1__findServer * SOAP_FMAC4 soap_get__ns1__findServer(struct soap *soap, _ns1__findServer *p, const char *tag, const char *type) { if ((p = soap_in__ns1__findServer(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__findServer::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__findServer(soap, tag, this, type); } SOAP_FMAC3 _ns1__findServer * SOAP_FMAC4 soap_in__ns1__findServer(struct soap *soap, const char *tag, _ns1__findServer *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__findServer *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__findServer, sizeof(_ns1__findServer), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__findServer) { soap_revert(soap); *soap->id = '\0'; return (_ns1__findServer *)a->soap_in(soap, tag, type); } } size_t soap_flag_serverName1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_serverName1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "serverName", &(a->_ns1__findServer::serverName), "xsd:string")) { soap_flag_serverName1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__findServer *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__findServer, 0, sizeof(_ns1__findServer), 0, soap_copy__ns1__findServer); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__findServer * SOAP_FMAC4 soap_instantiate__ns1__findServer(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__findServer(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__findServer, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__findServer; if (size) *size = sizeof(_ns1__findServer); ((_ns1__findServer*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__findServer[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__findServer); for (int i = 0; i < n; i++) ((_ns1__findServer*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__findServer*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__findServer(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__findServer %p -> %p\n", q, p)); *(_ns1__findServer*)p = *(_ns1__findServer*)q; } void _ns1__setRobotPosResponse::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__setRobotPosResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__setRobotPosResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__setRobotPosResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__setRobotPosResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__setRobotPosResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__setRobotPosResponse(struct soap *soap, const char *tag, int id, const _ns1__setRobotPosResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__setRobotPosResponse), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__setRobotPosResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__setRobotPosResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__setRobotPosResponse * SOAP_FMAC4 soap_get__ns1__setRobotPosResponse(struct soap *soap, _ns1__setRobotPosResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__setRobotPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__setRobotPosResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__setRobotPosResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__setRobotPosResponse * SOAP_FMAC4 soap_in__ns1__setRobotPosResponse(struct soap *soap, const char *tag, _ns1__setRobotPosResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__setRobotPosResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__setRobotPosResponse, sizeof(_ns1__setRobotPosResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__setRobotPosResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__setRobotPosResponse *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__setRobotPosResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__setRobotPosResponse, 0, sizeof(_ns1__setRobotPosResponse), 0, soap_copy__ns1__setRobotPosResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__setRobotPosResponse * SOAP_FMAC4 soap_instantiate__ns1__setRobotPosResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__setRobotPosResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__setRobotPosResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__setRobotPosResponse; if (size) *size = sizeof(_ns1__setRobotPosResponse); ((_ns1__setRobotPosResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__setRobotPosResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__setRobotPosResponse); for (int i = 0; i < n; i++) ((_ns1__setRobotPosResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__setRobotPosResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__setRobotPosResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__setRobotPosResponse %p -> %p\n", q, p)); *(_ns1__setRobotPosResponse*)p = *(_ns1__setRobotPosResponse*)q; } void _ns1__setRobotJointPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns1__setRobotJointPos::robot); this->_ns1__setRobotJointPos::pos = NULL; /* transient soap skipped */ } void _ns1__setRobotJointPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns1__setRobotJointPos::pos); /* transient soap skipped */ } int _ns1__setRobotJointPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__setRobotJointPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__setRobotJointPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__setRobotJointPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__setRobotJointPos(struct soap *soap, const char *tag, int id, const _ns1__setRobotJointPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__setRobotJointPos), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns1__setRobotJointPos::robot), "")) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "pos", -1, &(a->_ns1__setRobotJointPos::pos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__setRobotJointPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__setRobotJointPos(soap, this, tag, type); } SOAP_FMAC3 _ns1__setRobotJointPos * SOAP_FMAC4 soap_get__ns1__setRobotJointPos(struct soap *soap, _ns1__setRobotJointPos *p, const char *tag, const char *type) { if ((p = soap_in__ns1__setRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__setRobotJointPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__setRobotJointPos(soap, tag, this, type); } SOAP_FMAC3 _ns1__setRobotJointPos * SOAP_FMAC4 soap_in__ns1__setRobotJointPos(struct soap *soap, const char *tag, _ns1__setRobotJointPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__setRobotJointPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__setRobotJointPos, sizeof(_ns1__setRobotJointPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__setRobotJointPos) { soap_revert(soap); *soap->id = '\0'; return (_ns1__setRobotJointPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_pos1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns1__setRobotJointPos::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_pos1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "pos", &(a->_ns1__setRobotJointPos::pos), "ns1:JointPos")) { soap_flag_pos1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__setRobotJointPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__setRobotJointPos, 0, sizeof(_ns1__setRobotJointPos), 0, soap_copy__ns1__setRobotJointPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_pos1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__setRobotJointPos * SOAP_FMAC4 soap_instantiate__ns1__setRobotJointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__setRobotJointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__setRobotJointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__setRobotJointPos; if (size) *size = sizeof(_ns1__setRobotJointPos); ((_ns1__setRobotJointPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__setRobotJointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__setRobotJointPos); for (int i = 0; i < n; i++) ((_ns1__setRobotJointPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__setRobotJointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__setRobotJointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__setRobotJointPos %p -> %p\n", q, p)); *(_ns1__setRobotJointPos*)p = *(_ns1__setRobotJointPos*)q; } void _ns1__getRobotJntCartPosResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getRobotJntCartPosResponse::jntPos = NULL; this->_ns1__getRobotJntCartPosResponse::cartPos = NULL; /* transient soap skipped */ } void _ns1__getRobotJntCartPosResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns1__getRobotJntCartPosResponse::jntPos); soap_serialize_PointerTons1__CartesianPos(soap, &this->_ns1__getRobotJntCartPosResponse::cartPos); /* transient soap skipped */ } int _ns1__getRobotJntCartPosResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobotJntCartPosResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobotJntCartPosResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobotJntCartPosResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobotJntCartPosResponse(struct soap *soap, const char *tag, int id, const _ns1__getRobotJntCartPosResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobotJntCartPosResponse), type)) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "jntPos", -1, &(a->_ns1__getRobotJntCartPosResponse::jntPos), "")) return soap->error; if (soap_out_PointerTons1__CartesianPos(soap, "cartPos", -1, &(a->_ns1__getRobotJntCartPosResponse::cartPos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobotJntCartPosResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobotJntCartPosResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobotJntCartPosResponse * SOAP_FMAC4 soap_get__ns1__getRobotJntCartPosResponse(struct soap *soap, _ns1__getRobotJntCartPosResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobotJntCartPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobotJntCartPosResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobotJntCartPosResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobotJntCartPosResponse * SOAP_FMAC4 soap_in__ns1__getRobotJntCartPosResponse(struct soap *soap, const char *tag, _ns1__getRobotJntCartPosResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobotJntCartPosResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobotJntCartPosResponse, sizeof(_ns1__getRobotJntCartPosResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobotJntCartPosResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobotJntCartPosResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_jntPos1 = 1; size_t soap_flag_cartPos1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_jntPos1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "jntPos", &(a->_ns1__getRobotJntCartPosResponse::jntPos), "ns1:JointPos")) { soap_flag_jntPos1--; continue; } if (soap_flag_cartPos1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__CartesianPos(soap, "cartPos", &(a->_ns1__getRobotJntCartPosResponse::cartPos), "ns1:CartesianPos")) { soap_flag_cartPos1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobotJntCartPosResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobotJntCartPosResponse, 0, sizeof(_ns1__getRobotJntCartPosResponse), 0, soap_copy__ns1__getRobotJntCartPosResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_jntPos1 > 0 || soap_flag_cartPos1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getRobotJntCartPosResponse * SOAP_FMAC4 soap_instantiate__ns1__getRobotJntCartPosResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobotJntCartPosResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobotJntCartPosResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobotJntCartPosResponse; if (size) *size = sizeof(_ns1__getRobotJntCartPosResponse); ((_ns1__getRobotJntCartPosResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobotJntCartPosResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobotJntCartPosResponse); for (int i = 0; i < n; i++) ((_ns1__getRobotJntCartPosResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobotJntCartPosResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobotJntCartPosResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobotJntCartPosResponse %p -> %p\n", q, p)); *(_ns1__getRobotJntCartPosResponse*)p = *(_ns1__getRobotJntCartPosResponse*)q; } void _ns1__getRobotJntCartPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns1__getRobotJntCartPos::robot); this->_ns1__getRobotJntCartPos::tool = NULL; this->_ns1__getRobotJntCartPos::frame = NULL; /* transient soap skipped */ } void _ns1__getRobotJntCartPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__CartesianPos(soap, &this->_ns1__getRobotJntCartPos::tool); soap_serialize_PointerTons1__CartesianPos(soap, &this->_ns1__getRobotJntCartPos::frame); /* transient soap skipped */ } int _ns1__getRobotJntCartPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobotJntCartPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobotJntCartPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobotJntCartPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobotJntCartPos(struct soap *soap, const char *tag, int id, const _ns1__getRobotJntCartPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobotJntCartPos), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns1__getRobotJntCartPos::robot), "")) return soap->error; if (soap_out_PointerTons1__CartesianPos(soap, "tool", -1, &(a->_ns1__getRobotJntCartPos::tool), "")) return soap->error; if (soap_out_PointerTons1__CartesianPos(soap, "frame", -1, &(a->_ns1__getRobotJntCartPos::frame), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobotJntCartPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobotJntCartPos(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobotJntCartPos * SOAP_FMAC4 soap_get__ns1__getRobotJntCartPos(struct soap *soap, _ns1__getRobotJntCartPos *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobotJntCartPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobotJntCartPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobotJntCartPos(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobotJntCartPos * SOAP_FMAC4 soap_in__ns1__getRobotJntCartPos(struct soap *soap, const char *tag, _ns1__getRobotJntCartPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobotJntCartPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobotJntCartPos, sizeof(_ns1__getRobotJntCartPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobotJntCartPos) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobotJntCartPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; size_t soap_flag_tool1 = 1; size_t soap_flag_frame1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns1__getRobotJntCartPos::robot), "xsd:int")) { soap_flag_robot1--; continue; } if (soap_flag_tool1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__CartesianPos(soap, "tool", &(a->_ns1__getRobotJntCartPos::tool), "ns1:CartesianPos")) { soap_flag_tool1--; continue; } if (soap_flag_frame1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__CartesianPos(soap, "frame", &(a->_ns1__getRobotJntCartPos::frame), "ns1:CartesianPos")) { soap_flag_frame1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobotJntCartPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobotJntCartPos, 0, sizeof(_ns1__getRobotJntCartPos), 0, soap_copy__ns1__getRobotJntCartPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0 || soap_flag_tool1 > 0 || soap_flag_frame1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getRobotJntCartPos * SOAP_FMAC4 soap_instantiate__ns1__getRobotJntCartPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobotJntCartPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobotJntCartPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobotJntCartPos; if (size) *size = sizeof(_ns1__getRobotJntCartPos); ((_ns1__getRobotJntCartPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobotJntCartPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobotJntCartPos); for (int i = 0; i < n; i++) ((_ns1__getRobotJntCartPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobotJntCartPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobotJntCartPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobotJntCartPos %p -> %p\n", q, p)); *(_ns1__getRobotJntCartPos*)p = *(_ns1__getRobotJntCartPos*)q; } void _ns1__getRobotJointPosResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getRobotJointPosResponse::pos = NULL; /* transient soap skipped */ } void _ns1__getRobotJointPosResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__JointPos(soap, &this->_ns1__getRobotJointPosResponse::pos); /* transient soap skipped */ } int _ns1__getRobotJointPosResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobotJointPosResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobotJointPosResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobotJointPosResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobotJointPosResponse(struct soap *soap, const char *tag, int id, const _ns1__getRobotJointPosResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobotJointPosResponse), type)) return soap->error; if (soap_out_PointerTons1__JointPos(soap, "pos", -1, &(a->_ns1__getRobotJointPosResponse::pos), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobotJointPosResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobotJointPosResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobotJointPosResponse * SOAP_FMAC4 soap_get__ns1__getRobotJointPosResponse(struct soap *soap, _ns1__getRobotJointPosResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobotJointPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobotJointPosResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobotJointPosResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobotJointPosResponse * SOAP_FMAC4 soap_in__ns1__getRobotJointPosResponse(struct soap *soap, const char *tag, _ns1__getRobotJointPosResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobotJointPosResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobotJointPosResponse, sizeof(_ns1__getRobotJointPosResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobotJointPosResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobotJointPosResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_pos1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_pos1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__JointPos(soap, "pos", &(a->_ns1__getRobotJointPosResponse::pos), "ns1:JointPos")) { soap_flag_pos1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobotJointPosResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobotJointPosResponse, 0, sizeof(_ns1__getRobotJointPosResponse), 0, soap_copy__ns1__getRobotJointPosResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_pos1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getRobotJointPosResponse * SOAP_FMAC4 soap_instantiate__ns1__getRobotJointPosResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobotJointPosResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobotJointPosResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobotJointPosResponse; if (size) *size = sizeof(_ns1__getRobotJointPosResponse); ((_ns1__getRobotJointPosResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobotJointPosResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobotJointPosResponse); for (int i = 0; i < n; i++) ((_ns1__getRobotJointPosResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobotJointPosResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobotJointPosResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobotJointPosResponse %p -> %p\n", q, p)); *(_ns1__getRobotJointPosResponse*)p = *(_ns1__getRobotJointPosResponse*)q; } void _ns1__getRobotJointPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_int(soap, &this->_ns1__getRobotJointPos::robot); /* transient soap skipped */ } void _ns1__getRobotJointPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__getRobotJointPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobotJointPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobotJointPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobotJointPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobotJointPos(struct soap *soap, const char *tag, int id, const _ns1__getRobotJointPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobotJointPos), type)) return soap->error; if (soap_out_int(soap, "robot", -1, &(a->_ns1__getRobotJointPos::robot), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobotJointPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobotJointPos(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobotJointPos * SOAP_FMAC4 soap_get__ns1__getRobotJointPos(struct soap *soap, _ns1__getRobotJointPos *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobotJointPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobotJointPos(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobotJointPos * SOAP_FMAC4 soap_in__ns1__getRobotJointPos(struct soap *soap, const char *tag, _ns1__getRobotJointPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobotJointPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobotJointPos, sizeof(_ns1__getRobotJointPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobotJointPos) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobotJointPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_robot1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_robot1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_int(soap, "robot", &(a->_ns1__getRobotJointPos::robot), "xsd:int")) { soap_flag_robot1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobotJointPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobotJointPos, 0, sizeof(_ns1__getRobotJointPos), 0, soap_copy__ns1__getRobotJointPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_robot1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getRobotJointPos * SOAP_FMAC4 soap_instantiate__ns1__getRobotJointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobotJointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobotJointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobotJointPos; if (size) *size = sizeof(_ns1__getRobotJointPos); ((_ns1__getRobotJointPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobotJointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobotJointPos); for (int i = 0; i < n; i++) ((_ns1__getRobotJointPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobotJointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobotJointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobotJointPos %p -> %p\n", q, p)); *(_ns1__getRobotJointPos*)p = *(_ns1__getRobotJointPos*)q; } void _ns1__getRobotsResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getRobotsResponse::out = NULL; /* transient soap skipped */ } void _ns1__getRobotsResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__Robots(soap, &this->_ns1__getRobotsResponse::out); /* transient soap skipped */ } int _ns1__getRobotsResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobotsResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobotsResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobotsResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobotsResponse(struct soap *soap, const char *tag, int id, const _ns1__getRobotsResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobotsResponse), type)) return soap->error; if (soap_out_PointerTons1__Robots(soap, "out", -1, &(a->_ns1__getRobotsResponse::out), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobotsResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobotsResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobotsResponse * SOAP_FMAC4 soap_get__ns1__getRobotsResponse(struct soap *soap, _ns1__getRobotsResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobotsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobotsResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobotsResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobotsResponse * SOAP_FMAC4 soap_in__ns1__getRobotsResponse(struct soap *soap, const char *tag, _ns1__getRobotsResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobotsResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobotsResponse, sizeof(_ns1__getRobotsResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobotsResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobotsResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_out1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_out1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__Robots(soap, "out", &(a->_ns1__getRobotsResponse::out), "ns1:Robots")) { soap_flag_out1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobotsResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobotsResponse, 0, sizeof(_ns1__getRobotsResponse), 0, soap_copy__ns1__getRobotsResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_out1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getRobotsResponse * SOAP_FMAC4 soap_instantiate__ns1__getRobotsResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobotsResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobotsResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobotsResponse; if (size) *size = sizeof(_ns1__getRobotsResponse); ((_ns1__getRobotsResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobotsResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobotsResponse); for (int i = 0; i < n; i++) ((_ns1__getRobotsResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobotsResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobotsResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobotsResponse %p -> %p\n", q, p)); *(_ns1__getRobotsResponse*)p = *(_ns1__getRobotsResponse*)q; } void _ns1__getRobots::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__getRobots::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__getRobots::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getRobots); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getRobots::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getRobots(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getRobots(struct soap *soap, const char *tag, int id, const _ns1__getRobots *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getRobots), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getRobots::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getRobots(soap, this, tag, type); } SOAP_FMAC3 _ns1__getRobots * SOAP_FMAC4 soap_get__ns1__getRobots(struct soap *soap, _ns1__getRobots *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getRobots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getRobots::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getRobots(soap, tag, this, type); } SOAP_FMAC3 _ns1__getRobots * SOAP_FMAC4 soap_in__ns1__getRobots(struct soap *soap, const char *tag, _ns1__getRobots *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getRobots *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getRobots, sizeof(_ns1__getRobots), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getRobots) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getRobots *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getRobots *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getRobots, 0, sizeof(_ns1__getRobots), 0, soap_copy__ns1__getRobots); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getRobots * SOAP_FMAC4 soap_instantiate__ns1__getRobots(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getRobots(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getRobots, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getRobots; if (size) *size = sizeof(_ns1__getRobots); ((_ns1__getRobots*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getRobots[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getRobots); for (int i = 0; i < n; i++) ((_ns1__getRobots*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getRobots*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getRobots(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getRobots %p -> %p\n", q, p)); *(_ns1__getRobots*)p = *(_ns1__getRobots*)q; } void _ns1__logoutResponse::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__logoutResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__logoutResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__logoutResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__logoutResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__logoutResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__logoutResponse(struct soap *soap, const char *tag, int id, const _ns1__logoutResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__logoutResponse), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__logoutResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__logoutResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__logoutResponse * SOAP_FMAC4 soap_get__ns1__logoutResponse(struct soap *soap, _ns1__logoutResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__logoutResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__logoutResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__logoutResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__logoutResponse * SOAP_FMAC4 soap_in__ns1__logoutResponse(struct soap *soap, const char *tag, _ns1__logoutResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__logoutResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__logoutResponse, sizeof(_ns1__logoutResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__logoutResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__logoutResponse *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__logoutResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__logoutResponse, 0, sizeof(_ns1__logoutResponse), 0, soap_copy__ns1__logoutResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__logoutResponse * SOAP_FMAC4 soap_instantiate__ns1__logoutResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__logoutResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__logoutResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__logoutResponse; if (size) *size = sizeof(_ns1__logoutResponse); ((_ns1__logoutResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__logoutResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__logoutResponse); for (int i = 0; i < n; i++) ((_ns1__logoutResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__logoutResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__logoutResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__logoutResponse %p -> %p\n", q, p)); *(_ns1__logoutResponse*)p = *(_ns1__logoutResponse*)q; } void _ns1__logout::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__logout::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__logout::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__logout); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__logout::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__logout(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__logout(struct soap *soap, const char *tag, int id, const _ns1__logout *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__logout), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__logout::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__logout(soap, this, tag, type); } SOAP_FMAC3 _ns1__logout * SOAP_FMAC4 soap_get__ns1__logout(struct soap *soap, _ns1__logout *p, const char *tag, const char *type) { if ((p = soap_in__ns1__logout(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__logout::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__logout(soap, tag, this, type); } SOAP_FMAC3 _ns1__logout * SOAP_FMAC4 soap_in__ns1__logout(struct soap *soap, const char *tag, _ns1__logout *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__logout *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__logout, sizeof(_ns1__logout), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__logout) { soap_revert(soap); *soap->id = '\0'; return (_ns1__logout *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__logout *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__logout, 0, sizeof(_ns1__logout), 0, soap_copy__ns1__logout); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__logout * SOAP_FMAC4 soap_instantiate__ns1__logout(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__logout(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__logout, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__logout; if (size) *size = sizeof(_ns1__logout); ((_ns1__logout*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__logout[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__logout); for (int i = 0; i < n; i++) ((_ns1__logout*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__logout*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__logout(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__logout %p -> %p\n", q, p)); *(_ns1__logout*)p = *(_ns1__logout*)q; } void _ns1__loginResponse::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns1__SessionId(soap, &this->_ns1__loginResponse::sid); /* transient soap skipped */ } void _ns1__loginResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_embedded(soap, &this->_ns1__loginResponse::sid, SOAP_TYPE_ns1__SessionId); /* transient soap skipped */ } int _ns1__loginResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__loginResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__loginResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__loginResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__loginResponse(struct soap *soap, const char *tag, int id, const _ns1__loginResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__loginResponse), type)) return soap->error; if (soap_out_ns1__SessionId(soap, "sid", -1, &(a->_ns1__loginResponse::sid), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__loginResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__loginResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__loginResponse * SOAP_FMAC4 soap_get__ns1__loginResponse(struct soap *soap, _ns1__loginResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__loginResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__loginResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__loginResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__loginResponse * SOAP_FMAC4 soap_in__ns1__loginResponse(struct soap *soap, const char *tag, _ns1__loginResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__loginResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__loginResponse, sizeof(_ns1__loginResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__loginResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__loginResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_sid1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_sid1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__SessionId(soap, "sid", &(a->_ns1__loginResponse::sid), "ns1:SessionId")) { soap_flag_sid1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__loginResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__loginResponse, 0, sizeof(_ns1__loginResponse), 0, soap_copy__ns1__loginResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_sid1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__loginResponse * SOAP_FMAC4 soap_instantiate__ns1__loginResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__loginResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__loginResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__loginResponse; if (size) *size = sizeof(_ns1__loginResponse); ((_ns1__loginResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__loginResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__loginResponse); for (int i = 0; i < n; i++) ((_ns1__loginResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__loginResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__loginResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__loginResponse %p -> %p\n", q, p)); *(_ns1__loginResponse*)p = *(_ns1__loginResponse*)q; } void _ns1__login::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__login::user = NULL; this->_ns1__login::pwd = NULL; /* transient soap skipped */ } void _ns1__login::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__login::user); soap_serialize_PointerTostd__string(soap, &this->_ns1__login::pwd); /* transient soap skipped */ } int _ns1__login::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__login); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__login::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__login(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__login(struct soap *soap, const char *tag, int id, const _ns1__login *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__login), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "user", -1, &(a->_ns1__login::user), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "pwd", -1, &(a->_ns1__login::pwd), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__login::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__login(soap, this, tag, type); } SOAP_FMAC3 _ns1__login * SOAP_FMAC4 soap_get__ns1__login(struct soap *soap, _ns1__login *p, const char *tag, const char *type) { if ((p = soap_in__ns1__login(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__login::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__login(soap, tag, this, type); } SOAP_FMAC3 _ns1__login * SOAP_FMAC4 soap_in__ns1__login(struct soap *soap, const char *tag, _ns1__login *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__login *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__login, sizeof(_ns1__login), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__login) { soap_revert(soap); *soap->id = '\0'; return (_ns1__login *)a->soap_in(soap, tag, type); } } size_t soap_flag_user1 = 1; size_t soap_flag_pwd1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_user1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "user", &(a->_ns1__login::user), "xsd:string")) { soap_flag_user1--; continue; } if (soap_flag_pwd1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "pwd", &(a->_ns1__login::pwd), "xsd:string")) { soap_flag_pwd1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__login *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__login, 0, sizeof(_ns1__login), 0, soap_copy__ns1__login); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__login * SOAP_FMAC4 soap_instantiate__ns1__login(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__login(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__login, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__login; if (size) *size = sizeof(_ns1__login); ((_ns1__login*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__login[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__login); for (int i = 0; i < n; i++) ((_ns1__login*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__login*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__login(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__login %p -> %p\n", q, p)); *(_ns1__login*)p = *(_ns1__login*)q; } void _ns1__getCS8VersionsResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getCS8VersionsResponse::out = NULL; /* transient soap skipped */ } void _ns1__getCS8VersionsResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__Versions(soap, &this->_ns1__getCS8VersionsResponse::out); /* transient soap skipped */ } int _ns1__getCS8VersionsResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getCS8VersionsResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getCS8VersionsResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getCS8VersionsResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getCS8VersionsResponse(struct soap *soap, const char *tag, int id, const _ns1__getCS8VersionsResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getCS8VersionsResponse), type)) return soap->error; if (soap_out_PointerTons1__Versions(soap, "out", -1, &(a->_ns1__getCS8VersionsResponse::out), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getCS8VersionsResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getCS8VersionsResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getCS8VersionsResponse * SOAP_FMAC4 soap_get__ns1__getCS8VersionsResponse(struct soap *soap, _ns1__getCS8VersionsResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getCS8VersionsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getCS8VersionsResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getCS8VersionsResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getCS8VersionsResponse * SOAP_FMAC4 soap_in__ns1__getCS8VersionsResponse(struct soap *soap, const char *tag, _ns1__getCS8VersionsResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getCS8VersionsResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getCS8VersionsResponse, sizeof(_ns1__getCS8VersionsResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getCS8VersionsResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getCS8VersionsResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_out1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_out1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__Versions(soap, "out", &(a->_ns1__getCS8VersionsResponse::out), "ns1:Versions")) { soap_flag_out1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getCS8VersionsResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getCS8VersionsResponse, 0, sizeof(_ns1__getCS8VersionsResponse), 0, soap_copy__ns1__getCS8VersionsResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_out1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getCS8VersionsResponse * SOAP_FMAC4 soap_instantiate__ns1__getCS8VersionsResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getCS8VersionsResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getCS8VersionsResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getCS8VersionsResponse; if (size) *size = sizeof(_ns1__getCS8VersionsResponse); ((_ns1__getCS8VersionsResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getCS8VersionsResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getCS8VersionsResponse); for (int i = 0; i < n; i++) ((_ns1__getCS8VersionsResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getCS8VersionsResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getCS8VersionsResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getCS8VersionsResponse %p -> %p\n", q, p)); *(_ns1__getCS8VersionsResponse*)p = *(_ns1__getCS8VersionsResponse*)q; } void _ns1__getCS8Versions::soap_default(struct soap *soap) { this->soap = soap; /* transient soap skipped */ } void _ns1__getCS8Versions::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int _ns1__getCS8Versions::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getCS8Versions); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getCS8Versions::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getCS8Versions(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getCS8Versions(struct soap *soap, const char *tag, int id, const _ns1__getCS8Versions *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getCS8Versions), type)) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getCS8Versions::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getCS8Versions(soap, this, tag, type); } SOAP_FMAC3 _ns1__getCS8Versions * SOAP_FMAC4 soap_get__ns1__getCS8Versions(struct soap *soap, _ns1__getCS8Versions *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getCS8Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getCS8Versions::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getCS8Versions(soap, tag, this, type); } SOAP_FMAC3 _ns1__getCS8Versions * SOAP_FMAC4 soap_in__ns1__getCS8Versions(struct soap *soap, const char *tag, _ns1__getCS8Versions *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getCS8Versions *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getCS8Versions, sizeof(_ns1__getCS8Versions), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getCS8Versions) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getCS8Versions *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getCS8Versions *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getCS8Versions, 0, sizeof(_ns1__getCS8Versions), 0, soap_copy__ns1__getCS8Versions); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getCS8Versions * SOAP_FMAC4 soap_instantiate__ns1__getCS8Versions(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getCS8Versions(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getCS8Versions, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getCS8Versions; if (size) *size = sizeof(_ns1__getCS8Versions); ((_ns1__getCS8Versions*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getCS8Versions[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getCS8Versions); for (int i = 0; i < n; i++) ((_ns1__getCS8Versions*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getCS8Versions*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getCS8Versions(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getCS8Versions %p -> %p\n", q, p)); *(_ns1__getCS8Versions*)p = *(_ns1__getCS8Versions*)q; } void _ns1__pingResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__pingResponse::message = NULL; /* transient soap skipped */ } void _ns1__pingResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__pingResponse::message); /* transient soap skipped */ } int _ns1__pingResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__pingResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__pingResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__pingResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__pingResponse(struct soap *soap, const char *tag, int id, const _ns1__pingResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__pingResponse), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "message", -1, &(a->_ns1__pingResponse::message), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__pingResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__pingResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__pingResponse * SOAP_FMAC4 soap_get__ns1__pingResponse(struct soap *soap, _ns1__pingResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__pingResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__pingResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__pingResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__pingResponse * SOAP_FMAC4 soap_in__ns1__pingResponse(struct soap *soap, const char *tag, _ns1__pingResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__pingResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__pingResponse, sizeof(_ns1__pingResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__pingResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__pingResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_message1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_message1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "message", &(a->_ns1__pingResponse::message), "xsd:string")) { soap_flag_message1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__pingResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__pingResponse, 0, sizeof(_ns1__pingResponse), 0, soap_copy__ns1__pingResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__pingResponse * SOAP_FMAC4 soap_instantiate__ns1__pingResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__pingResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__pingResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__pingResponse; if (size) *size = sizeof(_ns1__pingResponse); ((_ns1__pingResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__pingResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__pingResponse); for (int i = 0; i < n; i++) ((_ns1__pingResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__pingResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__pingResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__pingResponse %p -> %p\n", q, p)); *(_ns1__pingResponse*)p = *(_ns1__pingResponse*)q; } void _ns1__ping::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__ping::message = NULL; /* transient soap skipped */ } void _ns1__ping::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__ping::message); /* transient soap skipped */ } int _ns1__ping::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__ping); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__ping::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__ping(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__ping(struct soap *soap, const char *tag, int id, const _ns1__ping *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__ping), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "message", -1, &(a->_ns1__ping::message), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__ping::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__ping(soap, this, tag, type); } SOAP_FMAC3 _ns1__ping * SOAP_FMAC4 soap_get__ns1__ping(struct soap *soap, _ns1__ping *p, const char *tag, const char *type) { if ((p = soap_in__ns1__ping(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__ping::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__ping(soap, tag, this, type); } SOAP_FMAC3 _ns1__ping * SOAP_FMAC4 soap_in__ns1__ping(struct soap *soap, const char *tag, _ns1__ping *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__ping *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__ping, sizeof(_ns1__ping), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__ping) { soap_revert(soap); *soap->id = '\0'; return (_ns1__ping *)a->soap_in(soap, tag, type); } } size_t soap_flag_message1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_message1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "message", &(a->_ns1__ping::message), "xsd:string")) { soap_flag_message1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__ping *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__ping, 0, sizeof(_ns1__ping), 0, soap_copy__ns1__ping); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__ping * SOAP_FMAC4 soap_instantiate__ns1__ping(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__ping(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__ping, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__ping; if (size) *size = sizeof(_ns1__ping); ((_ns1__ping*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__ping[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__ping); for (int i = 0; i < n; i++) ((_ns1__ping*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__ping*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__ping(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__ping %p -> %p\n", q, p)); *(_ns1__ping*)p = *(_ns1__ping*)q; } void _ns1__getSoapServerVersionResponse::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getSoapServerVersionResponse::server = NULL; /* transient soap skipped */ } void _ns1__getSoapServerVersionResponse::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTons1__SoapServerVersion(soap, &this->_ns1__getSoapServerVersionResponse::server); /* transient soap skipped */ } int _ns1__getSoapServerVersionResponse::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getSoapServerVersionResponse); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getSoapServerVersionResponse::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getSoapServerVersionResponse(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getSoapServerVersionResponse(struct soap *soap, const char *tag, int id, const _ns1__getSoapServerVersionResponse *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getSoapServerVersionResponse), type)) return soap->error; if (soap_out_PointerTons1__SoapServerVersion(soap, "server", -1, &(a->_ns1__getSoapServerVersionResponse::server), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getSoapServerVersionResponse::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getSoapServerVersionResponse(soap, this, tag, type); } SOAP_FMAC3 _ns1__getSoapServerVersionResponse * SOAP_FMAC4 soap_get__ns1__getSoapServerVersionResponse(struct soap *soap, _ns1__getSoapServerVersionResponse *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getSoapServerVersionResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getSoapServerVersionResponse::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getSoapServerVersionResponse(soap, tag, this, type); } SOAP_FMAC3 _ns1__getSoapServerVersionResponse * SOAP_FMAC4 soap_in__ns1__getSoapServerVersionResponse(struct soap *soap, const char *tag, _ns1__getSoapServerVersionResponse *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getSoapServerVersionResponse *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getSoapServerVersionResponse, sizeof(_ns1__getSoapServerVersionResponse), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getSoapServerVersionResponse) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getSoapServerVersionResponse *)a->soap_in(soap, tag, type); } } size_t soap_flag_server1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_server1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__SoapServerVersion(soap, "server", &(a->_ns1__getSoapServerVersionResponse::server), "ns1:SoapServerVersion")) { soap_flag_server1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getSoapServerVersionResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getSoapServerVersionResponse, 0, sizeof(_ns1__getSoapServerVersionResponse), 0, soap_copy__ns1__getSoapServerVersionResponse); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_server1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 _ns1__getSoapServerVersionResponse * SOAP_FMAC4 soap_instantiate__ns1__getSoapServerVersionResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getSoapServerVersionResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getSoapServerVersionResponse, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getSoapServerVersionResponse; if (size) *size = sizeof(_ns1__getSoapServerVersionResponse); ((_ns1__getSoapServerVersionResponse*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getSoapServerVersionResponse[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getSoapServerVersionResponse); for (int i = 0; i < n; i++) ((_ns1__getSoapServerVersionResponse*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getSoapServerVersionResponse*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getSoapServerVersionResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getSoapServerVersionResponse %p -> %p\n", q, p)); *(_ns1__getSoapServerVersionResponse*)p = *(_ns1__getSoapServerVersionResponse*)q; } void _ns1__getSoapServerVersion::soap_default(struct soap *soap) { this->soap = soap; this->_ns1__getSoapServerVersion::cltName = NULL; this->_ns1__getSoapServerVersion::cltVersion = NULL; /* transient soap skipped */ } void _ns1__getSoapServerVersion::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->_ns1__getSoapServerVersion::cltName); soap_serialize_PointerTostd__string(soap, &this->_ns1__getSoapServerVersion::cltVersion); /* transient soap skipped */ } int _ns1__getSoapServerVersion::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE__ns1__getSoapServerVersion); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int _ns1__getSoapServerVersion::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out__ns1__getSoapServerVersion(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__getSoapServerVersion(struct soap *soap, const char *tag, int id, const _ns1__getSoapServerVersion *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns1__getSoapServerVersion), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "cltName", -1, &(a->_ns1__getSoapServerVersion::cltName), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "cltVersion", -1, &(a->_ns1__getSoapServerVersion::cltVersion), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *_ns1__getSoapServerVersion::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get__ns1__getSoapServerVersion(soap, this, tag, type); } SOAP_FMAC3 _ns1__getSoapServerVersion * SOAP_FMAC4 soap_get__ns1__getSoapServerVersion(struct soap *soap, _ns1__getSoapServerVersion *p, const char *tag, const char *type) { if ((p = soap_in__ns1__getSoapServerVersion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *_ns1__getSoapServerVersion::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in__ns1__getSoapServerVersion(soap, tag, this, type); } SOAP_FMAC3 _ns1__getSoapServerVersion * SOAP_FMAC4 soap_in__ns1__getSoapServerVersion(struct soap *soap, const char *tag, _ns1__getSoapServerVersion *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (_ns1__getSoapServerVersion *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE__ns1__getSoapServerVersion, sizeof(_ns1__getSoapServerVersion), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE__ns1__getSoapServerVersion) { soap_revert(soap); *soap->id = '\0'; return (_ns1__getSoapServerVersion *)a->soap_in(soap, tag, type); } } size_t soap_flag_cltName1 = 1; size_t soap_flag_cltVersion1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_cltName1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "cltName", &(a->_ns1__getSoapServerVersion::cltName), "xsd:string")) { soap_flag_cltName1--; continue; } if (soap_flag_cltVersion1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "cltVersion", &(a->_ns1__getSoapServerVersion::cltVersion), "xsd:string")) { soap_flag_cltVersion1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (_ns1__getSoapServerVersion *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE__ns1__getSoapServerVersion, 0, sizeof(_ns1__getSoapServerVersion), 0, soap_copy__ns1__getSoapServerVersion); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 _ns1__getSoapServerVersion * SOAP_FMAC4 soap_instantiate__ns1__getSoapServerVersion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate__ns1__getSoapServerVersion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE__ns1__getSoapServerVersion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new _ns1__getSoapServerVersion; if (size) *size = sizeof(_ns1__getSoapServerVersion); ((_ns1__getSoapServerVersion*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new _ns1__getSoapServerVersion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(_ns1__getSoapServerVersion); for (int i = 0; i < n; i++) ((_ns1__getSoapServerVersion*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (_ns1__getSoapServerVersion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy__ns1__getSoapServerVersion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying _ns1__getSoapServerVersion %p -> %p\n", q, p)); *(_ns1__getSoapServerVersion*)p = *(_ns1__getSoapServerVersion*)q; } void ns1__Parameters::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Parameter(soap, &this->ns1__Parameters::Parameters); /* transient soap skipped */ } void ns1__Parameters::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Parameter(soap, &this->ns1__Parameters::Parameters); /* transient soap skipped */ } int ns1__Parameters::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Parameters); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Parameters::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Parameters(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Parameters(struct soap *soap, const char *tag, int id, const ns1__Parameters *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Parameters), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Parameter(soap, "Parameters", -1, &(a->ns1__Parameters::Parameters), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Parameters::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Parameters(soap, this, tag, type); } SOAP_FMAC3 ns1__Parameters * SOAP_FMAC4 soap_get_ns1__Parameters(struct soap *soap, ns1__Parameters *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Parameters(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Parameters::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Parameters(soap, tag, this, type); } SOAP_FMAC3 ns1__Parameters * SOAP_FMAC4 soap_in_ns1__Parameters(struct soap *soap, const char *tag, ns1__Parameters *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Parameters *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Parameters, sizeof(ns1__Parameters), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Parameters) { soap_revert(soap); *soap->id = '\0'; return (ns1__Parameters *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Parameter(soap, "Parameters", &(a->ns1__Parameters::Parameters), "ns1:Parameter")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Parameters *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Parameters, 0, sizeof(ns1__Parameters), 0, soap_copy_ns1__Parameters); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__Parameters * SOAP_FMAC4 soap_instantiate_ns1__Parameters(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Parameters(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Parameters, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Parameters; if (size) *size = sizeof(ns1__Parameters); ((ns1__Parameters*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Parameters[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Parameters); for (int i = 0; i < n; i++) ((ns1__Parameters*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Parameters*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Parameters(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Parameters %p -> %p\n", q, p)); *(ns1__Parameters*)p = *(ns1__Parameters*)q; } void ns1__Parameter::soap_default(struct soap *soap) { this->soap = soap; this->ns1__Parameter::key = NULL; this->ns1__Parameter::name = NULL; this->ns1__Parameter::value = NULL; /* transient soap skipped */ } void ns1__Parameter::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->ns1__Parameter::key); soap_serialize_PointerTostd__string(soap, &this->ns1__Parameter::name); soap_serialize_PointerTostd__string(soap, &this->ns1__Parameter::value); /* transient soap skipped */ } int ns1__Parameter::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Parameter); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Parameter::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Parameter(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Parameter(struct soap *soap, const char *tag, int id, const ns1__Parameter *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Parameter), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "key", -1, &(a->ns1__Parameter::key), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "name", -1, &(a->ns1__Parameter::name), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "value", -1, &(a->ns1__Parameter::value), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Parameter::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Parameter(soap, this, tag, type); } SOAP_FMAC3 ns1__Parameter * SOAP_FMAC4 soap_get_ns1__Parameter(struct soap *soap, ns1__Parameter *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Parameter(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Parameter::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Parameter(soap, tag, this, type); } SOAP_FMAC3 ns1__Parameter * SOAP_FMAC4 soap_in_ns1__Parameter(struct soap *soap, const char *tag, ns1__Parameter *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Parameter *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Parameter, sizeof(ns1__Parameter), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Parameter) { soap_revert(soap); *soap->id = '\0'; return (ns1__Parameter *)a->soap_in(soap, tag, type); } } size_t soap_flag_key1 = 1; size_t soap_flag_name1 = 1; size_t soap_flag_value1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_key1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "key", &(a->ns1__Parameter::key), "xsd:string")) { soap_flag_key1--; continue; } if (soap_flag_name1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "name", &(a->ns1__Parameter::name), "xsd:string")) { soap_flag_name1--; continue; } if (soap_flag_value1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "value", &(a->ns1__Parameter::value), "xsd:string")) { soap_flag_value1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Parameter *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Parameter, 0, sizeof(ns1__Parameter), 0, soap_copy_ns1__Parameter); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__Parameter * SOAP_FMAC4 soap_instantiate_ns1__Parameter(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Parameter(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Parameter, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Parameter; if (size) *size = sizeof(ns1__Parameter); ((ns1__Parameter*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Parameter[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Parameter); for (int i = 0; i < n; i++) ((ns1__Parameter*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Parameter*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Parameter(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Parameter %p -> %p\n", q, p)); *(ns1__Parameter*)p = *(ns1__Parameter*)q; } void ns1__Robots::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns1__Robots::Robots); /* transient soap skipped */ } void ns1__Robots::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Robot(soap, &this->ns1__Robots::Robots); /* transient soap skipped */ } int ns1__Robots::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Robots); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Robots::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Robots(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Robots(struct soap *soap, const char *tag, int id, const ns1__Robots *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Robots), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", -1, &(a->ns1__Robots::Robots), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Robots::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Robots(soap, this, tag, type); } SOAP_FMAC3 ns1__Robots * SOAP_FMAC4 soap_get_ns1__Robots(struct soap *soap, ns1__Robots *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Robots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Robots::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Robots(soap, tag, this, type); } SOAP_FMAC3 ns1__Robots * SOAP_FMAC4 soap_in_ns1__Robots(struct soap *soap, const char *tag, ns1__Robots *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Robots *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Robots, sizeof(ns1__Robots), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Robots) { soap_revert(soap); *soap->id = '\0'; return (ns1__Robots *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Robot(soap, "Robots", &(a->ns1__Robots::Robots), "ns1:Robot")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Robots *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Robots, 0, sizeof(ns1__Robots), 0, soap_copy_ns1__Robots); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__Robots * SOAP_FMAC4 soap_instantiate_ns1__Robots(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Robots(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Robots, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Robots; if (size) *size = sizeof(ns1__Robots); ((ns1__Robots*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Robots[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Robots); for (int i = 0; i < n; i++) ((ns1__Robots*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Robots*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Robots(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Robots %p -> %p\n", q, p)); *(ns1__Robots*)p = *(ns1__Robots*)q; } void ns1__SoapServerVersion::soap_default(struct soap *soap) { this->soap = soap; this->ns1__SoapServerVersion::version = "1.2"; /* transient soap skipped */ } void ns1__SoapServerVersion::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_embedded(soap, &this->ns1__SoapServerVersion::version, SOAP_TYPE_std__string); soap_serialize_std__string(soap, &this->ns1__SoapServerVersion::version); /* transient soap skipped */ } int ns1__SoapServerVersion::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__SoapServerVersion); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__SoapServerVersion::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__SoapServerVersion(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__SoapServerVersion(struct soap *soap, const char *tag, int id, const ns1__SoapServerVersion *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__SoapServerVersion), type)) return soap->error; if (soap_out_std__string(soap, "version", -1, &(a->ns1__SoapServerVersion::version), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__SoapServerVersion::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__SoapServerVersion(soap, this, tag, type); } SOAP_FMAC3 ns1__SoapServerVersion * SOAP_FMAC4 soap_get_ns1__SoapServerVersion(struct soap *soap, ns1__SoapServerVersion *p, const char *tag, const char *type) { if ((p = soap_in_ns1__SoapServerVersion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__SoapServerVersion::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__SoapServerVersion(soap, tag, this, type); } SOAP_FMAC3 ns1__SoapServerVersion * SOAP_FMAC4 soap_in_ns1__SoapServerVersion(struct soap *soap, const char *tag, ns1__SoapServerVersion *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__SoapServerVersion *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__SoapServerVersion, sizeof(ns1__SoapServerVersion), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__SoapServerVersion) { soap_revert(soap); *soap->id = '\0'; return (ns1__SoapServerVersion *)a->soap_in(soap, tag, type); } } size_t soap_flag_version1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_version1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_std__string(soap, "version", &(a->ns1__SoapServerVersion::version), "xsd:string")) { soap_flag_version1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__SoapServerVersion *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__SoapServerVersion, 0, sizeof(ns1__SoapServerVersion), 0, soap_copy_ns1__SoapServerVersion); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__SoapServerVersion * SOAP_FMAC4 soap_instantiate_ns1__SoapServerVersion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__SoapServerVersion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__SoapServerVersion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__SoapServerVersion; if (size) *size = sizeof(ns1__SoapServerVersion); ((ns1__SoapServerVersion*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__SoapServerVersion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__SoapServerVersion); for (int i = 0; i < n; i++) ((ns1__SoapServerVersion*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__SoapServerVersion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__SoapServerVersion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__SoapServerVersion %p -> %p\n", q, p)); *(ns1__SoapServerVersion*)p = *(ns1__SoapServerVersion*)q; } void ns1__Versions::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns1__Versions::Versions); /* transient soap skipped */ } void ns1__Versions::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfPointerTons1__Version(soap, &this->ns1__Versions::Versions); /* transient soap skipped */ } int ns1__Versions::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Versions); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Versions::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Versions(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Versions(struct soap *soap, const char *tag, int id, const ns1__Versions *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Versions), type)) return soap->error; if (soap_out_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", -1, &(a->ns1__Versions::Versions), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Versions::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Versions(soap, this, tag, type); } SOAP_FMAC3 ns1__Versions * SOAP_FMAC4 soap_get_ns1__Versions(struct soap *soap, ns1__Versions *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Versions::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Versions(soap, tag, this, type); } SOAP_FMAC3 ns1__Versions * SOAP_FMAC4 soap_in_ns1__Versions(struct soap *soap, const char *tag, ns1__Versions *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Versions *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Versions, sizeof(ns1__Versions), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Versions) { soap_revert(soap); *soap->id = '\0'; return (ns1__Versions *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfPointerTons1__Version(soap, "Versions", &(a->ns1__Versions::Versions), "ns1:Version")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Versions *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Versions, 0, sizeof(ns1__Versions), 0, soap_copy_ns1__Versions); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__Versions * SOAP_FMAC4 soap_instantiate_ns1__Versions(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Versions(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Versions, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Versions; if (size) *size = sizeof(ns1__Versions); ((ns1__Versions*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Versions[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Versions); for (int i = 0; i < n; i++) ((ns1__Versions*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Versions*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Versions(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Versions %p -> %p\n", q, p)); *(ns1__Versions*)p = *(ns1__Versions*)q; } void ns1__Version::soap_default(struct soap *soap) { this->soap = soap; this->ns1__Version::name = NULL; this->ns1__Version::version = NULL; /* transient soap skipped */ } void ns1__Version::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->ns1__Version::name); soap_serialize_PointerTostd__string(soap, &this->ns1__Version::version); /* transient soap skipped */ } int ns1__Version::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Version); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Version::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Version(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Version(struct soap *soap, const char *tag, int id, const ns1__Version *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Version), type)) return soap->error; if (soap_out_PointerTostd__string(soap, "name", -1, &(a->ns1__Version::name), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "version", -1, &(a->ns1__Version::version), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Version::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Version(soap, this, tag, type); } SOAP_FMAC3 ns1__Version * SOAP_FMAC4 soap_get_ns1__Version(struct soap *soap, ns1__Version *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Version(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Version::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Version(soap, tag, this, type); } SOAP_FMAC3 ns1__Version * SOAP_FMAC4 soap_in_ns1__Version(struct soap *soap, const char *tag, ns1__Version *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Version *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Version, sizeof(ns1__Version), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Version) { soap_revert(soap); *soap->id = '\0'; return (ns1__Version *)a->soap_in(soap, tag, type); } } size_t soap_flag_name1 = 1; size_t soap_flag_version1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_name1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "name", &(a->ns1__Version::name), "xsd:string")) { soap_flag_name1--; continue; } if (soap_flag_version1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "version", &(a->ns1__Version::version), "xsd:string")) { soap_flag_version1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Version *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Version, 0, sizeof(ns1__Version), 0, soap_copy_ns1__Version); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 ns1__Version * SOAP_FMAC4 soap_instantiate_ns1__Version(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Version(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Version, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Version; if (size) *size = sizeof(ns1__Version); ((ns1__Version*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Version[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Version); for (int i = 0; i < n; i++) ((ns1__Version*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Version*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Version(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Version %p -> %p\n", q, p)); *(ns1__Version*)p = *(ns1__Version*)q; } void ns1__Robot::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns1__Kinematic(soap, &this->ns1__Robot::kinematic); this->ns1__Robot::arm = NULL; this->ns1__Robot::tuning = NULL; soap_default_ns1__MountType(soap, &this->ns1__Robot::mountType); soap_default_ns1__LengthAxis3(soap, &this->ns1__Robot::lengthAxis3); soap_default_ns1__DiameterAxis3(soap, &this->ns1__Robot::diameterAxis3); /* transient soap skipped */ } void ns1__Robot::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->ns1__Robot::arm); soap_serialize_PointerTostd__string(soap, &this->ns1__Robot::tuning); /* transient soap skipped */ } int ns1__Robot::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__Robot); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__Robot::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__Robot(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__Robot(struct soap *soap, const char *tag, int id, const ns1__Robot *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__Robot), type)) return soap->error; if (soap_out_ns1__Kinematic(soap, "kinematic", -1, &(a->ns1__Robot::kinematic), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "arm", -1, &(a->ns1__Robot::arm), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "tuning", -1, &(a->ns1__Robot::tuning), "")) return soap->error; if (soap_out_ns1__MountType(soap, "mountType", -1, &(a->ns1__Robot::mountType), "")) return soap->error; if (soap_out_ns1__LengthAxis3(soap, "lengthAxis3", -1, &(a->ns1__Robot::lengthAxis3), "")) return soap->error; if (soap_out_ns1__DiameterAxis3(soap, "diameterAxis3", -1, &(a->ns1__Robot::diameterAxis3), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__Robot::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__Robot(soap, this, tag, type); } SOAP_FMAC3 ns1__Robot * SOAP_FMAC4 soap_get_ns1__Robot(struct soap *soap, ns1__Robot *p, const char *tag, const char *type) { if ((p = soap_in_ns1__Robot(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__Robot::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__Robot(soap, tag, this, type); } SOAP_FMAC3 ns1__Robot * SOAP_FMAC4 soap_in_ns1__Robot(struct soap *soap, const char *tag, ns1__Robot *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__Robot *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__Robot, sizeof(ns1__Robot), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__Robot) { soap_revert(soap); *soap->id = '\0'; return (ns1__Robot *)a->soap_in(soap, tag, type); } } size_t soap_flag_kinematic1 = 1; size_t soap_flag_arm1 = 1; size_t soap_flag_tuning1 = 1; size_t soap_flag_mountType1 = 1; size_t soap_flag_lengthAxis31 = 1; size_t soap_flag_diameterAxis31 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_kinematic1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__Kinematic(soap, "kinematic", &(a->ns1__Robot::kinematic), "ns1:Kinematic")) { soap_flag_kinematic1--; continue; } if (soap_flag_arm1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "arm", &(a->ns1__Robot::arm), "xsd:string")) { soap_flag_arm1--; continue; } if (soap_flag_tuning1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "tuning", &(a->ns1__Robot::tuning), "xsd:string")) { soap_flag_tuning1--; continue; } if (soap_flag_mountType1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__MountType(soap, "mountType", &(a->ns1__Robot::mountType), "ns1:MountType")) { soap_flag_mountType1--; continue; } if (soap_flag_lengthAxis31 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__LengthAxis3(soap, "lengthAxis3", &(a->ns1__Robot::lengthAxis3), "ns1:LengthAxis3")) { soap_flag_lengthAxis31--; continue; } if (soap_flag_diameterAxis31 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__DiameterAxis3(soap, "diameterAxis3", &(a->ns1__Robot::diameterAxis3), "ns1:DiameterAxis3")) { soap_flag_diameterAxis31--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__Robot *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__Robot, 0, sizeof(ns1__Robot), 0, soap_copy_ns1__Robot); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_kinematic1 > 0 || soap_flag_mountType1 > 0 || soap_flag_lengthAxis31 > 0 || soap_flag_diameterAxis31 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns1__Robot * SOAP_FMAC4 soap_instantiate_ns1__Robot(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__Robot(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__Robot, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__Robot; if (size) *size = sizeof(ns1__Robot); ((ns1__Robot*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__Robot[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__Robot); for (int i = 0; i < n; i++) ((ns1__Robot*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__Robot*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__Robot(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__Robot %p -> %p\n", q, p)); *(ns1__Robot*)p = *(ns1__Robot*)q; } void ns1__CartesianPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_double(soap, &this->ns1__CartesianPos::x); soap_default_double(soap, &this->ns1__CartesianPos::y); soap_default_double(soap, &this->ns1__CartesianPos::z); soap_default_double(soap, &this->ns1__CartesianPos::rx); soap_default_double(soap, &this->ns1__CartesianPos::ry); soap_default_double(soap, &this->ns1__CartesianPos::rz); /* transient soap skipped */ } void ns1__CartesianPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ /* transient soap skipped */ } int ns1__CartesianPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__CartesianPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__CartesianPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__CartesianPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__CartesianPos(struct soap *soap, const char *tag, int id, const ns1__CartesianPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__CartesianPos), type)) return soap->error; if (soap_out_double(soap, "x", -1, &(a->ns1__CartesianPos::x), "")) return soap->error; if (soap_out_double(soap, "y", -1, &(a->ns1__CartesianPos::y), "")) return soap->error; if (soap_out_double(soap, "z", -1, &(a->ns1__CartesianPos::z), "")) return soap->error; if (soap_out_double(soap, "rx", -1, &(a->ns1__CartesianPos::rx), "")) return soap->error; if (soap_out_double(soap, "ry", -1, &(a->ns1__CartesianPos::ry), "")) return soap->error; if (soap_out_double(soap, "rz", -1, &(a->ns1__CartesianPos::rz), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__CartesianPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__CartesianPos(soap, this, tag, type); } SOAP_FMAC3 ns1__CartesianPos * SOAP_FMAC4 soap_get_ns1__CartesianPos(struct soap *soap, ns1__CartesianPos *p, const char *tag, const char *type) { if ((p = soap_in_ns1__CartesianPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__CartesianPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__CartesianPos(soap, tag, this, type); } SOAP_FMAC3 ns1__CartesianPos * SOAP_FMAC4 soap_in_ns1__CartesianPos(struct soap *soap, const char *tag, ns1__CartesianPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__CartesianPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__CartesianPos, sizeof(ns1__CartesianPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__CartesianPos) { soap_revert(soap); *soap->id = '\0'; return (ns1__CartesianPos *)a->soap_in(soap, tag, type); } } size_t soap_flag_x1 = 1; size_t soap_flag_y1 = 1; size_t soap_flag_z1 = 1; size_t soap_flag_rx1 = 1; size_t soap_flag_ry1 = 1; size_t soap_flag_rz1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_x1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "x", &(a->ns1__CartesianPos::x), "xsd:double")) { soap_flag_x1--; continue; } if (soap_flag_y1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "y", &(a->ns1__CartesianPos::y), "xsd:double")) { soap_flag_y1--; continue; } if (soap_flag_z1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "z", &(a->ns1__CartesianPos::z), "xsd:double")) { soap_flag_z1--; continue; } if (soap_flag_rx1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "rx", &(a->ns1__CartesianPos::rx), "xsd:double")) { soap_flag_rx1--; continue; } if (soap_flag_ry1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "ry", &(a->ns1__CartesianPos::ry), "xsd:double")) { soap_flag_ry1--; continue; } if (soap_flag_rz1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_double(soap, "rz", &(a->ns1__CartesianPos::rz), "xsd:double")) { soap_flag_rz1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__CartesianPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__CartesianPos, 0, sizeof(ns1__CartesianPos), 0, soap_copy_ns1__CartesianPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_x1 > 0 || soap_flag_y1 > 0 || soap_flag_z1 > 0 || soap_flag_rx1 > 0 || soap_flag_ry1 > 0 || soap_flag_rz1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns1__CartesianPos * SOAP_FMAC4 soap_instantiate_ns1__CartesianPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__CartesianPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__CartesianPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__CartesianPos; if (size) *size = sizeof(ns1__CartesianPos); ((ns1__CartesianPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__CartesianPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__CartesianPos); for (int i = 0; i < n; i++) ((ns1__CartesianPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__CartesianPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__CartesianPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__CartesianPos %p -> %p\n", q, p)); *(ns1__CartesianPos*)p = *(ns1__CartesianPos*)q; } void ns1__JointPos::soap_default(struct soap *soap) { this->soap = soap; soap_default_std__vectorTemplateOfdouble(soap, &this->ns1__JointPos::item); /* transient soap skipped */ } void ns1__JointPos::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_std__vectorTemplateOfdouble(soap, &this->ns1__JointPos::item); /* transient soap skipped */ } int ns1__JointPos::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__JointPos); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__JointPos::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__JointPos(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__JointPos(struct soap *soap, const char *tag, int id, const ns1__JointPos *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__JointPos), type)) return soap->error; if (soap_out_std__vectorTemplateOfdouble(soap, "item", -1, &(a->ns1__JointPos::item), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__JointPos::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__JointPos(soap, this, tag, type); } SOAP_FMAC3 ns1__JointPos * SOAP_FMAC4 soap_get_ns1__JointPos(struct soap *soap, ns1__JointPos *p, const char *tag, const char *type) { if ((p = soap_in_ns1__JointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__JointPos::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__JointPos(soap, tag, this, type); } SOAP_FMAC3 ns1__JointPos * SOAP_FMAC4 soap_in_ns1__JointPos(struct soap *soap, const char *tag, ns1__JointPos *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__JointPos *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__JointPos, sizeof(ns1__JointPos), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__JointPos) { soap_revert(soap); *soap->id = '\0'; return (ns1__JointPos *)a->soap_in(soap, tag, type); } } if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap->error == SOAP_TAG_MISMATCH) if (soap_in_std__vectorTemplateOfdouble(soap, "item", &(a->ns1__JointPos::item), "xsd:double")) continue; /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__JointPos *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__JointPos, 0, sizeof(ns1__JointPos), 0, soap_copy_ns1__JointPos); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (a->ns1__JointPos::item.size() > 100)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns1__JointPos * SOAP_FMAC4 soap_instantiate_ns1__JointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__JointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__JointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__JointPos; if (size) *size = sizeof(ns1__JointPos); ((ns1__JointPos*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__JointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__JointPos); for (int i = 0; i < n; i++) ((ns1__JointPos*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__JointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__JointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__JointPos %p -> %p\n", q, p)); *(ns1__JointPos*)p = *(ns1__JointPos*)q; } void ns1__ServerException::soap_default(struct soap *soap) { this->soap = soap; soap_default_ns1__ServerExceptionCode(soap, &this->ns1__ServerException::code); this->ns1__ServerException::description = NULL; /* transient soap skipped */ } void ns1__ServerException::soap_serialize(struct soap *soap) const { (void)soap; /* appease -Wall -Werror */ soap_serialize_PointerTostd__string(soap, &this->ns1__ServerException::description); /* transient soap skipped */ } int ns1__ServerException::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, NULL, 0, tag, SOAP_TYPE_ns1__ServerException); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int ns1__ServerException::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_ns1__ServerException(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__ServerException(struct soap *soap, const char *tag, int id, const ns1__ServerException *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__ServerException), type)) return soap->error; if (soap_out_ns1__ServerExceptionCode(soap, "code", -1, &(a->ns1__ServerException::code), "")) return soap->error; if (soap_out_PointerTostd__string(soap, "description", -1, &(a->ns1__ServerException::description), "")) return soap->error; /* transient soap skipped */ return soap_element_end_out(soap, tag); } void *ns1__ServerException::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_ns1__ServerException(soap, this, tag, type); } SOAP_FMAC3 ns1__ServerException * SOAP_FMAC4 soap_get_ns1__ServerException(struct soap *soap, ns1__ServerException *p, const char *tag, const char *type) { if ((p = soap_in_ns1__ServerException(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *ns1__ServerException::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_ns1__ServerException(soap, tag, this, type); } SOAP_FMAC3 ns1__ServerException * SOAP_FMAC4 soap_in_ns1__ServerException(struct soap *soap, const char *tag, ns1__ServerException *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; a = (ns1__ServerException *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__ServerException, sizeof(ns1__ServerException), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) { a->soap_default(soap); if (soap->clist->type != SOAP_TYPE_ns1__ServerException) { soap_revert(soap); *soap->id = '\0'; return (ns1__ServerException *)a->soap_in(soap, tag, type); } } size_t soap_flag_code1 = 1; size_t soap_flag_description1 = 1; if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_code1 && soap->error == SOAP_TAG_MISMATCH) if (soap_in_ns1__ServerExceptionCode(soap, "code", &(a->ns1__ServerException::code), "ns1:ServerExceptionCode")) { soap_flag_code1--; continue; } if (soap_flag_description1 && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_PointerTostd__string(soap, "description", &(a->ns1__ServerException::description), "xsd:string")) { soap_flag_description1--; continue; } /* transient soap skipped */ if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (ns1__ServerException *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__ServerException, 0, sizeof(ns1__ServerException), 0, soap_copy_ns1__ServerException); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_code1 > 0)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 ns1__ServerException * SOAP_FMAC4 soap_instantiate_ns1__ServerException(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__ServerException(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__ServerException, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new ns1__ServerException; if (size) *size = sizeof(ns1__ServerException); ((ns1__ServerException*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new ns1__ServerException[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(ns1__ServerException); for (int i = 0; i < n; i++) ((ns1__ServerException*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (ns1__ServerException*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__ServerException(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying ns1__ServerException %p -> %p\n", q, p)); *(ns1__ServerException*)p = *(ns1__ServerException*)q; } void xsd__hexBinary::soap_default(struct soap *soap) { this->__size = 0; this->__ptr = NULL; } void xsd__hexBinary::soap_serialize(struct soap *soap) const { if (this->__ptr) soap_array_reference(soap, this, (struct soap_array*)&this->__ptr, 1, SOAP_TYPE_xsd__hexBinary); } int xsd__hexBinary::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, (struct soap_array*)&this->__ptr, 1, tag, SOAP_TYPE_xsd__hexBinary); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int xsd__hexBinary::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_xsd__hexBinary(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__hexBinary(struct soap *soap, const char *tag, int id, const xsd__hexBinary *a, const char *type) { id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_xsd__hexBinary); if (id < 0) return soap->error; if (soap_element_begin_out(soap, tag, id, type)) return soap->error; if (soap_puthex(soap, a->__ptr, a->__size)) return soap->error; return soap_element_end_out(soap, tag); } void *xsd__hexBinary::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_xsd__hexBinary(soap, this, tag, type); } SOAP_FMAC3 xsd__hexBinary * SOAP_FMAC4 soap_get_xsd__hexBinary(struct soap *soap, xsd__hexBinary *p, const char *tag, const char *type) { if ((p = soap_in_xsd__hexBinary(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *xsd__hexBinary::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_xsd__hexBinary(soap, tag, this, type); } SOAP_FMAC3 xsd__hexBinary * SOAP_FMAC4 soap_in_xsd__hexBinary(struct soap *soap, const char *tag, xsd__hexBinary *a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":hexBinary")) { soap->error = SOAP_TYPE; return NULL; } a = (xsd__hexBinary *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_xsd__hexBinary, sizeof(xsd__hexBinary), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) a->soap_default(soap); if (soap->body && !*soap->href) { a->__ptr = soap_gethex(soap, &a->__size); if ((!a->__ptr && soap->error) || soap_element_end_in(soap, tag)) return NULL; } else { a = (xsd__hexBinary *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_xsd__hexBinary, 0, sizeof(xsd__hexBinary), 0, soap_copy_xsd__hexBinary); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 xsd__hexBinary * SOAP_FMAC4 soap_instantiate_xsd__hexBinary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_xsd__hexBinary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_xsd__hexBinary, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new xsd__hexBinary; if (size) *size = sizeof(xsd__hexBinary); } else { cp->ptr = (void*)new xsd__hexBinary[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(xsd__hexBinary); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (xsd__hexBinary*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_xsd__hexBinary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying xsd__hexBinary %p -> %p\n", q, p)); *(xsd__hexBinary*)p = *(xsd__hexBinary*)q; } void xsd__base64Binary::soap_default(struct soap *soap) { this->soap = soap; this->__size = 0; this->__ptr = NULL; this->id = NULL; this->type = NULL; this->options = NULL; } void xsd__base64Binary::soap_serialize(struct soap *soap) const { if (this->__ptr && !soap_array_reference(soap, this, (struct soap_array*)&this->__ptr, 1, SOAP_TYPE_xsd__base64Binary)) if (this->id || this->type) soap->mode |= SOAP_ENC_DIME; } int xsd__base64Binary::soap_put(struct soap *soap, const char *tag, const char *type) const { register int id = soap_embed(soap, (void*)this, (struct soap_array*)&this->__ptr, 1, tag, SOAP_TYPE_xsd__base64Binary); if (this->soap_out(soap, tag, id, type)) return soap->error; return soap_putindependent(soap); } int xsd__base64Binary::soap_out(struct soap *soap, const char *tag, int id, const char *type) const { return soap_out_xsd__base64Binary(soap, tag, id, this, type); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__base64Binary(struct soap *soap, const char *tag, int id, const xsd__base64Binary *a, const char *type) { #ifndef WITH_LEANER id = soap_attachment(soap, tag, id, a, (struct soap_array*)&a->__ptr, a->id, a->type, a->options, 1, type, SOAP_TYPE_xsd__base64Binary); #else id = soap_element_id(soap, tag, id, a, (struct soap_array*)&a->__ptr, 1, type, SOAP_TYPE_xsd__base64Binary); #endif if (id < 0) return soap->error; if (soap_element_begin_out(soap, tag, id, type)) return soap->error; if (soap_putbase64(soap, a->__ptr, a->__size)) return soap->error; return soap_element_end_out(soap, tag); } void *xsd__base64Binary::soap_get(struct soap *soap, const char *tag, const char *type) { return soap_get_xsd__base64Binary(soap, this, tag, type); } SOAP_FMAC3 xsd__base64Binary * SOAP_FMAC4 soap_get_xsd__base64Binary(struct soap *soap, xsd__base64Binary *p, const char *tag, const char *type) { if ((p = soap_in_xsd__base64Binary(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } void *xsd__base64Binary::soap_in(struct soap *soap, const char *tag, const char *type) { return soap_in_xsd__base64Binary(soap, tag, this, type); } SOAP_FMAC3 xsd__base64Binary * SOAP_FMAC4 soap_in_xsd__base64Binary(struct soap *soap, const char *tag, xsd__base64Binary *a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":base64Binary") && soap_match_tag(soap, soap->type, ":base64")) { soap->error = SOAP_TYPE; return NULL; } a = (xsd__base64Binary *)soap_class_id_enter(soap, soap->id, a, SOAP_TYPE_xsd__base64Binary, sizeof(xsd__base64Binary), soap->type, soap->arrayType); if (!a) return NULL; if (soap->alloced) a->soap_default(soap); if (soap->body && !*soap->href) { a->__ptr = soap_getbase64(soap, &a->__size, 0); #ifndef WITH_LEANER if (soap_xop_forward(soap, &a->__ptr, &a->__size, &a->id, &a->type, &a->options)) return NULL; #endif if ((!a->__ptr && soap->error) || soap_element_end_in(soap, tag)) return NULL; } else { #ifndef WITH_LEANER if (*soap->href != '#') { if (soap_dime_forward(soap, &a->__ptr, &a->__size, &a->id, &a->type, &a->options)) return NULL; } else #endif a = (xsd__base64Binary *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_xsd__base64Binary, 0, sizeof(xsd__base64Binary), 0, soap_copy_xsd__base64Binary); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 xsd__base64Binary * SOAP_FMAC4 soap_instantiate_xsd__base64Binary(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_xsd__base64Binary(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_xsd__base64Binary, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new xsd__base64Binary; if (size) *size = sizeof(xsd__base64Binary); ((xsd__base64Binary*)cp->ptr)->soap = soap; } else { cp->ptr = (void*)new xsd__base64Binary[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(xsd__base64Binary); for (int i = 0; i < n; i++) ((xsd__base64Binary*)cp->ptr)[i].soap = soap; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (xsd__base64Binary*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_xsd__base64Binary(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying xsd__base64Binary %p -> %p\n", q, p)); *(xsd__base64Binary*)p = *(xsd__base64Binary*)q; } SOAP_FMAC3 int SOAP_FMAC4 soap_put_xsd__anyURI(struct soap *soap, const std::string *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_xsd__anyURI); if (soap_out_xsd__anyURI(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_xsd__anyURI(struct soap *soap, const char *tag, int id, const std::string *s, const char *type) { if ((soap->mode & SOAP_C_NILSTRING) && s->empty()) return soap_element_null(soap, tag, id, type); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, s, SOAP_TYPE_xsd__anyURI), type) || soap_string_out(soap, s->c_str(), 0) || soap_element_end_out(soap, tag)) return soap->error; return SOAP_OK; } SOAP_FMAC3 std::string * SOAP_FMAC4 soap_get_xsd__anyURI(struct soap *soap, std::string *p, const char *tag, const char *type) { if ((p = soap_in_xsd__anyURI(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC1 std::string * SOAP_FMAC2 soap_in_xsd__anyURI(struct soap *soap, const char *tag, std::string *s, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!s) s = soap_new_std__string(soap, -1); if (soap->null) if (s) s->erase(); if (soap->body && !*soap->href) { char *t; s = (std::string*)soap_class_id_enter(soap, soap->id, s, SOAP_TYPE_xsd__anyURI, sizeof(std::string), soap->type, soap->arrayType); if (s) if ((t = soap_string_in(soap, 1, -1, -1))) s->assign(t); else return NULL; } else s = (std::string*)soap_id_forward(soap, soap->href, soap_class_id_enter(soap, soap->id, s, SOAP_TYPE_xsd__anyURI, sizeof(std::string), soap->type, soap->arrayType), 0, SOAP_TYPE_xsd__anyURI, 0, sizeof(std::string), 0, soap_copy_xsd__anyURI); if (soap->body && soap_element_end_in(soap, tag)) return NULL; return s; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__string(struct soap *soap, std::string *p) { (void)soap; /* appease -Wall -Werror */ p->erase(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__string(struct soap *soap, const std::string *p) { (void)soap; (void)p; /* appease -Wall -Werror */ } SOAP_FMAC3 int SOAP_FMAC4 soap_put_std__string(struct soap *soap, const std::string *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_std__string); if (soap_out_std__string(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__string(struct soap *soap, const char *tag, int id, const std::string *s, const char *type) { if ((soap->mode & SOAP_C_NILSTRING) && s->empty()) return soap_element_null(soap, tag, id, type); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, s, SOAP_TYPE_std__string), type) || soap_string_out(soap, s->c_str(), 0) || soap_element_end_out(soap, tag)) return soap->error; return SOAP_OK; } SOAP_FMAC3 std::string * SOAP_FMAC4 soap_get_std__string(struct soap *soap, std::string *p, const char *tag, const char *type) { if ((p = soap_in_std__string(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC1 std::string * SOAP_FMAC2 soap_in_std__string(struct soap *soap, const char *tag, std::string *s, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!s) s = soap_new_std__string(soap, -1); if (soap->null) if (s) s->erase(); if (soap->body && !*soap->href) { char *t; s = (std::string*)soap_class_id_enter(soap, soap->id, s, SOAP_TYPE_std__string, sizeof(std::string), soap->type, soap->arrayType); if (s) if ((t = soap_string_in(soap, 1, -1, -1))) s->assign(t); else return NULL; } else s = (std::string*)soap_id_forward(soap, soap->href, soap_class_id_enter(soap, soap->id, s, SOAP_TYPE_std__string, sizeof(std::string), soap->type, soap->arrayType), 0, SOAP_TYPE_std__string, 0, sizeof(std::string), 0, soap_copy_std__string); if (soap->body && soap_element_end_in(soap, tag)) return NULL; return s; } SOAP_FMAC3 std::string * SOAP_FMAC4 soap_instantiate_std__string(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__string(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__string, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::string; if (size) *size = sizeof(std::string); } else { cp->ptr = (void*)new std::string[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::string); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::string*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__string(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::string %p -> %p\n", q, p)); *(std::string*)p = *(std::string*)q; } #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_default__QName(soap, &a->faultcode); soap_default_string(soap, &a->faultstring); soap_default_string(soap, &a->faultactor); a->detail = NULL; a->SOAP_ENV__Code = NULL; a->SOAP_ENV__Reason = NULL; soap_default_string(soap, &a->SOAP_ENV__Node); soap_default_string(soap, &a->SOAP_ENV__Role); a->SOAP_ENV__Detail = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize__QName(soap, &a->faultcode); soap_serialize_string(soap, &a->faultstring); soap_serialize_string(soap, &a->faultactor); soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->detail); soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code); soap_serialize_PointerToSOAP_ENV__Reason(soap, &a->SOAP_ENV__Reason); soap_serialize_string(soap, &a->SOAP_ENV__Node); soap_serialize_string(soap, &a->SOAP_ENV__Role); soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->SOAP_ENV__Detail); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Fault); if (soap_out_SOAP_ENV__Fault(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type) { const char *soap_tmp_faultcode = soap_QName2s(soap, a->faultcode); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type)) return soap->error; if (soap_out__QName(soap, "faultcode", -1, (char*const*)&soap_tmp_faultcode, "")) return soap->error; if (soap_out_string(soap, "faultstring", -1, &a->faultstring, "")) return soap->error; if (soap_out_string(soap, "faultactor", -1, &a->faultactor, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Detail(soap, "detail", -1, &a->detail, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", -1, &a->SOAP_ENV__Code, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", -1, &a->SOAP_ENV__Reason, "")) return soap->error; if (soap_out_string(soap, "SOAP-ENV:Node", -1, &a->SOAP_ENV__Node, "")) return soap->error; if (soap_out_string(soap, "SOAP-ENV:Role", -1, &a->SOAP_ENV__Role, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", -1, &a->SOAP_ENV__Detail, "")) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p, const char *tag, const char *type) { if ((p = soap_in_SOAP_ENV__Fault(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap *soap, const char *tag, struct SOAP_ENV__Fault *a, const char *type) { size_t soap_flag_faultcode = 1; size_t soap_flag_faultstring = 1; size_t soap_flag_faultactor = 1; size_t soap_flag_detail = 1; size_t soap_flag_SOAP_ENV__Code = 1; size_t soap_flag_SOAP_ENV__Reason = 1; size_t soap_flag_SOAP_ENV__Node = 1; size_t soap_flag_SOAP_ENV__Role = 1; size_t soap_flag_SOAP_ENV__Detail = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Fault(soap, a); if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in__QName(soap, "faultcode", &a->faultcode, "")) { soap_flag_faultcode--; continue; } if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_string(soap, "faultstring", &a->faultstring, "xsd:string")) { soap_flag_faultstring--; continue; } if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_string(soap, "faultactor", &a->faultactor, "xsd:string")) { soap_flag_faultactor--; continue; } if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, "")) { soap_flag_detail--; continue; } if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, "")) { soap_flag_SOAP_ENV__Code--; continue; } if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, "")) { soap_flag_SOAP_ENV__Reason--; continue; } if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_string(soap, "SOAP-ENV:Node", &a->SOAP_ENV__Node, "xsd:string")) { soap_flag_SOAP_ENV__Node--; continue; } if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_string(soap, "SOAP-ENV:Role", &a->SOAP_ENV__Role, "xsd:string")) { soap_flag_SOAP_ENV__Role--; continue; } if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, "")) { soap_flag_SOAP_ENV__Detail--; continue; } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Fault, 0, sizeof(struct SOAP_ENV__Fault), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_instantiate_SOAP_ENV__Fault(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct SOAP_ENV__Fault; if (size) *size = sizeof(struct SOAP_ENV__Fault); } else { cp->ptr = (void*)new struct SOAP_ENV__Fault[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct SOAP_ENV__Fault); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct SOAP_ENV__Fault*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Fault(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Fault %p -> %p\n", q, p)); *(struct SOAP_ENV__Fault*)p = *(struct SOAP_ENV__Fault*)q; } #endif #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_default_string(soap, &a->SOAP_ENV__Text); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_string(soap, &a->SOAP_ENV__Text); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Reason); if (soap_out_SOAP_ENV__Reason(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Reason *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Reason), type)) return soap->error; if (soap->lang) soap_set_attr(soap, "xml:lang", soap->lang); if (soap_out_string(soap, "SOAP-ENV:Text", -1, &a->SOAP_ENV__Text, "")) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p, const char *tag, const char *type) { if ((p = soap_in_SOAP_ENV__Reason(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason *a, const char *type) { size_t soap_flag_SOAP_ENV__Text = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct SOAP_ENV__Reason *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Reason(soap, a); if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in_string(soap, "SOAP-ENV:Text", &a->SOAP_ENV__Text, "xsd:string")) { soap_flag_SOAP_ENV__Text--; continue; } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (struct SOAP_ENV__Reason *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Reason, 0, sizeof(struct SOAP_ENV__Reason), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_instantiate_SOAP_ENV__Reason(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct SOAP_ENV__Reason; if (size) *size = sizeof(struct SOAP_ENV__Reason); } else { cp->ptr = (void*)new struct SOAP_ENV__Reason[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct SOAP_ENV__Reason); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct SOAP_ENV__Reason*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Reason(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Reason %p -> %p\n", q, p)); *(struct SOAP_ENV__Reason*)p = *(struct SOAP_ENV__Reason*)q; } #endif #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_default__QName(soap, &a->SOAP_ENV__Value); a->SOAP_ENV__Subcode = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize__QName(soap, &a->SOAP_ENV__Value); soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Subcode); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Code); if (soap_out_SOAP_ENV__Code(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type) { const char *soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type)) return soap->error; if (soap_out__QName(soap, "SOAP-ENV:Value", -1, (char*const*)&soap_tmp_SOAP_ENV__Value, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", -1, &a->SOAP_ENV__Subcode, "")) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p, const char *tag, const char *type) { if ((p = soap_in_SOAP_ENV__Code(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code *a, const char *type) { size_t soap_flag_SOAP_ENV__Value = 1; size_t soap_flag_SOAP_ENV__Subcode = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Code(soap, a); if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_in__QName(soap, "SOAP-ENV:Value", &a->SOAP_ENV__Value, "")) { soap_flag_SOAP_ENV__Value--; continue; } if (soap_flag_SOAP_ENV__Subcode && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, "")) { soap_flag_SOAP_ENV__Subcode--; continue; } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Code, 0, sizeof(struct SOAP_ENV__Code), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct SOAP_ENV__Code; if (size) *size = sizeof(struct SOAP_ENV__Code); } else { cp->ptr = (void*)new struct SOAP_ENV__Code[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct SOAP_ENV__Code); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct SOAP_ENV__Code*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Code(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Code %p -> %p\n", q, p)); *(struct SOAP_ENV__Code*)p = *(struct SOAP_ENV__Code*)q; } #endif SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__setPower(struct soap *soap, struct __ns6__setPower *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__setPower = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__setPower(struct soap *soap, const struct __ns6__setPower *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__setPower(soap, &a->ns6__setPower); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__setPower(struct soap *soap, const struct __ns6__setPower *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__setPower(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__setPower(struct soap *soap, const char *tag, int id, const struct __ns6__setPower *a, const char *type) { if (soap_out_PointerTo_ns6__setPower(soap, "ns6:setPower", -1, &a->ns6__setPower, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__setPower * SOAP_FMAC4 soap_get___ns6__setPower(struct soap *soap, struct __ns6__setPower *p, const char *tag, const char *type) { if ((p = soap_in___ns6__setPower(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__setPower * SOAP_FMAC4 soap_in___ns6__setPower(struct soap *soap, const char *tag, struct __ns6__setPower *a, const char *type) { size_t soap_flag_ns6__setPower = 1; short soap_flag; a = (struct __ns6__setPower *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__setPower, sizeof(struct __ns6__setPower), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__setPower(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__setPower && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__setPower(soap, "ns6:setPower", &a->ns6__setPower, "")) { soap_flag_ns6__setPower--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__setPower * SOAP_FMAC4 soap_instantiate___ns6__setPower(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__setPower(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__setPower, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__setPower; if (size) *size = sizeof(struct __ns6__setPower); } else { cp->ptr = (void*)new struct __ns6__setPower[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__setPower); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__setPower*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__setPower(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__setPower %p -> %p\n", q, p)); *(struct __ns6__setPower*)p = *(struct __ns6__setPower*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__schedulerRefresh(struct soap *soap, struct __ns6__schedulerRefresh *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__schedulerRefresh = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__schedulerRefresh(struct soap *soap, const struct __ns6__schedulerRefresh *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__schedulerRefresh(soap, &a->ns6__schedulerRefresh); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__schedulerRefresh(struct soap *soap, const struct __ns6__schedulerRefresh *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__schedulerRefresh(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__schedulerRefresh(struct soap *soap, const char *tag, int id, const struct __ns6__schedulerRefresh *a, const char *type) { if (soap_out_PointerTo_ns6__schedulerRefresh(soap, "ns6:schedulerRefresh", -1, &a->ns6__schedulerRefresh, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__schedulerRefresh * SOAP_FMAC4 soap_get___ns6__schedulerRefresh(struct soap *soap, struct __ns6__schedulerRefresh *p, const char *tag, const char *type) { if ((p = soap_in___ns6__schedulerRefresh(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__schedulerRefresh * SOAP_FMAC4 soap_in___ns6__schedulerRefresh(struct soap *soap, const char *tag, struct __ns6__schedulerRefresh *a, const char *type) { size_t soap_flag_ns6__schedulerRefresh = 1; short soap_flag; a = (struct __ns6__schedulerRefresh *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__schedulerRefresh, sizeof(struct __ns6__schedulerRefresh), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__schedulerRefresh(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__schedulerRefresh && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__schedulerRefresh(soap, "ns6:schedulerRefresh", &a->ns6__schedulerRefresh, "")) { soap_flag_ns6__schedulerRefresh--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__schedulerRefresh * SOAP_FMAC4 soap_instantiate___ns6__schedulerRefresh(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__schedulerRefresh(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__schedulerRefresh, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__schedulerRefresh; if (size) *size = sizeof(struct __ns6__schedulerRefresh); } else { cp->ptr = (void*)new struct __ns6__schedulerRefresh[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__schedulerRefresh); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__schedulerRefresh*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__schedulerRefresh(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__schedulerRefresh %p -> %p\n", q, p)); *(struct __ns6__schedulerRefresh*)p = *(struct __ns6__schedulerRefresh*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__setSchedulingMode(struct soap *soap, struct __ns6__setSchedulingMode *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__setSchedulingMode = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__setSchedulingMode(struct soap *soap, const struct __ns6__setSchedulingMode *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__setSchedulingMode(soap, &a->ns6__setSchedulingMode); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__setSchedulingMode(struct soap *soap, const struct __ns6__setSchedulingMode *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__setSchedulingMode(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__setSchedulingMode(struct soap *soap, const char *tag, int id, const struct __ns6__setSchedulingMode *a, const char *type) { if (soap_out_PointerTo_ns6__setSchedulingMode(soap, "ns6:setSchedulingMode", -1, &a->ns6__setSchedulingMode, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__setSchedulingMode * SOAP_FMAC4 soap_get___ns6__setSchedulingMode(struct soap *soap, struct __ns6__setSchedulingMode *p, const char *tag, const char *type) { if ((p = soap_in___ns6__setSchedulingMode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__setSchedulingMode * SOAP_FMAC4 soap_in___ns6__setSchedulingMode(struct soap *soap, const char *tag, struct __ns6__setSchedulingMode *a, const char *type) { size_t soap_flag_ns6__setSchedulingMode = 1; short soap_flag; a = (struct __ns6__setSchedulingMode *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__setSchedulingMode, sizeof(struct __ns6__setSchedulingMode), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__setSchedulingMode(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__setSchedulingMode && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__setSchedulingMode(soap, "ns6:setSchedulingMode", &a->ns6__setSchedulingMode, "")) { soap_flag_ns6__setSchedulingMode--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__setSchedulingMode * SOAP_FMAC4 soap_instantiate___ns6__setSchedulingMode(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__setSchedulingMode(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__setSchedulingMode, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__setSchedulingMode; if (size) *size = sizeof(struct __ns6__setSchedulingMode); } else { cp->ptr = (void*)new struct __ns6__setSchedulingMode[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__setSchedulingMode); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__setSchedulingMode*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__setSchedulingMode(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__setSchedulingMode %p -> %p\n", q, p)); *(struct __ns6__setSchedulingMode*)p = *(struct __ns6__setSchedulingMode*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__restartMotion(struct soap *soap, struct __ns6__restartMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__restartMotion = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__restartMotion(struct soap *soap, const struct __ns6__restartMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__restartMotion(soap, &a->ns6__restartMotion); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__restartMotion(struct soap *soap, const struct __ns6__restartMotion *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__restartMotion(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__restartMotion(struct soap *soap, const char *tag, int id, const struct __ns6__restartMotion *a, const char *type) { if (soap_out_PointerTo_ns6__restartMotion(soap, "ns6:restartMotion", -1, &a->ns6__restartMotion, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__restartMotion * SOAP_FMAC4 soap_get___ns6__restartMotion(struct soap *soap, struct __ns6__restartMotion *p, const char *tag, const char *type) { if ((p = soap_in___ns6__restartMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__restartMotion * SOAP_FMAC4 soap_in___ns6__restartMotion(struct soap *soap, const char *tag, struct __ns6__restartMotion *a, const char *type) { size_t soap_flag_ns6__restartMotion = 1; short soap_flag; a = (struct __ns6__restartMotion *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__restartMotion, sizeof(struct __ns6__restartMotion), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__restartMotion(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__restartMotion && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__restartMotion(soap, "ns6:restartMotion", &a->ns6__restartMotion, "")) { soap_flag_ns6__restartMotion--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__restartMotion * SOAP_FMAC4 soap_instantiate___ns6__restartMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__restartMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__restartMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__restartMotion; if (size) *size = sizeof(struct __ns6__restartMotion); } else { cp->ptr = (void*)new struct __ns6__restartMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__restartMotion); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__restartMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__restartMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__restartMotion %p -> %p\n", q, p)); *(struct __ns6__restartMotion*)p = *(struct __ns6__restartMotion*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__stopMotion(struct soap *soap, struct __ns6__stopMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__stopMotion = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__stopMotion(struct soap *soap, const struct __ns6__stopMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__stopMotion(soap, &a->ns6__stopMotion); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__stopMotion(struct soap *soap, const struct __ns6__stopMotion *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__stopMotion(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__stopMotion(struct soap *soap, const char *tag, int id, const struct __ns6__stopMotion *a, const char *type) { if (soap_out_PointerTo_ns6__stopMotion(soap, "ns6:stopMotion", -1, &a->ns6__stopMotion, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__stopMotion * SOAP_FMAC4 soap_get___ns6__stopMotion(struct soap *soap, struct __ns6__stopMotion *p, const char *tag, const char *type) { if ((p = soap_in___ns6__stopMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__stopMotion * SOAP_FMAC4 soap_in___ns6__stopMotion(struct soap *soap, const char *tag, struct __ns6__stopMotion *a, const char *type) { size_t soap_flag_ns6__stopMotion = 1; short soap_flag; a = (struct __ns6__stopMotion *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__stopMotion, sizeof(struct __ns6__stopMotion), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__stopMotion(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__stopMotion && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__stopMotion(soap, "ns6:stopMotion", &a->ns6__stopMotion, "")) { soap_flag_ns6__stopMotion--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__stopMotion * SOAP_FMAC4 soap_instantiate___ns6__stopMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__stopMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__stopMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__stopMotion; if (size) *size = sizeof(struct __ns6__stopMotion); } else { cp->ptr = (void*)new struct __ns6__stopMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__stopMotion); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__stopMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__stopMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__stopMotion %p -> %p\n", q, p)); *(struct __ns6__stopMotion*)p = *(struct __ns6__stopMotion*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__resetMotion(struct soap *soap, struct __ns6__resetMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__resetMotion = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__resetMotion(struct soap *soap, const struct __ns6__resetMotion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__resetMotion(soap, &a->ns6__resetMotion); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__resetMotion(struct soap *soap, const struct __ns6__resetMotion *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__resetMotion(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__resetMotion(struct soap *soap, const char *tag, int id, const struct __ns6__resetMotion *a, const char *type) { if (soap_out_PointerTo_ns6__resetMotion(soap, "ns6:resetMotion", -1, &a->ns6__resetMotion, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__resetMotion * SOAP_FMAC4 soap_get___ns6__resetMotion(struct soap *soap, struct __ns6__resetMotion *p, const char *tag, const char *type) { if ((p = soap_in___ns6__resetMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__resetMotion * SOAP_FMAC4 soap_in___ns6__resetMotion(struct soap *soap, const char *tag, struct __ns6__resetMotion *a, const char *type) { size_t soap_flag_ns6__resetMotion = 1; short soap_flag; a = (struct __ns6__resetMotion *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__resetMotion, sizeof(struct __ns6__resetMotion), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__resetMotion(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__resetMotion && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__resetMotion(soap, "ns6:resetMotion", &a->ns6__resetMotion, "")) { soap_flag_ns6__resetMotion--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__resetMotion * SOAP_FMAC4 soap_instantiate___ns6__resetMotion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__resetMotion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__resetMotion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__resetMotion; if (size) *size = sizeof(struct __ns6__resetMotion); } else { cp->ptr = (void*)new struct __ns6__resetMotion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__resetMotion); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__resetMotion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__resetMotion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__resetMotion %p -> %p\n", q, p)); *(struct __ns6__resetMotion*)p = *(struct __ns6__resetMotion*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__moveC(struct soap *soap, struct __ns6__moveC *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__moveC = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__moveC(struct soap *soap, const struct __ns6__moveC *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__moveC(soap, &a->ns6__moveC); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__moveC(struct soap *soap, const struct __ns6__moveC *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__moveC(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__moveC(struct soap *soap, const char *tag, int id, const struct __ns6__moveC *a, const char *type) { if (soap_out_PointerTo_ns6__moveC(soap, "ns6:moveC", -1, &a->ns6__moveC, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__moveC * SOAP_FMAC4 soap_get___ns6__moveC(struct soap *soap, struct __ns6__moveC *p, const char *tag, const char *type) { if ((p = soap_in___ns6__moveC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__moveC * SOAP_FMAC4 soap_in___ns6__moveC(struct soap *soap, const char *tag, struct __ns6__moveC *a, const char *type) { size_t soap_flag_ns6__moveC = 1; short soap_flag; a = (struct __ns6__moveC *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__moveC, sizeof(struct __ns6__moveC), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__moveC(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__moveC && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__moveC(soap, "ns6:moveC", &a->ns6__moveC, "")) { soap_flag_ns6__moveC--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__moveC * SOAP_FMAC4 soap_instantiate___ns6__moveC(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__moveC(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__moveC, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__moveC; if (size) *size = sizeof(struct __ns6__moveC); } else { cp->ptr = (void*)new struct __ns6__moveC[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__moveC); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__moveC*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__moveC(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__moveC %p -> %p\n", q, p)); *(struct __ns6__moveC*)p = *(struct __ns6__moveC*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__moveL(struct soap *soap, struct __ns6__moveL *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__moveL = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__moveL(struct soap *soap, const struct __ns6__moveL *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__moveL(soap, &a->ns6__moveL); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__moveL(struct soap *soap, const struct __ns6__moveL *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__moveL(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__moveL(struct soap *soap, const char *tag, int id, const struct __ns6__moveL *a, const char *type) { if (soap_out_PointerTo_ns6__moveL(soap, "ns6:moveL", -1, &a->ns6__moveL, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__moveL * SOAP_FMAC4 soap_get___ns6__moveL(struct soap *soap, struct __ns6__moveL *p, const char *tag, const char *type) { if ((p = soap_in___ns6__moveL(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__moveL * SOAP_FMAC4 soap_in___ns6__moveL(struct soap *soap, const char *tag, struct __ns6__moveL *a, const char *type) { size_t soap_flag_ns6__moveL = 1; short soap_flag; a = (struct __ns6__moveL *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__moveL, sizeof(struct __ns6__moveL), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__moveL(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__moveL && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__moveL(soap, "ns6:moveL", &a->ns6__moveL, "")) { soap_flag_ns6__moveL--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__moveL * SOAP_FMAC4 soap_instantiate___ns6__moveL(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__moveL(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__moveL, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__moveL; if (size) *size = sizeof(struct __ns6__moveL); } else { cp->ptr = (void*)new struct __ns6__moveL[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__moveL); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__moveL*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__moveL(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__moveL %p -> %p\n", q, p)); *(struct __ns6__moveL*)p = *(struct __ns6__moveL*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__moveJC(struct soap *soap, struct __ns6__moveJC *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__moveJC = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__moveJC(struct soap *soap, const struct __ns6__moveJC *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__moveJC(soap, &a->ns6__moveJC); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__moveJC(struct soap *soap, const struct __ns6__moveJC *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__moveJC(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__moveJC(struct soap *soap, const char *tag, int id, const struct __ns6__moveJC *a, const char *type) { if (soap_out_PointerTo_ns6__moveJC(soap, "ns6:moveJC", -1, &a->ns6__moveJC, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__moveJC * SOAP_FMAC4 soap_get___ns6__moveJC(struct soap *soap, struct __ns6__moveJC *p, const char *tag, const char *type) { if ((p = soap_in___ns6__moveJC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__moveJC * SOAP_FMAC4 soap_in___ns6__moveJC(struct soap *soap, const char *tag, struct __ns6__moveJC *a, const char *type) { size_t soap_flag_ns6__moveJC = 1; short soap_flag; a = (struct __ns6__moveJC *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__moveJC, sizeof(struct __ns6__moveJC), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__moveJC(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__moveJC && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__moveJC(soap, "ns6:moveJC", &a->ns6__moveJC, "")) { soap_flag_ns6__moveJC--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__moveJC * SOAP_FMAC4 soap_instantiate___ns6__moveJC(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__moveJC(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__moveJC, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__moveJC; if (size) *size = sizeof(struct __ns6__moveJC); } else { cp->ptr = (void*)new struct __ns6__moveJC[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__moveJC); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__moveJC*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__moveJC(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__moveJC %p -> %p\n", q, p)); *(struct __ns6__moveJC*)p = *(struct __ns6__moveJC*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__moveJJ(struct soap *soap, struct __ns6__moveJJ *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__moveJJ = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__moveJJ(struct soap *soap, const struct __ns6__moveJJ *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__moveJJ(soap, &a->ns6__moveJJ); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__moveJJ(struct soap *soap, const struct __ns6__moveJJ *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__moveJJ(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__moveJJ(struct soap *soap, const char *tag, int id, const struct __ns6__moveJJ *a, const char *type) { if (soap_out_PointerTo_ns6__moveJJ(soap, "ns6:moveJJ", -1, &a->ns6__moveJJ, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__moveJJ * SOAP_FMAC4 soap_get___ns6__moveJJ(struct soap *soap, struct __ns6__moveJJ *p, const char *tag, const char *type) { if ((p = soap_in___ns6__moveJJ(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__moveJJ * SOAP_FMAC4 soap_in___ns6__moveJJ(struct soap *soap, const char *tag, struct __ns6__moveJJ *a, const char *type) { size_t soap_flag_ns6__moveJJ = 1; short soap_flag; a = (struct __ns6__moveJJ *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__moveJJ, sizeof(struct __ns6__moveJJ), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__moveJJ(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__moveJJ && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__moveJJ(soap, "ns6:moveJJ", &a->ns6__moveJJ, "")) { soap_flag_ns6__moveJJ--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__moveJJ * SOAP_FMAC4 soap_instantiate___ns6__moveJJ(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__moveJJ(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__moveJJ, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__moveJJ; if (size) *size = sizeof(struct __ns6__moveJJ); } else { cp->ptr = (void*)new struct __ns6__moveJJ[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__moveJJ); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__moveJJ*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__moveJJ(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__moveJJ %p -> %p\n", q, p)); *(struct __ns6__moveJJ*)p = *(struct __ns6__moveJJ*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__reverseKin(struct soap *soap, struct __ns6__reverseKin *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__reverseKin = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__reverseKin(struct soap *soap, const struct __ns6__reverseKin *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__reverseKin(soap, &a->ns6__reverseKin); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__reverseKin(struct soap *soap, const struct __ns6__reverseKin *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__reverseKin(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__reverseKin(struct soap *soap, const char *tag, int id, const struct __ns6__reverseKin *a, const char *type) { if (soap_out_PointerTo_ns6__reverseKin(soap, "ns6:reverseKin", -1, &a->ns6__reverseKin, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__reverseKin * SOAP_FMAC4 soap_get___ns6__reverseKin(struct soap *soap, struct __ns6__reverseKin *p, const char *tag, const char *type) { if ((p = soap_in___ns6__reverseKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__reverseKin * SOAP_FMAC4 soap_in___ns6__reverseKin(struct soap *soap, const char *tag, struct __ns6__reverseKin *a, const char *type) { size_t soap_flag_ns6__reverseKin = 1; short soap_flag; a = (struct __ns6__reverseKin *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__reverseKin, sizeof(struct __ns6__reverseKin), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__reverseKin(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__reverseKin && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__reverseKin(soap, "ns6:reverseKin", &a->ns6__reverseKin, "")) { soap_flag_ns6__reverseKin--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__reverseKin * SOAP_FMAC4 soap_instantiate___ns6__reverseKin(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__reverseKin(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__reverseKin, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__reverseKin; if (size) *size = sizeof(struct __ns6__reverseKin); } else { cp->ptr = (void*)new struct __ns6__reverseKin[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__reverseKin); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__reverseKin*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__reverseKin(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__reverseKin %p -> %p\n", q, p)); *(struct __ns6__reverseKin*)p = *(struct __ns6__reverseKin*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns6__forwardKin(struct soap *soap, struct __ns6__forwardKin *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns6__forwardKin = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns6__forwardKin(struct soap *soap, const struct __ns6__forwardKin *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns6__forwardKin(soap, &a->ns6__forwardKin); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns6__forwardKin(struct soap *soap, const struct __ns6__forwardKin *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns6__forwardKin(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns6__forwardKin(struct soap *soap, const char *tag, int id, const struct __ns6__forwardKin *a, const char *type) { if (soap_out_PointerTo_ns6__forwardKin(soap, "ns6:forwardKin", -1, &a->ns6__forwardKin, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns6__forwardKin * SOAP_FMAC4 soap_get___ns6__forwardKin(struct soap *soap, struct __ns6__forwardKin *p, const char *tag, const char *type) { if ((p = soap_in___ns6__forwardKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns6__forwardKin * SOAP_FMAC4 soap_in___ns6__forwardKin(struct soap *soap, const char *tag, struct __ns6__forwardKin *a, const char *type) { size_t soap_flag_ns6__forwardKin = 1; short soap_flag; a = (struct __ns6__forwardKin *)soap_id_enter(soap, "", a, SOAP_TYPE___ns6__forwardKin, sizeof(struct __ns6__forwardKin), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns6__forwardKin(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns6__forwardKin && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns6__forwardKin(soap, "ns6:forwardKin", &a->ns6__forwardKin, "")) { soap_flag_ns6__forwardKin--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns6__forwardKin * SOAP_FMAC4 soap_instantiate___ns6__forwardKin(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns6__forwardKin(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns6__forwardKin, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns6__forwardKin; if (size) *size = sizeof(struct __ns6__forwardKin); } else { cp->ptr = (void*)new struct __ns6__forwardKin[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns6__forwardKin); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns6__forwardKin*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns6__forwardKin(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns6__forwardKin %p -> %p\n", q, p)); *(struct __ns6__forwardKin*)p = *(struct __ns6__forwardKin*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns2__getJointRange(struct soap *soap, struct __ns2__getJointRange *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns2__getJointRange = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns2__getJointRange(struct soap *soap, const struct __ns2__getJointRange *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns2__getJointRange(soap, &a->ns2__getJointRange); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns2__getJointRange(struct soap *soap, const struct __ns2__getJointRange *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns2__getJointRange(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns2__getJointRange(struct soap *soap, const char *tag, int id, const struct __ns2__getJointRange *a, const char *type) { if (soap_out_PointerTo_ns2__getJointRange(soap, "ns2:getJointRange", -1, &a->ns2__getJointRange, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns2__getJointRange * SOAP_FMAC4 soap_get___ns2__getJointRange(struct soap *soap, struct __ns2__getJointRange *p, const char *tag, const char *type) { if ((p = soap_in___ns2__getJointRange(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns2__getJointRange * SOAP_FMAC4 soap_in___ns2__getJointRange(struct soap *soap, const char *tag, struct __ns2__getJointRange *a, const char *type) { size_t soap_flag_ns2__getJointRange = 1; short soap_flag; a = (struct __ns2__getJointRange *)soap_id_enter(soap, "", a, SOAP_TYPE___ns2__getJointRange, sizeof(struct __ns2__getJointRange), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns2__getJointRange(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns2__getJointRange && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns2__getJointRange(soap, "ns2:getJointRange", &a->ns2__getJointRange, "")) { soap_flag_ns2__getJointRange--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns2__getJointRange * SOAP_FMAC4 soap_instantiate___ns2__getJointRange(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns2__getJointRange(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns2__getJointRange, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns2__getJointRange; if (size) *size = sizeof(struct __ns2__getJointRange); } else { cp->ptr = (void*)new struct __ns2__getJointRange[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns2__getJointRange); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns2__getJointRange*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns2__getJointRange(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns2__getJointRange %p -> %p\n", q, p)); *(struct __ns2__getJointRange*)p = *(struct __ns2__getJointRange*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns2__getRecord(struct soap *soap, struct __ns2__getRecord *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns2__getRecord = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns2__getRecord(struct soap *soap, const struct __ns2__getRecord *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns2__getRecord(soap, &a->ns2__getRecord); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns2__getRecord(struct soap *soap, const struct __ns2__getRecord *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns2__getRecord(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns2__getRecord(struct soap *soap, const char *tag, int id, const struct __ns2__getRecord *a, const char *type) { if (soap_out_PointerTo_ns2__getRecord(soap, "ns2:getRecord", -1, &a->ns2__getRecord, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns2__getRecord * SOAP_FMAC4 soap_get___ns2__getRecord(struct soap *soap, struct __ns2__getRecord *p, const char *tag, const char *type) { if ((p = soap_in___ns2__getRecord(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns2__getRecord * SOAP_FMAC4 soap_in___ns2__getRecord(struct soap *soap, const char *tag, struct __ns2__getRecord *a, const char *type) { size_t soap_flag_ns2__getRecord = 1; short soap_flag; a = (struct __ns2__getRecord *)soap_id_enter(soap, "", a, SOAP_TYPE___ns2__getRecord, sizeof(struct __ns2__getRecord), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns2__getRecord(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns2__getRecord && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns2__getRecord(soap, "ns2:getRecord", &a->ns2__getRecord, "")) { soap_flag_ns2__getRecord--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns2__getRecord * SOAP_FMAC4 soap_instantiate___ns2__getRecord(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns2__getRecord(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns2__getRecord, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns2__getRecord; if (size) *size = sizeof(struct __ns2__getRecord); } else { cp->ptr = (void*)new struct __ns2__getRecord[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns2__getRecord); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns2__getRecord*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns2__getRecord(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns2__getRecord %p -> %p\n", q, p)); *(struct __ns2__getRecord*)p = *(struct __ns2__getRecord*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns2__getRecords(struct soap *soap, struct __ns2__getRecords *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns2__getRecords = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns2__getRecords(struct soap *soap, const struct __ns2__getRecords *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns2__getRecords(soap, &a->ns2__getRecords); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns2__getRecords(struct soap *soap, const struct __ns2__getRecords *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns2__getRecords(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns2__getRecords(struct soap *soap, const char *tag, int id, const struct __ns2__getRecords *a, const char *type) { if (soap_out_PointerTo_ns2__getRecords(soap, "ns2:getRecords", -1, &a->ns2__getRecords, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns2__getRecords * SOAP_FMAC4 soap_get___ns2__getRecords(struct soap *soap, struct __ns2__getRecords *p, const char *tag, const char *type) { if ((p = soap_in___ns2__getRecords(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns2__getRecords * SOAP_FMAC4 soap_in___ns2__getRecords(struct soap *soap, const char *tag, struct __ns2__getRecords *a, const char *type) { size_t soap_flag_ns2__getRecords = 1; short soap_flag; a = (struct __ns2__getRecords *)soap_id_enter(soap, "", a, SOAP_TYPE___ns2__getRecords, sizeof(struct __ns2__getRecords), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns2__getRecords(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns2__getRecords && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns2__getRecords(soap, "ns2:getRecords", &a->ns2__getRecords, "")) { soap_flag_ns2__getRecords--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns2__getRecords * SOAP_FMAC4 soap_instantiate___ns2__getRecords(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns2__getRecords(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns2__getRecords, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns2__getRecords; if (size) *size = sizeof(struct __ns2__getRecords); } else { cp->ptr = (void*)new struct __ns2__getRecords[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns2__getRecords); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns2__getRecords*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns2__getRecords(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns2__getRecords %p -> %p\n", q, p)); *(struct __ns2__getRecords*)p = *(struct __ns2__getRecords*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns2__getApplicationDatas(struct soap *soap, struct __ns2__getApplicationDatas *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns2__getApplicationDatas = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns2__getApplicationDatas(struct soap *soap, const struct __ns2__getApplicationDatas *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns2__getApplicationDatas(soap, &a->ns2__getApplicationDatas); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns2__getApplicationDatas(struct soap *soap, const struct __ns2__getApplicationDatas *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns2__getApplicationDatas(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns2__getApplicationDatas(struct soap *soap, const char *tag, int id, const struct __ns2__getApplicationDatas *a, const char *type) { if (soap_out_PointerTo_ns2__getApplicationDatas(soap, "ns2:getApplicationDatas", -1, &a->ns2__getApplicationDatas, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns2__getApplicationDatas * SOAP_FMAC4 soap_get___ns2__getApplicationDatas(struct soap *soap, struct __ns2__getApplicationDatas *p, const char *tag, const char *type) { if ((p = soap_in___ns2__getApplicationDatas(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns2__getApplicationDatas * SOAP_FMAC4 soap_in___ns2__getApplicationDatas(struct soap *soap, const char *tag, struct __ns2__getApplicationDatas *a, const char *type) { size_t soap_flag_ns2__getApplicationDatas = 1; short soap_flag; a = (struct __ns2__getApplicationDatas *)soap_id_enter(soap, "", a, SOAP_TYPE___ns2__getApplicationDatas, sizeof(struct __ns2__getApplicationDatas), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns2__getApplicationDatas(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns2__getApplicationDatas && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns2__getApplicationDatas(soap, "ns2:getApplicationDatas", &a->ns2__getApplicationDatas, "")) { soap_flag_ns2__getApplicationDatas--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns2__getApplicationDatas * SOAP_FMAC4 soap_instantiate___ns2__getApplicationDatas(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns2__getApplicationDatas(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns2__getApplicationDatas, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns2__getApplicationDatas; if (size) *size = sizeof(struct __ns2__getApplicationDatas); } else { cp->ptr = (void*)new struct __ns2__getApplicationDatas[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns2__getApplicationDatas); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns2__getApplicationDatas*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns2__getApplicationDatas(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns2__getApplicationDatas %p -> %p\n", q, p)); *(struct __ns2__getApplicationDatas*)p = *(struct __ns2__getApplicationDatas*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns2__getApplications(struct soap *soap, struct __ns2__getApplications *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns2__getApplications = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns2__getApplications(struct soap *soap, const struct __ns2__getApplications *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns2__getApplications(soap, &a->ns2__getApplications); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns2__getApplications(struct soap *soap, const struct __ns2__getApplications *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns2__getApplications(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns2__getApplications(struct soap *soap, const char *tag, int id, const struct __ns2__getApplications *a, const char *type) { if (soap_out_PointerTo_ns2__getApplications(soap, "ns2:getApplications", -1, &a->ns2__getApplications, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns2__getApplications * SOAP_FMAC4 soap_get___ns2__getApplications(struct soap *soap, struct __ns2__getApplications *p, const char *tag, const char *type) { if ((p = soap_in___ns2__getApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns2__getApplications * SOAP_FMAC4 soap_in___ns2__getApplications(struct soap *soap, const char *tag, struct __ns2__getApplications *a, const char *type) { size_t soap_flag_ns2__getApplications = 1; short soap_flag; a = (struct __ns2__getApplications *)soap_id_enter(soap, "", a, SOAP_TYPE___ns2__getApplications, sizeof(struct __ns2__getApplications), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns2__getApplications(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns2__getApplications && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns2__getApplications(soap, "ns2:getApplications", &a->ns2__getApplications, "")) { soap_flag_ns2__getApplications--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns2__getApplications * SOAP_FMAC4 soap_instantiate___ns2__getApplications(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns2__getApplications(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns2__getApplications, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns2__getApplications; if (size) *size = sizeof(struct __ns2__getApplications); } else { cp->ptr = (void*)new struct __ns2__getApplications[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns2__getApplications); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns2__getApplications*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns2__getApplications(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns2__getApplications %p -> %p\n", q, p)); *(struct __ns2__getApplications*)p = *(struct __ns2__getApplications*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__setRobotJointPos(struct soap *soap, struct __ns1__setRobotJointPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__setRobotJointPos = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__setRobotJointPos(struct soap *soap, const struct __ns1__setRobotJointPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__setRobotJointPos(soap, &a->ns1__setRobotJointPos); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__setRobotJointPos(struct soap *soap, const struct __ns1__setRobotJointPos *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__setRobotJointPos(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__setRobotJointPos(struct soap *soap, const char *tag, int id, const struct __ns1__setRobotJointPos *a, const char *type) { if (soap_out_PointerTo_ns1__setRobotJointPos(soap, "ns1:setRobotJointPos", -1, &a->ns1__setRobotJointPos, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__setRobotJointPos * SOAP_FMAC4 soap_get___ns1__setRobotJointPos(struct soap *soap, struct __ns1__setRobotJointPos *p, const char *tag, const char *type) { if ((p = soap_in___ns1__setRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__setRobotJointPos * SOAP_FMAC4 soap_in___ns1__setRobotJointPos(struct soap *soap, const char *tag, struct __ns1__setRobotJointPos *a, const char *type) { size_t soap_flag_ns1__setRobotJointPos = 1; short soap_flag; a = (struct __ns1__setRobotJointPos *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__setRobotJointPos, sizeof(struct __ns1__setRobotJointPos), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__setRobotJointPos(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__setRobotJointPos && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__setRobotJointPos(soap, "ns1:setRobotJointPos", &a->ns1__setRobotJointPos, "")) { soap_flag_ns1__setRobotJointPos--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__setRobotJointPos * SOAP_FMAC4 soap_instantiate___ns1__setRobotJointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__setRobotJointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__setRobotJointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__setRobotJointPos; if (size) *size = sizeof(struct __ns1__setRobotJointPos); } else { cp->ptr = (void*)new struct __ns1__setRobotJointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__setRobotJointPos); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__setRobotJointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__setRobotJointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__setRobotJointPos %p -> %p\n", q, p)); *(struct __ns1__setRobotJointPos*)p = *(struct __ns1__setRobotJointPos*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__getRobotJntCartPos(struct soap *soap, struct __ns1__getRobotJntCartPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__getRobotJntCartPos = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__getRobotJntCartPos(struct soap *soap, const struct __ns1__getRobotJntCartPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__getRobotJntCartPos(soap, &a->ns1__getRobotJntCartPos); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__getRobotJntCartPos(struct soap *soap, const struct __ns1__getRobotJntCartPos *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__getRobotJntCartPos(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__getRobotJntCartPos(struct soap *soap, const char *tag, int id, const struct __ns1__getRobotJntCartPos *a, const char *type) { if (soap_out_PointerTo_ns1__getRobotJntCartPos(soap, "ns1:getRobotJntCartPos", -1, &a->ns1__getRobotJntCartPos, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__getRobotJntCartPos * SOAP_FMAC4 soap_get___ns1__getRobotJntCartPos(struct soap *soap, struct __ns1__getRobotJntCartPos *p, const char *tag, const char *type) { if ((p = soap_in___ns1__getRobotJntCartPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__getRobotJntCartPos * SOAP_FMAC4 soap_in___ns1__getRobotJntCartPos(struct soap *soap, const char *tag, struct __ns1__getRobotJntCartPos *a, const char *type) { size_t soap_flag_ns1__getRobotJntCartPos = 1; short soap_flag; a = (struct __ns1__getRobotJntCartPos *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__getRobotJntCartPos, sizeof(struct __ns1__getRobotJntCartPos), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__getRobotJntCartPos(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__getRobotJntCartPos && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__getRobotJntCartPos(soap, "ns1:getRobotJntCartPos", &a->ns1__getRobotJntCartPos, "")) { soap_flag_ns1__getRobotJntCartPos--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__getRobotJntCartPos * SOAP_FMAC4 soap_instantiate___ns1__getRobotJntCartPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__getRobotJntCartPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__getRobotJntCartPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__getRobotJntCartPos; if (size) *size = sizeof(struct __ns1__getRobotJntCartPos); } else { cp->ptr = (void*)new struct __ns1__getRobotJntCartPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__getRobotJntCartPos); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__getRobotJntCartPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__getRobotJntCartPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__getRobotJntCartPos %p -> %p\n", q, p)); *(struct __ns1__getRobotJntCartPos*)p = *(struct __ns1__getRobotJntCartPos*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__getRobotJointPos(struct soap *soap, struct __ns1__getRobotJointPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__getRobotJointPos = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__getRobotJointPos(struct soap *soap, const struct __ns1__getRobotJointPos *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__getRobotJointPos(soap, &a->ns1__getRobotJointPos); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__getRobotJointPos(struct soap *soap, const struct __ns1__getRobotJointPos *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__getRobotJointPos(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__getRobotJointPos(struct soap *soap, const char *tag, int id, const struct __ns1__getRobotJointPos *a, const char *type) { if (soap_out_PointerTo_ns1__getRobotJointPos(soap, "ns1:getRobotJointPos", -1, &a->ns1__getRobotJointPos, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__getRobotJointPos * SOAP_FMAC4 soap_get___ns1__getRobotJointPos(struct soap *soap, struct __ns1__getRobotJointPos *p, const char *tag, const char *type) { if ((p = soap_in___ns1__getRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__getRobotJointPos * SOAP_FMAC4 soap_in___ns1__getRobotJointPos(struct soap *soap, const char *tag, struct __ns1__getRobotJointPos *a, const char *type) { size_t soap_flag_ns1__getRobotJointPos = 1; short soap_flag; a = (struct __ns1__getRobotJointPos *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__getRobotJointPos, sizeof(struct __ns1__getRobotJointPos), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__getRobotJointPos(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__getRobotJointPos && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__getRobotJointPos(soap, "ns1:getRobotJointPos", &a->ns1__getRobotJointPos, "")) { soap_flag_ns1__getRobotJointPos--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__getRobotJointPos * SOAP_FMAC4 soap_instantiate___ns1__getRobotJointPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__getRobotJointPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__getRobotJointPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__getRobotJointPos; if (size) *size = sizeof(struct __ns1__getRobotJointPos); } else { cp->ptr = (void*)new struct __ns1__getRobotJointPos[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__getRobotJointPos); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__getRobotJointPos*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__getRobotJointPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__getRobotJointPos %p -> %p\n", q, p)); *(struct __ns1__getRobotJointPos*)p = *(struct __ns1__getRobotJointPos*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__getRobots(struct soap *soap, struct __ns1__getRobots *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__getRobots = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__getRobots(struct soap *soap, const struct __ns1__getRobots *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__getRobots(soap, &a->ns1__getRobots); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__getRobots(struct soap *soap, const struct __ns1__getRobots *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__getRobots(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__getRobots(struct soap *soap, const char *tag, int id, const struct __ns1__getRobots *a, const char *type) { if (soap_out_PointerTo_ns1__getRobots(soap, "ns1:getRobots", -1, &a->ns1__getRobots, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__getRobots * SOAP_FMAC4 soap_get___ns1__getRobots(struct soap *soap, struct __ns1__getRobots *p, const char *tag, const char *type) { if ((p = soap_in___ns1__getRobots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__getRobots * SOAP_FMAC4 soap_in___ns1__getRobots(struct soap *soap, const char *tag, struct __ns1__getRobots *a, const char *type) { size_t soap_flag_ns1__getRobots = 1; short soap_flag; a = (struct __ns1__getRobots *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__getRobots, sizeof(struct __ns1__getRobots), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__getRobots(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__getRobots && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__getRobots(soap, "ns1:getRobots", &a->ns1__getRobots, "")) { soap_flag_ns1__getRobots--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__getRobots * SOAP_FMAC4 soap_instantiate___ns1__getRobots(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__getRobots(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__getRobots, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__getRobots; if (size) *size = sizeof(struct __ns1__getRobots); } else { cp->ptr = (void*)new struct __ns1__getRobots[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__getRobots); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__getRobots*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__getRobots(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__getRobots %p -> %p\n", q, p)); *(struct __ns1__getRobots*)p = *(struct __ns1__getRobots*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__logout(struct soap *soap, struct __ns1__logout *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__logout = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__logout(struct soap *soap, const struct __ns1__logout *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__logout(soap, &a->ns1__logout); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__logout(struct soap *soap, const struct __ns1__logout *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__logout(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__logout(struct soap *soap, const char *tag, int id, const struct __ns1__logout *a, const char *type) { if (soap_out_PointerTo_ns1__logout(soap, "ns1:logout", -1, &a->ns1__logout, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__logout * SOAP_FMAC4 soap_get___ns1__logout(struct soap *soap, struct __ns1__logout *p, const char *tag, const char *type) { if ((p = soap_in___ns1__logout(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__logout * SOAP_FMAC4 soap_in___ns1__logout(struct soap *soap, const char *tag, struct __ns1__logout *a, const char *type) { size_t soap_flag_ns1__logout = 1; short soap_flag; a = (struct __ns1__logout *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__logout, sizeof(struct __ns1__logout), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__logout(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__logout && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__logout(soap, "ns1:logout", &a->ns1__logout, "")) { soap_flag_ns1__logout--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__logout * SOAP_FMAC4 soap_instantiate___ns1__logout(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__logout(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__logout, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__logout; if (size) *size = sizeof(struct __ns1__logout); } else { cp->ptr = (void*)new struct __ns1__logout[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__logout); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__logout*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__logout(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__logout %p -> %p\n", q, p)); *(struct __ns1__logout*)p = *(struct __ns1__logout*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__login(struct soap *soap, struct __ns1__login *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__login = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__login(struct soap *soap, const struct __ns1__login *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__login(soap, &a->ns1__login); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__login(struct soap *soap, const struct __ns1__login *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__login(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__login(struct soap *soap, const char *tag, int id, const struct __ns1__login *a, const char *type) { if (soap_out_PointerTo_ns1__login(soap, "ns1:login", -1, &a->ns1__login, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__login * SOAP_FMAC4 soap_get___ns1__login(struct soap *soap, struct __ns1__login *p, const char *tag, const char *type) { if ((p = soap_in___ns1__login(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__login * SOAP_FMAC4 soap_in___ns1__login(struct soap *soap, const char *tag, struct __ns1__login *a, const char *type) { size_t soap_flag_ns1__login = 1; short soap_flag; a = (struct __ns1__login *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__login, sizeof(struct __ns1__login), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__login(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__login && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__login(soap, "ns1:login", &a->ns1__login, "")) { soap_flag_ns1__login--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__login * SOAP_FMAC4 soap_instantiate___ns1__login(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__login(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__login, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__login; if (size) *size = sizeof(struct __ns1__login); } else { cp->ptr = (void*)new struct __ns1__login[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__login); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__login*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__login(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__login %p -> %p\n", q, p)); *(struct __ns1__login*)p = *(struct __ns1__login*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__getCS8Versions(struct soap *soap, struct __ns1__getCS8Versions *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__getCS8Versions = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__getCS8Versions(struct soap *soap, const struct __ns1__getCS8Versions *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__getCS8Versions(soap, &a->ns1__getCS8Versions); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__getCS8Versions(struct soap *soap, const struct __ns1__getCS8Versions *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__getCS8Versions(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__getCS8Versions(struct soap *soap, const char *tag, int id, const struct __ns1__getCS8Versions *a, const char *type) { if (soap_out_PointerTo_ns1__getCS8Versions(soap, "ns1:getCS8Versions", -1, &a->ns1__getCS8Versions, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__getCS8Versions * SOAP_FMAC4 soap_get___ns1__getCS8Versions(struct soap *soap, struct __ns1__getCS8Versions *p, const char *tag, const char *type) { if ((p = soap_in___ns1__getCS8Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__getCS8Versions * SOAP_FMAC4 soap_in___ns1__getCS8Versions(struct soap *soap, const char *tag, struct __ns1__getCS8Versions *a, const char *type) { size_t soap_flag_ns1__getCS8Versions = 1; short soap_flag; a = (struct __ns1__getCS8Versions *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__getCS8Versions, sizeof(struct __ns1__getCS8Versions), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__getCS8Versions(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__getCS8Versions && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__getCS8Versions(soap, "ns1:getCS8Versions", &a->ns1__getCS8Versions, "")) { soap_flag_ns1__getCS8Versions--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__getCS8Versions * SOAP_FMAC4 soap_instantiate___ns1__getCS8Versions(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__getCS8Versions(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__getCS8Versions, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__getCS8Versions; if (size) *size = sizeof(struct __ns1__getCS8Versions); } else { cp->ptr = (void*)new struct __ns1__getCS8Versions[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__getCS8Versions); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__getCS8Versions*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__getCS8Versions(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__getCS8Versions %p -> %p\n", q, p)); *(struct __ns1__getCS8Versions*)p = *(struct __ns1__getCS8Versions*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__ping(struct soap *soap, struct __ns1__ping *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__ping = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__ping(struct soap *soap, const struct __ns1__ping *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__ping(soap, &a->ns1__ping); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__ping(struct soap *soap, const struct __ns1__ping *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__ping(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__ping(struct soap *soap, const char *tag, int id, const struct __ns1__ping *a, const char *type) { if (soap_out_PointerTo_ns1__ping(soap, "ns1:ping", -1, &a->ns1__ping, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__ping * SOAP_FMAC4 soap_get___ns1__ping(struct soap *soap, struct __ns1__ping *p, const char *tag, const char *type) { if ((p = soap_in___ns1__ping(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__ping * SOAP_FMAC4 soap_in___ns1__ping(struct soap *soap, const char *tag, struct __ns1__ping *a, const char *type) { size_t soap_flag_ns1__ping = 1; short soap_flag; a = (struct __ns1__ping *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__ping, sizeof(struct __ns1__ping), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__ping(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__ping && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__ping(soap, "ns1:ping", &a->ns1__ping, "")) { soap_flag_ns1__ping--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__ping * SOAP_FMAC4 soap_instantiate___ns1__ping(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__ping(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__ping, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__ping; if (size) *size = sizeof(struct __ns1__ping); } else { cp->ptr = (void*)new struct __ns1__ping[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__ping); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__ping*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__ping(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__ping %p -> %p\n", q, p)); *(struct __ns1__ping*)p = *(struct __ns1__ping*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__getSoapServerVersion(struct soap *soap, struct __ns1__getSoapServerVersion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__getSoapServerVersion = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__getSoapServerVersion(struct soap *soap, const struct __ns1__getSoapServerVersion *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTo_ns1__getSoapServerVersion(soap, &a->ns1__getSoapServerVersion); } SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__getSoapServerVersion(struct soap *soap, const struct __ns1__getSoapServerVersion *a, const char *tag, const char *type) { register int id = 0; if (soap_out___ns1__getSoapServerVersion(soap, tag, id, a, type)) return soap->error; return SOAP_OK; } SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__getSoapServerVersion(struct soap *soap, const char *tag, int id, const struct __ns1__getSoapServerVersion *a, const char *type) { if (soap_out_PointerTo_ns1__getSoapServerVersion(soap, "ns1:getSoapServerVersion", -1, &a->ns1__getSoapServerVersion, "")) return soap->error; return SOAP_OK; } SOAP_FMAC3 struct __ns1__getSoapServerVersion * SOAP_FMAC4 soap_get___ns1__getSoapServerVersion(struct soap *soap, struct __ns1__getSoapServerVersion *p, const char *tag, const char *type) { if ((p = soap_in___ns1__getSoapServerVersion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct __ns1__getSoapServerVersion * SOAP_FMAC4 soap_in___ns1__getSoapServerVersion(struct soap *soap, const char *tag, struct __ns1__getSoapServerVersion *a, const char *type) { size_t soap_flag_ns1__getSoapServerVersion = 1; short soap_flag; a = (struct __ns1__getSoapServerVersion *)soap_id_enter(soap, "", a, SOAP_TYPE___ns1__getSoapServerVersion, sizeof(struct __ns1__getSoapServerVersion), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default___ns1__getSoapServerVersion(soap, a); for (soap_flag = 0;; soap_flag = 1) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__getSoapServerVersion && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTo_ns1__getSoapServerVersion(soap, "ns1:getSoapServerVersion", &a->ns1__getSoapServerVersion, "")) { soap_flag_ns1__getSoapServerVersion--; continue; } if (soap->error == SOAP_TAG_MISMATCH) if (soap_flag) { soap->error = SOAP_OK; break; } if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } return a; } SOAP_FMAC3 struct __ns1__getSoapServerVersion * SOAP_FMAC4 soap_instantiate___ns1__getSoapServerVersion(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate___ns1__getSoapServerVersion(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE___ns1__getSoapServerVersion, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct __ns1__getSoapServerVersion; if (size) *size = sizeof(struct __ns1__getSoapServerVersion); } else { cp->ptr = (void*)new struct __ns1__getSoapServerVersion[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct __ns1__getSoapServerVersion); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct __ns1__getSoapServerVersion*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy___ns1__getSoapServerVersion(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct __ns1__getSoapServerVersion %p -> %p\n", q, p)); *(struct __ns1__getSoapServerVersion*)p = *(struct __ns1__getSoapServerVersion*)q; } #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__ServerException_ = NULL; a->__type = 0; a->fault = NULL; a->__any = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTons1__ServerException(soap, &a->ns1__ServerException_); soap_markelement(soap, a->fault, a->__type); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Detail); if (soap_out_SOAP_ENV__Detail(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Detail *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type)) return soap->error; if (soap_out_PointerTons1__ServerException(soap, "ns1:ServerException", -1, &a->ns1__ServerException_, "")) return soap->error; if (soap_putelement(soap, a->fault, "fault", -1, a->__type)) return soap->error; soap_outliteral(soap, "-any", &a->__any, NULL); return soap_element_end_out(soap, tag); } SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p, const char *tag, const char *type) { if ((p = soap_in_SOAP_ENV__Detail(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail *a, const char *type) { size_t soap_flag_ns1__ServerException_ = 1; size_t soap_flag_fault = 1; size_t soap_flag___any = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct SOAP_ENV__Detail *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Detail(soap, a); if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__ServerException_ && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__ServerException(soap, "ns1:ServerException", &a->ns1__ServerException_, "ns1:ServerException")) { soap_flag_ns1__ServerException_--; continue; } if (soap_flag_fault && soap->error == SOAP_TAG_MISMATCH) if ((a->fault = soap_getelement(soap, &a->__type))) { soap_flag_fault = 0; continue; } if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) if (soap_inliteral(soap, "-any", &a->__any)) { soap_flag___any--; continue; } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (struct SOAP_ENV__Detail *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Detail, 0, sizeof(struct SOAP_ENV__Detail), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_fault > 1)) { soap->error = SOAP_OCCURS; return NULL; } return a; } SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_instantiate_SOAP_ENV__Detail(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct SOAP_ENV__Detail; if (size) *size = sizeof(struct SOAP_ENV__Detail); } else { cp->ptr = (void*)new struct SOAP_ENV__Detail[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct SOAP_ENV__Detail); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct SOAP_ENV__Detail*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Detail(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Detail %p -> %p\n", q, p)); *(struct SOAP_ENV__Detail*)p = *(struct SOAP_ENV__Detail*)q; } #endif #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *a) { (void)soap; (void)a; /* appease -Wall -Werror */ a->ns1__sessionId = NULL; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a) { (void)soap; (void)a; /* appease -Wall -Werror */ soap_serialize_PointerTons1__SessionId(soap, &a->ns1__sessionId); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Header); if (soap_out_SOAP_ENV__Header(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type)) return soap->error; soap->mustUnderstand = 1; if (soap_out_PointerTons1__SessionId(soap, "ns1:sessionId", -1, &a->ns1__sessionId, "")) return soap->error; return soap_element_end_out(soap, tag); } SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p, const char *tag, const char *type) { if ((p = soap_in_SOAP_ENV__Header(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type) { size_t soap_flag_ns1__sessionId = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Header(soap, a); if (soap->body && !*soap->href) { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_ns1__sessionId && soap->error == SOAP_TAG_MISMATCH) if (soap_in_PointerTons1__SessionId(soap, "ns1:sessionId", &a->ns1__sessionId, "ns1:SessionId")) { soap_flag_ns1__sessionId--; continue; } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) break; if (soap->error) return NULL; } if (soap_element_end_in(soap, tag)) return NULL; } else { a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Header, 0, sizeof(struct SOAP_ENV__Header), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_instantiate_SOAP_ENV__Header(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new struct SOAP_ENV__Header; if (size) *size = sizeof(struct SOAP_ENV__Header); } else { cp->ptr = (void*)new struct SOAP_ENV__Header[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(struct SOAP_ENV__Header); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (struct SOAP_ENV__Header*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Header(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Header %p -> %p\n", q, p)); *(struct SOAP_ENV__Header*)p = *(struct SOAP_ENV__Header*)q; } #endif SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__ns6__union_Config(struct soap *soap, int choice, const union _ns6__union_Config *a) { (void)soap; (void)a; /* appease -Wall -Werror */ switch (choice) { case SOAP_UNION__ns6__union_Config_anthroConfig: soap_serialize_PointerTons6__AnthroConfig(soap, &a->anthroConfig); break; case SOAP_UNION__ns6__union_Config_scaraConfig: soap_serialize_PointerTons6__ScaraConfig(soap, &a->scaraConfig); break; case SOAP_UNION__ns6__union_Config_vrbxConfig: soap_serialize_PointerTons6__VrbxConfig(soap, &a->vrbxConfig); break; default: break; } } SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns6__union_Config(struct soap *soap, int choice, const union _ns6__union_Config *a) { switch (choice) { case SOAP_UNION__ns6__union_Config_anthroConfig: return soap_out_PointerTons6__AnthroConfig(soap, "anthroConfig", -1, &a->anthroConfig, ""); case SOAP_UNION__ns6__union_Config_scaraConfig: return soap_out_PointerTons6__ScaraConfig(soap, "scaraConfig", -1, &a->scaraConfig, ""); case SOAP_UNION__ns6__union_Config_vrbxConfig: return soap_out_PointerTons6__VrbxConfig(soap, "vrbxConfig", -1, &a->vrbxConfig, ""); default: break; } return SOAP_OK; } SOAP_FMAC3 union _ns6__union_Config * SOAP_FMAC4 soap_in__ns6__union_Config(struct soap *soap, int *choice, union _ns6__union_Config *a) { soap->error = SOAP_TAG_MISMATCH; a->anthroConfig = NULL; if (soap->error == SOAP_TAG_MISMATCH && soap_in_PointerTons6__AnthroConfig(soap, "anthroConfig", &a->anthroConfig, "ns6:AnthroConfig")) { *choice = SOAP_UNION__ns6__union_Config_anthroConfig; return a; } a->scaraConfig = NULL; if (soap->error == SOAP_TAG_MISMATCH && soap_in_PointerTons6__ScaraConfig(soap, "scaraConfig", &a->scaraConfig, "ns6:ScaraConfig")) { *choice = SOAP_UNION__ns6__union_Config_scaraConfig; return a; } a->vrbxConfig = NULL; if (soap->error == SOAP_TAG_MISMATCH && soap_in_PointerTons6__VrbxConfig(soap, "vrbxConfig", &a->vrbxConfig, "ns6:VrbxConfig")) { *choice = SOAP_UNION__ns6__union_Config_vrbxConfig; return a; } *choice = 0; if (!soap->error) soap->error = SOAP_TAG_MISMATCH; return NULL; } #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Reason)) soap_serialize_SOAP_ENV__Reason(soap, *a); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Reason); if (soap_out_PointerToSOAP_ENV__Reason(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Reason *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason); if (id < 0) return soap->error; return soap_out_SOAP_ENV__Reason(soap, tag, id, *a, type); } SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason **p, const char *tag, const char *type) { if ((p = soap_in_PointerToSOAP_ENV__Reason(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (struct SOAP_ENV__Reason **)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_SOAP_ENV__Reason(soap, tag, *a, type))) return NULL; } else { a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } #endif #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Detail)) soap_serialize_SOAP_ENV__Detail(soap, *a); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Detail); if (soap_out_PointerToSOAP_ENV__Detail(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Detail *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail); if (id < 0) return soap->error; return soap_out_SOAP_ENV__Detail(soap, tag, id, *a, type); } SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail **p, const char *tag, const char *type) { if ((p = soap_in_PointerToSOAP_ENV__Detail(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (struct SOAP_ENV__Detail **)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_SOAP_ENV__Detail(soap, tag, *a, type))) return NULL; } else { a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } #endif #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code)) soap_serialize_SOAP_ENV__Code(soap, *a); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Code); if (soap_out_PointerToSOAP_ENV__Code(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code); if (id < 0) return soap->error; return soap_out_SOAP_ENV__Code(soap, tag, id, *a, type); } SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code **p, const char *tag, const char *type) { if ((p = soap_in_PointerToSOAP_ENV__Code(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (struct SOAP_ENV__Code **)soap_malloc(soap, sizeof(struct SOAP_ENV__Code *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_SOAP_ENV__Code(soap, tag, *a, type))) return NULL; } else { a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } #endif SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__setPowerResponse(struct soap *soap, _ns6__setPowerResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__setPowerResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__setPowerResponse(struct soap *soap, _ns6__setPowerResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__setPowerResponse); if (soap_out_PointerTo_ns6__setPowerResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__setPowerResponse(struct soap *soap, const char *tag, int id, _ns6__setPowerResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__setPowerResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__setPowerResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__setPowerResponse(struct soap *soap, _ns6__setPowerResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__setPowerResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__setPowerResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__setPowerResponse(struct soap *soap, const char *tag, _ns6__setPowerResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__setPowerResponse **)soap_malloc(soap, sizeof(_ns6__setPowerResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__setPowerResponse *)soap_instantiate__ns6__setPowerResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__setPowerResponse ** p = (_ns6__setPowerResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__setPowerResponse, sizeof(_ns6__setPowerResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__setPower(struct soap *soap, _ns6__setPower *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__setPower)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__setPower(struct soap *soap, _ns6__setPower *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__setPower); if (soap_out_PointerTo_ns6__setPower(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__setPower(struct soap *soap, const char *tag, int id, _ns6__setPower *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__setPower); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__setPower ** SOAP_FMAC4 soap_get_PointerTo_ns6__setPower(struct soap *soap, _ns6__setPower **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__setPower(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__setPower ** SOAP_FMAC4 soap_in_PointerTo_ns6__setPower(struct soap *soap, const char *tag, _ns6__setPower **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__setPower **)soap_malloc(soap, sizeof(_ns6__setPower *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__setPower *)soap_instantiate__ns6__setPower(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__setPower ** p = (_ns6__setPower **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__setPower, sizeof(_ns6__setPower), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__MotionAndRobotsPos(struct soap *soap, _ns6__MotionAndRobotsPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__MotionAndRobotsPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__MotionAndRobotsPos(struct soap *soap, _ns6__MotionAndRobotsPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__MotionAndRobotsPos); if (soap_out_PointerTo_ns6__MotionAndRobotsPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__MotionAndRobotsPos(struct soap *soap, const char *tag, int id, _ns6__MotionAndRobotsPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__MotionAndRobotsPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__MotionAndRobotsPos ** SOAP_FMAC4 soap_get_PointerTo_ns6__MotionAndRobotsPos(struct soap *soap, _ns6__MotionAndRobotsPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__MotionAndRobotsPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__MotionAndRobotsPos ** SOAP_FMAC4 soap_in_PointerTo_ns6__MotionAndRobotsPos(struct soap *soap, const char *tag, _ns6__MotionAndRobotsPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__MotionAndRobotsPos **)soap_malloc(soap, sizeof(_ns6__MotionAndRobotsPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__MotionAndRobotsPos *)soap_instantiate__ns6__MotionAndRobotsPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__MotionAndRobotsPos ** p = (_ns6__MotionAndRobotsPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__MotionAndRobotsPos, sizeof(_ns6__MotionAndRobotsPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__schedulerRefresh(struct soap *soap, _ns6__schedulerRefresh *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__schedulerRefresh)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__schedulerRefresh(struct soap *soap, _ns6__schedulerRefresh *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__schedulerRefresh); if (soap_out_PointerTo_ns6__schedulerRefresh(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__schedulerRefresh(struct soap *soap, const char *tag, int id, _ns6__schedulerRefresh *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__schedulerRefresh); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__schedulerRefresh ** SOAP_FMAC4 soap_get_PointerTo_ns6__schedulerRefresh(struct soap *soap, _ns6__schedulerRefresh **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__schedulerRefresh(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__schedulerRefresh ** SOAP_FMAC4 soap_in_PointerTo_ns6__schedulerRefresh(struct soap *soap, const char *tag, _ns6__schedulerRefresh **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__schedulerRefresh **)soap_malloc(soap, sizeof(_ns6__schedulerRefresh *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__schedulerRefresh *)soap_instantiate__ns6__schedulerRefresh(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__schedulerRefresh ** p = (_ns6__schedulerRefresh **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__schedulerRefresh, sizeof(_ns6__schedulerRefresh), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__setSchedulingModeResponse(struct soap *soap, _ns6__setSchedulingModeResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__setSchedulingModeResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__setSchedulingModeResponse(struct soap *soap, _ns6__setSchedulingModeResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__setSchedulingModeResponse); if (soap_out_PointerTo_ns6__setSchedulingModeResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__setSchedulingModeResponse(struct soap *soap, const char *tag, int id, _ns6__setSchedulingModeResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__setSchedulingModeResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__setSchedulingModeResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__setSchedulingModeResponse(struct soap *soap, _ns6__setSchedulingModeResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__setSchedulingModeResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__setSchedulingModeResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__setSchedulingModeResponse(struct soap *soap, const char *tag, _ns6__setSchedulingModeResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__setSchedulingModeResponse **)soap_malloc(soap, sizeof(_ns6__setSchedulingModeResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__setSchedulingModeResponse *)soap_instantiate__ns6__setSchedulingModeResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__setSchedulingModeResponse ** p = (_ns6__setSchedulingModeResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__setSchedulingModeResponse, sizeof(_ns6__setSchedulingModeResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__setSchedulingMode(struct soap *soap, _ns6__setSchedulingMode *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__setSchedulingMode)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__setSchedulingMode(struct soap *soap, _ns6__setSchedulingMode *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__setSchedulingMode); if (soap_out_PointerTo_ns6__setSchedulingMode(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__setSchedulingMode(struct soap *soap, const char *tag, int id, _ns6__setSchedulingMode *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__setSchedulingMode); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__setSchedulingMode ** SOAP_FMAC4 soap_get_PointerTo_ns6__setSchedulingMode(struct soap *soap, _ns6__setSchedulingMode **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__setSchedulingMode(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__setSchedulingMode ** SOAP_FMAC4 soap_in_PointerTo_ns6__setSchedulingMode(struct soap *soap, const char *tag, _ns6__setSchedulingMode **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__setSchedulingMode **)soap_malloc(soap, sizeof(_ns6__setSchedulingMode *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__setSchedulingMode *)soap_instantiate__ns6__setSchedulingMode(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__setSchedulingMode ** p = (_ns6__setSchedulingMode **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__setSchedulingMode, sizeof(_ns6__setSchedulingMode), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__restartMotion(struct soap *soap, _ns6__restartMotion *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__restartMotion)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__restartMotion(struct soap *soap, _ns6__restartMotion *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__restartMotion); if (soap_out_PointerTo_ns6__restartMotion(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__restartMotion(struct soap *soap, const char *tag, int id, _ns6__restartMotion *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__restartMotion); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__restartMotion ** SOAP_FMAC4 soap_get_PointerTo_ns6__restartMotion(struct soap *soap, _ns6__restartMotion **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__restartMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__restartMotion ** SOAP_FMAC4 soap_in_PointerTo_ns6__restartMotion(struct soap *soap, const char *tag, _ns6__restartMotion **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__restartMotion **)soap_malloc(soap, sizeof(_ns6__restartMotion *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__restartMotion *)soap_instantiate__ns6__restartMotion(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__restartMotion ** p = (_ns6__restartMotion **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__restartMotion, sizeof(_ns6__restartMotion), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__stopMotion(struct soap *soap, _ns6__stopMotion *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__stopMotion)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__stopMotion(struct soap *soap, _ns6__stopMotion *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__stopMotion); if (soap_out_PointerTo_ns6__stopMotion(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__stopMotion(struct soap *soap, const char *tag, int id, _ns6__stopMotion *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__stopMotion); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__stopMotion ** SOAP_FMAC4 soap_get_PointerTo_ns6__stopMotion(struct soap *soap, _ns6__stopMotion **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__stopMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__stopMotion ** SOAP_FMAC4 soap_in_PointerTo_ns6__stopMotion(struct soap *soap, const char *tag, _ns6__stopMotion **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__stopMotion **)soap_malloc(soap, sizeof(_ns6__stopMotion *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__stopMotion *)soap_instantiate__ns6__stopMotion(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__stopMotion ** p = (_ns6__stopMotion **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__stopMotion, sizeof(_ns6__stopMotion), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__motionResponse(struct soap *soap, _ns6__motionResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__motionResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__motionResponse(struct soap *soap, _ns6__motionResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__motionResponse); if (soap_out_PointerTo_ns6__motionResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__motionResponse(struct soap *soap, const char *tag, int id, _ns6__motionResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__motionResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__motionResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__motionResponse(struct soap *soap, _ns6__motionResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__motionResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__motionResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__motionResponse(struct soap *soap, const char *tag, _ns6__motionResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__motionResponse **)soap_malloc(soap, sizeof(_ns6__motionResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__motionResponse *)soap_instantiate__ns6__motionResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__motionResponse ** p = (_ns6__motionResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__motionResponse, sizeof(_ns6__motionResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__resetMotion(struct soap *soap, _ns6__resetMotion *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__resetMotion)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__resetMotion(struct soap *soap, _ns6__resetMotion *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__resetMotion); if (soap_out_PointerTo_ns6__resetMotion(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__resetMotion(struct soap *soap, const char *tag, int id, _ns6__resetMotion *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__resetMotion); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__resetMotion ** SOAP_FMAC4 soap_get_PointerTo_ns6__resetMotion(struct soap *soap, _ns6__resetMotion **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__resetMotion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__resetMotion ** SOAP_FMAC4 soap_in_PointerTo_ns6__resetMotion(struct soap *soap, const char *tag, _ns6__resetMotion **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__resetMotion **)soap_malloc(soap, sizeof(_ns6__resetMotion *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__resetMotion *)soap_instantiate__ns6__resetMotion(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__resetMotion ** p = (_ns6__resetMotion **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__resetMotion, sizeof(_ns6__resetMotion), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__moveC(struct soap *soap, _ns6__moveC *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__moveC)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__moveC(struct soap *soap, _ns6__moveC *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__moveC); if (soap_out_PointerTo_ns6__moveC(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__moveC(struct soap *soap, const char *tag, int id, _ns6__moveC *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__moveC); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__moveC ** SOAP_FMAC4 soap_get_PointerTo_ns6__moveC(struct soap *soap, _ns6__moveC **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__moveC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__moveC ** SOAP_FMAC4 soap_in_PointerTo_ns6__moveC(struct soap *soap, const char *tag, _ns6__moveC **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__moveC **)soap_malloc(soap, sizeof(_ns6__moveC *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__moveC *)soap_instantiate__ns6__moveC(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__moveC ** p = (_ns6__moveC **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__moveC, sizeof(_ns6__moveC), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__moveL(struct soap *soap, _ns6__moveL *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__moveL)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__moveL(struct soap *soap, _ns6__moveL *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__moveL); if (soap_out_PointerTo_ns6__moveL(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__moveL(struct soap *soap, const char *tag, int id, _ns6__moveL *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__moveL); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__moveL ** SOAP_FMAC4 soap_get_PointerTo_ns6__moveL(struct soap *soap, _ns6__moveL **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__moveL(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__moveL ** SOAP_FMAC4 soap_in_PointerTo_ns6__moveL(struct soap *soap, const char *tag, _ns6__moveL **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__moveL **)soap_malloc(soap, sizeof(_ns6__moveL *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__moveL *)soap_instantiate__ns6__moveL(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__moveL ** p = (_ns6__moveL **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__moveL, sizeof(_ns6__moveL), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__moveJC(struct soap *soap, _ns6__moveJC *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__moveJC)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__moveJC(struct soap *soap, _ns6__moveJC *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__moveJC); if (soap_out_PointerTo_ns6__moveJC(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__moveJC(struct soap *soap, const char *tag, int id, _ns6__moveJC *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__moveJC); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__moveJC ** SOAP_FMAC4 soap_get_PointerTo_ns6__moveJC(struct soap *soap, _ns6__moveJC **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__moveJC(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__moveJC ** SOAP_FMAC4 soap_in_PointerTo_ns6__moveJC(struct soap *soap, const char *tag, _ns6__moveJC **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__moveJC **)soap_malloc(soap, sizeof(_ns6__moveJC *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__moveJC *)soap_instantiate__ns6__moveJC(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__moveJC ** p = (_ns6__moveJC **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__moveJC, sizeof(_ns6__moveJC), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__moveResponse(struct soap *soap, _ns6__moveResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__moveResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__moveResponse(struct soap *soap, _ns6__moveResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__moveResponse); if (soap_out_PointerTo_ns6__moveResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__moveResponse(struct soap *soap, const char *tag, int id, _ns6__moveResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__moveResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__moveResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__moveResponse(struct soap *soap, _ns6__moveResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__moveResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__moveResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__moveResponse(struct soap *soap, const char *tag, _ns6__moveResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__moveResponse **)soap_malloc(soap, sizeof(_ns6__moveResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__moveResponse *)soap_instantiate__ns6__moveResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__moveResponse ** p = (_ns6__moveResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__moveResponse, sizeof(_ns6__moveResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__moveJJ(struct soap *soap, _ns6__moveJJ *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__moveJJ)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__moveJJ(struct soap *soap, _ns6__moveJJ *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__moveJJ); if (soap_out_PointerTo_ns6__moveJJ(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__moveJJ(struct soap *soap, const char *tag, int id, _ns6__moveJJ *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__moveJJ); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__moveJJ ** SOAP_FMAC4 soap_get_PointerTo_ns6__moveJJ(struct soap *soap, _ns6__moveJJ **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__moveJJ(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__moveJJ ** SOAP_FMAC4 soap_in_PointerTo_ns6__moveJJ(struct soap *soap, const char *tag, _ns6__moveJJ **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__moveJJ **)soap_malloc(soap, sizeof(_ns6__moveJJ *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__moveJJ *)soap_instantiate__ns6__moveJJ(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__moveJJ ** p = (_ns6__moveJJ **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__moveJJ, sizeof(_ns6__moveJJ), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__reverseKinResponse(struct soap *soap, _ns6__reverseKinResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__reverseKinResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__reverseKinResponse(struct soap *soap, _ns6__reverseKinResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__reverseKinResponse); if (soap_out_PointerTo_ns6__reverseKinResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__reverseKinResponse(struct soap *soap, const char *tag, int id, _ns6__reverseKinResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__reverseKinResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__reverseKinResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__reverseKinResponse(struct soap *soap, _ns6__reverseKinResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__reverseKinResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__reverseKinResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__reverseKinResponse(struct soap *soap, const char *tag, _ns6__reverseKinResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__reverseKinResponse **)soap_malloc(soap, sizeof(_ns6__reverseKinResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__reverseKinResponse *)soap_instantiate__ns6__reverseKinResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__reverseKinResponse ** p = (_ns6__reverseKinResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__reverseKinResponse, sizeof(_ns6__reverseKinResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__reverseKin(struct soap *soap, _ns6__reverseKin *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__reverseKin)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__reverseKin(struct soap *soap, _ns6__reverseKin *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__reverseKin); if (soap_out_PointerTo_ns6__reverseKin(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__reverseKin(struct soap *soap, const char *tag, int id, _ns6__reverseKin *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__reverseKin); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__reverseKin ** SOAP_FMAC4 soap_get_PointerTo_ns6__reverseKin(struct soap *soap, _ns6__reverseKin **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__reverseKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__reverseKin ** SOAP_FMAC4 soap_in_PointerTo_ns6__reverseKin(struct soap *soap, const char *tag, _ns6__reverseKin **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__reverseKin **)soap_malloc(soap, sizeof(_ns6__reverseKin *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__reverseKin *)soap_instantiate__ns6__reverseKin(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__reverseKin ** p = (_ns6__reverseKin **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__reverseKin, sizeof(_ns6__reverseKin), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__forwardKinResponse(struct soap *soap, _ns6__forwardKinResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__forwardKinResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__forwardKinResponse(struct soap *soap, _ns6__forwardKinResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__forwardKinResponse); if (soap_out_PointerTo_ns6__forwardKinResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__forwardKinResponse(struct soap *soap, const char *tag, int id, _ns6__forwardKinResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__forwardKinResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__forwardKinResponse ** SOAP_FMAC4 soap_get_PointerTo_ns6__forwardKinResponse(struct soap *soap, _ns6__forwardKinResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__forwardKinResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__forwardKinResponse ** SOAP_FMAC4 soap_in_PointerTo_ns6__forwardKinResponse(struct soap *soap, const char *tag, _ns6__forwardKinResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__forwardKinResponse **)soap_malloc(soap, sizeof(_ns6__forwardKinResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__forwardKinResponse *)soap_instantiate__ns6__forwardKinResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__forwardKinResponse ** p = (_ns6__forwardKinResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__forwardKinResponse, sizeof(_ns6__forwardKinResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns6__forwardKin(struct soap *soap, _ns6__forwardKin *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns6__forwardKin)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns6__forwardKin(struct soap *soap, _ns6__forwardKin *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns6__forwardKin); if (soap_out_PointerTo_ns6__forwardKin(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns6__forwardKin(struct soap *soap, const char *tag, int id, _ns6__forwardKin *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns6__forwardKin); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns6__forwardKin ** SOAP_FMAC4 soap_get_PointerTo_ns6__forwardKin(struct soap *soap, _ns6__forwardKin **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns6__forwardKin(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns6__forwardKin ** SOAP_FMAC4 soap_in_PointerTo_ns6__forwardKin(struct soap *soap, const char *tag, _ns6__forwardKin **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns6__forwardKin **)soap_malloc(soap, sizeof(_ns6__forwardKin *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns6__forwardKin *)soap_instantiate__ns6__forwardKin(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns6__forwardKin ** p = (_ns6__forwardKin **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns6__forwardKin, sizeof(_ns6__forwardKin), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getJointRangeResponse(struct soap *soap, _ns2__getJointRangeResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getJointRangeResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getJointRangeResponse(struct soap *soap, _ns2__getJointRangeResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getJointRangeResponse); if (soap_out_PointerTo_ns2__getJointRangeResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getJointRangeResponse(struct soap *soap, const char *tag, int id, _ns2__getJointRangeResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getJointRangeResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getJointRangeResponse ** SOAP_FMAC4 soap_get_PointerTo_ns2__getJointRangeResponse(struct soap *soap, _ns2__getJointRangeResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getJointRangeResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getJointRangeResponse ** SOAP_FMAC4 soap_in_PointerTo_ns2__getJointRangeResponse(struct soap *soap, const char *tag, _ns2__getJointRangeResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getJointRangeResponse **)soap_malloc(soap, sizeof(_ns2__getJointRangeResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getJointRangeResponse *)soap_instantiate__ns2__getJointRangeResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getJointRangeResponse ** p = (_ns2__getJointRangeResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getJointRangeResponse, sizeof(_ns2__getJointRangeResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getJointRange(struct soap *soap, _ns2__getJointRange *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getJointRange)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getJointRange(struct soap *soap, _ns2__getJointRange *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getJointRange); if (soap_out_PointerTo_ns2__getJointRange(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getJointRange(struct soap *soap, const char *tag, int id, _ns2__getJointRange *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getJointRange); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getJointRange ** SOAP_FMAC4 soap_get_PointerTo_ns2__getJointRange(struct soap *soap, _ns2__getJointRange **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getJointRange(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getJointRange ** SOAP_FMAC4 soap_in_PointerTo_ns2__getJointRange(struct soap *soap, const char *tag, _ns2__getJointRange **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getJointRange **)soap_malloc(soap, sizeof(_ns2__getJointRange *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getJointRange *)soap_instantiate__ns2__getJointRange(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getJointRange ** p = (_ns2__getJointRange **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getJointRange, sizeof(_ns2__getJointRange), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getRecordResponse(struct soap *soap, _ns2__getRecordResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getRecordResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getRecordResponse(struct soap *soap, _ns2__getRecordResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getRecordResponse); if (soap_out_PointerTo_ns2__getRecordResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getRecordResponse(struct soap *soap, const char *tag, int id, _ns2__getRecordResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getRecordResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getRecordResponse ** SOAP_FMAC4 soap_get_PointerTo_ns2__getRecordResponse(struct soap *soap, _ns2__getRecordResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getRecordResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getRecordResponse ** SOAP_FMAC4 soap_in_PointerTo_ns2__getRecordResponse(struct soap *soap, const char *tag, _ns2__getRecordResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getRecordResponse **)soap_malloc(soap, sizeof(_ns2__getRecordResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getRecordResponse *)soap_instantiate__ns2__getRecordResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getRecordResponse ** p = (_ns2__getRecordResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getRecordResponse, sizeof(_ns2__getRecordResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getRecord(struct soap *soap, _ns2__getRecord *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getRecord)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getRecord(struct soap *soap, _ns2__getRecord *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getRecord); if (soap_out_PointerTo_ns2__getRecord(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getRecord(struct soap *soap, const char *tag, int id, _ns2__getRecord *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getRecord); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getRecord ** SOAP_FMAC4 soap_get_PointerTo_ns2__getRecord(struct soap *soap, _ns2__getRecord **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getRecord(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getRecord ** SOAP_FMAC4 soap_in_PointerTo_ns2__getRecord(struct soap *soap, const char *tag, _ns2__getRecord **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getRecord **)soap_malloc(soap, sizeof(_ns2__getRecord *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getRecord *)soap_instantiate__ns2__getRecord(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getRecord ** p = (_ns2__getRecord **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getRecord, sizeof(_ns2__getRecord), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getRecordsResponse(struct soap *soap, _ns2__getRecordsResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getRecordsResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getRecordsResponse(struct soap *soap, _ns2__getRecordsResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getRecordsResponse); if (soap_out_PointerTo_ns2__getRecordsResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getRecordsResponse(struct soap *soap, const char *tag, int id, _ns2__getRecordsResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getRecordsResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getRecordsResponse ** SOAP_FMAC4 soap_get_PointerTo_ns2__getRecordsResponse(struct soap *soap, _ns2__getRecordsResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getRecordsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getRecordsResponse ** SOAP_FMAC4 soap_in_PointerTo_ns2__getRecordsResponse(struct soap *soap, const char *tag, _ns2__getRecordsResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getRecordsResponse **)soap_malloc(soap, sizeof(_ns2__getRecordsResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getRecordsResponse *)soap_instantiate__ns2__getRecordsResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getRecordsResponse ** p = (_ns2__getRecordsResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getRecordsResponse, sizeof(_ns2__getRecordsResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getRecords(struct soap *soap, _ns2__getRecords *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getRecords)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getRecords(struct soap *soap, _ns2__getRecords *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getRecords); if (soap_out_PointerTo_ns2__getRecords(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getRecords(struct soap *soap, const char *tag, int id, _ns2__getRecords *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getRecords); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getRecords ** SOAP_FMAC4 soap_get_PointerTo_ns2__getRecords(struct soap *soap, _ns2__getRecords **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getRecords(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getRecords ** SOAP_FMAC4 soap_in_PointerTo_ns2__getRecords(struct soap *soap, const char *tag, _ns2__getRecords **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getRecords **)soap_malloc(soap, sizeof(_ns2__getRecords *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getRecords *)soap_instantiate__ns2__getRecords(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getRecords ** p = (_ns2__getRecords **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getRecords, sizeof(_ns2__getRecords), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getApplicationDatasResponse(struct soap *soap, _ns2__getApplicationDatasResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getApplicationDatasResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getApplicationDatasResponse(struct soap *soap, _ns2__getApplicationDatasResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getApplicationDatasResponse); if (soap_out_PointerTo_ns2__getApplicationDatasResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getApplicationDatasResponse(struct soap *soap, const char *tag, int id, _ns2__getApplicationDatasResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getApplicationDatasResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getApplicationDatasResponse ** SOAP_FMAC4 soap_get_PointerTo_ns2__getApplicationDatasResponse(struct soap *soap, _ns2__getApplicationDatasResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getApplicationDatasResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getApplicationDatasResponse ** SOAP_FMAC4 soap_in_PointerTo_ns2__getApplicationDatasResponse(struct soap *soap, const char *tag, _ns2__getApplicationDatasResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getApplicationDatasResponse **)soap_malloc(soap, sizeof(_ns2__getApplicationDatasResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getApplicationDatasResponse *)soap_instantiate__ns2__getApplicationDatasResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getApplicationDatasResponse ** p = (_ns2__getApplicationDatasResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getApplicationDatasResponse, sizeof(_ns2__getApplicationDatasResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getApplicationDatas(struct soap *soap, _ns2__getApplicationDatas *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getApplicationDatas)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getApplicationDatas(struct soap *soap, _ns2__getApplicationDatas *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getApplicationDatas); if (soap_out_PointerTo_ns2__getApplicationDatas(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getApplicationDatas(struct soap *soap, const char *tag, int id, _ns2__getApplicationDatas *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getApplicationDatas); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getApplicationDatas ** SOAP_FMAC4 soap_get_PointerTo_ns2__getApplicationDatas(struct soap *soap, _ns2__getApplicationDatas **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getApplicationDatas(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getApplicationDatas ** SOAP_FMAC4 soap_in_PointerTo_ns2__getApplicationDatas(struct soap *soap, const char *tag, _ns2__getApplicationDatas **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getApplicationDatas **)soap_malloc(soap, sizeof(_ns2__getApplicationDatas *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getApplicationDatas *)soap_instantiate__ns2__getApplicationDatas(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getApplicationDatas ** p = (_ns2__getApplicationDatas **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getApplicationDatas, sizeof(_ns2__getApplicationDatas), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getApplicationsResponse(struct soap *soap, _ns2__getApplicationsResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getApplicationsResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getApplicationsResponse(struct soap *soap, _ns2__getApplicationsResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getApplicationsResponse); if (soap_out_PointerTo_ns2__getApplicationsResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getApplicationsResponse(struct soap *soap, const char *tag, int id, _ns2__getApplicationsResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getApplicationsResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getApplicationsResponse ** SOAP_FMAC4 soap_get_PointerTo_ns2__getApplicationsResponse(struct soap *soap, _ns2__getApplicationsResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getApplicationsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getApplicationsResponse ** SOAP_FMAC4 soap_in_PointerTo_ns2__getApplicationsResponse(struct soap *soap, const char *tag, _ns2__getApplicationsResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getApplicationsResponse **)soap_malloc(soap, sizeof(_ns2__getApplicationsResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getApplicationsResponse *)soap_instantiate__ns2__getApplicationsResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getApplicationsResponse ** p = (_ns2__getApplicationsResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getApplicationsResponse, sizeof(_ns2__getApplicationsResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns2__getApplications(struct soap *soap, _ns2__getApplications *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns2__getApplications)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns2__getApplications(struct soap *soap, _ns2__getApplications *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns2__getApplications); if (soap_out_PointerTo_ns2__getApplications(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns2__getApplications(struct soap *soap, const char *tag, int id, _ns2__getApplications *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns2__getApplications); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns2__getApplications ** SOAP_FMAC4 soap_get_PointerTo_ns2__getApplications(struct soap *soap, _ns2__getApplications **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns2__getApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns2__getApplications ** SOAP_FMAC4 soap_in_PointerTo_ns2__getApplications(struct soap *soap, const char *tag, _ns2__getApplications **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns2__getApplications **)soap_malloc(soap, sizeof(_ns2__getApplications *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns2__getApplications *)soap_instantiate__ns2__getApplications(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns2__getApplications ** p = (_ns2__getApplications **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns2__getApplications, sizeof(_ns2__getApplications), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__setRobotPosResponse(struct soap *soap, _ns1__setRobotPosResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__setRobotPosResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__setRobotPosResponse(struct soap *soap, _ns1__setRobotPosResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__setRobotPosResponse); if (soap_out_PointerTo_ns1__setRobotPosResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__setRobotPosResponse(struct soap *soap, const char *tag, int id, _ns1__setRobotPosResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__setRobotPosResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__setRobotPosResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__setRobotPosResponse(struct soap *soap, _ns1__setRobotPosResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__setRobotPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__setRobotPosResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__setRobotPosResponse(struct soap *soap, const char *tag, _ns1__setRobotPosResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__setRobotPosResponse **)soap_malloc(soap, sizeof(_ns1__setRobotPosResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__setRobotPosResponse *)soap_instantiate__ns1__setRobotPosResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__setRobotPosResponse ** p = (_ns1__setRobotPosResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__setRobotPosResponse, sizeof(_ns1__setRobotPosResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__setRobotJointPos(struct soap *soap, _ns1__setRobotJointPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__setRobotJointPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__setRobotJointPos(struct soap *soap, _ns1__setRobotJointPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__setRobotJointPos); if (soap_out_PointerTo_ns1__setRobotJointPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__setRobotJointPos(struct soap *soap, const char *tag, int id, _ns1__setRobotJointPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__setRobotJointPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__setRobotJointPos ** SOAP_FMAC4 soap_get_PointerTo_ns1__setRobotJointPos(struct soap *soap, _ns1__setRobotJointPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__setRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__setRobotJointPos ** SOAP_FMAC4 soap_in_PointerTo_ns1__setRobotJointPos(struct soap *soap, const char *tag, _ns1__setRobotJointPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__setRobotJointPos **)soap_malloc(soap, sizeof(_ns1__setRobotJointPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__setRobotJointPos *)soap_instantiate__ns1__setRobotJointPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__setRobotJointPos ** p = (_ns1__setRobotJointPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__setRobotJointPos, sizeof(_ns1__setRobotJointPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobotJntCartPosResponse(struct soap *soap, _ns1__getRobotJntCartPosResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobotJntCartPosResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobotJntCartPosResponse(struct soap *soap, _ns1__getRobotJntCartPosResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobotJntCartPosResponse); if (soap_out_PointerTo_ns1__getRobotJntCartPosResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobotJntCartPosResponse(struct soap *soap, const char *tag, int id, _ns1__getRobotJntCartPosResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobotJntCartPosResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobotJntCartPosResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobotJntCartPosResponse(struct soap *soap, _ns1__getRobotJntCartPosResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobotJntCartPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobotJntCartPosResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobotJntCartPosResponse(struct soap *soap, const char *tag, _ns1__getRobotJntCartPosResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobotJntCartPosResponse **)soap_malloc(soap, sizeof(_ns1__getRobotJntCartPosResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobotJntCartPosResponse *)soap_instantiate__ns1__getRobotJntCartPosResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobotJntCartPosResponse ** p = (_ns1__getRobotJntCartPosResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobotJntCartPosResponse, sizeof(_ns1__getRobotJntCartPosResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobotJntCartPos(struct soap *soap, _ns1__getRobotJntCartPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobotJntCartPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobotJntCartPos(struct soap *soap, _ns1__getRobotJntCartPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobotJntCartPos); if (soap_out_PointerTo_ns1__getRobotJntCartPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobotJntCartPos(struct soap *soap, const char *tag, int id, _ns1__getRobotJntCartPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobotJntCartPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobotJntCartPos ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobotJntCartPos(struct soap *soap, _ns1__getRobotJntCartPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobotJntCartPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobotJntCartPos ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobotJntCartPos(struct soap *soap, const char *tag, _ns1__getRobotJntCartPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobotJntCartPos **)soap_malloc(soap, sizeof(_ns1__getRobotJntCartPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobotJntCartPos *)soap_instantiate__ns1__getRobotJntCartPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobotJntCartPos ** p = (_ns1__getRobotJntCartPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobotJntCartPos, sizeof(_ns1__getRobotJntCartPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobotJointPosResponse(struct soap *soap, _ns1__getRobotJointPosResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobotJointPosResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobotJointPosResponse(struct soap *soap, _ns1__getRobotJointPosResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobotJointPosResponse); if (soap_out_PointerTo_ns1__getRobotJointPosResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobotJointPosResponse(struct soap *soap, const char *tag, int id, _ns1__getRobotJointPosResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobotJointPosResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobotJointPosResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobotJointPosResponse(struct soap *soap, _ns1__getRobotJointPosResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobotJointPosResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobotJointPosResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobotJointPosResponse(struct soap *soap, const char *tag, _ns1__getRobotJointPosResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobotJointPosResponse **)soap_malloc(soap, sizeof(_ns1__getRobotJointPosResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobotJointPosResponse *)soap_instantiate__ns1__getRobotJointPosResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobotJointPosResponse ** p = (_ns1__getRobotJointPosResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobotJointPosResponse, sizeof(_ns1__getRobotJointPosResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobotJointPos(struct soap *soap, _ns1__getRobotJointPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobotJointPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobotJointPos(struct soap *soap, _ns1__getRobotJointPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobotJointPos); if (soap_out_PointerTo_ns1__getRobotJointPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobotJointPos(struct soap *soap, const char *tag, int id, _ns1__getRobotJointPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobotJointPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobotJointPos ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobotJointPos(struct soap *soap, _ns1__getRobotJointPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobotJointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobotJointPos ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobotJointPos(struct soap *soap, const char *tag, _ns1__getRobotJointPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobotJointPos **)soap_malloc(soap, sizeof(_ns1__getRobotJointPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobotJointPos *)soap_instantiate__ns1__getRobotJointPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobotJointPos ** p = (_ns1__getRobotJointPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobotJointPos, sizeof(_ns1__getRobotJointPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobotsResponse(struct soap *soap, _ns1__getRobotsResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobotsResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobotsResponse(struct soap *soap, _ns1__getRobotsResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobotsResponse); if (soap_out_PointerTo_ns1__getRobotsResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobotsResponse(struct soap *soap, const char *tag, int id, _ns1__getRobotsResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobotsResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobotsResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobotsResponse(struct soap *soap, _ns1__getRobotsResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobotsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobotsResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobotsResponse(struct soap *soap, const char *tag, _ns1__getRobotsResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobotsResponse **)soap_malloc(soap, sizeof(_ns1__getRobotsResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobotsResponse *)soap_instantiate__ns1__getRobotsResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobotsResponse ** p = (_ns1__getRobotsResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobotsResponse, sizeof(_ns1__getRobotsResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getRobots(struct soap *soap, _ns1__getRobots *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getRobots)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getRobots(struct soap *soap, _ns1__getRobots *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getRobots); if (soap_out_PointerTo_ns1__getRobots(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getRobots(struct soap *soap, const char *tag, int id, _ns1__getRobots *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getRobots); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getRobots ** SOAP_FMAC4 soap_get_PointerTo_ns1__getRobots(struct soap *soap, _ns1__getRobots **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getRobots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getRobots ** SOAP_FMAC4 soap_in_PointerTo_ns1__getRobots(struct soap *soap, const char *tag, _ns1__getRobots **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getRobots **)soap_malloc(soap, sizeof(_ns1__getRobots *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getRobots *)soap_instantiate__ns1__getRobots(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getRobots ** p = (_ns1__getRobots **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getRobots, sizeof(_ns1__getRobots), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__logoutResponse(struct soap *soap, _ns1__logoutResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__logoutResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__logoutResponse(struct soap *soap, _ns1__logoutResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__logoutResponse); if (soap_out_PointerTo_ns1__logoutResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__logoutResponse(struct soap *soap, const char *tag, int id, _ns1__logoutResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__logoutResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__logoutResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__logoutResponse(struct soap *soap, _ns1__logoutResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__logoutResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__logoutResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__logoutResponse(struct soap *soap, const char *tag, _ns1__logoutResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__logoutResponse **)soap_malloc(soap, sizeof(_ns1__logoutResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__logoutResponse *)soap_instantiate__ns1__logoutResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__logoutResponse ** p = (_ns1__logoutResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__logoutResponse, sizeof(_ns1__logoutResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__logout(struct soap *soap, _ns1__logout *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__logout)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__logout(struct soap *soap, _ns1__logout *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__logout); if (soap_out_PointerTo_ns1__logout(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__logout(struct soap *soap, const char *tag, int id, _ns1__logout *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__logout); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__logout ** SOAP_FMAC4 soap_get_PointerTo_ns1__logout(struct soap *soap, _ns1__logout **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__logout(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__logout ** SOAP_FMAC4 soap_in_PointerTo_ns1__logout(struct soap *soap, const char *tag, _ns1__logout **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__logout **)soap_malloc(soap, sizeof(_ns1__logout *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__logout *)soap_instantiate__ns1__logout(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__logout ** p = (_ns1__logout **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__logout, sizeof(_ns1__logout), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__loginResponse(struct soap *soap, _ns1__loginResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__loginResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__loginResponse(struct soap *soap, _ns1__loginResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__loginResponse); if (soap_out_PointerTo_ns1__loginResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__loginResponse(struct soap *soap, const char *tag, int id, _ns1__loginResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__loginResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__loginResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__loginResponse(struct soap *soap, _ns1__loginResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__loginResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__loginResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__loginResponse(struct soap *soap, const char *tag, _ns1__loginResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__loginResponse **)soap_malloc(soap, sizeof(_ns1__loginResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__loginResponse *)soap_instantiate__ns1__loginResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__loginResponse ** p = (_ns1__loginResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__loginResponse, sizeof(_ns1__loginResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__login(struct soap *soap, _ns1__login *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__login)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__login(struct soap *soap, _ns1__login *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__login); if (soap_out_PointerTo_ns1__login(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__login(struct soap *soap, const char *tag, int id, _ns1__login *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__login); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__login ** SOAP_FMAC4 soap_get_PointerTo_ns1__login(struct soap *soap, _ns1__login **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__login(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__login ** SOAP_FMAC4 soap_in_PointerTo_ns1__login(struct soap *soap, const char *tag, _ns1__login **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__login **)soap_malloc(soap, sizeof(_ns1__login *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__login *)soap_instantiate__ns1__login(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__login ** p = (_ns1__login **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__login, sizeof(_ns1__login), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getCS8VersionsResponse(struct soap *soap, _ns1__getCS8VersionsResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getCS8VersionsResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getCS8VersionsResponse(struct soap *soap, _ns1__getCS8VersionsResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getCS8VersionsResponse); if (soap_out_PointerTo_ns1__getCS8VersionsResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getCS8VersionsResponse(struct soap *soap, const char *tag, int id, _ns1__getCS8VersionsResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getCS8VersionsResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getCS8VersionsResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__getCS8VersionsResponse(struct soap *soap, _ns1__getCS8VersionsResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getCS8VersionsResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getCS8VersionsResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__getCS8VersionsResponse(struct soap *soap, const char *tag, _ns1__getCS8VersionsResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getCS8VersionsResponse **)soap_malloc(soap, sizeof(_ns1__getCS8VersionsResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getCS8VersionsResponse *)soap_instantiate__ns1__getCS8VersionsResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getCS8VersionsResponse ** p = (_ns1__getCS8VersionsResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getCS8VersionsResponse, sizeof(_ns1__getCS8VersionsResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getCS8Versions(struct soap *soap, _ns1__getCS8Versions *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getCS8Versions)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getCS8Versions(struct soap *soap, _ns1__getCS8Versions *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getCS8Versions); if (soap_out_PointerTo_ns1__getCS8Versions(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getCS8Versions(struct soap *soap, const char *tag, int id, _ns1__getCS8Versions *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getCS8Versions); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getCS8Versions ** SOAP_FMAC4 soap_get_PointerTo_ns1__getCS8Versions(struct soap *soap, _ns1__getCS8Versions **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getCS8Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getCS8Versions ** SOAP_FMAC4 soap_in_PointerTo_ns1__getCS8Versions(struct soap *soap, const char *tag, _ns1__getCS8Versions **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getCS8Versions **)soap_malloc(soap, sizeof(_ns1__getCS8Versions *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getCS8Versions *)soap_instantiate__ns1__getCS8Versions(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getCS8Versions ** p = (_ns1__getCS8Versions **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getCS8Versions, sizeof(_ns1__getCS8Versions), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__pingResponse(struct soap *soap, _ns1__pingResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__pingResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__pingResponse(struct soap *soap, _ns1__pingResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__pingResponse); if (soap_out_PointerTo_ns1__pingResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__pingResponse(struct soap *soap, const char *tag, int id, _ns1__pingResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__pingResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__pingResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__pingResponse(struct soap *soap, _ns1__pingResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__pingResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__pingResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__pingResponse(struct soap *soap, const char *tag, _ns1__pingResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__pingResponse **)soap_malloc(soap, sizeof(_ns1__pingResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__pingResponse *)soap_instantiate__ns1__pingResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__pingResponse ** p = (_ns1__pingResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__pingResponse, sizeof(_ns1__pingResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__ping(struct soap *soap, _ns1__ping *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__ping)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__ping(struct soap *soap, _ns1__ping *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__ping); if (soap_out_PointerTo_ns1__ping(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__ping(struct soap *soap, const char *tag, int id, _ns1__ping *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__ping); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__ping ** SOAP_FMAC4 soap_get_PointerTo_ns1__ping(struct soap *soap, _ns1__ping **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__ping(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__ping ** SOAP_FMAC4 soap_in_PointerTo_ns1__ping(struct soap *soap, const char *tag, _ns1__ping **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__ping **)soap_malloc(soap, sizeof(_ns1__ping *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__ping *)soap_instantiate__ns1__ping(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__ping ** p = (_ns1__ping **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__ping, sizeof(_ns1__ping), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getSoapServerVersionResponse(struct soap *soap, _ns1__getSoapServerVersionResponse *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getSoapServerVersionResponse)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getSoapServerVersionResponse(struct soap *soap, _ns1__getSoapServerVersionResponse *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getSoapServerVersionResponse); if (soap_out_PointerTo_ns1__getSoapServerVersionResponse(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getSoapServerVersionResponse(struct soap *soap, const char *tag, int id, _ns1__getSoapServerVersionResponse *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getSoapServerVersionResponse); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getSoapServerVersionResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__getSoapServerVersionResponse(struct soap *soap, _ns1__getSoapServerVersionResponse **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getSoapServerVersionResponse(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getSoapServerVersionResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__getSoapServerVersionResponse(struct soap *soap, const char *tag, _ns1__getSoapServerVersionResponse **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getSoapServerVersionResponse **)soap_malloc(soap, sizeof(_ns1__getSoapServerVersionResponse *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getSoapServerVersionResponse *)soap_instantiate__ns1__getSoapServerVersionResponse(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getSoapServerVersionResponse ** p = (_ns1__getSoapServerVersionResponse **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getSoapServerVersionResponse, sizeof(_ns1__getSoapServerVersionResponse), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__getSoapServerVersion(struct soap *soap, _ns1__getSoapServerVersion *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE__ns1__getSoapServerVersion)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__getSoapServerVersion(struct soap *soap, _ns1__getSoapServerVersion *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_ns1__getSoapServerVersion); if (soap_out_PointerTo_ns1__getSoapServerVersion(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__getSoapServerVersion(struct soap *soap, const char *tag, int id, _ns1__getSoapServerVersion *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE__ns1__getSoapServerVersion); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 _ns1__getSoapServerVersion ** SOAP_FMAC4 soap_get_PointerTo_ns1__getSoapServerVersion(struct soap *soap, _ns1__getSoapServerVersion **p, const char *tag, const char *type) { if ((p = soap_in_PointerTo_ns1__getSoapServerVersion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 _ns1__getSoapServerVersion ** SOAP_FMAC4 soap_in_PointerTo_ns1__getSoapServerVersion(struct soap *soap, const char *tag, _ns1__getSoapServerVersion **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (_ns1__getSoapServerVersion **)soap_malloc(soap, sizeof(_ns1__getSoapServerVersion *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (_ns1__getSoapServerVersion *)soap_instantiate__ns1__getSoapServerVersion(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { _ns1__getSoapServerVersion ** p = (_ns1__getSoapServerVersion **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE__ns1__getSoapServerVersion, sizeof(_ns1__getSoapServerVersion), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__ServerException(struct soap *soap, ns1__ServerException *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__ServerException)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__ServerException(struct soap *soap, ns1__ServerException *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__ServerException); if (soap_out_PointerTons1__ServerException(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__ServerException(struct soap *soap, const char *tag, int id, ns1__ServerException *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__ServerException); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__ServerException ** SOAP_FMAC4 soap_get_PointerTons1__ServerException(struct soap *soap, ns1__ServerException **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__ServerException(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__ServerException ** SOAP_FMAC4 soap_in_PointerTons1__ServerException(struct soap *soap, const char *tag, ns1__ServerException **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__ServerException **)soap_malloc(soap, sizeof(ns1__ServerException *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__ServerException *)soap_instantiate_ns1__ServerException(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__ServerException ** p = (ns1__ServerException **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__ServerException, sizeof(ns1__ServerException), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__SessionId(struct soap *soap, int *const*a) { soap_reference(soap, *a, SOAP_TYPE_ns1__SessionId); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__SessionId(struct soap *soap, int *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__SessionId); if (soap_out_PointerTons1__SessionId(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__SessionId(struct soap *soap, const char *tag, int id, int *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__SessionId); if (id < 0) return soap->error; return soap_out_ns1__SessionId(soap, tag, id, *a, type); } SOAP_FMAC3 int ** SOAP_FMAC4 soap_get_PointerTons1__SessionId(struct soap *soap, int **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__SessionId(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 int ** SOAP_FMAC4 soap_in_PointerTons1__SessionId(struct soap *soap, const char *tag, int **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (int **)soap_malloc(soap, sizeof(int *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_ns1__SessionId(soap, tag, *a, type))) return NULL; } else { a = (int **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__SessionId, sizeof(int), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__AllRobotsPos(struct soap *soap, ns6__AllRobotsPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__AllRobotsPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__AllRobotsPos(struct soap *soap, ns6__AllRobotsPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__AllRobotsPos); if (soap_out_PointerTons6__AllRobotsPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__AllRobotsPos(struct soap *soap, const char *tag, int id, ns6__AllRobotsPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__AllRobotsPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__AllRobotsPos ** SOAP_FMAC4 soap_get_PointerTons6__AllRobotsPos(struct soap *soap, ns6__AllRobotsPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__AllRobotsPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__AllRobotsPos ** SOAP_FMAC4 soap_in_PointerTons6__AllRobotsPos(struct soap *soap, const char *tag, ns6__AllRobotsPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__AllRobotsPos **)soap_malloc(soap, sizeof(ns6__AllRobotsPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__AllRobotsPos *)soap_instantiate_ns6__AllRobotsPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__AllRobotsPos ** p = (ns6__AllRobotsPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__AllRobotsPos, sizeof(ns6__AllRobotsPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__MotionDesc(struct soap *soap, ns6__MotionDesc *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__MotionDesc)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__MotionDesc(struct soap *soap, ns6__MotionDesc *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__MotionDesc); if (soap_out_PointerTons6__MotionDesc(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__MotionDesc(struct soap *soap, const char *tag, int id, ns6__MotionDesc *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__MotionDesc); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__MotionDesc ** SOAP_FMAC4 soap_get_PointerTons6__MotionDesc(struct soap *soap, ns6__MotionDesc **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__MotionDesc(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__MotionDesc ** SOAP_FMAC4 soap_in_PointerTons6__MotionDesc(struct soap *soap, const char *tag, ns6__MotionDesc **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__MotionDesc **)soap_malloc(soap, sizeof(ns6__MotionDesc *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__MotionDesc *)soap_instantiate_ns6__MotionDesc(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__MotionDesc ** p = (ns6__MotionDesc **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__MotionDesc, sizeof(ns6__MotionDesc), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__Config(struct soap *soap, ns6__Config *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__Config)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__Config(struct soap *soap, ns6__Config *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__Config); if (soap_out_PointerTons6__Config(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__Config(struct soap *soap, const char *tag, int id, ns6__Config *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__Config); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__Config ** SOAP_FMAC4 soap_get_PointerTons6__Config(struct soap *soap, ns6__Config **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__Config(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__Config ** SOAP_FMAC4 soap_in_PointerTons6__Config(struct soap *soap, const char *tag, ns6__Config **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__Config **)soap_malloc(soap, sizeof(ns6__Config *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__Config *)soap_instantiate_ns6__Config(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__Config ** p = (ns6__Config **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__Config, sizeof(ns6__Config), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__Frame(struct soap *soap, ns6__Frame *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__Frame)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__Frame(struct soap *soap, ns6__Frame *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__Frame); if (soap_out_PointerTons6__Frame(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__Frame(struct soap *soap, const char *tag, int id, ns6__Frame *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__Frame); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__Frame ** SOAP_FMAC4 soap_get_PointerTons6__Frame(struct soap *soap, ns6__Frame **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__Frame(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__Frame ** SOAP_FMAC4 soap_in_PointerTons6__Frame(struct soap *soap, const char *tag, ns6__Frame **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__Frame **)soap_malloc(soap, sizeof(ns6__Frame *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__Frame *)soap_instantiate_ns6__Frame(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__Frame ** p = (ns6__Frame **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__Frame, sizeof(ns6__Frame), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__VrbxConfig(struct soap *soap, ns6__VrbxConfig *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__VrbxConfig)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__VrbxConfig(struct soap *soap, ns6__VrbxConfig *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__VrbxConfig); if (soap_out_PointerTons6__VrbxConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__VrbxConfig(struct soap *soap, const char *tag, int id, ns6__VrbxConfig *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__VrbxConfig); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__VrbxConfig ** SOAP_FMAC4 soap_get_PointerTons6__VrbxConfig(struct soap *soap, ns6__VrbxConfig **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__VrbxConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__VrbxConfig ** SOAP_FMAC4 soap_in_PointerTons6__VrbxConfig(struct soap *soap, const char *tag, ns6__VrbxConfig **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__VrbxConfig **)soap_malloc(soap, sizeof(ns6__VrbxConfig *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__VrbxConfig *)soap_instantiate_ns6__VrbxConfig(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__VrbxConfig ** p = (ns6__VrbxConfig **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__VrbxConfig, sizeof(ns6__VrbxConfig), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__ScaraConfig(struct soap *soap, ns6__ScaraConfig *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__ScaraConfig)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__ScaraConfig(struct soap *soap, ns6__ScaraConfig *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__ScaraConfig); if (soap_out_PointerTons6__ScaraConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__ScaraConfig(struct soap *soap, const char *tag, int id, ns6__ScaraConfig *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__ScaraConfig); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__ScaraConfig ** SOAP_FMAC4 soap_get_PointerTons6__ScaraConfig(struct soap *soap, ns6__ScaraConfig **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__ScaraConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__ScaraConfig ** SOAP_FMAC4 soap_in_PointerTons6__ScaraConfig(struct soap *soap, const char *tag, ns6__ScaraConfig **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__ScaraConfig **)soap_malloc(soap, sizeof(ns6__ScaraConfig *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__ScaraConfig *)soap_instantiate_ns6__ScaraConfig(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__ScaraConfig ** p = (ns6__ScaraConfig **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__ScaraConfig, sizeof(ns6__ScaraConfig), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__AnthroConfig(struct soap *soap, ns6__AnthroConfig *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__AnthroConfig)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__AnthroConfig(struct soap *soap, ns6__AnthroConfig *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__AnthroConfig); if (soap_out_PointerTons6__AnthroConfig(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__AnthroConfig(struct soap *soap, const char *tag, int id, ns6__AnthroConfig *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__AnthroConfig); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__AnthroConfig ** SOAP_FMAC4 soap_get_PointerTons6__AnthroConfig(struct soap *soap, ns6__AnthroConfig **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__AnthroConfig(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__AnthroConfig ** SOAP_FMAC4 soap_in_PointerTons6__AnthroConfig(struct soap *soap, const char *tag, ns6__AnthroConfig **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__AnthroConfig **)soap_malloc(soap, sizeof(ns6__AnthroConfig *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__AnthroConfig *)soap_instantiate_ns6__AnthroConfig(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__AnthroConfig ** p = (ns6__AnthroConfig **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__AnthroConfig, sizeof(ns6__AnthroConfig), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons6__RobotPos(struct soap *soap, ns6__RobotPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns6__RobotPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons6__RobotPos(struct soap *soap, ns6__RobotPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons6__RobotPos); if (soap_out_PointerTons6__RobotPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons6__RobotPos(struct soap *soap, const char *tag, int id, ns6__RobotPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns6__RobotPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns6__RobotPos ** SOAP_FMAC4 soap_get_PointerTons6__RobotPos(struct soap *soap, ns6__RobotPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons6__RobotPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns6__RobotPos ** SOAP_FMAC4 soap_in_PointerTons6__RobotPos(struct soap *soap, const char *tag, ns6__RobotPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns6__RobotPos **)soap_malloc(soap, sizeof(ns6__RobotPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns6__RobotPos *)soap_instantiate_ns6__RobotPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns6__RobotPos ** p = (ns6__RobotPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns6__RobotPos, sizeof(ns6__RobotPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons2__JointRange(struct soap *soap, ns2__JointRange *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns2__JointRange)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons2__JointRange(struct soap *soap, ns2__JointRange *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons2__JointRange); if (soap_out_PointerTons2__JointRange(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons2__JointRange(struct soap *soap, const char *tag, int id, ns2__JointRange *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns2__JointRange); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns2__JointRange ** SOAP_FMAC4 soap_get_PointerTons2__JointRange(struct soap *soap, ns2__JointRange **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons2__JointRange(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns2__JointRange ** SOAP_FMAC4 soap_in_PointerTons2__JointRange(struct soap *soap, const char *tag, ns2__JointRange **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns2__JointRange **)soap_malloc(soap, sizeof(ns2__JointRange *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns2__JointRange *)soap_instantiate_ns2__JointRange(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns2__JointRange ** p = (ns2__JointRange **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns2__JointRange, sizeof(ns2__JointRange), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons2__Records(struct soap *soap, ns2__Records *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns2__Records)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons2__Records(struct soap *soap, ns2__Records *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons2__Records); if (soap_out_PointerTons2__Records(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons2__Records(struct soap *soap, const char *tag, int id, ns2__Records *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns2__Records); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns2__Records ** SOAP_FMAC4 soap_get_PointerTons2__Records(struct soap *soap, ns2__Records **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons2__Records(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns2__Records ** SOAP_FMAC4 soap_in_PointerTons2__Records(struct soap *soap, const char *tag, ns2__Records **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns2__Records **)soap_malloc(soap, sizeof(ns2__Records *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns2__Records *)soap_instantiate_ns2__Records(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns2__Records ** p = (ns2__Records **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns2__Records, sizeof(ns2__Records), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons2__VALApplications(struct soap *soap, ns2__VALApplications *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns2__VALApplications)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons2__VALApplications(struct soap *soap, ns2__VALApplications *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons2__VALApplications); if (soap_out_PointerTons2__VALApplications(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons2__VALApplications(struct soap *soap, const char *tag, int id, ns2__VALApplications *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns2__VALApplications); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns2__VALApplications ** SOAP_FMAC4 soap_get_PointerTons2__VALApplications(struct soap *soap, ns2__VALApplications **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons2__VALApplications(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns2__VALApplications ** SOAP_FMAC4 soap_in_PointerTons2__VALApplications(struct soap *soap, const char *tag, ns2__VALApplications **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns2__VALApplications **)soap_malloc(soap, sizeof(ns2__VALApplications *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns2__VALApplications *)soap_instantiate_ns2__VALApplications(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns2__VALApplications ** p = (ns2__VALApplications **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns2__VALApplications, sizeof(ns2__VALApplications), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons3__Include(struct soap *soap, ns3__Include *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns3__Include)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons3__Include(struct soap *soap, ns3__Include *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons3__Include); if (soap_out_PointerTons3__Include(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons3__Include(struct soap *soap, const char *tag, int id, ns3__Include *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns3__Include); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns3__Include ** SOAP_FMAC4 soap_get_PointerTons3__Include(struct soap *soap, ns3__Include **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons3__Include(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns3__Include ** SOAP_FMAC4 soap_in_PointerTons3__Include(struct soap *soap, const char *tag, ns3__Include **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns3__Include **)soap_malloc(soap, sizeof(ns3__Include *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns3__Include *)soap_instantiate_ns3__Include(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns3__Include ** p = (ns3__Include **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns3__Include, sizeof(ns3__Include), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons2__VALApplication(struct soap *soap, ns2__VALApplication *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns2__VALApplication)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons2__VALApplication(struct soap *soap, ns2__VALApplication *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons2__VALApplication); if (soap_out_PointerTons2__VALApplication(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons2__VALApplication(struct soap *soap, const char *tag, int id, ns2__VALApplication *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns2__VALApplication); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns2__VALApplication ** SOAP_FMAC4 soap_get_PointerTons2__VALApplication(struct soap *soap, ns2__VALApplication **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons2__VALApplication(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns2__VALApplication ** SOAP_FMAC4 soap_in_PointerTons2__VALApplication(struct soap *soap, const char *tag, ns2__VALApplication **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns2__VALApplication **)soap_malloc(soap, sizeof(ns2__VALApplication *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns2__VALApplication *)soap_instantiate_ns2__VALApplication(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns2__VALApplication ** p = (ns2__VALApplication **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns2__VALApplication, sizeof(ns2__VALApplication), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Parameters(struct soap *soap, ns1__Parameters *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Parameters)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Parameters(struct soap *soap, ns1__Parameters *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Parameters); if (soap_out_PointerTons1__Parameters(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Parameters(struct soap *soap, const char *tag, int id, ns1__Parameters *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Parameters); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Parameters ** SOAP_FMAC4 soap_get_PointerTons1__Parameters(struct soap *soap, ns1__Parameters **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Parameters(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Parameters ** SOAP_FMAC4 soap_in_PointerTons1__Parameters(struct soap *soap, const char *tag, ns1__Parameters **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Parameters **)soap_malloc(soap, sizeof(ns1__Parameters *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Parameters *)soap_instantiate_ns1__Parameters(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Parameters ** p = (ns1__Parameters **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Parameters, sizeof(ns1__Parameters), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__CartesianPos(struct soap *soap, ns1__CartesianPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__CartesianPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__CartesianPos(struct soap *soap, ns1__CartesianPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__CartesianPos); if (soap_out_PointerTons1__CartesianPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__CartesianPos(struct soap *soap, const char *tag, int id, ns1__CartesianPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__CartesianPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__CartesianPos ** SOAP_FMAC4 soap_get_PointerTons1__CartesianPos(struct soap *soap, ns1__CartesianPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__CartesianPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__CartesianPos ** SOAP_FMAC4 soap_in_PointerTons1__CartesianPos(struct soap *soap, const char *tag, ns1__CartesianPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__CartesianPos **)soap_malloc(soap, sizeof(ns1__CartesianPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__CartesianPos *)soap_instantiate_ns1__CartesianPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__CartesianPos ** p = (ns1__CartesianPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__CartesianPos, sizeof(ns1__CartesianPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__JointPos(struct soap *soap, ns1__JointPos *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__JointPos)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__JointPos(struct soap *soap, ns1__JointPos *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__JointPos); if (soap_out_PointerTons1__JointPos(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__JointPos(struct soap *soap, const char *tag, int id, ns1__JointPos *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__JointPos); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__JointPos ** SOAP_FMAC4 soap_get_PointerTons1__JointPos(struct soap *soap, ns1__JointPos **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__JointPos(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__JointPos ** SOAP_FMAC4 soap_in_PointerTons1__JointPos(struct soap *soap, const char *tag, ns1__JointPos **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__JointPos **)soap_malloc(soap, sizeof(ns1__JointPos *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__JointPos *)soap_instantiate_ns1__JointPos(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__JointPos ** p = (ns1__JointPos **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__JointPos, sizeof(ns1__JointPos), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Robots(struct soap *soap, ns1__Robots *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Robots)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Robots(struct soap *soap, ns1__Robots *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Robots); if (soap_out_PointerTons1__Robots(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Robots(struct soap *soap, const char *tag, int id, ns1__Robots *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Robots); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Robots ** SOAP_FMAC4 soap_get_PointerTons1__Robots(struct soap *soap, ns1__Robots **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Robots(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Robots ** SOAP_FMAC4 soap_in_PointerTons1__Robots(struct soap *soap, const char *tag, ns1__Robots **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Robots **)soap_malloc(soap, sizeof(ns1__Robots *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Robots *)soap_instantiate_ns1__Robots(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Robots ** p = (ns1__Robots **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Robots, sizeof(ns1__Robots), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Versions(struct soap *soap, ns1__Versions *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Versions)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Versions(struct soap *soap, ns1__Versions *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Versions); if (soap_out_PointerTons1__Versions(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Versions(struct soap *soap, const char *tag, int id, ns1__Versions *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Versions); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Versions ** SOAP_FMAC4 soap_get_PointerTons1__Versions(struct soap *soap, ns1__Versions **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Versions(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Versions ** SOAP_FMAC4 soap_in_PointerTons1__Versions(struct soap *soap, const char *tag, ns1__Versions **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Versions **)soap_malloc(soap, sizeof(ns1__Versions *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Versions *)soap_instantiate_ns1__Versions(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Versions ** p = (ns1__Versions **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Versions, sizeof(ns1__Versions), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__SoapServerVersion(struct soap *soap, ns1__SoapServerVersion *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__SoapServerVersion)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__SoapServerVersion(struct soap *soap, ns1__SoapServerVersion *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__SoapServerVersion); if (soap_out_PointerTons1__SoapServerVersion(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__SoapServerVersion(struct soap *soap, const char *tag, int id, ns1__SoapServerVersion *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__SoapServerVersion); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__SoapServerVersion ** SOAP_FMAC4 soap_get_PointerTons1__SoapServerVersion(struct soap *soap, ns1__SoapServerVersion **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__SoapServerVersion(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__SoapServerVersion ** SOAP_FMAC4 soap_in_PointerTons1__SoapServerVersion(struct soap *soap, const char *tag, ns1__SoapServerVersion **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__SoapServerVersion **)soap_malloc(soap, sizeof(ns1__SoapServerVersion *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__SoapServerVersion *)soap_instantiate_ns1__SoapServerVersion(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__SoapServerVersion ** p = (ns1__SoapServerVersion **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__SoapServerVersion, sizeof(ns1__SoapServerVersion), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Parameter(struct soap *soap, ns1__Parameter *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Parameter)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Parameter(struct soap *soap, ns1__Parameter *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Parameter); if (soap_out_PointerTons1__Parameter(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Parameter(struct soap *soap, const char *tag, int id, ns1__Parameter *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Parameter); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Parameter ** SOAP_FMAC4 soap_get_PointerTons1__Parameter(struct soap *soap, ns1__Parameter **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Parameter(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Parameter ** SOAP_FMAC4 soap_in_PointerTons1__Parameter(struct soap *soap, const char *tag, ns1__Parameter **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Parameter **)soap_malloc(soap, sizeof(ns1__Parameter *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Parameter *)soap_instantiate_ns1__Parameter(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Parameter ** p = (ns1__Parameter **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Parameter, sizeof(ns1__Parameter), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Robot(struct soap *soap, ns1__Robot *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Robot)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Robot(struct soap *soap, ns1__Robot *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Robot); if (soap_out_PointerTons1__Robot(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Robot(struct soap *soap, const char *tag, int id, ns1__Robot *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Robot); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Robot ** SOAP_FMAC4 soap_get_PointerTons1__Robot(struct soap *soap, ns1__Robot **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Robot(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Robot ** SOAP_FMAC4 soap_in_PointerTons1__Robot(struct soap *soap, const char *tag, ns1__Robot **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Robot **)soap_malloc(soap, sizeof(ns1__Robot *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Robot *)soap_instantiate_ns1__Robot(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Robot ** p = (ns1__Robot **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Robot, sizeof(ns1__Robot), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTons1__Version(struct soap *soap, ns1__Version *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_ns1__Version)) (*a)->soap_serialize(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTons1__Version(struct soap *soap, ns1__Version *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__Version); if (soap_out_PointerTons1__Version(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTons1__Version(struct soap *soap, const char *tag, int id, ns1__Version *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_ns1__Version); if (id < 0) return soap->error; return (*a)->soap_out(soap, tag, id, type); } SOAP_FMAC3 ns1__Version ** SOAP_FMAC4 soap_get_PointerTons1__Version(struct soap *soap, ns1__Version **p, const char *tag, const char *type) { if ((p = soap_in_PointerTons1__Version(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 ns1__Version ** SOAP_FMAC4 soap_in_PointerTons1__Version(struct soap *soap, const char *tag, ns1__Version **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (ns1__Version **)soap_malloc(soap, sizeof(ns1__Version *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = (ns1__Version *)soap_instantiate_ns1__Version(soap, -1, soap->type, soap->arrayType, NULL))) return NULL; (*a)->soap_default(soap); if (!(*a)->soap_in(soap, tag, NULL)) return NULL; } else { ns1__Version ** p = (ns1__Version **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_ns1__Version, sizeof(ns1__Version), 0); a = p; if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTostd__string(struct soap *soap, std::string *const*a) { if (!soap_reference(soap, *a, SOAP_TYPE_std__string)) soap_serialize_std__string(soap, *a); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTostd__string(struct soap *soap, std::string *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTostd__string); if (soap_out_PointerTostd__string(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTostd__string(struct soap *soap, const char *tag, int id, std::string *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_std__string); if (id < 0) return soap->error; return soap_out_std__string(soap, tag, id, *a, type); } SOAP_FMAC3 std::string ** SOAP_FMAC4 soap_get_PointerTostd__string(struct soap *soap, std::string **p, const char *tag, const char *type) { if ((p = soap_in_PointerTostd__string(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 std::string ** SOAP_FMAC4 soap_in_PointerTostd__string(struct soap *soap, const char *tag, std::string **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (std::string **)soap_malloc(soap, sizeof(std::string *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_std__string(soap, tag, *a, type))) return NULL; } else { a = (std::string **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_std__string, sizeof(std::string), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTounsignedByte(struct soap *soap, unsigned char *const*a) { soap_reference(soap, *a, SOAP_TYPE_unsignedByte); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTounsignedByte(struct soap *soap, unsigned char *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTounsignedByte); if (soap_out_PointerTounsignedByte(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTounsignedByte(struct soap *soap, const char *tag, int id, unsigned char *const*a, const char *type) { id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_unsignedByte); if (id < 0) return soap->error; return soap_out_unsignedByte(soap, tag, id, *a, type); } SOAP_FMAC3 unsigned char ** SOAP_FMAC4 soap_get_PointerTounsignedByte(struct soap *soap, unsigned char **p, const char *tag, const char *type) { if ((p = soap_in_PointerTounsignedByte(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 unsigned char ** SOAP_FMAC4 soap_in_PointerTounsignedByte(struct soap *soap, const char *tag, unsigned char **a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) if (!(a = (unsigned char **)soap_malloc(soap, sizeof(unsigned char *)))) return NULL; *a = NULL; if (!soap->null && *soap->href != '#') { soap_revert(soap); if (!(*a = soap_in_unsignedByte(soap, tag, *a, type))) return NULL; } else { a = (unsigned char **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_unsignedByte, sizeof(unsigned char), 0); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE__QName); if (soap_out__QName(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap *soap, const char *tag, int id, char *const*a, const char *type) { return soap_outstring(soap, tag, id, a, type, SOAP_TYPE__QName); } SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap *soap, char **p, const char *tag, const char *type) { if ((p = soap_in__QName(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type) { char **p; p = soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, -1, -1); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap *soap, char **a) { (void)soap; /* appease -Wall -Werror */ #ifdef SOAP_DEFAULT_string *a = SOAP_DEFAULT_string; #else *a = (char *)0; #endif } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a) { soap_reference(soap, *a, SOAP_TYPE_string); } SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type) { register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string); if (soap_out_string(soap, tag, id, a, type)) return soap->error; return soap_putindependent(soap); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap *soap, const char *tag, int id, char *const*a, const char *type) { return soap_outstring(soap, tag, id, a, type, SOAP_TYPE_string); } SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap *soap, char **p, const char *tag, const char *type) { if ((p = soap_in_string(soap, tag, p, type))) if (soap_getindependent(soap)) return NULL; return p; } SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type) { char **p; p = soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, -1, -1); return p; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, std::vector<ns6__RobotPos * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, const std::vector<ns6__RobotPos * >*a) { for (std::vector<ns6__RobotPos * >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_PointerTons6__RobotPos(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, const char *tag, int id, const std::vector<ns6__RobotPos * >*a, const char *type) { for (std::vector<ns6__RobotPos * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_PointerTons6__RobotPos(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<ns6__RobotPos * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, const char *tag, std::vector<ns6__RobotPos * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfPointerTons6__RobotPos(soap, -1))) return NULL; ns6__RobotPos *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_ns6__RobotPos, SOAP_TYPE_std__vectorTemplateOfPointerTons6__RobotPos, sizeof(ns6__RobotPos), 1)) break; if (!soap_in_PointerTons6__RobotPos(soap, tag, NULL, "ns6:RobotPos")) break; } else { if (!soap_in_PointerTons6__RobotPos(soap, tag, &n, "ns6:RobotPos")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<ns6__RobotPos * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfPointerTons6__RobotPos(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfPointerTons6__RobotPos, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<ns6__RobotPos * >; if (size) *size = sizeof(std::vector<ns6__RobotPos * >); } else { cp->ptr = (void*)new std::vector<ns6__RobotPos * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<ns6__RobotPos * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<ns6__RobotPos * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfPointerTons6__RobotPos(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<ns6__RobotPos * > %p -> %p\n", q, p)); *(std::vector<ns6__RobotPos * >*)p = *(std::vector<ns6__RobotPos * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOf_XML(struct soap *soap, std::vector<char * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOf_XML(struct soap *soap, const std::vector<char * >*a) { } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOf_XML(struct soap *soap, const char *tag, int id, const std::vector<char * >*a, const char *type) { for (std::vector<char * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_outliteral(soap, tag, &(*i), NULL)) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<char * >* SOAP_FMAC4 soap_in_std__vectorTemplateOf_XML(struct soap *soap, const char *tag, std::vector<char * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOf_XML(soap, -1))) return NULL; char *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE__XML, SOAP_TYPE_std__vectorTemplateOf_XML, sizeof(char *), 1)) break; if (!soap_inliteral(soap, tag, NULL)) break; } else { if (!soap_inliteral(soap, tag, &n)) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<char * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOf_XML(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOf_XML(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOf_XML, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<char * >; if (size) *size = sizeof(std::vector<char * >); } else { cp->ptr = (void*)new std::vector<char * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<char * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<char * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOf_XML(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<char * > %p -> %p\n", q, p)); *(std::vector<char * >*)p = *(std::vector<char * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfstd__string(struct soap *soap, std::vector<std::string >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfstd__string(struct soap *soap, const std::vector<std::string >*a) { for (std::vector<std::string >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_std__string(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfstd__string(struct soap *soap, const char *tag, int id, const std::vector<std::string >*a, const char *type) { for (std::vector<std::string >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_std__string(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<std::string >* SOAP_FMAC4 soap_in_std__vectorTemplateOfstd__string(struct soap *soap, const char *tag, std::vector<std::string >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfstd__string(soap, -1))) return NULL; std::string n; short soap_flag = 0; do { soap_revert(soap); soap_default_std__string(soap, &n); if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_std__string, SOAP_TYPE_std__vectorTemplateOfstd__string, sizeof(std::string), 0)) break; if (!soap_in_std__string(soap, tag, NULL, "xsd:string")) break; } else { if (!soap_in_std__string(soap, tag, &n, "xsd:string")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<std::string > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfstd__string(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfstd__string(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfstd__string, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<std::string >; if (size) *size = sizeof(std::vector<std::string >); } else { cp->ptr = (void*)new std::vector<std::string >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<std::string >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<std::string >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfstd__string(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<std::string > %p -> %p\n", q, p)); *(std::vector<std::string >*)p = *(std::vector<std::string >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, std::vector<ns2__VALApplication * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, const std::vector<ns2__VALApplication * >*a) { for (std::vector<ns2__VALApplication * >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_PointerTons2__VALApplication(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, const char *tag, int id, const std::vector<ns2__VALApplication * >*a, const char *type) { for (std::vector<ns2__VALApplication * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_PointerTons2__VALApplication(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<ns2__VALApplication * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, const char *tag, std::vector<ns2__VALApplication * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfPointerTons2__VALApplication(soap, -1))) return NULL; ns2__VALApplication *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_ns2__VALApplication, SOAP_TYPE_std__vectorTemplateOfPointerTons2__VALApplication, sizeof(ns2__VALApplication), 1)) break; if (!soap_in_PointerTons2__VALApplication(soap, tag, NULL, "ns2:VALApplication")) break; } else { if (!soap_in_PointerTons2__VALApplication(soap, tag, &n, "ns2:VALApplication")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<ns2__VALApplication * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfPointerTons2__VALApplication(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfPointerTons2__VALApplication, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<ns2__VALApplication * >; if (size) *size = sizeof(std::vector<ns2__VALApplication * >); } else { cp->ptr = (void*)new std::vector<ns2__VALApplication * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<ns2__VALApplication * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<ns2__VALApplication * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfPointerTons2__VALApplication(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<ns2__VALApplication * > %p -> %p\n", q, p)); *(std::vector<ns2__VALApplication * >*)p = *(std::vector<ns2__VALApplication * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, std::vector<ns1__Parameter * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, const std::vector<ns1__Parameter * >*a) { for (std::vector<ns1__Parameter * >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_PointerTons1__Parameter(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, const char *tag, int id, const std::vector<ns1__Parameter * >*a, const char *type) { for (std::vector<ns1__Parameter * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_PointerTons1__Parameter(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<ns1__Parameter * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, const char *tag, std::vector<ns1__Parameter * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfPointerTons1__Parameter(soap, -1))) return NULL; ns1__Parameter *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_ns1__Parameter, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Parameter, sizeof(ns1__Parameter), 1)) break; if (!soap_in_PointerTons1__Parameter(soap, tag, NULL, "ns1:Parameter")) break; } else { if (!soap_in_PointerTons1__Parameter(soap, tag, &n, "ns1:Parameter")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<ns1__Parameter * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfPointerTons1__Parameter(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Parameter, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<ns1__Parameter * >; if (size) *size = sizeof(std::vector<ns1__Parameter * >); } else { cp->ptr = (void*)new std::vector<ns1__Parameter * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<ns1__Parameter * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<ns1__Parameter * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfPointerTons1__Parameter(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<ns1__Parameter * > %p -> %p\n", q, p)); *(std::vector<ns1__Parameter * >*)p = *(std::vector<ns1__Parameter * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, std::vector<ns1__Robot * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, const std::vector<ns1__Robot * >*a) { for (std::vector<ns1__Robot * >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_PointerTons1__Robot(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, const char *tag, int id, const std::vector<ns1__Robot * >*a, const char *type) { for (std::vector<ns1__Robot * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_PointerTons1__Robot(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<ns1__Robot * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, const char *tag, std::vector<ns1__Robot * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfPointerTons1__Robot(soap, -1))) return NULL; ns1__Robot *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_ns1__Robot, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Robot, sizeof(ns1__Robot), 1)) break; if (!soap_in_PointerTons1__Robot(soap, tag, NULL, "ns1:Robot")) break; } else { if (!soap_in_PointerTons1__Robot(soap, tag, &n, "ns1:Robot")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<ns1__Robot * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfPointerTons1__Robot(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Robot, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<ns1__Robot * >; if (size) *size = sizeof(std::vector<ns1__Robot * >); } else { cp->ptr = (void*)new std::vector<ns1__Robot * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<ns1__Robot * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<ns1__Robot * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfPointerTons1__Robot(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<ns1__Robot * > %p -> %p\n", q, p)); *(std::vector<ns1__Robot * >*)p = *(std::vector<ns1__Robot * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, std::vector<ns1__Version * >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, const std::vector<ns1__Version * >*a) { for (std::vector<ns1__Version * >::const_iterator i = a->begin(); i != a->end(); ++i) soap_serialize_PointerTons1__Version(soap, &(*i)); } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, const char *tag, int id, const std::vector<ns1__Version * >*a, const char *type) { for (std::vector<ns1__Version * >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_PointerTons1__Version(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<ns1__Version * >* SOAP_FMAC4 soap_in_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, const char *tag, std::vector<ns1__Version * >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfPointerTons1__Version(soap, -1))) return NULL; ns1__Version *n; short soap_flag = 0; do { soap_revert(soap); n = NULL; if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_ns1__Version, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Version, sizeof(ns1__Version), 1)) break; if (!soap_in_PointerTons1__Version(soap, tag, NULL, "ns1:Version")) break; } else { if (!soap_in_PointerTons1__Version(soap, tag, &n, "ns1:Version")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<ns1__Version * > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfPointerTons1__Version(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfPointerTons1__Version, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<ns1__Version * >; if (size) *size = sizeof(std::vector<ns1__Version * >); } else { cp->ptr = (void*)new std::vector<ns1__Version * >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<ns1__Version * >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<ns1__Version * >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfPointerTons1__Version(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<ns1__Version * > %p -> %p\n", q, p)); *(std::vector<ns1__Version * >*)p = *(std::vector<ns1__Version * >*)q; } SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfdouble(struct soap *soap, std::vector<double >*p) { p->clear(); } SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_std__vectorTemplateOfdouble(struct soap *soap, const std::vector<double >*a) { } SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfdouble(struct soap *soap, const char *tag, int id, const std::vector<double >*a, const char *type) { for (std::vector<double >::const_iterator i = a->begin(); i != a->end(); ++i) { if (soap_out_double(soap, tag, id, &(*i), "")) return soap->error; } return SOAP_OK; } SOAP_FMAC3 std::vector<double >* SOAP_FMAC4 soap_in_std__vectorTemplateOfdouble(struct soap *soap, const char *tag, std::vector<double >*a, const char *type) { if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a && !(a = soap_new_std__vectorTemplateOfdouble(soap, -1))) return NULL; double n; short soap_flag = 0; do { soap_revert(soap); soap_default_double(soap, &n); if (*soap->id || *soap->href) { if (!soap_container_id_forward(soap, *soap->id?soap->id:soap->href, a, (size_t)a->size(), SOAP_TYPE_double, SOAP_TYPE_std__vectorTemplateOfdouble, sizeof(double), 0)) break; if (!soap_in_double(soap, tag, NULL, "xsd:double")) break; } else { if (!soap_in_double(soap, tag, &n, "xsd:double")) break; } a->push_back(n); soap_flag = 1; } while (tag && *tag != '-' && !soap_element_begin_in(soap, tag, 1, NULL)); if (soap_flag && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) { soap->error = SOAP_OK; return a; } return NULL; } SOAP_FMAC3 std::vector<double > * SOAP_FMAC4 soap_instantiate_std__vectorTemplateOfdouble(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_std__vectorTemplateOfdouble(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_std__vectorTemplateOfdouble, n, soap_fdelete); if (!cp) return NULL; if (n < 0) { cp->ptr = (void*)new std::vector<double >; if (size) *size = sizeof(std::vector<double >); } else { cp->ptr = (void*)new std::vector<double >[n]; if (!cp->ptr) { soap->error = SOAP_EOM; return NULL; } if (size) *size = n * sizeof(std::vector<double >); } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); return (std::vector<double >*)cp->ptr; } SOAP_FMAC3 void SOAP_FMAC4 soap_copy_std__vectorTemplateOfdouble(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying std::vector<double > %p -> %p\n", q, p)); *(std::vector<double >*)p = *(std::vector<double >*)q; } #if defined(__BORLANDC__) #pragma option pop #pragma option pop #endif /* End of soapC.cpp */
37.336352
368
0.733046
[ "object", "vector" ]
e8a020ead5dcab72b2cc97af473dbb8440e97d87
734
cpp
C++
jp.atcoder/abc228/abc228_d/27377060.cpp
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc228/abc228_d/27377060.cpp
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc228/abc228_d/27377060.cpp
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> int main() { using namespace std; int n = 1 << 20; int q; cin >> q; set<int> idx; for (int i = 0; i < n; i++) { idx.insert(i); } vector<long long> a(n, -1); while (q--) { int t; long long x; cin >> t >> x; if (t == 1) { auto i = idx.lower_bound(x % n); if (i == idx.end()) { i = idx.begin(); } a[*i] = x; idx.erase(i); // cout << x % n << ' ' << i << endl; } else { cout << a[x % n] << endl; } } } // int main() { // using namespace std; // int n = 1 << 20; // set<int> idx; // idx.insert(0); // int i = *idx.lower_bound(1); // cout << i << endl; // }
17.069767
44
0.388283
[ "vector" ]
e8a19b00ba46d45abdbcba3cfdcb686369d0fbd6
2,025
cpp
C++
src/hw2/third.cpp
hellen6654/PseudoRamdomNumberGenerator
7e5b575a9ed8e8414147a4a8b8b86cbb67b23b77
[ "MIT" ]
null
null
null
src/hw2/third.cpp
hellen6654/PseudoRamdomNumberGenerator
7e5b575a9ed8e8414147a4a8b8b86cbb67b23b77
[ "MIT" ]
null
null
null
src/hw2/third.cpp
hellen6654/PseudoRamdomNumberGenerator
7e5b575a9ed8e8414147a4a8b8b86cbb67b23b77
[ "MIT" ]
null
null
null
#include <iostream> #include <vector> #include <cmath> #include "../PseudoRamdomNumber.h" using namespace std; class point { private: double _x, _y; public: point(double x, double y) : _x(x), _y(y){}; double getX() { return _x; } double getY() { return _y; } double D() { // Distance for point to (0,0) return _x * _x + _y * _y; } double D(point A) { return sqrt(pow(A.getX() - _x, 2) + pow((A.getY() - _y), 2)); } }; void third(unsigned interval) { //monte carlo to calc pi // pi = 4 * (num of point inside the circle / num of total point) /* 1 ┌----------------------------┐ │///////++++++║║++++++///////│ │/////++++++++║║+++++++++////│ │///++++++++++║║++++++++++///│ │/++++++++++++║║++++++++++++/│ │+++++++++++++║║+++++++++++++│ │+++++++++++++║║+++++++++++++│ │═════════════╣╠═════════════│ 1 │+++++++++++++║║+++++++++++++│ │+++++++++++++║║+++++++++++++│ │/++++++++++++║║++++++++++++/│ │///++++++++++║║++++++++++///│ │/////++++++++║║++++++++/////│ │///////++++++║║++++++///////│ └----------------------------┘ ramdom a point between 1,-1 when point locate in '+' , num of point inside the circle++ */ double pi = 0.0; int circlePointNum = 0; int squarePointNum = 0; // also mean total point PsesudoRandom lcg; for (unsigned long long i = 0; i < interval; i++) { point temp(lcg.GetLcgOfRamdom(2, -1), lcg.GetLcgOfRamdom(2, -1)); squarePointNum++; if (temp.D() <= 1) circlePointNum++; pi = 4.0 * circlePointNum / squarePointNum; if ((i + 1) % 90000000 == 0) { cout << "After " << squarePointNum << "/" << interval << " times calc:"; cout << pi << endl; } } cout << "After " << squarePointNum << "/" << interval << " times calc:"; cout << pi << endl; }
28.521127
84
0.371852
[ "vector" ]
e8a2ecb2cfb78399f729debce664d3ce613ebf98
1,871
cpp
C++
Engine/source/EtMath/Geometry.cpp
NeroBurner/ETEngine
3fe039ff65cd1355957bcfce3f851fa411a86d94
[ "MIT" ]
null
null
null
Engine/source/EtMath/Geometry.cpp
NeroBurner/ETEngine
3fe039ff65cd1355957bcfce3f851fa411a86d94
[ "MIT" ]
null
null
null
Engine/source/EtMath/Geometry.cpp
NeroBurner/ETEngine
3fe039ff65cd1355957bcfce3f851fa411a86d94
[ "MIT" ]
null
null
null
#pragma once #include "Geometry.h" //------------------------ // GetIcosahedronPositions // // Vertices for an icosahedron // std::vector<vec3> GetIcosahedronPositions(float size) { float ratio = (1.f + sqrt(5.f)) / 2.f; float scale = size / etm::length(vec2(ratio, 1.f)); ratio *= scale; std::vector<vec3> ico; //X plane ico.push_back(vec3(ratio, 0, -scale)); //rf 0 ico.push_back(vec3(-ratio, 0, -scale)); //lf 1 ico.push_back(vec3(ratio, 0, scale)); //rb 2 ico.push_back(vec3(-ratio, 0, scale)); //lb 3 //Y plane ico.push_back(vec3(0, -scale, ratio)); //db 4 ico.push_back(vec3(0, -scale, -ratio)); //df 5 ico.push_back(vec3(0, scale, ratio)); //ub 6 ico.push_back(vec3(0, scale, -ratio)); //uf 7 //Z plane ico.push_back(vec3(-scale, ratio, 0)); //lu 8 ico.push_back(vec3(-scale, -ratio, 0)); //ld 9 ico.push_back(vec3(scale, ratio, 0)); //ru 10 ico.push_back(vec3(scale, -ratio, 0)); //rd 11 return ico; } //------------------------ // GetIcosahedronIndices // // Indices of the vertices from GetIcosahedronPositions with the front face // std::vector<etm::uint32> GetIcosahedronIndices() { std::vector<etm::uint32> ret { 1, 3, 8, 1, 3, 9, 0, 2, 10, 0, 2, 11, 5, 7, 0, 5, 7, 1, 4, 6, 2, 4, 6, 3, 9, 11, 4, 9, 11, 5, 8, 10, 6, 8, 10, 7, 1, 7, 8, 1, 5, 9, 0, 7, 10, 0, 5, 11, 3, 6, 8, 3, 4, 9, 2, 6, 10, 2, 4, 11 }; return ret; } //------------------------ // GetIcosahedronIndices // // Indices of the vertices from GetIcosahedronPositions with the back face // std::vector<etm::uint32> GetIcosahedronIndicesBFC() { std::vector<etm::uint32> ret { 1,8,3, 1,3,9, 0,2, 10, 0,11,2, 5,0,7, 5,7,1, 4,6,2, 4,3,6, 9, 4,11, 9,11,5, 8,10,6, 8, 7,10, 1,7,8, 1,9,5, 0,10,7, 0,5,11, 3,8,6, 3,4,9, 2,6 ,10, 2,11,4 }; return ret; }
17.165138
75
0.55318
[ "geometry", "vector" ]
e8adeb3100f2364c4f73b28f7ca5d1017de3a9d5
51,062
cc
C++
components/tflite/tensorflow/lite/micro/kernels/svdf_test.cc
HuakeZhBo/bl_mcu_sdk
a6a7f077e5dd535419d1741e4c2f5215eebb699d
[ "Apache-2.0" ]
93
2021-04-27T07:34:49.000Z
2022-03-22T08:43:44.000Z
components/tflite/tensorflow/lite/micro/kernels/svdf_test.cc
zeroherolin/bl_mcu_sdk
97760e3633d7ce0f435be1d98e7c9e8c46bfaca7
[ "Apache-2.0" ]
18
2021-05-23T14:10:12.000Z
2022-03-30T09:18:39.000Z
components/tflite/tensorflow/lite/micro/kernels/svdf_test.cc
zeroherolin/bl_mcu_sdk
97760e3633d7ce0f435be1d98e7c9e8c46bfaca7
[ "Apache-2.0" ]
33
2021-04-27T07:46:50.000Z
2022-02-27T05:45:19.000Z
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/lite/c/builtin_op_data.h" #include "tensorflow/lite/c/common.h" #include "tensorflow/lite/micro/kernels/kernel_runner.h" #include "tensorflow/lite/micro/test_helpers.h" #include "tensorflow/lite/micro/testing/micro_test.h" namespace tflite { namespace testing { namespace { // naming as follows: <tensor name>_<input size>x<batch size>x<batch count> // 10 inputs each with shape {2, 2}. const float input_data_2x2x10[] = { 0.12609188, -0.46347019, 0.35867718, 0.36897406, 0.14278367, -1.64410412, -0.57290924, 0.12729003, 0.49837467, 0.19278903, 0.17660543, 0.52949083, -0.11186574, 0.13164264, -0.72674477, -0.5683046, -0.68892461, 0.37783599, -0.63690937, 0.44483393, -0.81299269, -0.86831826, -0.95760226, 1.82078898, -1.45006323, -0.82251364, -1.65087092, -1.89238167, 0.03966608, -0.24936394, 2.06740379, -1.51439476, 0.11771342, -0.23761693, 0.31088525, -1.55601168, -0.89477462, 1.67204106, -0.6230064, 0.29819036, }; // Feature filter of shape {8, 2}. const float feature_weights_data_2x2x10[] = { -0.31930989, 0.0079667, 0.39296314, 0.37613347, 0.12416199, 0.15785322, 0.27901134, 0.3905206, 0.21931258, -0.36137494, -0.10640851, 0.31053296, -0.36118156, -0.0976817, -0.36916667, 0.22197971 }; // Time filter of shape {8, 10}. const float time_weights_data_2x2x10[] = { -0.31930989, 0.37613347, 0.27901134, -0.36137494, -0.36118156, 0.22197971, 0.27557442, -0.06634006, 0.0079667, 0.12416199, 0.3905206, -0.10640851, -0.0976817, 0.15294972, 0.39635518, -0.02702999, 0.39296314, 0.15785322, 0.21931258, 0.31053296, -0.36916667, 0.38031587, -0.21580373, 0.27072677, 0.23622236, 0.34936687, 0.18174365, 0.35907319, -0.17493086, 0.324846, -0.10781813, 0.27201805, 0.14324132, -0.23681851, -0.27115166, -0.01580888, -0.14943552, 0.15465137, 0.09784451, -0.0337657, -0.14884081, 0.19931212, -0.36002168, 0.34663299, -0.11405486, 0.12672701, 0.39463779, -0.07886535, -0.06384811, 0.08249187, -0.26816407, -0.19905911, 0.29211238, 0.31264046, -0.28664589, 0.05698794, 0.11613581, 0.14078894, 0.02187902, -0.21781836, -0.15567942, 0.08693647, -0.38256618, 0.36580828, -0.22922277, -0.0226903, 0.12878349, -0.28122205, -0.10850525, -0.11955214, 0.27179423, -0.04710215, 0.31069002, 0.22672787, 0.09580326, 0.08682203, 0.1258215, 0.1851041, 0.29228821, 0.12366763 }; // Activation state with shape {2, 80}. These initial values must be copied into // a mutable activation state tensor. const float initial_activation_state_data_2x2x10[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Bias with shape {8} const float bias_data_2x2x10[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; // 10 outputs each of shape {2, 4} const float golden_output_2x2x10[] = { -0.044205, -0.013757, 0.050369, -0.018447, 0.073010, 0.025142, -0.021154, 0.013551, -0.209613, -0.062421, 0.150209, -0.108334, 0.028256, -0.006950, -0.030885, 0.009603, -0.076800, -0.037075, -0.087198, -0.155183, 0.091069, 0.098446, -0.016083, 0.106475, -0.082123, -0.162238, -0.084434, -0.141074, -0.029340, -0.090685, 0.053302, -0.030604, -0.201440, 0.088424, 0.139877, 0.012416, -0.113212, 0.103893, -0.100842, 0.122780, -0.166632, -0.116705, 0.175298, -0.047163, 0.313077, -0.166485, -0.285860, 0.129069, -0.625911, 0.046134, 0.138081, -0.129581, -0.521455, -0.061579, 0.230289, 0.114963, -0.216693, -0.161643, -0.179177, -0.052599, -0.213239, 0.029502, 0.260858, 0.275045, -0.213689, -0.323608, -0.285635, -0.317687, -0.324092, -0.317972, -0.208450, -0.462504, -0.255126, -0.218576, -0.041528, 0.179421, -0.440583, 0.072127, -0.284136, 0.241570 }; // Simulated real-world inputs, weights and expected outputs. // Input of shape {1x16} const float input_data_16x1x1[] = { -0.488494, 2.023762, -2.233117, -0.488494, 3.559030, 9.490748, -3.210106, -1.953977, -0.279140, 0.907204, 1.674838, 0.000000, -0.279140, -0.628064, -0.069785, -0.628064, }; // Feature filter of shape {64, 16}. const float feature_weights_data_16x1x1[] = { 0.173588, 0.173588, -0.024798, 0.193426, -0.099193, 0.044637, 0.183507, 0.183507, 0.044637, 0.198386, -0.069435, 0.084314, 0.312458, 0.024798, 0.173588, -0.049596, -0.352135, -0.550521, -0.009919, -0.099193, -0.074395, -0.128951, 0.193426, 0.357095, -0.317418, -0.119032, -0.218225, -0.004960, -0.386853, -0.133911, 0.252942, -0.019839, -0.024798, -0.054556, -0.069435, -0.128951, 0.029758, -0.099193, -0.312458, -0.029758, 0.064475, 0.183507, 0.114072, -0.178547, -0.247982, -0.119032, 0.243023, -0.119032, -0.034718, -0.178547, 0.019839, 0.128951, -0.223184, -0.009919, -0.213265, 0.168628, -0.143830, -0.322377, -0.218225, -0.193426, -0.252942, -0.049596, 0.064475, -0.267821, -0.580279, -0.099193, 0.213265, 0.119032, -0.119032, -0.178547, 0.610037, 0.109112, 0.049596, -0.014879, -0.049596, -0.193426, 0.039677, -0.148789, -0.114072, -0.158709, -0.158709, 0.094233, 0.099193, -0.114072, 0.104153, -0.123991, 0.198386, -0.173588, 0.089274, -0.247982, -0.054556, 0.123991, 0.183507, 0.114072, 0.188467, 0.302539, 0.044637, 0.039677, -0.099193, 0.168628, -0.024798, -0.054556, -0.109112, 0.014879, -0.009919, 0.069435, -0.396772, -0.287660, -0.079354, -0.104153, 0.054556, 0.089274, -0.099193, 0.114072, 0.034718, 0.119032, 0.282700, -0.119032, -0.505884, -0.233104, -0.114072, -0.257902, -0.233104, -0.178547, 0.153749, 0.128951, 0.143830, -0.188467, -0.183507, 0.104153, -0.024798, 0.193426, -0.287660, 0.168628, -0.009919, 0.119032, -0.024798, -0.099193, -0.203346, 0.099193, 0.084314, -0.168628, 0.123991, -0.148789, 0.114072, -0.029758, 0.228144, -0.238063, 0.089274, -0.064475, 0.307498, -0.188467, -0.004960, -0.252942, -0.173588, -0.158709, -0.044637, -0.009919, 0.312458, -0.262861, 0.059516, 0.158709, 0.069435, -0.282700, 0.074395, -0.322377, -0.183507, -0.123991, -0.233104, 0.009919, 0.252942, -0.243023, 0.555481, -0.099193, -0.119032, -0.441409, 0.148789, 0.084314, -0.168628, -0.183507, 0.188467, 0.024798, -0.302539, 0.223184, 0.143830, -0.193426, -0.054556, -0.218225, -0.297579, 0.104153, 0.272781, -0.034718, 0.114072, -0.059516, 0.044637, 0.342216, 0.421570, 0.138870, -0.024798, -0.039677, -0.163668, -0.034718, 0.396772, -0.128951, -0.044637, -0.173588, 0.302539, 0.079354, 0.049596, 0.133911, -0.029758, -0.312458, -0.029758, 0.079354, 0.128951, 0.252942, 0.213265, 0.014879, 0.287660, 0.178547, 0.297579, 0.352135, 0.401732, 0.024798, -0.277740, -0.411651, -0.069435, 0.342216, -0.158709, -0.104153, -0.009919, 0.223184, 0.228144, -0.019839, 0.059516, -0.104153, -0.510844, 0.029758, -0.406691, 0.089274, 0.421570, 0.163668, -0.143830, -0.019839, -0.039677, 0.104153, -0.044637, -0.128951, 0.203346, 0.079354, -0.069435, 0.094233, -0.138870, 0.466207, -0.163668, 0.049596, 0.029758, 0.267821, 0.029758, -0.049596, 0.009919, 0.004960, -0.099193, 0.094233, -0.262861, 0.089274, -0.302539, 0.332297, -0.307498, -0.014879, 0.168628, -0.094233, -0.272781, 0.034718, -0.133911, -0.228144, 0.094233, 0.257902, -0.228144, 0.153749, -0.054556, -0.252942, 0.054556, 0.218225, -0.054556, 0.302539, 0.282700, 0.054556, -0.044637, -0.133911, 0.233104, -0.049596, 0.411651, 0.044637, -0.297579, -0.029758, -0.114072, 0.114072, -0.580279, 0.079354, -0.024798, -0.347175, -0.128951, -0.099193, 0.238063, -0.104153, -0.009919, 0.158709, -0.034718, 0.123991, -0.163668, 0.059516, 0.342216, 0.009919, 0.064475, -0.307498, -0.520763, -0.238063, 0.163668, 0.362054, 0.034718, -0.178547, -0.104153, -0.257902, 0.322377, 0.054556, 0.148789, -0.178547, 0.084314, 0.004960, 0.257902, 0.029758, 0.079354, -0.223184, -0.193426, 0.282700, 0.000000, -0.019839, -0.114072, 0.491005, -0.193426, -0.029758, -0.243023, 0.009919, 0.089274, -0.277740, -0.089274, 0.104153, 0.337256, 0.138870, -0.307498, -0.054556, 0.352135, 0.133911, -0.044637, 0.133911, -0.089274, -0.357095, -0.272781, 0.069435, 0.059516, -0.109112, 0.148789, -0.044637, -0.019839, -0.153749, 0.123991, -0.223184, 0.322377, 0.074395, -0.312458, 0.024798, -0.223184, 0.109112, -0.138870, 0.218225, -0.074395, -0.406691, 0.009919, -0.198386, -0.009919, 0.416611, 0.178547, 0.148789, 0.133911, -0.004960, 0.069435, -0.054556, -0.044637, 0.297579, 0.059516, -0.456288, -0.148789, -0.004960, 0.054556, 0.094233, -0.104153, 0.198386, -0.302539, 0.133911, 0.411651, 0.054556, 0.525723, -0.089274, 0.079354, 0.238063, 0.079354, -0.039677, 0.039677, 0.029758, 0.332297, -0.014879, -0.367014, -0.143830, -0.123991, -0.064475, 0.014879, 0.173588, -0.168628, 0.386853, 0.009919, 0.173588, 0.163668, 0.123991, 0.163668, 0.198386, 0.203346, -0.401732, -0.009919, 0.272781, -0.173588, 0.044637, 0.238063, 0.133911, 0.049596, 0.208305, -0.024798, 0.049596, -0.049596, 0.034718, -0.446368, 0.466207, -0.089274, -0.099193, -0.128951, -0.228144, 0.014879, -0.252942, 0.074395, -0.223184, -0.168628, -0.292619, 0.178547, 0.153749, -0.014879, 0.054556, 0.000000, 0.193426, 0.158709, 0.178547, -0.327337, -0.138870, -0.114072, 0.168628, 0.297579, -0.109112, -0.029758, -0.029758, -0.416611, 0.059516, 0.000000, -0.168628, -0.322377, 0.238063, -0.128951, -0.029758, 0.500925, 0.292619, 0.123991, -0.099193, 0.074395, 0.317418, -0.148789, 0.064475, -0.104153, -0.044637, -0.094233, 0.188467, -0.044637, 0.213265, -0.233104, -0.049596, 0.004960, -0.198386, 0.287660, -0.148789, -0.257902, 0.004960, -0.218225, -0.044637, -0.386853, -0.243023, -0.163668, 0.094233, 0.029758, -0.019839, -0.009919, -0.143830, -0.158709, 0.158709, -0.243023, -0.039677, -0.297579, 0.069435, 0.049596, 0.302539, 0.059516, 0.074395, -0.019839, 0.352135, -0.019839, -0.138870, -0.178547, -0.243023, 0.233104, 0.252942, -0.228144, -0.049596, 0.173588, 0.173588, -0.074395, -0.034718, -0.292619, 0.362054, 0.183507, 0.243023, -0.203346, -0.044637, 0.054556, 0.059516, -0.158709, -0.158709, 0.000000, 0.327337, 0.119032, 0.034718, -0.044637, -0.089274, 0.089274, -0.233104, 0.000000, -0.317418, 0.371974, 0.213265, 0.307498, -0.178547, -0.367014, 0.039677, -0.059516, 0.168628, -0.014879, 0.143830, 0.123991, -0.084314, -0.332297, -0.416611, 0.183507, 0.109112, -0.039677, 0.014879, 0.292619, -0.213265, -0.054556, 0.004960, 0.123991, 0.119032, 0.000000, -0.332297, -0.312458, -0.198386, -0.213265, 0.119032, 0.322377, 0.168628, 0.104153, -0.262861, 0.327337, -0.049596, -0.228144, -0.074395, 0.168628, 0.123991, 0.396772, 0.044637, 0.322377, 0.193426, 0.267821, -0.178547, 0.297579, 0.148789, -0.218225, -0.138870, 0.044637, 0.049596, 0.133911, 0.064475, 0.069435, 0.064475, -0.158709, -0.044637, -0.173588, 0.267821, 0.327337, 0.079354, -0.228144, 0.029758, 0.014879, 0.198386, -0.109112, -0.133911, 0.431490, 0.099193, 0.421570, 0.233104, -0.054556, 0.054556, -0.317418, -0.133911, -0.123991, -0.287660, 0.342216, -0.049596, -0.153749, 0.228144, -0.213265, 0.262861, 0.406691, -0.084314, -0.004960, 0.193426, 0.188467, -0.099193, -0.223184, 0.163668, -0.257902, -0.153749, 0.441409, 0.099193, 0.128951, -0.089274, -0.208305, -0.009919, -0.004960, -0.109112, 0.024798, -0.119032, 0.019839, 0.391812, -0.024798, 0.198386, 0.327337, -0.505884, -0.099193, 0.510844, -0.148789, 0.094233, -0.153749, -0.039677, 0.352135, 0.272781, -0.228144, -0.287660, -0.272781, 0.148789, 0.277740, 0.074395, 0.109112, -0.064475, 0.044637, 0.074395, -0.292619, 0.153749, -0.064475, -0.114072, 0.198386, -0.039677, -0.128951, -0.004960, 0.257902, -0.228144, -0.094233, 0.064475, 0.014879, 0.188467, -0.416611, 0.099193, 0.362054, -0.208305, 0.198386, -0.079354, 0.009919, 0.119032, 0.332297, 0.243023, -0.168628, 0.158709, 0.039677, 0.143830, 0.277740, -0.168628, 0.009919, 0.099193, -0.004960, -0.257902, -0.297579, 0.208305, -0.104153, 0.119032, 0.247982, 0.381893, -0.223184, -0.367014, -0.327337, -0.168628, -0.094233, 0.208305, -0.019839, 0.183507, 0.084314, 0.133911, 0.109112, -0.148789, -0.183507, -0.411651, -0.024798, -0.114072, -0.029758, -0.009919, 0.173588, -0.059516, -0.049596, 0.039677, 0.317418, 0.138870, -0.247982, -0.084314, 0.158709, 0.054556, -0.084314, -0.049596, 0.074395, 0.019839, -0.282700, -0.119032, -0.262861, 0.163668, -0.069435, -0.064475, -0.059516, 0.094233, 0.123991, -0.079354, -0.272781, -0.267821, 0.233104, 0.114072, -0.218225, 0.540602, 0.089274, 0.262861, 0.079354, 0.267821, -0.119032, -0.109112, -0.128951, 0.128951, -0.044637, -0.272781, 0.277740, 0.297579, -0.054556, -0.084314, -0.049596, 0.123991, 0.059516, 0.238063, -0.168628, -0.009919, 0.163668, -0.307498, 0.109112, -0.064475, 0.218225, -0.168628, -0.004960, -0.168628, 0.119032, 0.094233, -0.183507, -0.089274, -0.292619, -0.094233, 0.064475, -0.183507, -0.168628, 0.089274, 0.074395, -0.367014, -0.024798, -0.069435, 0.119032, -0.302539, -0.376933, -0.123991, -0.009919, -0.069435, -0.208305, -0.119032, 0.014879, -0.183507, -0.238063, 0.163668, -0.332297, -0.148789, -0.391812, -0.024798, -0.133911, -0.059516, -0.123991, 0.123991, -0.292619, -0.044637, 0.059516, -0.069435, 0.049596, -0.069435, 0.034718, 0.158709, -0.347175, -0.044637, 0.352135, -0.347175, -0.282700, -0.054556, 0.307498, 0.029758, 0.357095, -0.148789, 0.208305, -0.317418, 0.009919, 0.004960, -0.243023, 0.049596, -0.099193, 0.213265, -0.342216, 0.158709, 0.123991, -0.332297, 0.386853, -0.262861, -0.208305, 0.123991, -0.044637, 0.148789, 0.084314, -0.297579, -0.307498, -0.163668, 0.337256, -0.014879, 0.074395, 0.178547, -0.004960, -0.257902, -0.019839, -0.228144, -0.034718, -0.277740, -0.158709, -0.119032, -0.153749, 0.629876, 0.277740, 0.178547, -0.267821, -0.004960, 0.247982, 0.084314, -0.094233, 0.000000, -0.039677, 0.332297, 0.178547, 0.009919, -0.213265, -0.208305, -0.044637, 0.019839, 0.218225, -0.297579, 0.014879, -0.247982, -0.004960, -0.128951, 0.421570, -0.059516, 0.362054, -0.203346, -0.143830, -0.099193, -0.024798, 0.094233, -0.123991, 0.163668, 0.109112, -0.104153, -0.233104, 0.009919, -0.218225, 0.376933, 0.104153, -0.059516, 0.049596, -0.054556, 0.019839, -0.044637, -0.019839, 0.371974, -0.019839, 0.104153, 0.168628, -0.024798, -0.272781, -0.158709, 0.223184, 0.044637, 0.039677, -0.168628, -0.287660, -0.109112, 0.094233, -0.089274, -0.148789, 0.178547, -0.039677, -0.089274, -0.049596, -0.024798, 0.064475, -0.158709, 0.089274, 0.029758, -0.247982, 0.362054, 0.024798, -0.004960, -0.099193, 0.173588, -0.059516, 0.188467, -0.629876, 0.094233, 0.371974, 0.069435, 0.252942, -0.357095, -0.272781, -0.367014, 0.014879, -0.049596, -0.262861, 0.009919, -0.094233, -0.094233, 0.059516, 0.223184, 0.133911, 0.411651, -0.044637, -0.044637, 0.109112, 0.228144, 0.386853, -0.233104, 0.069435, 0.228144, -0.302539, 0.029758, 0.089274, 0.044637, -0.238063, -0.138870, -0.158709, -0.019839, 0.049596, 0.039677, 0.000000, -0.069435, 0.109112, -0.213265, -0.188467, -0.262861, -0.267821, -0.094233, 0.133911, 0.391812, 0.123991, -0.317418, 0.233104, -0.029758, -0.099193, -0.193426, 0.074395, -0.009919, 0.252942, 0.322377, -0.530683, 0.208305, 0.252942, 0.203346, -0.069435, -0.262861 }; // Time filter of shape {64, 8}. const float time_weights_data_16x1x1[] = { -0.052026, 0.043107, 0.053512, 0.013378, 0.011892, -0.182834, -0.108511, 0.153105, 0.050539, -0.173915, 0.145672, 0.208103, -0.221481, 0.108511, -0.496475, 0.181347, -0.016351, -0.132294, -0.234859, -0.243778, 0.028243, -0.228914, -0.130808, -0.167969, -0.041621, -0.306209, -0.193239, -0.028243, -0.057972, -0.057972, -0.497962, 0.054999, 0.181347, 0.047566, -0.099592, -0.111484, -0.130808, -0.071350, 0.380532, 0.010405, 0.041621, 0.052026, 0.022297, 0.081755, 0.098106, 0.099592, -0.584176, -0.023783, 0.062431, -0.090674, -0.279453, -0.486070, -0.273507, 0.004459, -0.062431, 0.095133, 0.056485, 0.022297, -0.105538, -0.184320, 0.358235, 0.254183, 0.049053, 0.084728, 0.218508, 0.078782, -0.136754, -0.017837, -0.124862, -0.118916, -0.001486, 0.043107, 0.254183, 0.087701, 0.261616, 0.309182, -0.404315, -0.040134, -0.046080, -0.052026, -0.034188, -0.475665, -0.025270, -0.049053, -0.046080, -0.062431, 0.020810, 0.040134, -0.135267, -0.169456, -0.050539, -0.576743, 0.034188, 0.075809, 0.101079, 0.136754, 0.083241, 0.077296, -0.050539, 0.761064, -0.335938, -0.080268, 0.025270, 0.257156, 0.227427, 0.252697, 0.065404, 0.115943, 0.222968, -0.026756, -0.054999, 0.107025, -0.093646, 0.041621, -0.092160, -0.474178, -0.016351, 0.004459, 0.049053, 0.019324, 0.019324, 0.074323, 0.038648, -0.613905, 0.182834, 0.075809, 0.028243, 0.019324, 0.010405, -0.011892, 0.001486, -0.492016, -0.224454, -0.474178, -0.147159, 0.002973, 0.102565, 0.136754, -0.267561, -0.001486, -0.095133, -0.040134, 0.066890, 0.074323, 0.104052, 0.532150, 0.090674, 0.072836, -0.053512, -0.004459, 0.020810, 0.046080, 0.062431, 0.477151, 0.133781, -0.029729, -0.026756, 0.031215, 0.156077, 0.096619, 0.251210, 0.352289, 0.657012, 0.047566, -0.014865, -0.072836, -0.016351, 0.008919, -0.053512, 0.016351, 0.300263, 0.047566, 0.020810, 0.169456, 0.001486, 0.007432, 0.111484, 0.044594, -0.188779, -0.096619, 0.074323, -0.040134, 0.160537, 0.138240, 0.184320, 0.377559, -0.092160, -0.049053, 0.056485, -0.032702, 0.001486, -0.083241, -0.472692, -0.114457, -0.117430, -0.075809, 0.026756, 0.163510, 0.172428, 0.127835, -0.199185, -0.218508, -0.057972, -0.132294, -0.162023, -0.019324, -0.245265, -0.395396, -0.254183, 0.084728, 0.248238, 0.191752, 0.221481, 0.173915, 0.173915, -0.208103, -0.077296, 0.384991, -0.313641, -0.313641, -0.147159, -0.090674, 0.035675, 0.059458, -0.010405, 0.019324, 0.087701, 0.016351, 0.037161, 0.469719, -0.074323, 0.092160, 0.026756, 0.090674, 0.098106, 0.004459, -0.034188, 0.492016, -0.367154, -0.093646, -0.063917, 0.041621, 0.017837, 0.026756, -0.062431, -0.350803, 0.425125, 0.002973, 0.083241, 0.075809, 0.016351, 0.047566, -0.185807, -0.107025, -0.098106, -0.144186, 0.255670, 0.020810, 0.105538, 0.029729, 0.129321, 0.156077, 0.141213, 0.334452, 0.147159, -0.066890, 0.035675, 0.115943, 0.240805, 0.328506, 0.162023, -0.237832, 0.218508, 0.233373, 0.214049, 0.099592, 0.026756, -0.322560, -0.236346, -0.166483, 0.225941, 0.109997, -0.147159, 0.147159, -0.266075, 0.111484, 0.078782, -0.120403, 0.022297, -0.075809, -0.148645, -0.251210, -0.176888, -0.044594, -0.023783, 0.016351, 0.026756, -0.013378, -0.069863, -0.112970, 0.013378, 0.086214, 0.014865, 0.352289, -0.240805, -0.135267, -0.114457, -0.472692, 0.334452, 0.095133, 0.047566, 0.130808, -0.068377, -0.007432, -0.130808, -0.121889, -0.053512, -0.245265, -0.371613, -0.083241, 0.000000, -0.028243, 0.029729, -0.093646, -0.004459, -0.038648, -0.108511, -0.475665, -0.169456, -0.047566, -0.010405, -0.114457, -0.353776, -0.034188, -0.044594, 0.041621, -0.047566, -0.107025, 0.004459, 0.053512, 0.047566, -0.358235, -0.193239, 0.040134, -0.096619, -0.054999, 0.099592, 0.032702, 0.205130, -0.170942, -0.237832, -0.405801, -0.126348, -0.072836, -0.203644, -0.169456, -0.093646, -0.074323, 0.078782, 0.607959, -0.437017, -0.164996, -0.166483, 0.043107, -0.016351, 0.258643, 0.065404, -0.057972, 0.017837, 0.080268, 0.050539, -0.013378, -0.215536, -0.524718, 0.260129, 0.040134, -0.002973, -0.046080, 0.020810, 0.025270, 0.145672, 0.515799, 0.233373, 0.011892, 0.139727, 0.126348, 0.065404, -0.007432, -0.008919, 0.035675, 0.083241, 0.040134, -0.005946, 0.503907, -0.490529, -0.181347, -0.092160, -0.038648, 0.019324, 0.133781, -0.011892, 0.041621, 0.062431, -0.062431, -0.040134, -0.092160, -0.111484, -0.133781, -0.130808, -0.484583, -0.248238, 0.037161, -0.092160, -0.056485, -0.041621, 0.112970, 0.248238, 0.438503, 0.258643, -0.013378, 0.004459, 0.043107, 0.040134, 0.017837, 0.101079, 0.264589, 0.212563, 0.014865, 0.285399, 0.153105, 0.170942, 0.358235, 0.334452, 0.086214, 0.132294, 0.098106, -0.001486, 0.107025, 0.200671, -0.026756, 0.344857, 0.227427, -0.041621, 0.098106, 0.063917, -0.093646, 0.130808, 0.285399, -0.319587, 0.035675, -0.017837, -0.319587, 0.016351, -0.098106, -0.017837, 0.083241, 0.074323, -0.054999, 0.276480, 0.316614, -0.099592, -0.059458, 0.156077, -0.043107, 0.035675, 0.056485, -0.022297, 0.017837, -0.001486, 0.340398, 0.492016, 0.004459, 0.057972, -0.150132, -0.206617, -0.257156, -0.248238, -0.080268, -0.164996, 0.352289, -0.054999, -0.056485, 0.010405, -0.049053, -0.041621, -0.099592, 0.013378, -0.089187, 0.057972, -0.413234, 0.217022, 0.013378, -0.080268, -0.035675, 0.035675, 0.007432, 0.002973, -0.469719, 0.141213, 0.136754, 0.153105, 0.130808, -0.104052, -0.508367, -0.291345, -0.072836, -0.019324, -0.252697, -0.214049, -0.214049, 0.130808, 0.484583 }; // Bias of shape {64} const float bias_data_16x1x1[] = { -0.245395, -0.083545, -0.262522, -0.407912, -0.560898, -0.364789, -0.037964, -0.378594, 0.178152, 0.400380, -0.301349, -0.240913, -0.159454, -0.158757, -0.073665, 0.455906, -0.061232, 0.318907, -0.226993, -0.344644, 0.140316, 0.559608, 0.109774, 0.437391, 0.113849, -0.162068, 0.039572, 0.569472, 0.460205, 0.113459, 0.370469, 0.176811, 0.203063, -0.296975, -0.271655, 0.059862, -0.159912, -0.077310, -0.338314, -0.195477, -0.256762, 0.233834, 0.083172, 0.029040, -0.236288, -0.267054, -0.166627, 0.188319, -0.271391, -0.222920, 0.106463, 0.263614, 0.384986, -0.125957, -0.095890, 0.363686, -0.036990, -0.358884, -0.178254, 0.305596, 0.390088, -0.189437, 0.613409, 0.399639 }; // Activation state with shape {64, 8}. These initial values must be copied into // a mutable activation state tensor. const float initial_activation_state_data_16x1x1[] = { -0.582275, -0.586623, -1.262373, -1.277279, -1.542175, -1.271999, -1.429757, -1.184425, -0.462094, -1.443421, 0.230736, -0.494701, -0.354955, -2.534061, -4.277471, -4.218467, 0.403711, -0.248748, -0.330111, -0.467683, 0.549047, 0.733511, -0.230115, 0.793136, -1.126353, -0.984123, -0.081984, -0.222351, 0.692830, 0.517060, 1.367958, 2.118860, -0.116766, -0.826365, -2.402700, -2.313884, -2.898954, -2.076005, -2.405185, -2.755481, 0.329490, 0.085400, -1.485966, -2.034702, -2.161405, -1.269515, -1.151818, -1.823841, 0.561469, 1.109273, 1.693411, -0.082605, -0.069252, -1.225107, -1.330693, -1.411435, 0.253406, -0.357439, -1.593415, -0.879779, -1.111136, 1.821357, 2.471952, 1.236908, -4.014127, -2.810448, -2.944604, -1.930980, -1.566398, -0.838166, -0.319242, 0.749349, 1.156476, 0.658670, 1.997437, 2.080663, 2.912618, 2.677224, 2.642442, 2.796163, -0.272349, -0.473273, 3.120063, 2.747097, 3.595510, 1.874150, 2.049919, 2.093396, -1.049959, 0.277939, -1.255541, -1.052443, -1.810177, -0.883505, -0.538178, 0.524203, -1.017662, -0.269244, 0.039129, -0.227941, -0.114592, -2.018243, -2.548968, -0.706804, 0.890959, 0.102480, 0.349986, 0.405885, 1.287216, 0.756181, 0.319242, -0.641590, -3.841774, -2.716042, -4.342065, -3.826557, -2.924729, -1.643724, -1.237839, -0.597492, -1.954892, -1.215169, -1.528201, -1.018904, -0.863941, -0.293467, 0.039439, 0.672023, 1.408019, 1.362679, 1.467644, 1.006171, 0.310236, -0.249990, -1.048406, -0.752144, -1.831605, -1.058033, -1.096541, -0.293467, 0.051551, 0.232600, 0.088816, 2.570395, 0.704009, 2.465120, 3.010751, 2.139357, 0.630410, 1.006171, 1.545281, 1.486898, -1.162998, -2.344317, -4.593918, -3.522842, -2.872247, -1.416714, -0.642521, -0.230115, 0.315205, -0.368930, -0.162726, 0.396879, 0.505570, 0.534451, 0.554947, 1.270447, 0.388805, 0.531967, -1.243119, -0.671713, -1.214859, -0.238189, 0.016459, -1.164550, 0.609603, 3.293348, 2.600208, 1.454290, -1.034121, -1.760179, -1.192500, -0.613951, 3.449553, 2.912618, 1.917937, 1.435968, 0.879158, 1.118279, 0.102791, -0.502465, -0.239121, -0.092853, 1.786265, 1.943091, 2.547104, 2.630641, 2.585302, 2.965411, -0.945615, -2.538720, -2.474126, -1.088156, 0.056209, 0.864873, 0.170490, 0.457435, 0.545941, 0.752765, 1.569503, 1.129459, 0.662086, -0.527929, -0.810838, -1.662978, 1.285042, 1.653040, 4.130893, 2.961995, 4.147041, 3.256393, 3.881524, 2.522571, -0.875431, -1.112378, 2.105817, 2.180970, 3.121926, 1.577577, 1.639376, 2.906407, -0.142230, 0.421101, 2.212335, 2.311399, 3.993321, 3.651719, 4.206666, 4.678387, -1.304917, -1.130701, -2.543067, -2.500212, -2.197118, -1.197158, -0.949652, -0.282908, 0.320795, -1.543728, 1.290322, 1.788128, 3.957297, 3.205774, 2.892432, 2.297114, 0.138814, -0.139435, 0.936920, 0.344707, 0.723263, -1.772290, -3.138385, -2.287177, -2.405806, -1.859864, -4.572801, -3.410424, -3.855748, -2.239663, -2.269786, -1.582857, 4.238342, 3.858543, 2.499901, 1.087535, 0.290051, -0.026086, -0.880400, -2.602692, -1.404292, 0.253096, -0.665502, -1.443421, -0.925119, -0.096580, 1.115484, 1.846200, -1.604284, -1.244671, -0.464888, 0.326385, 0.168006, -0.262723, -0.744691, 0.953379, -0.407127, -0.349986, -1.154302, 0.831023, 1.590931, 2.538720, 2.063583, 3.697680, -0.752455, -1.293117, -1.330693, -1.869802, -0.592523, 0.631652, 1.198089, -0.481347, 3.738983, 4.153252, 2.782499, 2.244321, 0.709289, 1.650245, 1.700865, 0.385078, 2.192460, 2.610456, 4.009780, 3.492719, 2.574743, 2.116687, 1.856138, 1.205853, 2.722563, 4.075305, 5.415935, 3.009198, 2.715421, 1.571056, 0.897170, -2.430339, 0.749970, 0.425760, -0.302783, 0.817359, 1.031636, 1.913589, 2.686229, 1.631923, -1.459259, -1.793097, -1.187531, -1.553355, -0.844998, -1.296843, -1.805519, -0.486627, 0.909591, 2.082837, -1.473855, -2.456735, -3.851401, -2.760139, -3.060438, -2.605487, -2.138735, -2.441519, -1.333177, -1.353984, -0.245642, -0.588486, 0.033850, 2.084700, 0.076084, 0.690035, 0.747797, 0.594697, -1.016109, -1.348083, -1.201195, -1.088466, 2.045571, 2.460772, 0.717984, 0.041613, -0.721711, 1.134738, 2.322269, 1.112378, -0.307441, -0.581033, -0.868599, -0.018633, 0.856488, 0.919839, 0.303094, -0.433213, 0.811148, -0.508986, -1.060828, -1.227591, -1.566087, -1.117968, -1.385038, -2.011101, -0.490353, -1.849616, -0.594697, -1.055859, 1.110205, 0.622646, 0.145957, 0.359303, 1.012072, 0.774814, -0.400295, -1.484103, -2.007374, -1.441247, -0.997787, -0.581033, -0.545941, -0.306510, 0.693451, 0.087264, -0.227320, -1.211753, -1.532859, -1.688753, 0.065215, 0.134777, 0.608051, -0.393152, -0.214588, -0.635689, -1.499320, 0.069562, -1.555839, -2.633126, -2.966032, -1.550870, -0.101549, 0.874189, 0.436318, 0.299367, 2.289972, 2.339659, 2.602071, 1.564535, 0.019254, -0.583207, -1.295912, -2.424749, -1.221070, -1.175109, -0.577306, -0.102791, 1.877876, 2.568222, 2.173827, 3.131243, 2.637784, 2.088737, 3.679047, 3.218506, 2.483442, 1.650556, 1.363611, -0.027328, 1.486898, -0.721711, -3.684327, -3.006093, -3.777491, -2.327548, -2.737470, -4.549510, -0.060867, 0.127635, 0.680408, 0.581344, 0.320174, -0.403090, -0.838166, 0.293777, -0.995613, -0.165521, -0.419859, 1.110515, 1.203679, 1.749931, 2.467294, 4.276539, 0.031055, -0.967664, 1.167035, 1.865144, 3.221923, 3.248630, 4.121266, 4.187723, 0.749039, -1.571056, 0.785994, 1.568572, 3.759479, 3.588678, 4.116608, 3.864444, -0.290051, -0.271107, 0.375140, 0.537556, 0.536314, 0.095959, 0.054656, 0.088816 }; // One output with shape {1, 64} const float golden_output_16x1x1[] = { -0.087914, 1.145864, -0.418088, -1.556392, -0.925298, 0.205252, 0.289119, 1.331180, -0.218010, 0.963057, -2.225886, 1.248478, 1.448983, 0.355467, 1.682174, 0.803739, 0.449738, 0.543566, 1.916269, -2.975136, 0.222774, 0.241589, -0.104216, 1.561748, 0.936818, -0.089907, -0.520117, -0.870353, 1.606074, 0.895770, 0.521297, -0.369994, -0.889351, -2.809309, 2.404628, 1.069754, -0.195456, -1.105652, 1.272715, -1.233177, 1.271416, -1.691805, -1.058125, -0.716227, 0.052540, 1.262483, 0.540555, 1.735760, -0.539197, -0.014367, -0.243002, 1.072254, 0.528985, -0.731151, -1.262649, 2.338702, -0.603093, 0.970736, -3.567897, 0.035085, -0.201711, -0.550400, 1.545573, -1.805005 }; // One output with shape {1, 64} const float golden_output_relu_16x1x1[] = { 0.000000, 1.145864, 0.000000, 0.000000, 0.000000, 0.205252, 0.289119, 1.331180, 0.000000, 0.963057, 0.000000, 1.248478, 1.448983, 0.355467, 1.682174, 0.803739, 0.449738, 0.543566, 1.916269, 0.000000, 0.222774, 0.241589, 0.000000, 1.561748, 0.936818, 0.000000, 0.000000, 0.000000, 1.606074, 0.895770, 0.521297, 0.000000, 0.000000, 0.000000, 2.404628, 1.069754, 0.000000, 0.000000, 1.272715, 0.000000, 1.271416, 0.000000, 0.000000, 0.000000, 0.052540, 1.262483, 0.540555, 1.735760, 0.000000, 0.000000, 0.000000, 1.072254, 0.528985, 0.000000, 0.000000, 2.338702, 0.000000, 0.970736, 0.000000, 0.035085, 0.000000, 0.000000, 1.545573, 0.000000 }; template <typename T> void ValidateSVDFGoldens(const int batch_size, const int num_units, const int input_size, const int rank, TfLiteTensor *tensors, const int tensor_count, TfLiteFusedActivation activaiton, const T *input_sequences_data, const int input_sequences_len, T *output_data, const T *expected_output, float tolerance = 1e-5f) { TfLiteSVDFParams params; params.rank = rank; params.activation = activaiton; int inputs_array_data[] = { 5, 0, 1, 2, 3, 4 }; TfLiteIntArray *inputs_array = IntArrayFromInts(inputs_array_data); int outputs_array_data[] = { 1, 5 }; TfLiteIntArray *outputs_array = IntArrayFromInts(outputs_array_data); const TfLiteRegistration registration = Register_SVDF(); micro::KernelRunner runner(registration, tensors, tensor_count, inputs_array, outputs_array, &params); TfLiteStatus init_and_prepare_status = runner.InitAndPrepare(); TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, init_and_prepare_status); // Abort early to make it clear init and prepare failed. if (init_and_prepare_status != kTfLiteOk) { return; } int num_inputs = input_sequences_len / (input_size * batch_size); for (int i = 0; i < num_inputs; ++i) { const T *input_batch_start = input_sequences_data + i * input_size * batch_size; memcpy(tensors[0].data.raw, input_batch_start, tensors[0].bytes); TfLiteStatus status = runner.Invoke(); TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, status); // Only validate outputs when invoke has succeeded. if (status == kTfLiteOk) { int output_idx = 0; int golden_idx = i * batch_size * num_units; for (int j = golden_idx; j < golden_idx + batch_size * num_units; ++j) { TF_LITE_MICRO_EXPECT_NEAR(expected_output[j], output_data[output_idx], tolerance); output_idx++; } } } } #if !defined(XTENSA) // Needed to avoid build errors from unused functions. void TestSVDF(const int batch_size, const int num_units, const int input_size, const int memory_size, const int rank, TfLiteFusedActivation activation, float *input_data, const float *feature_weights_data, const float *time_weights_data, float *activation_state_data, const float *bias_data, float *scratch_data, float *output_data, const float *input_sequences_data, int input_sequences_len, const float *expected_output, float tolerance = 1e-5f) { const int num_filters = num_units * rank; int input_dims_arg[] = { 2, batch_size, input_size }; TfLiteIntArray *input_dims = IntArrayFromInts(input_dims_arg); int feature_weights_dims_args[] = { 2, num_filters, input_size }; TfLiteIntArray *feature_weights_dims = IntArrayFromInts(feature_weights_dims_args); int time_weights_dims_args[] = { 2, num_filters, memory_size }; TfLiteIntArray *time_weights_dims = IntArrayFromInts(time_weights_dims_args); int activation_state_dims_args[] = { 2, batch_size, memory_size * num_filters }; TfLiteIntArray *activation_state_dims = IntArrayFromInts(activation_state_dims_args); int bias_dims_args[] = { 1, num_units }; TfLiteIntArray *bias_dims = IntArrayFromInts(bias_dims_args); int output_dims_args[] = { 2, batch_size, num_units }; TfLiteIntArray *output_dims = IntArrayFromInts(output_dims_args); const int tensor_count = 6; // 5 inputs, 1 output TfLiteTensor tensors[] = { CreateTensor(input_data, input_dims), CreateTensor(feature_weights_data, feature_weights_dims), CreateTensor(time_weights_data, time_weights_dims), CreateTensor(bias_data, bias_dims), CreateTensor(activation_state_data, activation_state_dims, /*is_variable=*/true), CreateTensor(output_data, output_dims), }; ValidateSVDFGoldens(batch_size, num_units, input_size, rank, tensors, tensor_count, activation, input_sequences_data, input_sequences_len, output_data, expected_output, tolerance); } #endif // The pattern to this method's arguemnts is: // <kernel metadata> // for each tensor in // {input, feature weights, time weights, bias, activation state, output}: // <tensor float values> <tensor quantized buffer> <tensor quantization data> inline void TestIntegerSVDF( const int batch_size, const int num_units, const int input_size, const int memory_size, const int rank, TfLiteFusedActivation activation, int8_t *input_quantized, float input_scale, int input_zero_point, const float *feature_weights_data, int8_t *feature_weights_quantized, const float feature_weights_scale, const float *time_weights_data, int16_t *time_weights_quantized, float time_weights_scale, const float *bias_data, int32_t *bias_quantized, const float *initial_activation_state_data, int16_t *activation_state_quantized, float activation_state_scale, int8_t *output_data, float output_scale, int output_zero_point, const float *input_sequences_data, int8_t *input_sequences_quantized, const int input_sequences_len, const float *golden_output, int8_t *golden_output_quantized, int golden_output_len) { const int num_filters = num_units * rank; int input_dims_arg[] = { 2, batch_size, input_size }; TfLiteIntArray *input_dims = IntArrayFromInts(input_dims_arg); int feature_weights_dims_args[] = { 2, num_filters, input_size }; TfLiteIntArray *feature_weights_dims = IntArrayFromInts(feature_weights_dims_args); int time_weights_dims_args[] = { 2, num_filters, memory_size }; TfLiteIntArray *time_weights_dims = IntArrayFromInts(time_weights_dims_args); int bias_dims_data[] = { 1, num_units }; TfLiteIntArray *bias_dims = IntArrayFromInts(bias_dims_data); int activation_state_dims_args[] = { 2, batch_size, memory_size * num_filters }; TfLiteIntArray *activation_state_dims = IntArrayFromInts(activation_state_dims_args); int output_dims_args[] = { 2, batch_size, num_units }; TfLiteIntArray *output_dims = IntArrayFromInts(output_dims_args); const int tensor_count = 6; // 5 inputs, 1 output TfLiteTensor tensors[] = { CreateQuantizedTensor(input_quantized, input_dims, input_scale, input_zero_point), CreateQuantizedTensor(feature_weights_data, feature_weights_quantized, feature_weights_dims, feature_weights_scale, 0), CreateQuantizedTensor(time_weights_data, time_weights_quantized, time_weights_dims, time_weights_scale, 0), CreateQuantizedBiasTensor(bias_data, bias_quantized, bias_dims, time_weights_scale, activation_state_scale), CreateQuantizedTensor(initial_activation_state_data, activation_state_quantized, activation_state_dims, activation_state_scale, 0, /*is_variable=*/true), CreateQuantizedTensor(output_data, output_dims, output_scale, output_zero_point) }; tflite::Quantize(golden_output, golden_output_quantized, golden_output_len, output_scale, output_zero_point); tflite::Quantize(input_sequences_data, input_sequences_quantized, input_sequences_len, input_scale, input_zero_point); ValidateSVDFGoldens(batch_size, num_units, input_size, rank, tensors, tensor_count, activation, input_sequences_quantized, input_sequences_len, output_data, golden_output_quantized, /*tolerance*/ 1); } } // namespace } // namespace testing } // namespace tflite TF_LITE_MICRO_TESTS_BEGIN #if !defined(XTENSA) // TODO(b/170332589): xtensa kernels are less general than \ // reference kernels and we ifdef out test cases that are \ // currently known to fail. TF_LITE_MICRO_TEST(SvdfFloat2x2Input2x4OutputShouldMatchGolden) { constexpr int batch_size = 2; constexpr int num_units = 4; constexpr int input_size = 2; constexpr int memory_size = 10; constexpr int rank = 2; constexpr int num_filters = num_units * rank; const int input_size_dims_count = batch_size * input_size; float input_data[input_size_dims_count]; const int activation_state_dims_count = batch_size * memory_size * num_filters; float activation_state_data[activation_state_dims_count]; memcpy(activation_state_data, tflite::testing::initial_activation_state_data_2x2x10, sizeof(tflite::testing::initial_activation_state_data_2x2x10)); const int scratch_dims_count = batch_size * num_filters; float scratch_data[scratch_dims_count]; const int output_dims_count = batch_size * num_units; float output_data[output_dims_count]; tflite::testing::TestSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActNone, input_data, tflite::testing::feature_weights_data_2x2x10, tflite::testing::time_weights_data_2x2x10, activation_state_data, tflite::testing::bias_data_2x2x10, scratch_data, output_data, tflite::testing::input_data_2x2x10, sizeof(tflite::testing::input_data_2x2x10) / sizeof(float), tflite::testing::golden_output_2x2x10); } #endif TF_LITE_MICRO_TEST(SvdfQuantized2x2Input2x4OutputShouldMatchGolden) { constexpr int batch_size = 2; constexpr int num_units = 4; constexpr int input_size = 2; constexpr int memory_size = 10; constexpr int rank = 2; constexpr int num_filters = num_units * rank; const int input_size_dims_count = batch_size * input_size; const int activation_state_dims_count = batch_size * memory_size * num_filters; const int output_dims_count = batch_size * num_units; int8_t output_data[output_dims_count]; float input_scale = 2.5f / INT8_MAX; // Range is [-2.5, 2.5] float feature_weights_scale = 1.f / INT8_MAX; // Range is [-1, 1] float time_weights_scale = 1.f / INT16_MAX; // Range is [-1, 1] float activation_state_scale = 16.f / INT16_MAX; // Range is [-16, 16] float output_scale = 1.f / INT8_MAX; // Range is [-1, 1] int input_zero_point = 0; int output_zero_point = 0; int8_t input_quantized[input_size_dims_count]; int8_t input_sequences_quantized[sizeof(tflite::testing::input_data_2x2x10) / sizeof(float)]; int8_t feature_weights_quantized [sizeof(tflite::testing::feature_weights_data_2x2x10) / sizeof(float)]; int16_t time_weights_quantized[sizeof(tflite::testing::time_weights_data_2x2x10) / sizeof(float)]; int16_t activation_state_quantized[activation_state_dims_count]; int32_t bias_quantized[sizeof(tflite::testing::bias_data_2x2x10) / sizeof(float)]; int8_t golden_quantized[sizeof(tflite::testing::golden_output_2x2x10) / sizeof(float)]; tflite::testing::TestIntegerSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActRelu, input_quantized, input_scale, input_zero_point, tflite::testing::feature_weights_data_2x2x10, feature_weights_quantized, feature_weights_scale, tflite::testing::time_weights_data_2x2x10, time_weights_quantized, time_weights_scale, tflite::testing::bias_data_2x2x10, bias_quantized, tflite::testing::initial_activation_state_data_2x2x10, activation_state_quantized, activation_state_scale, output_data, output_scale, output_zero_point, tflite::testing::input_data_2x2x10, input_sequences_quantized, sizeof(tflite::testing::input_data_2x2x10) / sizeof(float), tflite::testing::golden_output_2x2x10, golden_quantized, sizeof(tflite::testing::golden_output_2x2x10) / sizeof(float)); } #if !defined(XTENSA) // TODO(b/170332589): xtensa kernels are less general than \ // reference kernels and we ifdef out test cases that are \ // currently known to fail. TF_LITE_MICRO_TEST(SvdfFloat1x16Input64x1OutputShouldMatchGolden) { constexpr int batch_size = 1; constexpr int num_units = 64; constexpr int input_size = 16; constexpr int memory_size = 8; constexpr int rank = 1; constexpr int num_filters = num_units * rank; constexpr int activation_state_dims_count = batch_size * memory_size * num_filters; constexpr int output_dims_count = batch_size * num_units; constexpr int input_dims_count = batch_size * input_size; float input_data[input_dims_count]; float output_data[output_dims_count]; float scratch_buffer[batch_size * num_filters]; float activation_state_data_mutable[activation_state_dims_count]; // Initialize activation state to starting values. memcpy(activation_state_data_mutable, tflite::testing::initial_activation_state_data_16x1x1, sizeof(tflite::testing::initial_activation_state_data_16x1x1)); tflite::testing::TestSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActNone, input_data, tflite::testing::feature_weights_data_16x1x1, tflite::testing::time_weights_data_16x1x1, activation_state_data_mutable, tflite::testing::bias_data_16x1x1, scratch_buffer, output_data, tflite::testing::input_data_16x1x1, input_size, tflite::testing::golden_output_16x1x1); } TF_LITE_MICRO_TEST(SvdfFloat1x16Input64x1OutputReluShouldMatchGolden) { constexpr int batch_size = 1; constexpr int num_units = 64; constexpr int input_size = 16; constexpr int memory_size = 8; constexpr int rank = 1; constexpr int num_filters = num_units * rank; constexpr int activation_state_dims_count = batch_size * memory_size * num_filters; constexpr int output_dims_count = batch_size * num_units; constexpr int input_dims_count = batch_size * input_size; float input_data[input_dims_count]; float output_data[output_dims_count]; float scratch_buffer[batch_size * num_filters]; float activation_state_data_mutable[activation_state_dims_count]; // Initialize activation state to starting values. memcpy(activation_state_data_mutable, tflite::testing::initial_activation_state_data_16x1x1, sizeof(tflite::testing::initial_activation_state_data_16x1x1)); tflite::testing::TestSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActRelu, input_data, tflite::testing::feature_weights_data_16x1x1, tflite::testing::time_weights_data_16x1x1, activation_state_data_mutable, tflite::testing::bias_data_16x1x1, scratch_buffer, output_data, tflite::testing::input_data_16x1x1, input_size, tflite::testing::golden_output_relu_16x1x1); } #endif TF_LITE_MICRO_TEST(SvdfQuantized1x16Input64x1OutputShouldMatchGolden) { constexpr int batch_size = 1; constexpr int num_units = 64; constexpr int input_size = 16; constexpr int memory_size = 8; constexpr int rank = 1; constexpr int num_filters = num_units * rank; constexpr int activation_state_dims_count = batch_size * memory_size * num_filters; constexpr int output_dims_count = batch_size * num_units; constexpr int input_dims_count = batch_size * input_size; int8_t output_data[output_dims_count]; float input_scale = 0.10075444; float feature_weights_scale = 0.00649388; float time_weights_scale = 0.001571355; float activation_state_scale = 0.00045896982; float output_scale = 0.051445257; int input_zero_point = 2; int output_zero_point = 0; int8_t input_quantized[input_dims_count]; int8_t input_sequences_quantized[sizeof(tflite::testing::input_data_16x1x1) / sizeof(float)]; int8_t feature_weights_quantized [sizeof(tflite::testing::feature_weights_data_16x1x1) / sizeof(float)]; int16_t time_weights_quantized[sizeof(tflite::testing::time_weights_data_16x1x1) / sizeof(float)]; int16_t activation_state_quantized[activation_state_dims_count]; int32_t bias_quantized[sizeof(tflite::testing::bias_data_16x1x1) / sizeof(float)]; int8_t golden_quantized[sizeof(tflite::testing::golden_output_16x1x1) / sizeof(float)]; tflite::testing::TestIntegerSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActNone, input_quantized, input_scale, input_zero_point, tflite::testing::feature_weights_data_16x1x1, feature_weights_quantized, feature_weights_scale, tflite::testing::time_weights_data_16x1x1, time_weights_quantized, time_weights_scale, tflite::testing::bias_data_16x1x1, bias_quantized, tflite::testing::initial_activation_state_data_16x1x1, activation_state_quantized, activation_state_scale, output_data, output_scale, output_zero_point, tflite::testing::input_data_16x1x1, input_sequences_quantized, sizeof(tflite::testing::input_data_16x1x1) / sizeof(float), tflite::testing::golden_output_16x1x1, golden_quantized, sizeof(tflite::testing::golden_output_16x1x1) / sizeof(float)); } TF_LITE_MICRO_TEST(SvdfQuantized1x16Input64x1OutputReluShouldMatchGolden) { constexpr int batch_size = 1; constexpr int num_units = 64; constexpr int input_size = 16; constexpr int memory_size = 8; constexpr int rank = 1; constexpr int num_filters = num_units * rank; constexpr int activation_state_dims_count = batch_size * memory_size * num_filters; constexpr int output_dims_count = batch_size * num_units; constexpr int input_dims_count = batch_size * input_size; int8_t output_data[output_dims_count]; float input_scale = 0.10075444; float feature_weights_scale = 0.00649388; float time_weights_scale = 0.001571355; float activation_state_scale = 0.00045896982; float output_scale = 0.051445257; int input_zero_point = 2; int output_zero_point = -128; int8_t input_quantized[input_dims_count]; int8_t input_sequences_quantized[sizeof(tflite::testing::input_data_16x1x1) / sizeof(float)]; int8_t feature_weights_quantized [sizeof(tflite::testing::feature_weights_data_16x1x1) / sizeof(float)]; int16_t time_weights_quantized[sizeof(tflite::testing::time_weights_data_16x1x1) / sizeof(float)]; int16_t activation_state_quantized[activation_state_dims_count]; int32_t bias_quantized[sizeof(tflite::testing::bias_data_16x1x1) / sizeof(float)]; int8_t golden_quantized[sizeof(tflite::testing::golden_output_relu_16x1x1) / sizeof(float)]; tflite::testing::TestIntegerSVDF( batch_size, num_units, input_size, memory_size, rank, kTfLiteActRelu, input_quantized, input_scale, input_zero_point, tflite::testing::feature_weights_data_16x1x1, feature_weights_quantized, feature_weights_scale, tflite::testing::time_weights_data_16x1x1, time_weights_quantized, time_weights_scale, tflite::testing::bias_data_16x1x1, bias_quantized, tflite::testing::initial_activation_state_data_16x1x1, activation_state_quantized, activation_state_scale, output_data, output_scale, output_zero_point, tflite::testing::input_data_16x1x1, input_sequences_quantized, sizeof(tflite::testing::input_data_16x1x1) / sizeof(float), tflite::testing::golden_output_relu_16x1x1, golden_quantized, sizeof(tflite::testing::golden_output_relu_16x1x1) / sizeof(float)); } TF_LITE_MICRO_TESTS_END
51.577778
86
0.660902
[ "shape" ]
e8af66972f408b4f845f1df3f32dd0ee6b40c944
2,910
cpp
C++
Ares/src/Ares/ImGui/ImGuiLayer.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
Ares/src/Ares/ImGui/ImGuiLayer.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
Ares/src/Ares/ImGui/ImGuiLayer.cpp
tiredamage42/Ares
75b13441f7f18a402f7b8f4e869319d3ca3146cc
[ "Apache-2.0" ]
null
null
null
#include "AresPCH.h" #include "Ares/ImGui/ImGuiLayer.h" #include <imgui.h> #include "ImGuizmo.h" //#define IMGUI_IMPL_API #include <examples/imgui_impl_glfw.h> #include <examples/imgui_impl_opengl3.h> #include "Ares/Core/Application.h" // Temporary #include <GLFW/glfw3.h> #include <glad/glad.h> // Temporary namespace Ares { ImGuiLayer::ImGuiLayer() : Layer("ImGuiLayer") { } void ImGuiLayer::OnAttach() { // setup imgui context IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); //(void)io; io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; //io.ConfigFlags |= ImGuiConfigFlags_NavNoCaptureKeyboard; //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; ImFont* pFont = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 18.0f); io.FontDefault = io.Fonts->Fonts.back(); // setup style ImGui::StyleColorsDark(); //ImGui::StyleColorsClassic(); //ImGui::StyleColorsLight(); // when viewports are enabled, we tweak WindowRounding/WindowBg so // platform windows can look identical to rregular ones ImGuiStyle& style = ImGui::GetStyle(); if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) { style.WindowRounding = 0.0f; style.Colors[ImGuiCol_WindowBg].w = 1.0f; } style.Colors[ImGuiCol_WindowBg] = ImVec4(0.15f, 0.15f, 0.15f, style.Colors[ImGuiCol_WindowBg].w); Application& app = Application::Get(); GLFWwindow* window = static_cast<GLFWwindow*>(app.GetWindow().GetNativeWindow()); // setup platform/render bindings ImGui_ImplGlfw_InitForOpenGL(window, true); ImGui_ImplOpenGL3_Init("#version 410"); } void ImGuiLayer::OnDetach() { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); } void ImGuiLayer::OnEvent(Event& e) { if (m_BlockEvents) { ImGuiIO& io = ImGui::GetIO(); e.Handled |= e.IsInCategory(EventCategoryMouse) & io.WantCaptureMouse; e.Handled |= e.IsInCategory(EventCategoryKeyboard) & io.WantCaptureKeyboard; } } // begin a new frame void ImGuiLayer::BeginImGui() { ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); ImGuizmo::BeginFrame(); } void ImGuiLayer::EndImGui() { //ImGuizmo::EndFrame(); // set up imgui display size ImGuiIO& io = ImGui::GetIO(); Application& app = Application::Get(); io.DisplaySize = ImVec2((float)app.GetWindow().GetWidth(), (float)app.GetWindow().GetHeight()); // rendering ImGui::Render(); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) { GLFWwindow* backup_current_context = glfwGetCurrentContext(); ImGui::UpdatePlatformWindows(); ImGui::RenderPlatformWindowsDefault(); glfwMakeContextCurrent(backup_current_context); } } }
24.871795
99
0.724055
[ "render" ]
e8b4e83e404007c61343c707e917d5c2aa3fe297
1,482
cpp
C++
ShortestPath.cpp
woodfrog/FibonacciHeap
afa163aeb7592d90e8117d3002615a0f58c320ca
[ "MIT" ]
11
2018-10-16T07:41:20.000Z
2022-01-03T19:54:09.000Z
ShortestPath.cpp
woodfrog/FibonacciHeap
afa163aeb7592d90e8117d3002615a0f58c320ca
[ "MIT" ]
null
null
null
ShortestPath.cpp
woodfrog/FibonacciHeap
afa163aeb7592d90e8117d3002615a0f58c320ca
[ "MIT" ]
7
2018-03-24T23:48:10.000Z
2021-11-18T06:42:37.000Z
#include <stdio.h> #include <stdlib.h> #include <vector> #include <iostream> #include "FibHeap.h" using namespace fib_heap; using namespace std; #define INFI 1e9 typedef int Vertex; /* vertices are numbered from 0 to MaxVertexNum-1 */ typedef int WeightType; int main() { ios::sync_with_stdio(false); cin.tie(0); Vertex Vnum, Enum; // The number of vertexes and edges cout << "Please input the information of the DAG, firstly the number of vertex and edges" << " then the information of edges, finally the start point" << endl; cin >> Vnum >> Enum; vector<vector<pair<int, int>>> G(Vnum); for (int i = 0; i < Enum; i++){ Vertex start, end; WeightType weight; cin >> start >> end >> weight; G[start].emplace_back(end, weight); } vector<FibHeapNode*> ptr(Vnum, nullptr); FibHeap fibheap; int Startid; cin >> Startid; for (int i = 0; i < Vnum; i++){ if(i == Startid){ ptr[i] = fibheap.insert(0); ptr[i]->id = i; continue; } ptr[i] = fibheap.insert(INFI); ptr[i]->id = i; } int cnt = 0; vector<bool> vis(Vnum, 0); vector<int> dis(Vnum, INFI); while(cnt < Vnum){ int v = fibheap.m_minNode->id; int Dis = fibheap.extract_min(); dis[v] = Dis; vis[v] = 1; for (auto [end, weight]: G[v]){ if(!vis[end]){ if(weight + Dis < ptr[end]->key){ fibheap.decrease_key(ptr[end], weight + Dis); } } } cnt++; } for (int i = 0; i < Vnum; i++){ cout << dis[i] << " \n"[i == Vnum - 1]; } return 0; }
20.027027
91
0.609312
[ "vector" ]
e8b4f4cdcf4e0cc22e666312310358da72bf89ce
2,478
cpp
C++
GenTest/src/modules/util/Util.cpp
ZwFink/deepstate
fbbecae988fec0519cf56e4f1b341dc6dcac587e
[ "Apache-2.0" ]
null
null
null
GenTest/src/modules/util/Util.cpp
ZwFink/deepstate
fbbecae988fec0519cf56e4f1b341dc6dcac587e
[ "Apache-2.0" ]
null
null
null
GenTest/src/modules/util/Util.cpp
ZwFink/deepstate
fbbecae988fec0519cf56e4f1b341dc6dcac587e
[ "Apache-2.0" ]
1
2020-03-09T22:15:33.000Z
2020-03-09T22:15:33.000Z
// Program Information ////////////////////////////////////////////// /** * @file Util.cpp * * @team GenTest ( Team 22 ) * * @brief Utility classes/functions go here * * @details This file will contain utility functions or classes that dont necessarily have * another location to be. * * @version 0.01 * Tristan Miller ( 5 November 2019 ) * Created skeleton for class layout (Legal terms of use/libraries used need to be added here once we get to that point) **/ #include "Util.h" std::string stripWhiteSpace( const std::string& toStrip ) { int startSpaces = 0, endSpaces = 0; auto cStr = toStrip.c_str(); for( int index = 0; index < toStrip.length(); index++ ) { char currentChar = cStr[index]; if( currentChar == ' ' || currentChar == '\t' ) { //still in starting spaces if( startSpaces == endSpaces ) { startSpaces++; endSpaces++; } } else { endSpaces = index + 1; } } return toStrip.substr( startSpaces, endSpaces-startSpaces ); } std::string stripNewLine( std::string stringToStrip ) { while( stringToStrip.find('\n') != std::string::npos ) { auto location = stringToStrip.find('\n'); stringToStrip.erase( location, 1 ); } return stringToStrip; } std::string generatePadding( int depth ) { return std::string(depth, '\t'); } int commaLocation( const std::string& toFind ) { const char * cStr = toFind.c_str(); int currentDepth = 0; for( int index = 0; index < toFind.length(); index++ ) { char current = cStr[index]; if( current == '(') currentDepth++; else if (current == ')' ) currentDepth--; else if (current == ',' ) { if( currentDepth == 0 ) { return index; } } } return 0; } std::string whichStructInLine( std::string lineToCheck, std::vector<std::string> vectorToSearch ) { auto currentSearch = vectorToSearch.begin(); //TODO: Make this more robust for( int current = 0; current < vectorToSearch.size(); current++ ) { std::string currentString = (*currentSearch); if( lineToCheck.find( currentString ) != std::string::npos ) { return currentString; } currentSearch++; } return ""; }
22.527273
97
0.544391
[ "vector" ]
e8bed3e0110ea2f4f9d541d122918aba8ffbbcbe
1,096
hpp
C++
src/widgets/wxFrame.hpp
kusti8/node-wx-napi
00cf7560bfcb1dcf5680f8030e775f8e7dc1cf08
[ "MIT" ]
3
2020-02-21T04:47:15.000Z
2020-09-24T23:36:35.000Z
src/widgets/wxFrame.hpp
kusti8/node-wx-napi
00cf7560bfcb1dcf5680f8030e775f8e7dc1cf08
[ "MIT" ]
2
2021-09-02T04:49:58.000Z
2022-01-22T10:11:29.000Z
src/widgets/wxFrame.hpp
kusti8/node-wx-napi
00cf7560bfcb1dcf5680f8030e775f8e7dc1cf08
[ "MIT" ]
1
2021-06-28T06:35:40.000Z
2021-06-28T06:35:40.000Z
#ifndef WXFRAME_H #define WXFRAME_H #include <wx/wx.h> #include <wx/frame.h> #include <wx/window.h> #include <napi.h> #include "wxWindow_macros.hpp" #include "../utils/unwrapper.hpp" class WxFrame; class WxWrapFrame : public wxFrame { public: WxWrapFrame(wxWindow *parent, int width, int height); WxFrame *jsFrame; private: void OnResize(wxSizeEvent &event); void OnClose(wxCloseEvent &event); DECLARE_EVENT_TABLE() }; class WxFrame : public Napi::ObjectWrap<WxFrame> { public: static Napi::Object Init(Napi::Env env, Napi::Object exports); WxFrame(const Napi::CallbackInfo &info); Napi::FunctionReference OnResizeCallback_; Napi::FunctionReference OnCloseCallback_; bool closed = false; WxWrapFrame *elem; private: static Napi::FunctionReference constructor; Napi::Value OnResize(const Napi::CallbackInfo &info); Napi::Value OnClose(const Napi::CallbackInfo &info); Napi::Value getClosed(const Napi::CallbackInfo &info); Napi::Value Close(const Napi::CallbackInfo &info); // WxWindow Funcs WXWINDOW_DEFS }; #endif
22.833333
66
0.719891
[ "object" ]
e8d1030805bb12c9ea50fa75b5ab22b189a874fe
488
hpp
C++
misc/coord_compression.hpp
prince776/CodeBook
874fc7f94011ad1d25a55bcd91fecd2a11eb5a9b
[ "CC0-1.0" ]
17
2021-01-25T12:07:17.000Z
2022-02-26T17:20:31.000Z
misc/coord_compression.hpp
NavneelSinghal/CodeBook
ff60ace9107dd19ef8ba81e175003f567d2a9070
[ "CC0-1.0" ]
null
null
null
misc/coord_compression.hpp
NavneelSinghal/CodeBook
ff60ace9107dd19ef8ba81e175003f567d2a9070
[ "CC0-1.0" ]
4
2021-02-28T11:13:44.000Z
2021-11-20T12:56:20.000Z
template <class T> auto compress(const vector<T>& a) { int n = int(size(a)); vector<pair<T, int>> p(n); #pragma GCC ivdep for (int i = 0; i < n; ++i) p[i] = {a[i], i}; sort(begin(p), end(p)); vector<int> compressed(n); vector<T> vals; for (int k = 0, rnk = -1; k < n; ++k) { if (k == 0 or p[k - 1].first < p[k].first) vals.push_back(p[k].first), ++rnk; compressed[p[k].second] = rnk; } return make_pair(compressed, vals); }
28.705882
50
0.514344
[ "vector" ]
e8e0a74cabf7980155c57d5f884b4d18c8420d00
9,037
cc
C++
aimsgui/src/aimsqtformats/plugin/qtformatsplugin.cc
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
4
2019-07-09T05:34:10.000Z
2020-10-16T00:03:15.000Z
aimsgui/src/aimsqtformats/plugin/qtformatsplugin.cc
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
72
2018-10-31T14:52:50.000Z
2022-03-04T11:22:51.000Z
aimsgui/src/aimsqtformats/plugin/qtformatsplugin.cc
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
null
null
null
/* This software and supporting documentation are distributed by * Institut Federatif de Recherche 49 * CEA/NeuroSpin, Batiment 145, * 91191 Gif-sur-Yvette cedex * France * * This software is governed by the CeCILL license version 2 under * French law and abiding by the rules of distribution of free software. * You can use, modify and/or redistribute the software under the * terms of the CeCILL license version 2 as circulated by CEA, CNRS * and INRIA at the following URL "http://www.cecill.info". * * As a counterpart to the access to the source code and rights to copy, * modify and redistribute granted by the license, users are provided only * with a limited warranty and the software's author, the holder of the * economic rights, and the successive licensors have only limited * liability. * * In this respect, the user's attention is drawn to the risks associated * with loading, using, modifying and/or developing or reproducing the * software by the user in light of its specific status of free software, * that may mean that it is complicated to manipulate, and that also * therefore means that it is reserved for developers and experienced * professionals having in-depth computer knowledge. Users are therefore * encouraged to load and test the software's suitability as regards their * requirements in conditions enabling the security of their systems and/or * data to be ensured and, more generally, to use and operate it in the * same conditions as regards security. * * The fact that you are presently reading this means that you have had * knowledge of the CeCILL license version 2 and that you accept its terms. */ // we don't want to issue a warning while compiling the obsolete classes // themselves... #ifndef AIMSDATA_CLASS_NO_DEPREC_WARNING #define AIMSDATA_CLASS_NO_DEPREC_WARNING #endif #include <aims/plugin/qtformatsplugin.h> #include <aims/io/qtformats_d.h> #include <aims/io/qtfinderformats.h> #include <aims/io/finder.h> #include <aims/rgb/rgb.h> #include <aims/def/path.h> #include <cartobase/stream/fileutil.h> #include <qapplication.h> #include <qimage.h> #include <aims/io/baseFormats_cartovolume.h> #ifdef __APPLE__ #include <aims/io/macosxbugs.h> #endif using namespace aims; using namespace carto; using namespace std; namespace { /* This sets Qt plugins path for binary packages (actually needed only on Mac/Fink Qt), according to an arbitrary path */ #ifdef __APPLE__ bool initQtPlugins() { const Path & p = Path::singleton(); const string & shared = p.globalShared(); if( !shared.empty() ) { char sep = FileUtil::separator(); string base = FileUtil::dirname( shared ) + sep + "lib" + sep + "qt3-plugins"; QStringList paths = QApplication::libraryPaths(); if( paths.indexOf( base.c_str() ) == -1 ) QApplication::addLibraryPath( base.c_str() ); } return true; } #endif bool initqtformats() { #ifdef __APPLE__ initQtPlugins(); #endif new QtFormatsPlugin; return true; } bool qtformatsinit __attribute__((unused)) = initqtformats(); } QtFormatsPlugin::QtFormatsPlugin() : Plugin() { set<QString> fset; set<QString>::iterator is, es = fset.end(); QList<QByteArray> iform = QImageReader::supportedImageFormats(); QList<QByteArray> oform = QImageWriter::supportedImageFormats(); QList<QByteArray>::iterator c, ce = iform.end(); for( c=iform.begin(); c!=ce; ++c ) fset.insert( QString( *c ).toUpper() ); for( c=oform.begin(),ce=oform.end(); c!=ce; ++c ) fset.insert( QString( *c ).toUpper() ); QtFormats<int8_t> *df1 = new QtFormats<int8_t>; QtFormats<uint8_t> *df2 = new QtFormats<uint8_t>; QtFormats<int16_t> *df3 = new QtFormats<int16_t>; QtFormats<uint16_t> *df4 = new QtFormats<uint16_t>; QtFormats<int32_t> *df5 = new QtFormats<int32_t>; QtFormats<uint32_t> *df6 = new QtFormats<uint32_t>; QtFormats<AimsRGB> *df8 = new QtFormats<AimsRGB>; QtFormats<AimsRGBA> *df9 = new QtFormats<AimsRGBA>; vector<string> exts; string format = "QtFormats"; // ### remove after everything has been moved to intN_t/uintN_t QtFormats<char> *df10 = new QtFormats<char>; /* QtFormats<long> *df11 = new QtFormats<long>; QtFormats<unsigned long> *df12 = new QtFormats<unsigned long>; */ for( is=fset.begin(); is!=es; ++is ) { vector<string> ext; const QString & e = *is; string fmt = e.toUpper().toStdString(); if( fmt == "JPEG" ) { fmt = "JPEG(Qt)"; ext.push_back( "jpg" ); ext.push_back( "jpeg" ); exts.push_back( "jpg" ); } else { if( fmt == "TIF" || fmt == "TIFF" ) fmt = "TIFF(Qt)"; ext.push_back( e.toLower().toStdString() ); exts.push_back( e.toLower().toStdString() ); // if( format == "QtFormats" ) // format = fmt; } if( !FileFormatDictionary<AimsData<int8_t> >::fileFormat( fmt ) ) { #ifdef AIMS_APPLE_GCC33BUG macosxbugs::fileFormatDictionary_dataint8_registerFormat( fmt, df1, ext ); #else FileFormatDictionary<AimsData<int8_t> >::registerFormat( fmt, df1, ext ); #endif VolumeFormat<int8_t> *vf1 = new VolumeFormat<int8_t>( fmt ); FileFormatDictionary<Volume<int8_t> >::registerFormat( fmt, vf1, ext ); } if( !FileFormatDictionary<AimsData<uint8_t> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<uint8_t> >::registerFormat( fmt, df2, ext ); VolumeFormat<uint8_t> *vf2 = new VolumeFormat<uint8_t>( fmt ); FileFormatDictionary<Volume<uint8_t> >::registerFormat( fmt, vf2, ext ); } if( !FileFormatDictionary<AimsData<int16_t> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<int16_t> >::registerFormat( fmt, df3, ext ); VolumeFormat<int16_t> *vf3 = new VolumeFormat<int16_t>( fmt ); FileFormatDictionary<Volume<int16_t> >::registerFormat( fmt, vf3, ext ); } if( !FileFormatDictionary<AimsData<uint16_t> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<uint16_t> >::registerFormat( fmt, df4, ext ); VolumeFormat<uint16_t> *vf4 = new VolumeFormat<uint16_t>( fmt ); FileFormatDictionary<Volume<uint16_t> >::registerFormat( fmt, vf4, ext ); } if( !FileFormatDictionary<AimsData<int32_t> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<int32_t> >::registerFormat( fmt, df5, ext ); VolumeFormat<int32_t> *vf5 = new VolumeFormat<int32_t>( fmt ); FileFormatDictionary<Volume<int32_t> >::registerFormat( fmt, vf5, ext ); } if( !FileFormatDictionary<AimsData<uint32_t> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<uint32_t> >::registerFormat( fmt, df6, ext ); VolumeFormat<uint32_t> *vf6 = new VolumeFormat<uint32_t>( fmt ); FileFormatDictionary<Volume<uint32_t> >::registerFormat( fmt, vf6, ext ); } if( !FileFormatDictionary<AimsData<AimsRGB> >::fileFormat( fmt ) ) { #ifdef AIMS_APPLE_GCC33BUG macosxbugs::fileFormatDictionary_dataRGB_registerFormat( fmt, df8, ext ); #else FileFormatDictionary<AimsData<AimsRGB> >::registerFormat( fmt, df8, ext ); #endif VolumeFormat<AimsRGB> *vf13 = new VolumeFormat<AimsRGB>( fmt ); FileFormatDictionary<Volume<AimsRGB> >::registerFormat( fmt, vf13, ext ); } if( !FileFormatDictionary<AimsData<AimsRGBA> >::fileFormat( fmt ) ) { FileFormatDictionary<AimsData<AimsRGBA> >::registerFormat( fmt, df9, ext ); VolumeFormat<AimsRGBA> *vf14 = new VolumeFormat<AimsRGBA>( fmt ); FileFormatDictionary<Volume<AimsRGBA> >::registerFormat( fmt, vf14, ext ); } if( !FileFormatDictionary<AimsData<int8_t> >::fileFormat( fmt ) ) { // ### remove after everything has been moved to intN_t/uintN_t FileFormatDictionary<AimsData<char> >::registerFormat( fmt, df10, ext ); VolumeFormat<char> *vf10 = new VolumeFormat<char>( fmt ); FileFormatDictionary<Volume<char> >::registerFormat( fmt, vf10, ext ); } Finder::registerFormat( fmt, new FinderQtFormats, ext ); } // Finder::registerFormat( format, new FinderQtFormats, exts ); QtFormatsHeader::qformatsMutex(); // force creating it now. } QtFormatsPlugin::~QtFormatsPlugin() { } string QtFormatsPlugin::name() const { return "Qt image formats IO"; } bool QtFormatsPlugin::noop() { return true; }
34.757692
81
0.638044
[ "vector" ]
e8e1a24133944ff0f825c802ebb577528e15d818
12,051
cpp
C++
src/savers/tvg/tvgTvgSaver.cpp
patrykka/thorvg
dc7bb0deed9d930cf96041a343788a8ae620aca7
[ "MIT" ]
null
null
null
src/savers/tvg/tvgTvgSaver.cpp
patrykka/thorvg
dc7bb0deed9d930cf96041a343788a8ae620aca7
[ "MIT" ]
null
null
null
src/savers/tvg/tvgTvgSaver.cpp
patrykka/thorvg
dc7bb0deed9d930cf96041a343788a8ae620aca7
[ "MIT" ]
null
null
null
/* * Copyright (c) 2021 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <float.h> #include <math.h> #include "tvgSaveModule.h" #include "tvgTvgSaver.h" #define SIZE(A) sizeof(A) /************************************************************************/ /* Internal Class Implementation */ /************************************************************************/ static inline TvgBinCounter SERIAL_DONE(TvgBinCounter cnt) { return SIZE(TvgBinTag) + SIZE(TvgBinCounter) + cnt; } bool TvgSaver::flushTo(const std::string& path) { FILE* fp = fopen(path.c_str(), "w+"); if (!fp) return false; if (fwrite(buffer.data, SIZE(char), buffer.count, fp) == 0) { fclose(fp); return false; } fclose(fp); return true; } bool TvgSaver::writeHeader() { buffer.grow(TVG_HEADER_SIGNATURE_LENGTH + TVG_HEADER_VERSION_LENGTH); auto ptr = buffer.ptr(); memcpy(ptr, TVG_HEADER_SIGNATURE, TVG_HEADER_SIGNATURE_LENGTH); ptr += TVG_HEADER_SIGNATURE_LENGTH; memcpy(ptr, TVG_HEADER_VERSION, TVG_HEADER_VERSION_LENGTH); ptr += TVG_HEADER_VERSION_LENGTH; buffer.count += (TVG_HEADER_SIGNATURE_LENGTH + TVG_HEADER_VERSION_LENGTH); return true; } bool TvgSaver::writeViewSize() { float var[2]; paint->bounds(nullptr, nullptr, &var[0], &var[1]); if (var[0] <= 0.0f || var[1] <= 0.0f) return false; writeData(var, SIZE(var)); return true; } void TvgSaver::writeTag(TvgBinTag tag) { buffer.grow(SIZE(TvgBinTag)); memcpy(buffer.ptr(), &tag, SIZE(TvgBinTag)); buffer.count += SIZE(TvgBinTag); } void TvgSaver::writeCount(TvgBinCounter cnt) { buffer.grow(SIZE(TvgBinCounter)); memcpy(buffer.ptr(), &cnt, SIZE(TvgBinCounter)); buffer.count += SIZE(TvgBinCounter); } void TvgSaver::writeReservedCount(TvgBinCounter cnt) { memcpy(buffer.ptr() - cnt - SIZE(TvgBinCounter), &cnt, SIZE(TvgBinCounter)); } void TvgSaver::reserveCount() { buffer.grow(SIZE(TvgBinCounter)); buffer.count += SIZE(TvgBinCounter); } TvgBinCounter TvgSaver::writeData(const void* data, TvgBinCounter cnt) { buffer.grow(cnt); memcpy(buffer.ptr(), data, cnt); buffer.count += cnt; return cnt; } TvgBinCounter TvgSaver::writeTagProperty(TvgBinTag tag, TvgBinCounter cnt, const void* data) { auto growCnt = SERIAL_DONE(cnt); buffer.grow(growCnt); auto ptr = buffer.ptr(); *ptr = tag; ++ptr; memcpy(ptr, &cnt, SIZE(TvgBinCounter)); ptr += SIZE(TvgBinCounter); memcpy(ptr, data, cnt); ptr += cnt; buffer.count += growCnt; return growCnt; } TvgBinCounter TvgSaver::serializePaint(const Paint* paint) { TvgBinCounter cnt = 0; //opacity auto opacity = paint->opacity(); if (opacity < 255) { cnt += writeTagProperty(TVG_TAG_PAINT_OPACITY, SIZE(opacity), &opacity); } //transform auto m = const_cast<Paint*>(paint)->transform(); if (fabs(m.e11 - 1) > FLT_EPSILON || fabs(m.e12) > FLT_EPSILON || fabs(m.e13) > FLT_EPSILON || fabs(m.e21) > FLT_EPSILON || fabs(m.e22 - 1) > FLT_EPSILON || fabs(m.e23) > FLT_EPSILON || fabs(m.e31) > FLT_EPSILON || fabs(m.e32) > FLT_EPSILON || fabs(m.e33 - 1) > FLT_EPSILON) { cnt += writeTagProperty(TVG_TAG_PAINT_TRANSFORM, SIZE(m), &m); } //composite const Paint* cmpTarget = nullptr; auto cmpMethod = paint->composite(&cmpTarget); if (cmpMethod != CompositeMethod::None && cmpTarget) { cnt += serializeComposite(cmpTarget, cmpMethod); } return cnt; } TvgBinCounter TvgSaver::serializeScene(const Scene* scene) { writeTag(TVG_TAG_CLASS_SCENE); reserveCount(); auto cnt = serializeChildren(scene) + serializePaint(scene); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializeFill(const Fill* fill, TvgBinTag tag) { const Fill::ColorStop* stops = nullptr; auto stopsCnt = fill->colorStops(&stops); if (!stops || stopsCnt == 0) return 0; writeTag(tag); reserveCount(); TvgBinCounter cnt = 0; //radial fill if (fill->id() == TVG_CLASS_ID_RADIAL) { float args[3]; static_cast<const RadialGradient*>(fill)->radial(args, args + 1,args + 2); cnt += writeTagProperty(TVG_TAG_FILL_RADIAL_GRADIENT, SIZE(args), args); //linear fill } else { float args[4]; static_cast<const LinearGradient*>(fill)->linear(args, args + 1, args + 2, args + 3); cnt += writeTagProperty(TVG_TAG_FILL_LINEAR_GRADIENT, SIZE(args), args); } if (auto flag = static_cast<TvgBinFlag>(fill->spread())) cnt += writeTagProperty(TVG_TAG_FILL_FILLSPREAD, SIZE(TvgBinFlag), &flag); cnt += writeTagProperty(TVG_TAG_FILL_COLORSTOPS, stopsCnt * SIZE(Fill::ColorStop), stops); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializeStroke(const Shape* shape) { writeTag(TVG_TAG_SHAPE_STROKE); reserveCount(); //width auto width = shape->strokeWidth(); auto cnt = writeTagProperty(TVG_TAG_SHAPE_STROKE_WIDTH, SIZE(width), &width); //cap if (auto flag = static_cast<TvgBinFlag>(shape->strokeCap())) cnt += writeTagProperty(TVG_TAG_SHAPE_STROKE_CAP, SIZE(TvgBinFlag), &flag); //join if (auto flag = static_cast<TvgBinFlag>(shape->strokeJoin())) cnt += writeTagProperty(TVG_TAG_SHAPE_STROKE_JOIN, SIZE(TvgBinFlag), &flag); //fill if (auto fill = shape->strokeFill()) { cnt += serializeFill(fill, TVG_TAG_SHAPE_STROKE_FILL); } else { uint8_t color[4] = {0, 0, 0, 0}; shape->strokeColor(color, color + 1, color + 2, color + 3); cnt += writeTagProperty(TVG_TAG_SHAPE_STROKE_COLOR, SIZE(color), &color); } //dash const float* dashPattern = nullptr; auto dashCnt = shape->strokeDash(&dashPattern); if (dashPattern && dashCnt > 0) { TvgBinCounter dashCntSize = SIZE(dashCnt); TvgBinCounter dashPtrnSize = dashCnt * SIZE(dashPattern[0]); writeTag(TVG_TAG_SHAPE_STROKE_DASHPTRN); writeCount(dashCntSize + dashPtrnSize); cnt += writeData(&dashCnt, dashCntSize); cnt += writeData(dashPattern, dashPtrnSize); cnt += SIZE(TvgBinTag) + SIZE(TvgBinCounter); } writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializePath(const Shape* shape) { const PathCommand* cmds = nullptr; auto cmdCnt = shape->pathCommands(&cmds); const Point* pts = nullptr; auto ptsCnt = shape->pathCoords(&pts); if (!cmds || !pts || cmdCnt == 0 || ptsCnt == 0) return 0; writeTag(TVG_TAG_SHAPE_PATH); reserveCount(); /* Reduce the binary size. Convert PathCommand(4 bytes) to TvgBinFlag(1 byte) */ TvgBinFlag outCmds[cmdCnt]; for (uint32_t i = 0; i < cmdCnt; ++i) { outCmds[i] = static_cast<TvgBinFlag>(cmds[i]); } auto cnt = writeData(&cmdCnt, SIZE(cmdCnt)); cnt += writeData(&ptsCnt, SIZE(ptsCnt)); cnt += writeData(outCmds, SIZE(outCmds)); cnt += writeData(pts, ptsCnt * SIZE(pts[0])); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializeShape(const Shape* shape) { writeTag(TVG_TAG_CLASS_SHAPE); reserveCount(); TvgBinCounter cnt = 0; //fill rule if (auto flag = static_cast<TvgBinFlag>(shape->fillRule())) cnt = writeTagProperty(TVG_TAG_SHAPE_FILLRULE, SIZE(TvgBinFlag), &flag); //stroke if (shape->strokeWidth() > 0) { uint8_t color[4] = {0, 0, 0, 0}; shape->strokeColor(color, color + 1, color + 2, color + 3); auto fill = shape->strokeFill(); if (fill || color[3] > 0) cnt += serializeStroke(shape); } //fill if (auto fill = shape->fill()) { cnt += serializeFill(fill, TVG_TAG_SHAPE_FILL); } else { uint8_t color[4] = {0, 0, 0, 0}; shape->fillColor(color, color + 1, color + 2, color + 3); if (color[3] > 0) cnt += writeTagProperty(TVG_TAG_SHAPE_COLOR, SIZE(color), color); } cnt += serializePath(shape); cnt += serializePaint(shape); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializePicture(const Picture* picture) { writeTag(TVG_TAG_CLASS_PICTURE); reserveCount(); TvgBinCounter cnt = 0; //Bitmap Image uint32_t w, h; if (auto pixels = picture->data(&w, &h)) { TvgBinCounter sizeCnt = SIZE(w); TvgBinCounter imgSize = w * h * SIZE(pixels[0]); writeTag(TVG_TAG_PICTURE_RAW_IMAGE); writeCount(2 * sizeCnt + imgSize); cnt += writeData(&w, sizeCnt); cnt += writeData(&h, sizeCnt); cnt += writeData(pixels, imgSize); cnt += SIZE(TvgBinTag) + SIZE(TvgBinCounter); //Vector Image } else { cnt += serializeChildren(picture); } cnt += serializePaint(picture); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializeComposite(const Paint* cmpTarget, CompositeMethod cmpMethod) { writeTag(TVG_TAG_PAINT_CMP_TARGET); reserveCount(); auto flag = static_cast<TvgBinFlag>(cmpMethod); auto cnt = writeTagProperty(TVG_TAG_PAINT_CMP_METHOD, SIZE(TvgBinFlag), &flag); cnt += serialize(cmpTarget); writeReservedCount(cnt); return SERIAL_DONE(cnt); } TvgBinCounter TvgSaver::serializeChildren(const Paint* paint) { auto it = this->iterator(paint); if (!it) return 0; TvgBinCounter cnt = 0; while (auto p = it->next()) cnt += serialize(p); delete(it); return cnt; } TvgBinCounter TvgSaver::serialize(const Paint* paint) { if (!paint) return 0; switch (paint->id()) { case TVG_CLASS_ID_SHAPE: return serializeShape(static_cast<const Shape*>(paint)); case TVG_CLASS_ID_SCENE: return serializeScene(static_cast<const Scene*>(paint)); case TVG_CLASS_ID_PICTURE: return serializePicture(static_cast<const Picture*>(paint)); } return 0; } void TvgSaver::run(unsigned tid) { if (!writeHeader()) return; if (!writeViewSize()) return; if (serialize(paint) == 0) return; if (!flushTo(path)) return; } /************************************************************************/ /* External Class Implementation */ /************************************************************************/ TvgSaver::~TvgSaver() { close(); } bool TvgSaver::close() { this->done(); if (paint) { delete(paint); paint = nullptr; } if (path) { free(path); path = nullptr; } buffer.reset(); return true; } bool TvgSaver::save(Paint* paint, const string& path) { close(); this->path = strdup(path.c_str()); if (!this->path) return false; this->paint = paint; TaskScheduler::request(this); return true; }
26.140998
98
0.636711
[ "shape", "vector", "transform" ]
e8e75cd289f36dccbcb773d82a614e7edac36b13
529
cpp
C++
src/AdventOfCode2019/Day09-SensorBoost/Day09-SensorBoost.cpp
dbartok/advent-of-code-cpp
c8c2df7a21980f8f3e42128f7bc5df8288f18490
[ "MIT" ]
null
null
null
src/AdventOfCode2019/Day09-SensorBoost/Day09-SensorBoost.cpp
dbartok/advent-of-code-cpp
c8c2df7a21980f8f3e42128f7bc5df8288f18490
[ "MIT" ]
null
null
null
src/AdventOfCode2019/Day09-SensorBoost/Day09-SensorBoost.cpp
dbartok/advent-of-code-cpp
c8c2df7a21980f8f3e42128f7bc5df8288f18490
[ "MIT" ]
null
null
null
#include "Day09-SensorBoost.h" #include <AdventOfCodeCommon/DisableLibraryWarningsMacros.h> __BEGIN_LIBRARIES_DISABLE_WARNINGS __END_LIBRARIES_DISABLE_WARNINGS namespace AdventOfCode { namespace Year2019 { namespace Day09 { using AdventOfCode::Year2019::Day05::IntcodeInterpreter; std::vector<IntcodeNumberType> boostKeycodeProduced(const std::vector<IntcodeNumberType>& intcodeProgram, int input) { IntcodeInterpreter ie{intcodeProgram}; ie.addInput(input); ie.execute(); return ie.getOutputs(); } } } }
17.633333
116
0.79206
[ "vector" ]
e8ec9836ed419c39d25bc75e433da07d18eb8c31
1,565
cpp
C++
test/test_rays.cpp
RainerBlessing/TheRayTracerChallenge-C-
22c990201507f46d5bb1604bc1f6ee88e59cef95
[ "MIT" ]
null
null
null
test/test_rays.cpp
RainerBlessing/TheRayTracerChallenge-C-
22c990201507f46d5bb1604bc1f6ee88e59cef95
[ "MIT" ]
null
null
null
test/test_rays.cpp
RainerBlessing/TheRayTracerChallenge-C-
22c990201507f46d5bb1604bc1f6ee88e59cef95
[ "MIT" ]
null
null
null
#ifdef STAND_ALONE # define BOOST_TEST_MODULE RayTracerChallengeTests #endif #include <boost/test/unit_test.hpp> #include <iostream> #include <shared/Point.h> #include <shared/Ray.h> #include <shared/Output.h> #include <shared/Position.h> #include <shared/Scaling.h> BOOST_AUTO_TEST_SUITE(rays_suite) BOOST_AUTO_TEST_CASE(creating_and_querying_a_ray_test) { auto origin = Point(1, 2, 3); auto direction = Vector(4,5,6); auto ray = Ray(origin, direction); BOOST_CHECK_EQUAL(ray.origin, origin); BOOST_CHECK_EQUAL(ray.direction, direction); } BOOST_AUTO_TEST_CASE(computing_a_point_from_a_distance_test) { auto r = Ray(Point(2, 3,4), Vector(1,0,0)); BOOST_CHECK_EQUAL(Position(r,0),Point(2,3,4)); BOOST_CHECK_EQUAL(Position(r,1),Point(3,3,4)); BOOST_CHECK_EQUAL(Position(r,-1),Point(1,3,4)); BOOST_CHECK_EQUAL(Position(r,2.5),Point(4.5,3,4)); } BOOST_AUTO_TEST_CASE(translating_a_ray_test) { auto ray = Ray(Point(1,2,3), Vector(0,1,0)); auto m = Translation(3,4,5); auto r2 = ray.transform(m); BOOST_CHECK_EQUAL(r2.origin, Point(4,6,8)); BOOST_CHECK_EQUAL(r2.direction, Vector(0,1,0)); } BOOST_AUTO_TEST_CASE(scaling_a_ray_test) { auto ray = Ray(Point(1,2,3), Vector(0,1,0)); auto m = Scaling(2,3,4); auto r2 = ray.transform(m); BOOST_CHECK_EQUAL(r2.origin, Point(2,6,12)); BOOST_CHECK_EQUAL(r2.direction, Vector(0,3,0)); } BOOST_AUTO_TEST_SUITE_END()
25.241935
66
0.654313
[ "vector", "transform" ]
e8ee6c4b9519da7d6d084e8b4a26390921209794
1,301
cc
C++
bin/debugserver/stop_reply_packet_unittest.cc
PowerOlive/garnet
16b5b38b765195699f41ccb6684cc58dd3512793
[ "BSD-3-Clause" ]
1
2019-10-09T10:50:57.000Z
2019-10-09T10:50:57.000Z
bin/debugserver/stop_reply_packet_unittest.cc
PowerOlive/garnet
16b5b38b765195699f41ccb6684cc58dd3512793
[ "BSD-3-Clause" ]
5
2020-09-06T09:02:06.000Z
2022-03-02T04:44:22.000Z
garnet/bin/debugserver/stop_reply_packet_unittest.cc
ZVNexus/fuchsia
c5610ad15208208c98693618a79c705af935270c
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2016 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "stop_reply_packet.h" #include "gtest/gtest.h" namespace debugserver { namespace { void ExpectPacketEquals(const std::vector<char>& packet, const fxl::StringView& expected) { EXPECT_EQ(expected, fxl::StringView(packet.data(), packet.size())); } TEST(StopReplyPacketTest, ReceivedSignal) { StopReplyPacket stop_reply(StopReplyPacket::Type::kReceivedSignal); stop_reply.SetSignalNumber(11); auto packet = stop_reply.Build(); ExpectPacketEquals(packet, "S0b"); stop_reply.SetThreadId(12345, 6789); packet = stop_reply.Build(); ExpectPacketEquals(packet, "T0bthread:p3039.1A85;"); stop_reply.AddRegisterValue(6, "000102030405060708"); stop_reply.AddRegisterValue(7, "090A0B0C0D0E0F1011"); packet = stop_reply.Build(); ExpectPacketEquals( packet, "T0b06:000102030405060708;07:090A0B0C0D0E0F1011;thread:p3039.1A85;"); stop_reply.SetStopReason("swbreak"); packet = stop_reply.Build(); ExpectPacketEquals( packet, "T0506:000102030405060708;07:090A0B0C0D0E0F1011;thread:p3039.1A85;" "swbreak:;"); } } // namespace } // namespace debugserver
28.911111
75
0.72867
[ "vector" ]
e8ef8e4a45656b6caa447ba057f08f895eded6e5
284
cpp
C++
STL/reverse_sort/vectorreverse.cpp
siddhantdixit/CP
4090df581e666a0053c282a3c386c346cfb1b85f
[ "MIT" ]
null
null
null
STL/reverse_sort/vectorreverse.cpp
siddhantdixit/CP
4090df581e666a0053c282a3c386c346cfb1b85f
[ "MIT" ]
null
null
null
STL/reverse_sort/vectorreverse.cpp
siddhantdixit/CP
4090df581e666a0053c282a3c386c346cfb1b85f
[ "MIT" ]
null
null
null
#include<bits/stdc++.h> #define MOD 1000000007 typedef long long LL; using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); vector<int> x{5,6,7,2,3,4}; sort(x.rbegin(),x.rend()); for(int i:x) cout<<i<<" "; return 0; }
17.75
32
0.584507
[ "vector" ]
e8fe628406caff462c53dade0cbb9558c82ae536
4,466
cpp
C++
src/AstPrinter.cpp
ehedbor/ferrit
efac98a6233c9f38afacf3c24c1ca83cc996b1c2
[ "MIT" ]
null
null
null
src/AstPrinter.cpp
ehedbor/ferrit
efac98a6233c9f38afacf3c24c1ca83cc996b1c2
[ "MIT" ]
null
null
null
src/AstPrinter.cpp
ehedbor/ferrit
efac98a6233c9f38afacf3c24c1ca83cc996b1c2
[ "MIT" ]
null
null
null
#include "AstPrinter.h" #include <format> namespace ferrit { AstPrinter::AstPrinter(std::ostream &out) noexcept : m_out(&out) { } void AstPrinter::print(const std::vector<StatementPtr> &program) { for (const auto &declaration : program) { declaration->accept(*this); } } VisitResult AstPrinter::visitFunctionDecl(const FunctionDeclaration &funDecl) { printLine("FunctionDeclaration:"); indent([&] { printLine("-Modifiers:"); indent([&] { for (auto &modifier: funDecl.modifiers()) { printLine(modifier.lexeme); } }); printLine(std::format("-Keyword={}", funDecl.keyword().lexeme)); printLine(std::format("-Name={}", funDecl.name().lexeme)); printLine("-Params:"); indent([&] { for (const auto &param : funDecl.params()) { printLine(std::format("Parameter(Name={}, Type={})", param.name().lexeme, param.type().errorToken().lexeme)); } }); printLine(std::format("-Returns={}", funDecl.returnType().errorToken().lexeme)); if (funDecl.body()) { printLine("-Body:"); indent([&] { funDecl.body()->accept(*this); }); } }); return {}; } VisitResult AstPrinter::visitBlockStmt(const BlockStatement &blockStmt) { printLine("BlockStatement:"); indent([&] { for (const auto &line : blockStmt.body()) { line->accept(*this); } }); return {}; } VisitResult AstPrinter::visitExpressionStmt(const ExpressionStatement &exprStmt) { printLine("ExpressionStatement:"); indent([&] { exprStmt.expr().accept(*this); }); return {}; } VisitResult AstPrinter::visitBinaryExpr(const BinaryExpression &binExpr) { printLine("BinaryExpression:"); indent([&] { printLine(std::format("-Op={}", binExpr.op().lexeme)); printLine("-Left:"); indent([&] { binExpr.left().accept(*this); }); printLine("-Right:"); indent([&] { binExpr.right().accept(*this); }); }); return {}; } VisitResult AstPrinter::visitComparisonExpr(const ComparisonExpression &cmpExpr) { printLine("ComparisonExpression:"); indent([&] { printLine(std::format("-Op={}", cmpExpr.op().lexeme)); printLine("-Left:"); indent([&] { cmpExpr.left().accept(*this); }); printLine("-Right:"); indent([&] { cmpExpr.right().accept(*this); }); }); return {}; } VisitResult AstPrinter::visitUnaryExpr(const UnaryExpression &unaryExpr) { printLine(std::format("UnaryExpression: {}", unaryExpr.op().lexeme)); indent([&] { unaryExpr.operand().accept(*this); }); return {}; } VisitResult AstPrinter::visitCallExpr(const CallExpression &callExpr) { printLine("CallExpression:"); indent([&] { printLine("-Callee:"); callExpr.callee().accept(*this); printLine("-Arguments:"); indent([&] { for (const auto &arg: callExpr.arguments()) { arg->accept(*this); } }); }); return {}; } VisitResult AstPrinter::visitVariableExpr(const VariableExpression &varExpr) { printLine(std::format("VariableExpression: {}", varExpr.name().lexeme)); return {}; } VisitResult AstPrinter::visitNumberExpr(const NumberExpression &numExpr) { printLine(std::format("NumberExpression: {} {}", numExpr.isIntLiteral() ? "Int" : "Double", numExpr.value().lexeme)); return {}; } VisitResult AstPrinter::visitBoolExpr(const BooleanExpression &boolExpr) { printLine(std::format("BooleanExpression: {}", boolExpr.value().type == TokenType::True)); return {}; } void AstPrinter::printLine(const std::string &line) { *m_out << std::format("{:{}} {}\n", ' ', m_depth * INDENTATION_LEVEL, line); } }
31.013889
98
0.510748
[ "vector" ]
3300464037c69d85ef055edb29f69a48b2208a21
1,471
cpp
C++
src/entity/target.cpp
reid-moffat/battleship
88228d0e003708d552924b3c2d83c1c9b8e3ca13
[ "MIT" ]
1
2021-12-16T01:12:12.000Z
2021-12-16T01:12:12.000Z
src/entity/target.cpp
reid-moffat/battleship
88228d0e003708d552924b3c2d83c1c9b8e3ca13
[ "MIT" ]
11
2021-12-16T01:53:24.000Z
2022-02-09T04:19:05.000Z
src/entity/target.cpp
reid-moffat/battleship
88228d0e003708d552924b3c2d83c1c9b8e3ca13
[ "MIT" ]
null
null
null
/** * Target class implementation */ #include "target.hpp" #include "../helpers/helperFunctions.hpp" using entity::Target; std::unique_ptr<sf::Texture> Target::idleTexture = std::unique_ptr<sf::Texture>(); std::unique_ptr<sf::Texture> Target::activeTexture = std::unique_ptr<sf::Texture>(); void entity::Target::initializeTextures(const string &idlePath, const string &activePath) { Target::idleTexture = std::make_unique<sf::Texture>(); Target::activeTexture = std::make_unique<sf::Texture>(); loadTexture(*Target::idleTexture, "gameplay/" + idlePath); loadTexture(*Target::activeTexture, "gameplay/" + activePath); } Target::Target(Coordinate coordinate, sf::Vector2f position, sf::Vector2f scale) { this->isActive = false; this->targetCoordinate = coordinate; this->sprite.setTexture(*idleTexture); this->sprite.setPosition(position); this->sprite.setScale(scale); } void Target::render(sf::RenderWindow &window) const { window.draw(this->sprite); } bool Target::getTargetState() const { return this->isActive; } Coordinate Target::getTargetCoordinate() const { return this->targetCoordinate; } void Target::updateTargetState(const sf::Vector2f mousePosition) { if (this->sprite.getGlobalBounds().contains(mousePosition)) { this->isActive = true; this->sprite.setTexture(*activeTexture); } else { this->isActive = false; this->sprite.setTexture(*idleTexture); } }
29.42
91
0.703603
[ "render" ]