blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
listlengths
1
1
author
stringlengths
0
119
a7e6a9ab2b67f2a2bbbc71b0ed25c26cc2910e76
87345d54ebd55cf31820009d4035d3056c3a38e7
/ImageCmp/UseOrb.cpp
93e138fa8405de67fcf543830d53c51f0f3bd76c
[]
no_license
wtom76/ImageCmp
60de3499dd4b8e9610637d3d350e8041362f4be8
400061c67233c3768a16732e0249543620d0262b
refs/heads/master
2021-01-22T05:16:23.349829
2017-02-26T12:09:10
2017-02-26T12:09:10
81,645,445
0
0
null
null
null
null
UTF-8
C++
false
false
1,906
cpp
#include "stdafx.h" #include "Core.h" #include "UseOrb.h" #include <opencv2/stitching/detail/matchers.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <vector> #include <iostream> #include <algorithm> using namespace cv; static constexpr int count = 6; UseOrb::UseOrb() { } UseOrb::~UseOrb() { } void UseOrb::run() { try { //DescriptorMatcher std::vector<Mat> images(count); for (int i = 0; i < count; ++i) { images[i] = imread(g_filenames[i], 1); } constexpr int wta_k = 2; Ptr<Feature2D> extractor = ORB::create(500, 1.2f, 8, 31, 0, wta_k); std::vector<std::vector<KeyPoint>> kpoints(count); std::vector<Mat> descr(count); for (int i = 0; i < count; ++i) { extractor->detectAndCompute(images[i], noArray(), kpoints[i], descr[i]); } //FlannBasedMatcher matcher; BFMatcher matcher(wta_k > 2 ? NORM_HAMMING2 : NORM_HAMMING, true); int m = 0; for (int i = 0; i < count - 1; ++i) { for (int j = i + 1; j < count; ++j) { std::vector<DMatch> matches; matcher.match(descr[i], descr[j], matches); auto minmax = std::minmax_element(std::begin(matches), std::end(matches), [](const DMatch& left, const DMatch& right) { return left.distance < right.distance; }); float average = 0.; if (!matches.empty()) { for (auto& m : matches) { average += m.distance; } average /= matches.size(); } std::cout << g_filenames[i] << ' ' << g_filenames[j] << ' ' << minmax.first->distance << ' ' << minmax.second->distance << ' ' << average << std::endl; } } for (int i = 0; i < images.size(); ++i) { Mat image_kp; drawKeypoints(images[i], kpoints[i], image_kp, Scalar(-1), DrawMatchesFlags::DEFAULT); imshow(std::to_string(i), image_kp); waitKey(); } } catch (cv::Exception& ex) { std::cout << ex.err << std::endl; } waitKey(); }
[ "wtom@yandex.ru" ]
wtom@yandex.ru
8422d7e4fc2121f6119cc08476996a0a4910d8a9
e5010e873ef995693036e3a99cc78bfdfba7eff6
/src/CallBackAndEvent.h
7fe40bef7953c04ff983da84f5d0f152f35770b1
[]
no_license
halukasama/DLTools
85f03ca966fb866d1462d51902381ed199f1ec57
43c76ee8680044561529f7f415e65cc0a9af8071
refs/heads/master
2021-07-09T20:18:35.914240
2017-10-10T18:32:13
2017-10-10T18:32:13
106,455,953
0
0
null
null
null
null
UTF-8
C++
false
false
2,314
h
#ifndef CALLBACKANDEVENT_H #define CALLBACKANDEVENT_H #include <QObject> #include <DeviceLayer.h> #include <DeviceLayerDef.h> #include "BatchCodecDeviceDiscoveryManager.h" class RightDoubleClicked : public QObject { Q_OBJECT protected: bool eventFilter(QObject *obj, QEvent *event); }; class DeviceConnectCallBack :public QObject, public DeviceLayer::IDeviceConnectionCallback { Q_OBJECT public: virtual void OnDeviceConnected(DeviceLayer::IDevice* pDevice, DeviceLayer::IContext*context); virtual void OnDeviceConnectFailed(DeviceLayer::IDevice*, DeviceLayer::DLResult result, DeviceLayer::IContext*); virtual void OnDeviceAccepted(DeviceLayer::IDevice* ); virtual void OnDeviceDisconnected(DeviceLayer::IDevice*, DeviceLayer::IContext* ); virtual void OnDeviceLoseConnection(DeviceLayer::IDevice* , DeviceLayer::DLResult ); signals: void deviceConnectSuccess(DeviceLayer::IDevice* , DeviceLayer::IContext*); void deviceConnectFailed(DeviceLayer::IDevice*, DeviceLayer::DLResult, DeviceLayer::IContext*); void deviceLoseConnect(DeviceLayer::IDevice* , DeviceLayer::DLResult); }; class UpgradeDeviceCallback : public QObject, public DeviceLayer::IUpgradeCallback { Q_OBJECT public: virtual void OnUpgradeStarted(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); //cheng virtual void OnUpgradeStartFailed(DeviceLayer::IDevice* device, DeviceLayer::DLResult result, DeviceLayer::IContext* pContext); //shi virtual void OnUpgradeNotifyProcessing(DeviceLayer::IDevice* device, const char* desc, DeviceLayer::IContext* pContext); virtual void OnUpgradeFaults(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); virtual void OnUpgradeCompleted(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); signals: void started(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); void startFailed(DeviceLayer::IDevice* device, DeviceLayer::DLResult result, DeviceLayer::IContext* pContext); void notifyProcessing(DeviceLayer::IDevice* device, const char* desc, DeviceLayer::IContext* pContext); void faults(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); void completed(DeviceLayer::IDevice* device, DeviceLayer::IContext* pContext); }; #endif // CALLBACKANDEVENT_H
[ "jlwangtat@gmail.com" ]
jlwangtat@gmail.com
de72e507526a09e14ce8bb8643b752e9709d3cdf
e0506a0f728d4e04b25669c376b7720a900e55e3
/Arduino/Ghost/Sensors.ino
e4460863200043459a544a63778e5fd610a65351
[ "MIT" ]
permissive
manish5897/Ghost
608ffba3062bdb242ae18469481e6c855edb71e6
34ed8616428d82ad5cb8517ac5c3f82ce421e798
refs/heads/master
2020-06-19T00:56:43.507086
2018-06-16T11:43:04
2018-06-16T11:43:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,499
ino
//Sensor related variables int activeSensor = -1; int shift = 0; byte hi,low; int distance; #define SENSOR_ADDRESS 0x80 >> 1 #define DISTANCE_REG 0x5E #define SHIFT 0x35 #define TCA_ADDRESS 0x70 void setupIRSensors() { //TODO, what does the SHIFT register actually contain? And why do we care? Wire.beginTransmission(SENSOR_ADDRESS); Wire.write(SHIFT); Wire.endTransmission(); delay(200); //Sometimes the below code never receives data back... Is this really needed? Wire.requestFrom(SENSOR_ADDRESS, 1, false); while (Wire.available() == 0) Trace("Waiting for TCA9548/sensor to reply..."); shift = Wire.read(); //Trace(shift); } //Change the channel in the TCA I2C multiplexer void setActiveSensor(uint8_t i) { if (i > 7) return; Wire.beginTransmission(TCA_ADDRESS); Wire.write(1 << i); Wire.endTransmission(); activeSensor = i; } int readFromActiveSensor() { Wire.beginTransmission(SENSOR_ADDRESS); Wire.write(DISTANCE_REG); Wire.endTransmission(); Wire.requestFrom(SENSOR_ADDRESS, 2); while (Wire.available() < 2) { //TraceNoLine("Waiting for sensor: "); //Trace(activeSensor); } hi = Wire.read(); low = Wire.read(); distance = (hi * 16 + low) / 16 / (int)pow(2, shift); return distance; } int getSensorDistanceInCm(int sensornumber) { //Serial.println(sensornumber); //Set active channel on the TCA I2C multiplexer setActiveSensor(sensornumber); int cm = readFromActiveSensor(); return cm; }
[ "frode@lillerud.no" ]
frode@lillerud.no
1d401e560c0ac8cedf7c0cfa3dea9f19c0afc10f
b2e9c0fb1d5996df7b8aa2cb7368bad34dd32713
/formats/python/Array.h
50761eb6ead25d3c1efe4737a1fbc80f900ec2ca
[ "MIT" ]
permissive
xguerin/ace
668bba8f829e3f4f744a1444e8bd960a34dffe00
cbfbf75840afa6c34f1b129a6be46e2a633b0095
refs/heads/master
2023-04-13T23:26:06.492570
2022-05-25T14:44:13
2022-05-25T14:44:13
282,903,412
3
0
MIT
2021-02-02T12:26:04
2020-07-27T13:17:10
C++
UTF-8
C++
false
false
1,386
h
/** * Copyright (c) 2016 Xavier R. Guerin * * 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. */ #pragma once #include <Python.h> #include <ace/tree/Array.h> #include <string> namespace ace { namespace pyfmt { namespace Array { tree::Value::Ref build(std::string const& n, PyObject* o); void dump(tree::Value const& v, std::ostream& o, int l, bool i); }}}
[ "xguerin@users.noreply.github.com" ]
xguerin@users.noreply.github.com
70bd191ef88211ef44f038a4c6f237079d9505e6
0aa4183bf8e58af195c7cabada163bc6f6738c6d
/test/mushroom_with_queue.cpp
5a58cc3e2c28aa1422526ba0d4358532ae2f128f
[ "BSD-3-Clause" ]
permissive
songhtdo/Mushroom
b2ea481bbb09d72278f9f5422e58f8567dfdba76
8aed2bdd80453d856145925d067bef5ed9d10ee0
refs/heads/master
2020-06-25T08:52:27.643000
2018-11-23T03:10:22
2018-11-23T03:10:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,397
cpp
/** * > Author: UncP * > Github: www.github.com/UncP/Mushroom * > License: BSD-3 * > Time: 2016-11-20 12:37:41 **/ #include <cassert> #include <chrono> #include <fcntl.h> #include <unistd.h> #include "../src/blink/slice.hpp" #include "../src/blink/db.hpp" #include "../src/blink/task.hpp" #include "../src/blink/bounded_mapping_queue.hpp" #include "../src/blink/thread_pool_mapping.hpp" using namespace Mushroom; static const int key_len = 16; static int total; double Do(const char *file, MushroomDB *db, bool (MushroomDB::*(fun))(KeySlice *)) { BoundedMappingQueue<MushroomTask> *queue = new BoundedMappingQueue<MushroomTask>(1024, []() { return new MushroomTask(); }); ThreadPoolMapping<MushroomTask> pool(queue, 4); TempSlice(key); int fd = open(file, O_RDONLY); assert(fd > 0); char buf[8192]; int curr = 0, ptr = 0, count = 0; bool flag = true; auto beg = std::chrono::high_resolution_clock::now(); for (; (ptr = pread(fd, buf, 8192, curr)) > 0 && flag; curr += ptr) { while (--ptr && buf[ptr] != '\n' && buf[ptr] != '\0') buf[ptr] = '\0'; if (ptr) buf[ptr++] = '\0'; else break; for (int i = 0; i < ptr; ++i) { char *tmp = buf + i; i += key_len; assert(buf[i] == '\n' || buf[i] == '\0'); buf[i] = '\0'; key->page_no_ = 0; memcpy(key->key_, tmp, key_len); MushroomTask *task = queue->Get(); task->Assign(fun, db, key); queue->Push(); if (++count == total) { flag = false; break; } } } close(fd); pool.Clear(); delete queue; auto end = std::chrono::high_resolution_clock::now(); auto t = std::chrono::duration<double, std::ratio<1>>(end - beg).count(); return t; } int main(int argc, char **argv) { const char *file = "../data/10000000"; assert(argc > 4); uint32_t page_size = atoi(argv[1]) ? atoi(argv[1]) : 4096; uint32_t pool_size = atoi(argv[2]) ? atoi(argv[2]) : 4800; uint32_t hash_bits = atoi(argv[3]) ? atoi(argv[3]) : 10; uint32_t seg_bits = atoi(argv[4]) ? atoi(argv[4]) : 4; total = (argc == 6) ? atoi(argv[5]) : 1; MushroomDB db("mushroom_test", key_len, page_size, pool_size, hash_bits, seg_bits); double t1 = Do(file, &db, &MushroomDB::Put); double t2 = Do(file, &db, &MushroomDB::Get); db.Close(); printf("\033[31mtotal: %d\033[0m\n\033[32mput time: %f s\033[0m\n", total, t1); printf("\033[34mget time: %f s\033[0m\n", t2); return 0; }
[ "770778010@qq.com" ]
770778010@qq.com
cb03e1fb31b7cc599ad24c4b16462bd92a772711
4cbd85de1b149a0bb35a90e09160bbcbc935b042
/NOI/tests/C/C1_colors/author/colors.cpp
db88a5c4add2a2e5eda1f32a0824c4cb159b0c91
[]
no_license
Alex-Tsvetanov/Testing-Scripts
cacaaea1642b18f6ea261faa0e19d0cc26a5b6d2
c201f3bf02662a8fb3e862211cbf6f74725dfac3
refs/heads/master
2021-05-13T23:46:17.206320
2018-01-07T00:18:13
2018-01-07T00:18:13
116,525,044
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
2,936
cpp
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; struct TBal { int c,b; }; int a[100001], bb, n, k; // bb е броя на различните цветове TBal b[100001]; int main(){ int bb=0, i, j; scanf("%d%d", &n, &k); for (i = 1; i <= n; i++) scanf("%d", &a[i]); sort(a+1, a + n+1); // сортираме цветовете в нарастващ ред bb=1; b[1].c=a[1]; b[1].b=1; // Образуваме b[1] от структурата TBal for (i = 2; i <= n; i++) if (a[i]==a[i-1]) // срещаме същия цвят b[bb].b++; // Вдига брояча b[bb].b на текучщия цвят bb else { // при нов цвят bb++; // вдига брояча bb на broq na цветовете b[bb].c=a[i]; // прави цвета b[bb].c равен на новия цвят a[i] b[bb].b=1; // установява брояча b[bb].b да е 1 } // k<=bb - броят на балоните НЕ е по-голям // от броя на различните цветове if (k<=bb) { for (i = 1; i <= k; i++) // Отпечатва по един балон от първите k цвята cout<<b[i].c<<" "; cout<<endl; return 0; } // k > bb - броят на балоните е по-голям // от броя на различните цветове int Ost=k-bb; // OSt - колко балона остават да се отпечатат // вземаме по един балон от всеки цвят, затова // изваждаме bb for (i=1; i<=bb;i++){ // обхождаме цветовете if (b[i].b-1<= Ost) { // броят на балоните от цвят i е по-малък от остатъка for (j=1; j<=b[i].b; j++) cout<<b[i].c<<" "; // отпечатваме номерата на балоните от цвят i Ost=Ost-(b[i].b-1); // намаляваме Ost с броя на отпечатаните балони } else { for (j=1; j<=Ost+1; j++) cout<<b[i].c<<" "; // Отпечатваме колкото балона остават, но плюс единия, ойто // сме взели в началото Ost=0; // нулираме остатъка при балон с цвят i } if (Ost==0) // прекъсваме цикъла, остана да се отпечатат по break; // един баон от останалите цветове след i-я } for (j=i+1; j<=bb;j++) cout<<b[j].c<<" "; // отпечатваме по един цвят от всички цветове cout<<endl; // от i+1 до края return 0; }
[ "you@example.com" ]
you@example.com
facc4cc832f3f3773f62021d3f3bdf03b79a44a1
45f35abd5d7616cbfe4981e9d1ab65a25c47cb96
/threadMachine.cpp
0d1b73a79555c02f67a852d1c36524018c86adb4
[]
no_license
stevenssq/free-fsm
2bef3e354d19d50c58d3ac109265aeb44b404377
2bab29f5d4dba8b53537c9a56e248b3722ff70ef
refs/heads/master
2022-11-18T07:13:36.675901
2020-07-20T09:18:25
2020-07-20T09:18:25
281,068,473
0
0
null
null
null
null
UTF-8
C++
false
false
3,162
cpp
#include <unistd.h> #include <memory.h> #include <iostream> #include "threadMachine.h" #include "StateGetJob.h" #include "StateGotoPoint.h" #include "StateBeginCharge.h" #include "StateOpenDoor.h" #include "StateCloseDoor.h" #include "StateFinish.h" #include "StateFinal.h" #include "StateMachine.h" #include "threadbase/threadbase.h" #include "signalbase/signalbase.h" #include "threadbase/MyQueue.h" StateMachine *pStateMachine = new StateMachine(); static void *ThreadMachine(void *pvPara) { pvPara = pvPara; State *pWorkState = new State(pStateMachine); State *pChargeState = new State(pStateMachine); StateFinal *pStateFinal = new StateFinal(pStateMachine); StateGetJob *pStateGetJob = new StateGetJob(pWorkState); StateGotoPoint *pStateGotoPoint = new StateGotoPoint(pWorkState); StateFinish *pStateFinish = new StateFinish(pWorkState); StateBeginCharge *pStateBeginCharge = new StateBeginCharge(pChargeState); StateOpenDoor *pStateOpenDoor = new StateOpenDoor(pChargeState); StateCloseDoor *pCloseDoor = new StateCloseDoor(pChargeState); pWorkState->addState("get job", pStateGetJob); pWorkState->addState("goto point", pStateGotoPoint); pWorkState->addState("finished", pStateFinish); pWorkState->setInitState(pStateGetJob); pChargeState->addState("begin charge", pStateBeginCharge); pChargeState->addState("open door", pStateOpenDoor); pChargeState->addState("close door", pCloseDoor); pChargeState->setInitState(pStateBeginCharge); pStateMachine->addState("work state", pWorkState); pStateMachine->addState("charge state", pChargeState); pStateMachine->addFinalState(pStateFinal); pStateMachine->setInitState(pWorkState); pStateMachine->start(); int signo = 0; while(1) { signo = getThreadSignal("stateMachine"); if (-255 == signo) { usleep(10); continue; } switch (signo) { case START_MACHINE: dzlog_info("receive signal start machine,signum:%d", signo); pStateMachine->start(); break; case STOP_MACHINE: dzlog_info("receive signal stop machine,signum:%d", signo); pStateMachine->stop(); break; case BEGIN_WORK: dzlog_info("receive signal begin Work, signum:%d", signo); pStateMachine->transferState("work state"); break; case BEGIN_CHARGE: dzlog_info("receive signal begin charge, signum:%d", signo); pStateMachine->transferState("charge state"); sleep(10); break; default: dzlog_info("unexpected signal:%d", signo); } } return NULL; } void createMachineThread() { ThreadCreateParaDef tThreadCreatePara; memset(&tThreadCreatePara, 0, sizeof(ThreadCreateParaDef)); tThreadCreatePara.ps8Name = (char *)"stateMachine"; tThreadCreatePara.pvFuncPara = NULL; tThreadCreatePara.EntryFuncPt = ThreadMachine; createThread(&tThreadCreatePara); }
[ "noreply@github.com" ]
noreply@github.com
78609a0112efa123c4d955edb885944947dad590
34fabf10621f6c856d64f40a6492245131e94ed2
/ChatProgram/Server/Client.h
50c98150a76a5d90a960bb0d0dbb97154c7667ae
[ "MIT" ]
permissive
mkachi-study/boost.asio
37c2895c0e3e0f8f2a2d8abc790f3f4745eeaacc
f17efbe94f504b5991bfa50a5cd7c3f4f45077fc
refs/heads/master
2022-01-21T14:20:15.065330
2019-05-12T16:43:37
2019-05-12T16:43:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
731
h
#pragma once #include "Type.h" #include <array> #include <queue> enum { RECEIVE_BUFFER_MAX = 512 }; class Server; class Client { private: uint _id; TcpSocket _socket; Server* _server; std::array<char, RECEIVE_BUFFER_MAX> _receiveBuffer; std::array<char, RECEIVE_BUFFER_MAX * 2> _packetBuffer; int _packetMark; std::queue<char*> _sendDataQueue; void receiveHandle(const ErrorCode& error, uint bytesTransferred); void writeHandle(const ErrorCode& error, uint bytesTransferred); public: Client(int id, Service& service, Server* server); ~Client(); void receive(); void send(const int size, char* data, bool straight = false); uint getId() const { return _id; } TcpSocket& getSocket() { return _socket; } };
[ "mkachi@naver.com" ]
mkachi@naver.com
c21232354039b78bebc4f72eacd0522480899076
9c21d031d9a771330c9d699e35a30181c39314b7
/code_1/Customer.cpp
027875cd0d8ca93ddeb73741e66a8656b4c03333
[]
no_license
Iamyuanxi/Class
33edc8175b951f09579ec0f4f48fd8437e1507bf
d92f60f1569cdfda50a046c21c0122b12ffb4b47
refs/heads/master
2023-08-19T22:52:05.233329
2021-10-20T12:24:33
2021-10-20T12:24:33
416,690,057
0
0
null
null
null
null
GB18030
C++
false
false
2,277
cpp
#include"SalesManage.h" BOOL AddCustomer(Customer *head, const Customer *customer) //添加 { Customer *curr = head; while (curr->next != NULL) { curr = curr->next; } curr->next = (Customer *) customer; return TRUE; } BOOL UpdateCustomer(Customer *head, const Customer *customer) //修改 { Customer *prev = head; Customer *curr = head->next; while (curr != NULL) { if (strcmp(customer->name, curr->name) == 0) { prev->next = (Customer *) customer; prev->next->next = curr->next; free(curr); break; } prev = curr; curr = curr->next; } return TRUE; } BOOL DeleteCustomerByName(Customer *head, const char *name) //删除 { Customer *prev = head; Customer *curr = head->next; int isExist = 0; while (curr != NULL) { if (strcmp(name, curr->name) == 0) { prev->next = curr->next; free(curr); isExist = 1; break; } else { prev = curr; curr = curr->next; } } return isExist == 1 ? TRUE : FALSE; } Customer *QueryCustomerByName(const Customer *head, const char *name) //查找 { Customer *curr = head->next; while (curr != NULL) { if (strcmp(name,curr->name) == 0) { break; } curr = curr->next; } return curr; } BOOL SaveCustomerDataToFile(Customer *head, const char *fileName) //保存 { Customer *curr = head->next; Customer *prev = head; FILE *fp; if ((fp = fopen(fileName,"w")) == NULL) { perror(fileName); return FALSE; } while (curr != NULL) { fprintf(fp, "%s\t%s\t%s\n", curr->name, curr->phone, curr->address); free(prev); prev = curr; curr = prev->next; } free(prev); fclose(fp); return TRUE; } BOOL LoadCustomerDataFromFile(Customer *head, const char *fileName) //打开 { Customer *pNew; Customer *pTail = head; FILE *fp; if ((fp=fopen(fileName,"a+")) == NULL) { perror(fileName); return FALSE; //exit(EXIT_FAILURE); } while (!feof(fp)) { pNew = (Customer *) malloc (sizeof(Customer)); if (pNew == NULL) { return FALSE; } if ((fscanf(fp, "%s%s%s", pNew->name, pNew->phone, pNew->address)) != 3) { free(pNew); break; } pNew->next = NULL; pTail->next = pNew; pTail = pNew; } fclose(fp); return TRUE; }
[ "2545826010@qq.com" ]
2545826010@qq.com
f9aa1cc6f9d8b8170c4d05415052982e20ddb431
08b8cf38e1936e8cec27f84af0d3727321cec9c4
/data/crawl/git/hunk_4430.cpp
b60b6f6a7e1de4fa56470a8fb5799fd7257c8e16
[]
no_license
ccdxc/logSurvey
eaf28e9c2d6307140b17986d5c05106d1fd8e943
6b80226e1667c1e0760ab39160893ee19b0e9fb1
refs/heads/master
2022-01-07T21:31:55.446839
2018-04-21T14:12:43
2018-04-21T14:12:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
656
cpp
0); if (1 < argc) { - error("too many parameters"); + error(_("too many parameters")); usage_with_options(git_notes_show_usage, options); } object_ref = argc ? argv[0] : "HEAD"; if (get_sha1(object_ref, object)) - die("Failed to resolve '%s' as a valid ref.", object_ref); + die(_("Failed to resolve '%s' as a valid ref."), object_ref); t = init_notes_check("show"); note = get_note(t, object); if (!note) - retval = error("No note found for object %s.", + retval = error(_("No note found for object %s."), sha1_to_hex(object)); else { const char *show_args[3] = {"show", sha1_to_hex(note), NULL};
[ "993273596@qq.com" ]
993273596@qq.com
830eb85389aeb608cbfc0d4dae3bf1e0ae0e0ae9
c956580fc7663b05e66d10a4f4893f7f7ce59319
/Array using Pointers.cpp
c7b71c2769430a5ec212f933066798bd00df3ef1
[]
no_license
prash1105/amateur.stuffs
f2758a9e17ed89026ee1df6b760cf6ae0b100d6e
b620de699d86f0b44e6f5681f4c93c37ae9db7e9
refs/heads/main
2023-03-09T04:26:59.489318
2021-02-25T16:21:10
2021-02-25T16:21:10
337,317,931
0
0
null
null
null
null
UTF-8
C++
false
false
290
cpp
#include <iostream> using namespace std; int main() { int data[5]; cout << "Enter any 5 numbers:\n"; for(int i = 0; i < 5; ++i) cin >> data[i]; cout << "\nYou entered: "; for(int i = 0; i < 5; ++i) cout << endl << *(data + i); return 0; }
[ "noreply@github.com" ]
noreply@github.com
fb00acb93b6e0eb8f3aa4f2d1e404a28c1359ffe
04fcd1aa608de25ebcbcc014bbeaa226a5bc5308
/tools/buildmgr/test/unittests/src/CBuildUnitTestEnv.cpp
a966bd87d0a4e1ab56d52832a0903f549a80f0e5
[ "MIT", "BSD-3-Clause", "BSL-1.0", "Apache-2.0" ]
permissive
chaws/devtools
13aebfa84c7e8fde0d2a8a987dc9ee98303c9c35
239757f6aa5958bacd336b5caf8c2e5ef32dea86
refs/heads/main
2023-09-05T23:01:02.228163
2021-11-03T12:47:18
2021-11-03T12:47:18
424,471,661
0
0
NOASSERTION
2021-11-04T04:28:42
2021-11-04T04:28:42
null
UTF-8
C++
false
false
1,794
cpp
/* * Copyright (c) 2020-2021 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ #include "CBuildUnitTestEnv.h" #include "ErrOutputterSaveToStdoutOrFile.h" using namespace std; string testinput_folder = string(TEST_FOLDER) + "testinput"; string examples_folder = string(TEST_FOLDER) + "testinput/Examples"; string testout_folder = fs::current_path().append("testoutput").generic_string(); void RemoveDir(fs::path path) { error_code ec; if (fs::is_directory(path, ec)) { // Remove Files for (auto& p : fs::recursive_directory_iterator(path)) { if (fs::is_regular_file(p, ec)) fs::remove(p, ec); } // Remove child dirs for (auto & dir : fs::directory_iterator(path)) { fs::remove(dir, ec); } // Remove parent fs::remove(path, ec); } } const string CBuildUnitTestEnv::workingDir = fs::current_path().generic_string(); void CBuildUnitTestEnv::SetUp() { if (!ErrLog::Get()->GetOutputter()) { ErrLog::Get()->SetOutputter(new ErrOutputterSaveToStdoutOrFile()); } error_code ec; fs::create_directories(testout_folder, ec); testinput_folder = fs::canonical(testinput_folder, ec).generic_string(); examples_folder = fs::canonical(examples_folder, ec).generic_string(); // set quiet mode InitMessageTable(); ErrLog::Get()->SetQuietMode(); } void CBuildUnitTestEnv::TearDown() { // reserved } int main(int argc, char **argv) { try { testing::InitGoogleTest(&argc, argv); ::testing::AddGlobalTestEnvironment(new CBuildUnitTestEnv); return RUN_ALL_TESTS(); } catch (testing::internal::GoogleTestFailureException const& e) { std::cout << "runtime_error: " << e.what(); return 2; } catch (...) { std::cout << "non-standard exception"; return 2; } }
[ "noreply@github.com" ]
noreply@github.com
920c24fa5c35e90e183c4bfdcef314ac85d712ef
cc047b5c8a3a8049912a15d03e37fa4f68aaf37b
/8/8.3.cpp
cf73ff068efa9ec761cbc34a7bbcd59bc6801ec0
[]
no_license
SeiperLu/Nauka
a046609f38478ddd5f1922a74eb1d3bd59bdd8d5
39411650c262b6b9232d9a0ab3859240a72c9f9e
refs/heads/master
2023-07-14T19:29:45.229810
2021-08-12T11:04:39
2021-08-12T11:04:39
343,428,592
0
0
null
null
null
null
UTF-8
C++
false
false
546
cpp
#include<iostream> int main() { using namespace std; int rats = 101; int & rodents = rats; cout << "rats = " << rats; cout << ", rodents = " << rodents <<endl; cout << "adres rats = " << &rats; cout << ", adres rodents = " << &rodents <<endl; int bunnies = 50; rodents = bunnies; cout << "bunnies = " << bunnies << ", rats = " << rats << ", rodents = " << rodents <<endl; cout << "adres bunnies = " << &bunnies << ", adres rodents = " << &rodents <<endl; cin.get(); cin.get(); return 0; }
[ "grzechuw1236@gmail.com" ]
grzechuw1236@gmail.com
fe5970ea3a7b61ecd87daa1d92ddd5d2e6c2366e
56fb3146e5fd90e6f612e7d1db4e6eb014c90804
/Amerike-CC-Proyectos/Trabajo4-SFML-GameEngine/src/Rectangle.cc
25945bf164e8af1073921d602f001060ec335599
[]
no_license
NahomiRyu3095/AmerikeTrabajos
39fd22c05d7f01433c4cbf2f4f6d686fc947acb1
45c1c2b3a154979e28a4c519b43e7c1e6aae3e2f
refs/heads/main
2023-07-27T08:32:56.463175
2021-09-10T00:07:17
2021-09-10T00:07:17
403,455,791
0
0
null
null
null
null
UTF-8
C++
false
false
379
cc
#include "Rectangle.hh" Rectangle::Rectangle(int w, int h, int x, int y, sf::Color color) { rectangleShape = new sf::RectangleShape(sf::Vector2f(w, h)); rectangleShape->setPosition(sf::Vector2f(x, y)); rectangleShape->setFillColor(color); } Rectangle::~Rectangle() { } sf::RectangleShape* Rectangle::GetShape() const { return rectangleShape; }
[ "noreply@github.com" ]
noreply@github.com
1965ef6a7e76a69c905dd687f54fc35178595acf
7f72fc855742261daf566d90e5280e10ca8033cf
/branches/full-calibration/ground/src/plugins/hitlnew/xplanesimulator.h
c5c468fa32e3e8a978d51b4c387fc111ac53026a
[]
no_license
caichunyang2007/my_OpenPilot_mods
8e91f061dc209a38c9049bf6a1c80dfccb26cce4
0ca472f4da7da7d5f53aa688f632b1f5c6102671
refs/heads/master
2023-06-06T03:17:37.587838
2011-02-28T10:25:56
2011-02-28T10:25:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,265
h
/** ****************************************************************************** * * @file xplanesimulator.h * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief * @see The GNU Public License (GPL) Version 3 * @defgroup hitlplugin * @{ * *****************************************************************************/ /* * 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 3 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 */ #ifndef XPLANESIMULATOR_H #define XPLANESIMULATOR_H #include <QObject> #include <simulator.h> class XplaneSimulator: public Simulator { Q_OBJECT public: XplaneSimulator(const SimulatorSettings& params); ~XplaneSimulator(); void setupUdpPorts(const QString& host, int inPort, int outPort); private slots: void transmitUpdate(); private: enum XplaneOutputData { FramRate, Times, SimStats, Speed, Gload, AtmosphereWeather, AtmosphereAircraft, SystemPressures, Joystick1, Joystick2, ArtStab, FlightCon, WingSweep, Trim, Brakes, AngularMoments, AngularAccelerations, AngularVelociies, PitchRollHeading, AoA, LatitudeLongitude, LocVelDistTraveled }; void processUpdate(const QByteArray& data); }; class XplaneSimulatorCreator : public SimulatorCreator { public: XplaneSimulatorCreator(const QString& classId, const QString& description) : SimulatorCreator (classId,description) {} Simulator* createSimulator(const SimulatorSettings& params) { return new XplaneSimulator(params); } }; #endif // XPLANESIMULATOR_H
[ "jonathan@ebee16cc-31ac-478f-84a7-5cbb03baadba" ]
jonathan@ebee16cc-31ac-478f-84a7-5cbb03baadba
b9d9797fca76bdcf0d83b72b8e53c21b7fd684e8
2f154c2dbc83abe65e519b37447740d825fd55d6
/LUOGU/luogu3809.cpp
bb49319ac221ecf0beb021f212afe21ab9ea73f8
[]
no_license
WIZeaz/OJ_Record
803949d614b486e5fc9ebde07693ffbb356eafd8
fed5cd7617067c6ad74271509f8776d4a285ecb1
refs/heads/master
2021-06-16T09:48:11.220929
2021-03-22T06:57:27
2021-03-22T06:57:27
183,160,893
0
0
null
null
null
null
UTF-8
C++
false
false
1,400
cpp
#include <iostream> #include <cstdio> #include <cstring> using namespace std; #define STRMAXLEN 1000010 int rnk[STRMAXLEN]; int buckets[STRMAXLEN]; int sa[STRMAXLEN]; //the number of rank i number int tsa[STRMAXLEN]; int bucketSort(int len,int charnum,int k){ for (int i=0;i<=charnum;++i) buckets[i]=0; for (int i=0;i<len;++i) buckets[rnk[i]]++; for (int i=1;i<=charnum;++i) buckets[i]+=buckets[i-1]; for (int i=len-1;i>=0;--i) sa[--buckets[rnk[tsa[i]]]]=tsa[i]; swap(tsa,rnk); //sheng shu zu charnum=1; rnk[sa[0]]=1; for (int i=1;i<len;++i){ if (tsa[sa[i]]!=tsa[sa[i-1]]) ++charnum; else if ((sa[i]+k>=len) != (sa[i-1]+k>=len)) ++charnum; else if ((sa[i]+k<len && sa[i-1]+k<len) && tsa[sa[i]+k]!=tsa[sa[i-1]+k]) ++charnum; rnk[sa[i]]=charnum; } return charnum; } void SuffixSort(char str[]){ int len=strlen(str); for (int i=0;i<len;++i){ rnk[i]=int(str[i]); tsa[i]=i; } int charnum=bucketSort(len,256,0); for (int k=1;k<len && charnum<len;k<<=1){ int t=0; for (int i=0;i<k;++i) tsa[t++]=len-k+i; for (int i=0;i<len;++i) if (sa[i]-k>=0) tsa[t++]=sa[i]-k; charnum=bucketSort(len,charnum,k); } } char str[STRMAXLEN]; int main() { scanf("%s",str); SuffixSort(str); int len=strlen(str); for (int i=0;i<len;++i) printf("%d ",sa[i]+1); }
[ "764696642@qq.com" ]
764696642@qq.com
04ec35296a92c24f264511a35d8dcbf482214fca
bbcda48854d6890ad029d5973e011d4784d248d2
/trunk/win/BumpTop Settings/include/wxWidgets/wx/gtk1/brush.h
7573499b672de9bf544b10194d7a2afe169e4b38
[ "LGPL-2.0-or-later", "WxWindows-exception-3.1", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
dyzmapl/BumpTop
9c396f876e6a9ace1099b3b32e45612a388943ff
1329ea41411c7368516b942d19add694af3d602f
refs/heads/master
2020-12-20T22:42:55.100473
2020-01-25T21:00:08
2020-01-25T21:00:08
236,229,087
0
0
Apache-2.0
2020-01-25T20:58:59
2020-01-25T20:58:58
null
UTF-8
C++
false
false
1,870
h
///////////////////////////////////////////////////////////////////////////// // Name: wx/gtk1/brush.h // Purpose: // Author: Robert Roebling // Id: $Id: brush.h 41751 2006-10-08 21:56:55Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __GTKBRUSHH__ #define __GTKBRUSHH__ #include "wx/defs.h" #include "wx/object.h" #include "wx/string.h" #include "wx/gdiobj.h" #include "wx/bitmap.h" //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxBrush; //----------------------------------------------------------------------------- // wxBrush //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase { public: wxBrush() { } wxBrush( const wxColour &colour, int style = wxSOLID ); wxBrush( const wxBitmap &stippleBitmap ); virtual ~wxBrush(); bool Ok() const { return IsOk(); } bool IsOk() const { return m_refData != NULL; } bool operator == ( const wxBrush& brush ) const; bool operator != (const wxBrush& brush) const { return !(*this == brush); } virtual int GetStyle() const; wxColour &GetColour() const; wxBitmap *GetStipple() const; void SetColour( const wxColour& col ); void SetColour( unsigned char r, unsigned char g, unsigned char b ); void SetStyle( int style ); void SetStipple( const wxBitmap& stipple ); private: // ref counting code virtual wxObjectRefData *CreateRefData() const; virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; DECLARE_DYNAMIC_CLASS(wxBrush) }; #endif // __GTKBRUSHH__
[ "anandx@google.com" ]
anandx@google.com
def6c41a333c812663fdc35dfdc2dda680c8bb50
26825a98fb82578333e472cc277044a237e8d5ff
/starlab-mcfskel/core/plugins/gui_filemenu/gui_filemenu.cpp
c5f50d95183a010fb08e72b1437818e8445b8b76
[]
no_license
JackZhouSz/zju_code
e04d8731f806948d6d03c8e4dd377d85a8b2df32
c7cc0d913314d1a5396d5d03298849308022430c
refs/heads/master
2023-03-16T05:55:03.897561
2015-08-25T04:56:38
2015-08-25T04:56:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
18,015
cpp
#include "gui_filemenu.h" Q_EXPORT_PLUGIN(gui_filemenu) #include <QFileInfo> #include "StarlabDrawArea.h" #include "OSQuery.h" const static QString all_files = "All Files (*.*)"; using namespace Starlab; void gui_filemenu::delete_selected_model(){ if(selectedModel()==NULL) return; document()->deleteModel( selectedModel() ); } void gui_filemenu::open(){ /// Restore browsing directory from the cache QDir lastUsedDirectory( settings()->getString("lastUsedDirectory") ); /// Builds allowed extensions / filter list QString filters = all_files; { QTextStream sout(&filters); foreach(InputOutputPlugin* plugin, pluginManager()->modelIOPlugins) sout << ";;" << plugin->name(); foreach(ProjectInputOutputPlugin* plugin, pluginManager()->projectIOPlugins) sout << ";;" << plugin->name(); } /// Prompt user for file to open QString selectedFilter; QString fileName = QFileDialog::getOpenFileName(mainWindow(),tr("Open Project File"), lastUsedDirectory.path(),filters,&selectedFilter); // QString extension = QFileInfo(fileName).suffix().toLower(); /// "Cancel" button was pressed if(fileName.isNull()) return; /// Cache the opened directory for future use /// do it early so if operation fail it's still cached QFileInfo fileInfo(fileName); settings()->set( "lastUsedDirectory", fileInfo.absolutePath() ); /// If user is trustring the "auto-loader" if(selectedFilter == all_files) application()->load(fileName); /// But if he preferred something else else{ InputOutputPlugin* model_plugin = pluginManager()->modelIOPlugins.value(selectedFilter,NULL); ProjectInputOutputPlugin* project_plugin = pluginManager()->projectExtensionToPlugin.value(selectedFilter,NULL); Q_ASSERT(model_plugin==NULL || project_plugin==NULL); if(project_plugin != NULL) application()->loadProject(fileName,project_plugin); if(model_plugin != NULL) application()->loadModel(fileName,model_plugin); } } /// Case 1: only one model (didn't exist) and doc never existed /// Case 2: only one model (did exist) and doc never existed /// Case 3: multiple models but doc never existed /// Case 4: multiple models and doc already existed void gui_filemenu::save(){ try { // qDebug() << "[[ENTERING]] gui_filemenu::save()"; if(document()->models().size()==0) return; if(true){ Starlab::Model* model = document()->selectedModel(); bool pathAlreadySpecified = (model->path != ""); bool success = false; /// Already know where to save if( pathAlreadySpecified ) success = application()->saveModel(model, model->path); /// Query user where to save & save in model path else{ QString lastDir = settings()->getString("lastUsedDirectory"); QString fileName = QFileDialog::getSaveFileName(mainWindow(),"Save Selected Model",lastDir); if(fileName.isEmpty()) return; model->path = fileName; model->name = QFileInfo(fileName).baseName(); success = application()->saveModel(model); } if(success){ QFileInfo finfo(model->path); mainWindow()->setStatusBarMessage("Saved model at path: " + finfo.absoluteFilePath(),2.0f); } else { mainWindow()->setStatusBarMessage("Save operation failed...",2.0f); } } else { throw StarlabException("gui_file::save() modes 2...4 not implemented"); } } STARLAB_CATCH_BLOCK } void gui_filemenu::reload_selection(){ // qDebug() << "gui_filemenu::reload_selection()"; mainWindow()->document()->pushBusy(); Model* selection = mainWindow()->document()->selectedModel(); if(selection==NULL) return; QFileInfo fi(selection->path); if(!fi.exists()) throw StarlabException("Cannot reload mode, file %s cannot be found.",selection->path.toStdString().c_str()); /// Guess open plugin by extension QString extension = QFileInfo(selection->path).suffix().toLower(); QList<InputOutputPlugin*> plugins = pluginManager()->modelExtensionToPlugin.values(extension); /// Check which of these have generated the model, then use it to re-open Model* newmodel = NULL; foreach(InputOutputPlugin* plugin, plugins) if(plugin->isApplicable(selection)) newmodel = plugin->open(selection->path); if(newmodel==NULL) throw StarlabException("Impossible ot reload model"); /// Compute its BBOX, otherwise rendering will not work newmodel->updateBoundingBox(); /// Replace and set as selected model mainWindow()->document()->addModel(newmodel); mainWindow()->document()->deleteModel(selection); mainWindow()->document()->setSelectedModel(newmodel); mainWindow()->document()->popBusy(); /// Inform the user mainWindow()->setStatusBarMessage("Model '"+ newmodel->name +"' reloaded from path: " + newmodel->path,5000); } void gui_filemenu::save_selection_as(){ document()->selectedModel()->path = ""; this->save(); } void gui_filemenu::take_screenshot(){ /// Screen Shot 2013-04-03 at 6.59.51 PM QString date = QDateTime::currentDateTime().toString("yyyy-MM-dd h.mm.ss AP"); QString filename = QDir::homePath() + "/Desktop/" + QString("Screen Shot ") + date + ".png"; // QDir::setCurrent(QDir::homePath()); #if 0 // this uses qglviewer stuff (but no alpha!!) // drawArea()->saveSnapshot(filename, true); #else // this uses qt stuff // drawArea()->setAttribute(Qt::WA_TranslucentBackground,true); QImage image = drawArea()->grabFrameBuffer(true); image.save(filename, "png",100); if(drawArea()->backgroundColor().alpha()<255 && drawArea()->format().samples()>1) qWarning() << "Antialiasing and transparent backgrounds do work well in snapshots" << "Change background opacity to 100% in the render menu"; #endif showMessage("Screenshot saved at: %s",qPrintable(filename)); } #if 0 QAction *recentFileActs[MAXRECENTFILES]; QAction *recentProjActs[MAXRECENTFILES]; #endif /// In the constructor #if 0 for (int i = 0; i < MAXRECENTFILES; ++i) { recentProjActs[i] = new QAction(this); recentProjActs[i]->setVisible(true); recentProjActs[i]->setEnabled(true); recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(true); recentFileActs[i]->setEnabled(false); recentFileActs[i]->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1+i)); connect(recentProjActs[i],SIGNAL(triggered()),this,SLOT(openRecentProj())); connect(recentFileActs[i], SIGNAL(triggered()),this, SLOT(openRecentMesh())); } #endif /// Allocation #if 0 QMenu* recentProjMenu; QMenu* recentFileMenu; recentProjMenu = fileMenu->addMenu(tr("Recent Projects")); recentFileMenu = fileMenu->addMenu(tr("Recent Files")); for (int i = 0; i < MAXRECENTFILES; ++i) { recentProjMenu->addAction(recentProjActs[i]); recentFileMenu->addAction(recentFileActs[i]); } #endif #if 0 void MainWindow::updateRecentFileActions() { bool activeDoc = true; /// Now it's always true... QSettings settings; QStringList files = settings()->value("recentFileList").toStringList(); int numRecentFiles = qMin(files.size(), (int)MAXRECENTFILES); for (int i = 0; i < numRecentFiles; ++i) { QString text = tr("&%1 %2").arg(i + 1).arg(QFileInfo(files[i]).fileName()); recentFileActs[i]->setText(text); recentFileActs[i]->setData(files[i]); recentFileActs[i]->setEnabled(activeDoc); } for (int j = numRecentFiles; j < MAXRECENTFILES; ++j) recentFileActs[j]->setVisible(false); } #endif #if 0 void MainWindow::saveRecentProjectList(const QString &projName) { QSettings settings; QStringList files = settings()->value("recentProjList").toStringList(); files.removeAll(projName); files.prepend(projName); while (files.size() > MAXRECENTFILES) files.removeLast(); for(int ii = 0; ii < files.size(); ++ii) files[ii] = QDir::fromNativeSeparators(files[ii]); settings()->setValue("recentProjList", files); foreach (QWidget *widget, QApplication::topLevelWidgets()) { MainWindow *mainWin = qobject_cast<MainWindow *>(widget); if (mainWin) mainWin->updateRecentProjActions(); } } #endif #if 0 void MainWindow::updateRecentProjActions() { //bool activeDoc = (bool) !mdiarea->subWindowList().empty() && mdiarea->currentSubWindow(); QSettings settings; QStringList projs = settings()->value("recentProjList").toStringList(); int numRecentProjs = qMin(projs.size(), (int)MAXRECENTFILES); for (int i = 0; i < numRecentProjs; ++i) { QString text = tr("&%1 %2").arg(i + 1).arg(QFileInfo(projs[i]).fileName()); recentProjActs[i]->setText(text); recentProjActs[i]->setData(projs[i]); recentProjActs[i]->setEnabled(true); } for (int j = numRecentProjs; j < MAXRECENTFILES; ++j) recentProjActs[j]->setVisible(false); } #endif #if 0 // this function update the app settings with the current recent file list // and update the loaded mesh counter void MainWindow::saveRecentFileList(const QString &fileName) { QSettings settings; QStringList files = settings()->value("recentFileList").toStringList(); files.removeAll(fileName); files.prepend(fileName); while (files.size() > MAXRECENTFILES) files.removeLast(); //avoid the slash/back-slash path ambiguity for(int ii = 0; ii < files.size(); ++ii) files[ii] = QDir::fromNativeSeparators(files[ii]); settings()->setValue("recentFileList", files); /// @todo settings()->setValue("totalKV", settings()->value("totalKV",0).toInt() /*+(GLA()->mm()->n_vertices())/1000 */); settings()->setValue("loadedMeshCounter",settings()->value("loadedMeshCounter",0).toInt() + 1); } #endif #if 0 void MainWindow::openRecentMesh() { QAction *action = qobject_cast<QAction *>(sender()); if (action) loadModel(action->data().toString()); } void MainWindow::openRecentProj() { QAction *action = qobject_cast<QAction *>(sender()); if (action) loadProject(action->data().toString()); } #endif #if 0 /* Save project. It saves the info of all the layers and the layer themselves. So */ void MainWindow::saveProject() { QFileDialog* saveDiag = new QFileDialog(this,tr("Save Project File"),lastUsedDirectory.path().append(""), tr("Starlab Project (*.starlab);;")); #if defined(Q_OS_MAC) saveDiag->setOption(QFileDialog::DontUseNativeDialog,true); #endif QCheckBox* saveAllFile = new QCheckBox(QString("Save All Files"),saveDiag); saveAllFile->setCheckState(Qt::Unchecked); QGridLayout* layout = (QGridLayout*) saveDiag->layout(); layout->addWidget(saveAllFile,4,2); saveDiag->setAcceptMode(QFileDialog::AcceptSave); saveDiag->exec(); QStringList files = saveDiag->selectedFiles(); if (files.size() != 1) return; QString fileName = files[0]; // this change of dir is needed for subsequent textures/materials ing QFileInfo fi(fileName); if (fi.isDir()) return; if (fi.suffix().isEmpty()) { QRegExp reg("\\.\\w+"); saveDiag->selectedNameFilter().indexOf(reg); QString ext = reg.cap(); fileName.append(ext); fi.setFile(fileName); } QDir::setCurrent(fi.absoluteDir().absolutePath()); document()->name=fileName; document()->path=fileName; if (fileName.isEmpty()) return; else { //save path away so we can use it again QString path = fileName; path.truncate(path.lastIndexOf("/")); lastUsedDirectory.setPath(path); } if (QString(fi.suffix()).toLower() == "starlab") document()->writeToXML(document()->path); /// @todo if (saveAllFile->isChecked()) { qDebug() << "saveAllFile not implemented"; #if 0 for(int ii = 0; ii < meshDoc()->meshList.size(); ++ii) { MeshModel* mp = meshDoc()->meshList[ii]; exportMesh(mp->fullName(),mp,true); } #endif } } #endif #if 0 // Opening files in a transparent form (IO plugins contribution is hidden to user) bool MainWindow::loadModel(QString /*fileName*/, QString /*name*/) { /// Retrieve filenames to open from user QStringList fileNameList; { if (fileName.isEmpty()){ /// Generate a stringlist of "*.ext" QStringList extensions = pluginManager.knownExtensionsIO.keys(); for(int i=0; i<extensions.size(); i++){ QString& extension = extensions[i]; extension.prepend("*."); } fileNameList = QFileDialog::getOpenFileNames(this,tr("Import Mesh"), lastUsedDirectory.path(), extensions.join(";;")); } else fileNameList.push_back(fileName); if (fileNameList.isEmpty()){ return false; } else { //save path away so we can use it again QString path = fileNameList.first(); path.truncate(path.lastIndexOf("/")); lastUsedDirectory.setPath(path); } } foreach(fileName,fileNameList){ application()->loadModel(fileName, name); updateMenus(); // updateModelToolBar(); } drawarea->resetView(); } #endif #ifdef OLDMESHLAB bool MainWindow::exportMesh(QString /*fileName*/, Model* /*mod*/, bool /*saveAllPossibleAttributes*/) { /// @todo export mesh functionalities throw StarlabException("export mesh not implemented"); bool ret = false; QStringList& suffixList = PM.outFilters; //QHash<QString, MeshIOInterface*> allKnownF ormats; QFileInfo fi(fileName); //PM.Formats( suffixList, allKnownFormats,PluginManager::EXPORT); //QString defaultExt = "*." + mod->suffixName().toLower(); QString defaultExt = "*." + fi.suffix().toLower(); if(defaultExt == "*.") defaultExt = "*.ply"; if (mod == NULL) return false; mod->meshModified() = false; QString ff = mod->fullName(); QFileDialog saveDialog(this,tr("Save Current Layer"), mod->fullName()); saveDialog.setNameFilters(suffixList); saveDialog.setAcceptMode(QFileDialog::AcceptSave); QStringList matchingExtensions=suffixList.filter(defaultExt); if(!matchingExtensions.isEmpty()) saveDialog.selectNameFilter(matchingExtensions.last()); if (fileName.isEmpty()) { int dialogRet = saveDialog.exec(); if(dialogRet==QDialog::Rejected ) return false; fileName=saveDialog.selectedFiles ().first(); QFileInfo fni(fileName); if(fni.suffix().isEmpty()) { QString ext = saveDialog.selectedNameFilter(); ext.chop(1); ext = ext.right(4); fileName = fileName + ext; qDebug("File without extension adding it by hand '%s'", qPrintable(fileName)); } } QStringList fs = fileName.split("."); if(!fileName.isEmpty() && fs.size() < 2) { QMessageBox::warning(new QWidget(),"Save Error","You must specify file extension!!"); return ret; } if (!fileName.isEmpty()) { //save path away so we can use it again QString path = fileName; path.truncate(path.lastIndexOf("/")); lastUsedDirectory.setPath(path); QString extension = fileName; extension.remove(0, fileName.lastIndexOf('.')+1); QStringListIterator itFilter(suffixList); MeshIOInterface *pCurrentIOPlugin = PM.allKnowOutputFormats[extension.toLower()]; if (pCurrentIOPlugin == 0) { QMessageBox::warning(this, "Unknown type", "File extension not supported!"); return false; } //MeshIOInterface* pCurrentIOPlugin = meshIOPlugins[idx-1]; pCurrentIOPlugin->setLog(GLA()->log); int capability=0,defaultBits=0; pCurrentIOPlugin->GetExportMaskCapability(extension,capability,defaultBits); // optional saving parameters (like ascii/binary encoding) RichParameterSet savePar; pCurrentIOPlugin->initSaveParameter(extension,*(mod),savePar); SaveMaskExporterDialog maskDialog(new QWidget(),mod,capability,defaultBits,&savePar,this->GLA()); if (!saveAllPossibleAttributes) maskDialog.exec(); else { maskDialog.SlotSelectionAllButton(); maskDialog.updateMask(); } int mask = maskDialog.GetNewMask(); if (!saveAllPossibleAttributes) { maskDialog.close(); if(maskDialog.result() == QDialog::Rejected) return false; } if(mask == -1) return false; qApp->setOverrideCursor(QCursor(Qt::WaitCursor)); qb->show(); QTime tt; tt.start(); ret = pCurrentIOPlugin->save(extension, fileName, *mod ,mask,savePar,QCallBack); qb->reset(); GLA()->log->Logf(GLLogStream::SYSTEM,"Saved Mesh %s in %i msec",qPrintable(fileName),tt.elapsed()); qApp->restoreOverrideCursor(); mod->setFileName(fileName); QSettings settings; int savedMeshCounter=settings()->value("savedMeshCounter",0).toInt(); settings()->setValue("savedMeshCounter",savedMeshCounter+1); GLA()->setWindowModified(false); } return ret; } #endif
[ "shi_yujin@outlook.com" ]
shi_yujin@outlook.com
456d07621c6dd46990a892e884ff509ed73b0070
a480dcee2b8c2852fe10b545dd45053e918a689a
/fboss/agent/state/tests/MirrorTests.cpp
ef0117d6a2ea05b1554452bc5bf63f01c7de7d2f
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
phshaikh/fboss
c6951c3ed535cbbfc2b4851e77a798174746781f
05e6ed1e9d62bf7db45a770886b1761e046c1722
refs/heads/master
2020-03-23T22:48:35.116337
2020-03-21T01:44:12
2020-03-21T02:04:20
142,198,903
1
0
null
2018-07-24T18:39:16
2018-07-24T18:39:15
null
UTF-8
C++
false
false
22,641
cpp
// Copyright 2004-present Facebook. All Rights Reserved. #include "fboss/agent/gen-cpp2/switch_config_constants.h" #include "fboss/agent/hw/mock/MockPlatform.h" #include "fboss/agent/state/Mirror.h" #include "fboss/agent/state/Port.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/test/MirrorConfigs.h" #include "fboss/agent/test/TestUtils.h" #include <folly/IPAddress.h> #include <folly/logging/xlog.h> #include <gtest/gtest.h> namespace facebook::fboss { class MirrorTest : public ::testing::Test { protected: void SetUp() override { config_ = testConfigA(); platform_ = createMockPlatform(); state_ = testState(config_); } void configureAcl(const std::string& name, uint16_t dstL4Port = 1234) { cfg::AclEntry aclEntry; auto aclCount = config_.acls.size() + 1; config_.acls.resize(aclCount); config_.acls[aclCount - 1].name = name; config_.acls[aclCount - 1].actionType = cfg::AclActionType::PERMIT; config_.acls[aclCount - 1].l4DstPort_ref() = dstL4Port; } void configurePortMirror(const std::string& mirror, PortID port) { int portIndex = int(port) - 1; config_.ports[portIndex].ingressMirror_ref() = mirror; config_.ports[portIndex].egressMirror_ref() = mirror; } void configureAclMirror(const std::string& name, const std::string& mirror) { cfg::MatchAction action; action.ingressMirror_ref() = mirror; action.egressMirror_ref() = mirror; cfg::MatchToAction mirrorAction; mirrorAction.matcher = name; mirrorAction.action = action; // Initialize data plane traffic policy only when uninitialized. if (!config_.dataPlaneTrafficPolicy_ref()) { config_.dataPlaneTrafficPolicy_ref() = cfg::TrafficPolicyConfig(); } config_.dataPlaneTrafficPolicy_ref()->matchToAction.push_back(mirrorAction); } void publishWithStateUpdate() { state_ = publishAndApplyConfig(state_, &config_, platform_.get()); ASSERT_NE(state_, nullptr); } void publishWithFbossError() { EXPECT_THROW( publishAndApplyConfig(state_, &config_, platform_.get()), FbossError); } void publishWithNoStateUpdate() { auto newState = publishAndApplyConfig(state_, &config_, platform_.get()); EXPECT_EQ(newState, nullptr); } std::shared_ptr<SwitchState> state_; std::shared_ptr<Platform> platform_; cfg::SwitchConfig config_; static const folly::IPAddress tunnelDestination; static const char* egressPortName; static const PortID egressPort; static const uint8_t dscp; static const TunnelUdpPorts udpPorts; }; const folly::IPAddress MirrorTest::tunnelDestination = folly::IPAddress("10.0.0.1"); const char* MirrorTest::egressPortName = "port5"; const PortID MirrorTest::egressPort = PortID(5); const uint8_t MirrorTest::dscp = 46; const TunnelUdpPorts MirrorTest::udpPorts = {6545, 5343}; TEST_F(MirrorTest, MirrorWithPort) { config_.mirrors.push_back( utility::getSPANMirror("mirror0", MirrorTest::egressPortName)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, cfg::switch_config_constants::DEFAULT_MIRROR_DSCP_); EXPECT_FALSE(mirror->getTunnelUdpPorts().has_value()); } TEST_F(MirrorTest, MirrorWithPortId) { config_.mirrors.push_back( utility::getSPANMirror("mirror0", MirrorTest::egressPort)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, cfg::switch_config_constants::DEFAULT_MIRROR_DSCP_); } TEST_F(MirrorTest, MirrorWithPortIdAndDscp) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, folly::IPAddress("0.0.0.0"), std::nullopt /*src addr*/, MirrorTest::dscp)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, MirrorTest::dscp); EXPECT_FALSE(mirror->getTunnelUdpPorts().has_value()); } TEST_F(MirrorTest, MirrorWithIp) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), false); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), false); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, cfg::switch_config_constants::DEFAULT_MIRROR_DSCP_); } TEST_F(MirrorTest, MirrorWithIpAndDscp) { config_.mirrors.push_back(utility::getGREMirror( "mirror0", MirrorTest::tunnelDestination, std::nullopt /* src addr*/, MirrorTest::dscp)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), false); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), false); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, MirrorTest::dscp); EXPECT_FALSE(mirror->getTunnelUdpPorts().has_value()); } TEST_F(MirrorTest, MirrorWithPortAndIp) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPortName, MirrorTest::tunnelDestination)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, cfg::switch_config_constants::DEFAULT_MIRROR_DSCP_); EXPECT_FALSE(mirror->getTunnelUdpPorts().has_value()); } TEST_F(MirrorTest, MirrorWithPortIdAndIp) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::tunnelDestination)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, cfg::switch_config_constants::DEFAULT_MIRROR_DSCP_); } TEST_F(MirrorTest, MirrorWithPortIdAndIpAndDscp) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::tunnelDestination, std::nullopt /* src addr */, MirrorTest::dscp)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto dscp = mirror->getDscp(); EXPECT_EQ(dscp, MirrorTest::dscp); EXPECT_FALSE(mirror->getTunnelUdpPorts().has_value()); } TEST_F(MirrorTest, MirrorWithPortIdAndIpAndSflowTunnel) { config_.mirrors.push_back(utility::getSFlowMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::udpPorts.udpSrcPort, MirrorTest::udpPorts.udpDstPort, MirrorTest::tunnelDestination, std::nullopt, MirrorTest::dscp)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), true); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), true); EXPECT_EQ(port.value(), egressPort); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror->isResolved(), false); auto udpPorts = mirror->getTunnelUdpPorts(); EXPECT_TRUE(udpPorts.has_value()); EXPECT_EQ(udpPorts.value().udpSrcPort, MirrorTest::udpPorts.udpSrcPort); EXPECT_EQ(udpPorts.value().udpDstPort, MirrorTest::udpPorts.udpDstPort); } TEST_F(MirrorTest, MirrorWithNameNoPortNoIp) { cfg::Mirror mirror0; mirror0.set_name("mirror0"); config_.mirrors.push_back(mirror0); publishWithFbossError(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_EQ(mirror, nullptr); } TEST_F(MirrorTest, MirrorWithNameAndDscpNoPortNoIp) { cfg::Mirror mirror0; mirror0.set_name("mirror0"); config_.mirrors.push_back(mirror0); mirror0.set_dscp(MirrorTest::dscp); publishWithFbossError(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_EQ(mirror, nullptr); } TEST_F(MirrorTest, MirrorWithTunnelNoPortNoIp) { cfg::Mirror mirror0; mirror0.set_name("mirror0"); config_.mirrors.push_back(mirror0); publishWithFbossError(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); } TEST_F(MirrorTest, MirrorWithTruncation) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::tunnelDestination, std::nullopt, MirrorTest::dscp, true)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getTruncate(), true); } TEST_F(MirrorTest, MirrorWithoutTruncation) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::tunnelDestination, std::nullopt, MirrorTest::dscp, false)); publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getTruncate(), false); } TEST_F(MirrorTest, AclMirror) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configureAcl("acl0"); configureAclMirror("acl0", "mirror0"); publishWithStateUpdate(); auto entry = state_->getAcls()->getEntryIf("acl0"); EXPECT_NE(entry, nullptr); auto action = entry->getAclAction(); ASSERT_EQ(action.has_value(), true); auto inMirror = action.value().getIngressMirror(); EXPECT_EQ(inMirror.has_value(), true); EXPECT_EQ(inMirror.value(), "mirror0"); auto egMirror = action.value().getEgressMirror(); EXPECT_EQ(egMirror.has_value(), true); EXPECT_EQ(egMirror.value(), "mirror0"); } TEST_F(MirrorTest, PortMirror) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configurePortMirror("mirror0", PortID(3)); publishWithStateUpdate(); auto port = state_->getPorts()->getPortIf(PortID(3)); EXPECT_NE(port, nullptr); auto inMirror = port->getIngressMirror(); EXPECT_EQ(inMirror.has_value(), true); EXPECT_EQ(inMirror.value(), "mirror0"); auto egMirror = port->getEgressMirror(); EXPECT_EQ(egMirror.has_value(), true); EXPECT_EQ(egMirror.value(), "mirror0"); } TEST_F(MirrorTest, AclWrongMirror) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configureAcl("acl0"); configureAclMirror("acl0", "mirror1"); publishWithFbossError(); } TEST_F(MirrorTest, PortWrongMirror) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configurePortMirror("mirror1", PortID(3)); publishWithFbossError(); } TEST_F(MirrorTest, MirrorWrongPort) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", "port129", MirrorTest::tunnelDestination)); publishWithFbossError(); } TEST_F(MirrorTest, MirrorWrongPortId) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", PortID(129), MirrorTest::tunnelDestination)); publishWithFbossError(); } TEST_F(MirrorTest, NoStateChange) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); cfg::MirrorTunnel tunnel; cfg::GreTunnel greTunnel; greTunnel.ip = MirrorTest::tunnelDestination.str(); tunnel.greTunnel_ref() = greTunnel; config_.mirrors[0].destination.tunnel_ref() = tunnel; publishWithNoStateUpdate(); } TEST_F(MirrorTest, WithStateChange) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); config_.mirrors[0] .destination.tunnel_ref() .value() .greTunnel_ref() .value() .ip = "10.0.0.2"; publishWithStateUpdate(); auto mirror = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_NE(mirror, nullptr); EXPECT_EQ(mirror->getID(), "mirror0"); EXPECT_EQ(mirror->configHasEgressPort(), false); auto port = mirror->getEgressPort(); EXPECT_EQ(port.has_value(), false); auto ip = mirror->getDestinationIp(); EXPECT_EQ(ip.has_value(), true); EXPECT_EQ(ip.value(), folly::IPAddress("10.0.0.2")); EXPECT_EQ(mirror->isResolved(), false); } TEST_F(MirrorTest, AddAclAndPortToMirror) { std::array<std::string, 2> acls{"acl0", "acl1"}; std::array<PortID, 2> ports{PortID(3), PortID(4)}; uint16_t l4port = 1234; config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); for (int i = 0; i < 2; i++) { configureAcl(acls[i], l4port + i); configureAclMirror(acls[i], "mirror0"); configurePortMirror("mirror0", ports[i]); publishWithStateUpdate(); } for (int i = 0; i < 2; i++) { auto entry = state_->getAcls()->getEntryIf(acls[i]); EXPECT_NE(entry, nullptr); auto action = entry->getAclAction(); ASSERT_EQ(action.has_value(), true); auto aclInMirror = action.value().getIngressMirror(); EXPECT_EQ(aclInMirror.has_value(), true); EXPECT_EQ(aclInMirror.value(), "mirror0"); auto aclEgMirror = action.value().getEgressMirror(); EXPECT_EQ(aclEgMirror.has_value(), true); EXPECT_EQ(aclEgMirror.value(), "mirror0"); auto port = state_->getPorts()->getPortIf(ports[i]); EXPECT_NE(port, nullptr); auto portInMirror = port->getIngressMirror(); EXPECT_EQ(portInMirror.has_value(), true); EXPECT_EQ(portInMirror.value(), "mirror0"); } } TEST_F(MirrorTest, DeleleteAclAndPortToMirror) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); std::array<std::string, 2> acls{"acl0", "acl1"}; std::array<PortID, 2> ports{PortID(3), PortID(4)}; uint16_t l4port = 1234; for (int i = 0; i < 2; i++) { configureAcl(acls[i], l4port + i); configureAclMirror(acls[i], "mirror0"); configurePortMirror("mirror0", ports[i]); } publishWithStateUpdate(); auto portIndex = int(PortID(4)) - 1; config_.ports[portIndex].ingressMirror_ref().reset(); config_.ports[portIndex].egressMirror_ref().reset(); config_.acls.pop_back(); config_.dataPlaneTrafficPolicy_ref()->matchToAction.pop_back(); publishWithStateUpdate(); for (int i = 0; i < 2; i++) { auto entry = state_->getAcls()->getEntryIf(acls[i]); if (i) { EXPECT_EQ(entry, nullptr); auto port = state_->getPorts()->getPortIf(ports[i]); EXPECT_NE(port, nullptr); auto portInMirror = port->getIngressMirror(); EXPECT_EQ(portInMirror.has_value(), false); auto portEgMirror = port->getEgressMirror(); EXPECT_EQ(portEgMirror.has_value(), false); } else { EXPECT_NE(entry, nullptr); auto action = entry->getAclAction(); ASSERT_EQ(action.has_value(), true); auto aclInMirror = action.value().getIngressMirror(); EXPECT_EQ(aclInMirror.has_value(), true); EXPECT_EQ(aclInMirror.value(), "mirror0"); auto aclEgMirror = action.value().getEgressMirror(); EXPECT_EQ(aclEgMirror.has_value(), true); EXPECT_EQ(aclEgMirror.value(), "mirror0"); auto port = state_->getPorts()->getPortIf(ports[i]); EXPECT_NE(port, nullptr); auto portInMirror = port->getIngressMirror(); EXPECT_EQ(portInMirror.has_value(), true); EXPECT_EQ(portInMirror.value(), "mirror0"); auto portEgMirror = port->getEgressMirror(); EXPECT_EQ(portEgMirror.has_value(), true); EXPECT_EQ(portEgMirror.value(), "mirror0"); } } } TEST_F(MirrorTest, AclMirrorDelete) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configureAcl("acl0"); configureAclMirror("acl0", "mirror0"); publishWithStateUpdate(); config_.mirrors.pop_back(); publishWithFbossError(); } TEST_F(MirrorTest, PortMirrorDelete) { config_.mirrors.push_back( utility::getGREMirror("mirror0", MirrorTest::tunnelDestination)); publishWithStateUpdate(); configurePortMirror("mirror0", PortID(3)); publishWithStateUpdate(); config_.mirrors.pop_back(); publishWithFbossError(); } TEST_F(MirrorTest, MirrorMirrorEgressPort) { config_.mirrors.push_back(utility::getGREMirrorWithPort( "mirror0", MirrorTest::egressPort, MirrorTest::tunnelDestination)); publishWithStateUpdate(); configurePortMirror("mirror0", MirrorTest::egressPort); publishWithFbossError(); } TEST_F(MirrorTest, ToAndFromDynamic) { config_.mirrors.push_back( utility::getSPANMirror("span", MirrorTest::egressPort)); config_.mirrors.push_back(utility::getGREMirror( "unresolved", MirrorTest::tunnelDestination, folly::IPAddress("10.0.1.10"))); config_.mirrors.push_back(utility::getGREMirror( "resolved", MirrorTest::tunnelDestination, folly::IPAddress("10.0.1.10"))); config_.mirrors.push_back(utility::getGREMirror( "with_dscp", MirrorTest::tunnelDestination, std::nullopt, 3)); config_.mirrors.push_back(utility::getSFlowMirror( "with_tunnel_type", udpPorts.udpSrcPort, udpPorts.udpDstPort, MirrorTest::tunnelDestination, folly::IPAddress("10.0.1.10"), MirrorTest::dscp)); publishWithStateUpdate(); auto span = state_->getMirrors()->getMirrorIf("span"); auto unresolved = state_->getMirrors()->getMirrorIf("unresolved"); auto with_dscp = state_->getMirrors()->getMirrorIf("with_dscp"); auto resolved = state_->getMirrors()->getMirrorIf("resolved"); resolved->setEgressPort(MirrorTest::egressPort); resolved->setMirrorTunnel(MirrorTunnel( folly::IPAddress("1.1.1.1"), folly::IPAddress("2.2.2.2"), folly::MacAddress("1:1:1:1:1:1"), folly::MacAddress("2:2:2:2:2:2"))); auto withTunnelType = state_->getMirrors()->getMirrorIf("with_tunnel_type"); auto reconstructedState = SwitchState::fromFollyDynamic(state_->toFollyDynamic()); EXPECT_EQ( *(reconstructedState->getMirrors()->getMirrorIf("span")), *(state_->getMirrors()->getMirrorIf("span"))); EXPECT_EQ( *(reconstructedState->getMirrors()->getMirrorIf("unresolved")), *(state_->getMirrors()->getMirrorIf("unresolved"))); EXPECT_EQ( *(reconstructedState->getMirrors()->getMirrorIf("resolved")), *(state_->getMirrors()->getMirrorIf("resolved"))); EXPECT_EQ( *(reconstructedState->getMirrors()->getMirrorIf("with_dscp")), *(state_->getMirrors()->getMirrorIf("with_dscp"))); EXPECT_EQ( *(reconstructedState->getMirrors()->getMirrorIf("with_tunnel_type")), *(state_->getMirrors()->getMirrorIf("with_tunnel_type"))); } TEST_F(MirrorTest, GreMirrorWithSrcIP) { config_.mirrors.push_back(utility::getGREMirror( "mirror0", MirrorTest::tunnelDestination, folly::IPAddress("10.0.0.1"), MirrorTest::dscp, true)); publishWithStateUpdate(); auto mirror0 = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_EQ(mirror0->getID(), "mirror0"); EXPECT_EQ(mirror0->getDestinationIp(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror0->getSrcIp(), folly::IPAddress("10.0.0.1")); EXPECT_EQ(mirror0->getDscp(), MirrorTest::dscp); EXPECT_EQ(mirror0->getTruncate(), true); EXPECT_EQ(mirror0->getTunnelUdpPorts(), std::nullopt); } TEST_F(MirrorTest, SflowMirrorWithSrcIP) { config_.mirrors.push_back(utility::getSFlowMirror( "mirror0", 8998, 9889, MirrorTest::tunnelDestination, folly::IPAddress("10.0.0.1"), MirrorTest::dscp, true)); publishWithStateUpdate(); auto mirror0 = state_->getMirrors()->getMirrorIf("mirror0"); EXPECT_EQ(mirror0->getID(), "mirror0"); EXPECT_EQ(mirror0->getDestinationIp(), MirrorTest::tunnelDestination); EXPECT_EQ(mirror0->getSrcIp(), folly::IPAddress("10.0.0.1")); EXPECT_EQ(mirror0->getDscp(), MirrorTest::dscp); EXPECT_EQ(mirror0->getTruncate(), true); EXPECT_TRUE(mirror0->getTunnelUdpPorts().has_value()); EXPECT_EQ(mirror0->getTunnelUdpPorts().value().udpSrcPort, 8998); EXPECT_EQ(mirror0->getTunnelUdpPorts().value().udpDstPort, 9889); } } // namespace facebook::fboss
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
489c92c2b0d3a615a493f2fa04346407d231b15d
c359f42483cf48651cf5b5ef90fae884c8357bb0
/rsaencryption.cpp
27b00babae58950ddd0862a4224e5ac819be6a37
[]
no_license
hammadnadeemx/simpleRSAencryption
6be56116ec6c4d3ffbbe103aebd5929c6313be01
025dfdfddbfbb52c6175120fecb371d486ee05d2
refs/heads/master
2020-03-16T19:51:49.459125
2018-05-10T17:50:22
2018-05-10T17:50:22
132,935,456
0
0
null
null
null
null
UTF-8
C++
false
false
5,048
cpp
#include <iostream> #include <time.h> #include <stdlib.h> using namespace std; class Matrix{ int row,col; float **ptr; public: Matrix(){ row=0; col=0; ptr=NULL; } Matrix(int r, int c){ row=r; col=c; ptr=new float*[row]; for(int i=0;i<row;i++){ *(ptr+i)=new float[col]; } } Matrix(int r, int c,int n){//initialize with random values ranging from 0 to n-1; row=r; col=c; ptr=new float*[row]; for(int i=0;i<row;i++){ *(ptr+i)=new float[col]; } for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(ptr+i)+j)=rand() % n +1; } } } Matrix(const Matrix & inp){ row=inp.row; col=inp.col; ptr=new float*[row]; for(int i=0;i<row;i++){ *(ptr+i)=new float[col]; } for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(ptr+i)+j)=*(*(inp.ptr+i)+j); } } } void set(int i, int j, float val){ *(*(ptr+i)+j)=val; } float get(int i, int j){ return *(*(ptr+i)+j); } Matrix assign(const Matrix & inp){ Matrix *temp; temp=new Matrix(inp.row,inp.col); for(int i=0;i<inp.row;i++){ for(int j=0;j<inp.col;j++){ *(*(temp->ptr+i)+j)=*(*(inp.ptr+i)+j); } } return *temp; } void copy(const Matrix & inp){ if(ptr!=NULL){ for(int i=0;i<row;i++){ delete [] *(ptr+i); } delete [] ptr; } row=inp.row; col=inp.col; ptr=new float*[row]; for(int i=0;i<row;i++){ *(ptr+i)=new float[col]; } for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(ptr+i)+j)=*(*(inp.ptr+i)+j); } } } Matrix add(const Matrix & inp){//adds two Matrices and returns the result if((col==inp.col)&(row==inp.row)){//try assert Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j)+*(*(inp.ptr+i)+j); } } return *temp; } else{ cout<<"the matrices have different dimensions\n"; } } Matrix subtract(const Matrix & inp){//subtracts two Matrices and returns the result if((col==inp.col)&(row==inp.row)){//try assert Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j)-*(*(inp.ptr+i)+j); } } return *temp; } else{ cout<<"the matrices have different dimensions\n"; } } Matrix multiply(const Matrix & inp){//multiplies two Matrices and returns the result if(col==inp.row){//try assert Matrix *temp; float t=0; temp=new Matrix(row,inp.col); for(int i=0;i<row;i++){ //2 for(int j=0;j<inp.col;j++){// 1 for(int q=0;q<col;q++){//3 t+=*(*(ptr+i)+q)**(*(inp.ptr+q)+j); } *(*(temp->ptr+i)+j)+=t; t=0; } } return *temp; } else{ cout<<"the matrices have different dimensions\n"; } } Matrix powern(int n){ if(row==col){ Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j); } } if(n<=1){ temp->modn(10); return *temp; } else { while(n>1){ temp->copy(this->multiply(*temp)); --n; temp->modn(10); } return *temp; } } cout<<"matrix has to be NxN\n"; } Matrix indipower(int n){// try do simple rsa here p-1Xq-1 if(row==col){ Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j); } } if(n<=1){ temp->modn(10); return *temp; } else { while(n>1){ for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)*=*(*(ptr+i)+j); } } --n; } temp->modn(10); return *temp; } } cout<<"matrix has to be NxN\n"; } Matrix add(float val){//assigns a constant to every element Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j)+val; } } return *temp; } Matrix multiply(float val){//multiplies every element with a constant Matrix *temp; temp=new Matrix(row,col); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ *(*(temp->ptr+i)+j)=*(*(ptr+i)+j)*val; } } return *temp; } void display(){ for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ cout<<*(*(ptr+i)+j)<<" "; } cout<<endl; } } void modn(int n){ for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ while(*(*(ptr+i)+j)>=n){ *(*(ptr+i)+j)-=n; } while(*(*(ptr+i)+j)<0){ *(*(ptr+i)+j)+=n; } } } } ~Matrix(){ if(ptr!=NULL){ for(int i=0;i<row;i++){ delete [] *(ptr+i); } delete [] ptr; } } }; int main(){ srand(time(0)); Matrix a(2,2,9),b(2,2),e(2,2);//initialize matrices of 2x2 with random values from 0 to 9 cout<<"Original image\n"; a.display(); b.copy(a.indipower(3)); //b.modn(10); cout<<"Encrypted image\n"; b.display(); e.copy(b.indipower(7)); //e.modn(10); cout<<"Decrypted image\n"; e.display(); //e.copy(b.powern(3)); //e.display(); return 0; }
[ "noreply@github.com" ]
noreply@github.com
e2a29f4ccacd3fe5e73b19ad702cdb19b7c53bb6
1b5e91359815f0b5aa1bab7cd2214cff32ea56e0
/directorio/Main.cpp
9ba8078ad0a126a94bec85d993d3768ec8cb6d27
[]
no_license
AnaPaulaCeballos/Directorios
6f2593d9137d22dbe4824125dc87777a7ce5376f
bd7f2ce4a850a0ad4d8db6525890e7675fa423f9
refs/heads/master
2022-11-27T12:24:19.321932
2020-07-30T01:12:47
2020-07-30T01:12:47
283,395,524
0
0
null
null
null
null
UTF-8
C++
false
false
1,046
cpp
//Este programa solo lee las librerias del directorio #include<iostream> #include<stdlib.h> #include<fstream> #include<dirent.h> //manejo de directorios using namespace std; void init(); void listar(string dir); int main(){ init(); return 0; }//fnmain void init() { string dir; cin >> dir; //getline(cin, dir); listar(dir); return; }//fin init void listar(string dir){ DIR* directorio; struct dirent* elemento; string elem; int size; ofstream archivo; archivo.open("dire.json", ios::out); if (directorio = opendir(dir.c_str())) { //si puedo abrir el directorio while (elemento = readdir(directorio)) //recorres elemento por elemento { elem = elemento->d_name; //size = elemento->d_reclen(); //size=files.st_size; size = 2400; //for demo if (elem != "." && elem != "..") { cout << "nombre " << elem << " size " << size << endl; archivo << "nombre " << elem << " size " << size << endl; }//fn if "." }//fn while }//fn if open archivo.close(); closedir(directorio); return; }//fin dir
[ "68828182+AnaPaulaCeballos@users.noreply.github.com" ]
68828182+AnaPaulaCeballos@users.noreply.github.com
968bb0108e2bd98efc1b4146caaaf6bff85a9e8d
bd51b8626ee07a692964a511228a6cfce694cfbd
/mockmon/include/moves_stats_targeting.h
534a09119f4aad94940a0bea36e9b408179a981c
[]
no_license
BenjaminShinar/FlexingMyCode
937de5e0f71d9c3e79f88e27b4cb35fa71f990a2
d873bd2b0e92ed76c234c2ce7766a6ab400a330e
refs/heads/main
2023-06-11T06:09:34.240872
2021-07-06T14:24:29
2021-07-06T14:24:29
324,566,900
0
0
null
null
null
null
UTF-8
C++
false
false
848
h
#pragma once #include "identifiers/moves_stats_targeting_id.h" #include "identifiers/stats_id.h" #include "interfaces.h" #include <map> namespace mockmon::moves { //which moves target which stats to calculate damage struct MoveStatsTargeting : public IdentifiybleModule<MovesTargeting> { const StatsTypes AttackerStat; const StatsTypes DefenderStat; static const std::map<moves::MovesTargeting, MoveStatsTargeting> AllStatsTargeting; explicit MoveStatsTargeting(moves::MovesTargeting movesTargeting, StatsTypes attackerStat, StatsTypes defenederStat) : IdentifiybleModule(movesTargeting), AttackerStat(attackerStat), DefenderStat(defenederStat) { } }; }
[ "benjaminShinar@gmail.com" ]
benjaminShinar@gmail.com
01c090f9df4b5582e9bfbe533d7bd6bd7b8bebf8
8a81a0e000afc77eca5f1a65615e1dd537a16ea8
/main.cpp
7c82a08831827f422f9da73c369df6e73b015039
[]
no_license
ChaosKaiba/Complex-type-Complex-numbers
bd81ef7a395850068ac828a2ad9c9cf203f4dcc9
3f724648c7d189b11fc9775abd652b01d8d0ca2b
refs/heads/master
2023-05-10T23:35:55.476703
2021-05-31T18:50:42
2021-05-31T18:50:42
372,606,245
0
0
null
null
null
null
UTF-8
C++
false
false
690
cpp
// complexType.cpp : This file contains the 'main' function. Program execution begins and ends there. #include <iostream> #include "complexNumber.h" using namespace std; int main() { complexType num1(23, 34); complexType num2; complexType num3; cout << "Num1 = " << num1 << endl; cout << "Num2 = " << num2 << endl; cout << "Enter the complex number " << "in the form (a, b) "; cin >> num2; cout << endl; cout << "New value of num2 = " << num2 << endl; num3 = num1 + num2; cout << "Num3 = " << num3 << endl; cout << "" << num1 << " + " << num2 << " = " << num1 + num2 << endl; cout << "" << num1 << " * " << num2 << " = " << num1 * num2 << endl; return 0; }
[ "mpho.andrew@outlook.com" ]
mpho.andrew@outlook.com
e7afbf197cd1b42d2ad74e083dda09fe89a92fd6
0e2673ec52773e7937e5c63f78ff4b88e2fade12
/VL03/VL03_Aufgaben/VL03_Aufgaben/A1_Bankkonten_Konto.h
e592e68574f9b9f7e40a1ea9def1ff2d47008f6f
[]
no_license
Patsch36/Cpp-Vorlesung
54580149871b9a5550f99d2ba97bf6d9234ff786
24ff246af7a76097d73b25d6a5dfc5a350fcf082
refs/heads/master
2023-06-03T11:11:41.473390
2021-06-24T09:21:19
2021-06-24T09:21:19
364,869,641
0
0
null
null
null
null
UTF-8
C++
false
false
499
h
#pragma once #include <random> #include <time.h> #include <iostream> #include <string> enum class kontotyp{GIRO, TAGESGELD, BAUSPAR}; class A1_Bankkonten_Konto { protected: int _kontonummer; kontotyp _typ; const int _blz; float _guthaben; float _zinssatz; std::string kontotypToText(); public: A1_Bankkonten_Konto(); A1_Bankkonten_Konto(kontotyp typ, int blz, float startbetrag, float zinssatz); // Werte einlesen void readValues(); // Einzzahlen void addMoney(float betrag); };
[ "scheichpatrick@gmail.com" ]
scheichpatrick@gmail.com
10df69258e9e472659bbcdc7e268d0f057106e32
e95e0335d094e97e19af168db2ed21792ea12e75
/leetcode.com/0052. N-Queens II/52.cpp
94a5af8144b91a113fb89e7bbe433363e2f2bf6d
[]
no_license
franktea/acm
654b36f86b0197713ec2f8776a76d8b5a31a92ab
08d94342a36fd999beb1074b1273824e09d63ff8
refs/heads/master
2021-01-23T16:40:26.660159
2020-12-22T06:07:09
2020-12-22T06:07:09
34,067,744
0
0
null
null
null
null
UTF-8
C++
false
false
1,387
cpp
/* * 52.cpp * * Created on: Sep 6, 2018 * Author: frank */ #include <vector> #include <iostream> using namespace std; // 和51题一样 class Solution { public: int totalNQueens(int n) { if(n <= 0) return 0; result_ = 0; arr_.resize(n); NQueens(0); return result_; } private: void NQueens(int level) { if(level == arr_.size()) { ++result_; return; } for(int i = 0; i < arr_.size(); ++i) { arr_[level] = i; if(! Check(level)) continue; NQueens(level + 1); } } bool Check(int level) // 只用检测竖向和斜向,而且只用对每次新添加的最后一个进行检查,因为前面的肯定都是检查好的 { // 检查竖向 const int col = arr_[level]; // 最后一个 for(int i = 0; i < level; ++i) { if(arr_[i] == col) return false; } // 检查斜向 for(int i = 0; i < level; ++i) { const int dx = col > arr_[i] ? col - arr_[i] : arr_[i] - col; if(dx == level - i) return false; } return true; } private: int result_; vector<int> arr_; // 用一个一维数组来记录递归选择的结果,arr_[i]表示在第i层第arr_[i]个元素摆放了queen }; static int fast = [](){std::ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);return 0;}();
[ "could.net@gmail.com" ]
could.net@gmail.com
60ac19885a51433e9d7c25714083f1dd730d078c
698fb5eebbc949dae58fbd8e3667085cbada0f59
/Workspace/nodemcu_thinkspeak/nodemcu_thinkspeak.ino
e3097776446cbc1b453b1303799c467e102b01a1
[]
no_license
pranavdeep/Arduino_Back_Up
0957db149d464eb1ed587fa113316c353d321c1a
7d8e87fbe1024ed616796d7f098fd12450a089f4
refs/heads/master
2020-04-02T11:06:20.171209
2018-10-23T17:42:14
2018-10-23T17:42:14
154,371,377
0
0
null
null
null
null
UTF-8
C++
false
false
5,569
ino
#include "Wire.h" #include <ESP8266WiFi.h> String apiKey="21IN9SWE46KNABF6"; #define LED D1 #define LED2 D2 //int D1,D2; const char* ssid = "sastry"; const char* password = "cheerful"; const char* server = "api.thingspeak.com"; //const char* host = "api.devicehub.net";//api.devicehub.net int gasSensor=0,air_quality=0;//initialise the value you are going to read //String pubString1,pubString2; WiFiClient client; void setup() { Serial.begin(115200); /* begin serial for debug */ Wire.begin(D1, D2); /* join i2c bus with SDA=D1 and SCL=D2 of NodeMCU */ delay(100); // We start by connecting to a WiFi network Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address of NODEMCU= "); Serial.println(WiFi.localIP()); // idi NodeMCU IP address. // void post(); // this is just defining the function /* //String apiKey = "Your API of thingsspeak"; // Enter your Write API key from ThingSpeak //const char* server = "api.thingspeak.com"; Serial.println("Connecting to "); Serial.println(ssid); WiFi.begin(ssid,pass); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected");*/ } void loop() { //Wire.beginTransmission(8); /* begin with device address 8 */ /*Wire.write("Hello Arduino"); /* sends hello s tring */ // Wire.write(gasSensors); /* sends hello s tring */ // Wire.write(air_quality); /* sends hello s tring */ // Wire.endTransmission(); /* stop transmitting */ Wire.requestFrom(8, 13); /* request & read data of size 13 from slave */ while(Wire.available()) { gasSensor = Wire.read(); gasSensor=gasSensor-48; Serial.print("Gas Sensors="); Serial.println(gasSensor); air_quality= Wire.read(); air_quality=air_quality-48; Serial.print("Air QUALity="); Serial.println(air_quality); if (client.connect(server,80)){ // "184.106.153.149" or api.thingspeak.com { String postStr =apiKey; postStr +="&field1="; postStr += String(air_quality); postStr +="&field2="; postStr += String(gasSensor); postStr += "\r\n\r\n"; client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); /*Serial.print("Air Quality "); Serial.print(air_quality); Serial.print(" gasSensor "); Serial.print(gasSensor);*/ Serial.println(" Send to Thingspeak."); } client.stop(); } Serial.println(); delay(1000); } /*void Post(void) { //this function shall post data from device to the cloud delay(1000); Serial.print("connecting to "); Serial.println(host); // Use WiFiClient class to create TCP connections WiFiClient client; const int httpPort = 80; if (!client.connect(host, httpPort)) { Serial.println("connection failed"); return; } pubString1= "{\"value\": " + String(air_quality) + "}"; String pubString1Length = String(pubString1.length(), DEC); pubString2= "{\"value\": " + String(gasSensor) + "}"; String pubString2Length = String(pubString2.length(), DEC); // We now create a URI for the request Serial.print("Requesting POST: "); // Send request to the server: client.println("POST /v2/project/14397/device/f379e489-14af-4187-96e0-f7eca937f5e3/sensor/dustSensor/data HTTP/1.1"); // Note: replace the ALL CAPS parts above with info from DeviceHub.net. After setting up an account, // add a project, a device (NodeMCU), a sensor (like pH_Sensor), and actuator if you need. After you set // up the project it should show you an API key, device UUID, and of course the sensor name you entered. client.println("Host: api.devicehub.net"); client.print("X-ApiKey: dac0bead-10b4-4b04-8b10-8d3c0e7593e0\r\n"); // Get this from DeviceHub.net client.println("Content-Type: application/json"); client.println("Connection: close"); client.print("Content1-Length: "); client.println(pubString1Length); client.print("Content2-Length: "); client.println(pubString2Length); client.println(); client.print(pubString2); client.println(); delay(500); // Can be changed // Read all the lines of the reply from server and print them to Serial Monitor while (client.available()) { String line = client.readStringUntil('\r'); Serial.print(line); } Serial.println(); Serial.println("closing connection"); }*/
[ "pranavdeep1997@gmail.com" ]
pranavdeep1997@gmail.com
4be7664d4c4817fe2bd9294ca2edd1dfb26ba436
06ea65dac5b89c2b8770fcb5e9e35f7982c2a0a3
/Bezier.h
512b00b7b4f0201c70b5be92247e975d3f945706
[]
no_license
awhelan-school/BSplines
0b51999247554317f05a125fe0fe362a4f1338c8
0af6fa5eea72170e14911094e414f329c504894f
refs/heads/master
2021-08-22T21:52:40.428001
2017-12-01T10:34:41
2017-12-01T10:34:41
112,334,445
1
0
null
null
null
null
UTF-8
C++
false
false
775
h
#ifndef BEZIER_H #define BEZIER_H #include <cmath> #include <list> #include <vector> typedef struct{ float x,y; int ID; }vpt; class Bezier { public: Bezier(); virtual ~Bezier(){}; /*Compute Binomial Coefficients C for a given value of n*/ static void binomial(int n, int *C); static void computeBezPt(float u, vpt *bezPt, int numCtr, std::list<vpt> &ctrPts, int *C); static void bezier(std::list<vpt> &ctrPts, int numCtr, int nBezCurvePts); static void spline(int order, std::vector<float> knots, std::list<vpt> &ctrPts, int numCtr, int CurvePts); static vpt computeSplinePt(int order, std::list<vpt> ctrPts, std::vector<float> knots, float u, int I); static void plotPoint(vpt bezCurvePt); private: }; #endif /* BEZIER_H */
[ "noreply@github.com" ]
noreply@github.com
cede0eb88ed3c94d844511f86c0dfa75dfe5c2d6
e596b9a711ec510385187bd9c10bb90364bcf676
/Vehicle Arduino Code/BLF536/Tester.h
59995702d40cc52008381ac740a589e91000dd78
[]
no_license
sgeddy/AutonomousLaneAssistRobot
5effc9416510b1149420012a147bbe7ef33f280b
5fb5f89e973a8a9c1c99ca4fc321886f88097c79
refs/heads/master
2021-01-22T22:03:01.939806
2017-03-19T19:07:34
2017-03-19T19:07:34
85,501,031
2
0
null
null
null
null
UTF-8
C++
false
false
658
h
/************************************************************** * * Class: Tester * Author: Alper Ender * Description: Holds the class variables and functions for printing and displaying values onto the serial * **************************************************************/ class Tester{ public: // Variables unsigned long timerVal; // Timer value for testing the time it takes to complete a specific task // Functions void Print_Sensor_Values(void); void Print_Line_Values(void); void Print_Total_Error(void); void Start_Timer(void); void Display_Timer(void); // Constructor Tester(); };
[ "noreply@github.com" ]
noreply@github.com
ccda79ed66834174c2ce55c1a977dd4d00d5e3d1
996527f3cd169ef35686cd2d739fd85ad8b0d651
/Hangman/main.cpp
2e285de5119a90ce11b70041502d01990c3b9786
[]
no_license
eeee386/BC-TGP
d1e55dbefebafb25afea2ae2de9969951a5afc39
48bd26719ba4235ebd439587083643fa52afa6ac
refs/heads/master
2022-11-20T16:48:51.545671
2020-07-26T15:48:57
2020-07-26T15:48:57
281,064,896
0
0
null
null
null
null
UTF-8
C++
false
false
3,116
cpp
#include <iostream> #include <vector> #include <cctype> #include <algorithm> using std::cout; using std::cin; using std::endl; using std::vector; using std::string; using std::find; using std::find_if; using std::tolower; void writeMessage(const string &result, const string &guessedLetters, const int &remainingTries) { cout << result << "\n"; cout << "Guessed letters so far: " << guessedLetters << "\n"; cout << "Remaining tries: " << remainingTries << "\n" << endl; } string toLower(string &str) { for (auto &c : str) { c = tolower(c); } return str; }; void hangman() { std::locale loc; string word; int remainingTries = 8; char guess; string placeholder; vector<string> guessedWords; string guessedLetters; string result(word.size(), '_'); cout << "Pick a word: \n"; cin >> word; cout << endl; word = toLower(word); cout << "===================\n"; while (result != word && remainingTries != 0) { writeMessage(result, guessedLetters, remainingTries); cout << "Guess a letter or the word: "; cin >> placeholder; cout << endl; placeholder = toLower(placeholder); if (placeholder.size() != 1) { --remainingTries; guessedWords.emplace_back(placeholder); if (placeholder == word) { result = placeholder; } continue; } guess = placeholder[0]; if (!isalpha(guess)) { cout << "This is not a valid guess!" << endl; continue; } --remainingTries; for (unsigned int i = 0; i < word.size(); i++) { if (word[i] == guess) { result[i] = guess; } } guessedLetters.append(" ").push_back(guess); } writeMessage(result, guessedLetters, remainingTries); if (word == result) { cout << "Congratulations! You guessed the word!" << endl; } else { cout << "Game over! The word was: " << word << endl; } } void gameLibrary() { vector<string> games; vector<string>::const_iterator iter; string answer; string title; while (true){ cout << "Choose: list, add, delete or quit: \n"; cin >> answer; cout << endl; if (answer == "list") { cout << "Listing games: \n\n"; for (iter = games.begin(); iter != games.end(); iter++) { cout << *iter << endl; } } else if(answer == "add") { cout << "\n\nAdd game: "; cin >> title; games.emplace_back(title); } else if (answer == "delete") { cout << "\n\nDelete game: "; cin >> title; iter = find_if(games.begin(), games.end(), [&](const string& i) { return i == title; }); games.erase(iter); } else if(answer == "quit"){ cout << "\n\nGood-bye"; break; } else { cout << "\n\nInvalid input\n\n"; } } } int main() { gameLibrary(); return 0; }
[ "attila.sedon@dpc.hu" ]
attila.sedon@dpc.hu
6556ef66011ae00b88a6acedde5e93ac891e9399
77a091c62781f6aefeebdfd6efd4bab9caa51465
/Done/Sub-reg/2016/H.cpp
7abc74e957a306f36c9b1ebb6602e3ac0effb270
[]
no_license
breno-helf/Maratona
55ab11264f115592e1bcfd6056779a3cf27e44dc
c6970bc554621746cdb9ce53815b8276a4571bb3
refs/heads/master
2021-01-23T21:31:05.267974
2020-05-05T23:25:23
2020-05-05T23:25:23
57,412,343
1
2
null
2017-01-25T14:58:46
2016-04-29T20:54:08
C++
UTF-8
C++
false
false
762
cpp
//This code was made by Breno Moura, Codeforces Handle: Brelf //From University of São Paulo - USP //If you are trying to hack me I wish you can get it, Good Luck :D #include<bits/stdc++.h> using namespace std; #define debug(args...) fprintf(stderr,args) #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; const int MAXN=52; const int INF=0x3f3f3f3f; const ll MOD=1000000007; string a, b, c; int tam; int main() { cin >> a; tam = a.size(); b = c = ""; for(int i = 0; i < tam; i++) if(a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u') b += a[i]; tam = b.size(); for(int i = tam - 1; i >= 0; i--) c += b[i]; if(b == c) puts("S"); else puts("N"); }
[ "breno.moura@hotmail.com" ]
breno.moura@hotmail.com
f5c6d5d72f0786c578950a03234853a5a26745ed
8bd4a8c02f7b7a804e743cd38877811f547bb339
/LeetCode/compareVersionNumbers.cpp
a04140340b011f8850111e386487660478d49282
[ "MIT" ]
permissive
dkp1903/Competitive-Programming
c314257bf3ea7f40d720a60e259f0a0398de94a4
564d1730fb78a6bf0678dd7184a9f8669f53c9bf
refs/heads/master
2021-07-05T22:16:24.747709
2020-04-22T11:29:11
2020-04-22T11:29:11
187,431,446
2
1
MIT
2020-10-02T07:45:38
2019-05-19T03:54:41
C++
UTF-8
C++
false
false
553
cpp
class Solution { public: int compareVersion(string A, string B) { __int128 i = 0, j = 0, sizeA = A.size(), sizeB = B.size(); while(i < sizeA || j < sizeB){ __int128 x = 0, y = 0; while(i < sizeA && A[i] != '.'){ x = x * 10 + (A[i] - '0'); i++; } while(j < sizeB && B[j] != '.'){ y = y * 10 + (B[j] - '0'); j++; } if(x > y) return 1; if(x < y) return -1; i++; j++; } return 0; } };
[ "thedevelopersanjeev@gmail.com" ]
thedevelopersanjeev@gmail.com
951c139fa9d18930bc433bd73fe576d0a6fd0829
82b0359d173500545bb8ce77a385c501d78d825b
/gen-cpp/WebService.h
0f58d055524f96bab14457255bc0fb14ce09a35c
[]
no_license
florianalexanderscholz/rauter
03d79104d23d8e9e4d2885a0d8a00bb1f6612965
5bb8c833f1faa633cf4cd5ae56340d9d2f5091ca
refs/heads/master
2020-05-04T19:44:56.395613
2018-03-09T17:29:15
2018-03-09T17:29:15
28,778,463
1
0
null
null
null
null
UTF-8
C++
false
true
11,689
h
/** * Autogenerated by Thrift Compiler (0.9.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #ifndef WebService_H #define WebService_H #include <thrift/TDispatchProcessor.h> #include "service_types.h" namespace ws { class WebServiceIf { public: virtual ~WebServiceIf() {} virtual int64_t findNode(const std::string& street, const std::string& postal) = 0; virtual void calcShortestWay(std::vector<Coordinate> & _return, const std::string& algorithm, const int64_t startNode, const int64_t endNode) = 0; }; class WebServiceIfFactory { public: typedef WebServiceIf Handler; virtual ~WebServiceIfFactory() {} virtual WebServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; virtual void releaseHandler(WebServiceIf* /* handler */) = 0; }; class WebServiceIfSingletonFactory : virtual public WebServiceIfFactory { public: WebServiceIfSingletonFactory(const boost::shared_ptr<WebServiceIf>& iface) : iface_(iface) {} virtual ~WebServiceIfSingletonFactory() {} virtual WebServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { return iface_.get(); } virtual void releaseHandler(WebServiceIf* /* handler */) {} protected: boost::shared_ptr<WebServiceIf> iface_; }; class WebServiceNull : virtual public WebServiceIf { public: virtual ~WebServiceNull() {} int64_t findNode(const std::string& /* street */, const std::string& /* postal */) { int64_t _return = 0; return _return; } void calcShortestWay(std::vector<Coordinate> & /* _return */, const std::string& /* algorithm */, const int64_t /* startNode */, const int64_t /* endNode */) { return; } }; typedef struct _WebService_findNode_args__isset { _WebService_findNode_args__isset() : street(false), postal(false) {} bool street; bool postal; } _WebService_findNode_args__isset; class WebService_findNode_args { public: WebService_findNode_args() : street(), postal() { } virtual ~WebService_findNode_args() throw() {} std::string street; std::string postal; _WebService_findNode_args__isset __isset; void __set_street(const std::string& val) { street = val; } void __set_postal(const std::string& val) { postal = val; } bool operator == (const WebService_findNode_args & rhs) const { if (!(street == rhs.street)) return false; if (!(postal == rhs.postal)) return false; return true; } bool operator != (const WebService_findNode_args &rhs) const { return !(*this == rhs); } bool operator < (const WebService_findNode_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; class WebService_findNode_pargs { public: virtual ~WebService_findNode_pargs() throw() {} const std::string* street; const std::string* postal; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; typedef struct _WebService_findNode_result__isset { _WebService_findNode_result__isset() : success(false), ouch(false) {} bool success; bool ouch; } _WebService_findNode_result__isset; class WebService_findNode_result { public: WebService_findNode_result() : success(0) { } virtual ~WebService_findNode_result() throw() {} int64_t success; WebServiceException ouch; _WebService_findNode_result__isset __isset; void __set_success(const int64_t val) { success = val; } void __set_ouch(const WebServiceException& val) { ouch = val; } bool operator == (const WebService_findNode_result & rhs) const { if (!(success == rhs.success)) return false; if (!(ouch == rhs.ouch)) return false; return true; } bool operator != (const WebService_findNode_result &rhs) const { return !(*this == rhs); } bool operator < (const WebService_findNode_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; typedef struct _WebService_findNode_presult__isset { _WebService_findNode_presult__isset() : success(false), ouch(false) {} bool success; bool ouch; } _WebService_findNode_presult__isset; class WebService_findNode_presult { public: virtual ~WebService_findNode_presult() throw() {} int64_t* success; WebServiceException ouch; _WebService_findNode_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; typedef struct _WebService_calcShortestWay_args__isset { _WebService_calcShortestWay_args__isset() : algorithm(false), startNode(false), endNode(false) {} bool algorithm; bool startNode; bool endNode; } _WebService_calcShortestWay_args__isset; class WebService_calcShortestWay_args { public: WebService_calcShortestWay_args() : algorithm(), startNode(0), endNode(0) { } virtual ~WebService_calcShortestWay_args() throw() {} std::string algorithm; int64_t startNode; int64_t endNode; _WebService_calcShortestWay_args__isset __isset; void __set_algorithm(const std::string& val) { algorithm = val; } void __set_startNode(const int64_t val) { startNode = val; } void __set_endNode(const int64_t val) { endNode = val; } bool operator == (const WebService_calcShortestWay_args & rhs) const { if (!(algorithm == rhs.algorithm)) return false; if (!(startNode == rhs.startNode)) return false; if (!(endNode == rhs.endNode)) return false; return true; } bool operator != (const WebService_calcShortestWay_args &rhs) const { return !(*this == rhs); } bool operator < (const WebService_calcShortestWay_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; class WebService_calcShortestWay_pargs { public: virtual ~WebService_calcShortestWay_pargs() throw() {} const std::string* algorithm; const int64_t* startNode; const int64_t* endNode; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; typedef struct _WebService_calcShortestWay_result__isset { _WebService_calcShortestWay_result__isset() : success(false) {} bool success; } _WebService_calcShortestWay_result__isset; class WebService_calcShortestWay_result { public: WebService_calcShortestWay_result() { } virtual ~WebService_calcShortestWay_result() throw() {} std::vector<Coordinate> success; _WebService_calcShortestWay_result__isset __isset; void __set_success(const std::vector<Coordinate> & val) { success = val; } bool operator == (const WebService_calcShortestWay_result & rhs) const { if (!(success == rhs.success)) return false; return true; } bool operator != (const WebService_calcShortestWay_result &rhs) const { return !(*this == rhs); } bool operator < (const WebService_calcShortestWay_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; typedef struct _WebService_calcShortestWay_presult__isset { _WebService_calcShortestWay_presult__isset() : success(false) {} bool success; } _WebService_calcShortestWay_presult__isset; class WebService_calcShortestWay_presult { public: virtual ~WebService_calcShortestWay_presult() throw() {} std::vector<Coordinate> * success; _WebService_calcShortestWay_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; class WebServiceClient : virtual public WebServiceIf { public: WebServiceClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : piprot_(prot), poprot_(prot) { iprot_ = prot.get(); oprot_ = prot.get(); } WebServiceClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : piprot_(iprot), poprot_(oprot) { iprot_ = iprot.get(); oprot_ = oprot.get(); } boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } int64_t findNode(const std::string& street, const std::string& postal); void send_findNode(const std::string& street, const std::string& postal); int64_t recv_findNode(); void calcShortestWay(std::vector<Coordinate> & _return, const std::string& algorithm, const int64_t startNode, const int64_t endNode); void send_calcShortestWay(const std::string& algorithm, const int64_t startNode, const int64_t endNode); void recv_calcShortestWay(std::vector<Coordinate> & _return); protected: boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; ::apache::thrift::protocol::TProtocol* iprot_; ::apache::thrift::protocol::TProtocol* oprot_; }; class WebServiceProcessor : public ::apache::thrift::TDispatchProcessor { protected: boost::shared_ptr<WebServiceIf> iface_; virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); private: typedef void (WebServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); typedef std::map<std::string, ProcessFunction> ProcessMap; ProcessMap processMap_; void process_findNode(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_calcShortestWay(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: WebServiceProcessor(boost::shared_ptr<WebServiceIf> iface) : iface_(iface) { processMap_["findNode"] = &WebServiceProcessor::process_findNode; processMap_["calcShortestWay"] = &WebServiceProcessor::process_calcShortestWay; } virtual ~WebServiceProcessor() {} }; class WebServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { public: WebServiceProcessorFactory(const ::boost::shared_ptr< WebServiceIfFactory >& handlerFactory) : handlerFactory_(handlerFactory) {} ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); protected: ::boost::shared_ptr< WebServiceIfFactory > handlerFactory_; }; class WebServiceMultiface : virtual public WebServiceIf { public: WebServiceMultiface(std::vector<boost::shared_ptr<WebServiceIf> >& ifaces) : ifaces_(ifaces) { } virtual ~WebServiceMultiface() {} protected: std::vector<boost::shared_ptr<WebServiceIf> > ifaces_; WebServiceMultiface() {} void add(boost::shared_ptr<WebServiceIf> iface) { ifaces_.push_back(iface); } public: int64_t findNode(const std::string& street, const std::string& postal) { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { ifaces_[i]->findNode(street, postal); } return ifaces_[i]->findNode(street, postal); } void calcShortestWay(std::vector<Coordinate> & _return, const std::string& algorithm, const int64_t startNode, const int64_t endNode) { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { ifaces_[i]->calcShortestWay(_return, algorithm, startNode, endNode); } ifaces_[i]->calcShortestWay(_return, algorithm, startNode, endNode); return; } }; } // namespace #endif
[ "fscholz@localhost.localdomain" ]
fscholz@localhost.localdomain
ee22b63467a7186e8bdda6ae1602e75614d0e3b0
51928337483095b12f046eda9ea17ba0b1a81fc0
/3rdparty/cppwinrt/10.0.15063.0/winrt/internal/Windows.Web.Http.Filters.0.h
5632efdadf8a257d753a3864f5e33ab1288f86e2
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
kingofthebongo2008/geometry_images
8592aa99e53a16821725a2564313eeafb0462362
53109f9bc9ea19d0f119f0fe71762248d5038213
refs/heads/master
2021-01-19T03:02:56.996122
2017-07-06T13:25:47
2017-07-06T13:25:47
87,302,727
0
0
null
null
null
null
UTF-8
C++
false
false
1,712
h
// C++ for the Windows Runtime v1.0.170331.7 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::Web::Http::Filters { struct IHttpBaseProtocolFilter; struct IHttpBaseProtocolFilter2; struct IHttpBaseProtocolFilter3; struct IHttpBaseProtocolFilter4; struct IHttpCacheControl; struct IHttpFilter; struct IHttpServerCustomValidationRequestedEventArgs; struct HttpBaseProtocolFilter; struct HttpCacheControl; struct HttpServerCustomValidationRequestedEventArgs; } namespace Windows::Web::Http::Filters { struct IHttpBaseProtocolFilter; struct IHttpBaseProtocolFilter2; struct IHttpBaseProtocolFilter3; struct IHttpBaseProtocolFilter4; struct IHttpCacheControl; struct IHttpFilter; struct IHttpServerCustomValidationRequestedEventArgs; struct HttpBaseProtocolFilter; struct HttpCacheControl; struct HttpServerCustomValidationRequestedEventArgs; } namespace Windows::Web::Http::Filters { template <typename T> struct impl_IHttpBaseProtocolFilter; template <typename T> struct impl_IHttpBaseProtocolFilter2; template <typename T> struct impl_IHttpBaseProtocolFilter3; template <typename T> struct impl_IHttpBaseProtocolFilter4; template <typename T> struct impl_IHttpCacheControl; template <typename T> struct impl_IHttpFilter; template <typename T> struct impl_IHttpServerCustomValidationRequestedEventArgs; } namespace Windows::Web::Http::Filters { enum class HttpCacheReadBehavior { Default = 0, MostRecent = 1, OnlyFromCache = 2, NoCache = 3, }; enum class HttpCacheWriteBehavior { Default = 0, NoCache = 1, }; enum class HttpCookieUsageBehavior { Default = 0, NoCookies = 1, }; } }
[ "stefan.dyulgerov@gmail.com" ]
stefan.dyulgerov@gmail.com
837f77bdb7b8a926b46fa073ea48a8318a2fb848
175923bbbdb639ad1251ef84f8bf12aba10e02c1
/src/surfaces/plane.cc
c1e6a42462a49ea9eb23c7cd3a54195b70cc0446
[]
no_license
LeptusHe/raytracer
ee6f1eaee3216a1f6110ff3da2055979106306e9
5ccf225abce9911af63e2bc97f54429cbb84fc3a
refs/heads/master
2021-06-08T18:52:34.692465
2016-12-08T13:32:29
2016-12-08T13:32:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,126
cc
#include "surfaces/plane.h" #include "core/ray.h" #include "geometry/geometry.h" namespace leptus { Plane::Plane(const Point3f& p, const Normal3f& n, const Color& color /* = BLACK */) : Surface(color), p_(p), n_(Normalize(n)) {} Plane::Plane(const Point3f& p, const Normal3f& n, const MaterialPtr& material) : Surface(material), p_(p), n_(Normalize(n)) {} Point3f Plane::GetLocalHitPoint(const Point3f& p_hit) const { return Point3f(0, 0, 0); } BoundingBoxPtr Plane::GetBoundingBox( ) const { return std::make_shared<BoundingBox>(Point3f( ), Point3f( )); } bool Plane::Hit(const Ray& ray, Float& t_hit, HitRecord& hit_rec) const { Float t = Dot(p_ - ray.orig_, n_) / Dot(ray.dir_, n_); if (t > EPSILON) { t_hit = t; hit_rec.n_hit_ = n_; hit_rec.p_hit_ = ray.orig_ + ray.dir_ * t; hit_rec.local_p_hit_ = GetLocalHitPoint(hit_rec.p_hit_); return true; } return false; } bool Plane::ShadowHit(const Ray& ray, Float& t_hit) const { Float t = Dot(p_ - ray.orig_, n_) / Dot(ray.dir_, n_); if (t > EPSILON) { t_hit = t; return true; } return false; } } // namespace leptus
[ "heweidong526@gmail.com" ]
heweidong526@gmail.com
5cf77721b0e076395b7b98716a9143ae0de46339
7e3c474bcb4daf3f651115b0dcf3ef7a86643186
/scripts/da_loot.h
d5d33510a2baa4d388da8059bd4867191ae0c15a
[ "Apache-2.0", "GPL-2.0-only" ]
permissive
TheUnstoppable/RenSharp
0b5930722378fe0d1e6a814f5f7c226ed938a77f
2a123c6018c18f3fc73501737d600e291ac3afa7
refs/heads/master
2022-12-22T08:16:33.958177
2020-09-30T08:58:04
2020-09-30T08:58:04
299,528,055
1
0
Apache-2.0
2020-09-29T06:44:26
2020-09-29T06:44:26
null
UTF-8
C++
false
false
6,438
h
/* Renegade Scripts.dll Dragonade Loot Game Feature Copyright 2017 Whitedragon, Tiberian Technologies This file is part of the Renegade scripts.dll The Renegade scripts.dll 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, or (at your option) any later version. See the file COPYING for more details. In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence. Only the source code to the module(s) containing the licenced code has to be released. */ #ifndef INCLUDE_DALOOT #define INCLUDE_DALOOT #include "da_event.h" #include "da_gamefeature.h" #include "da_gameobj.h" #include "da_player.h" #include "HashTemplateClass.h" class DA_API DALootPlayerDataClass : public DAPlayerDataClass { public: void Clear_Level() { Clear_Weapons(); } void Add_Weapon(WeaponClass *Weapon); void Add_Weapon(const WeaponDefinitionClass *Weapon); void Remove_Weapon(WeaponClass *Weapon); void Remove_Weapon(const WeaponDefinitionClass *Weapon); bool Has_Weapon(WeaponClass *Weapon); bool Has_Weapon(const WeaponDefinitionClass *Weapon); void Clear_Weapons() { Locker.Delete_All(); } inline int Get_Weapon_Count() { return Locker.Count(); } DynamicVectorClass<const WeaponDefinitionClass*> Locker; }; class DA_API DALootPowerUpClass : public DAGameObjObserverClass { public: DALootPowerUpClass() { Dropper = 0; } DALootPowerUpClass(SoldierGameObj *Soldier) { Dropper = Soldier->Get_Player(); } void Set_Expire_Time(float Time); void Init_Damagers(float Range,float ExpireTime); void Init_Damagers(float Range,float ExpireTime,SoldierGameObj *Soldier); void Add_Damager(cPlayer *Player); inline cPlayer *Get_Dropper() { return Dropper; } virtual ~DALootPowerUpClass(); protected: virtual bool PowerUp_Grant_Request(cPlayer *Player); virtual void PowerUp_Grant(cPlayer *Player); virtual void Timer_Expired(GameObject *obj,int Number); void Create_Icon(); void Set_Icon(const WeaponDefinitionClass *Weapon); void Destroy_Icon(); virtual const char *Get_Name() { return "DALootPowerUpClass"; } DynamicVectorClass<cPlayer*> Damagers; cPlayer *Dropper; ReferencerClass Icon; }; class DA_API DALootBackpackClass : public DALootPowerUpClass { public: DALootBackpackClass() : DALootPowerUpClass() { } DALootBackpackClass(SoldierGameObj *Soldier) : DALootPowerUpClass(Soldier) { } void Add_Weapon(const WeaponDefinitionClass *Weapon,int Rounds); inline int Get_Weapon_Count() { return Weapons.Count(); } private: struct WeaponStruct { bool operator==(const WeaponStruct &That) { return Weapon == That.Weapon; } bool operator!=(const WeaponStruct &That) { return Weapon != That.Weapon; } const WeaponDefinitionClass *Weapon; int Rounds; }; virtual void Init(); virtual void PowerUp_Grant(cPlayer *Player); virtual void Timer_Expired(GameObject *obj,int Number); virtual const char *Get_Name() { return "DALootBackpackClass"; } DynamicVectorClass<WeaponStruct> Weapons; Vector3 LastPos; int IconIndex; }; class DA_API DALootDNAClass : public DALootPowerUpClass { public: DALootDNAClass(const SoldierGameObjDef *Char) : DALootPowerUpClass() { Character = Char; } DALootDNAClass(SoldierGameObj *Soldier) : DALootPowerUpClass(Soldier) { Character = &Soldier->Get_Definition(); } private: DALootDNAClass(); virtual void Init(); virtual bool PowerUp_Grant_Request(cPlayer *Player); virtual void PowerUp_Grant(cPlayer *Player); virtual void Timer_Expired(GameObject *obj,int Number); virtual const char *Get_Name() { return "DALootDNAClass"; } const SoldierGameObjDef *Character; Vector3 LastPos; }; class DA_API DALootGameFeatureClass : public DAEventClass, public DAGameFeatureClass, public DAPlayerDataManagerClass<DALootPlayerDataClass> { public: const PowerUpGameObjDef *Get_Character_PowerUp_Drop(SoldierGameObj *Soldier); const PowerUpGameObjDef *Get_Character_PowerUp_Drop(const SoldierGameObjDef *Soldier); DALootPowerUpClass *Create_PowerUp(SoldierGameObj *Soldier); DALootPowerUpClass *Create_PowerUp(const Vector3 &Position,const SoldierGameObjDef *Soldier); const WeaponDefinitionClass *Get_Character_Weapon_Drop(SoldierGameObj *Soldier); const WeaponDefinitionClass *Get_Character_Weapon_Drop(const SoldierGameObjDef *Soldier); bool Is_Droppable(WeaponClass *Weapon); bool Is_Droppable(const WeaponDefinitionClass *Weapon); DALootBackpackClass *Create_Backpack(SoldierGameObj *Soldier); DALootBackpackClass *Create_Backpack(const Vector3 &Position); DALootDNAClass *Create_DNA(SoldierGameObj *Soldier); DALootDNAClass *Create_DNA(const Vector3 &Position,const SoldierGameObjDef *Soldier); private: virtual void Init(); virtual void Settings_Loaded_Event(); virtual void Object_Created_Event(GameObject *obj); virtual void Object_Destroyed_Event(GameObject *obj); virtual void Add_Weapon_Event(cPlayer *Player,WeaponClass *Weapon); virtual void Remove_Weapon_Event(cPlayer *Player,WeaponClass *Weapon); virtual void Clear_Weapons_Event(cPlayer *Player); bool Drop_Chat_Command(cPlayer *Player,const DATokenClass &Text,TextMessageEnum ChatType); struct DropOddsStruct { int Total; int PowerUp; int Weapon; int DNA; }; PowerUpGameObjDef *BasePowerUpDef; //Main settings float ExpireTime; float DropCommandExpireTime; float DamagersOnlyTime; float DamagersOnlyDistance; DropOddsStruct DropOdds; HashTemplateClass<unsigned int,DropOddsStruct> CharacterDropOdds; //SoldierGameObjDef*,DropOddsStruct //PowerUp settings DynamicVectorClass<const PowerUpGameObjDef*> DefaultPowerUps; HashTemplateClass<unsigned int,DynamicVectorClass<const PowerUpGameObjDef*>> CharacterPowerUps; //SoldierGameObjDef*,DynamicVectorClass<const PowerUpGameObjDef*> //Weapon settings StringClass WeaponModel; DynamicVectorClass<const WeaponDefinitionClass*> UndroppableWeapons; HashTemplateClass<unsigned int,const WeaponDefinitionClass*> CharacterWeapons; //SoldierGameObjDef*,WeaponDefinitionClass* bool EnableMultiWeaponDrop; //DNA settings StringClass DNAModel; }; extern DA_API DAGameFeatureRegistrant<DALootGameFeatureClass> DALootGameFeatureClassRegistrant; #define DALootGameFeature ((DALootGameFeatureClass*)DALootGameFeatureClassRegistrant.Get_Instance()) #endif
[ "guidoknapen@gmail.com" ]
guidoknapen@gmail.com
87c76e720f395683988c96b1bc9d0f3f8c14673a
047d905caa94c4db56484f940863733fba7353c2
/Rosliny.h
61083df4d14d286590a4083179a527d1b271e949
[]
no_license
OskarKow/CppProjectVirtualWorld
5ee083035426309bd41793637164b2f56c9243de
2a9ae8ba6e26a5358f44ddb0e8890bdcf5e21142
refs/heads/master
2021-01-20T02:27:31.026098
2017-04-25T21:27:33
2017-04-25T21:27:33
89,407,983
0
0
null
null
null
null
UTF-8
C++
false
false
1,377
h
#pragma once #include "Organizm.h" #include <string> #define SZANSA_ZASIANIA 3 //[%] namespace plant { class Roslina : public organism::Organizm { public: void rozprzestrzeniajSie(world::Swiat* swiat); virtual void walcz(world::Swiat* swiat, organism::Organizm* napastnik); }; class Trawa : public Roslina { public: Trawa(int x, int y); Trawa(COORD aktualne, COORD poprzednie, int sila, int wiek); ~Trawa(); void akcja(world::Swiat* swiat); std::string typJakoString() { return "Trawa"; } }; class Mlecz : public Roslina { public: Mlecz(int x, int y); Mlecz(COORD aktualne, COORD poprzednie, int sila, int wiek); ~Mlecz(); void akcja(world::Swiat* swiat); std::string typJakoString() { return "Mlecz"; } }; class Guarana : public Roslina { public: Guarana(int x, int y); Guarana(COORD aktualne, COORD poprzednie, int sila, int wiek); ~Guarana(); void walcz(world::Swiat* swiat, organism::Organizm* napastnik); void akcja(world::Swiat* swiat); std::string typJakoString() { return "Guarana"; } }; class WilczeJagody : public Roslina { public: WilczeJagody(int x, int y); WilczeJagody(COORD aktualne, COORD poprzednie, int sila, int wiek); ~WilczeJagody(); void akcja(world::Swiat* swiat); void walcz(world::Swiat* swiat, organism::Organizm* napastnik); std::string typJakoString() { return "Jagody"; } }; }
[ "oskar.kow123@gmail.com" ]
oskar.kow123@gmail.com
c7f00f7dec5803a8479b48fd1f367946575cf505
94f9d3863c93f4a990ab87d4933e0498ed3e2ba1
/Embarcadero/OpenGL/MD3 reader/Classes/QR_Base/QR_Types/QR_Types.h
bdf6c491ded03eff57db3cf501770f1a4788f890
[ "MIT" ]
permissive
Jeanmilost/Demos
6401d7af4612e6a6a06b070a5e951457c1cdc069
3300e056e88506757f3185ba94d6b2ac3da344af
refs/heads/master
2023-01-28T19:51:05.670586
2023-01-09T16:20:48
2023-01-09T16:20:48
156,447,978
1
1
null
null
null
null
UTF-8
C++
false
false
2,122
h
/****************************************************************************** * ==> QR_Types --------------------------------------------------------------* ****************************************************************************** * Description : QR engine basic types * * Developer : Jean-Milost Reymond * ******************************************************************************/ #ifndef QR_TypesH #define QR_TypesH // std #include <cstddef> #include <stdint.h> #include <vector> //------------------------------------------------------------------------------ // Global macros //------------------------------------------------------------------------------ #define M_Precision QR_Float // real numbers precision, can be e.g. float or double #define M_Epsilon 1.0E-3 // epsilon value used for tolerance //------------------------------------------------------------------------------ // used cross-platform types typedef bool QR_Bool; typedef float QR_Float; typedef double QR_Double; typedef std::size_t QR_SizeT; #ifdef __CODEGEARC__ typedef std::intptr_t QR_IntPtrT; typedef std::uintptr_t QR_UIntPtrT; #else typedef intptr_t QR_IntPtrT; typedef uintptr_t QR_UIntPtrT; #endif // c++98 dependent types typedef char QR_Int8; typedef unsigned char QR_UInt8; typedef short QR_Int16; typedef unsigned short QR_UInt16; typedef int QR_Int32; typedef unsigned QR_UInt32; typedef long long QR_Int64; typedef unsigned long long QR_UInt64; // used cross-platform types for texts typedef char QR_Char; typedef wchar_t QR_WChar; // used cross-platform types for buffers typedef QR_UIntPtrT QR_BufferSizeType; typedef QR_IntPtrT QR_BufferOffsetType; typedef QR_UInt8 QR_BufferDataType; // used cross-platform types for GUID (when based on pointer system) typedef QR_UIntPtrT QR_GUIDType; typedef std::vector<QR_GUIDType> QR_GUIDList; #endif // QR_TypesH
[ "jean_milost@hotmail.com" ]
jean_milost@hotmail.com
baa5ea3b4cfd7ae76243309da74cfd33bc44f8b4
2ba94892764a44d9c07f0f549f79f9f9dc272151
/Engine/Source/Editor/LandscapeEditor/Private/LandscapeEditorDetailCustomization_ResizeLandscape.cpp
2b698424805cc74514a5077bd06d4a92948d1ea3
[ "BSD-2-Clause", "LicenseRef-scancode-proprietary-license" ]
permissive
PopCap/GameIdea
934769eeb91f9637f5bf205d88b13ff1fc9ae8fd
201e1df50b2bc99afc079ce326aa0a44b178a391
refs/heads/master
2021-01-25T00:11:38.709772
2018-09-11T03:38:56
2018-09-11T03:38:56
37,818,708
0
0
BSD-2-Clause
2018-09-11T03:39:05
2015-06-21T17:36:44
null
UTF-8
C++
false
false
18,523
cpp
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "LandscapeEditorPrivatePCH.h" #include "LandscapeEdMode.h" #include "LandscapeEditorCommands.h" #include "LandscapeEditorObject.h" #include "LandscapeEditorDetails.h" #include "LandscapeEditorDetailCustomizations.h" #include "DetailLayoutBuilder.h" #include "DetailCategoryBuilder.h" #include "IDetailPropertyRow.h" #include "DetailWidgetRow.h" #include "IDetailGroup.h" #include "PropertyHandle.h" #include "PropertyCustomizationHelpers.h" #include "SLandscapeEditor.h" #include "DlgPickAssetPath.h" #include "SVectorInputBox.h" #include "SRotatorInputBox.h" #include "PackageTools.h" //#include "ObjectTools.h" #include "ScopedTransaction.h" #include "DesktopPlatformModule.h" #include "MainFrame.h" #include "AssetRegistryModule.h" #define LOCTEXT_NAMESPACE "LandscapeEditor.ResizeLandscape" const int32 FLandscapeEditorDetailCustomization_ResizeLandscape::SectionSizes[] = {7, 15, 31, 63, 127, 255}; const int32 FLandscapeEditorDetailCustomization_ResizeLandscape::NumSections[] = {1, 2}; TSharedRef<IDetailCustomization> FLandscapeEditorDetailCustomization_ResizeLandscape::MakeInstance() { return MakeShareable(new FLandscapeEditorDetailCustomization_ResizeLandscape); } BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION void FLandscapeEditorDetailCustomization_ResizeLandscape::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) { if (!IsToolActive("ResizeLandscape")) { return; } IDetailCategoryBuilder& ResizeLandscapeCategory = DetailBuilder.EditCategory("Change Component Size"); ResizeLandscapeCategory.AddCustomRow(LOCTEXT("OriginalNewLabel", "Original New")) //.NameContent() //[ //] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SBox) .VAlign(VAlign_Center) .Padding(FMargin(0,8,12,2)) // Line up with the other properties due to having no reset to default button [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text(LOCTEXT("Original", "Original")) .ToolTipText(LOCTEXT("Original_Tip", "The properties of the landscape as it currently exists")) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text(LOCTEXT("New", "New")) .ToolTipText(LOCTEXT("New_Tip", "The properties the landscape will have after the resize operation is completed")) ] ] ]; TSharedRef<IPropertyHandle> PropertyHandle_QuadsPerSection = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, ResizeLandscape_QuadsPerSection)); ResizeLandscapeCategory.AddProperty(PropertyHandle_QuadsPerSection) .OverrideResetToDefault(TAttribute<bool>::Create(TAttribute<bool>::FGetter::CreateStatic(&FLandscapeEditorDetailCustomization_ResizeLandscape::IsSectionSizeResetToDefaultVisible)), FSimpleDelegate::CreateStatic(&FLandscapeEditorDetailCustomization_ResizeLandscape::OnSectionSizeResetToDefault)) .CustomWidget() .NameContent() [ PropertyHandle_QuadsPerSection->CreatePropertyNameWidget() ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetOriginalSectionSize) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(SComboButton) .OnGetMenuContent_Static(&GetSectionSizeMenu, PropertyHandle_QuadsPerSection) .ContentPadding(2) .ButtonContent() [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetSectionSize, PropertyHandle_QuadsPerSection) ] ] ]; TSharedRef<IPropertyHandle> PropertyHandle_SectionsPerComponent = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, ResizeLandscape_SectionsPerComponent)); ResizeLandscapeCategory.AddProperty(PropertyHandle_SectionsPerComponent) .OverrideResetToDefault(TAttribute<bool>::Create(TAttribute<bool>::FGetter::CreateStatic(&FLandscapeEditorDetailCustomization_ResizeLandscape::IsSectionsPerComponentResetToDefaultVisible)), FSimpleDelegate::CreateStatic(&FLandscapeEditorDetailCustomization_ResizeLandscape::OnSectionsPerComponentResetToDefault)) .CustomWidget() .NameContent() [ PropertyHandle_SectionsPerComponent->CreatePropertyNameWidget() ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetOriginalSectionsPerComponent) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(SComboButton) .OnGetMenuContent_Static(&GetSectionsPerComponentMenu, PropertyHandle_SectionsPerComponent) .ContentPadding(2) .ButtonContent() [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetSectionsPerComponent, PropertyHandle_SectionsPerComponent) ] ] ]; TSharedRef<IPropertyHandle> PropertyHandle_ConvertMode = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, ResizeLandscape_ConvertMode)); ResizeLandscapeCategory.AddProperty(PropertyHandle_ConvertMode) .CustomWidget() .NameContent() [ PropertyHandle_ConvertMode->CreatePropertyNameWidget() ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ PropertyHandle_ConvertMode->CreatePropertyValueWidget() ]; TSharedRef<IPropertyHandle> PropertyHandle_ComponentCount = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, ResizeLandscape_ComponentCount)); TSharedRef<IPropertyHandle> PropertyHandle_ComponentCount_X = PropertyHandle_ComponentCount->GetChildHandle("X").ToSharedRef(); TSharedRef<IPropertyHandle> PropertyHandle_ComponentCount_Y = PropertyHandle_ComponentCount->GetChildHandle("Y").ToSharedRef(); ResizeLandscapeCategory.AddProperty(PropertyHandle_ComponentCount) .OverrideResetToDefault(false, FSimpleDelegate()) .CustomWidget() .NameContent() [ PropertyHandle_ComponentCount->CreatePropertyNameWidget() ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetOriginalComponentCount) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetComponentCount, PropertyHandle_ComponentCount_X, PropertyHandle_ComponentCount_Y) ] ]; ResizeLandscapeCategory.AddCustomRow(LOCTEXT("Resolution", "Overall Resolution")) .NameContent() [ SNew(SBox) .VAlign(VAlign_Center) .Padding(FMargin(2)) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text(LOCTEXT("Resolution", "Overall Resolution")) .ToolTipText(LOCTEXT("Resolution_Tip", "Overall resolution of the entire landscape in vertices")) ] ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SBox) .VAlign(VAlign_Center) .Padding(FMargin(0,0,12,0)) // Line up with the other properties due to having no reset to default button [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetOriginalLandscapeResolution) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetLandscapeResolution) ] ] ]; ResizeLandscapeCategory.AddCustomRow(LOCTEXT("TotalComponents", "Total Components")) .NameContent() [ SNew(SBox) .VAlign(VAlign_Center) .Padding(FMargin(2)) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text(LOCTEXT("TotalComponents", "Total Components")) .ToolTipText(LOCTEXT("TotalComponents_Tip", "The total number of components in the landscape")) ] ] .ValueContent() .MinDesiredWidth(180) .MaxDesiredWidth(180) [ SNew(SBox) .VAlign(VAlign_Center) .Padding(FMargin(0,0,12,0)) // Line up with the other properties due to having no reset to default button [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .VAlign(VAlign_Center) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetOriginalTotalComponentCount) ] + SHorizontalBox::Slot() .VAlign(VAlign_Center) .FillWidth(1.1f) [ SNew(STextBlock) .Font(DetailBuilder.GetDetailFont()) .Text_Static(&GetTotalComponentCount) ] ] ]; ResizeLandscapeCategory.AddCustomRow(FText::GetEmpty()) [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .FillWidth(1) //[ //] + SHorizontalBox::Slot() .AutoWidth() [ SNew(SButton) .Text(LOCTEXT("Apply", "Apply")) .OnClicked(this, &FLandscapeEditorDetailCustomization_ResizeLandscape::OnApplyButtonClicked) ] ]; } END_SLATE_FUNCTION_BUILD_OPTIMIZATION FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetOriginalSectionSize() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return FText::Format(LOCTEXT("NxNQuads", "{0}x{0} Quads"), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_QuadsPerSection)); } return FText::FromString("---"); } TSharedRef<SWidget> FLandscapeEditorDetailCustomization_ResizeLandscape::GetSectionSizeMenu(TSharedRef<IPropertyHandle> PropertyHandle) { FMenuBuilder MenuBuilder(true, NULL); for (int32 i = 0; i < ARRAY_COUNT(SectionSizes); i++) { MenuBuilder.AddMenuEntry(FText::Format(LOCTEXT("NxNQuads", "{0}x{0} Quads"), FText::AsNumber(SectionSizes[i])), FText::GetEmpty(), FSlateIcon(), FExecuteAction::CreateStatic(&OnChangeSectionSize, PropertyHandle, SectionSizes[i])); } return MenuBuilder.MakeWidget(); } void FLandscapeEditorDetailCustomization_ResizeLandscape::OnChangeSectionSize(TSharedRef<IPropertyHandle> PropertyHandle, int32 NewSize) { ensure(PropertyHandle->SetValue(NewSize) == FPropertyAccess::Success); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetSectionSize(TSharedRef<IPropertyHandle> PropertyHandle) { int32 QuadsPerSection = 0; FPropertyAccess::Result Result = PropertyHandle->GetValue(QuadsPerSection); check(Result == FPropertyAccess::Success); if (Result == FPropertyAccess::MultipleValues) { return NSLOCTEXT("PropertyEditor", "MultipleValues", "Multiple Values"); } return FText::Format(LOCTEXT("NxNQuads", "{0}x{0} Quads"), FText::AsNumber(QuadsPerSection)); } bool FLandscapeEditorDetailCustomization_ResizeLandscape::IsSectionSizeResetToDefaultVisible() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return LandscapeEdMode->UISettings->ResizeLandscape_QuadsPerSection != LandscapeEdMode->UISettings->ResizeLandscape_Original_QuadsPerSection; } return false; } void FLandscapeEditorDetailCustomization_ResizeLandscape::OnSectionSizeResetToDefault() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { LandscapeEdMode->UISettings->ResizeLandscape_QuadsPerSection = LandscapeEdMode->UISettings->ResizeLandscape_Original_QuadsPerSection; } } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetOriginalSectionsPerComponent() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { int32 SectionsPerComponent = LandscapeEdMode->UISettings->ResizeLandscape_Original_SectionsPerComponent; FFormatNamedArguments Args; Args.Add(TEXT("Width"), SectionsPerComponent); Args.Add(TEXT("Height"), SectionsPerComponent); return FText::Format(SectionsPerComponent == 1 ? LOCTEXT("1x1Section", "{Width}\u00D7{Height} Section") : LOCTEXT("NxNSections", "{Width}\u00D7{Height} Sections"), Args); } return FText::FromString("---"); } TSharedRef<SWidget> FLandscapeEditorDetailCustomization_ResizeLandscape::GetSectionsPerComponentMenu(TSharedRef<IPropertyHandle> PropertyHandle) { FMenuBuilder MenuBuilder(true, NULL); for (int32 i = 0; i < ARRAY_COUNT(NumSections); i++) { FFormatNamedArguments Args; Args.Add(TEXT("Width"), NumSections[i]); Args.Add(TEXT("Height"), NumSections[i]); MenuBuilder.AddMenuEntry(FText::Format(NumSections[i] == 1 ? LOCTEXT("1x1Section", "{Width}\u00D7{Height} Section") : LOCTEXT("NxNSections", "{Width}\u00D7{Height} Sections"), Args), FText::GetEmpty(), FSlateIcon(), FExecuteAction::CreateStatic(&OnChangeSectionsPerComponent, PropertyHandle, NumSections[i])); } return MenuBuilder.MakeWidget(); } void FLandscapeEditorDetailCustomization_ResizeLandscape::OnChangeSectionsPerComponent(TSharedRef<IPropertyHandle> PropertyHandle, int32 NewSize) { ensure(PropertyHandle->SetValue(NewSize) == FPropertyAccess::Success); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetSectionsPerComponent(TSharedRef<IPropertyHandle> PropertyHandle) { int32 SectionsPerComponent = 0; FPropertyAccess::Result Result = PropertyHandle->GetValue(SectionsPerComponent); check(Result == FPropertyAccess::Success); if (Result == FPropertyAccess::MultipleValues) { return NSLOCTEXT("PropertyEditor", "MultipleValues", "Multiple Values"); } FFormatNamedArguments Args; Args.Add(TEXT("Width"), SectionsPerComponent); Args.Add(TEXT("Height"), SectionsPerComponent); return FText::Format(SectionsPerComponent == 1 ? LOCTEXT("1x1Section", "{Width}\u00D7{Height} Section") : LOCTEXT("NxNSections", "{Width}\u00D7{Height} Sections"), Args); } bool FLandscapeEditorDetailCustomization_ResizeLandscape::IsSectionsPerComponentResetToDefaultVisible() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return LandscapeEdMode->UISettings->ResizeLandscape_SectionsPerComponent != LandscapeEdMode->UISettings->ResizeLandscape_Original_SectionsPerComponent; } return false; } void FLandscapeEditorDetailCustomization_ResizeLandscape::OnSectionsPerComponentResetToDefault() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { LandscapeEdMode->UISettings->ResizeLandscape_SectionsPerComponent = LandscapeEdMode->UISettings->ResizeLandscape_Original_SectionsPerComponent; } } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetOriginalComponentCount() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return FText::Format(LOCTEXT("NxN", "{0}\u00D7{1}"), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.X), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.Y)); } return FText::FromString(TEXT("---")); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetComponentCount(TSharedRef<IPropertyHandle> PropertyHandle_ComponentCount_X, TSharedRef<IPropertyHandle> PropertyHandle_ComponentCount_Y) { return FText::Format(LOCTEXT("NxN", "{0}\u00D7{1}"), FLandscapeEditorDetailCustomization_Base::GetPropertyValueText(PropertyHandle_ComponentCount_X), FLandscapeEditorDetailCustomization_Base::GetPropertyValueText(PropertyHandle_ComponentCount_Y)); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetOriginalLandscapeResolution() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { const int32 Original_ComponentSizeQuads = LandscapeEdMode->UISettings->ResizeLandscape_Original_SectionsPerComponent * LandscapeEdMode->UISettings->ResizeLandscape_Original_QuadsPerSection; return FText::Format(LOCTEXT("NxN", "{0}\u00D7{1}"), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.X * Original_ComponentSizeQuads + 1), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.Y * Original_ComponentSizeQuads + 1)); } return FText::FromString(TEXT("---")); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetLandscapeResolution() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { const int32 ComponentSizeQuads = LandscapeEdMode->UISettings->ResizeLandscape_SectionsPerComponent * LandscapeEdMode->UISettings->ResizeLandscape_QuadsPerSection; return FText::Format(LOCTEXT("NxN", "{0}\u00D7{1}"), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_ComponentCount.X * ComponentSizeQuads + 1), FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_ComponentCount.Y * ComponentSizeQuads + 1)); } return FText::FromString(TEXT("---")); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetOriginalTotalComponentCount() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.X * LandscapeEdMode->UISettings->ResizeLandscape_Original_ComponentCount.Y); } return FText::FromString(TEXT("---")); } FText FLandscapeEditorDetailCustomization_ResizeLandscape::GetTotalComponentCount() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { return FText::AsNumber(LandscapeEdMode->UISettings->ResizeLandscape_ComponentCount.X * LandscapeEdMode->UISettings->ResizeLandscape_ComponentCount.Y); } return FText::FromString(TEXT("---")); } FReply FLandscapeEditorDetailCustomization_ResizeLandscape::OnApplyButtonClicked() { FEdModeLandscape* LandscapeEdMode = GetEditorMode(); if (LandscapeEdMode != NULL) { FScopedTransaction Transaction(LOCTEXT("Undo", "Changing Landscape Component Size")); const FIntPoint ComponentCount = LandscapeEdMode->UISettings->ResizeLandscape_ComponentCount; const int32 SectionsPerComponent = LandscapeEdMode->UISettings->ResizeLandscape_SectionsPerComponent; const int32 QuadsPerSection = LandscapeEdMode->UISettings->ResizeLandscape_QuadsPerSection; const bool bResample = (LandscapeEdMode->UISettings->ResizeLandscape_ConvertMode == ELandscapeConvertMode::Resample); LandscapeEdMode->ChangeComponentSetting(ComponentCount.X, ComponentCount.Y, SectionsPerComponent, QuadsPerSection, bResample); LandscapeEdMode->UpdateLandscapeList(); LandscapeEdMode->SetCurrentTool("Select"); // change tool so switching back to the manage mode doesn't give "Resize Landscape" again LandscapeEdMode->SetCurrentTool("Sculpt"); // change to sculpting mode and tool } return FReply::Handled(); } #undef LOCTEXT_NAMESPACE
[ "dkroell@acm.org" ]
dkroell@acm.org
fcebb949c712f620ed47941e5f524f63bdbd4cb8
7914cfcd7075324592ac18661015d37eebeaf1a4
/Xcode_Project/PJDev/SLCallLinePanel.hpp
967df8e4f02b480e3d97471b52585435fb545107
[]
no_license
seantleonard/voip_producer
40e54a09bc89a84a489e0961548a3425ac7311a5
874bafa0a548b89b7b273639b3ea9ef059a527cc
refs/heads/master
2021-01-11T02:08:44.199122
2016-10-13T17:09:13
2016-10-13T17:09:13
70,827,519
0
0
null
null
null
null
UTF-8
C++
false
false
1,647
hpp
// // SLCallLinePanel.hpp // PJDev // // Created by Sean Leonard on 8/19/16. // Copyright © 2016 Sean Leonard. All rights reserved. // #pragma once #include <wx/sizer.h> #include <wx/panel.h> #include <wx/frame.h> #include <wx/bitmap.h> #include <wx/stattext.h> #include <wx/animate.h> #include <wx/mediactrl.h> #include "EventID.hpp" #include "pjsua2.hpp" using namespace pj; class SLCallLinePanel : public wxPanel { public: SLCallLinePanel(wxFrame* parent); void updateLineRing(); void updateLineHold(); void updateLineActive(); void answerLine(wxCommandEvent& event); void handleLineButton(wxCommandEvent& event); void handleLineStatus(wxCommandEvent& event); void activateLine(CallInfo &info); void mSetPJThread(); void SetupBitmap(); void clearLine(int lineNumber); //Buffer that stores current drawing as bitmap wxBitmap mBitmap; void SetModel(std::shared_ptr<class LineModel> model); //Shared ptr std::shared_ptr<class LineModel> mModel; protected: void PaintNow(); void PaintEvent(wxPaintEvent & evt); void Render(wxDC& dc); void DrawPanel(wxDC& dc); std::string mNameLabel; std::string mCityLabel; std::string mCommentLabel; std::string mNumberLabel; wxStaticText mNumberLabelWX; //Control Column Button | Status wxButton *line01Button; wxAnimationCtrl *lineOneStatus; wxButton *line02Button; wxAnimationCtrl *lineTwoStatus; wxButton *line03Button; wxAnimationCtrl *lineThreeStatus; DECLARE_EVENT_TABLE() }; enum { BUTTON_Line01 = wxID_HIGHEST+1 };
[ "stleonar@usc.edu" ]
stleonar@usc.edu
24209f252a90ee979e177543b9e9516d8acd0060
02563c260835ff2e93b0455f09789a66f091bc7b
/baseProj/Helpers/ImageClass.hpp
9b24b3a7467ffedf5de2305a287fba852cf198b7
[ "MIT" ]
permissive
lasaro-dumer/CG2_20172
0d904683534605cfd5b1ad4994c71ea74984df98
89bbb49a9526a8190d49ef8df501fb385071448b
refs/heads/master
2021-03-18T17:56:40.561423
2017-11-07T00:24:48
2017-11-07T00:24:48
100,418,460
0
0
null
null
null
null
UTF-8
C++
false
false
1,675
hpp
#ifndef ImageClassH__ #define ImageClassH__ // ***************************************************************************************** // ImageClass.hpp // ***************************************************************************************** #include "Image.hpp" class ImageClass: public Image { private: void SetColorMode(); protected: int PosX, PosY; float zoomH, zoomV; GLenum colorMode; public: double Tamanho; ImageClass(int channels=3); ImageClass(int sizeX, int sizeY, int channels=3); int Load(const char *); void Save(const char *); void Display(void); void Delete(void); void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b); void DrawLineH(int y, int x1, int x2, unsigned char r, unsigned char g, unsigned char b); void DrawLineV(int x, int y1, int y2,unsigned char r, unsigned char g, unsigned char b ); void ReadPixel(GLint x, GLint y, unsigned char &r, unsigned char &g, unsigned char &b); double GetPointIntensity(int x, int y); float GetZoomH() { return zoomH; }; float GetZoomV() { return zoomV; }; void SetZoomH(float H) { zoomH = H; }; void SetZoomV(float V) { zoomV = V; }; void CopyTo(ImageClass *i); void Clear(); unsigned char *GetImagePtr(); void SetSize(int sizeX, int sizeY, int channels=3); void SetPos(int X, int Y); void DrawBox(int x1,int y1,int x2,int y2,unsigned char r, unsigned char g, unsigned char b); void DrawLine(int x0,int y0,int x1, int y1,unsigned char r, unsigned char g, unsigned char b ); void FillBox(int x1,int y1,int x2,int y2,unsigned char r, unsigned char g, unsigned char b ); }; #endif /*ImageClassH__*/
[ "ladumer@hotmail.com" ]
ladumer@hotmail.com
241feed5a91f0190434d0dcba3b55a2a17d3b497
81b6521d8204a962b908094deb8998c291cdb07b
/soj/union_train/a.cpp
c318c53cd5a37b54f87febceefc720a717512672
[]
no_license
doldre/ACM
9c86c242a347e5b31daa365ddf0e835af7468fa9
23e4694fee51831831b1346b8ccc0e97eebef20a
refs/heads/master
2020-04-12T02:29:59.345719
2017-04-10T08:15:10
2017-04-10T08:15:10
55,833,991
3
0
null
null
null
null
UTF-8
C++
false
false
3,197
cpp
/************************************************ *Author :mathon *Email :luoxinchen96@gmail.com *************************************************/ #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <stack> using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef unsigned long long ull; #define xx first #define lowbit(x) (x&-x) #define yy second #define sa(n) scanf("%d", &(n)) #define pr(x) cout << #x << " " << x << " " #define prln(x) cout << #x << " " << x << endl const int maxn = 500 + 5; vector<int> ori_G[maxn]; vector<int> unori_G[maxn]; int out[maxn], in[maxn], degree[maxn]; bool used[maxn]; int n, m; bool solve1() { queue<int> que; int odd = 0; for (int i = 1; i <= n; i++) { if(degree[i] % 2 == 1) { odd++; } } que.push(1); int cnt = 0; memset(used, 0, sizeof(used)); while(!que.empty()) { int u = que.front(); que.pop(); if(used[u]) continue; used[u] = true; /* pr(u); */ cnt++; for (int i = 0; i < (int)unori_G[u].size(); i++) { int v = unori_G[u][i]; if(!used[v]) { que.push(v); } } } /* pr(cnt); prln(odd); */ return cnt == n && (odd == 0 || odd == 2); } bool solve2() { queue<int> que; for (int i = 1; i <= n; i++) { if(out[i] > in[i]) { que.push(i); break; } } if(que.empty()) que.push(1); int cnt = 0; memset(used, 0, sizeof(used)); while(!que.empty()) { int u = que.front(); que.pop(); if(used[u]) continue; used[u] = true; cnt++; for (int i = 0; i < (int)ori_G[u].size(); i++) { int v = ori_G[u][i]; if(!used[v]) { que.push(v); } } } int tie = 0, mone = 0, lone = 0; for (int i = 1; i <= n; i++) { if(out[i] == in[i]) tie++; if(out[i] == in[i] + 1) mone++; if(out[i] == in[i] - 1) lone++; } return cnt == n && (tie == n || (tie == n - 2 && mone == 1 && lone == 1)); } int main(void) { #ifdef LOCAL //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); #endif int T; scanf("%d", &T); while(T--) { scanf("%d%d", &n, &m); for (int i = 0; i <= n; i++) { ori_G[i].clear(); unori_G[i].clear(); } memset(degree, 0, sizeof(degree)); memset(out, 0, sizeof(out)); memset(in, 0, sizeof(in)); for (int i = 0; i < m; i++) { int u, v; scanf("%d%d", &u, &v); out[u]++; in[v]++; degree[u]++; degree[v]++; ori_G[u].push_back(v); unori_G[u].push_back(v); unori_G[v].push_back(u); } if(solve1()) { printf("Yes "); } else printf("No "); if(solve2()) { printf("Yes\n"); } else printf("No\n"); } return 0; }
[ "luoxinchen96@gmail.com" ]
luoxinchen96@gmail.com
621de6c2e29ec6bd4c43a1f29322ea0ab5add5d1
0934782cc900ef32616d3c5204bca05b2aa34032
/SDK/RC_CoopTimer_parameters.hpp
a3753e0c22d519aace880df1faf99818089d856b
[]
no_license
igromanru/RogueCompany-SDK-9-24-2020
da959376e5464e505486cf0df01fff71dde212cf
fcab8fd45cf256c6f521d94f295e2a76701c411d
refs/heads/master
2022-12-18T05:30:30.039119
2020-09-25T01:12:25
2020-09-25T01:12:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,486
hpp
#pragma once // RogueCompany (4.24) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function CoopTimer.CoopTimer_C.UpdateMatchPointDisplay struct UCoopTimer_C_UpdateMatchPointDisplay_Params { }; // Function CoopTimer.CoopTimer_C.UpdateTeamCountDisplay struct UCoopTimer_C_UpdateTeamCountDisplay_Params { }; // Function CoopTimer.CoopTimer_C.SetRoundTimerSize struct UCoopTimer_C_SetRoundTimerSize_Params { int* NewSize; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.Construct struct UCoopTimer_C_Construct_Params { }; // Function CoopTimer.CoopTimer_C.HackInProgress struct UCoopTimer_C_HackInProgress_Params { class AKSExtractionComputer** Computer; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.RoundEnd struct UCoopTimer_C_RoundEnd_Params { class AKSGameState** GameState; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) struct FRoundResult* RoundResult; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function CoopTimer.CoopTimer_C.RoundWarmup struct UCoopTimer_C_RoundWarmup_Params { struct FRoundInitState* RoundInitState; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function CoopTimer.CoopTimer_C.RoundStart struct UCoopTimer_C_RoundStart_Params { struct FRoundInitState* RoundInitState; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function CoopTimer.CoopTimer_C.ComputersUnlock struct UCoopTimer_C_ComputersUnlock_Params { }; // Function CoopTimer.CoopTimer_C.Tick struct UCoopTimer_C_Tick_Params { struct FGeometry* MyGeometry; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) float* InDeltaTime; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.Player Eliminated struct UCoopTimer_C_Player_Eliminated_Params { class AKSPlayerState** PlayerState; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.OpenRetryGameStateBind struct UCoopTimer_C_OpenRetryGameStateBind_Params { }; // Function CoopTimer.CoopTimer_C.CloseRetryGameStateBind struct UCoopTimer_C_CloseRetryGameStateBind_Params { }; // Function CoopTimer.CoopTimer_C.RetryGameStateBind struct UCoopTimer_C_RetryGameStateBind_Params { }; // Function CoopTimer.CoopTimer_C.OnUIRelevantPlayerStateChanged struct UCoopTimer_C_OnUIRelevantPlayerStateChanged_Params { class AKSPlayerState** PlayerState; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.OnGameTimerUpdate struct UCoopTimer_C_OnGameTimerUpdate_Params { float* NewTruncatedSeconds; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.InitializeTimer struct UCoopTimer_C_InitializeTimer_Params { }; // Function CoopTimer.CoopTimer_C.HandleKillCamEnabled struct UCoopTimer_C_HandleKillCamEnabled_Params { bool* bEnabled; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.Unbind OnGameTimerUpdate struct UCoopTimer_C_Unbind_OnGameTimerUpdate_Params { }; // Function CoopTimer.CoopTimer_C.HandleKillCamViewPawn struct UCoopTimer_C_HandleKillCamViewPawn_Params { class APawn** ViewedPawn; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.Handle Alarm State Changed struct UCoopTimer_C_Handle_Alarm_State_Changed_Params { bool* bAlarmState; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function CoopTimer.CoopTimer_C.ExecuteUbergraph_CoopTimer struct UCoopTimer_C_ExecuteUbergraph_CoopTimer_Params { int* EntryPoint; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "60810131+frankie-11@users.noreply.github.com" ]
60810131+frankie-11@users.noreply.github.com
e10c2da6157691b4723b851807694d7d0a71420b
ef0d854d6e5afdbe5bc773aa03912a0942c2729d
/Math/Vector3.h
19461fea3620ebc880f3e469e299c8cbf99a95e5
[]
no_license
jjh2v2/XFramework
89676ac22be7739c2f966a294fadb3b1c360055e
4a79af046ef5e6765cee0f236d76f709b64e6853
refs/heads/master
2020-04-23T03:38:32.636825
2017-01-09T04:10:48
2017-01-09T04:10:48
null
0
0
null
null
null
null
GB18030
C++
false
false
4,179
h
#pragma once #include "MathComm.h" namespace Math { template<typename T> struct XVector3 { union { struct { T x,y,z; // 3 components of the vector }; T _v[3]; // Array access useful in loops }; // 构造 XVector3() : x( (T)0 ), y( (T)0 ), z( (T)0 ) {}; XVector3( T tx, T ty, T tz ) : x(tx), y(ty), z(tz) {}; XVector3( T t[3] ) : x( t[0] ), y( t[1] ), z( t[2] ) {}; XVector3( const XVector3<T>& v ) : x(v.x), y(v.y), z(v.z) {}; // 设置初值 inline void SetValue( T tx, T ty, T tz ) { x = tx; y = ty; z = tz; } inline void Zero() { memset( (void*)(&_v[0]), 0, 3*sizeof(T) ); } // 运算符重载 inline T operator [] ( size_t i ) const { assert( i < 3 ); return *(&x+i); } inline T& operator [] ( size_t i ) { assert( i < 3 ); return *(&x+i); } inline XVector3<T>& operator = ( const XVector3<T>& v ) { x = v.x; y = v.y; z = v.z; return *this; } inline bool operator == ( const XVector3<T>& v ) const { return ( IsZero( x - v.x ) && IsZero( y - v.y ) && IsZero( z - v.z ) ); } inline bool operator != ( const XVector3<T>& v ) const { return ( !IsZero( x - v.x ) || !IsZero( y - v.y ) || !IsZero( z - v.z ) ); } inline XVector3<T> operator + ( const XVector3<T>& v ) const { return XVector3<T>(x + v.x,y + v.y,z + v.z); } inline XVector3<T> operator - ( const XVector3<T>& v ) const { return XVector3<T>(x - v.x,y - v.y,z - v.z); } inline XVector3<T> operator * ( T tScalar ) const { return XVector3<T>(tScalar*x,tScalar*y,tScalar*z); } inline XVector3<T> operator / ( T tScalar ) const { if( IsZero( tScalar) ) { assert( !IsZero(tScalar) ); } XVector3<T> vDiv; T tInv = 1.0f / tScalar; vDiv.x = x * tInv; vDiv.y = y * tInv; vDiv.z = z * tInv; return vDiv; } inline XVector3<T> operator - () const { return XVector3<T>(-x,-y,-z); } inline XVector3<T>& operator += ( const XVector3<T>& v ) { x += v.x; y += v.y; z += v.z; return *this; } inline XVector3<T>& operator -= ( const XVector3<T>& v ) { x -= v.x; y -= v.y; z -= v.z; return *this; } inline XVector3<T>& operator *= ( T tScalar ) { x *= tScalar; y *= tScalar; z *= tScalar; return *this; } inline XVector3<T>& operator /= ( T tScalar ) { assert( !IsZero(tScalar) ); T tInv = 1.0f / tScalar; x *= tInv; y *= tInv; z *= tInv; return *this; } // 数学运算 inline float Length() const { return std::sqrt(x*x + y*y + z*z); } inline float LengthSq() const { return (x*x + y*y + z*z); } // 两点之间距离 inline float Distance( const XVector3<T>& pos ) const { static XVector3<T> v; v.x = x-pos.x; v.y = y-pos.y; v.z = z-pos.z; return v.Length(); } // 单位向量 inline XVector3<T> Normal() const { float len = Length(); if( !IsZero(len) ) return *this/len; else return *this; } // 单位化 inline void Normalize() { float len = Length(); if( !IsZero(len) ) { float fReci = 1.0f / len; x *= fReci; y *= fReci; z *= fReci; } } // 点乘 inline float Dot( const XVector3<T>& v ) const { return ( x*v.x + y*v.y + z*v.z ); } // 叉乘 inline XVector3<T> Cross( const XVector3<T>& v ) const { return XVector3( y*v.z - z*v.y, z*v.x - x*v.z, x*v.y - y*v.x ); } // 两向量夹角(弧度) inline float CalAngle( const XVector3<T>& v ) const { float len = Length(); if( IsZero(len) ) return HALFPI; else return std::acos( Dot(v) / (len*v.Length()) ); } // 友元函数 inline friend XVector3<T> operator * ( T tScalar, const XVector3<T>& v ) { return v*tScalar; } // casting inline operator T* () { return &_v[0]; } }; typedef XVector3<float> Vector3f; } using namespace Math;
[ "noreply@github.com" ]
noreply@github.com
9349e009381a8ebeabb116d7a39a8e314f127907
b5a0da8d4fa43374a2ac4ff197883aab6eb4e512
/HelperClasses/KinFitter/TFitConstraintEp.h
9964c7619c5f848e8b1a936bf66606c08a4360c6
[]
no_license
GLP90/Xbb
aded8b57fea8a91b3ab3bc4bd892adba89a34961
5994ad546ec14083c826fa22d12d274f90c9de35
refs/heads/master
2021-01-21T15:07:28.417223
2019-11-07T16:55:44
2019-11-07T16:55:44
37,457,832
2
1
null
2019-06-19T12:24:47
2015-06-15T10:08:43
Python
UTF-8
C++
false
false
1,994
h
#ifndef TFitConstraintEp_hh #define TFitConstraintEp_hh #include "HelperClasses/KinFitter/TAbsFitConstraint.h" #include "HelperClasses/KinFitter/TAbsFitParticle.h" #include "TMatrixD.h" #include <vector> class TFitConstraintEp: public TAbsFitConstraint { public : enum component { pX, pY, pZ, E }; TFitConstraintEp( ); TFitConstraintEp( const TString &name, const TString &title, TFitConstraintEp::component thecomponent, Double_t constraint = 0.); TFitConstraintEp( std::vector<TAbsFitParticle*>* particles, TFitConstraintEp::component thecomponent, Double_t constraint = 0.); TFitConstraintEp( const TString &name, const TString &title, std::vector<TAbsFitParticle*>* particles, TFitConstraintEp::component thecomponent, Double_t constraint = 0.); ~TFitConstraintEp() override; void addParticle( TAbsFitParticle* particle ); void addParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, TAbsFitParticle* p4 = nullptr, TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, TAbsFitParticle* p9 = nullptr, TAbsFitParticle* p10 = nullptr); void setConstraint(Double_t constraint){_constraint = constraint;}; // returns derivative df/dP with P=(p,E) and f the constraint f=0. // The matrix contains one row (df/dp, df/dE). TMatrixD* getDerivative( TAbsFitParticle* particle ) override; Double_t getInitValue() override; Double_t getCurrentValue() override; TString getInfoString() override; void print() override; protected : private: std::vector<TAbsFitParticle*> _particles; // Vector containing constrained particles Double_t _constraint; // Value of constraint TFitConstraintEp::component _component; // 4vector component to be constrained ClassDefOverride(TFitConstraintEp, 0) }; #endif
[ "pberger@phys.ethz.ch" ]
pberger@phys.ethz.ch
b84f3e5cd844c135adae48ebcd65f7952a1e7424
ecdb37ca675fbf51dd1d8bbda6dfacbed30aee2b
/contests/abc133/D/main.cpp
55bf9343fdef9ae9f1a49ab5a0847dc9e7a3c0e8
[ "MIT" ]
permissive
natsuki1996/atcoder-practice
92de1423d297008c01f672e0e811d28d838ed039
e6f2d1785f96553b822fc2677325614306f625f2
refs/heads/master
2022-12-08T15:52:36.140364
2020-09-20T04:29:16
2020-09-20T04:29:16
264,850,228
0
0
null
2020-07-22T06:12:39
2020-05-18T06:39:19
C++
UTF-8
C++
false
false
507
cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; ll x2 = 0; rep(i, n) { if (i % 2) x2 -= a[i]; else x2 += a[i]; } vector<int> ans(n); ans[0] = x2 / 2; rep(i, n - 1) ans[i + 1] = a[i] - ans[i]; rep(i, n) ans[i] *= 2; rep(i, n) printf("%d%c", ans[i], (i == n - 1 ? '\n' : ' ')); return 0; }
[ "natsu1580ki@gmail.com" ]
natsu1580ki@gmail.com
4712998143a1b5a5801a99fd774270779a8f79e3
92ada3eabb986350da3f4919a1d75c71a170854d
/autoupdate/common/3rd/boost/mpl/times.hpp
378e962712aceda7cc983985bb6e24685f3c019e
[]
no_license
jjzhang166/autoupdate
126e52be7d610fe121b615c0998af69dcbe70104
7a54996619f03b0febd762c007d5de0c85045a31
refs/heads/master
2021-05-05T20:09:44.330623
2015-08-27T08:57:52
2015-08-27T08:57:52
103,895,533
0
1
null
null
null
null
UTF-8
C++
false
false
585
hpp
#ifndef BOOST_MPL_TIMES_HPP_INCLUDED #define BOOST_MPL_TIMES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Source: /repo/3rd/boost/mpl/times.hpp,v $ // $Date: 2010/04/29 03:06:04 $ // $Revision: 1.1.1.1 $ #define AUX778076_OP_NAME times #define AUX778076_OP_TOKEN * #include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_TIMES_HPP_INCLUDED
[ "269221745@qq.com" ]
269221745@qq.com
c02d6b7b3b31796f679ccad0738ac5dda5b7979a
c3555981d0b5b4ed58bc87a962247956ee0228fd
/Práctica 1/ejercicio3.cpp
43b33e75b88818c61994f4ce9a09e44556c5090e
[]
no_license
olmo/PDP
9d7d433be66c65b6bc8022fbf1a1eb0ac38b42e0
fdbe348505c288f518efd86160dfd51a0ad28b39
refs/heads/master
2021-01-10T18:07:08.688252
2011-11-30T21:31:45
2011-11-30T21:31:45
2,826,290
0
1
null
null
null
null
UTF-8
C++
false
false
832
cpp
#include <math.h> #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int rank, size; int n; MPI_Status estado; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if(rank==0){ cout<<"introduce la precision del calculo (n > 0): "; cin>>n; } MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD); int partes = n/size; double PI25DT = 3.141592653589793238462643; double h = 1.0 / (double) n; double sum = 0.0; for (int i = partes*rank; i <= partes*rank+partes; i++) { double x = h * ((double)i - 0.5); sum += (4.0 / (1.0 + x*x)); } double pi = sum * h; cout << "El valor aproximado de PI es: " << pi << ", con un error de " << fabs(pi - PI25DT) << endl; return 0; }
[ "olmojial@gmail.com" ]
olmojial@gmail.com
0f5338e81dd7fccbba4470bfd3eeac2277dc8493
15601e64931dc1241c8128ddb7eb8963357788c1
/src/share/spdlog_utility.hpp
68585aa98bb37593a075c08ece68e5f77e2ee867
[ "Unlicense" ]
permissive
runt18/Karabiner-Elements
dc66d7f5122c0471b9a558d86b310ff43ab8d440
450d2b726d2adcf1a86c001da65bc846c1e7dd62
refs/heads/master
2021-01-19T19:31:28.731521
2017-03-02T17:34:43
2017-03-02T17:34:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,593
hpp
#pragma once #include "boost_defs.hpp" #include <boost/lexical_cast.hpp> #include <boost/optional.hpp> #include <deque> #include <iomanip> #include <spdlog/spdlog.h> class spdlog_utility final { public: static std::string get_pattern(void) { return "[%Y-%m-%d %H:%M:%S.%e] [%l] [%n] %v"; } static boost::optional<uint64_t> get_sort_key(const std::string& line) { // line == "[2016-09-22 20:18:37.649] [info] [grabber] version 0.90.36" // return 20160922201837649 // We can parse time strictly by using boost::posix_time::time_from_string. // But we cannot use it with boost header only. // So we use this rough way. if (line.size() < strlen("[0000-00-00 00:00:00.000]")) { return boost::none; } if (line.empty()) { return boost::none; } if (line[0] != '[') { return boost::none; } std::string result_string(4 + 2 + 2 + // years,months,days 2 + 2 + 2 + // hours,minutes,seconds 3, // milliseconds '0'); size_t line_pos = 1; size_t result_pos = 0; // years result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // months ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // days ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // hours ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // minutes ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // seconds ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; // milliseconds ++line_pos; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; result_string[result_pos++] = line[line_pos++]; try { return boost::lexical_cast<uint64_t>(result_string); } catch (...) { } return boost::none; } class log_reducer final { public: log_reducer(const log_reducer&) = delete; log_reducer(spdlog::logger& logger) : logger_(logger) {} void reset(void) { messages_.clear(); } void info(const std::string& message) { if (is_ignore(spdlog::level::info, message)) { return; } logger_.info(message); } void warn(const std::string& message) { if (is_ignore(spdlog::level::warn, message)) { return; } logger_.warn(message); } void error(const std::string& message) { if (is_ignore(spdlog::level::err, message)) { return; } logger_.error(message); } private: bool is_ignore(spdlog::level::level_enum level, const std::string& message) { for (const auto& it : messages_) { if (it.first == level && it.second == message) { return true; } } const size_t max_size = 16; messages_.push_back(std::make_pair(level, message)); while (messages_.size() > max_size) { messages_.pop_front(); } return false; } spdlog::logger& logger_; std::deque<std::pair<spdlog::level::level_enum, std::string>> messages_; }; };
[ "tekezo@pqrs.org" ]
tekezo@pqrs.org
4b79889dccd4b1f0630c08db498873b8c247e497
399b5e377fdd741fe6e7b845b70491b9ce2cccfd
/LLVM_src/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp
06ea4e058d06d1c0b18e6e66a8e11ba22881da7f
[ "NCSA", "LLVM-exception", "MIT", "Apache-2.0" ]
permissive
zslwyuan/LLVM-9-for-Light-HLS
6ebdd03769c6b55e5eec923cb89e4a8efc7dc9ab
ec6973122a0e65d963356e0fb2bff7488150087c
refs/heads/master
2021-06-30T20:12:46.289053
2020-12-07T07:52:19
2020-12-07T07:52:19
203,967,206
1
3
null
2019-10-29T14:45:36
2019-08-23T09:25:42
C++
UTF-8
C++
false
false
551
cpp
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // <functional> // class function<R(ArgTypes...)> // explicit function(); #include <functional> #include <cassert> int main() { std::function<int(int)> f; assert(!f); }
[ "tliang@connect.ust.hk" ]
tliang@connect.ust.hk
a37f722039e6fa705ba37817c12b367da85ca08b
3ec3dd1d03b785009f17c9f780aac6ffb882e903
/PiecePosition.h
16419705c4ee52d73b3984fc533c375d27b72bd2
[]
no_license
omerGerhard/Advanced-Rock-Paper-Scissors-Game-File-VS-Algorithm
33ec8dbe1e233d19f19bfc2eaf2f1380b2f6255a
cd297d3051d0b2f9933224a98fcf0f6d29ca50aa
refs/heads/master
2020-03-27T09:04:58.145163
2018-08-27T14:58:51
2018-08-27T14:58:51
146,312,389
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,058
h
#ifndef __PIECE_POSITION_H_ #define __PIECE_POSITION_H_ //-------------------------- // PiecePosition Interface //-------------------------- // abstract class PiecePosition should be the base class for your "PiecePosition" implementation // This interface is in use in the flow: // "Game" -> PlayerAlgorithm : getInitialPositions(int player, std::vector<unique_ptr<PiecePosition>>& vectorToFill); // PlayerAlgorithm is responsible of filling the vector sent to it with the initial positions of all his pieces // Note that "Game" is in parantheses because this is your class and you can choose its name // @author Amir Kirsh, TAU - Advanced Topics in Programming - 2018 Semester B //-------------------------- // forward declaration class Point; //-------------------------- class PiecePosition { public: virtual const Point& getPosition() const = 0; virtual char getPiece() const = 0; // R, P, S, B, J or F virtual char getJokerRep() const = 0; // ONLY for Joker: R, P, S or B -- non-Joker may return ‘#’ virtual ~PiecePosition() {} }; #endif
[ "omerg7493@gmail.com" ]
omerg7493@gmail.com
b5fea02f15b8424eebf12895b50be1a3da557874
7f6ac4ddeb50598df0b7ce1b9c69114448152c77
/slovoed/libraries/shdd.engine.components.sdc/Engine/SldPhraseUtility.h
a0e98933994193b6246e7fe0769ef55ff0ba2541
[]
no_license
dictcore/paragon_slovoed_ce
b463ee9980a83637c5d0502d450bf64d3232e70f
c414f795864b9b6509f1571e2bb111cdc584ba16
refs/heads/master
2022-11-14T22:49:40.385222
2020-06-11T09:17:14
2020-06-15T13:44:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,638
h
#ifndef _SLD_PHRASE_UTILITY_H_ #define _SLD_PHRASE_UTILITY_H_ #include "SldPlatform.h" #include "SldString.h" #include "SldUtil.h" struct TPhraseSubrange { UInt32 m_Begin = -1; UInt32 m_Size = 0; }; inline bool operator==(const TPhraseSubrange& lhs, const TPhraseSubrange& rhs) { return lhs.m_Begin == rhs.m_Begin && lhs.m_Size == rhs.m_Size; } class CSldSubphraseSearchInstance { public: virtual Int8 TryForBestMatch( const SldU16String& aPhrase, const SldU16String& aSubphrase, TPhraseSubrange& aRange) = 0; }; class CSldSubrangePullback { public: virtual ~CSldSubrangePullback() {} virtual TPhraseSubrange Act(const TPhraseSubrange&) const = 0; }; struct TControlledTransformResult { SldU16String m_String; sld2::UniquePtr<CSldSubrangePullback> m_RangePullback; }; class CSldControlledTransform { public: using Result = TControlledTransformResult; virtual ~CSldControlledTransform() {} virtual Result Act(const SldU16String& aFrom) const = 0; }; class CSldControlledTransformGenerator { public: using Result = TControlledTransformResult; virtual ~CSldControlledTransformGenerator() {} virtual Int8 Init(const SldU16String& aPhrase) = 0; virtual Result Transform() = 0; virtual Int8 End() const = 0; }; struct TFindBestSubphraseResult { TPhraseSubrange m_BestRange; TControlledTransformResult m_TransformResult; }; TFindBestSubphraseResult FindBestSubphrase( const SldU16String& aSource, const SldU16String& aSubstring, CSldControlledTransformGenerator& aTransformGenerator, CSldSubphraseSearchInstance& aSearchInstance); #endif //_SLD_PHRASE_UTILITY_H_
[ "Semyon.Remizov@paragon-software.com" ]
Semyon.Remizov@paragon-software.com
195ed4fe25036a177142998074558326697cd39c
f2936a200b729603d0af7b34f3da5e38dc9ca0be
/src/test.cpp
e4beb7878011a8ec95116ceea38c520e4b0cca9f
[]
no_license
timedcy/EE563Project
2978b9187fd5cb49f42b8f12d0203524d08c4f52
2dfefe029d53f78aee4350b1ab566d01f326fbb7
refs/heads/master
2020-12-07T02:26:02.852335
2013-01-17T03:58:54
2013-01-17T03:58:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,391
cpp
#include "picotest.h" #include "convolutional_layer.h" #include "fully_connected_layer.h" #include "network.h" using namespace tiny_cnn; TEST(convolutional, fprop) { typedef network<mse, gradient_descent> CNN; CNN nn; convolutional_layer<network<mse, gradient_descent>, tanh_activation> l(5, 5, 3, 1, 2); vec_t in(25); ASSERT_EQ(l.weight().size(), 18); std::fill(l.bias().begin(), l.bias().end(), 0.0); std::fill(l.weight().begin(), l.weight().end(), 0.0); uniform_rand(in.begin(), in.end(), -1.0, 1.0); { const vec_t& out = l.forward_propagation(in); for (auto o: out) EXPECT_DOUBLE_EQ(o, 0.5); } l.weight()[0] = 0.3; l.weight()[1] = 0.1; l.weight()[2] = 0.2; l.weight()[3] = 0.0; l.weight()[4] =-0.1; l.weight()[5] =-0.1; l.weight()[6] = 0.05; l.weight()[7] =-0.2; l.weight()[8] = 0.05; l.weight()[9] = 0.0; l.weight()[10] =-0.1; l.weight()[11] = 0.1; l.weight()[12] = 0.1; l.weight()[13] =-0.2; l.weight()[14] = 0.3; l.weight()[15] = 0.2; l.weight()[16] =-0.3; l.weight()[17] = 0.2; in[0] = 3; in[1] = 2; in[2] = 1; in[3] = 5; in[4] = 2; in[5] = 3; in[6] = 0; in[7] = 2; in[8] = 0; in[9] = 1; in[10] = 0; in[11] = 6; in[12] = 1; in[13] = 1; in[14] = 10; in[15] = 3; in[16] =-1; in[17] = 2; in[18] = 9; in[19] = 0; in[20] = 1; in[21] = 2; in[22] = 1; in[23] = 5; in[24] = 5; { const vec_t& out = l.forward_propagation(in); EXPECT_DOUBLE_EQ(0.4875026, out[0]); EXPECT_DOUBLE_EQ(0.8388910, out[1]); EXPECT_DOUBLE_EQ(0.8099984, out[2]); EXPECT_DOUBLE_EQ(0.7407749, out[3]); EXPECT_DOUBLE_EQ(0.5000000, out[4]); EXPECT_DOUBLE_EQ(0.1192029, out[5]); EXPECT_DOUBLE_EQ(0.5986877, out[6]); EXPECT_DOUBLE_EQ(0.7595109, out[7]); EXPECT_DOUBLE_EQ(0.6899745, out[8]); } } TEST(convolutional, bprop) { network<cross_entropy, gradient_descent> nn; convolutional_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer(5, 5, 3, 1, 1); nn.add(&layer); vec_t a(25, 0.0), t(9, 0.0); std::vector<vec_t> data, train; for (int y = 0; y < 5; y++) { a[5*y+3] = 1.0; } for (int y = 0; y < 3; y++) { t[3*y+0] = 0.0; t[3*y+1] = 0.5; t[3*y+2] = 1.0; } for (int i = 0; i < 100; i++) { data.push_back(a); train.push_back(t); } nn.train(data, train); vec_t predicted; nn.predict(a, &predicted); } TEST(convolutional, bprop2) { network<cross_entropy, gradient_descent> nn; convolutional_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer(5, 5, 3, 1, 1); fully_connected_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer2(9, 3); nn.add(&layer); nn.add(&layer2); vec_t a(25, 0.0), t(3, 0.0), a2(25, 0.0), t2(3, 0.0); for (int y = 0; y < 5; y++) { a[5*y+3] = 1.0; } t[0] = 0.0; t[1] = 0.5; t[2] = 1.0; uniform_rand(a2.begin(), a2.end(), -3, 3); uniform_rand(t2.begin(), t2.end(), 0, 1); std::vector<vec_t> data, train; for (int i = 0; i < 300; i++) { data.push_back(a); data.push_back(a2); train.push_back(t); train.push_back(t2); } nn.train(data, train); vec_t predicted; nn.predict(a, &predicted); nn.predict(a2, &predicted); } TEST(fully_connected, bprop) { network<cross_entropy, gradient_descent> nn; fully_connected_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer(3, 2); nn.add(&layer); vec_t a(3), t(2), a2(3), t2(2); a[0] = 3.0; a[1] = 0.0; a[2] = -1.0; t[0] = 0.3; t[1] = 0.7; a2[0] = 0.2; a2[1] = 0.5; a2[2] = 4.0; t2[0] = 0.5; t2[1] = 0.1; std::vector<vec_t> data, train; for (int i = 0; i < 100; i++) { data.push_back(a); data.push_back(a2); train.push_back(t); train.push_back(t2); } nn.train(data, train); vec_t predicted; nn.predict(a, &predicted); EXPECT_DOUBLE_EQ(predicted[0], t[0]); EXPECT_DOUBLE_EQ(predicted[1], t[1]); nn.predict(a2, &predicted); EXPECT_DOUBLE_EQ(predicted[0], t2[0]); EXPECT_DOUBLE_EQ(predicted[1], t2[1]); } TEST(fully_connected, bprop2) { network<cross_entropy, gradient_descent> nn; fully_connected_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer(4, 6); fully_connected_layer<network<cross_entropy, gradient_descent>, sigmoid_activation> layer2(6, 3); nn.add(&layer); nn.add(&layer2); vec_t a(4, 0.0), t(3, 0.0), a2(4, 0.0), t2(3, 0.0); a[0] = 3.0; a[1] = 1.0; a[2] = -1.0; a[3] = 4.0; t[0] = 0.3; t[1] = 0.7; t[2] = 0.3; a2[0] = 1.0; a2[1] = 0.0; a2[2] = 4.0; a2[3] = 2.0; t2[0] = 0.6; t2[1] = 0.0; t2[2] = 0.1; std::vector<vec_t> data, train; for (int i = 0; i < 100; i++) { data.push_back(a); data.push_back(a2); train.push_back(t); train.push_back(t2); } nn.train(data, train); vec_t predicted; nn.predict(a, &predicted); EXPECT_DOUBLE_EQ(predicted[0], t[0]); EXPECT_DOUBLE_EQ(predicted[1], t[1]); nn.predict(a2, &predicted); EXPECT_DOUBLE_EQ(predicted[0], t2[0]); EXPECT_DOUBLE_EQ(predicted[1], t2[1]); } int main(void) { RUN_ALL_TESTS(); }
[ "Noumi.Taiga@gmail.com" ]
Noumi.Taiga@gmail.com
af8a431acdf25edb11e62a4256c0e78ba702b9c5
8f08cf24ddc4b2ce3e091d8c1d1f013ccadba0ac
/CCMMag/_CCCM_Unit_Mag.h
43e7b5cdd10da2f24813b8814f2bf5bdb73fab03
[]
no_license
rcw0125/lgLogic
42cf0a67b367d0a2ab86260639aface6cb847680
47a11962ab0132420231ca88157db862203f5cdc
refs/heads/master
2020-03-10T05:12:29.589505
2018-04-12T07:31:13
2018-04-12T07:31:13
129,211,942
0
2
null
null
null
null
GB18030
C++
false
false
24,107
h
// 逻辑类CCCM_Unit_Mag头文件 // 本文件是由L3集成开发环境自动生成,在没有充分了解本文件的内容前,请不要随意修改本文件中的内容 // 否则可能带来严重后果。 #pragma once #include "ProduceUnit.h" class CCCM_Unit_Mag : public ProduceUnit { public: CCCM_Unit_Mag(void); virtual ~CCCM_Unit_Mag(void); DECLARE_L3CLASS(CCCM_Unit_Mag,XGMESLogic\\CCMMag, Name) DECLARE_L3PROPTABLE() DECLARE_L3METHODMAP(CCCM_Unit_Mag) DECLARE_L3EVENTSINK_MAP() //当对象被装载到系统中时,被调用 virtual void OnLoaded(); //当对象被卸载时,被调用 virtual void OnUnloaded(); public: enum _CCMStatus { // 正常状态 CCMWaiting = 0, // 等待状态 CCMArrivle = 1, // 到达 CCMCasting = 2, // 浇注中 CCMCasted = 3, // 浇注结束 CCMDeparture = 4, // 大包下包 }; //2009-03-02 tangyi enum _CCMEquipStatus { // 异常状态 CCMNormal = 0, // 正常 CCMRepair = -1, // 检修中 CCMFailure = -2, // 故障 }; enum _CCMST { ST1 = 1, //1流 ST2 = 2, //2流 ST3 = 3, //3流 ST4 = 4, //4流 }; enum _CCMEquipType { SmoothBlock = 1, //滑块 WaterGap = 2, //水口 BigWaterGap = 3, //大包水口 }; protected: CString cstrStopCastingHeatID; //2009-04-18 用于浇次最后一炉停浇后流停浇状状态及时刻的设置 int CastNum1ST,CastNum2ST,CastNum3ST,CastNum4ST; CString GetPrepareArea(); CString GetCastingArea(); CString GetBloomingArea(); /// <summary> /// 返回机组的加工区域 /// ARG << lstURIs : 接收所有加工区对象的URI /// </summary> virtual BOOL GetProduceAreas(CStringList& lstURIs); /// <summary> /// 得到机组前序材料缓冲区的URI /// </summary> virtual CString GetInputCache(); /// <summary> /// 得到机组后继材料缓冲区的URI /// </summary> virtual CString GetOutputCache(); /// <summary> /// 机组上料前预处理。在机组上料前调用,继承类可重载此方法进行预先数据准备和处理。 /// ARG >> rsMaterialInfo : 材料信息记录集。 /// RET << 返回TRUE继续上料;返回FALSE中断上料。 /// </summary> virtual BOOL OnBeforeFeedMaterials(L3RECORDSET rsMaterialInfo); /// <summary> /// 机组上料后续处理。在机组上料后调用,继承类可重载此方法进行额外处理。 /// ARG >> rsMaterialInfo : 材料信息记录集。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL OnAfterMaterialsFeeded(L3RECORDSET rsMaterialInfo); /// <summary> /// 返回机组上料记录的类型URI /// </summary> virtual CString GetFeedingLogType(); /// <summary> /// 准备上料记录数据。继承类可重载此函数进行额外的数据处理。 /// ARG >> rsFeedingLogs : 上料记录信息。 /// RET << void /// </summary> virtual void PrepareFeedingLogs(L3RECORDSET rsFeedingLogs); /// <summary> /// 加工参数预处理。在调用加工区域的加工方法前调用,继承类可重载此函数对加工参数进行修改和配置。 /// ARG >> lpcszArea : 加工区域的URI /// >> rsParameters : 加工参数记录集。 /// RET << 返回TRUE继续加工;返回FALSE中断加工。 /// </summary> virtual BOOL PrepareProcessParameters(LPCTSTR lpcszArea,L3RECORDSET rsParameters); /// <summary> /// 加工完成后续处理。在加工完成后调用,继承类可重载此函数进行额外逻辑处理 /// ARG >> lpcszArea : 加工区域的URI /// >> nProcessType : 加工的类型。 /// >> rsProducts : 加工产生的产品的信息记录。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL OnAfterProcessCompleted(LPCTSTR lpcszArea,LONG nProcessType,L3RECORDSET rsProducts); /// <summary> /// 下线前预处理。在执行下线操作前调用,继承类可重载此函数进行预先的数据准备和处理。 /// ARG >> rsMaterialInfo : 下线材料信息。包含MaterialType,MaterialID,Amount,Area字段。 /// RET << 返回TRUE继续下线;返回FALSE中断下线。 /// </summary> virtual BOOL OnBeforeDeliverMaterials(L3RECORDSET rsMaterialInfo); /// <summary> /// 下线后续处理。在执行下线操作后调用,继承类可重载此函数进行额外处理。 /// ARG >> rsMaterialInfo : 下线材料信息。包含MaterialType,MaterialID,Amount,Area字段。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL OnAfterMaterialsDelivered(L3RECORDSET rsMaterialInfo); /// <summary> /// 返回机组产出记录的类型URI /// </summary> virtual CString GetDeliveryLogType(); /// <summary> /// 准备下料记录数据。 /// ARG >> rsDeliveryLog : 下料记录数据。 /// RET <<void /// </summary> virtual void PrepareDeliveryLogs(L3RECORDSET rsDeliveryLog); /// <summary> /// 返回本机组的通讯器对象的URI /// </summary> virtual CString GetCommunicator(); /// <summary> /// 准备计划数据,以便向机组下位系统发送。 /// ARG >> lpcszPlanType : 计划类型。 /// >> rsPlan : 计划数据。包括PlanID字段。 /// << rsSend : 接收准备好的计划发送数据。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL PreparePlanForSending(LPCTSTR lpcszPlanType,L3RECORDSET rsPlan,L3RECORDSET* pprsSend); /// <summary> /// 计划下达后续处理。在向下位系统发送计划后调用,继承类可重载此函数进行后续处理。 /// ARG >> rsSend : 下发下位系统的计划数据。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL OnAfterPlansSent(L3RECORDSET rsSend); /// <summary> /// 准备计划数据,以便通知机组下位系统取消计划。 /// ARG >> lpcszPlanType : 计划类型。 /// >> rsPlan : 计划数据。包括PlanID字段。 /// << rsSend : 接收准备好的计划取消数据。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL PreparePlanForCancel(LPCTSTR lpcszPlanType,L3RECORDSET rsPlan,L3RECORDSET* pprsCancel); /// <summary> /// 计划取消后续处理。在向下位系统发送取消计划后调用,继承类可重载此函数进行后续处理。 /// ARG >> rsCancel : 下发下位系统的计划取消数据。 /// RET << 成功返回TRUE;失败返回FALSE。 /// </summary> virtual BOOL OnAfterPlansCanceled(L3RECORDSET rsCancel); /// <summary> /// 处理材料上线的事件 /// ARG >> pEvt : 事件对象 /// RET << 返回TRUE表示已经成功处理。返回FALSE表示使用系统缺省处理方式。 /// </summary> virtual BOOL HandleMaterialFeedingEvent(MatEnterArea *pEvt); /// <summary> /// 处理材料进入加工区域的事件 /// ARG >> pEvt : 事件对象 /// RET << 返回TRUE表示已经成功处理。返回FALSE表示使用系统缺省处理方式。 /// </summary> virtual BOOL HandleMaterialEnterAreaEvent(MatEnterArea *pEvt); /// <summary> /// 处理材料离开加工区域事件 /// ARG >> pEvt : 事件对象 /// RET << 返回TRUE表示已经成功处理。返回FALSE表示使用系统缺省处理方式。 /// </summary> virtual BOOL HandleMaterialLeaveAreaEvent(MatLeaveArea *pEvt); /// <summary> /// 处理材料生产完毕事件 /// ARG >> pEvt : 事件对象 /// RET << 返回TRUE表示已经成功处理。返回FALSE表示使用系统缺省处理方式。 /// </summary> virtual BOOL HandleMaterialProducedEvent(MatProduced *pEvt); /// <summary> /// 处理机组测量数据变更事件 /// ARG >> pEvt : 事件对象 /// RET << 返回TRUE表示已经成功处理。返回FALSE表示使用系统缺省处理方式。 /// </summary> virtual BOOL HandleUnitMeasureChangedEvent(UnitMeasure *pEvt); /// <Property class="CCCM_Unit_Mag" name="Status" type="L3LONG"> /// 当前状态 /// </Property> DECLARE_L3PROP_LONG(Status) /// <Property class="CCCM_Unit_Mag" name="TreatNo" type="L3STRING"> /// 当前处理号 /// </Property> DECLARE_L3PROP_STRING(TreatNo) /// <Property class="CCCM_Unit_Mag" name="CastingNo" type="L3STRING"> /// 当前浇次号 /// </Property> DECLARE_L3PROP_STRING(CastingNo) /// <Property class="CCCM_Unit_Mag" name="TundishNo" type="L3STRING"> /// 当前包次号 /// </Property> DECLARE_L3PROP_STRING(TundishNo) /// <Property class="CCCM_Unit_Mag" name="HeatID" type="L3STRING"> /// 当前浇注炉号 /// </Property> DECLARE_L3PROP_STRING(HeatID) /// <Property class="CCCM_Unit_Mag" name="NextHeatID" type="L3STRING"> /// 下一上线炉号 /// </Property> DECLARE_L3PROP_STRING(NextHeatID) /// <Property class="CCCM_Unit_Mag" name="SteelGradeIndex" type="L3STRING"> /// 当前炼钢记号 /// </Property> DECLARE_L3PROP_STRING(SteelGradeIndex) /// <Property class="CCCM_Unit_Mag" name="SteelGrade" type="L3STRING"> /// 当前钢种 /// </Property> DECLARE_L3PROP_STRING(SteelGrade) /// <Property class="CCCM_Unit_Mag" name="RemainedWeight" type="L3DOUBLE"> /// 当前浇注钢水剩余量 /// </Property> DECLARE_L3PROP_DOUBLE(RemainedWeight) /// <Property class="CCCM_Unit_Mag" name="CastingEndEvent" type="L3LONG"> /// 铸机浇铸结束事件 /// </Property> DECLARE_L3PROP_LONG(CastingEndEvent) /// <Property class="CCCM_Unit_Mag" name="CutSampleHeatID" type="L3STRING"> /// 割样通知炉号 /// </Property> DECLARE_L3PROP_STRING(CutSampleHeatID) /// <Property class="CCCM_Unit_Mag" name="ReSampleHeatID" type="L3STRING"> /// 重取样通知炉号 /// </Property> DECLARE_L3PROP_STRING(ReSampleHeatID) /// <Property class="CCCM_Unit_Mag" name="ArriveTime" type="L3STRING"> /// 大包到达时间 /// </Property> DECLARE_L3PROP_STRING(ArriveTime) /// <Property class="CCCM_Unit_Mag" name="StartCastingTime" type="L3STRING"> /// 大包开浇时间 /// </Property> DECLARE_L3PROP_STRING(StartCastingTime) /// <Property class="CCCM_Unit_Mag" name="LadleID" type="L3STRING"> /// 钢包号 /// </Property> DECLARE_L3PROP_STRING(LadleID)//2008-12-28 /// <Property class="CCCM_Unit_Mag" name="NextLadleID" type="L3STRING"> /// 下一钢包号 /// </Property> DECLARE_L3PROP_STRING(NextLadleID)//2008-12-28 /// <Property class="CCCM_Unit_Mag" name="TundishWeight" type="L3DOUBLE"> /// 当前中包钢水剩余量 /// </Property> DECLARE_L3PROP_DOUBLE(TundishWeight)////2009-01-03 /// <Property class="CCCM_Unit_Mag" name="EastTundishID" type="L3STRING"> /// 东烘烤中包号 /// </Property> DECLARE_L3PROP_STRING(EastTundishID)//2009-01-03 /// <Property class="CCCM_Unit_Mag" name="WestTundishID" type="L3STRING"> /// 西烘烤中包号 /// </Property> DECLARE_L3PROP_STRING(WestTundishID)//2009-01-03 /// <Property class="CCCM_Unit_Mag" name="SteelWeight" type="L3DOUBLE"> /// 连铸称重钢水量 /// </Property> DECLARE_L3PROP_DOUBLE(SteelWeight)////2009-01-03 /// <Property class="CCCM_Unit_Mag" name="TundishTemp" type="L3LONG"> ///中包温度 /// </Property> DECLARE_L3PROP_LONG(TundishTemp)////2009-01-14 /// <Property class="CCCM_Unit_Mag" name="Speed1st" type="L3DOUBLE"> ///1st拉速 /// </Property> DECLARE_L3PROP_DOUBLE(Speed1st)////2009-01-14 /// <Property class="CCCM_Unit_Mag" name="Speed2st" type="L3DOUBLE"> ///2st拉速 /// </Property> DECLARE_L3PROP_DOUBLE(Speed2st)////2009-01-14 /// <Property class="CCCM_Unit_Mag" name="Speed3st" type="L3DOUBLE"> ///3st拉速 /// </Property> DECLARE_L3PROP_DOUBLE(Speed3st)////2009-01-14 /// <Property class="CCCM_Unit_Mag" name="Speed4st" type="L3DOUBLE"> ///4st拉速 /// </Property> DECLARE_L3PROP_DOUBLE(Speed4st)////2009-01-14 /// <Property class="CCCM_Unit_Mag" name="SumCastWeight1st" type="L3DOUBLE"> ///1st拉钢量累计 /// </Property> DECLARE_L3PROP_DOUBLE(SumCastWeight1st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="SumCastWeight2st" type="L3DOUBLE"> ///2st拉钢量累计 /// </Property> DECLARE_L3PROP_DOUBLE(SumCastWeight2st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="SumCastWeight3st" type="L3DOUBLE"> ///3st拉钢量累计 /// </Property> DECLARE_L3PROP_DOUBLE(SumCastWeight3st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="SumCastWeight4st" type="L3DOUBLE"> ///4st拉钢量累计 /// </Property> DECLARE_L3PROP_DOUBLE(SumCastWeight4st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="CastTo15Minute" type="L3LONG"> ///浇注到达15分钟 /// </Property> DECLARE_L3PROP_LONG(CastTo15Minute)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="OnOff1st" type="L3LONG"> ///1st开停浇状态 /// </Property> DECLARE_L3PROP_LONG(OnOff1st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="OnOff2st" type="L3LONG"> ///2st开停浇状态 /// </Property> DECLARE_L3PROP_LONG(OnOff2st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="OnOff3st" type="L3LONG"> ///3st开停浇状态 /// </Property> DECLARE_L3PROP_LONG(OnOff3st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="OnOff4st" type="L3LONG"> ///4st开停浇状态 /// </Property> DECLARE_L3PROP_LONG(OnOff4st)////2009-02-28 /// <Property class="CCCM_Unit_Mag" name="Eqiup_Status" type="L3LONG"> /// 设备状态 /// </Property>2009-03-02 DECLARE_L3PROP_LONG(Equip_Status) /// <Property class="CCCM_Unit_Mag" name="Cut_Information" type="L3LONG"> /// 割样通知 /// </Property>2009-03-11 DECLARE_L3PROP_LONG(Cut_Information) /// <Property class="CCCM_Unit_Mag" name="RemainCastingTime" type="L3LONG"> /// 当前剩余浇注时间 /// </Property> DECLARE_L3PROP_LONG(RemainCastingTime) /// <Property class="CCCM_Unit_Mag" name="PrevHeatID" type="L3STRING"> /// 停浇前炉号 /// </Property> DECLARE_L3PROP_STRING(PrevHeatID) /// 计算下一处理号 CString CalculateNextTreatNo(LPCTSTR lpcszTreatNo); /// 计算下一浇次号 CString CalculateNextCastingNo(LPCTSTR lpcszCastingNo); /// 计算下一包次号 CString CalculateNextTundishNo(LPCTSTR lpcszTundishNo); /// 通用过程状态修改函数 BOOL ChangeStatus(LONG nStatus); /// 通用计划状态修改函数 BOOL ChangePlanStatus(LPCTSTR lpcszHeatID,LPCTSTR lpcszTreatNo,LPCTSTR Status); /// <Method class="CCCM_Unit_Mag" name="GetInputSteels" type="L3RECORDSET"> /// 返回入口钢水信息. /// </Method> L3RECORDSET GetInputSteels(); /// <Method class="CCCM_Unit_Mag" name="DesignateSteel" type="L3BOOL"> /// 指定下个上线的钢水. /// <Param name="rsSteel" type="L3RECORDSET">要指定上线的钢水记录</Param> /// </Method> L3BOOL DesignateSteel(L3RECORDSET rsSteel); /// <Method class="CCCM_Unit_Mag" name="SteelArrived" type="L3BOOL"> /// 处理大包钢水到达事件,将指定的钢水上线。 /// </Method> L3BOOL SteelArrived(); /// <Method class="CCCM_Unit_Mag" name="StartCasting" type="L3BOOL"> /// 开始大包浇注 /// </Method> L3BOOL StartCasting(); /// <Method class="CCCM_Unit_Mag" name="CompletCasting" type="L3BOOL"> /// 完成大包浇注 /// </Method> L3BOOL CompletCasting(); /// <Method class="CCCM_Unit_Mag" name="ChangeCastingNo" type="L3BOOL"> /// 更换浇次 /// </Method> L3BOOL ChangeCastingNo(); /// <Method class="CCCM_Unit_Mag" name="ChangeTundishNo" type="L3BOOL"> /// 更换包次 /// </Method> L3BOOL ChangeTundishNo(); /// <Method class="CRH_Unit_Mag" name="ChangeDeviceStatus" type="L3BOOL"> /// 修改设备状态 /// <Param name="nStatus" type="L3LONG">新设备状态</Param> /// <Param name="reason" type="L3STRING">原因</Param> /// </Method> L3BOOL ChangeDeviceStatus(L3LONG nStatus, L3STRING reason); /// <Method class="CCCM_Unit_Mag" name="DivideHeatApp" type="L3BOOL"> /// 申请炉次分割 /// <Param name="Reason" type="L3STRING">原因</Param> /// </Method> L3BOOL DivideHeatApp(L3STRING Reason); /// <Method class="CCCM_Unit_Mag" name="SendBackSteelApp" type="L3BOOL"> /// 申请大包整包返送。 /// <Param name="Reason" type="L3STRING">原因</Param> /// </Method> L3BOOL SteelBackApp(L3STRING Reason); /// <Method class="CCCM_Unit_Mag" name="GenerateBlooms" type="L3BOOL"> /// 炉次出坯 /// <Param name="rsBloomData" type="L3RECORDSET">铸坯数据</Param> /// <Param name="HeatID" type="L3STRING">出坯炉号</Param> /// </Method> L3BOOL GenerateBlooms(L3RECORDSET rsBloomData); /// <Method class="CCCM_Unit_Mag" name="SetRemainedSteelWeight" type="L3BOOL"> /// 处理大包剩余重量信号。 /// <Param name="fWeight" type="L3DOUBLE">大包剩余重量</Param> /// </Method> L3BOOL SetRemainedSteelWeight(L3DOUBLE fWeight); /// <Method class="CCCM_Unit_Mag" name="SendTurnSteelApp" type="L3BOOL"> /// 申请大包钢水回炉。 /// <Param name="Reason" type="L3STRING">原因</Param> /// </Method> L3BOOL SteelReturnApp(L3STRING Reason); /// <Method class="CCCM_Unit_Mag" name="GetHeatAllInformation" type=""> /// 获取已经浇铸完炉次的信息 /// </Method> L3RECORDSET GetHeatAllInformation(); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMTundishFireData" type="L3BOOL"> /// 接收铸机中包烘烤数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">中包烘烤数据</Param> /// </Method> L3BOOL AcceptCCMTundishFireData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMRuntimeData" type="L3BOOL"> /// 接收铸机开浇至终浇五分钟一次的实时数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptCCMRuntimeData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMSpeedData" type="L3BOOL"> /// 接收铸机开浇至终浇拉速实时数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptCCMSpeedData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMTundishTempData" type="L3BOOL"> /// 接收铸机开浇至终浇中包测温数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">中包测温数据</Param> /// </Method> L3BOOL AcceptCCMTundishTempData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMStatus" type="L3BOOL"> /// 接收铸机过程状态数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">状态数据</Param> /// </Method> L3BOOL AcceptCCMStatus(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMLadleWeightData" type="L3BOOL"> /// 接收铸机大、中包重量数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">重量数据</Param> /// </Method> L3BOOL AcceptCCMLadleWeightData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMSteelWeightData" type="L3BOOL"> /// 接收铸机钢水重量数据 2009-01-03 /// <Param name="rsData" type="L3RECORDSET">重量数据</Param> /// </Method> L3BOOL AcceptCCMSteelWeightData(L3RECORDSET rsData); //计算等压钢时间 L3DATETIME CalculateHoldTime(LPCTSTR lpcszTreatNo); /// <Method class="CCCM_Unit_Mag" name="GetHeatAllInformation" type=""> /// 获取可以进行炉次确定的信息 /// </Method> L3RECORDSET GetHeatConfirmInfor(); /// <Method class="CCCM_Unit_Mag" name="AcceptCCM5Runtime1Data" type="L3BOOL"> /// 接收5#铸机开浇至终浇五分钟一次的实时数据 2009-02-25 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptCCM5Runtime1Data(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCM5Runtime2Data" type="L3BOOL"> /// 接收5#铸机开浇至终浇五分钟一次的实时数据冷却气体辊缝 2009-02-25 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptCCM5Runtime2Data(L3RECORDSET rsData); /// 获取前处理号 2009-02-26 CString GetPreviousTreatNo(LPCTSTR lpcszTreatNo); /// <Method class="CCCM_Unit_Mag" name="LadleDeparture" type="L3BOOL"> /// 大包下包 /// </Method> L3BOOL LadleDeparture(); /// <Method class="CCCM_Unit_Mag" name="AcceptCCM5Runtime2Data" type="L3BOOL"> /// 接收铸机钢水称重数据 2009-02-26 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptSteelWeight(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptStrandStatusData" type="L3BOOL"> /// 接收铸机流状态数据 2009-02-26 /// <Param name="rsData" type="L3RECORDSET"></Param> /// </Method> L3BOOL AcceptStrandStatusData(L3RECORDSET rsData); /// 获取炉次流GUID 2009-02-26 CString GetHeatStrandGUID(LPCTSTR lpcszHeatID,LPCTSTR lpcszCCMID,L3LONG iStrandID); /// <Method class="CCCM_Unit_Mag" name="ArrivalTemperatureJudge" type="L3SHORT"> /// 判定进机温度合格 2009-02-28 /// <Param name="lpcszSteelGradeIndex" type="LPCTSTR">炼钢记号</Param> /// <Param name="lpcszUnitType" type="LPCTSTR">工序类型</Param> /// <Param name="iTempertaure" type="L3LONG">上机温度</Param> /// <Param name="iHeatNum" type="L3LONG">浇次内炉数</Param> /// </Method> L3SHORT ArrivalTemperatureJudge(LPCTSTR lpcszSteelGradeIndex,LPCTSTR lpcszUnitType,L3LONG iTempertaure,L3LONG iHeatNum); //2009-02-28 产生保护渣实绩默认为上一炉的实绩 L3BOOL GenProtectSlagInfor(LPCTSTR lpcszTreatNo); /// <Method class="CCCM_Unit_Mag" name="CalculateStrandCaseWeight" type="L3BOOL"> /// 计算炉次通钢量 2009-02-28 /// </Method> L3BOOL CalculateStrandCaseWeight(); /// <Method class="CBOF_Unit_Mag" name="SteelReturn" type="L3BOOL"> /// 获取最近炉号 2009-02-28 增加炉号 /// <Param name="Reason" type="L3STRING">原因</Param> /// </Method> L3RECORDSET GetPreThreeHeatID(); /// <Method class="CCCM_Unit_Mag" name="GetMoldData" type=""> /// 获取结晶器数据 /// </Method> L3RECORDSET GetMoldData(LPCTSTR lcpstrStrandId); /// <Method class="CCCM_Unit_Mag" name="ChangeCCMEquipment" type="L3BOOL"> /// 更换滑块/水口/大包水口 /// <Param name="rsData" type="L3RECORDSET"></Param> /// </Method> L3BOOL ChangeCCMEquipment(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="CalculateEquipmentLife" type="L3LONG"> /// 计算设备寿命 2009-03-07 /// <Param name="iEquipType" type="L3LONG">滑块/水口/大包水口</Param> /// <Param name="strCCMID" type="L3STRING">铸机号</Param> /// <Param name="iStrandNo" type="L3LONG">流号</Param> /// <Param name="strReason" type="L3STRING">流号</Param> /// </Method> L3LONG CalculateEquipmentLife(L3LONG iEquipType,L3STRING strCCMID,L3LONG iStrandNo,L3STRING strReason); /// <Method class="CCCM_Unit_Mag" name="CalculateRemainCastingTime" type="L3BOOL"> /// 计算剩余浇注时间 /// </Method> L3BOOL CalculateRemainCastingTime(); /// <Method class="CCCM_Unit_Mag" name="SetTundishTempInValidFlag" type="L3BOOL"> /// 设置中包温度无效标志 2009-03-25 /// </Method> L3BOOL SetTundishTempInValidFlag(LPCTSTR strHeatID,LPCTSTR strCCMID); /// <Method class="CCCM_Unit_Mag" name="SendSteelWeightToPLC" type="L3BOOL"> /// 将钢水重量下传PLC 2009-03-26 /// <Param name="rsData" type="L3RECORDSET"></Param> /// </Method> L3BOOL SendSteelWeightToPLC(L3FLOAT fSteelWeight); /// <Method class="CCCM_Unit_Mag" name="ChangeSteelGradeApp" type="L3BOOL"> /// 申请改钢2009-04-15 /// <Param name="Reason" type="L3STRING">原因</Param> /// </Method> L3BOOL ChangeSteelGradeApp(L3STRING Reason); /// <Method class="CCCM_Unit_Mag" name="ModifyStrandStatusData" type="L3LONG"> /// 修改铸机流状态数据 2009-04-18 /// <Param name="rsData" type="L3RECORDSET"></Param> /// </Method> L3LONG ModifyStrandStatusData(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptCCMTundishTempData" type="L3BOOL"> /// 接收铸机开浇后2分钟中包测温数据 2009-06-02 /// <Param name="rsData" type="L3RECORDSET">中包测温数据</Param> /// </Method> L3BOOL AcceptCCMTundishTempForRefine(L3RECORDSET rsData); /// <Method class="CCCM_Unit_Mag" name="AcceptTundishWeightData" type="L3BOOL"> /// 接收铸机中包钢水称重数据 2009-02-26 /// <Param name="rsData" type="L3RECORDSET">实时数据</Param> /// </Method> L3BOOL AcceptTundishWeightData(L3RECORDSET rsData); };
[ "747590720@qq.com" ]
747590720@qq.com
abdb5970092776a24eb66ff6587025f3dcf2aebb
4702164d70a25157efaa70bcee3c4c7e0087bd0f
/RanLeetCode/RanLeetCode/链表/92反转链表 II.cpp
5f14ea224d13418c7eee0fec06075b3af11d9033
[]
no_license
VanishRan/leetcode
0374243c3afc2ecac4fe7a9b66a9dda34e6bb58d
1a907c53c9d785b0cefb2c4490af5afdee618861
refs/heads/master
2021-07-08T16:07:15.862808
2021-03-05T12:01:14
2021-03-05T12:01:14
227,854,056
2
0
null
null
null
null
UTF-8
C++
false
false
1,354
cpp
// // 92反转链表 II.cpp // RanLeetCode // // Created by mahuanran on 2020/8/1. // Copyright © 2020 mahuanran. All rights reserved. // #include "common.h" class Solution { public: ListNode* reverseBetween(ListNode* head, int m, int n) { ListNode *root = new ListNode(0); root->next = head; ListNode *t1 = root; ListNode *t2 = head; if (m == n) return head; //1->2->3->4->5->NULL, m = 2, n = 4 int i = m-1; while (i--) { t1 = t1->next; t2 = t2->next; } int j = n-m+1; ListNode *pre = NULL; ListNode *cur = t2; while(j--) { ListNode *tmp = cur->next; cur->next = pre; pre = cur; cur = tmp; } t1->next = pre; t2->next = cur; return root->next; } }; /* 反转从位置 m 到 n 的链表。请使用一趟扫描完成反转。 说明: 1 ≤ m ≤ n ≤ 链表长度。 示例: 输入: 1->2->3->4->5->NULL, m = 2, n = 4 输出: 1->4->3->2->5->NULL 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/reverse-linked-list-ii 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */
[ "mahuanran@cmbchina.com" ]
mahuanran@cmbchina.com
9f0f2afa3abfd04cd5b031bd7056f5a3b54a3b35
5ff688aed802ac498d7280ccfceb65c82a05bfab
/src/fyshttp/xsocketutils.h
ae4de061dba7cfbad38191fc82029a243900a841
[]
no_license
truexf/fys
07a1cb113b98f8f1dfcd79b1bf85d46bdaf39ccf
7039f78522a34d7217e51dabc346860861bce341
refs/heads/master
2021-01-10T01:57:52.919566
2017-10-23T07:05:17
2017-10-23T07:05:17
43,857,144
1
1
null
null
null
null
UTF-8
C++
false
false
2,246
h
/* * xsocket.h * * Created on: Mar 25, 2015 * Author: root */ #ifndef FYSHTTP_XSOCKETUTILS_H_ #define FYSHTTP_XSOCKETUTILS_H_ #include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/select.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <string.h> namespace fyshttp { inline int CreateTCPSocket() { return socket(AF_INET, SOCK_STREAM, 0); } inline int SetSocketNonblock(int fd) { int flag = fcntl(fd, F_GETFL, 0); flag |= O_NONBLOCK; return fcntl(fd, F_SETFL, flag); } inline int TcpBind(int sockfd, const char *ip, unsigned short port) { sockaddr_in addr; memset(&addr, 0, sizeof(sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr(ip); return bind(sockfd, (sockaddr*) &addr, sizeof(sockaddr_in)); } inline void SetSocketKeepalive(int sockfd, int keepalive, int idle_seconds) { setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(int)); if (keepalive) setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, &idle_seconds, sizeof(int)); } inline int SetSocketNagle(int sockfd, int nodelay) { return setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(int)); } inline int SetSocketLinger(int sockfd, int l_onoff, int l_linger) { linger lg; lg.l_onoff = l_onoff; lg.l_linger = l_linger; return setsockopt(sockfd, SOL_SOCKET, SO_LINGER, &lg, sizeof(linger)); } inline int SetSocketReuseAddr(int sockfd, int reuse) { return setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(int)); } inline int SetSocketRecvbufSize(int sockfd, int buf_size) { return setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(int)); } inline int SetSocketSendbufSize(int sockfd, int buf_size) { return setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(int)); } inline int AcceptTimeout(int listensockfd, struct timeval *tv, struct sockaddr *addr, socklen_t *addrlen) { fd_set rfd; FD_ZERO(&rfd); FD_SET(listensockfd, &rfd); int nfds = select(listensockfd+1, &rfd, NULL, NULL, tv); if (nfds > 0) return accept(listensockfd, addr, addrlen); else return -1; } } //end of namespace #endif /* FYSHTTP_XSOCKETUTILS_H_ */
[ "fangyousong@qq.com" ]
fangyousong@qq.com
4a97e6a56de1f665773068b2d3adffa5471d52f1
ed10dc841d5b4f6a038e8f24f603750992d9fae9
/llvm/lib/Support/VirtualFileSystem.cpp
ba35d251d6bb29d8edd0d0ec4fdde2c584c4505a
[ "Spencer-94", "BSD-3-Clause", "NCSA", "LLVM-exception", "Apache-2.0" ]
permissive
WYK15/swift-Ollvm10
90c2f0ade099a1cc545183eba5c5a69765320401
ea68224ab23470963b68dfcc28b5ac769a070ea3
refs/heads/main
2023-03-30T20:02:58.305792
2021-04-07T02:41:01
2021-04-07T02:41:01
355,189,226
5
0
null
null
null
null
UTF-8
C++
false
false
74,961
cpp
//===- VirtualFileSystem.cpp - Virtual File System Layer ------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements the VirtualFileSystem interface. // //===----------------------------------------------------------------------===// #include "llvm/Support/VirtualFileSystem.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/ADT/Twine.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Config/llvm-config.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Errc.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ErrorOr.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" #include "llvm/Support/SMLoc.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/YAMLParser.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <atomic> #include <cassert> #include <cstdint> #include <iterator> #include <limits> #include <map> #include <memory> #include <mutex> #include <string> #include <system_error> #include <utility> #include <vector> using namespace llvm; using namespace llvm::vfs; using llvm::sys::fs::file_t; using llvm::sys::fs::file_status; using llvm::sys::fs::file_type; using llvm::sys::fs::kInvalidFile; using llvm::sys::fs::perms; using llvm::sys::fs::UniqueID; Status::Status(const file_status &Status) : UID(Status.getUniqueID()), MTime(Status.getLastModificationTime()), User(Status.getUser()), Group(Status.getGroup()), Size(Status.getSize()), Type(Status.type()), Perms(Status.permissions()) {} Status::Status(const Twine &Name, UniqueID UID, sys::TimePoint<> MTime, uint32_t User, uint32_t Group, uint64_t Size, file_type Type, perms Perms) : Name(Name.str()), UID(UID), MTime(MTime), User(User), Group(Group), Size(Size), Type(Type), Perms(Perms) {} Status Status::copyWithNewName(const Status &In, const Twine &NewName) { return Status(NewName, In.getUniqueID(), In.getLastModificationTime(), In.getUser(), In.getGroup(), In.getSize(), In.getType(), In.getPermissions()); } Status Status::copyWithNewName(const file_status &In, const Twine &NewName) { return Status(NewName, In.getUniqueID(), In.getLastModificationTime(), In.getUser(), In.getGroup(), In.getSize(), In.type(), In.permissions()); } bool Status::equivalent(const Status &Other) const { assert(isStatusKnown() && Other.isStatusKnown()); return getUniqueID() == Other.getUniqueID(); } bool Status::isDirectory() const { return Type == file_type::directory_file; } bool Status::isRegularFile() const { return Type == file_type::regular_file; } bool Status::isOther() const { return exists() && !isRegularFile() && !isDirectory() && !isSymlink(); } bool Status::isSymlink() const { return Type == file_type::symlink_file; } bool Status::isStatusKnown() const { return Type != file_type::status_error; } bool Status::exists() const { return isStatusKnown() && Type != file_type::file_not_found; } File::~File() = default; FileSystem::~FileSystem() = default; ErrorOr<std::unique_ptr<MemoryBuffer>> FileSystem::getBufferForFile(const llvm::Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool IsVolatile) { auto F = openFileForRead(Name); if (!F) return F.getError(); return (*F)->getBuffer(Name, FileSize, RequiresNullTerminator, IsVolatile); } std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { if (llvm::sys::path::is_absolute(Path)) return {}; auto WorkingDir = getCurrentWorkingDirectory(); if (!WorkingDir) return WorkingDir.getError(); llvm::sys::fs::make_absolute(WorkingDir.get(), Path); return {}; } std::error_code FileSystem::getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const { return errc::operation_not_permitted; } std::error_code FileSystem::isLocal(const Twine &Path, bool &Result) { return errc::operation_not_permitted; } bool FileSystem::exists(const Twine &Path) { auto Status = status(Path); return Status && Status->exists(); } #ifndef NDEBUG static bool isTraversalComponent(StringRef Component) { return Component.equals("..") || Component.equals("."); } static bool pathHasTraversal(StringRef Path) { using namespace llvm::sys; for (StringRef Comp : llvm::make_range(path::begin(Path), path::end(Path))) if (isTraversalComponent(Comp)) return true; return false; } #endif //===-----------------------------------------------------------------------===/ // RealFileSystem implementation //===-----------------------------------------------------------------------===/ namespace { /// Wrapper around a raw file descriptor. class RealFile : public File { friend class RealFileSystem; file_t FD; Status S; std::string RealName; RealFile(file_t RawFD, StringRef NewName, StringRef NewRealPathName) : FD(RawFD), S(NewName, {}, {}, {}, {}, {}, llvm::sys::fs::file_type::status_error, {}), RealName(NewRealPathName.str()) { assert(FD != kInvalidFile && "Invalid or inactive file descriptor"); } public: ~RealFile() override; ErrorOr<Status> status() override; ErrorOr<std::string> getName() override; ErrorOr<std::unique_ptr<MemoryBuffer>> getBuffer(const Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool IsVolatile) override; std::error_code close() override; }; } // namespace RealFile::~RealFile() { close(); } ErrorOr<Status> RealFile::status() { assert(FD != kInvalidFile && "cannot stat closed file"); if (!S.isStatusKnown()) { file_status RealStatus; if (std::error_code EC = sys::fs::status(FD, RealStatus)) return EC; S = Status::copyWithNewName(RealStatus, S.getName()); } return S; } ErrorOr<std::string> RealFile::getName() { return RealName.empty() ? S.getName().str() : RealName; } ErrorOr<std::unique_ptr<MemoryBuffer>> RealFile::getBuffer(const Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool IsVolatile) { assert(FD != kInvalidFile && "cannot get buffer for closed file"); return MemoryBuffer::getOpenFile(FD, Name, FileSize, RequiresNullTerminator, IsVolatile); } std::error_code RealFile::close() { std::error_code EC = sys::fs::closeFile(FD); FD = kInvalidFile; return EC; } namespace { /// A file system according to your operating system. /// This may be linked to the process's working directory, or maintain its own. /// /// Currently, its own working directory is emulated by storing the path and /// sending absolute paths to llvm::sys::fs:: functions. /// A more principled approach would be to push this down a level, modelling /// the working dir as an llvm::sys::fs::WorkingDir or similar. /// This would enable the use of openat()-style functions on some platforms. class RealFileSystem : public FileSystem { public: explicit RealFileSystem(bool LinkCWDToProcess) { if (!LinkCWDToProcess) { SmallString<128> PWD, RealPWD; if (llvm::sys::fs::current_path(PWD)) return; // Awful, but nothing to do here. if (llvm::sys::fs::real_path(PWD, RealPWD)) WD = {PWD, PWD}; else WD = {PWD, RealPWD}; } } ErrorOr<Status> status(const Twine &Path) override; ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override; directory_iterator dir_begin(const Twine &Dir, std::error_code &EC) override; llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override; std::error_code setCurrentWorkingDirectory(const Twine &Path) override; std::error_code isLocal(const Twine &Path, bool &Result) override; std::error_code getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const override; private: // If this FS has its own working dir, use it to make Path absolute. // The returned twine is safe to use as long as both Storage and Path live. Twine adjustPath(const Twine &Path, SmallVectorImpl<char> &Storage) const { if (!WD) return Path; Path.toVector(Storage); sys::fs::make_absolute(WD->Resolved, Storage); return Storage; } struct WorkingDirectory { // The current working directory, without symlinks resolved. (echo $PWD). SmallString<128> Specified; // The current working directory, with links resolved. (readlink .). SmallString<128> Resolved; }; Optional<WorkingDirectory> WD; }; } // namespace ErrorOr<Status> RealFileSystem::status(const Twine &Path) { SmallString<256> Storage; sys::fs::file_status RealStatus; if (std::error_code EC = sys::fs::status(adjustPath(Path, Storage), RealStatus)) return EC; return Status::copyWithNewName(RealStatus, Path); } ErrorOr<std::unique_ptr<File>> RealFileSystem::openFileForRead(const Twine &Name) { SmallString<256> RealName, Storage; Expected<file_t> FDOrErr = sys::fs::openNativeFileForRead( adjustPath(Name, Storage), sys::fs::OF_None, &RealName); if (!FDOrErr) return errorToErrorCode(FDOrErr.takeError()); return std::unique_ptr<File>( new RealFile(*FDOrErr, Name.str(), RealName.str())); } llvm::ErrorOr<std::string> RealFileSystem::getCurrentWorkingDirectory() const { if (WD) return WD->Specified.str(); SmallString<128> Dir; if (std::error_code EC = llvm::sys::fs::current_path(Dir)) return EC; return Dir.str(); } std::error_code RealFileSystem::setCurrentWorkingDirectory(const Twine &Path) { if (!WD) return llvm::sys::fs::set_current_path(Path); SmallString<128> Absolute, Resolved, Storage; adjustPath(Path, Storage).toVector(Absolute); bool IsDir; if (auto Err = llvm::sys::fs::is_directory(Absolute, IsDir)) return Err; if (!IsDir) return std::make_error_code(std::errc::not_a_directory); if (auto Err = llvm::sys::fs::real_path(Absolute, Resolved)) return Err; WD = {Absolute, Resolved}; return std::error_code(); } std::error_code RealFileSystem::isLocal(const Twine &Path, bool &Result) { SmallString<256> Storage; return llvm::sys::fs::is_local(adjustPath(Path, Storage), Result); } std::error_code RealFileSystem::getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const { SmallString<256> Storage; return llvm::sys::fs::real_path(adjustPath(Path, Storage), Output); } IntrusiveRefCntPtr<FileSystem> vfs::getRealFileSystem() { static IntrusiveRefCntPtr<FileSystem> FS(new RealFileSystem(true)); return FS; } std::unique_ptr<FileSystem> vfs::createPhysicalFileSystem() { return std::make_unique<RealFileSystem>(false); } namespace { class RealFSDirIter : public llvm::vfs::detail::DirIterImpl { llvm::sys::fs::directory_iterator Iter; public: RealFSDirIter(const Twine &Path, std::error_code &EC) : Iter(Path, EC) { if (Iter != llvm::sys::fs::directory_iterator()) CurrentEntry = directory_entry(Iter->path(), Iter->type()); } std::error_code increment() override { std::error_code EC; Iter.increment(EC); CurrentEntry = (Iter == llvm::sys::fs::directory_iterator()) ? directory_entry() : directory_entry(Iter->path(), Iter->type()); return EC; } }; } // namespace directory_iterator RealFileSystem::dir_begin(const Twine &Dir, std::error_code &EC) { SmallString<128> Storage; return directory_iterator( std::make_shared<RealFSDirIter>(adjustPath(Dir, Storage), EC)); } //===-----------------------------------------------------------------------===/ // OverlayFileSystem implementation //===-----------------------------------------------------------------------===/ OverlayFileSystem::OverlayFileSystem(IntrusiveRefCntPtr<FileSystem> BaseFS) { FSList.push_back(std::move(BaseFS)); } void OverlayFileSystem::pushOverlay(IntrusiveRefCntPtr<FileSystem> FS) { FSList.push_back(FS); // Synchronize added file systems by duplicating the working directory from // the first one in the list. FS->setCurrentWorkingDirectory(getCurrentWorkingDirectory().get()); } ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) { // FIXME: handle symlinks that cross file systems for (iterator I = overlays_begin(), E = overlays_end(); I != E; ++I) { ErrorOr<Status> Status = (*I)->status(Path); if (Status || Status.getError() != llvm::errc::no_such_file_or_directory) return Status; } return make_error_code(llvm::errc::no_such_file_or_directory); } ErrorOr<std::unique_ptr<File>> OverlayFileSystem::openFileForRead(const llvm::Twine &Path) { // FIXME: handle symlinks that cross file systems for (iterator I = overlays_begin(), E = overlays_end(); I != E; ++I) { auto Result = (*I)->openFileForRead(Path); if (Result || Result.getError() != llvm::errc::no_such_file_or_directory) return Result; } return make_error_code(llvm::errc::no_such_file_or_directory); } llvm::ErrorOr<std::string> OverlayFileSystem::getCurrentWorkingDirectory() const { // All file systems are synchronized, just take the first working directory. return FSList.front()->getCurrentWorkingDirectory(); } std::error_code OverlayFileSystem::setCurrentWorkingDirectory(const Twine &Path) { for (auto &FS : FSList) if (std::error_code EC = FS->setCurrentWorkingDirectory(Path)) return EC; return {}; } std::error_code OverlayFileSystem::isLocal(const Twine &Path, bool &Result) { for (auto &FS : FSList) if (FS->exists(Path)) return FS->isLocal(Path, Result); return errc::no_such_file_or_directory; } std::error_code OverlayFileSystem::getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const { for (auto &FS : FSList) if (FS->exists(Path)) return FS->getRealPath(Path, Output); return errc::no_such_file_or_directory; } llvm::vfs::detail::DirIterImpl::~DirIterImpl() = default; namespace { class OverlayFSDirIterImpl : public llvm::vfs::detail::DirIterImpl { OverlayFileSystem &Overlays; std::string Path; OverlayFileSystem::iterator CurrentFS; directory_iterator CurrentDirIter; llvm::StringSet<> SeenNames; std::error_code incrementFS() { assert(CurrentFS != Overlays.overlays_end() && "incrementing past end"); ++CurrentFS; for (auto E = Overlays.overlays_end(); CurrentFS != E; ++CurrentFS) { std::error_code EC; CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); if (EC && EC != errc::no_such_file_or_directory) return EC; if (CurrentDirIter != directory_iterator()) break; // found } return {}; } std::error_code incrementDirIter(bool IsFirstTime) { assert((IsFirstTime || CurrentDirIter != directory_iterator()) && "incrementing past end"); std::error_code EC; if (!IsFirstTime) CurrentDirIter.increment(EC); if (!EC && CurrentDirIter == directory_iterator()) EC = incrementFS(); return EC; } std::error_code incrementImpl(bool IsFirstTime) { while (true) { std::error_code EC = incrementDirIter(IsFirstTime); if (EC || CurrentDirIter == directory_iterator()) { CurrentEntry = directory_entry(); return EC; } CurrentEntry = *CurrentDirIter; StringRef Name = llvm::sys::path::filename(CurrentEntry.path()); if (SeenNames.insert(Name).second) return EC; // name not seen before } llvm_unreachable("returned above"); } public: OverlayFSDirIterImpl(const Twine &Path, OverlayFileSystem &FS, std::error_code &EC) : Overlays(FS), Path(Path.str()), CurrentFS(Overlays.overlays_begin()) { CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); EC = incrementImpl(true); } std::error_code increment() override { return incrementImpl(false); } }; } // namespace directory_iterator OverlayFileSystem::dir_begin(const Twine &Dir, std::error_code &EC) { return directory_iterator( std::make_shared<OverlayFSDirIterImpl>(Dir, *this, EC)); } void ProxyFileSystem::anchor() {} namespace llvm { namespace vfs { namespace detail { enum InMemoryNodeKind { IME_File, IME_Directory, IME_HardLink }; /// The in memory file system is a tree of Nodes. Every node can either be a /// file , hardlink or a directory. class InMemoryNode { InMemoryNodeKind Kind; std::string FileName; public: InMemoryNode(llvm::StringRef FileName, InMemoryNodeKind Kind) : Kind(Kind), FileName(llvm::sys::path::filename(FileName)) {} virtual ~InMemoryNode() = default; /// Get the filename of this node (the name without the directory part). StringRef getFileName() const { return FileName; } InMemoryNodeKind getKind() const { return Kind; } virtual std::string toString(unsigned Indent) const = 0; }; class InMemoryFile : public InMemoryNode { Status Stat; std::unique_ptr<llvm::MemoryBuffer> Buffer; public: InMemoryFile(Status Stat, std::unique_ptr<llvm::MemoryBuffer> Buffer) : InMemoryNode(Stat.getName(), IME_File), Stat(std::move(Stat)), Buffer(std::move(Buffer)) {} /// Return the \p Status for this node. \p RequestedName should be the name /// through which the caller referred to this node. It will override /// \p Status::Name in the return value, to mimic the behavior of \p RealFile. Status getStatus(const Twine &RequestedName) const { return Status::copyWithNewName(Stat, RequestedName); } llvm::MemoryBuffer *getBuffer() const { return Buffer.get(); } std::string toString(unsigned Indent) const override { return (std::string(Indent, ' ') + Stat.getName() + "\n").str(); } static bool classof(const InMemoryNode *N) { return N->getKind() == IME_File; } }; namespace { class InMemoryHardLink : public InMemoryNode { const InMemoryFile &ResolvedFile; public: InMemoryHardLink(StringRef Path, const InMemoryFile &ResolvedFile) : InMemoryNode(Path, IME_HardLink), ResolvedFile(ResolvedFile) {} const InMemoryFile &getResolvedFile() const { return ResolvedFile; } std::string toString(unsigned Indent) const override { return std::string(Indent, ' ') + "HardLink to -> " + ResolvedFile.toString(0); } static bool classof(const InMemoryNode *N) { return N->getKind() == IME_HardLink; } }; /// Adapt a InMemoryFile for VFS' File interface. The goal is to make /// \p InMemoryFileAdaptor mimic as much as possible the behavior of /// \p RealFile. class InMemoryFileAdaptor : public File { const InMemoryFile &Node; /// The name to use when returning a Status for this file. std::string RequestedName; public: explicit InMemoryFileAdaptor(const InMemoryFile &Node, std::string RequestedName) : Node(Node), RequestedName(std::move(RequestedName)) {} llvm::ErrorOr<Status> status() override { return Node.getStatus(RequestedName); } llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> getBuffer(const Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool IsVolatile) override { llvm::MemoryBuffer *Buf = Node.getBuffer(); return llvm::MemoryBuffer::getMemBuffer( Buf->getBuffer(), Buf->getBufferIdentifier(), RequiresNullTerminator); } std::error_code close() override { return {}; } }; } // namespace class InMemoryDirectory : public InMemoryNode { Status Stat; llvm::StringMap<std::unique_ptr<InMemoryNode>> Entries; public: InMemoryDirectory(Status Stat) : InMemoryNode(Stat.getName(), IME_Directory), Stat(std::move(Stat)) {} /// Return the \p Status for this node. \p RequestedName should be the name /// through which the caller referred to this node. It will override /// \p Status::Name in the return value, to mimic the behavior of \p RealFile. Status getStatus(const Twine &RequestedName) const { return Status::copyWithNewName(Stat, RequestedName); } InMemoryNode *getChild(StringRef Name) { auto I = Entries.find(Name); if (I != Entries.end()) return I->second.get(); return nullptr; } InMemoryNode *addChild(StringRef Name, std::unique_ptr<InMemoryNode> Child) { return Entries.insert(make_pair(Name, std::move(Child))) .first->second.get(); } using const_iterator = decltype(Entries)::const_iterator; const_iterator begin() const { return Entries.begin(); } const_iterator end() const { return Entries.end(); } std::string toString(unsigned Indent) const override { std::string Result = (std::string(Indent, ' ') + Stat.getName() + "\n").str(); for (const auto &Entry : Entries) Result += Entry.second->toString(Indent + 2); return Result; } static bool classof(const InMemoryNode *N) { return N->getKind() == IME_Directory; } }; namespace { Status getNodeStatus(const InMemoryNode *Node, const Twine &RequestedName) { if (auto Dir = dyn_cast<detail::InMemoryDirectory>(Node)) return Dir->getStatus(RequestedName); if (auto File = dyn_cast<detail::InMemoryFile>(Node)) return File->getStatus(RequestedName); if (auto Link = dyn_cast<detail::InMemoryHardLink>(Node)) return Link->getResolvedFile().getStatus(RequestedName); llvm_unreachable("Unknown node type"); } } // namespace } // namespace detail InMemoryFileSystem::InMemoryFileSystem(bool UseNormalizedPaths) : Root(new detail::InMemoryDirectory( Status("", getNextVirtualUniqueID(), llvm::sys::TimePoint<>(), 0, 0, 0, llvm::sys::fs::file_type::directory_file, llvm::sys::fs::perms::all_all))), UseNormalizedPaths(UseNormalizedPaths) {} InMemoryFileSystem::~InMemoryFileSystem() = default; std::string InMemoryFileSystem::toString() const { return Root->toString(/*Indent=*/0); } bool InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime, std::unique_ptr<llvm::MemoryBuffer> Buffer, Optional<uint32_t> User, Optional<uint32_t> Group, Optional<llvm::sys::fs::file_type> Type, Optional<llvm::sys::fs::perms> Perms, const detail::InMemoryFile *HardLinkTarget) { SmallString<128> Path; P.toVector(Path); // Fix up relative paths. This just prepends the current working directory. std::error_code EC = makeAbsolute(Path); assert(!EC); (void)EC; if (useNormalizedPaths()) llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); if (Path.empty()) return false; detail::InMemoryDirectory *Dir = Root.get(); auto I = llvm::sys::path::begin(Path), E = sys::path::end(Path); const auto ResolvedUser = User.getValueOr(0); const auto ResolvedGroup = Group.getValueOr(0); const auto ResolvedType = Type.getValueOr(sys::fs::file_type::regular_file); const auto ResolvedPerms = Perms.getValueOr(sys::fs::all_all); assert(!(HardLinkTarget && Buffer) && "HardLink cannot have a buffer"); // Any intermediate directories we create should be accessible by // the owner, even if Perms says otherwise for the final path. const auto NewDirectoryPerms = ResolvedPerms | sys::fs::owner_all; while (true) { StringRef Name = *I; detail::InMemoryNode *Node = Dir->getChild(Name); ++I; if (!Node) { if (I == E) { // End of the path. std::unique_ptr<detail::InMemoryNode> Child; if (HardLinkTarget) Child.reset(new detail::InMemoryHardLink(P.str(), *HardLinkTarget)); else { // Create a new file or directory. Status Stat(P.str(), getNextVirtualUniqueID(), llvm::sys::toTimePoint(ModificationTime), ResolvedUser, ResolvedGroup, Buffer->getBufferSize(), ResolvedType, ResolvedPerms); if (ResolvedType == sys::fs::file_type::directory_file) { Child.reset(new detail::InMemoryDirectory(std::move(Stat))); } else { Child.reset( new detail::InMemoryFile(std::move(Stat), std::move(Buffer))); } } Dir->addChild(Name, std::move(Child)); return true; } // Create a new directory. Use the path up to here. Status Stat( StringRef(Path.str().begin(), Name.end() - Path.str().begin()), getNextVirtualUniqueID(), llvm::sys::toTimePoint(ModificationTime), ResolvedUser, ResolvedGroup, 0, sys::fs::file_type::directory_file, NewDirectoryPerms); Dir = cast<detail::InMemoryDirectory>(Dir->addChild( Name, std::make_unique<detail::InMemoryDirectory>(std::move(Stat)))); continue; } if (auto *NewDir = dyn_cast<detail::InMemoryDirectory>(Node)) { Dir = NewDir; } else { assert((isa<detail::InMemoryFile>(Node) || isa<detail::InMemoryHardLink>(Node)) && "Must be either file, hardlink or directory!"); // Trying to insert a directory in place of a file. if (I != E) return false; // Return false only if the new file is different from the existing one. if (auto Link = dyn_cast<detail::InMemoryHardLink>(Node)) { return Link->getResolvedFile().getBuffer()->getBuffer() == Buffer->getBuffer(); } return cast<detail::InMemoryFile>(Node)->getBuffer()->getBuffer() == Buffer->getBuffer(); } } } bool InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime, std::unique_ptr<llvm::MemoryBuffer> Buffer, Optional<uint32_t> User, Optional<uint32_t> Group, Optional<llvm::sys::fs::file_type> Type, Optional<llvm::sys::fs::perms> Perms) { return addFile(P, ModificationTime, std::move(Buffer), User, Group, Type, Perms, /*HardLinkTarget=*/nullptr); } bool InMemoryFileSystem::addFileNoOwn(const Twine &P, time_t ModificationTime, llvm::MemoryBuffer *Buffer, Optional<uint32_t> User, Optional<uint32_t> Group, Optional<llvm::sys::fs::file_type> Type, Optional<llvm::sys::fs::perms> Perms) { return addFile(P, ModificationTime, llvm::MemoryBuffer::getMemBuffer( Buffer->getBuffer(), Buffer->getBufferIdentifier()), std::move(User), std::move(Group), std::move(Type), std::move(Perms)); } static ErrorOr<const detail::InMemoryNode *> lookupInMemoryNode(const InMemoryFileSystem &FS, detail::InMemoryDirectory *Dir, const Twine &P) { SmallString<128> Path; P.toVector(Path); // Fix up relative paths. This just prepends the current working directory. std::error_code EC = FS.makeAbsolute(Path); assert(!EC); (void)EC; if (FS.useNormalizedPaths()) llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); if (Path.empty()) return Dir; auto I = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (true) { detail::InMemoryNode *Node = Dir->getChild(*I); ++I; if (!Node) return errc::no_such_file_or_directory; // Return the file if it's at the end of the path. if (auto File = dyn_cast<detail::InMemoryFile>(Node)) { if (I == E) return File; return errc::no_such_file_or_directory; } // If Node is HardLink then return the resolved file. if (auto File = dyn_cast<detail::InMemoryHardLink>(Node)) { if (I == E) return &File->getResolvedFile(); return errc::no_such_file_or_directory; } // Traverse directories. Dir = cast<detail::InMemoryDirectory>(Node); if (I == E) return Dir; } } bool InMemoryFileSystem::addHardLink(const Twine &FromPath, const Twine &ToPath) { auto FromNode = lookupInMemoryNode(*this, Root.get(), FromPath); auto ToNode = lookupInMemoryNode(*this, Root.get(), ToPath); // FromPath must not have been added before. ToPath must have been added // before. Resolved ToPath must be a File. if (!ToNode || FromNode || !isa<detail::InMemoryFile>(*ToNode)) return false; return this->addFile(FromPath, 0, nullptr, None, None, None, None, cast<detail::InMemoryFile>(*ToNode)); } llvm::ErrorOr<Status> InMemoryFileSystem::status(const Twine &Path) { auto Node = lookupInMemoryNode(*this, Root.get(), Path); if (Node) return detail::getNodeStatus(*Node, Path); return Node.getError(); } llvm::ErrorOr<std::unique_ptr<File>> InMemoryFileSystem::openFileForRead(const Twine &Path) { auto Node = lookupInMemoryNode(*this, Root.get(), Path); if (!Node) return Node.getError(); // When we have a file provide a heap-allocated wrapper for the memory buffer // to match the ownership semantics for File. if (auto *F = dyn_cast<detail::InMemoryFile>(*Node)) return std::unique_ptr<File>( new detail::InMemoryFileAdaptor(*F, Path.str())); // FIXME: errc::not_a_file? return make_error_code(llvm::errc::invalid_argument); } namespace { /// Adaptor from InMemoryDir::iterator to directory_iterator. class InMemoryDirIterator : public llvm::vfs::detail::DirIterImpl { detail::InMemoryDirectory::const_iterator I; detail::InMemoryDirectory::const_iterator E; std::string RequestedDirName; void setCurrentEntry() { if (I != E) { SmallString<256> Path(RequestedDirName); llvm::sys::path::append(Path, I->second->getFileName()); sys::fs::file_type Type = sys::fs::file_type::type_unknown; switch (I->second->getKind()) { case detail::IME_File: case detail::IME_HardLink: Type = sys::fs::file_type::regular_file; break; case detail::IME_Directory: Type = sys::fs::file_type::directory_file; break; } CurrentEntry = directory_entry(Path.str(), Type); } else { // When we're at the end, make CurrentEntry invalid and DirIterImpl will // do the rest. CurrentEntry = directory_entry(); } } public: InMemoryDirIterator() = default; explicit InMemoryDirIterator(const detail::InMemoryDirectory &Dir, std::string RequestedDirName) : I(Dir.begin()), E(Dir.end()), RequestedDirName(std::move(RequestedDirName)) { setCurrentEntry(); } std::error_code increment() override { ++I; setCurrentEntry(); return {}; } }; } // namespace directory_iterator InMemoryFileSystem::dir_begin(const Twine &Dir, std::error_code &EC) { auto Node = lookupInMemoryNode(*this, Root.get(), Dir); if (!Node) { EC = Node.getError(); return directory_iterator(std::make_shared<InMemoryDirIterator>()); } if (auto *DirNode = dyn_cast<detail::InMemoryDirectory>(*Node)) return directory_iterator( std::make_shared<InMemoryDirIterator>(*DirNode, Dir.str())); EC = make_error_code(llvm::errc::not_a_directory); return directory_iterator(std::make_shared<InMemoryDirIterator>()); } std::error_code InMemoryFileSystem::setCurrentWorkingDirectory(const Twine &P) { SmallString<128> Path; P.toVector(Path); // Fix up relative paths. This just prepends the current working directory. std::error_code EC = makeAbsolute(Path); assert(!EC); (void)EC; if (useNormalizedPaths()) llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); if (!Path.empty()) WorkingDirectory = Path.str(); return {}; } std::error_code InMemoryFileSystem::getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const { auto CWD = getCurrentWorkingDirectory(); if (!CWD || CWD->empty()) return errc::operation_not_permitted; Path.toVector(Output); if (auto EC = makeAbsolute(Output)) return EC; llvm::sys::path::remove_dots(Output, /*remove_dot_dot=*/true); return {}; } std::error_code InMemoryFileSystem::isLocal(const Twine &Path, bool &Result) { Result = false; return {}; } } // namespace vfs } // namespace llvm //===-----------------------------------------------------------------------===/ // RedirectingFileSystem implementation //===-----------------------------------------------------------------------===/ RedirectingFileSystem::RedirectingFileSystem(IntrusiveRefCntPtr<FileSystem> FS) : ExternalFS(std::move(FS)) { if (ExternalFS) if (auto ExternalWorkingDirectory = ExternalFS->getCurrentWorkingDirectory()) { WorkingDirectory = *ExternalWorkingDirectory; ExternalFSValidWD = true; } } // FIXME: reuse implementation common with OverlayFSDirIterImpl as these // iterators are conceptually similar. class llvm::vfs::VFSFromYamlDirIterImpl : public llvm::vfs::detail::DirIterImpl { std::string Dir; RedirectingFileSystem::RedirectingDirectoryEntry::iterator Current, End; // To handle 'fallthrough' mode we need to iterate at first through // RedirectingDirectoryEntry and then through ExternalFS. These operations are // done sequentially, we just need to keep a track of what kind of iteration // we are currently performing. /// Flag telling if we should iterate through ExternalFS or stop at the last /// RedirectingDirectoryEntry::iterator. bool IterateExternalFS; /// Flag telling if we have switched to iterating through ExternalFS. bool IsExternalFSCurrent = false; FileSystem &ExternalFS; directory_iterator ExternalDirIter; llvm::StringSet<> SeenNames; /// To combine multiple iterations, different methods are responsible for /// different iteration steps. /// @{ /// Responsible for dispatching between RedirectingDirectoryEntry iteration /// and ExternalFS iteration. std::error_code incrementImpl(bool IsFirstTime); /// Responsible for RedirectingDirectoryEntry iteration. std::error_code incrementContent(bool IsFirstTime); /// Responsible for ExternalFS iteration. std::error_code incrementExternal(); /// @} public: VFSFromYamlDirIterImpl( const Twine &Path, RedirectingFileSystem::RedirectingDirectoryEntry::iterator Begin, RedirectingFileSystem::RedirectingDirectoryEntry::iterator End, bool IterateExternalFS, FileSystem &ExternalFS, std::error_code &EC); std::error_code increment() override; }; llvm::ErrorOr<std::string> RedirectingFileSystem::getCurrentWorkingDirectory() const { return WorkingDirectory; } std::error_code RedirectingFileSystem::setCurrentWorkingDirectory(const Twine &Path) { // Don't change the working directory if the path doesn't exist. if (!exists(Path)) return errc::no_such_file_or_directory; // Always change the external FS but ignore its result. if (ExternalFS) { auto EC = ExternalFS->setCurrentWorkingDirectory(Path); ExternalFSValidWD = !static_cast<bool>(EC); } SmallString<128> AbsolutePath; Path.toVector(AbsolutePath); if (std::error_code EC = makeAbsolute(AbsolutePath)) return EC; WorkingDirectory = AbsolutePath.str(); return {}; } std::error_code RedirectingFileSystem::isLocal(const Twine &Path, bool &Result) { return ExternalFS->isLocal(Path, Result); } std::error_code RedirectingFileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { if (llvm::sys::path::is_absolute(Path, llvm::sys::path::Style::posix) || llvm::sys::path::is_absolute(Path, llvm::sys::path::Style::windows)) return {}; auto WorkingDir = getCurrentWorkingDirectory(); if (!WorkingDir) return WorkingDir.getError(); llvm::sys::fs::make_absolute(WorkingDir.get(), Path); return {}; } directory_iterator RedirectingFileSystem::dir_begin(const Twine &Dir, std::error_code &EC) { ErrorOr<RedirectingFileSystem::Entry *> E = lookupPath(Dir); if (!E) { EC = E.getError(); if (shouldUseExternalFS() && EC == errc::no_such_file_or_directory) return ExternalFS->dir_begin(Dir, EC); return {}; } ErrorOr<Status> S = status(Dir, *E); if (!S) { EC = S.getError(); return {}; } if (!S->isDirectory()) { EC = std::error_code(static_cast<int>(errc::not_a_directory), std::system_category()); return {}; } auto *D = cast<RedirectingFileSystem::RedirectingDirectoryEntry>(*E); return directory_iterator(std::make_shared<VFSFromYamlDirIterImpl>( Dir, D->contents_begin(), D->contents_end(), /*IterateExternalFS=*/shouldUseExternalFS(), *ExternalFS, EC)); } void RedirectingFileSystem::setExternalContentsPrefixDir(StringRef PrefixDir) { ExternalContentsPrefixDir = PrefixDir.str(); } StringRef RedirectingFileSystem::getExternalContentsPrefixDir() const { return ExternalContentsPrefixDir; } void RedirectingFileSystem::dump(raw_ostream &OS) const { for (const auto &Root : Roots) dumpEntry(OS, Root.get()); } void RedirectingFileSystem::dumpEntry(raw_ostream &OS, RedirectingFileSystem::Entry *E, int NumSpaces) const { StringRef Name = E->getName(); for (int i = 0, e = NumSpaces; i < e; ++i) OS << " "; OS << "'" << Name.str().c_str() << "'" << "\n"; if (E->getKind() == RedirectingFileSystem::EK_Directory) { auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(E); assert(DE && "Should be a directory"); for (std::unique_ptr<Entry> &SubEntry : llvm::make_range(DE->contents_begin(), DE->contents_end())) dumpEntry(OS, SubEntry.get(), NumSpaces + 2); } } #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void RedirectingFileSystem::dump() const { dump(dbgs()); } #endif /// A helper class to hold the common YAML parsing state. class llvm::vfs::RedirectingFileSystemParser { yaml::Stream &Stream; void error(yaml::Node *N, const Twine &Msg) { Stream.printError(N, Msg); } // false on error bool parseScalarString(yaml::Node *N, StringRef &Result, SmallVectorImpl<char> &Storage) { const auto *S = dyn_cast<yaml::ScalarNode>(N); if (!S) { error(N, "expected string"); return false; } Result = S->getValue(Storage); return true; } // false on error bool parseScalarBool(yaml::Node *N, bool &Result) { SmallString<5> Storage; StringRef Value; if (!parseScalarString(N, Value, Storage)) return false; if (Value.equals_lower("true") || Value.equals_lower("on") || Value.equals_lower("yes") || Value == "1") { Result = true; return true; } else if (Value.equals_lower("false") || Value.equals_lower("off") || Value.equals_lower("no") || Value == "0") { Result = false; return true; } error(N, "expected boolean value"); return false; } struct KeyStatus { bool Required; bool Seen = false; KeyStatus(bool Required = false) : Required(Required) {} }; using KeyStatusPair = std::pair<StringRef, KeyStatus>; // false on error bool checkDuplicateOrUnknownKey(yaml::Node *KeyNode, StringRef Key, DenseMap<StringRef, KeyStatus> &Keys) { if (!Keys.count(Key)) { error(KeyNode, "unknown key"); return false; } KeyStatus &S = Keys[Key]; if (S.Seen) { error(KeyNode, Twine("duplicate key '") + Key + "'"); return false; } S.Seen = true; return true; } // false on error bool checkMissingKeys(yaml::Node *Obj, DenseMap<StringRef, KeyStatus> &Keys) { for (const auto &I : Keys) { if (I.second.Required && !I.second.Seen) { error(Obj, Twine("missing key '") + I.first + "'"); return false; } } return true; } RedirectingFileSystem::Entry * lookupOrCreateEntry(RedirectingFileSystem *FS, StringRef Name, RedirectingFileSystem::Entry *ParentEntry = nullptr) { if (!ParentEntry) { // Look for a existent root for (const auto &Root : FS->Roots) { if (Name.equals(Root->getName())) { ParentEntry = Root.get(); return ParentEntry; } } } else { // Advance to the next component auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>( ParentEntry); for (std::unique_ptr<RedirectingFileSystem::Entry> &Content : llvm::make_range(DE->contents_begin(), DE->contents_end())) { auto *DirContent = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>( Content.get()); if (DirContent && Name.equals(Content->getName())) return DirContent; } } // ... or create a new one std::unique_ptr<RedirectingFileSystem::Entry> E = std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( Name, Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, file_type::directory_file, sys::fs::all_all)); if (!ParentEntry) { // Add a new root to the overlay FS->Roots.push_back(std::move(E)); ParentEntry = FS->Roots.back().get(); return ParentEntry; } auto *DE = cast<RedirectingFileSystem::RedirectingDirectoryEntry>(ParentEntry); DE->addContent(std::move(E)); return DE->getLastContent(); } void uniqueOverlayTree(RedirectingFileSystem *FS, RedirectingFileSystem::Entry *SrcE, RedirectingFileSystem::Entry *NewParentE = nullptr) { StringRef Name = SrcE->getName(); switch (SrcE->getKind()) { case RedirectingFileSystem::EK_Directory: { auto *DE = cast<RedirectingFileSystem::RedirectingDirectoryEntry>(SrcE); // Empty directories could be present in the YAML as a way to // describe a file for a current directory after some of its subdir // is parsed. This only leads to redundant walks, ignore it. if (!Name.empty()) NewParentE = lookupOrCreateEntry(FS, Name, NewParentE); for (std::unique_ptr<RedirectingFileSystem::Entry> &SubEntry : llvm::make_range(DE->contents_begin(), DE->contents_end())) uniqueOverlayTree(FS, SubEntry.get(), NewParentE); break; } case RedirectingFileSystem::EK_File: { assert(NewParentE && "Parent entry must exist"); auto *FE = cast<RedirectingFileSystem::RedirectingFileEntry>(SrcE); auto *DE = cast<RedirectingFileSystem::RedirectingDirectoryEntry>(NewParentE); DE->addContent( std::make_unique<RedirectingFileSystem::RedirectingFileEntry>( Name, FE->getExternalContentsPath(), FE->getUseName())); break; } } } std::unique_ptr<RedirectingFileSystem::Entry> parseEntry(yaml::Node *N, RedirectingFileSystem *FS, bool IsRootEntry) { auto *M = dyn_cast<yaml::MappingNode>(N); if (!M) { error(N, "expected mapping node for file or directory entry"); return nullptr; } KeyStatusPair Fields[] = { KeyStatusPair("name", true), KeyStatusPair("type", true), KeyStatusPair("contents", false), KeyStatusPair("external-contents", false), KeyStatusPair("use-external-name", false), }; DenseMap<StringRef, KeyStatus> Keys(std::begin(Fields), std::end(Fields)); bool HasContents = false; // external or otherwise std::vector<std::unique_ptr<RedirectingFileSystem::Entry>> EntryArrayContents; std::string ExternalContentsPath; std::string Name; yaml::Node *NameValueNode = nullptr; auto UseExternalName = RedirectingFileSystem::RedirectingFileEntry::NK_NotSet; RedirectingFileSystem::EntryKind Kind; for (auto &I : *M) { StringRef Key; // Reuse the buffer for key and value, since we don't look at key after // parsing value. SmallString<256> Buffer; if (!parseScalarString(I.getKey(), Key, Buffer)) return nullptr; if (!checkDuplicateOrUnknownKey(I.getKey(), Key, Keys)) return nullptr; StringRef Value; if (Key == "name") { if (!parseScalarString(I.getValue(), Value, Buffer)) return nullptr; NameValueNode = I.getValue(); if (FS->UseCanonicalizedPaths) { SmallString<256> Path(Value); // Guarantee that old YAML files containing paths with ".." and "." // are properly canonicalized before read into the VFS. Path = sys::path::remove_leading_dotslash(Path); sys::path::remove_dots(Path, /*remove_dot_dot=*/true); Name = Path.str(); } else { Name = Value; } } else if (Key == "type") { if (!parseScalarString(I.getValue(), Value, Buffer)) return nullptr; if (Value == "file") Kind = RedirectingFileSystem::EK_File; else if (Value == "directory") Kind = RedirectingFileSystem::EK_Directory; else { error(I.getValue(), "unknown value for 'type'"); return nullptr; } } else if (Key == "contents") { if (HasContents) { error(I.getKey(), "entry already has 'contents' or 'external-contents'"); return nullptr; } HasContents = true; auto *Contents = dyn_cast<yaml::SequenceNode>(I.getValue()); if (!Contents) { // FIXME: this is only for directories, what about files? error(I.getValue(), "expected array"); return nullptr; } for (auto &I : *Contents) { if (std::unique_ptr<RedirectingFileSystem::Entry> E = parseEntry(&I, FS, /*IsRootEntry*/ false)) EntryArrayContents.push_back(std::move(E)); else return nullptr; } } else if (Key == "external-contents") { if (HasContents) { error(I.getKey(), "entry already has 'contents' or 'external-contents'"); return nullptr; } HasContents = true; if (!parseScalarString(I.getValue(), Value, Buffer)) return nullptr; SmallString<256> FullPath; if (FS->IsRelativeOverlay) { FullPath = FS->getExternalContentsPrefixDir(); assert(!FullPath.empty() && "External contents prefix directory must exist"); llvm::sys::path::append(FullPath, Value); } else { FullPath = Value; } if (FS->UseCanonicalizedPaths) { // Guarantee that old YAML files containing paths with ".." and "." // are properly canonicalized before read into the VFS. FullPath = sys::path::remove_leading_dotslash(FullPath); sys::path::remove_dots(FullPath, /*remove_dot_dot=*/true); } ExternalContentsPath = FullPath.str(); } else if (Key == "use-external-name") { bool Val; if (!parseScalarBool(I.getValue(), Val)) return nullptr; UseExternalName = Val ? RedirectingFileSystem::RedirectingFileEntry::NK_External : RedirectingFileSystem::RedirectingFileEntry::NK_Virtual; } else { llvm_unreachable("key missing from Keys"); } } if (Stream.failed()) return nullptr; // check for missing keys if (!HasContents) { error(N, "missing key 'contents' or 'external-contents'"); return nullptr; } if (!checkMissingKeys(N, Keys)) return nullptr; // check invalid configuration if (Kind == RedirectingFileSystem::EK_Directory && UseExternalName != RedirectingFileSystem::RedirectingFileEntry::NK_NotSet) { error(N, "'use-external-name' is not supported for directories"); return nullptr; } sys::path::Style path_style = sys::path::Style::native; if (IsRootEntry) { // VFS root entries may be in either Posix or Windows style. Figure out // which style we have, and use it consistently. if (sys::path::is_absolute(Name, sys::path::Style::posix)) { path_style = sys::path::Style::posix; } else if (sys::path::is_absolute(Name, sys::path::Style::windows)) { path_style = sys::path::Style::windows; } else { assert(NameValueNode && "Name presence should be checked earlier"); error(NameValueNode, "entry with relative path at the root level is not discoverable"); return nullptr; } } // Remove trailing slash(es), being careful not to remove the root path StringRef Trimmed(Name); size_t RootPathLen = sys::path::root_path(Trimmed, path_style).size(); while (Trimmed.size() > RootPathLen && sys::path::is_separator(Trimmed.back(), path_style)) Trimmed = Trimmed.slice(0, Trimmed.size() - 1); // Get the last component StringRef LastComponent = sys::path::filename(Trimmed, path_style); std::unique_ptr<RedirectingFileSystem::Entry> Result; switch (Kind) { case RedirectingFileSystem::EK_File: Result = std::make_unique<RedirectingFileSystem::RedirectingFileEntry>( LastComponent, std::move(ExternalContentsPath), UseExternalName); break; case RedirectingFileSystem::EK_Directory: Result = std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( LastComponent, std::move(EntryArrayContents), Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, file_type::directory_file, sys::fs::all_all)); break; } StringRef Parent = sys::path::parent_path(Trimmed, path_style); if (Parent.empty()) return Result; // if 'name' contains multiple components, create implicit directory entries for (sys::path::reverse_iterator I = sys::path::rbegin(Parent, path_style), E = sys::path::rend(Parent); I != E; ++I) { std::vector<std::unique_ptr<RedirectingFileSystem::Entry>> Entries; Entries.push_back(std::move(Result)); Result = std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( *I, std::move(Entries), Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, file_type::directory_file, sys::fs::all_all)); } return Result; } public: RedirectingFileSystemParser(yaml::Stream &S) : Stream(S) {} // false on error bool parse(yaml::Node *Root, RedirectingFileSystem *FS) { auto *Top = dyn_cast<yaml::MappingNode>(Root); if (!Top) { error(Root, "expected mapping node"); return false; } KeyStatusPair Fields[] = { KeyStatusPair("version", true), KeyStatusPair("case-sensitive", false), KeyStatusPair("use-external-names", false), KeyStatusPair("overlay-relative", false), KeyStatusPair("fallthrough", false), KeyStatusPair("roots", true), }; DenseMap<StringRef, KeyStatus> Keys(std::begin(Fields), std::end(Fields)); std::vector<std::unique_ptr<RedirectingFileSystem::Entry>> RootEntries; // Parse configuration and 'roots' for (auto &I : *Top) { SmallString<10> KeyBuffer; StringRef Key; if (!parseScalarString(I.getKey(), Key, KeyBuffer)) return false; if (!checkDuplicateOrUnknownKey(I.getKey(), Key, Keys)) return false; if (Key == "roots") { auto *Roots = dyn_cast<yaml::SequenceNode>(I.getValue()); if (!Roots) { error(I.getValue(), "expected array"); return false; } for (auto &I : *Roots) { if (std::unique_ptr<RedirectingFileSystem::Entry> E = parseEntry(&I, FS, /*IsRootEntry*/ true)) RootEntries.push_back(std::move(E)); else return false; } } else if (Key == "version") { StringRef VersionString; SmallString<4> Storage; if (!parseScalarString(I.getValue(), VersionString, Storage)) return false; int Version; if (VersionString.getAsInteger<int>(10, Version)) { error(I.getValue(), "expected integer"); return false; } if (Version < 0) { error(I.getValue(), "invalid version number"); return false; } if (Version != 0) { error(I.getValue(), "version mismatch, expected 0"); return false; } } else if (Key == "case-sensitive") { if (!parseScalarBool(I.getValue(), FS->CaseSensitive)) return false; } else if (Key == "overlay-relative") { if (!parseScalarBool(I.getValue(), FS->IsRelativeOverlay)) return false; } else if (Key == "use-external-names") { if (!parseScalarBool(I.getValue(), FS->UseExternalNames)) return false; } else if (Key == "fallthrough") { if (!parseScalarBool(I.getValue(), FS->IsFallthrough)) return false; } else { llvm_unreachable("key missing from Keys"); } } if (Stream.failed()) return false; if (!checkMissingKeys(Top, Keys)) return false; // Now that we sucessefully parsed the YAML file, canonicalize the internal // representation to a proper directory tree so that we can search faster // inside the VFS. for (auto &E : RootEntries) uniqueOverlayTree(FS, E.get()); return true; } }; RedirectingFileSystem * RedirectingFileSystem::create(std::unique_ptr<MemoryBuffer> Buffer, SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, void *DiagContext, IntrusiveRefCntPtr<FileSystem> ExternalFS) { SourceMgr SM; yaml::Stream Stream(Buffer->getMemBufferRef(), SM); SM.setDiagHandler(DiagHandler, DiagContext); yaml::document_iterator DI = Stream.begin(); yaml::Node *Root = DI->getRoot(); if (DI == Stream.end() || !Root) { SM.PrintMessage(SMLoc(), SourceMgr::DK_Error, "expected root node"); return nullptr; } RedirectingFileSystemParser P(Stream); std::unique_ptr<RedirectingFileSystem> FS( new RedirectingFileSystem(ExternalFS)); if (!YAMLFilePath.empty()) { // Use the YAML path from -ivfsoverlay to compute the dir to be prefixed // to each 'external-contents' path. // // Example: // -ivfsoverlay dummy.cache/vfs/vfs.yaml // yields: // FS->ExternalContentsPrefixDir => /<absolute_path_to>/dummy.cache/vfs // SmallString<256> OverlayAbsDir = sys::path::parent_path(YAMLFilePath); std::error_code EC = llvm::sys::fs::make_absolute(OverlayAbsDir); assert(!EC && "Overlay dir final path must be absolute"); (void)EC; FS->setExternalContentsPrefixDir(OverlayAbsDir); } if (!P.parse(Root, FS.get())) return nullptr; return FS.release(); } ErrorOr<RedirectingFileSystem::Entry *> RedirectingFileSystem::lookupPath(const Twine &Path_) const { SmallString<256> Path; Path_.toVector(Path); // Handle relative paths if (std::error_code EC = makeAbsolute(Path)) return EC; // Canonicalize path by removing ".", "..", "./", etc components. This is // a VFS request, do bot bother about symlinks in the path components // but canonicalize in order to perform the correct entry search. if (UseCanonicalizedPaths) { Path = sys::path::remove_leading_dotslash(Path); sys::path::remove_dots(Path, /*remove_dot_dot=*/true); } if (Path.empty()) return make_error_code(llvm::errc::invalid_argument); sys::path::const_iterator Start = sys::path::begin(Path); sys::path::const_iterator End = sys::path::end(Path); for (const auto &Root : Roots) { ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Start, End, Root.get()); if (Result || Result.getError() != llvm::errc::no_such_file_or_directory) return Result; } return make_error_code(llvm::errc::no_such_file_or_directory); } ErrorOr<RedirectingFileSystem::Entry *> RedirectingFileSystem::lookupPath(sys::path::const_iterator Start, sys::path::const_iterator End, RedirectingFileSystem::Entry *From) const { #ifndef _WIN32 assert(!isTraversalComponent(*Start) && !isTraversalComponent(From->getName()) && "Paths should not contain traversal components"); #else // FIXME: this is here to support windows, remove it once canonicalized // paths become globally default. if (Start->equals(".")) ++Start; #endif StringRef FromName = From->getName(); // Forward the search to the next component in case this is an empty one. if (!FromName.empty()) { if (!pathComponentMatches(*Start, FromName)) return make_error_code(llvm::errc::no_such_file_or_directory); ++Start; if (Start == End) { // Match! return From; } } auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(From); if (!DE) return make_error_code(llvm::errc::not_a_directory); for (const std::unique_ptr<RedirectingFileSystem::Entry> &DirEntry : llvm::make_range(DE->contents_begin(), DE->contents_end())) { ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Start, End, DirEntry.get()); if (Result || Result.getError() != llvm::errc::no_such_file_or_directory) return Result; } return make_error_code(llvm::errc::no_such_file_or_directory); } static Status getRedirectedFileStatus(const Twine &Path, bool UseExternalNames, Status ExternalStatus) { Status S = ExternalStatus; if (!UseExternalNames) S = Status::copyWithNewName(S, Path); S.IsVFSMapped = true; return S; } ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path, RedirectingFileSystem::Entry *E) { assert(E != nullptr); if (auto *F = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(E)) { ErrorOr<Status> S = ExternalFS->status(F->getExternalContentsPath()); assert(!S || S->getName() == F->getExternalContentsPath()); if (S) return getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), *S); return S; } else { // directory auto *DE = cast<RedirectingFileSystem::RedirectingDirectoryEntry>(E); return Status::copyWithNewName(DE->getStatus(), Path); } } ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path) { ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path); if (!Result) { if (shouldUseExternalFS() && Result.getError() == llvm::errc::no_such_file_or_directory) { return ExternalFS->status(Path); } return Result.getError(); } return status(Path, *Result); } namespace { /// Provide a file wrapper with an overriden status. class FileWithFixedStatus : public File { std::unique_ptr<File> InnerFile; Status S; public: FileWithFixedStatus(std::unique_ptr<File> InnerFile, Status S) : InnerFile(std::move(InnerFile)), S(std::move(S)) {} ErrorOr<Status> status() override { return S; } ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> getBuffer(const Twine &Name, int64_t FileSize, bool RequiresNullTerminator, bool IsVolatile) override { return InnerFile->getBuffer(Name, FileSize, RequiresNullTerminator, IsVolatile); } std::error_code close() override { return InnerFile->close(); } }; } // namespace ErrorOr<std::unique_ptr<File>> RedirectingFileSystem::openFileForRead(const Twine &Path) { ErrorOr<RedirectingFileSystem::Entry *> E = lookupPath(Path); if (!E) { if (shouldUseExternalFS() && E.getError() == llvm::errc::no_such_file_or_directory) { return ExternalFS->openFileForRead(Path); } return E.getError(); } auto *F = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(*E); if (!F) // FIXME: errc::not_a_file? return make_error_code(llvm::errc::invalid_argument); auto Result = ExternalFS->openFileForRead(F->getExternalContentsPath()); if (!Result) return Result; auto ExternalStatus = (*Result)->status(); if (!ExternalStatus) return ExternalStatus.getError(); // FIXME: Update the status with the name and VFSMapped. Status S = getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), *ExternalStatus); return std::unique_ptr<File>( std::make_unique<FileWithFixedStatus>(std::move(*Result), S)); } std::error_code RedirectingFileSystem::getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const { ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path); if (!Result) { if (shouldUseExternalFS() && Result.getError() == llvm::errc::no_such_file_or_directory) { return ExternalFS->getRealPath(Path, Output); } return Result.getError(); } if (auto *F = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(*Result)) { return ExternalFS->getRealPath(F->getExternalContentsPath(), Output); } // Even if there is a directory entry, fall back to ExternalFS if allowed, // because directories don't have a single external contents path. return shouldUseExternalFS() ? ExternalFS->getRealPath(Path, Output) : llvm::errc::invalid_argument; } IntrusiveRefCntPtr<FileSystem> vfs::getVFSFromYAML(std::unique_ptr<MemoryBuffer> Buffer, SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, void *DiagContext, IntrusiveRefCntPtr<FileSystem> ExternalFS) { return RedirectingFileSystem::create(std::move(Buffer), DiagHandler, YAMLFilePath, DiagContext, std::move(ExternalFS)); } static void getVFSEntries(RedirectingFileSystem::Entry *SrcE, SmallVectorImpl<StringRef> &Path, SmallVectorImpl<YAMLVFSEntry> &Entries) { auto Kind = SrcE->getKind(); if (Kind == RedirectingFileSystem::EK_Directory) { auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(SrcE); assert(DE && "Must be a directory"); for (std::unique_ptr<RedirectingFileSystem::Entry> &SubEntry : llvm::make_range(DE->contents_begin(), DE->contents_end())) { Path.push_back(SubEntry->getName()); getVFSEntries(SubEntry.get(), Path, Entries); Path.pop_back(); } return; } assert(Kind == RedirectingFileSystem::EK_File && "Must be a EK_File"); auto *FE = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(SrcE); assert(FE && "Must be a file"); SmallString<128> VPath; for (auto &Comp : Path) llvm::sys::path::append(VPath, Comp); Entries.push_back(YAMLVFSEntry(VPath.c_str(), FE->getExternalContentsPath())); } void vfs::collectVFSFromYAML(std::unique_ptr<MemoryBuffer> Buffer, SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, SmallVectorImpl<YAMLVFSEntry> &CollectedEntries, void *DiagContext, IntrusiveRefCntPtr<FileSystem> ExternalFS) { RedirectingFileSystem *VFS = RedirectingFileSystem::create( std::move(Buffer), DiagHandler, YAMLFilePath, DiagContext, std::move(ExternalFS)); ErrorOr<RedirectingFileSystem::Entry *> RootE = VFS->lookupPath("/"); if (!RootE) return; SmallVector<StringRef, 8> Components; Components.push_back("/"); getVFSEntries(*RootE, Components, CollectedEntries); } UniqueID vfs::getNextVirtualUniqueID() { static std::atomic<unsigned> UID; unsigned ID = ++UID; // The following assumes that uint64_t max will never collide with a real // dev_t value from the OS. return UniqueID(std::numeric_limits<uint64_t>::max(), ID); } void YAMLVFSWriter::addEntry(StringRef VirtualPath, StringRef RealPath, bool IsDirectory) { assert(sys::path::is_absolute(VirtualPath) && "virtual path not absolute"); assert(sys::path::is_absolute(RealPath) && "real path not absolute"); assert(!pathHasTraversal(VirtualPath) && "path traversal is not supported"); Mappings.emplace_back(VirtualPath, RealPath, IsDirectory); } void YAMLVFSWriter::addFileMapping(StringRef VirtualPath, StringRef RealPath) { addEntry(VirtualPath, RealPath, /*IsDirectory=*/false); } void YAMLVFSWriter::addDirectoryMapping(StringRef VirtualPath, StringRef RealPath) { addEntry(VirtualPath, RealPath, /*IsDirectory=*/true); } namespace { class JSONWriter { llvm::raw_ostream &OS; SmallVector<StringRef, 16> DirStack; unsigned getDirIndent() { return 4 * DirStack.size(); } unsigned getFileIndent() { return 4 * (DirStack.size() + 1); } bool containedIn(StringRef Parent, StringRef Path); StringRef containedPart(StringRef Parent, StringRef Path); void startDirectory(StringRef Path); void endDirectory(); void writeEntry(StringRef VPath, StringRef RPath); public: JSONWriter(llvm::raw_ostream &OS) : OS(OS) {} void write(ArrayRef<YAMLVFSEntry> Entries, Optional<bool> UseExternalNames, Optional<bool> IsCaseSensitive, Optional<bool> IsOverlayRelative, StringRef OverlayDir); }; } // namespace bool JSONWriter::containedIn(StringRef Parent, StringRef Path) { using namespace llvm::sys; // Compare each path component. auto IParent = path::begin(Parent), EParent = path::end(Parent); for (auto IChild = path::begin(Path), EChild = path::end(Path); IParent != EParent && IChild != EChild; ++IParent, ++IChild) { if (*IParent != *IChild) return false; } // Have we exhausted the parent path? return IParent == EParent; } StringRef JSONWriter::containedPart(StringRef Parent, StringRef Path) { assert(!Parent.empty()); assert(containedIn(Parent, Path)); return Path.slice(Parent.size() + 1, StringRef::npos); } void JSONWriter::startDirectory(StringRef Path) { StringRef Name = DirStack.empty() ? Path : containedPart(DirStack.back(), Path); DirStack.push_back(Path); unsigned Indent = getDirIndent(); OS.indent(Indent) << "{\n"; OS.indent(Indent + 2) << "'type': 'directory',\n"; OS.indent(Indent + 2) << "'name': \"" << llvm::yaml::escape(Name) << "\",\n"; OS.indent(Indent + 2) << "'contents': [\n"; } void JSONWriter::endDirectory() { unsigned Indent = getDirIndent(); OS.indent(Indent + 2) << "]\n"; OS.indent(Indent) << "}"; DirStack.pop_back(); } void JSONWriter::writeEntry(StringRef VPath, StringRef RPath) { unsigned Indent = getFileIndent(); OS.indent(Indent) << "{\n"; OS.indent(Indent + 2) << "'type': 'file',\n"; OS.indent(Indent + 2) << "'name': \"" << llvm::yaml::escape(VPath) << "\",\n"; OS.indent(Indent + 2) << "'external-contents': \"" << llvm::yaml::escape(RPath) << "\"\n"; OS.indent(Indent) << "}"; } void JSONWriter::write(ArrayRef<YAMLVFSEntry> Entries, Optional<bool> UseExternalNames, Optional<bool> IsCaseSensitive, Optional<bool> IsOverlayRelative, StringRef OverlayDir) { using namespace llvm::sys; OS << "{\n" " 'version': 0,\n"; if (IsCaseSensitive.hasValue()) OS << " 'case-sensitive': '" << (IsCaseSensitive.getValue() ? "true" : "false") << "',\n"; if (UseExternalNames.hasValue()) OS << " 'use-external-names': '" << (UseExternalNames.getValue() ? "true" : "false") << "',\n"; bool UseOverlayRelative = false; if (IsOverlayRelative.hasValue()) { UseOverlayRelative = IsOverlayRelative.getValue(); OS << " 'overlay-relative': '" << (UseOverlayRelative ? "true" : "false") << "',\n"; } OS << " 'roots': [\n"; if (!Entries.empty()) { const YAMLVFSEntry &Entry = Entries.front(); bool first_entry_is_directory = Entry.IsDirectory; StringRef Dir = first_entry_is_directory ? StringRef(Entry.VPath) : path::parent_path(Entry.VPath); startDirectory(Dir); StringRef RPath = Entry.RPath; if (UseOverlayRelative) { unsigned OverlayDirLen = OverlayDir.size(); assert(RPath.substr(0, OverlayDirLen) == OverlayDir && "Overlay dir must be contained in RPath"); RPath = RPath.slice(OverlayDirLen, RPath.size()); } if (!first_entry_is_directory) writeEntry(path::filename(Entry.VPath), RPath); for (const auto &Entry : Entries.slice(1)) { StringRef Dir = Entry.IsDirectory ? StringRef(Entry.VPath) : path::parent_path(Entry.VPath); if (Dir == DirStack.back()) { if (!first_entry_is_directory) { OS << ",\n"; first_entry_is_directory = false; } } else { while (!DirStack.empty() && !containedIn(DirStack.back(), Dir)) { OS << "\n"; endDirectory(); } OS << ",\n"; startDirectory(Dir); } StringRef RPath = Entry.RPath; if (UseOverlayRelative) { unsigned OverlayDirLen = OverlayDir.size(); assert(RPath.substr(0, OverlayDirLen) == OverlayDir && "Overlay dir must be contained in RPath"); RPath = RPath.slice(OverlayDirLen, RPath.size()); } writeEntry(path::filename(Entry.VPath), RPath); } while (!DirStack.empty()) { OS << "\n"; endDirectory(); } OS << "\n"; } OS << " ]\n" << "}\n"; } void YAMLVFSWriter::write(llvm::raw_ostream &OS) { llvm::sort(Mappings, [](const YAMLVFSEntry &LHS, const YAMLVFSEntry &RHS) { return LHS.VPath < RHS.VPath; }); JSONWriter(OS).write(Mappings, UseExternalNames, IsCaseSensitive, IsOverlayRelative, OverlayDir); } VFSFromYamlDirIterImpl::VFSFromYamlDirIterImpl( const Twine &_Path, RedirectingFileSystem::RedirectingDirectoryEntry::iterator Begin, RedirectingFileSystem::RedirectingDirectoryEntry::iterator End, bool IterateExternalFS, FileSystem &ExternalFS, std::error_code &EC) : Dir(_Path.str()), Current(Begin), End(End), IterateExternalFS(IterateExternalFS), ExternalFS(ExternalFS) { EC = incrementImpl(/*IsFirstTime=*/true); } std::error_code VFSFromYamlDirIterImpl::increment() { return incrementImpl(/*IsFirstTime=*/false); } std::error_code VFSFromYamlDirIterImpl::incrementExternal() { assert(!(IsExternalFSCurrent && ExternalDirIter == directory_iterator()) && "incrementing past end"); std::error_code EC; if (IsExternalFSCurrent) { ExternalDirIter.increment(EC); } else if (IterateExternalFS) { ExternalDirIter = ExternalFS.dir_begin(Dir, EC); IsExternalFSCurrent = true; if (EC && EC != errc::no_such_file_or_directory) return EC; EC = {}; } if (EC || ExternalDirIter == directory_iterator()) { CurrentEntry = directory_entry(); } else { CurrentEntry = *ExternalDirIter; } return EC; } std::error_code VFSFromYamlDirIterImpl::incrementContent(bool IsFirstTime) { assert((IsFirstTime || Current != End) && "cannot iterate past end"); if (!IsFirstTime) ++Current; while (Current != End) { SmallString<128> PathStr(Dir); llvm::sys::path::append(PathStr, (*Current)->getName()); sys::fs::file_type Type = sys::fs::file_type::type_unknown; switch ((*Current)->getKind()) { case RedirectingFileSystem::EK_Directory: Type = sys::fs::file_type::directory_file; break; case RedirectingFileSystem::EK_File: Type = sys::fs::file_type::regular_file; break; } CurrentEntry = directory_entry(PathStr.str(), Type); return {}; } return incrementExternal(); } std::error_code VFSFromYamlDirIterImpl::incrementImpl(bool IsFirstTime) { while (true) { std::error_code EC = IsExternalFSCurrent ? incrementExternal() : incrementContent(IsFirstTime); if (EC || CurrentEntry.path().empty()) return EC; StringRef Name = llvm::sys::path::filename(CurrentEntry.path()); if (SeenNames.insert(Name).second) return EC; // name not seen before } llvm_unreachable("returned above"); } vfs::recursive_directory_iterator::recursive_directory_iterator( FileSystem &FS_, const Twine &Path, std::error_code &EC) : FS(&FS_) { directory_iterator I = FS->dir_begin(Path, EC); if (I != directory_iterator()) { State = std::make_shared<detail::RecDirIterState>(); State->Stack.push(I); } } vfs::recursive_directory_iterator & recursive_directory_iterator::increment(std::error_code &EC) { assert(FS && State && !State->Stack.empty() && "incrementing past end"); assert(!State->Stack.top()->path().empty() && "non-canonical end iterator"); vfs::directory_iterator End; if (State->HasNoPushRequest) State->HasNoPushRequest = false; else { if (State->Stack.top()->type() == sys::fs::file_type::directory_file) { vfs::directory_iterator I = FS->dir_begin(State->Stack.top()->path(), EC); if (I != End) { State->Stack.push(I); return *this; } } } while (!State->Stack.empty() && State->Stack.top().increment(EC) == End) State->Stack.pop(); if (State->Stack.empty()) State.reset(); // end iterator return *this; }
[ "wangyankun@ishumei.com" ]
wangyankun@ishumei.com
d80012a295cc171ba6b3c5a28da2f98517476a3d
d46f388e6f7d9dc085467d98c5203a3b21793fb6
/Source/Libraries/Box2D/Box2D/Box2D/Common/b2Timer.cpp
0abfe7ec6bee476edf472941ea367fa5ebef19a3
[ "Zlib" ]
permissive
chav0028/AC_GAM1532-GAM1542_FinalProject
0639850700877bc05665e4eac7548e1b8b127c75
a3d044aefb7c31b3ba007fc0b43d3cb9e78f3fd2
refs/heads/master
2023-08-21T16:25:07.415646
2021-10-18T20:34:10
2021-10-18T20:34:10
418,646,468
1
0
null
null
null
null
UTF-8
C++
false
false
2,320
cpp
#include "CommonHeader.h" /* * Copyright (c) 2011 Erin Catto http://box2d.org * * 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. */ #include <Box2D/Common/b2Timer.h> #if defined(_WIN32) float64 b2Timer::s_invFrequency = 0.0f; #define WIN32_LEAN_AND_MEAN #include <windows.h> b2Timer::b2Timer() { LARGE_INTEGER largeInteger; if (s_invFrequency == 0.0f) { QueryPerformanceFrequency(&largeInteger); s_invFrequency = float64(largeInteger.QuadPart); if (s_invFrequency > 0.0f) { s_invFrequency = 1000.0f / s_invFrequency; } } QueryPerformanceCounter(&largeInteger); m_start = float64(largeInteger.QuadPart); } void b2Timer::Reset() { LARGE_INTEGER largeInteger; QueryPerformanceCounter(&largeInteger); m_start = float64(largeInteger.QuadPart); } float32 b2Timer::GetMilliseconds() const { LARGE_INTEGER largeInteger; QueryPerformanceCounter(&largeInteger); float64 count = float64(largeInteger.QuadPart); float32 ms = float32(s_invFrequency * (count - m_start)); return ms; } #elif defined(__linux__) || defined (__APPLE__) #include <sys/time.h> b2Timer::b2Timer() { Reset(); } void b2Timer::Reset() { timeval t; gettimeofday(&t, 0); m_start_sec = t.tv_sec; m_start_usec = t.tv_usec; } float32 b2Timer::GetMilliseconds() const { timeval t; gettimeofday(&t, 0); return 1000.0f * (t.tv_sec - m_start_sec) + 0.001f * (t.tv_usec - m_start_usec); } #else b2Timer::b2Timer() { } void b2Timer::Reset() { } float32 b2Timer::GetMilliseconds() const { return 0.0f; } #endif
[ "16970454+chav0028@users.noreply.github.com" ]
16970454+chav0028@users.noreply.github.com
d48a65e74670183cb61308e65aa2755821c78e60
bda0a44e32559082176f3646d90503f903ec0d2e
/Temp/StagingArea/Data/il2cppOutput/Il2CppCompilerCalculateTypeValuesTable.cpp
dfa23c4ccc927158370c6c83c33fa39179d675db
[]
no_license
Petenickx74/ZeldaRPG
44af3101d0a247f7ee84ae5fab44e9a3dc9d03d3
6ea7995a2c8f70abe288ab5cdecca1724a0eefe0
refs/heads/master
2021-01-21T14:16:24.886613
2017-06-30T00:05:19
2017-06-30T00:05:19
95,257,307
1
2
null
null
null
null
UTF-8
C++
false
false
237,901
cpp
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" extern const int32_t g_FieldOffsetTable5[3]; extern const int32_t g_FieldOffsetTable11[3]; extern const int32_t g_FieldOffsetTable12[1]; extern const int32_t g_FieldOffsetTable14[1]; extern const int32_t g_FieldOffsetTable15[1]; extern const int32_t g_FieldOffsetTable16[1]; extern const int32_t g_FieldOffsetTable17[1]; extern const int32_t g_FieldOffsetTable18[3]; extern const int32_t g_FieldOffsetTable19[1]; extern const int32_t g_FieldOffsetTable20[1]; extern const int32_t g_FieldOffsetTable21[3]; extern const int32_t g_FieldOffsetTable26[10]; extern const int32_t g_FieldOffsetTable27[4]; extern const int32_t g_FieldOffsetTable30[8]; extern const int32_t g_FieldOffsetTable31[14]; extern const int32_t g_FieldOffsetTable32[9]; extern const int32_t g_FieldOffsetTable33[3]; extern const int32_t g_FieldOffsetTable34[2]; extern const int32_t g_FieldOffsetTable36[2]; extern const int32_t g_FieldOffsetTable37[2]; extern const int32_t g_FieldOffsetTable38[9]; extern const int32_t g_FieldOffsetTable39[1]; extern const int32_t g_FieldOffsetTable41[2]; extern const int32_t g_FieldOffsetTable42[3]; extern const int32_t g_FieldOffsetTable43[1]; extern const int32_t g_FieldOffsetTable44[4]; extern const int32_t g_FieldOffsetTable51[8]; extern const int32_t g_FieldOffsetTable57[11]; extern const int32_t g_FieldOffsetTable59[1]; extern const int32_t g_FieldOffsetTable60[1]; extern const int32_t g_FieldOffsetTable63[2]; extern const int32_t g_FieldOffsetTable64[9]; extern const int32_t g_FieldOffsetTable65[7]; extern const int32_t g_FieldOffsetTable67[1]; extern const int32_t g_FieldOffsetTable71[2]; extern const int32_t g_FieldOffsetTable72[1]; extern const int32_t g_FieldOffsetTable74[1]; extern const int32_t g_FieldOffsetTable75[5]; extern const int32_t g_FieldOffsetTable76[1]; extern const int32_t g_FieldOffsetTable77[1]; extern const int32_t g_FieldOffsetTable80[3]; extern const int32_t g_FieldOffsetTable81[4]; extern const int32_t g_FieldOffsetTable82[1]; extern const int32_t g_FieldOffsetTable83[2]; extern const int32_t g_FieldOffsetTable86[1]; extern const int32_t g_FieldOffsetTable90[4]; extern const int32_t g_FieldOffsetTable91[5]; extern const int32_t g_FieldOffsetTable92[4]; extern const int32_t g_FieldOffsetTable93[3]; extern const int32_t g_FieldOffsetTable94[1]; extern const int32_t g_FieldOffsetTable95[2]; extern const int32_t g_FieldOffsetTable96[1]; extern const int32_t g_FieldOffsetTable97[22]; extern const int32_t g_FieldOffsetTable98[7]; extern const int32_t g_FieldOffsetTable99[13]; extern const int32_t g_FieldOffsetTable100[8]; extern const int32_t g_FieldOffsetTable101[2]; extern const int32_t g_FieldOffsetTable102[5]; extern const int32_t g_FieldOffsetTable103[6]; extern const int32_t g_FieldOffsetTable104[4]; extern const int32_t g_FieldOffsetTable105[22]; extern const int32_t g_FieldOffsetTable108[7]; extern const int32_t g_FieldOffsetTable110[4]; extern const int32_t g_FieldOffsetTable111[4]; extern const int32_t g_FieldOffsetTable112[2]; extern const int32_t g_FieldOffsetTable115[1]; extern const int32_t g_FieldOffsetTable116[4]; extern const int32_t g_FieldOffsetTable117[13]; extern const int32_t g_FieldOffsetTable119[9]; extern const int32_t g_FieldOffsetTable120[5]; extern const int32_t g_FieldOffsetTable121[4]; extern const int32_t g_FieldOffsetTable123[4]; extern const int32_t g_FieldOffsetTable124[4]; extern const int32_t g_FieldOffsetTable125[13]; extern const int32_t g_FieldOffsetTable127[12]; extern const int32_t g_FieldOffsetTable128[2]; extern const int32_t g_FieldOffsetTable129[17]; extern const int32_t g_FieldOffsetTable130[7]; extern const int32_t g_FieldOffsetTable131[15]; extern const int32_t g_FieldOffsetTable132[21]; extern const int32_t g_FieldOffsetTable134[1]; extern const int32_t g_FieldOffsetTable135[3]; extern const int32_t g_FieldOffsetTable136[1]; extern const int32_t g_FieldOffsetTable137[3]; extern const int32_t g_FieldOffsetTable141[2]; extern const int32_t g_FieldOffsetTable142[4]; extern const int32_t g_FieldOffsetTable143[6]; extern const int32_t g_FieldOffsetTable144[3]; extern const int32_t g_FieldOffsetTable145[13]; extern const int32_t g_FieldOffsetTable148[2]; extern const int32_t g_FieldOffsetTable149[2]; extern const int32_t g_FieldOffsetTable153[1]; extern const int32_t g_FieldOffsetTable156[2]; extern const int32_t g_FieldOffsetTable157[16]; extern const int32_t g_FieldOffsetTable158[1]; extern const int32_t g_FieldOffsetTable159[4]; extern const int32_t g_FieldOffsetTable160[1]; extern const int32_t g_FieldOffsetTable161[1]; extern const int32_t g_FieldOffsetTable163[1]; extern const int32_t g_FieldOffsetTable170[2]; extern const int32_t g_FieldOffsetTable171[5]; extern const int32_t g_FieldOffsetTable172[4]; extern const int32_t g_FieldOffsetTable173[2]; extern const int32_t g_FieldOffsetTable174[1]; extern const int32_t g_FieldOffsetTable175[5]; extern const int32_t g_FieldOffsetTable176[5]; extern const int32_t g_FieldOffsetTable177[1]; extern const int32_t g_FieldOffsetTable178[1]; extern const int32_t g_FieldOffsetTable181[3]; extern const int32_t g_FieldOffsetTable182[4]; extern const int32_t g_FieldOffsetTable183[3]; extern const int32_t g_FieldOffsetTable184[3]; extern const int32_t g_FieldOffsetTable185[1]; extern const int32_t g_FieldOffsetTable187[3]; extern const int32_t g_FieldOffsetTable188[2]; extern const int32_t g_FieldOffsetTable189[14]; extern const int32_t g_FieldOffsetTable190[2]; extern const int32_t g_FieldOffsetTable191[1]; extern const int32_t g_FieldOffsetTable192[4]; extern const int32_t g_FieldOffsetTable193[8]; extern const int32_t g_FieldOffsetTable194[1]; extern const int32_t g_FieldOffsetTable195[1]; extern const int32_t g_FieldOffsetTable196[1]; extern const int32_t g_FieldOffsetTable202[6]; extern const int32_t g_FieldOffsetTable203[2]; extern const int32_t g_FieldOffsetTable204[4]; extern const int32_t g_FieldOffsetTable205[9]; extern const int32_t g_FieldOffsetTable206[5]; extern const int32_t g_FieldOffsetTable207[3]; extern const int32_t g_FieldOffsetTable208[4]; extern const int32_t g_FieldOffsetTable209[4]; extern const int32_t g_FieldOffsetTable210[3]; extern const int32_t g_FieldOffsetTable211[6]; extern const int32_t g_FieldOffsetTable212[1]; extern const int32_t g_FieldOffsetTable213[4]; extern const int32_t g_FieldOffsetTable214[3]; extern const int32_t g_FieldOffsetTable216[1]; extern const int32_t g_FieldOffsetTable217[8]; extern const int32_t g_FieldOffsetTable218[3]; extern const int32_t g_FieldOffsetTable219[4]; extern const int32_t g_FieldOffsetTable223[6]; extern const int32_t g_FieldOffsetTable224[10]; extern const int32_t g_FieldOffsetTable225[40]; extern const int32_t g_FieldOffsetTable226[6]; extern const int32_t g_FieldOffsetTable227[58]; extern const int32_t g_FieldOffsetTable228[11]; extern const int32_t g_FieldOffsetTable229[3]; extern const int32_t g_FieldOffsetTable230[1]; extern const int32_t g_FieldOffsetTable231[7]; extern const int32_t g_FieldOffsetTable232[39]; extern const int32_t g_FieldOffsetTable233[18]; extern const int32_t g_FieldOffsetTable234[9]; extern const int32_t g_FieldOffsetTable235[5]; extern const int32_t g_FieldOffsetTable236[31]; extern const int32_t g_FieldOffsetTable238[6]; extern const int32_t g_FieldOffsetTable240[2]; extern const int32_t g_FieldOffsetTable244[4]; extern const int32_t g_FieldOffsetTable245[15]; extern const int32_t g_FieldOffsetTable246[4]; extern const int32_t g_FieldOffsetTable247[7]; extern const int32_t g_FieldOffsetTable248[2]; extern const int32_t g_FieldOffsetTable249[8]; extern const int32_t g_FieldOffsetTable250[7]; extern const int32_t g_FieldOffsetTable251[14]; extern const int32_t g_FieldOffsetTable254[8]; extern const int32_t g_FieldOffsetTable255[4]; extern const int32_t g_FieldOffsetTable257[10]; extern const int32_t g_FieldOffsetTable258[6]; extern const int32_t g_FieldOffsetTable259[2]; extern const int32_t g_FieldOffsetTable260[25]; extern const int32_t g_FieldOffsetTable261[6]; extern const int32_t g_FieldOffsetTable262[8]; extern const int32_t g_FieldOffsetTable264[2]; extern const int32_t g_FieldOffsetTable265[4]; extern const int32_t g_FieldOffsetTable266[1]; extern const int32_t g_FieldOffsetTable268[6]; extern const int32_t g_FieldOffsetTable269[13]; extern const int32_t g_FieldOffsetTable271[10]; extern const int32_t g_FieldOffsetTable272[3]; extern const int32_t g_FieldOffsetTable273[1]; extern const int32_t g_FieldOffsetTable275[1]; extern const int32_t g_FieldOffsetTable276[2]; extern const int32_t g_FieldOffsetTable278[2]; extern const int32_t g_FieldOffsetTable279[2]; extern const int32_t g_FieldOffsetTable281[8]; extern const int32_t g_FieldOffsetTable282[7]; extern const int32_t g_FieldOffsetTable283[11]; extern const int32_t g_FieldOffsetTable284[1]; extern const int32_t g_FieldOffsetTable286[2]; extern const int32_t g_FieldOffsetTable287[5]; extern const int32_t g_FieldOffsetTable288[4]; extern const int32_t g_FieldOffsetTable289[2]; extern const int32_t g_FieldOffsetTable291[12]; extern const int32_t g_FieldOffsetTable292[3]; extern const int32_t g_FieldOffsetTable293[2]; extern const int32_t g_FieldOffsetTable294[12]; extern const int32_t g_FieldOffsetTable295[2]; extern const int32_t g_FieldOffsetTable296[6]; extern const int32_t g_FieldOffsetTable297[1]; extern const int32_t g_FieldOffsetTable298[8]; extern const int32_t g_FieldOffsetTable299[1]; extern const int32_t g_FieldOffsetTable300[226]; extern const int32_t g_FieldOffsetTable301[3]; extern const int32_t g_FieldOffsetTable302[30]; extern const int32_t g_FieldOffsetTable303[16]; extern const int32_t g_FieldOffsetTable304[9]; extern const int32_t g_FieldOffsetTable306[10]; extern const int32_t g_FieldOffsetTable308[1]; extern const int32_t g_FieldOffsetTable309[1]; extern const int32_t g_FieldOffsetTable310[1]; extern const int32_t g_FieldOffsetTable311[1]; extern const int32_t g_FieldOffsetTable312[1]; extern const int32_t g_FieldOffsetTable313[1]; extern const int32_t g_FieldOffsetTable314[1]; extern const int32_t g_FieldOffsetTable315[1]; extern const int32_t g_FieldOffsetTable316[1]; extern const int32_t g_FieldOffsetTable317[15]; extern const int32_t g_FieldOffsetTable318[6]; extern const int32_t g_FieldOffsetTable319[1]; extern const int32_t g_FieldOffsetTable320[1]; extern const int32_t g_FieldOffsetTable321[1]; extern const int32_t g_FieldOffsetTable322[1]; extern const int32_t g_FieldOffsetTable324[21]; extern const int32_t g_FieldOffsetTable325[6]; extern const int32_t g_FieldOffsetTable326[2]; extern const int32_t g_FieldOffsetTable327[3]; extern const int32_t g_FieldOffsetTable328[2]; extern const int32_t g_FieldOffsetTable329[2]; extern const int32_t g_FieldOffsetTable330[5]; extern const int32_t g_FieldOffsetTable331[1]; extern const int32_t g_FieldOffsetTable333[20]; extern const int32_t g_FieldOffsetTable335[5]; extern const int32_t g_FieldOffsetTable336[10]; extern const int32_t g_FieldOffsetTable337[25]; extern const int32_t g_FieldOffsetTable339[15]; extern const int32_t g_FieldOffsetTable341[1]; extern const int32_t g_FieldOffsetTable342[10]; extern const int32_t g_FieldOffsetTable343[8]; extern const int32_t g_FieldOffsetTable344[2]; extern const int32_t g_FieldOffsetTable345[5]; extern const int32_t g_FieldOffsetTable348[5]; extern const int32_t g_FieldOffsetTable349[3]; extern const int32_t g_FieldOffsetTable350[3]; extern const int32_t g_FieldOffsetTable351[5]; extern const int32_t g_FieldOffsetTable352[7]; extern const int32_t g_FieldOffsetTable353[5]; extern const int32_t g_FieldOffsetTable357[12]; extern const int32_t g_FieldOffsetTable358[7]; extern const int32_t g_FieldOffsetTable359[1]; extern const int32_t g_FieldOffsetTable360[2]; extern const int32_t g_FieldOffsetTable361[6]; extern const int32_t g_FieldOffsetTable362[9]; extern const int32_t g_FieldOffsetTable364[4]; extern const int32_t g_FieldOffsetTable368[32]; extern const int32_t g_FieldOffsetTable370[1]; extern const int32_t g_FieldOffsetTable371[5]; extern const int32_t g_FieldOffsetTable372[21]; extern const int32_t g_FieldOffsetTable373[13]; extern const int32_t g_FieldOffsetTable374[3]; extern const int32_t g_FieldOffsetTable375[2]; extern const int32_t g_FieldOffsetTable376[3]; extern const int32_t g_FieldOffsetTable377[4]; extern const int32_t g_FieldOffsetTable379[1]; extern const int32_t g_FieldOffsetTable380[2]; extern const int32_t g_FieldOffsetTable381[1]; extern const int32_t g_FieldOffsetTable382[1]; extern const int32_t g_FieldOffsetTable384[4]; extern const int32_t g_FieldOffsetTable386[4]; extern const int32_t g_FieldOffsetTable387[5]; extern const int32_t g_FieldOffsetTable389[2]; extern const int32_t g_FieldOffsetTable392[6]; extern const int32_t g_FieldOffsetTable393[5]; extern const int32_t g_FieldOffsetTable394[1]; extern const int32_t g_FieldOffsetTable395[4]; extern const int32_t g_FieldOffsetTable396[1]; extern const int32_t g_FieldOffsetTable397[4]; extern const int32_t g_FieldOffsetTable398[1]; extern const int32_t g_FieldOffsetTable399[1]; extern const int32_t g_FieldOffsetTable401[1]; extern const int32_t g_FieldOffsetTable402[5]; extern const int32_t g_FieldOffsetTable403[1]; extern const int32_t g_FieldOffsetTable404[2]; extern const int32_t g_FieldOffsetTable405[1]; extern const int32_t g_FieldOffsetTable407[4]; extern const int32_t g_FieldOffsetTable408[1]; extern const int32_t g_FieldOffsetTable409[2]; extern const int32_t g_FieldOffsetTable410[36]; extern const int32_t g_FieldOffsetTable432[1]; extern const int32_t g_FieldOffsetTable433[2]; extern const int32_t g_FieldOffsetTable435[1]; extern const int32_t g_FieldOffsetTable439[1]; extern const int32_t g_FieldOffsetTable440[1]; extern const int32_t g_FieldOffsetTable441[5]; extern const int32_t g_FieldOffsetTable442[3]; extern const int32_t g_FieldOffsetTable443[1]; extern const int32_t g_FieldOffsetTable444[3]; extern const int32_t g_FieldOffsetTable452[3]; extern const int32_t g_FieldOffsetTable453[14]; extern const int32_t g_FieldOffsetTable454[1]; extern const int32_t g_FieldOffsetTable455[2]; extern const int32_t g_FieldOffsetTable457[1]; extern const int32_t g_FieldOffsetTable468[5]; extern const int32_t g_FieldOffsetTable469[2]; extern const int32_t g_FieldOffsetTable470[2]; extern const int32_t g_FieldOffsetTable471[2]; extern const int32_t g_FieldOffsetTable472[1]; extern const int32_t g_FieldOffsetTable473[5]; extern const int32_t g_FieldOffsetTable474[3]; extern const int32_t g_FieldOffsetTable475[3]; extern const int32_t g_FieldOffsetTable476[15]; extern const int32_t g_FieldOffsetTable477[1]; extern const int32_t g_FieldOffsetTable478[7]; extern const int32_t g_FieldOffsetTable479[3]; extern const int32_t g_FieldOffsetTable480[1]; extern const int32_t g_FieldOffsetTable481[4]; extern const int32_t g_FieldOffsetTable491[2]; extern const int32_t g_FieldOffsetTable492[1]; extern const int32_t g_FieldOffsetTable493[11]; extern const int32_t g_FieldOffsetTable494[1]; extern const int32_t g_FieldOffsetTable495[6]; extern const int32_t g_FieldOffsetTable496[3]; extern const int32_t g_FieldOffsetTable497[2]; extern const int32_t g_FieldOffsetTable498[8]; extern const int32_t g_FieldOffsetTable501[4]; extern const int32_t g_FieldOffsetTable502[13]; extern const int32_t g_FieldOffsetTable504[1]; extern const int32_t g_FieldOffsetTable505[2]; extern const int32_t g_FieldOffsetTable506[3]; extern const int32_t g_FieldOffsetTable507[2]; extern const int32_t g_FieldOffsetTable508[6]; extern const int32_t g_FieldOffsetTable510[7]; extern const int32_t g_FieldOffsetTable512[1]; extern const int32_t g_FieldOffsetTable513[5]; extern const int32_t g_FieldOffsetTable514[5]; extern const int32_t g_FieldOffsetTable516[1]; extern const int32_t g_FieldOffsetTable517[2]; extern const int32_t g_FieldOffsetTable518[1]; extern const int32_t g_FieldOffsetTable519[1]; extern const int32_t g_FieldOffsetTable523[7]; extern const int32_t g_FieldOffsetTable524[1]; extern const int32_t g_FieldOffsetTable525[1]; extern const int32_t g_FieldOffsetTable526[9]; extern const int32_t g_FieldOffsetTable527[13]; extern const int32_t g_FieldOffsetTable528[10]; extern const int32_t g_FieldOffsetTable529[7]; extern const int32_t g_FieldOffsetTable530[5]; extern const int32_t g_FieldOffsetTable533[8]; extern const int32_t g_FieldOffsetTable534[3]; extern const int32_t g_FieldOffsetTable538[5]; extern const int32_t g_FieldOffsetTable539[2]; extern const int32_t g_FieldOffsetTable540[2]; extern const int32_t g_FieldOffsetTable541[3]; extern const int32_t g_FieldOffsetTable542[3]; extern const int32_t g_FieldOffsetTable543[3]; extern const int32_t g_FieldOffsetTable544[3]; extern const int32_t g_FieldOffsetTable545[4]; extern const int32_t g_FieldOffsetTable546[24]; extern const int32_t g_FieldOffsetTable547[9]; extern const int32_t g_FieldOffsetTable548[11]; extern const int32_t g_FieldOffsetTable549[5]; extern const int32_t g_FieldOffsetTable550[7]; extern const int32_t g_FieldOffsetTable552[12]; extern const int32_t g_FieldOffsetTable553[6]; extern const int32_t g_FieldOffsetTable554[1]; extern const int32_t g_FieldOffsetTable555[3]; extern const int32_t g_FieldOffsetTable556[4]; extern const int32_t g_FieldOffsetTable557[3]; extern const int32_t g_FieldOffsetTable566[9]; extern const int32_t g_FieldOffsetTable567[4]; extern const int32_t g_FieldOffsetTable568[1]; extern const int32_t g_FieldOffsetTable569[1]; extern const int32_t g_FieldOffsetTable570[1]; extern const int32_t g_FieldOffsetTable571[1]; extern const int32_t g_FieldOffsetTable572[5]; extern const int32_t g_FieldOffsetTable573[13]; extern const int32_t g_FieldOffsetTable579[6]; extern const int32_t g_FieldOffsetTable581[3]; extern const int32_t g_FieldOffsetTable583[5]; extern const int32_t g_FieldOffsetTable584[1]; extern const int32_t g_FieldOffsetTable585[2]; extern const int32_t g_FieldOffsetTable586[10]; extern const int32_t g_FieldOffsetTable587[5]; extern const int32_t g_FieldOffsetTable588[7]; extern const int32_t g_FieldOffsetTable589[2]; extern const int32_t g_FieldOffsetTable593[2]; extern const int32_t g_FieldOffsetTable594[6]; extern const int32_t g_FieldOffsetTable595[3]; extern const int32_t g_FieldOffsetTable598[5]; extern const int32_t g_FieldOffsetTable599[9]; extern const int32_t g_FieldOffsetTable600[2]; extern const int32_t g_FieldOffsetTable601[13]; extern const int32_t g_FieldOffsetTable604[7]; extern const int32_t g_FieldOffsetTable605[8]; extern const int32_t g_FieldOffsetTable606[1]; extern const int32_t g_FieldOffsetTable607[1]; extern const int32_t g_FieldOffsetTable608[5]; extern const int32_t g_FieldOffsetTable613[2]; extern const int32_t g_FieldOffsetTable614[2]; extern const int32_t g_FieldOffsetTable615[4]; extern const int32_t g_FieldOffsetTable618[3]; extern const int32_t g_FieldOffsetTable619[1]; extern const int32_t g_FieldOffsetTable620[3]; extern const int32_t g_FieldOffsetTable622[6]; extern const int32_t g_FieldOffsetTable623[6]; extern const int32_t g_FieldOffsetTable624[1]; extern const int32_t g_FieldOffsetTable626[7]; extern const int32_t g_FieldOffsetTable628[5]; extern const int32_t g_FieldOffsetTable629[2]; extern const int32_t g_FieldOffsetTable631[7]; extern const int32_t g_FieldOffsetTable632[2]; extern const int32_t g_FieldOffsetTable633[2]; extern const int32_t g_FieldOffsetTable634[2]; extern const int32_t g_FieldOffsetTable635[8]; extern const int32_t g_FieldOffsetTable639[15]; extern const int32_t g_FieldOffsetTable640[2]; extern const int32_t g_FieldOffsetTable642[5]; extern const int32_t g_FieldOffsetTable643[1]; extern const int32_t g_FieldOffsetTable644[1]; extern const int32_t g_FieldOffsetTable646[5]; extern const int32_t g_FieldOffsetTable648[14]; extern const int32_t g_FieldOffsetTable650[14]; extern const int32_t g_FieldOffsetTable651[2]; extern const int32_t g_FieldOffsetTable652[4]; extern const int32_t g_FieldOffsetTable655[10]; extern const int32_t g_FieldOffsetTable656[1]; extern const int32_t g_FieldOffsetTable659[6]; extern const int32_t g_FieldOffsetTable662[1]; extern const int32_t g_FieldOffsetTable663[17]; extern const int32_t g_FieldOffsetTable664[1]; extern const int32_t g_FieldOffsetTable665[1]; extern const int32_t g_FieldOffsetTable666[3]; extern const int32_t g_FieldOffsetTable667[3]; extern const int32_t g_FieldOffsetTable668[2]; extern const int32_t g_FieldOffsetTable671[3]; extern const int32_t g_FieldOffsetTable674[4]; extern const int32_t g_FieldOffsetTable675[5]; extern const int32_t g_FieldOffsetTable676[7]; extern const int32_t g_FieldOffsetTable682[1]; extern const int32_t g_FieldOffsetTable683[4]; extern const int32_t g_FieldOffsetTable684[1]; extern const int32_t g_FieldOffsetTable685[3]; extern const int32_t g_FieldOffsetTable686[9]; extern const int32_t g_FieldOffsetTable687[2]; extern const int32_t g_FieldOffsetTable688[8]; extern const int32_t g_FieldOffsetTable689[3]; extern const int32_t g_FieldOffsetTable690[5]; extern const int32_t g_FieldOffsetTable691[5]; extern const int32_t g_FieldOffsetTable692[3]; extern const int32_t g_FieldOffsetTable697[2]; extern const int32_t g_FieldOffsetTable700[3]; extern const int32_t g_FieldOffsetTable702[2]; extern const int32_t g_FieldOffsetTable703[1]; extern const int32_t g_FieldOffsetTable704[3]; extern const int32_t g_FieldOffsetTable707[3]; extern const int32_t g_FieldOffsetTable709[4]; extern const int32_t g_FieldOffsetTable710[1]; extern const int32_t g_FieldOffsetTable711[3]; extern const int32_t g_FieldOffsetTable712[28]; extern const int32_t g_FieldOffsetTable713[1]; extern const int32_t g_FieldOffsetTable715[5]; extern const int32_t g_FieldOffsetTable716[2]; extern const int32_t g_FieldOffsetTable717[3]; extern const int32_t g_FieldOffsetTable718[3]; extern const int32_t g_FieldOffsetTable719[1]; extern const int32_t g_FieldOffsetTable720[1]; extern const int32_t g_FieldOffsetTable721[2]; extern const int32_t g_FieldOffsetTable722[2]; extern const int32_t g_FieldOffsetTable723[2]; extern const int32_t g_FieldOffsetTable724[1]; extern const int32_t g_FieldOffsetTable725[3]; extern const int32_t g_FieldOffsetTable727[3]; extern const int32_t g_FieldOffsetTable734[52]; extern const int32_t g_FieldOffsetTable738[11]; extern const int32_t g_FieldOffsetTable740[7]; extern const int32_t g_FieldOffsetTable742[2]; extern const int32_t g_FieldOffsetTable743[4]; extern const int32_t g_FieldOffsetTable745[1]; extern const int32_t g_FieldOffsetTable747[21]; extern const int32_t g_FieldOffsetTable749[22]; extern const int32_t g_FieldOffsetTable751[1]; extern const int32_t g_FieldOffsetTable752[2]; extern const int32_t g_FieldOffsetTable753[1]; extern const int32_t g_FieldOffsetTable754[1]; extern const int32_t g_FieldOffsetTable756[1]; extern const int32_t g_FieldOffsetTable758[17]; extern const int32_t g_FieldOffsetTable759[2]; extern const int32_t g_FieldOffsetTable761[3]; extern const int32_t g_FieldOffsetTable762[5]; extern const int32_t g_FieldOffsetTable764[2]; extern const int32_t g_FieldOffsetTable765[1]; extern const int32_t g_FieldOffsetTable766[15]; extern const int32_t g_FieldOffsetTable767[5]; extern const int32_t g_FieldOffsetTable768[4]; extern const int32_t g_FieldOffsetTable769[4]; extern const int32_t g_FieldOffsetTable771[8]; extern const int32_t g_FieldOffsetTable772[2]; extern const int32_t g_FieldOffsetTable773[1]; extern const int32_t g_FieldOffsetTable774[7]; extern const int32_t g_FieldOffsetTable775[1]; extern const int32_t g_FieldOffsetTable776[1]; extern const int32_t g_FieldOffsetTable777[1]; extern const int32_t g_FieldOffsetTable778[11]; extern const int32_t g_FieldOffsetTable783[2]; extern const int32_t g_FieldOffsetTable784[24]; extern const int32_t g_FieldOffsetTable785[1]; extern const int32_t g_FieldOffsetTable789[1]; extern const int32_t g_FieldOffsetTable791[14]; extern const int32_t g_FieldOffsetTable792[3]; extern const int32_t g_FieldOffsetTable796[1]; extern const int32_t g_FieldOffsetTable797[1]; extern const int32_t g_FieldOffsetTable798[7]; extern const int32_t g_FieldOffsetTable799[5]; extern const int32_t g_FieldOffsetTable802[1]; extern const int32_t g_FieldOffsetTable804[3]; extern const int32_t g_FieldOffsetTable805[1]; extern const int32_t g_FieldOffsetTable806[7]; extern const int32_t g_FieldOffsetTable807[3]; extern const int32_t g_FieldOffsetTable808[2]; extern const int32_t g_FieldOffsetTable809[1]; extern const int32_t g_FieldOffsetTable810[2]; extern const int32_t g_FieldOffsetTable811[1]; extern const int32_t g_FieldOffsetTable815[1]; extern const int32_t g_FieldOffsetTable816[1]; extern const int32_t g_FieldOffsetTable817[26]; extern const int32_t g_FieldOffsetTable818[14]; extern const int32_t g_FieldOffsetTable819[2]; extern const int32_t g_FieldOffsetTable820[3]; extern const int32_t g_FieldOffsetTable821[1]; extern const int32_t g_FieldOffsetTable822[1]; extern const int32_t g_FieldOffsetTable823[8]; extern const int32_t g_FieldOffsetTable824[1]; extern const int32_t g_FieldOffsetTable826[1]; extern const int32_t g_FieldOffsetTable827[1]; extern const int32_t g_FieldOffsetTable828[4]; extern const int32_t g_FieldOffsetTable829[2]; extern const int32_t g_FieldOffsetTable830[1]; extern const int32_t g_FieldOffsetTable831[7]; extern const int32_t g_FieldOffsetTable832[3]; extern const int32_t g_FieldOffsetTable835[4]; extern const int32_t g_FieldOffsetTable836[3]; extern const int32_t g_FieldOffsetTable837[8]; extern const int32_t g_FieldOffsetTable838[19]; extern const int32_t g_FieldOffsetTable839[1]; extern const int32_t g_FieldOffsetTable840[3]; extern const int32_t g_FieldOffsetTable842[2]; extern const int32_t g_FieldOffsetTable843[3]; extern const int32_t g_FieldOffsetTable844[5]; extern const int32_t g_FieldOffsetTable845[5]; extern const int32_t g_FieldOffsetTable846[2]; extern const int32_t g_FieldOffsetTable864[53]; extern const int32_t g_FieldOffsetTable890[4]; extern const int32_t g_FieldOffsetTable891[4]; extern const int32_t g_FieldOffsetTable892[2]; extern const int32_t g_FieldOffsetTable894[7]; extern const int32_t g_FieldOffsetTable898[3]; extern const int32_t g_FieldOffsetTable902[2]; extern const int32_t g_FieldOffsetTable903[4]; extern const int32_t g_FieldOffsetTable904[5]; extern const int32_t g_FieldOffsetTable906[1]; extern const int32_t g_FieldOffsetTable908[6]; extern const int32_t g_FieldOffsetTable910[5]; extern const int32_t g_FieldOffsetTable911[4]; extern const int32_t g_FieldOffsetTable913[4]; extern const int32_t g_FieldOffsetTable914[4]; extern const int32_t g_FieldOffsetTable915[2]; extern const int32_t g_FieldOffsetTable916[13]; extern const int32_t g_FieldOffsetTable918[2]; extern const int32_t g_FieldOffsetTable919[17]; extern const int32_t g_FieldOffsetTable920[7]; extern const int32_t g_FieldOffsetTable921[15]; extern const int32_t g_FieldOffsetTable922[26]; extern const int32_t g_FieldOffsetTable924[1]; extern const int32_t g_FieldOffsetTable925[5]; extern const int32_t g_FieldOffsetTable926[8]; extern const int32_t g_FieldOffsetTable927[11]; extern const int32_t g_FieldOffsetTable928[3]; extern const int32_t g_FieldOffsetTable929[3]; extern const int32_t g_FieldOffsetTable930[1]; extern const int32_t g_FieldOffsetTable931[4]; extern const int32_t g_FieldOffsetTable932[2]; extern const int32_t g_FieldOffsetTable933[2]; extern const int32_t g_FieldOffsetTable934[1]; extern const int32_t g_FieldOffsetTable935[2]; extern const int32_t g_FieldOffsetTable936[2]; extern const int32_t g_FieldOffsetTable937[5]; extern const int32_t g_FieldOffsetTable938[11]; extern const int32_t g_FieldOffsetTable939[1]; extern const int32_t g_FieldOffsetTable940[1]; extern const int32_t g_FieldOffsetTable941[8]; extern const int32_t g_FieldOffsetTable942[1]; extern const int32_t g_FieldOffsetTable943[4]; extern const int32_t g_FieldOffsetTable944[3]; extern const int32_t g_FieldOffsetTable945[3]; extern const int32_t g_FieldOffsetTable946[25]; extern const int32_t g_FieldOffsetTable947[2]; extern const int32_t g_FieldOffsetTable948[8]; extern const int32_t g_FieldOffsetTable949[21]; extern const int32_t g_FieldOffsetTable950[2]; extern const int32_t g_FieldOffsetTable952[2]; extern const int32_t g_FieldOffsetTable954[6]; extern const int32_t g_FieldOffsetTable955[2]; extern const int32_t g_FieldOffsetTable956[5]; extern const int32_t g_FieldOffsetTable957[30]; extern const int32_t g_FieldOffsetTable958[6]; extern const int32_t g_FieldOffsetTable959[4]; extern const int32_t g_FieldOffsetTable960[4]; extern const int32_t g_FieldOffsetTable961[4]; extern const int32_t g_FieldOffsetTable962[3]; extern const int32_t g_FieldOffsetTable963[9]; extern const int32_t g_FieldOffsetTable964[7]; extern const int32_t g_FieldOffsetTable965[3]; extern const int32_t g_FieldOffsetTable966[3]; extern const int32_t g_FieldOffsetTable967[3]; extern const int32_t g_FieldOffsetTable968[3]; extern const int32_t g_FieldOffsetTable969[5]; extern const int32_t g_FieldOffsetTable971[2]; extern const int32_t g_FieldOffsetTable972[4]; extern const int32_t g_FieldOffsetTable973[3]; extern const int32_t g_FieldOffsetTable974[8]; extern const int32_t g_FieldOffsetTable975[15]; extern const int32_t g_FieldOffsetTable976[12]; extern const int32_t g_FieldOffsetTable977[2]; extern const int32_t g_FieldOffsetTable978[4]; extern const int32_t g_FieldOffsetTable979[1]; extern const int32_t g_FieldOffsetTable980[8]; extern const int32_t g_FieldOffsetTable981[4]; extern const int32_t g_FieldOffsetTable982[6]; extern const int32_t g_FieldOffsetTable983[4]; extern const int32_t g_FieldOffsetTable984[12]; extern const int32_t g_FieldOffsetTable985[2]; extern const int32_t g_FieldOffsetTable987[1]; extern const int32_t g_FieldOffsetTable988[1]; extern const int32_t g_FieldOffsetTable990[1]; extern const int32_t g_FieldOffsetTable991[2]; extern const int32_t g_FieldOffsetTable992[1]; extern const int32_t g_FieldOffsetTable993[4]; extern const int32_t g_FieldOffsetTable995[2]; extern const int32_t g_FieldOffsetTable1001[15]; extern const int32_t g_FieldOffsetTable1013[1]; extern const int32_t g_FieldOffsetTable1014[3]; extern const int32_t g_FieldOffsetTable1015[3]; extern const int32_t g_FieldOffsetTable1016[3]; extern const int32_t g_FieldOffsetTable1017[4]; extern const int32_t g_FieldOffsetTable1018[3]; extern const int32_t g_FieldOffsetTable1019[4]; extern const int32_t g_FieldOffsetTable1020[10]; extern const int32_t g_FieldOffsetTable1021[2]; extern const int32_t g_FieldOffsetTable1022[2]; extern const int32_t g_FieldOffsetTable1023[1]; extern const int32_t g_FieldOffsetTable1024[2]; extern const int32_t g_FieldOffsetTable1025[1]; extern const int32_t g_FieldOffsetTable1026[4]; extern const int32_t g_FieldOffsetTable1028[2]; extern const int32_t g_FieldOffsetTable1029[4]; extern const int32_t g_FieldOffsetTable1030[5]; extern const int32_t g_FieldOffsetTable1031[32]; extern const int32_t g_FieldOffsetTable1033[9]; extern const int32_t g_FieldOffsetTable1036[11]; extern const int32_t g_FieldOffsetTable1039[2]; extern const int32_t g_FieldOffsetTable1040[24]; extern const int32_t g_FieldOffsetTable1043[11]; extern const int32_t g_FieldOffsetTable1044[5]; extern const int32_t g_FieldOffsetTable1047[3]; extern const int32_t g_FieldOffsetTable1048[11]; extern const int32_t g_FieldOffsetTable1049[10]; extern const int32_t g_FieldOffsetTable1050[2]; extern const int32_t g_FieldOffsetTable1051[5]; extern const int32_t g_FieldOffsetTable1052[5]; extern const int32_t g_FieldOffsetTable1053[5]; extern const int32_t g_FieldOffsetTable1054[6]; extern const int32_t g_FieldOffsetTable1055[5]; extern const int32_t g_FieldOffsetTable1056[3]; extern const int32_t g_FieldOffsetTable1057[9]; extern const int32_t g_FieldOffsetTable1058[1]; extern const int32_t g_FieldOffsetTable1059[11]; extern const int32_t g_FieldOffsetTable1060[6]; extern const int32_t g_FieldOffsetTable1061[13]; extern const int32_t g_FieldOffsetTable1063[1]; extern const int32_t g_FieldOffsetTable1065[1]; extern const int32_t g_FieldOffsetTable1066[15]; extern const int32_t g_FieldOffsetTable1067[4]; extern const int32_t g_FieldOffsetTable1068[1]; extern const int32_t g_FieldOffsetTable1069[1]; extern const int32_t g_FieldOffsetTable1070[8]; extern const int32_t g_FieldOffsetTable1071[2]; extern const int32_t g_FieldOffsetTable1072[24]; extern const int32_t g_FieldOffsetTable1073[3]; extern const int32_t g_FieldOffsetTable1074[1]; extern const int32_t g_FieldOffsetTable1075[1]; extern const int32_t g_FieldOffsetTable1076[1]; extern const int32_t g_FieldOffsetTable1077[16]; extern const int32_t g_FieldOffsetTable1078[5]; extern const int32_t g_FieldOffsetTable1079[11]; extern const int32_t g_FieldOffsetTable1080[7]; extern const int32_t g_FieldOffsetTable1081[4]; extern const int32_t g_FieldOffsetTable1082[4]; extern const int32_t g_FieldOffsetTable1083[6]; extern const int32_t g_FieldOffsetTable1084[5]; extern const int32_t g_FieldOffsetTable1085[4]; extern const int32_t g_FieldOffsetTable1086[15]; extern const int32_t g_FieldOffsetTable1087[7]; extern const int32_t g_FieldOffsetTable1088[3]; extern const int32_t g_FieldOffsetTable1089[3]; extern const int32_t g_FieldOffsetTable1090[2]; extern const int32_t g_FieldOffsetTable1091[2]; extern const int32_t g_FieldOffsetTable1092[1]; extern const int32_t g_FieldOffsetTable1093[3]; extern const int32_t g_FieldOffsetTable1094[1]; extern const int32_t g_FieldOffsetTable1095[3]; extern const int32_t g_FieldOffsetTable1096[2]; extern const int32_t g_FieldOffsetTable1097[5]; extern const int32_t g_FieldOffsetTable1098[2]; extern const int32_t g_FieldOffsetTable1099[2]; extern const int32_t g_FieldOffsetTable1100[9]; extern const int32_t g_FieldOffsetTable1101[10]; extern const int32_t g_FieldOffsetTable1102[26]; extern const int32_t g_FieldOffsetTable1103[6]; extern const int32_t g_FieldOffsetTable1104[11]; extern const int32_t g_FieldOffsetTable1107[3]; extern const int32_t g_FieldOffsetTable1108[2]; extern const int32_t g_FieldOffsetTable1109[2]; extern const int32_t g_FieldOffsetTable1110[3]; extern const int32_t g_FieldOffsetTable1111[146]; extern const int32_t g_FieldOffsetTable1115[4]; extern const int32_t g_FieldOffsetTable1116[1]; extern const int32_t g_FieldOffsetTable1117[1]; extern const int32_t g_FieldOffsetTable1118[2]; extern const int32_t g_FieldOffsetTable1119[1]; extern const int32_t g_FieldOffsetTable1120[3]; extern const int32_t g_FieldOffsetTable1121[16]; extern const int32_t g_FieldOffsetTable1122[2]; extern const int32_t g_FieldOffsetTable1123[7]; extern const int32_t g_FieldOffsetTable1124[4]; extern const int32_t g_FieldOffsetTable1125[3]; extern const int32_t g_FieldOffsetTable1126[1]; extern const int32_t g_FieldOffsetTable1127[2]; extern const int32_t g_FieldOffsetTable1129[6]; extern const int32_t g_FieldOffsetTable1130[7]; extern const int32_t g_FieldOffsetTable1133[1]; extern const int32_t g_FieldOffsetTable1135[1]; extern const int32_t g_FieldOffsetTable1136[2]; extern const int32_t g_FieldOffsetTable1137[1]; extern const int32_t g_FieldOffsetTable1139[3]; extern const int32_t g_FieldOffsetTable1141[3]; extern const int32_t g_FieldOffsetTable1142[2]; extern const int32_t g_FieldOffsetTable1144[2]; extern const int32_t g_FieldOffsetTable1145[1]; extern const int32_t g_FieldOffsetTable1146[2]; extern const int32_t g_FieldOffsetTable1147[2]; extern const int32_t g_FieldOffsetTable1148[6]; extern const int32_t g_FieldOffsetTable1149[6]; extern const int32_t g_FieldOffsetTable1152[33]; extern const int32_t g_FieldOffsetTable1153[3]; extern const int32_t g_FieldOffsetTable1155[6]; extern const int32_t g_FieldOffsetTable1156[4]; extern const int32_t g_FieldOffsetTable1157[6]; extern const int32_t g_FieldOffsetTable1158[5]; extern const int32_t g_FieldOffsetTable1161[3]; extern const int32_t g_FieldOffsetTable1168[1]; extern const int32_t g_FieldOffsetTable1169[12]; extern const int32_t g_FieldOffsetTable1170[14]; extern const int32_t g_FieldOffsetTable1171[2]; extern const int32_t g_FieldOffsetTable1172[4]; extern const int32_t g_FieldOffsetTable1173[1]; extern const int32_t g_FieldOffsetTable1176[8]; extern const int32_t g_FieldOffsetTable1179[14]; extern const int32_t g_FieldOffsetTable1181[12]; extern const int32_t g_FieldOffsetTable1187[3]; extern const int32_t g_FieldOffsetTable1193[1]; extern const int32_t g_FieldOffsetTable1195[1]; extern const int32_t g_FieldOffsetTable1199[1]; extern const int32_t g_FieldOffsetTable1202[3]; extern const int32_t g_FieldOffsetTable1205[3]; extern const int32_t g_FieldOffsetTable1206[2]; extern const int32_t g_FieldOffsetTable1208[4]; extern const int32_t g_FieldOffsetTable1211[1]; extern const int32_t g_FieldOffsetTable1212[4]; extern const int32_t g_FieldOffsetTable1215[1]; extern const int32_t g_FieldOffsetTable1218[2]; extern const int32_t g_FieldOffsetTable1222[6]; extern const int32_t g_FieldOffsetTable1223[4]; extern const int32_t g_FieldOffsetTable1224[4]; extern const int32_t g_FieldOffsetTable1225[14]; extern const int32_t g_FieldOffsetTable1227[1]; extern const int32_t g_FieldOffsetTable1228[1]; extern const int32_t g_FieldOffsetTable1229[4]; extern const int32_t g_FieldOffsetTable1230[4]; extern const int32_t g_FieldOffsetTable1231[16]; extern const int32_t g_FieldOffsetTable1232[2]; extern const int32_t g_FieldOffsetTable1233[1]; extern const int32_t g_FieldOffsetTable1234[4]; extern const int32_t g_FieldOffsetTable1235[1]; extern const int32_t g_FieldOffsetTable1237[9]; extern const int32_t g_FieldOffsetTable1238[3]; extern const int32_t g_FieldOffsetTable1241[2]; extern const int32_t g_FieldOffsetTable1245[1]; extern const int32_t g_FieldOffsetTable1253[10]; extern const int32_t g_FieldOffsetTable1254[2]; extern const int32_t g_FieldOffsetTable1256[3]; extern const int32_t g_FieldOffsetTable1257[2]; extern const int32_t g_FieldOffsetTable1258[1]; extern const int32_t g_FieldOffsetTable1260[1]; extern const int32_t g_FieldOffsetTable1261[3]; extern const int32_t g_FieldOffsetTable1262[3]; extern const int32_t g_FieldOffsetTable1263[1]; extern const int32_t g_FieldOffsetTable1265[2]; extern const int32_t g_FieldOffsetTable1266[26]; extern const int32_t g_FieldOffsetTable1268[1]; extern const int32_t g_FieldOffsetTable1270[5]; extern const int32_t g_FieldOffsetTable1271[3]; extern const int32_t g_FieldOffsetTable1274[6]; extern const int32_t g_FieldOffsetTable1275[6]; extern const int32_t g_FieldOffsetTable1276[1]; extern const int32_t g_FieldOffsetTable1277[11]; extern const int32_t g_FieldOffsetTable1281[11]; extern const int32_t g_FieldOffsetTable1282[7]; extern const int32_t g_FieldOffsetTable1283[1]; extern const int32_t g_FieldOffsetTable1285[2]; extern const int32_t g_FieldOffsetTable1291[4]; extern const int32_t g_FieldOffsetTable1292[11]; extern const int32_t g_FieldOffsetTable1295[5]; extern const int32_t g_FieldOffsetTable1296[2]; extern const int32_t g_FieldOffsetTable1297[9]; extern const int32_t g_FieldOffsetTable1298[6]; extern const int32_t g_FieldOffsetTable1300[5]; extern const int32_t g_FieldOffsetTable1301[5]; extern const int32_t g_FieldOffsetTable1302[5]; extern const int32_t g_FieldOffsetTable1303[3]; extern const int32_t g_FieldOffsetTable1312[5]; extern const int32_t g_FieldOffsetTable1313[5]; extern const int32_t g_FieldOffsetTable1314[18]; extern const int32_t g_FieldOffsetTable1315[11]; extern const int32_t g_FieldOffsetTable1316[10]; extern const int32_t g_FieldOffsetTable1317[3]; extern const int32_t g_FieldOffsetTable1318[3]; extern const int32_t g_FieldOffsetTable1319[2]; extern const int32_t g_FieldOffsetTable1321[2]; extern const int32_t g_FieldOffsetTable1322[4]; extern const int32_t g_FieldOffsetTable1323[11]; extern const int32_t g_FieldOffsetTable1324[1]; extern const int32_t g_FieldOffsetTable1325[4]; extern const int32_t g_FieldOffsetTable1326[1]; extern const int32_t g_FieldOffsetTable1331[4]; extern const int32_t g_FieldOffsetTable1332[33]; extern const int32_t g_FieldOffsetTable1333[9]; extern const int32_t g_FieldOffsetTable1334[12]; extern const int32_t g_FieldOffsetTable1336[7]; extern const int32_t g_FieldOffsetTable1338[2]; extern const int32_t g_FieldOffsetTable1339[15]; extern const int32_t g_FieldOffsetTable1340[17]; extern const int32_t g_FieldOffsetTable1341[12]; extern const int32_t g_FieldOffsetTable1342[10]; extern const int32_t g_FieldOffsetTable1343[5]; extern const int32_t g_FieldOffsetTable1344[3]; extern const int32_t g_FieldOffsetTable1345[5]; extern const int32_t g_FieldOffsetTable1346[27]; extern const int32_t g_FieldOffsetTable1348[3]; extern const int32_t g_FieldOffsetTable1349[5]; extern const int32_t g_FieldOffsetTable1350[16]; extern const int32_t g_FieldOffsetTable1351[3]; extern const int32_t g_FieldOffsetTable1352[1]; extern const int32_t g_FieldOffsetTable1354[4]; extern const int32_t g_FieldOffsetTable1356[3]; extern const int32_t g_FieldOffsetTable1357[16]; extern const int32_t g_FieldOffsetTable1358[3]; extern const int32_t g_FieldOffsetTable1359[6]; extern const int32_t g_FieldOffsetTable1360[11]; extern const int32_t g_FieldOffsetTable1361[1]; extern const int32_t g_FieldOffsetTable1362[1]; extern const int32_t g_FieldOffsetTable1363[9]; extern const int32_t g_FieldOffsetTable1364[1]; extern const int32_t g_FieldOffsetTable1365[1]; extern const int32_t g_FieldOffsetTable1366[1]; extern const int32_t g_FieldOffsetTable1368[3]; extern const int32_t g_FieldOffsetTable1370[3]; extern const int32_t g_FieldOffsetTable1371[2]; extern const int32_t g_FieldOffsetTable1372[3]; extern const int32_t g_FieldOffsetTable1374[1]; extern const int32_t g_FieldOffsetTable1375[1]; extern const int32_t g_FieldOffsetTable1376[1]; extern const int32_t g_FieldOffsetTable1378[3]; extern const int32_t g_FieldOffsetTable1379[34]; extern const int32_t g_FieldOffsetTable1380[5]; extern const int32_t g_FieldOffsetTable1381[6]; extern const int32_t g_FieldOffsetTable1382[4]; extern const int32_t g_FieldOffsetTable1383[4]; extern const int32_t g_FieldOffsetTable1387[6]; extern const int32_t g_FieldOffsetTable1388[3]; extern const int32_t g_FieldOffsetTable1389[10]; extern const int32_t g_FieldOffsetTable1390[6]; extern const int32_t g_FieldOffsetTable1391[9]; extern const int32_t g_FieldOffsetTable1392[322]; extern const int32_t g_FieldOffsetTable1393[3]; extern const int32_t g_FieldOffsetTable1395[5]; extern const int32_t g_FieldOffsetTable1396[2]; extern const int32_t g_FieldOffsetTable1397[2]; extern const int32_t g_FieldOffsetTable1399[1]; extern const int32_t g_FieldOffsetTable1400[1]; extern const int32_t g_FieldOffsetTable1401[2]; extern const int32_t g_FieldOffsetTable1402[2]; extern const int32_t g_FieldOffsetTable1403[2]; extern const int32_t g_FieldOffsetTable1404[2]; extern const int32_t g_FieldOffsetTable1405[4]; extern const int32_t g_FieldOffsetTable1411[1]; extern const int32_t g_FieldOffsetTable1412[2]; extern const int32_t g_FieldOffsetTable1413[10]; extern const int32_t g_FieldOffsetTable1414[1]; extern const int32_t g_FieldOffsetTable1415[8]; extern const int32_t g_FieldOffsetTable1416[6]; extern const int32_t g_FieldOffsetTable1418[1]; extern const int32_t g_FieldOffsetTable1419[1]; extern const int32_t g_FieldOffsetTable1420[1]; extern const int32_t g_FieldOffsetTable1421[1]; extern const int32_t g_FieldOffsetTable1422[1]; extern const int32_t g_FieldOffsetTable1423[1]; extern const int32_t g_FieldOffsetTable1424[4]; extern const int32_t g_FieldOffsetTable1425[5]; extern const int32_t g_FieldOffsetTable1426[1]; extern const int32_t g_FieldOffsetTable1427[4]; extern const int32_t g_FieldOffsetTable1428[4]; extern const int32_t g_FieldOffsetTable1430[1]; extern const int32_t g_FieldOffsetTable1432[1]; extern const int32_t g_FieldOffsetTable1434[1]; extern const int32_t g_FieldOffsetTable1436[1]; extern const int32_t g_FieldOffsetTable1438[1]; extern const int32_t g_FieldOffsetTable1440[3]; extern const int32_t g_FieldOffsetTable1441[5]; extern const int32_t g_FieldOffsetTable1442[1]; extern const int32_t g_FieldOffsetTable1451[6]; extern const int32_t g_FieldOffsetTable1452[3]; extern const int32_t g_FieldOffsetTable1453[1]; extern const int32_t g_FieldOffsetTable1457[3]; extern const int32_t g_FieldOffsetTable1458[2]; extern const int32_t g_FieldOffsetTable1460[3]; extern const int32_t g_FieldOffsetTable1461[3]; extern const int32_t g_FieldOffsetTable1464[3]; extern const int32_t g_FieldOffsetTable1465[1]; extern const int32_t g_FieldOffsetTable1468[2]; extern const int32_t g_FieldOffsetTable1471[1]; extern const int32_t g_FieldOffsetTable1472[5]; extern const int32_t g_FieldOffsetTable1473[1]; extern const int32_t g_FieldOffsetTable1477[3]; extern const int32_t g_FieldOffsetTable1496[12]; extern const int32_t g_FieldOffsetTable1497[2]; extern const int32_t g_FieldOffsetTable1499[2]; extern const int32_t g_FieldOffsetTable1500[18]; extern const int32_t g_FieldOffsetTable1501[36]; extern const int32_t g_FieldOffsetTable1503[6]; extern const int32_t g_FieldOffsetTable1504[1]; extern const int32_t g_FieldOffsetTable1505[10]; extern const int32_t g_FieldOffsetTable1507[2]; extern const int32_t g_FieldOffsetTable1508[1]; extern const int32_t g_FieldOffsetTable1509[1]; extern const int32_t g_FieldOffsetTable1510[21]; extern const int32_t g_FieldOffsetTable1511[4]; extern const int32_t g_FieldOffsetTable1512[5]; extern const int32_t g_FieldOffsetTable1514[6]; extern const int32_t g_FieldOffsetTable1515[6]; extern const int32_t g_FieldOffsetTable1516[2]; extern const int32_t g_FieldOffsetTable1517[1]; extern const int32_t g_FieldOffsetTable1518[2]; extern const int32_t g_FieldOffsetTable1519[13]; extern const int32_t g_FieldOffsetTable1520[3]; extern const int32_t g_FieldOffsetTable1521[3]; extern const int32_t g_FieldOffsetTable1524[4]; extern const int32_t g_FieldOffsetTable1526[6]; extern const int32_t g_FieldOffsetTable1527[4]; extern const int32_t g_FieldOffsetTable1529[5]; extern const int32_t g_FieldOffsetTable1531[2]; extern const int32_t g_FieldOffsetTable1532[6]; extern const int32_t g_FieldOffsetTable1533[8]; extern const int32_t g_FieldOffsetTable1534[1]; extern const int32_t g_FieldOffsetTable1536[6]; extern const int32_t g_FieldOffsetTable1537[7]; extern const int32_t g_FieldOffsetTable1539[7]; extern const int32_t g_FieldOffsetTable1540[6]; extern const int32_t g_FieldOffsetTable1541[9]; extern const int32_t g_FieldOffsetTable1542[7]; extern const int32_t g_FieldOffsetTable1543[14]; extern const int32_t g_FieldOffsetTable1544[4]; extern const int32_t g_FieldOffsetTable1545[2]; extern const int32_t g_FieldOffsetTable1546[1]; extern const int32_t g_FieldOffsetTable1548[2]; extern const int32_t g_FieldOffsetTable1549[5]; extern const int32_t g_FieldOffsetTable1550[12]; extern const int32_t g_FieldOffsetTable1551[3]; extern const int32_t g_FieldOffsetTable1552[17]; extern const int32_t g_FieldOffsetTable1553[8]; extern const int32_t g_FieldOffsetTable1554[5]; extern const int32_t g_FieldOffsetTable1555[3]; extern const int32_t g_FieldOffsetTable1557[15]; extern const int32_t g_FieldOffsetTable1558[5]; extern const int32_t g_FieldOffsetTable1559[6]; extern const int32_t g_FieldOffsetTable1560[3]; extern const int32_t g_FieldOffsetTable1561[3]; extern const int32_t g_FieldOffsetTable1562[5]; extern const int32_t g_FieldOffsetTable1563[5]; extern const int32_t g_FieldOffsetTable1564[5]; extern const int32_t g_FieldOffsetTable1567[47]; extern const int32_t g_FieldOffsetTable1568[11]; extern const int32_t g_FieldOffsetTable1569[4]; extern const int32_t g_FieldOffsetTable1570[7]; extern const int32_t g_FieldOffsetTable1571[4]; extern const int32_t g_FieldOffsetTable1575[3]; extern const int32_t g_FieldOffsetTable1576[6]; extern const int32_t g_FieldOffsetTable1577[8]; extern const int32_t g_FieldOffsetTable1578[5]; extern const int32_t g_FieldOffsetTable1579[9]; extern const int32_t g_FieldOffsetTable1583[5]; extern const int32_t g_FieldOffsetTable1584[6]; extern const int32_t g_FieldOffsetTable1585[2]; extern const int32_t g_FieldOffsetTable1586[8]; extern const int32_t g_FieldOffsetTable1587[11]; extern const int32_t g_FieldOffsetTable1588[5]; extern const int32_t g_FieldOffsetTable1590[3]; extern const int32_t g_FieldOffsetTable1591[5]; extern const int32_t g_FieldOffsetTable1592[36]; extern const int32_t g_FieldOffsetTable1593[4]; extern const int32_t g_FieldOffsetTable1594[4]; extern const int32_t g_FieldOffsetTable1596[14]; extern const int32_t g_FieldOffsetTable1597[5]; extern const int32_t g_FieldOffsetTable1598[5]; extern const int32_t g_FieldOffsetTable1600[15]; extern const int32_t g_FieldOffsetTable1601[5]; extern const int32_t g_FieldOffsetTable1603[3]; extern const int32_t g_FieldOffsetTable1604[3]; extern const int32_t g_FieldOffsetTable1605[1]; extern const int32_t g_FieldOffsetTable1606[10]; extern const int32_t g_FieldOffsetTable1607[7]; extern const int32_t g_FieldOffsetTable1608[5]; extern const int32_t g_FieldOffsetTable1609[3]; extern const int32_t g_FieldOffsetTable1611[4]; extern const int32_t g_FieldOffsetTable1612[2]; extern const int32_t g_FieldOffsetTable1616[2]; extern const int32_t g_FieldOffsetTable1617[4]; extern const int32_t g_FieldOffsetTable1618[6]; extern const int32_t g_FieldOffsetTable1619[14]; extern const int32_t g_FieldOffsetTable1620[4]; extern const int32_t g_FieldOffsetTable1621[4]; extern const int32_t g_FieldOffsetTable1622[6]; extern const int32_t g_FieldOffsetTable1623[4]; extern const int32_t g_FieldOffsetTable1624[4]; extern const int32_t g_FieldOffsetTable1625[6]; extern const int32_t g_FieldOffsetTable1626[5]; extern const int32_t g_FieldOffsetTable1627[3]; extern const int32_t g_FieldOffsetTable1628[4]; extern const int32_t g_FieldOffsetTable1630[5]; extern const int32_t g_FieldOffsetTable1636[7]; extern const int32_t g_FieldOffsetTable1637[8]; extern const int32_t g_FieldOffsetTable1638[4]; extern const int32_t g_FieldOffsetTable1639[9]; extern const int32_t g_FieldOffsetTable1640[8]; extern const int32_t g_FieldOffsetTable1643[2]; extern const int32_t g_FieldOffsetTable1644[1]; extern const int32_t g_FieldOffsetTable1645[4]; extern const int32_t g_FieldOffsetTable1646[5]; extern const int32_t g_FieldOffsetTable1651[11]; extern const int32_t g_FieldOffsetTable1653[1]; extern const int32_t g_FieldOffsetTable1658[4]; extern const int32_t g_FieldOffsetTable1659[1]; extern const int32_t g_FieldOffsetTable1662[5]; extern const int32_t g_FieldOffsetTable1663[8]; extern const int32_t g_FieldOffsetTable1664[2]; extern const int32_t g_FieldOffsetTable1665[6]; extern const int32_t g_FieldOffsetTable1667[11]; extern const int32_t g_FieldOffsetTable1668[10]; extern const int32_t g_FieldOffsetTable1669[1]; extern const int32_t g_FieldOffsetTable1670[6]; extern const int32_t g_FieldOffsetTable1671[4]; extern const int32_t g_FieldOffsetTable1672[3]; extern const int32_t g_FieldOffsetTable1673[6]; extern const int32_t g_FieldOffsetTable1674[3]; extern const int32_t g_FieldOffsetTable1675[3]; extern const int32_t g_FieldOffsetTable1676[4]; extern const int32_t g_FieldOffsetTable1677[3]; extern const int32_t g_FieldOffsetTable1678[8]; extern const int32_t g_FieldOffsetTable1679[14]; extern const int32_t g_FieldOffsetTable1680[7]; extern const int32_t g_FieldOffsetTable1681[4]; extern const int32_t g_FieldOffsetTable1682[10]; extern const int32_t g_FieldOffsetTable1683[3]; extern const int32_t g_FieldOffsetTable1684[4]; extern const int32_t g_FieldOffsetTable1685[4]; extern const int32_t g_FieldOffsetTable1686[4]; extern const int32_t g_FieldOffsetTable1687[6]; extern const int32_t g_FieldOffsetTable1688[3]; extern const int32_t g_FieldOffsetTable1689[14]; extern const int32_t g_FieldOffsetTable1690[4]; extern const int32_t* g_FieldOffsetTable[1691] = { NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable5, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable11, g_FieldOffsetTable12, NULL, g_FieldOffsetTable14, g_FieldOffsetTable15, g_FieldOffsetTable16, g_FieldOffsetTable17, g_FieldOffsetTable18, g_FieldOffsetTable19, g_FieldOffsetTable20, g_FieldOffsetTable21, NULL, NULL, NULL, NULL, g_FieldOffsetTable26, g_FieldOffsetTable27, NULL, NULL, g_FieldOffsetTable30, g_FieldOffsetTable31, g_FieldOffsetTable32, g_FieldOffsetTable33, g_FieldOffsetTable34, NULL, g_FieldOffsetTable36, g_FieldOffsetTable37, g_FieldOffsetTable38, g_FieldOffsetTable39, NULL, g_FieldOffsetTable41, g_FieldOffsetTable42, g_FieldOffsetTable43, g_FieldOffsetTable44, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable51, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable57, NULL, g_FieldOffsetTable59, g_FieldOffsetTable60, NULL, NULL, g_FieldOffsetTable63, g_FieldOffsetTable64, g_FieldOffsetTable65, NULL, g_FieldOffsetTable67, NULL, NULL, NULL, g_FieldOffsetTable71, g_FieldOffsetTable72, NULL, g_FieldOffsetTable74, g_FieldOffsetTable75, g_FieldOffsetTable76, g_FieldOffsetTable77, NULL, NULL, g_FieldOffsetTable80, g_FieldOffsetTable81, g_FieldOffsetTable82, g_FieldOffsetTable83, NULL, NULL, g_FieldOffsetTable86, NULL, NULL, NULL, g_FieldOffsetTable90, g_FieldOffsetTable91, g_FieldOffsetTable92, g_FieldOffsetTable93, g_FieldOffsetTable94, g_FieldOffsetTable95, g_FieldOffsetTable96, g_FieldOffsetTable97, g_FieldOffsetTable98, g_FieldOffsetTable99, g_FieldOffsetTable100, g_FieldOffsetTable101, g_FieldOffsetTable102, g_FieldOffsetTable103, g_FieldOffsetTable104, g_FieldOffsetTable105, NULL, NULL, g_FieldOffsetTable108, NULL, g_FieldOffsetTable110, g_FieldOffsetTable111, g_FieldOffsetTable112, NULL, NULL, g_FieldOffsetTable115, g_FieldOffsetTable116, g_FieldOffsetTable117, NULL, g_FieldOffsetTable119, g_FieldOffsetTable120, g_FieldOffsetTable121, NULL, g_FieldOffsetTable123, g_FieldOffsetTable124, g_FieldOffsetTable125, NULL, g_FieldOffsetTable127, g_FieldOffsetTable128, g_FieldOffsetTable129, g_FieldOffsetTable130, g_FieldOffsetTable131, g_FieldOffsetTable132, NULL, g_FieldOffsetTable134, g_FieldOffsetTable135, g_FieldOffsetTable136, g_FieldOffsetTable137, NULL, NULL, NULL, g_FieldOffsetTable141, g_FieldOffsetTable142, g_FieldOffsetTable143, g_FieldOffsetTable144, g_FieldOffsetTable145, NULL, NULL, g_FieldOffsetTable148, g_FieldOffsetTable149, NULL, NULL, NULL, g_FieldOffsetTable153, NULL, NULL, g_FieldOffsetTable156, g_FieldOffsetTable157, g_FieldOffsetTable158, g_FieldOffsetTable159, g_FieldOffsetTable160, g_FieldOffsetTable161, NULL, g_FieldOffsetTable163, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable170, g_FieldOffsetTable171, g_FieldOffsetTable172, g_FieldOffsetTable173, g_FieldOffsetTable174, g_FieldOffsetTable175, g_FieldOffsetTable176, g_FieldOffsetTable177, g_FieldOffsetTable178, NULL, NULL, g_FieldOffsetTable181, g_FieldOffsetTable182, g_FieldOffsetTable183, g_FieldOffsetTable184, g_FieldOffsetTable185, NULL, g_FieldOffsetTable187, g_FieldOffsetTable188, g_FieldOffsetTable189, g_FieldOffsetTable190, g_FieldOffsetTable191, g_FieldOffsetTable192, g_FieldOffsetTable193, g_FieldOffsetTable194, g_FieldOffsetTable195, g_FieldOffsetTable196, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable202, g_FieldOffsetTable203, g_FieldOffsetTable204, g_FieldOffsetTable205, g_FieldOffsetTable206, g_FieldOffsetTable207, g_FieldOffsetTable208, g_FieldOffsetTable209, g_FieldOffsetTable210, g_FieldOffsetTable211, g_FieldOffsetTable212, g_FieldOffsetTable213, g_FieldOffsetTable214, NULL, g_FieldOffsetTable216, g_FieldOffsetTable217, g_FieldOffsetTable218, g_FieldOffsetTable219, NULL, NULL, NULL, g_FieldOffsetTable223, g_FieldOffsetTable224, g_FieldOffsetTable225, g_FieldOffsetTable226, g_FieldOffsetTable227, g_FieldOffsetTable228, g_FieldOffsetTable229, g_FieldOffsetTable230, g_FieldOffsetTable231, g_FieldOffsetTable232, g_FieldOffsetTable233, g_FieldOffsetTable234, g_FieldOffsetTable235, g_FieldOffsetTable236, NULL, g_FieldOffsetTable238, NULL, g_FieldOffsetTable240, NULL, NULL, NULL, g_FieldOffsetTable244, g_FieldOffsetTable245, g_FieldOffsetTable246, g_FieldOffsetTable247, g_FieldOffsetTable248, g_FieldOffsetTable249, g_FieldOffsetTable250, g_FieldOffsetTable251, NULL, NULL, g_FieldOffsetTable254, g_FieldOffsetTable255, NULL, g_FieldOffsetTable257, g_FieldOffsetTable258, g_FieldOffsetTable259, g_FieldOffsetTable260, g_FieldOffsetTable261, g_FieldOffsetTable262, NULL, g_FieldOffsetTable264, g_FieldOffsetTable265, g_FieldOffsetTable266, NULL, g_FieldOffsetTable268, g_FieldOffsetTable269, NULL, g_FieldOffsetTable271, g_FieldOffsetTable272, g_FieldOffsetTable273, NULL, g_FieldOffsetTable275, g_FieldOffsetTable276, NULL, g_FieldOffsetTable278, g_FieldOffsetTable279, NULL, g_FieldOffsetTable281, g_FieldOffsetTable282, g_FieldOffsetTable283, g_FieldOffsetTable284, NULL, g_FieldOffsetTable286, g_FieldOffsetTable287, g_FieldOffsetTable288, g_FieldOffsetTable289, NULL, g_FieldOffsetTable291, g_FieldOffsetTable292, g_FieldOffsetTable293, g_FieldOffsetTable294, g_FieldOffsetTable295, g_FieldOffsetTable296, g_FieldOffsetTable297, g_FieldOffsetTable298, g_FieldOffsetTable299, g_FieldOffsetTable300, g_FieldOffsetTable301, g_FieldOffsetTable302, g_FieldOffsetTable303, g_FieldOffsetTable304, NULL, g_FieldOffsetTable306, NULL, g_FieldOffsetTable308, g_FieldOffsetTable309, g_FieldOffsetTable310, g_FieldOffsetTable311, g_FieldOffsetTable312, g_FieldOffsetTable313, g_FieldOffsetTable314, g_FieldOffsetTable315, g_FieldOffsetTable316, g_FieldOffsetTable317, g_FieldOffsetTable318, g_FieldOffsetTable319, g_FieldOffsetTable320, g_FieldOffsetTable321, g_FieldOffsetTable322, NULL, g_FieldOffsetTable324, g_FieldOffsetTable325, g_FieldOffsetTable326, g_FieldOffsetTable327, g_FieldOffsetTable328, g_FieldOffsetTable329, g_FieldOffsetTable330, g_FieldOffsetTable331, NULL, g_FieldOffsetTable333, NULL, g_FieldOffsetTable335, g_FieldOffsetTable336, g_FieldOffsetTable337, NULL, g_FieldOffsetTable339, NULL, g_FieldOffsetTable341, g_FieldOffsetTable342, g_FieldOffsetTable343, g_FieldOffsetTable344, g_FieldOffsetTable345, NULL, NULL, g_FieldOffsetTable348, g_FieldOffsetTable349, g_FieldOffsetTable350, g_FieldOffsetTable351, g_FieldOffsetTable352, g_FieldOffsetTable353, NULL, NULL, NULL, g_FieldOffsetTable357, g_FieldOffsetTable358, g_FieldOffsetTable359, g_FieldOffsetTable360, g_FieldOffsetTable361, g_FieldOffsetTable362, NULL, g_FieldOffsetTable364, NULL, NULL, NULL, g_FieldOffsetTable368, NULL, g_FieldOffsetTable370, g_FieldOffsetTable371, g_FieldOffsetTable372, g_FieldOffsetTable373, g_FieldOffsetTable374, g_FieldOffsetTable375, g_FieldOffsetTable376, g_FieldOffsetTable377, NULL, g_FieldOffsetTable379, g_FieldOffsetTable380, g_FieldOffsetTable381, g_FieldOffsetTable382, NULL, g_FieldOffsetTable384, NULL, g_FieldOffsetTable386, g_FieldOffsetTable387, NULL, g_FieldOffsetTable389, NULL, NULL, g_FieldOffsetTable392, g_FieldOffsetTable393, g_FieldOffsetTable394, g_FieldOffsetTable395, g_FieldOffsetTable396, g_FieldOffsetTable397, g_FieldOffsetTable398, g_FieldOffsetTable399, NULL, g_FieldOffsetTable401, g_FieldOffsetTable402, g_FieldOffsetTable403, g_FieldOffsetTable404, g_FieldOffsetTable405, NULL, g_FieldOffsetTable407, g_FieldOffsetTable408, g_FieldOffsetTable409, g_FieldOffsetTable410, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable432, g_FieldOffsetTable433, NULL, g_FieldOffsetTable435, NULL, NULL, NULL, g_FieldOffsetTable439, g_FieldOffsetTable440, g_FieldOffsetTable441, g_FieldOffsetTable442, g_FieldOffsetTable443, g_FieldOffsetTable444, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable452, g_FieldOffsetTable453, g_FieldOffsetTable454, g_FieldOffsetTable455, NULL, g_FieldOffsetTable457, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable468, g_FieldOffsetTable469, g_FieldOffsetTable470, g_FieldOffsetTable471, g_FieldOffsetTable472, g_FieldOffsetTable473, g_FieldOffsetTable474, g_FieldOffsetTable475, g_FieldOffsetTable476, g_FieldOffsetTable477, g_FieldOffsetTable478, g_FieldOffsetTable479, g_FieldOffsetTable480, g_FieldOffsetTable481, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable491, g_FieldOffsetTable492, g_FieldOffsetTable493, g_FieldOffsetTable494, g_FieldOffsetTable495, g_FieldOffsetTable496, g_FieldOffsetTable497, g_FieldOffsetTable498, NULL, NULL, g_FieldOffsetTable501, g_FieldOffsetTable502, NULL, g_FieldOffsetTable504, g_FieldOffsetTable505, g_FieldOffsetTable506, g_FieldOffsetTable507, g_FieldOffsetTable508, NULL, g_FieldOffsetTable510, NULL, g_FieldOffsetTable512, g_FieldOffsetTable513, g_FieldOffsetTable514, NULL, g_FieldOffsetTable516, g_FieldOffsetTable517, g_FieldOffsetTable518, g_FieldOffsetTable519, NULL, NULL, NULL, g_FieldOffsetTable523, g_FieldOffsetTable524, g_FieldOffsetTable525, g_FieldOffsetTable526, g_FieldOffsetTable527, g_FieldOffsetTable528, g_FieldOffsetTable529, g_FieldOffsetTable530, NULL, NULL, g_FieldOffsetTable533, g_FieldOffsetTable534, NULL, NULL, NULL, g_FieldOffsetTable538, g_FieldOffsetTable539, g_FieldOffsetTable540, g_FieldOffsetTable541, g_FieldOffsetTable542, g_FieldOffsetTable543, g_FieldOffsetTable544, g_FieldOffsetTable545, g_FieldOffsetTable546, g_FieldOffsetTable547, g_FieldOffsetTable548, g_FieldOffsetTable549, g_FieldOffsetTable550, NULL, g_FieldOffsetTable552, g_FieldOffsetTable553, g_FieldOffsetTable554, g_FieldOffsetTable555, g_FieldOffsetTable556, g_FieldOffsetTable557, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable566, g_FieldOffsetTable567, g_FieldOffsetTable568, g_FieldOffsetTable569, g_FieldOffsetTable570, g_FieldOffsetTable571, g_FieldOffsetTable572, g_FieldOffsetTable573, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable579, NULL, g_FieldOffsetTable581, NULL, g_FieldOffsetTable583, g_FieldOffsetTable584, g_FieldOffsetTable585, g_FieldOffsetTable586, g_FieldOffsetTable587, g_FieldOffsetTable588, g_FieldOffsetTable589, NULL, NULL, NULL, g_FieldOffsetTable593, g_FieldOffsetTable594, g_FieldOffsetTable595, NULL, NULL, g_FieldOffsetTable598, g_FieldOffsetTable599, g_FieldOffsetTable600, g_FieldOffsetTable601, NULL, NULL, g_FieldOffsetTable604, g_FieldOffsetTable605, g_FieldOffsetTable606, g_FieldOffsetTable607, g_FieldOffsetTable608, NULL, NULL, NULL, NULL, g_FieldOffsetTable613, g_FieldOffsetTable614, g_FieldOffsetTable615, NULL, NULL, g_FieldOffsetTable618, g_FieldOffsetTable619, g_FieldOffsetTable620, NULL, g_FieldOffsetTable622, g_FieldOffsetTable623, g_FieldOffsetTable624, NULL, g_FieldOffsetTable626, NULL, g_FieldOffsetTable628, g_FieldOffsetTable629, NULL, g_FieldOffsetTable631, g_FieldOffsetTable632, g_FieldOffsetTable633, g_FieldOffsetTable634, g_FieldOffsetTable635, NULL, NULL, NULL, g_FieldOffsetTable639, g_FieldOffsetTable640, NULL, g_FieldOffsetTable642, g_FieldOffsetTable643, g_FieldOffsetTable644, NULL, g_FieldOffsetTable646, NULL, g_FieldOffsetTable648, NULL, g_FieldOffsetTable650, g_FieldOffsetTable651, g_FieldOffsetTable652, NULL, NULL, g_FieldOffsetTable655, g_FieldOffsetTable656, NULL, NULL, g_FieldOffsetTable659, NULL, NULL, g_FieldOffsetTable662, g_FieldOffsetTable663, g_FieldOffsetTable664, g_FieldOffsetTable665, g_FieldOffsetTable666, g_FieldOffsetTable667, g_FieldOffsetTable668, NULL, NULL, g_FieldOffsetTable671, NULL, NULL, g_FieldOffsetTable674, g_FieldOffsetTable675, g_FieldOffsetTable676, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable682, g_FieldOffsetTable683, g_FieldOffsetTable684, g_FieldOffsetTable685, g_FieldOffsetTable686, g_FieldOffsetTable687, g_FieldOffsetTable688, g_FieldOffsetTable689, g_FieldOffsetTable690, g_FieldOffsetTable691, g_FieldOffsetTable692, NULL, NULL, NULL, NULL, g_FieldOffsetTable697, NULL, NULL, g_FieldOffsetTable700, NULL, g_FieldOffsetTable702, g_FieldOffsetTable703, g_FieldOffsetTable704, NULL, NULL, g_FieldOffsetTable707, NULL, g_FieldOffsetTable709, g_FieldOffsetTable710, g_FieldOffsetTable711, g_FieldOffsetTable712, g_FieldOffsetTable713, NULL, g_FieldOffsetTable715, g_FieldOffsetTable716, g_FieldOffsetTable717, g_FieldOffsetTable718, g_FieldOffsetTable719, g_FieldOffsetTable720, g_FieldOffsetTable721, g_FieldOffsetTable722, g_FieldOffsetTable723, g_FieldOffsetTable724, g_FieldOffsetTable725, NULL, g_FieldOffsetTable727, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable734, NULL, NULL, NULL, g_FieldOffsetTable738, NULL, g_FieldOffsetTable740, NULL, g_FieldOffsetTable742, g_FieldOffsetTable743, NULL, g_FieldOffsetTable745, NULL, g_FieldOffsetTable747, NULL, g_FieldOffsetTable749, NULL, g_FieldOffsetTable751, g_FieldOffsetTable752, g_FieldOffsetTable753, g_FieldOffsetTable754, NULL, g_FieldOffsetTable756, NULL, g_FieldOffsetTable758, g_FieldOffsetTable759, NULL, g_FieldOffsetTable761, g_FieldOffsetTable762, NULL, g_FieldOffsetTable764, g_FieldOffsetTable765, g_FieldOffsetTable766, g_FieldOffsetTable767, g_FieldOffsetTable768, g_FieldOffsetTable769, NULL, g_FieldOffsetTable771, g_FieldOffsetTable772, g_FieldOffsetTable773, g_FieldOffsetTable774, g_FieldOffsetTable775, g_FieldOffsetTable776, g_FieldOffsetTable777, g_FieldOffsetTable778, NULL, NULL, NULL, NULL, g_FieldOffsetTable783, g_FieldOffsetTable784, g_FieldOffsetTable785, NULL, NULL, NULL, g_FieldOffsetTable789, NULL, g_FieldOffsetTable791, g_FieldOffsetTable792, NULL, NULL, NULL, g_FieldOffsetTable796, g_FieldOffsetTable797, g_FieldOffsetTable798, g_FieldOffsetTable799, NULL, NULL, g_FieldOffsetTable802, NULL, g_FieldOffsetTable804, g_FieldOffsetTable805, g_FieldOffsetTable806, g_FieldOffsetTable807, g_FieldOffsetTable808, g_FieldOffsetTable809, g_FieldOffsetTable810, g_FieldOffsetTable811, NULL, NULL, NULL, g_FieldOffsetTable815, g_FieldOffsetTable816, g_FieldOffsetTable817, g_FieldOffsetTable818, g_FieldOffsetTable819, g_FieldOffsetTable820, g_FieldOffsetTable821, g_FieldOffsetTable822, g_FieldOffsetTable823, g_FieldOffsetTable824, NULL, g_FieldOffsetTable826, g_FieldOffsetTable827, g_FieldOffsetTable828, g_FieldOffsetTable829, g_FieldOffsetTable830, g_FieldOffsetTable831, g_FieldOffsetTable832, NULL, NULL, g_FieldOffsetTable835, g_FieldOffsetTable836, g_FieldOffsetTable837, g_FieldOffsetTable838, g_FieldOffsetTable839, g_FieldOffsetTable840, NULL, g_FieldOffsetTable842, g_FieldOffsetTable843, g_FieldOffsetTable844, g_FieldOffsetTable845, g_FieldOffsetTable846, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable864, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable890, g_FieldOffsetTable891, g_FieldOffsetTable892, NULL, g_FieldOffsetTable894, NULL, NULL, NULL, g_FieldOffsetTable898, NULL, NULL, NULL, g_FieldOffsetTable902, g_FieldOffsetTable903, g_FieldOffsetTable904, NULL, g_FieldOffsetTable906, NULL, g_FieldOffsetTable908, NULL, g_FieldOffsetTable910, g_FieldOffsetTable911, NULL, g_FieldOffsetTable913, g_FieldOffsetTable914, g_FieldOffsetTable915, g_FieldOffsetTable916, NULL, g_FieldOffsetTable918, g_FieldOffsetTable919, g_FieldOffsetTable920, g_FieldOffsetTable921, g_FieldOffsetTable922, NULL, g_FieldOffsetTable924, g_FieldOffsetTable925, g_FieldOffsetTable926, g_FieldOffsetTable927, g_FieldOffsetTable928, g_FieldOffsetTable929, g_FieldOffsetTable930, g_FieldOffsetTable931, g_FieldOffsetTable932, g_FieldOffsetTable933, g_FieldOffsetTable934, g_FieldOffsetTable935, g_FieldOffsetTable936, g_FieldOffsetTable937, g_FieldOffsetTable938, g_FieldOffsetTable939, g_FieldOffsetTable940, g_FieldOffsetTable941, g_FieldOffsetTable942, g_FieldOffsetTable943, g_FieldOffsetTable944, g_FieldOffsetTable945, g_FieldOffsetTable946, g_FieldOffsetTable947, g_FieldOffsetTable948, g_FieldOffsetTable949, g_FieldOffsetTable950, NULL, g_FieldOffsetTable952, NULL, g_FieldOffsetTable954, g_FieldOffsetTable955, g_FieldOffsetTable956, g_FieldOffsetTable957, g_FieldOffsetTable958, g_FieldOffsetTable959, g_FieldOffsetTable960, g_FieldOffsetTable961, g_FieldOffsetTable962, g_FieldOffsetTable963, g_FieldOffsetTable964, g_FieldOffsetTable965, g_FieldOffsetTable966, g_FieldOffsetTable967, g_FieldOffsetTable968, g_FieldOffsetTable969, NULL, g_FieldOffsetTable971, g_FieldOffsetTable972, g_FieldOffsetTable973, g_FieldOffsetTable974, g_FieldOffsetTable975, g_FieldOffsetTable976, g_FieldOffsetTable977, g_FieldOffsetTable978, g_FieldOffsetTable979, g_FieldOffsetTable980, g_FieldOffsetTable981, g_FieldOffsetTable982, g_FieldOffsetTable983, g_FieldOffsetTable984, g_FieldOffsetTable985, NULL, g_FieldOffsetTable987, g_FieldOffsetTable988, NULL, g_FieldOffsetTable990, g_FieldOffsetTable991, g_FieldOffsetTable992, g_FieldOffsetTable993, NULL, g_FieldOffsetTable995, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1001, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1013, g_FieldOffsetTable1014, g_FieldOffsetTable1015, g_FieldOffsetTable1016, g_FieldOffsetTable1017, g_FieldOffsetTable1018, g_FieldOffsetTable1019, g_FieldOffsetTable1020, g_FieldOffsetTable1021, g_FieldOffsetTable1022, g_FieldOffsetTable1023, g_FieldOffsetTable1024, g_FieldOffsetTable1025, g_FieldOffsetTable1026, NULL, g_FieldOffsetTable1028, g_FieldOffsetTable1029, g_FieldOffsetTable1030, g_FieldOffsetTable1031, NULL, g_FieldOffsetTable1033, NULL, NULL, g_FieldOffsetTable1036, NULL, NULL, g_FieldOffsetTable1039, g_FieldOffsetTable1040, NULL, NULL, g_FieldOffsetTable1043, g_FieldOffsetTable1044, NULL, NULL, g_FieldOffsetTable1047, g_FieldOffsetTable1048, g_FieldOffsetTable1049, g_FieldOffsetTable1050, g_FieldOffsetTable1051, g_FieldOffsetTable1052, g_FieldOffsetTable1053, g_FieldOffsetTable1054, g_FieldOffsetTable1055, g_FieldOffsetTable1056, g_FieldOffsetTable1057, g_FieldOffsetTable1058, g_FieldOffsetTable1059, g_FieldOffsetTable1060, g_FieldOffsetTable1061, NULL, g_FieldOffsetTable1063, NULL, g_FieldOffsetTable1065, g_FieldOffsetTable1066, g_FieldOffsetTable1067, g_FieldOffsetTable1068, g_FieldOffsetTable1069, g_FieldOffsetTable1070, g_FieldOffsetTable1071, g_FieldOffsetTable1072, g_FieldOffsetTable1073, g_FieldOffsetTable1074, g_FieldOffsetTable1075, g_FieldOffsetTable1076, g_FieldOffsetTable1077, g_FieldOffsetTable1078, g_FieldOffsetTable1079, g_FieldOffsetTable1080, g_FieldOffsetTable1081, g_FieldOffsetTable1082, g_FieldOffsetTable1083, g_FieldOffsetTable1084, g_FieldOffsetTable1085, g_FieldOffsetTable1086, g_FieldOffsetTable1087, g_FieldOffsetTable1088, g_FieldOffsetTable1089, g_FieldOffsetTable1090, g_FieldOffsetTable1091, g_FieldOffsetTable1092, g_FieldOffsetTable1093, g_FieldOffsetTable1094, g_FieldOffsetTable1095, g_FieldOffsetTable1096, g_FieldOffsetTable1097, g_FieldOffsetTable1098, g_FieldOffsetTable1099, g_FieldOffsetTable1100, g_FieldOffsetTable1101, g_FieldOffsetTable1102, g_FieldOffsetTable1103, g_FieldOffsetTable1104, NULL, NULL, g_FieldOffsetTable1107, g_FieldOffsetTable1108, g_FieldOffsetTable1109, g_FieldOffsetTable1110, g_FieldOffsetTable1111, NULL, NULL, NULL, g_FieldOffsetTable1115, g_FieldOffsetTable1116, g_FieldOffsetTable1117, g_FieldOffsetTable1118, g_FieldOffsetTable1119, g_FieldOffsetTable1120, g_FieldOffsetTable1121, g_FieldOffsetTable1122, g_FieldOffsetTable1123, g_FieldOffsetTable1124, g_FieldOffsetTable1125, g_FieldOffsetTable1126, g_FieldOffsetTable1127, NULL, g_FieldOffsetTable1129, g_FieldOffsetTable1130, NULL, NULL, g_FieldOffsetTable1133, NULL, g_FieldOffsetTable1135, g_FieldOffsetTable1136, g_FieldOffsetTable1137, NULL, g_FieldOffsetTable1139, NULL, g_FieldOffsetTable1141, g_FieldOffsetTable1142, NULL, g_FieldOffsetTable1144, g_FieldOffsetTable1145, g_FieldOffsetTable1146, g_FieldOffsetTable1147, g_FieldOffsetTable1148, g_FieldOffsetTable1149, NULL, NULL, g_FieldOffsetTable1152, g_FieldOffsetTable1153, NULL, g_FieldOffsetTable1155, g_FieldOffsetTable1156, g_FieldOffsetTable1157, g_FieldOffsetTable1158, NULL, NULL, g_FieldOffsetTable1161, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1168, g_FieldOffsetTable1169, g_FieldOffsetTable1170, g_FieldOffsetTable1171, g_FieldOffsetTable1172, g_FieldOffsetTable1173, NULL, NULL, g_FieldOffsetTable1176, NULL, NULL, g_FieldOffsetTable1179, NULL, g_FieldOffsetTable1181, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1187, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1193, NULL, g_FieldOffsetTable1195, NULL, NULL, NULL, g_FieldOffsetTable1199, NULL, NULL, g_FieldOffsetTable1202, NULL, NULL, g_FieldOffsetTable1205, g_FieldOffsetTable1206, NULL, g_FieldOffsetTable1208, NULL, NULL, g_FieldOffsetTable1211, g_FieldOffsetTable1212, NULL, NULL, g_FieldOffsetTable1215, NULL, NULL, g_FieldOffsetTable1218, NULL, NULL, NULL, g_FieldOffsetTable1222, g_FieldOffsetTable1223, g_FieldOffsetTable1224, g_FieldOffsetTable1225, NULL, g_FieldOffsetTable1227, g_FieldOffsetTable1228, g_FieldOffsetTable1229, g_FieldOffsetTable1230, g_FieldOffsetTable1231, g_FieldOffsetTable1232, g_FieldOffsetTable1233, g_FieldOffsetTable1234, g_FieldOffsetTable1235, NULL, g_FieldOffsetTable1237, g_FieldOffsetTable1238, NULL, NULL, g_FieldOffsetTable1241, NULL, NULL, NULL, g_FieldOffsetTable1245, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1253, g_FieldOffsetTable1254, NULL, g_FieldOffsetTable1256, g_FieldOffsetTable1257, g_FieldOffsetTable1258, NULL, g_FieldOffsetTable1260, g_FieldOffsetTable1261, g_FieldOffsetTable1262, g_FieldOffsetTable1263, NULL, g_FieldOffsetTable1265, g_FieldOffsetTable1266, NULL, g_FieldOffsetTable1268, NULL, g_FieldOffsetTable1270, g_FieldOffsetTable1271, NULL, NULL, g_FieldOffsetTable1274, g_FieldOffsetTable1275, g_FieldOffsetTable1276, g_FieldOffsetTable1277, NULL, NULL, NULL, g_FieldOffsetTable1281, g_FieldOffsetTable1282, g_FieldOffsetTable1283, NULL, g_FieldOffsetTable1285, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1291, g_FieldOffsetTable1292, NULL, NULL, g_FieldOffsetTable1295, g_FieldOffsetTable1296, g_FieldOffsetTable1297, g_FieldOffsetTable1298, NULL, g_FieldOffsetTable1300, g_FieldOffsetTable1301, g_FieldOffsetTable1302, g_FieldOffsetTable1303, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1312, g_FieldOffsetTable1313, g_FieldOffsetTable1314, g_FieldOffsetTable1315, g_FieldOffsetTable1316, g_FieldOffsetTable1317, g_FieldOffsetTable1318, g_FieldOffsetTable1319, NULL, g_FieldOffsetTable1321, g_FieldOffsetTable1322, g_FieldOffsetTable1323, g_FieldOffsetTable1324, g_FieldOffsetTable1325, g_FieldOffsetTable1326, NULL, NULL, NULL, NULL, g_FieldOffsetTable1331, g_FieldOffsetTable1332, g_FieldOffsetTable1333, g_FieldOffsetTable1334, NULL, g_FieldOffsetTable1336, NULL, g_FieldOffsetTable1338, g_FieldOffsetTable1339, g_FieldOffsetTable1340, g_FieldOffsetTable1341, g_FieldOffsetTable1342, g_FieldOffsetTable1343, g_FieldOffsetTable1344, g_FieldOffsetTable1345, g_FieldOffsetTable1346, NULL, g_FieldOffsetTable1348, g_FieldOffsetTable1349, g_FieldOffsetTable1350, g_FieldOffsetTable1351, g_FieldOffsetTable1352, NULL, g_FieldOffsetTable1354, NULL, g_FieldOffsetTable1356, g_FieldOffsetTable1357, g_FieldOffsetTable1358, g_FieldOffsetTable1359, g_FieldOffsetTable1360, g_FieldOffsetTable1361, g_FieldOffsetTable1362, g_FieldOffsetTable1363, g_FieldOffsetTable1364, g_FieldOffsetTable1365, g_FieldOffsetTable1366, NULL, g_FieldOffsetTable1368, NULL, g_FieldOffsetTable1370, g_FieldOffsetTable1371, g_FieldOffsetTable1372, NULL, g_FieldOffsetTable1374, g_FieldOffsetTable1375, g_FieldOffsetTable1376, NULL, g_FieldOffsetTable1378, g_FieldOffsetTable1379, g_FieldOffsetTable1380, g_FieldOffsetTable1381, g_FieldOffsetTable1382, g_FieldOffsetTable1383, NULL, NULL, NULL, g_FieldOffsetTable1387, g_FieldOffsetTable1388, g_FieldOffsetTable1389, g_FieldOffsetTable1390, g_FieldOffsetTable1391, g_FieldOffsetTable1392, g_FieldOffsetTable1393, NULL, g_FieldOffsetTable1395, g_FieldOffsetTable1396, g_FieldOffsetTable1397, NULL, g_FieldOffsetTable1399, g_FieldOffsetTable1400, g_FieldOffsetTable1401, g_FieldOffsetTable1402, g_FieldOffsetTable1403, g_FieldOffsetTable1404, g_FieldOffsetTable1405, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1411, g_FieldOffsetTable1412, g_FieldOffsetTable1413, g_FieldOffsetTable1414, g_FieldOffsetTable1415, g_FieldOffsetTable1416, NULL, g_FieldOffsetTable1418, g_FieldOffsetTable1419, g_FieldOffsetTable1420, g_FieldOffsetTable1421, g_FieldOffsetTable1422, g_FieldOffsetTable1423, g_FieldOffsetTable1424, g_FieldOffsetTable1425, g_FieldOffsetTable1426, g_FieldOffsetTable1427, g_FieldOffsetTable1428, NULL, g_FieldOffsetTable1430, NULL, g_FieldOffsetTable1432, NULL, g_FieldOffsetTable1434, NULL, g_FieldOffsetTable1436, NULL, g_FieldOffsetTable1438, NULL, g_FieldOffsetTable1440, g_FieldOffsetTable1441, g_FieldOffsetTable1442, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1451, g_FieldOffsetTable1452, g_FieldOffsetTable1453, NULL, NULL, NULL, g_FieldOffsetTable1457, g_FieldOffsetTable1458, NULL, g_FieldOffsetTable1460, g_FieldOffsetTable1461, NULL, NULL, g_FieldOffsetTable1464, g_FieldOffsetTable1465, NULL, NULL, g_FieldOffsetTable1468, NULL, NULL, g_FieldOffsetTable1471, g_FieldOffsetTable1472, g_FieldOffsetTable1473, NULL, NULL, NULL, g_FieldOffsetTable1477, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1496, g_FieldOffsetTable1497, NULL, g_FieldOffsetTable1499, g_FieldOffsetTable1500, g_FieldOffsetTable1501, NULL, g_FieldOffsetTable1503, g_FieldOffsetTable1504, g_FieldOffsetTable1505, NULL, g_FieldOffsetTable1507, g_FieldOffsetTable1508, g_FieldOffsetTable1509, g_FieldOffsetTable1510, g_FieldOffsetTable1511, g_FieldOffsetTable1512, NULL, g_FieldOffsetTable1514, g_FieldOffsetTable1515, g_FieldOffsetTable1516, g_FieldOffsetTable1517, g_FieldOffsetTable1518, g_FieldOffsetTable1519, g_FieldOffsetTable1520, g_FieldOffsetTable1521, NULL, NULL, g_FieldOffsetTable1524, NULL, g_FieldOffsetTable1526, g_FieldOffsetTable1527, NULL, g_FieldOffsetTable1529, NULL, g_FieldOffsetTable1531, g_FieldOffsetTable1532, g_FieldOffsetTable1533, g_FieldOffsetTable1534, NULL, g_FieldOffsetTable1536, g_FieldOffsetTable1537, NULL, g_FieldOffsetTable1539, g_FieldOffsetTable1540, g_FieldOffsetTable1541, g_FieldOffsetTable1542, g_FieldOffsetTable1543, g_FieldOffsetTable1544, g_FieldOffsetTable1545, g_FieldOffsetTable1546, NULL, g_FieldOffsetTable1548, g_FieldOffsetTable1549, g_FieldOffsetTable1550, g_FieldOffsetTable1551, g_FieldOffsetTable1552, g_FieldOffsetTable1553, g_FieldOffsetTable1554, g_FieldOffsetTable1555, NULL, g_FieldOffsetTable1557, g_FieldOffsetTable1558, g_FieldOffsetTable1559, g_FieldOffsetTable1560, g_FieldOffsetTable1561, g_FieldOffsetTable1562, g_FieldOffsetTable1563, g_FieldOffsetTable1564, NULL, NULL, g_FieldOffsetTable1567, g_FieldOffsetTable1568, g_FieldOffsetTable1569, g_FieldOffsetTable1570, g_FieldOffsetTable1571, NULL, NULL, NULL, g_FieldOffsetTable1575, g_FieldOffsetTable1576, g_FieldOffsetTable1577, g_FieldOffsetTable1578, g_FieldOffsetTable1579, NULL, NULL, NULL, g_FieldOffsetTable1583, g_FieldOffsetTable1584, g_FieldOffsetTable1585, g_FieldOffsetTable1586, g_FieldOffsetTable1587, g_FieldOffsetTable1588, NULL, g_FieldOffsetTable1590, g_FieldOffsetTable1591, g_FieldOffsetTable1592, g_FieldOffsetTable1593, g_FieldOffsetTable1594, NULL, g_FieldOffsetTable1596, g_FieldOffsetTable1597, g_FieldOffsetTable1598, NULL, g_FieldOffsetTable1600, g_FieldOffsetTable1601, NULL, g_FieldOffsetTable1603, g_FieldOffsetTable1604, g_FieldOffsetTable1605, g_FieldOffsetTable1606, g_FieldOffsetTable1607, g_FieldOffsetTable1608, g_FieldOffsetTable1609, NULL, g_FieldOffsetTable1611, g_FieldOffsetTable1612, NULL, NULL, NULL, g_FieldOffsetTable1616, g_FieldOffsetTable1617, g_FieldOffsetTable1618, g_FieldOffsetTable1619, g_FieldOffsetTable1620, g_FieldOffsetTable1621, g_FieldOffsetTable1622, g_FieldOffsetTable1623, g_FieldOffsetTable1624, g_FieldOffsetTable1625, g_FieldOffsetTable1626, g_FieldOffsetTable1627, g_FieldOffsetTable1628, NULL, g_FieldOffsetTable1630, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1636, g_FieldOffsetTable1637, g_FieldOffsetTable1638, g_FieldOffsetTable1639, g_FieldOffsetTable1640, NULL, NULL, g_FieldOffsetTable1643, g_FieldOffsetTable1644, g_FieldOffsetTable1645, g_FieldOffsetTable1646, NULL, NULL, NULL, NULL, g_FieldOffsetTable1651, NULL, g_FieldOffsetTable1653, NULL, NULL, NULL, NULL, g_FieldOffsetTable1658, g_FieldOffsetTable1659, NULL, NULL, g_FieldOffsetTable1662, g_FieldOffsetTable1663, g_FieldOffsetTable1664, g_FieldOffsetTable1665, NULL, g_FieldOffsetTable1667, g_FieldOffsetTable1668, g_FieldOffsetTable1669, g_FieldOffsetTable1670, g_FieldOffsetTable1671, g_FieldOffsetTable1672, g_FieldOffsetTable1673, g_FieldOffsetTable1674, g_FieldOffsetTable1675, g_FieldOffsetTable1676, g_FieldOffsetTable1677, g_FieldOffsetTable1678, g_FieldOffsetTable1679, g_FieldOffsetTable1680, g_FieldOffsetTable1681, g_FieldOffsetTable1682, g_FieldOffsetTable1683, g_FieldOffsetTable1684, g_FieldOffsetTable1685, g_FieldOffsetTable1686, g_FieldOffsetTable1687, g_FieldOffsetTable1688, g_FieldOffsetTable1689, g_FieldOffsetTable1690, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize0; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize3; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize4; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize5; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize6; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize7; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize8; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize9; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize10; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize11; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize12; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize13; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize14; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize15; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize16; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize17; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize18; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize19; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize20; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize21; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize22; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize23; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize24; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize25; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize26; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize27; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize28; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize29; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize30; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize31; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize32; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize33; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize34; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize35; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize36; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize37; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize38; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize39; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize40; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize41; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize42; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize43; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize44; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize45; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize46; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize47; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize48; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize49; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize50; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize51; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize52; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize53; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize54; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize55; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize56; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize57; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize58; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize59; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize60; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize61; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize62; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize63; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize64; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize65; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize66; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize67; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize68; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize69; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize70; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize71; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize72; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize73; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize74; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize75; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize76; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize77; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize78; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize79; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize80; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize81; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize82; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize83; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize84; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize85; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize86; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize87; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize88; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize89; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize90; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize91; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize92; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize93; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize94; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize95; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize96; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize97; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize98; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize99; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize100; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize101; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize102; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize103; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize104; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize105; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize106; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize107; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize108; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize109; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize110; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize111; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize112; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize113; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize114; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize115; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize116; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize117; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize118; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize119; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize120; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize121; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize122; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize123; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize124; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize125; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize126; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize127; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize128; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize129; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize130; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize131; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize132; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize133; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize134; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize135; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize136; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize137; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize138; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize139; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize140; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize141; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize142; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize143; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize144; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize145; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize146; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize147; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize148; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize149; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize150; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize151; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize152; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize153; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize154; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize155; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize156; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize157; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize158; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize159; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize160; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize161; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize162; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize163; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize164; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize165; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize166; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize167; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize168; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize169; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize170; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize171; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize172; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize173; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize174; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize175; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize176; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize177; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize178; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize179; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize180; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize181; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize182; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize183; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize184; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize185; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize186; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize187; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize188; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize189; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize190; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize191; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize192; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize193; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize194; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize195; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize196; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize197; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize198; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize199; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize200; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize201; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize202; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize203; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize204; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize205; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize206; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize207; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize208; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize209; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize210; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize211; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize212; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize213; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize214; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize215; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize216; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize217; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize218; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize219; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize220; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize221; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize222; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize223; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize224; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize225; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize226; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize227; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize228; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize229; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize230; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize231; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize232; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize233; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize234; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize235; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize236; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize237; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize238; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize239; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize240; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize241; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize242; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize243; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize244; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize245; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize246; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize247; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize248; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize249; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize250; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize251; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize252; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize253; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize254; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize255; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize256; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize257; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize258; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize259; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize260; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize261; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize262; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize263; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize264; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize265; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize266; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize267; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize268; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize269; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize270; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize271; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize272; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize273; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize274; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize275; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize276; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize277; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize278; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize279; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize280; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize281; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize282; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize283; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize284; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize285; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize286; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize287; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize288; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize289; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize290; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize291; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize292; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize293; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize294; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize295; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize296; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize297; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize298; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize299; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize300; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize301; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize302; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize303; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize304; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize305; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize306; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize307; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize308; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize309; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize310; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize311; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize312; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize313; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize314; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize315; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize316; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize317; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize318; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize319; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize320; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize321; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize322; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize323; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize324; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize325; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize326; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize327; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize328; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize329; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize330; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize331; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize332; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize333; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize334; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize335; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize336; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize337; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize338; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize339; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize340; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize341; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize342; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize343; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize344; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize345; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize346; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize347; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize348; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize349; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize350; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize351; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize352; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize353; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize354; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize355; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize356; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize357; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize358; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize359; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize360; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize361; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize362; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize363; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize364; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize365; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize366; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize367; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize368; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize369; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize370; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize371; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize372; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize373; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize374; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize375; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize376; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize377; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize378; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize379; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize380; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize381; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize382; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize383; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize384; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize385; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize386; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize387; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize388; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize389; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize390; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize391; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize392; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize393; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize394; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize395; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize396; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize397; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize398; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize399; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize400; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize401; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize402; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize403; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize404; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize405; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize406; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize407; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize408; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize409; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize410; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize411; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize412; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize413; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize414; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize415; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize416; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize417; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize418; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize419; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize420; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize421; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize422; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize423; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize424; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize425; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize426; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize427; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize428; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize429; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize430; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize431; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize432; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize433; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize434; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize435; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize436; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize437; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize438; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize439; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize440; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize441; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize442; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize443; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize444; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize445; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize446; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize447; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize448; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize449; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize450; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize451; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize452; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize453; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize454; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize455; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize456; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize457; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize458; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize459; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize460; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize461; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize462; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize463; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize464; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize465; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize466; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize467; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize468; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize469; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize470; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize471; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize472; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize473; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize474; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize475; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize476; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize477; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize478; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize479; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize480; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize481; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize482; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize483; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize484; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize485; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize486; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize487; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize488; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize489; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize490; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize491; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize492; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize493; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize494; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize495; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize496; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize497; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize498; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize499; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize500; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize501; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize502; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize503; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize504; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize505; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize506; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize507; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize508; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize509; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize510; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize511; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize512; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize513; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize514; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize515; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize516; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize517; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize518; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize519; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize520; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize521; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize522; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize523; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize524; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize525; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize526; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize527; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize528; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize529; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize530; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize531; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize532; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize533; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize534; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize535; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize536; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize537; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize538; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize539; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize540; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize541; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize542; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize543; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize544; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize545; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize546; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize547; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize548; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize549; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize550; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize551; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize552; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize553; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize554; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize555; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize556; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize557; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize558; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize559; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize560; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize561; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize562; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize563; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize564; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize565; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize566; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize567; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize568; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize569; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize570; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize571; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize572; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize573; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize574; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize575; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize576; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize577; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize578; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize579; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize580; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize581; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize582; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize583; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize584; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize585; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize586; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize587; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize588; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize589; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize590; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize591; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize592; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize593; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize594; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize595; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize596; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize597; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize598; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize599; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize600; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize601; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize602; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize603; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize604; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize605; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize606; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize607; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize608; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize609; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize610; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize611; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize612; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize613; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize614; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize615; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize616; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize617; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize618; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize619; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize620; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize621; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize622; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize623; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize624; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize625; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize626; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize627; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize628; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize629; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize630; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize631; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize632; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize633; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize634; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize635; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize636; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize637; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize638; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize639; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize640; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize641; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize642; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize643; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize644; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize645; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize646; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize647; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize648; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize649; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize650; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize651; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize652; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize653; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize654; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize655; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize656; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize657; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize658; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize659; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize660; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize661; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize662; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize663; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize664; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize665; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize666; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize667; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize668; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize669; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize670; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize671; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize672; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize673; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize674; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize675; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize676; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize677; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize678; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize679; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize680; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize681; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize682; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize683; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize684; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize685; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize686; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize687; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize688; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize689; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize690; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize691; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize692; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize693; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize694; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize695; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize696; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize697; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize698; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize699; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize700; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize701; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize702; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize703; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize704; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize705; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize706; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize707; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize708; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize709; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize710; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize711; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize712; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize713; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize714; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize715; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize716; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize717; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize718; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize719; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize720; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize721; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize722; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize723; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize724; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize725; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize726; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize727; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize728; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize729; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize730; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize731; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize732; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize733; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize734; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize735; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize736; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize737; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize738; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize739; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize740; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize741; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize742; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize743; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize744; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize745; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize746; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize747; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize748; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize749; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize750; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize751; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize752; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize753; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize754; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize755; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize756; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize757; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize758; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize759; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize760; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize761; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize762; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize763; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize764; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize765; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize766; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize767; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize768; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize769; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize770; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize771; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize772; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize773; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize774; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize775; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize776; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize777; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize778; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize779; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize780; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize781; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize782; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize783; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize784; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize785; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize786; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize787; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize788; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize789; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize790; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize791; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize792; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize793; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize794; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize795; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize796; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize797; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize798; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize799; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize800; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize801; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize802; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize803; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize804; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize805; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize806; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize807; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize808; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize809; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize810; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize811; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize812; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize813; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize814; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize815; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize816; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize817; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize818; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize819; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize820; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize821; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize822; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize823; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize824; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize825; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize826; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize827; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize828; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize829; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize830; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize831; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize832; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize833; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize834; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize835; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize836; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize837; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize838; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize839; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize840; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize841; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize842; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize843; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize844; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize845; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize846; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize847; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize848; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize849; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize850; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize851; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize852; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize853; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize854; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize855; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize856; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize857; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize858; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize859; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize860; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize861; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize862; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize863; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize864; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize865; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize866; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize867; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize868; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize869; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize870; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize871; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize872; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize873; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize874; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize875; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize876; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize877; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize878; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize879; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize880; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize881; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize882; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize883; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize884; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize885; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize886; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize887; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize888; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize889; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize890; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize891; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize892; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize893; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize894; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize895; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize896; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize897; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize898; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize899; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize900; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize901; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize902; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize903; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize904; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize905; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize906; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize907; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize908; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize909; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize910; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize911; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize912; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize913; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize914; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize915; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize916; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize917; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize918; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize919; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize920; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize921; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize922; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize923; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize924; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize925; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize926; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize927; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize928; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize929; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize930; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize931; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize932; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize933; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize934; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize935; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize936; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize937; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize938; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize939; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize940; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize941; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize942; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize943; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize944; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize945; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize946; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize947; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize948; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize949; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize950; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize951; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize952; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize953; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize954; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize955; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize956; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize957; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize958; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize959; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize960; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize961; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize962; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize963; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize964; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize965; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize966; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize967; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize968; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize969; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize970; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize971; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize972; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize973; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize974; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize975; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize976; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize977; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize978; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize979; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize980; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize981; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize982; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize983; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize984; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize985; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize986; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize987; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize988; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize989; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize990; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize991; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize992; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize993; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize994; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize995; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize996; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize997; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize998; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize999; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1000; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1001; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1002; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1003; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1004; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1005; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1006; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1007; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1008; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1009; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1010; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1011; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1012; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1013; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1014; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1015; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1016; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1017; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1018; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1019; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1020; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1021; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1022; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1023; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1024; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1025; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1026; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1027; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1028; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1029; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1030; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1031; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1032; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1033; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1034; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1035; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1036; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1037; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1038; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1039; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1040; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1041; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1042; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1043; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1044; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1045; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1046; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1047; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1048; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1049; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1050; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1051; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1052; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1053; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1054; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1055; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1056; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1057; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1058; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1059; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1060; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1061; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1062; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1063; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1064; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1065; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1066; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1067; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1068; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1069; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1070; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1071; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1072; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1073; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1074; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1075; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1076; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1077; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1078; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1079; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1080; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1081; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1082; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1083; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1084; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1085; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1086; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1087; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1088; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1089; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1090; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1091; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1092; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1093; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1094; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1095; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1096; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1097; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1098; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1099; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1100; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1101; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1102; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1103; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1104; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1105; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1106; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1107; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1108; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1109; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1110; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1111; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1112; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1113; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1114; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1115; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1116; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1117; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1118; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1119; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1120; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1121; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1122; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1123; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1124; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1125; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1126; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1127; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1128; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1129; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1130; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1131; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1132; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1133; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1134; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1135; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1136; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1137; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1138; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1139; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1140; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1141; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1142; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1143; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1144; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1145; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1146; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1147; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1148; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1149; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1150; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1151; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1152; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1153; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1154; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1155; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1156; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1157; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1158; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1159; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1160; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1161; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1162; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1163; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1164; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1165; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1166; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1167; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1168; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1169; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1170; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1171; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1172; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1173; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1174; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1175; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1176; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1177; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1178; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1179; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1180; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1181; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1182; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1183; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1184; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1185; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1186; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1187; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1188; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1189; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1190; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1191; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1192; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1193; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1194; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1195; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1196; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1197; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1198; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1199; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1200; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1201; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1202; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1203; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1204; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1205; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1206; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1207; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1208; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1209; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1210; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1211; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1212; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1213; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1214; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1215; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1216; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1217; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1218; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1219; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1220; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1221; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1222; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1223; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1224; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1225; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1226; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1227; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1228; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1229; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1230; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1231; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1232; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1233; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1234; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1235; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1236; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1237; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1238; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1239; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1240; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1241; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1242; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1243; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1244; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1245; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1246; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1247; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1248; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1249; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1250; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1251; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1252; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1253; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1254; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1255; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1256; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1257; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1258; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1259; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1260; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1261; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1262; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1263; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1264; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1265; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1266; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1267; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1268; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1269; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1270; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1271; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1272; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1273; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1274; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1275; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1276; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1277; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1278; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1279; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1280; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1281; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1282; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1283; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1284; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1285; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1286; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1287; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1288; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1289; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1290; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1291; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1292; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1293; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1294; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1295; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1296; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1297; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1298; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1299; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1300; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1301; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1302; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1303; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1304; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1305; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1306; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1307; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1308; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1309; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1310; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1311; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1312; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1313; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1314; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1315; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1316; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1317; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1318; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1319; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1320; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1321; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1322; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1323; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1324; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1325; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1326; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1327; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1328; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1329; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1330; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1331; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1332; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1333; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1334; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1335; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1336; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1337; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1338; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1339; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1340; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1341; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1342; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1343; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1344; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1345; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1346; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1347; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1348; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1349; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1350; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1351; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1352; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1353; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1354; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1355; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1356; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1357; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1358; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1359; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1360; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1361; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1362; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1363; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1364; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1365; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1366; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1367; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1368; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1369; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1370; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1371; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1372; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1373; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1374; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1375; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1376; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1377; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1378; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1379; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1380; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1381; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1382; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1383; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1384; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1385; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1386; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1387; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1388; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1389; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1390; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1391; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1392; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1393; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1394; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1395; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1396; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1397; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1398; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1399; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1400; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1401; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1402; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1403; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1404; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1405; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1406; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1407; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1408; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1409; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1410; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1411; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1412; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1413; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1414; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1415; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1416; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1417; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1418; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1419; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1420; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1421; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1422; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1423; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1424; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1425; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1426; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1427; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1428; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1429; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1430; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1431; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1432; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1433; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1434; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1435; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1436; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1437; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1438; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1439; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1440; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1441; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1442; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1443; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1444; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1445; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1446; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1447; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1448; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1449; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1450; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1451; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1452; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1453; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1454; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1455; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1456; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1457; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1458; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1459; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1460; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1461; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1462; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1463; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1464; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1465; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1466; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1467; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1468; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1469; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1470; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1471; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1472; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1473; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1474; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1475; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1476; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1477; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1478; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1479; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1480; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1481; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1482; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1483; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1484; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1485; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1486; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1487; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1488; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1489; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1490; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1491; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1492; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1493; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1494; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1495; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1496; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1497; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1498; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1499; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1500; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1501; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1502; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1503; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1504; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1505; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1506; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1507; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1508; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1509; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1510; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1511; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1512; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1513; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1514; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1515; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1516; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1517; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1518; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1519; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1520; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1521; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1522; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1523; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1524; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1525; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1526; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1527; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1528; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1529; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1530; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1531; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1532; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1533; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1534; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1535; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1536; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1537; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1538; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1539; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1540; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1541; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1542; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1543; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1544; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1545; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1546; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1547; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1548; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1549; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1550; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1551; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1552; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1553; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1554; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1555; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1556; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1557; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1558; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1559; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1560; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1561; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1562; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1563; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1564; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1565; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1566; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1567; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1568; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1569; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1570; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1571; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1572; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1573; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1574; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1575; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1576; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1577; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1578; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1579; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1580; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1581; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1582; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1583; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1584; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1585; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1586; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1587; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1588; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1589; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1590; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1591; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1592; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1593; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1594; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1595; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1596; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1597; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1598; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1599; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1600; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1601; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1602; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1603; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1604; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1605; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1606; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1607; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1608; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1609; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1610; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1611; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1612; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1613; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1614; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1615; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1616; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1617; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1618; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1619; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1620; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1621; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1622; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1623; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1624; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1625; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1626; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1627; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1628; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1629; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1630; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1631; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1632; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1633; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1634; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1635; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1636; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1637; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1638; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1639; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1640; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1641; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1642; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1643; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1644; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1645; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1646; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1647; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1648; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1649; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1650; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1651; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1652; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1653; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1654; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1655; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1656; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1657; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1658; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1659; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1660; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1661; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1662; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1663; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1664; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1665; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1666; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1667; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1668; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1669; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1670; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1671; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1672; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1673; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1674; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1675; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1676; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1677; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1678; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1679; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1680; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1681; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1682; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1683; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1684; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1685; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1686; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1687; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1688; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1689; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1690; extern const Il2CppTypeDefinitionSizes* g_Il2CppTypeDefinitionSizesTable[1691] = { &g_typeDefinitionSize0, &g_typeDefinitionSize1, &g_typeDefinitionSize2, &g_typeDefinitionSize3, &g_typeDefinitionSize4, &g_typeDefinitionSize5, &g_typeDefinitionSize6, &g_typeDefinitionSize7, &g_typeDefinitionSize8, &g_typeDefinitionSize9, &g_typeDefinitionSize10, &g_typeDefinitionSize11, &g_typeDefinitionSize12, &g_typeDefinitionSize13, &g_typeDefinitionSize14, &g_typeDefinitionSize15, &g_typeDefinitionSize16, &g_typeDefinitionSize17, &g_typeDefinitionSize18, &g_typeDefinitionSize19, &g_typeDefinitionSize20, &g_typeDefinitionSize21, &g_typeDefinitionSize22, &g_typeDefinitionSize23, &g_typeDefinitionSize24, &g_typeDefinitionSize25, &g_typeDefinitionSize26, &g_typeDefinitionSize27, &g_typeDefinitionSize28, &g_typeDefinitionSize29, &g_typeDefinitionSize30, &g_typeDefinitionSize31, &g_typeDefinitionSize32, &g_typeDefinitionSize33, &g_typeDefinitionSize34, &g_typeDefinitionSize35, &g_typeDefinitionSize36, &g_typeDefinitionSize37, &g_typeDefinitionSize38, &g_typeDefinitionSize39, &g_typeDefinitionSize40, &g_typeDefinitionSize41, &g_typeDefinitionSize42, &g_typeDefinitionSize43, &g_typeDefinitionSize44, &g_typeDefinitionSize45, &g_typeDefinitionSize46, &g_typeDefinitionSize47, &g_typeDefinitionSize48, &g_typeDefinitionSize49, &g_typeDefinitionSize50, &g_typeDefinitionSize51, &g_typeDefinitionSize52, &g_typeDefinitionSize53, &g_typeDefinitionSize54, &g_typeDefinitionSize55, &g_typeDefinitionSize56, &g_typeDefinitionSize57, &g_typeDefinitionSize58, &g_typeDefinitionSize59, &g_typeDefinitionSize60, &g_typeDefinitionSize61, &g_typeDefinitionSize62, &g_typeDefinitionSize63, &g_typeDefinitionSize64, &g_typeDefinitionSize65, &g_typeDefinitionSize66, &g_typeDefinitionSize67, &g_typeDefinitionSize68, &g_typeDefinitionSize69, &g_typeDefinitionSize70, &g_typeDefinitionSize71, &g_typeDefinitionSize72, &g_typeDefinitionSize73, &g_typeDefinitionSize74, &g_typeDefinitionSize75, &g_typeDefinitionSize76, &g_typeDefinitionSize77, &g_typeDefinitionSize78, &g_typeDefinitionSize79, &g_typeDefinitionSize80, &g_typeDefinitionSize81, &g_typeDefinitionSize82, &g_typeDefinitionSize83, &g_typeDefinitionSize84, &g_typeDefinitionSize85, &g_typeDefinitionSize86, &g_typeDefinitionSize87, &g_typeDefinitionSize88, &g_typeDefinitionSize89, &g_typeDefinitionSize90, &g_typeDefinitionSize91, &g_typeDefinitionSize92, &g_typeDefinitionSize93, &g_typeDefinitionSize94, &g_typeDefinitionSize95, &g_typeDefinitionSize96, &g_typeDefinitionSize97, &g_typeDefinitionSize98, &g_typeDefinitionSize99, &g_typeDefinitionSize100, &g_typeDefinitionSize101, &g_typeDefinitionSize102, &g_typeDefinitionSize103, &g_typeDefinitionSize104, &g_typeDefinitionSize105, &g_typeDefinitionSize106, &g_typeDefinitionSize107, &g_typeDefinitionSize108, &g_typeDefinitionSize109, &g_typeDefinitionSize110, &g_typeDefinitionSize111, &g_typeDefinitionSize112, &g_typeDefinitionSize113, &g_typeDefinitionSize114, &g_typeDefinitionSize115, &g_typeDefinitionSize116, &g_typeDefinitionSize117, &g_typeDefinitionSize118, &g_typeDefinitionSize119, &g_typeDefinitionSize120, &g_typeDefinitionSize121, &g_typeDefinitionSize122, &g_typeDefinitionSize123, &g_typeDefinitionSize124, &g_typeDefinitionSize125, &g_typeDefinitionSize126, &g_typeDefinitionSize127, &g_typeDefinitionSize128, &g_typeDefinitionSize129, &g_typeDefinitionSize130, &g_typeDefinitionSize131, &g_typeDefinitionSize132, &g_typeDefinitionSize133, &g_typeDefinitionSize134, &g_typeDefinitionSize135, &g_typeDefinitionSize136, &g_typeDefinitionSize137, &g_typeDefinitionSize138, &g_typeDefinitionSize139, &g_typeDefinitionSize140, &g_typeDefinitionSize141, &g_typeDefinitionSize142, &g_typeDefinitionSize143, &g_typeDefinitionSize144, &g_typeDefinitionSize145, &g_typeDefinitionSize146, &g_typeDefinitionSize147, &g_typeDefinitionSize148, &g_typeDefinitionSize149, &g_typeDefinitionSize150, &g_typeDefinitionSize151, &g_typeDefinitionSize152, &g_typeDefinitionSize153, &g_typeDefinitionSize154, &g_typeDefinitionSize155, &g_typeDefinitionSize156, &g_typeDefinitionSize157, &g_typeDefinitionSize158, &g_typeDefinitionSize159, &g_typeDefinitionSize160, &g_typeDefinitionSize161, &g_typeDefinitionSize162, &g_typeDefinitionSize163, &g_typeDefinitionSize164, &g_typeDefinitionSize165, &g_typeDefinitionSize166, &g_typeDefinitionSize167, &g_typeDefinitionSize168, &g_typeDefinitionSize169, &g_typeDefinitionSize170, &g_typeDefinitionSize171, &g_typeDefinitionSize172, &g_typeDefinitionSize173, &g_typeDefinitionSize174, &g_typeDefinitionSize175, &g_typeDefinitionSize176, &g_typeDefinitionSize177, &g_typeDefinitionSize178, &g_typeDefinitionSize179, &g_typeDefinitionSize180, &g_typeDefinitionSize181, &g_typeDefinitionSize182, &g_typeDefinitionSize183, &g_typeDefinitionSize184, &g_typeDefinitionSize185, &g_typeDefinitionSize186, &g_typeDefinitionSize187, &g_typeDefinitionSize188, &g_typeDefinitionSize189, &g_typeDefinitionSize190, &g_typeDefinitionSize191, &g_typeDefinitionSize192, &g_typeDefinitionSize193, &g_typeDefinitionSize194, &g_typeDefinitionSize195, &g_typeDefinitionSize196, &g_typeDefinitionSize197, &g_typeDefinitionSize198, &g_typeDefinitionSize199, &g_typeDefinitionSize200, &g_typeDefinitionSize201, &g_typeDefinitionSize202, &g_typeDefinitionSize203, &g_typeDefinitionSize204, &g_typeDefinitionSize205, &g_typeDefinitionSize206, &g_typeDefinitionSize207, &g_typeDefinitionSize208, &g_typeDefinitionSize209, &g_typeDefinitionSize210, &g_typeDefinitionSize211, &g_typeDefinitionSize212, &g_typeDefinitionSize213, &g_typeDefinitionSize214, &g_typeDefinitionSize215, &g_typeDefinitionSize216, &g_typeDefinitionSize217, &g_typeDefinitionSize218, &g_typeDefinitionSize219, &g_typeDefinitionSize220, &g_typeDefinitionSize221, &g_typeDefinitionSize222, &g_typeDefinitionSize223, &g_typeDefinitionSize224, &g_typeDefinitionSize225, &g_typeDefinitionSize226, &g_typeDefinitionSize227, &g_typeDefinitionSize228, &g_typeDefinitionSize229, &g_typeDefinitionSize230, &g_typeDefinitionSize231, &g_typeDefinitionSize232, &g_typeDefinitionSize233, &g_typeDefinitionSize234, &g_typeDefinitionSize235, &g_typeDefinitionSize236, &g_typeDefinitionSize237, &g_typeDefinitionSize238, &g_typeDefinitionSize239, &g_typeDefinitionSize240, &g_typeDefinitionSize241, &g_typeDefinitionSize242, &g_typeDefinitionSize243, &g_typeDefinitionSize244, &g_typeDefinitionSize245, &g_typeDefinitionSize246, &g_typeDefinitionSize247, &g_typeDefinitionSize248, &g_typeDefinitionSize249, &g_typeDefinitionSize250, &g_typeDefinitionSize251, &g_typeDefinitionSize252, &g_typeDefinitionSize253, &g_typeDefinitionSize254, &g_typeDefinitionSize255, &g_typeDefinitionSize256, &g_typeDefinitionSize257, &g_typeDefinitionSize258, &g_typeDefinitionSize259, &g_typeDefinitionSize260, &g_typeDefinitionSize261, &g_typeDefinitionSize262, &g_typeDefinitionSize263, &g_typeDefinitionSize264, &g_typeDefinitionSize265, &g_typeDefinitionSize266, &g_typeDefinitionSize267, &g_typeDefinitionSize268, &g_typeDefinitionSize269, &g_typeDefinitionSize270, &g_typeDefinitionSize271, &g_typeDefinitionSize272, &g_typeDefinitionSize273, &g_typeDefinitionSize274, &g_typeDefinitionSize275, &g_typeDefinitionSize276, &g_typeDefinitionSize277, &g_typeDefinitionSize278, &g_typeDefinitionSize279, &g_typeDefinitionSize280, &g_typeDefinitionSize281, &g_typeDefinitionSize282, &g_typeDefinitionSize283, &g_typeDefinitionSize284, &g_typeDefinitionSize285, &g_typeDefinitionSize286, &g_typeDefinitionSize287, &g_typeDefinitionSize288, &g_typeDefinitionSize289, &g_typeDefinitionSize290, &g_typeDefinitionSize291, &g_typeDefinitionSize292, &g_typeDefinitionSize293, &g_typeDefinitionSize294, &g_typeDefinitionSize295, &g_typeDefinitionSize296, &g_typeDefinitionSize297, &g_typeDefinitionSize298, &g_typeDefinitionSize299, &g_typeDefinitionSize300, &g_typeDefinitionSize301, &g_typeDefinitionSize302, &g_typeDefinitionSize303, &g_typeDefinitionSize304, &g_typeDefinitionSize305, &g_typeDefinitionSize306, &g_typeDefinitionSize307, &g_typeDefinitionSize308, &g_typeDefinitionSize309, &g_typeDefinitionSize310, &g_typeDefinitionSize311, &g_typeDefinitionSize312, &g_typeDefinitionSize313, &g_typeDefinitionSize314, &g_typeDefinitionSize315, &g_typeDefinitionSize316, &g_typeDefinitionSize317, &g_typeDefinitionSize318, &g_typeDefinitionSize319, &g_typeDefinitionSize320, &g_typeDefinitionSize321, &g_typeDefinitionSize322, &g_typeDefinitionSize323, &g_typeDefinitionSize324, &g_typeDefinitionSize325, &g_typeDefinitionSize326, &g_typeDefinitionSize327, &g_typeDefinitionSize328, &g_typeDefinitionSize329, &g_typeDefinitionSize330, &g_typeDefinitionSize331, &g_typeDefinitionSize332, &g_typeDefinitionSize333, &g_typeDefinitionSize334, &g_typeDefinitionSize335, &g_typeDefinitionSize336, &g_typeDefinitionSize337, &g_typeDefinitionSize338, &g_typeDefinitionSize339, &g_typeDefinitionSize340, &g_typeDefinitionSize341, &g_typeDefinitionSize342, &g_typeDefinitionSize343, &g_typeDefinitionSize344, &g_typeDefinitionSize345, &g_typeDefinitionSize346, &g_typeDefinitionSize347, &g_typeDefinitionSize348, &g_typeDefinitionSize349, &g_typeDefinitionSize350, &g_typeDefinitionSize351, &g_typeDefinitionSize352, &g_typeDefinitionSize353, &g_typeDefinitionSize354, &g_typeDefinitionSize355, &g_typeDefinitionSize356, &g_typeDefinitionSize357, &g_typeDefinitionSize358, &g_typeDefinitionSize359, &g_typeDefinitionSize360, &g_typeDefinitionSize361, &g_typeDefinitionSize362, &g_typeDefinitionSize363, &g_typeDefinitionSize364, &g_typeDefinitionSize365, &g_typeDefinitionSize366, &g_typeDefinitionSize367, &g_typeDefinitionSize368, &g_typeDefinitionSize369, &g_typeDefinitionSize370, &g_typeDefinitionSize371, &g_typeDefinitionSize372, &g_typeDefinitionSize373, &g_typeDefinitionSize374, &g_typeDefinitionSize375, &g_typeDefinitionSize376, &g_typeDefinitionSize377, &g_typeDefinitionSize378, &g_typeDefinitionSize379, &g_typeDefinitionSize380, &g_typeDefinitionSize381, &g_typeDefinitionSize382, &g_typeDefinitionSize383, &g_typeDefinitionSize384, &g_typeDefinitionSize385, &g_typeDefinitionSize386, &g_typeDefinitionSize387, &g_typeDefinitionSize388, &g_typeDefinitionSize389, &g_typeDefinitionSize390, &g_typeDefinitionSize391, &g_typeDefinitionSize392, &g_typeDefinitionSize393, &g_typeDefinitionSize394, &g_typeDefinitionSize395, &g_typeDefinitionSize396, &g_typeDefinitionSize397, &g_typeDefinitionSize398, &g_typeDefinitionSize399, &g_typeDefinitionSize400, &g_typeDefinitionSize401, &g_typeDefinitionSize402, &g_typeDefinitionSize403, &g_typeDefinitionSize404, &g_typeDefinitionSize405, &g_typeDefinitionSize406, &g_typeDefinitionSize407, &g_typeDefinitionSize408, &g_typeDefinitionSize409, &g_typeDefinitionSize410, &g_typeDefinitionSize411, &g_typeDefinitionSize412, &g_typeDefinitionSize413, &g_typeDefinitionSize414, &g_typeDefinitionSize415, &g_typeDefinitionSize416, &g_typeDefinitionSize417, &g_typeDefinitionSize418, &g_typeDefinitionSize419, &g_typeDefinitionSize420, &g_typeDefinitionSize421, &g_typeDefinitionSize422, &g_typeDefinitionSize423, &g_typeDefinitionSize424, &g_typeDefinitionSize425, &g_typeDefinitionSize426, &g_typeDefinitionSize427, &g_typeDefinitionSize428, &g_typeDefinitionSize429, &g_typeDefinitionSize430, &g_typeDefinitionSize431, &g_typeDefinitionSize432, &g_typeDefinitionSize433, &g_typeDefinitionSize434, &g_typeDefinitionSize435, &g_typeDefinitionSize436, &g_typeDefinitionSize437, &g_typeDefinitionSize438, &g_typeDefinitionSize439, &g_typeDefinitionSize440, &g_typeDefinitionSize441, &g_typeDefinitionSize442, &g_typeDefinitionSize443, &g_typeDefinitionSize444, &g_typeDefinitionSize445, &g_typeDefinitionSize446, &g_typeDefinitionSize447, &g_typeDefinitionSize448, &g_typeDefinitionSize449, &g_typeDefinitionSize450, &g_typeDefinitionSize451, &g_typeDefinitionSize452, &g_typeDefinitionSize453, &g_typeDefinitionSize454, &g_typeDefinitionSize455, &g_typeDefinitionSize456, &g_typeDefinitionSize457, &g_typeDefinitionSize458, &g_typeDefinitionSize459, &g_typeDefinitionSize460, &g_typeDefinitionSize461, &g_typeDefinitionSize462, &g_typeDefinitionSize463, &g_typeDefinitionSize464, &g_typeDefinitionSize465, &g_typeDefinitionSize466, &g_typeDefinitionSize467, &g_typeDefinitionSize468, &g_typeDefinitionSize469, &g_typeDefinitionSize470, &g_typeDefinitionSize471, &g_typeDefinitionSize472, &g_typeDefinitionSize473, &g_typeDefinitionSize474, &g_typeDefinitionSize475, &g_typeDefinitionSize476, &g_typeDefinitionSize477, &g_typeDefinitionSize478, &g_typeDefinitionSize479, &g_typeDefinitionSize480, &g_typeDefinitionSize481, &g_typeDefinitionSize482, &g_typeDefinitionSize483, &g_typeDefinitionSize484, &g_typeDefinitionSize485, &g_typeDefinitionSize486, &g_typeDefinitionSize487, &g_typeDefinitionSize488, &g_typeDefinitionSize489, &g_typeDefinitionSize490, &g_typeDefinitionSize491, &g_typeDefinitionSize492, &g_typeDefinitionSize493, &g_typeDefinitionSize494, &g_typeDefinitionSize495, &g_typeDefinitionSize496, &g_typeDefinitionSize497, &g_typeDefinitionSize498, &g_typeDefinitionSize499, &g_typeDefinitionSize500, &g_typeDefinitionSize501, &g_typeDefinitionSize502, &g_typeDefinitionSize503, &g_typeDefinitionSize504, &g_typeDefinitionSize505, &g_typeDefinitionSize506, &g_typeDefinitionSize507, &g_typeDefinitionSize508, &g_typeDefinitionSize509, &g_typeDefinitionSize510, &g_typeDefinitionSize511, &g_typeDefinitionSize512, &g_typeDefinitionSize513, &g_typeDefinitionSize514, &g_typeDefinitionSize515, &g_typeDefinitionSize516, &g_typeDefinitionSize517, &g_typeDefinitionSize518, &g_typeDefinitionSize519, &g_typeDefinitionSize520, &g_typeDefinitionSize521, &g_typeDefinitionSize522, &g_typeDefinitionSize523, &g_typeDefinitionSize524, &g_typeDefinitionSize525, &g_typeDefinitionSize526, &g_typeDefinitionSize527, &g_typeDefinitionSize528, &g_typeDefinitionSize529, &g_typeDefinitionSize530, &g_typeDefinitionSize531, &g_typeDefinitionSize532, &g_typeDefinitionSize533, &g_typeDefinitionSize534, &g_typeDefinitionSize535, &g_typeDefinitionSize536, &g_typeDefinitionSize537, &g_typeDefinitionSize538, &g_typeDefinitionSize539, &g_typeDefinitionSize540, &g_typeDefinitionSize541, &g_typeDefinitionSize542, &g_typeDefinitionSize543, &g_typeDefinitionSize544, &g_typeDefinitionSize545, &g_typeDefinitionSize546, &g_typeDefinitionSize547, &g_typeDefinitionSize548, &g_typeDefinitionSize549, &g_typeDefinitionSize550, &g_typeDefinitionSize551, &g_typeDefinitionSize552, &g_typeDefinitionSize553, &g_typeDefinitionSize554, &g_typeDefinitionSize555, &g_typeDefinitionSize556, &g_typeDefinitionSize557, &g_typeDefinitionSize558, &g_typeDefinitionSize559, &g_typeDefinitionSize560, &g_typeDefinitionSize561, &g_typeDefinitionSize562, &g_typeDefinitionSize563, &g_typeDefinitionSize564, &g_typeDefinitionSize565, &g_typeDefinitionSize566, &g_typeDefinitionSize567, &g_typeDefinitionSize568, &g_typeDefinitionSize569, &g_typeDefinitionSize570, &g_typeDefinitionSize571, &g_typeDefinitionSize572, &g_typeDefinitionSize573, &g_typeDefinitionSize574, &g_typeDefinitionSize575, &g_typeDefinitionSize576, &g_typeDefinitionSize577, &g_typeDefinitionSize578, &g_typeDefinitionSize579, &g_typeDefinitionSize580, &g_typeDefinitionSize581, &g_typeDefinitionSize582, &g_typeDefinitionSize583, &g_typeDefinitionSize584, &g_typeDefinitionSize585, &g_typeDefinitionSize586, &g_typeDefinitionSize587, &g_typeDefinitionSize588, &g_typeDefinitionSize589, &g_typeDefinitionSize590, &g_typeDefinitionSize591, &g_typeDefinitionSize592, &g_typeDefinitionSize593, &g_typeDefinitionSize594, &g_typeDefinitionSize595, &g_typeDefinitionSize596, &g_typeDefinitionSize597, &g_typeDefinitionSize598, &g_typeDefinitionSize599, &g_typeDefinitionSize600, &g_typeDefinitionSize601, &g_typeDefinitionSize602, &g_typeDefinitionSize603, &g_typeDefinitionSize604, &g_typeDefinitionSize605, &g_typeDefinitionSize606, &g_typeDefinitionSize607, &g_typeDefinitionSize608, &g_typeDefinitionSize609, &g_typeDefinitionSize610, &g_typeDefinitionSize611, &g_typeDefinitionSize612, &g_typeDefinitionSize613, &g_typeDefinitionSize614, &g_typeDefinitionSize615, &g_typeDefinitionSize616, &g_typeDefinitionSize617, &g_typeDefinitionSize618, &g_typeDefinitionSize619, &g_typeDefinitionSize620, &g_typeDefinitionSize621, &g_typeDefinitionSize622, &g_typeDefinitionSize623, &g_typeDefinitionSize624, &g_typeDefinitionSize625, &g_typeDefinitionSize626, &g_typeDefinitionSize627, &g_typeDefinitionSize628, &g_typeDefinitionSize629, &g_typeDefinitionSize630, &g_typeDefinitionSize631, &g_typeDefinitionSize632, &g_typeDefinitionSize633, &g_typeDefinitionSize634, &g_typeDefinitionSize635, &g_typeDefinitionSize636, &g_typeDefinitionSize637, &g_typeDefinitionSize638, &g_typeDefinitionSize639, &g_typeDefinitionSize640, &g_typeDefinitionSize641, &g_typeDefinitionSize642, &g_typeDefinitionSize643, &g_typeDefinitionSize644, &g_typeDefinitionSize645, &g_typeDefinitionSize646, &g_typeDefinitionSize647, &g_typeDefinitionSize648, &g_typeDefinitionSize649, &g_typeDefinitionSize650, &g_typeDefinitionSize651, &g_typeDefinitionSize652, &g_typeDefinitionSize653, &g_typeDefinitionSize654, &g_typeDefinitionSize655, &g_typeDefinitionSize656, &g_typeDefinitionSize657, &g_typeDefinitionSize658, &g_typeDefinitionSize659, &g_typeDefinitionSize660, &g_typeDefinitionSize661, &g_typeDefinitionSize662, &g_typeDefinitionSize663, &g_typeDefinitionSize664, &g_typeDefinitionSize665, &g_typeDefinitionSize666, &g_typeDefinitionSize667, &g_typeDefinitionSize668, &g_typeDefinitionSize669, &g_typeDefinitionSize670, &g_typeDefinitionSize671, &g_typeDefinitionSize672, &g_typeDefinitionSize673, &g_typeDefinitionSize674, &g_typeDefinitionSize675, &g_typeDefinitionSize676, &g_typeDefinitionSize677, &g_typeDefinitionSize678, &g_typeDefinitionSize679, &g_typeDefinitionSize680, &g_typeDefinitionSize681, &g_typeDefinitionSize682, &g_typeDefinitionSize683, &g_typeDefinitionSize684, &g_typeDefinitionSize685, &g_typeDefinitionSize686, &g_typeDefinitionSize687, &g_typeDefinitionSize688, &g_typeDefinitionSize689, &g_typeDefinitionSize690, &g_typeDefinitionSize691, &g_typeDefinitionSize692, &g_typeDefinitionSize693, &g_typeDefinitionSize694, &g_typeDefinitionSize695, &g_typeDefinitionSize696, &g_typeDefinitionSize697, &g_typeDefinitionSize698, &g_typeDefinitionSize699, &g_typeDefinitionSize700, &g_typeDefinitionSize701, &g_typeDefinitionSize702, &g_typeDefinitionSize703, &g_typeDefinitionSize704, &g_typeDefinitionSize705, &g_typeDefinitionSize706, &g_typeDefinitionSize707, &g_typeDefinitionSize708, &g_typeDefinitionSize709, &g_typeDefinitionSize710, &g_typeDefinitionSize711, &g_typeDefinitionSize712, &g_typeDefinitionSize713, &g_typeDefinitionSize714, &g_typeDefinitionSize715, &g_typeDefinitionSize716, &g_typeDefinitionSize717, &g_typeDefinitionSize718, &g_typeDefinitionSize719, &g_typeDefinitionSize720, &g_typeDefinitionSize721, &g_typeDefinitionSize722, &g_typeDefinitionSize723, &g_typeDefinitionSize724, &g_typeDefinitionSize725, &g_typeDefinitionSize726, &g_typeDefinitionSize727, &g_typeDefinitionSize728, &g_typeDefinitionSize729, &g_typeDefinitionSize730, &g_typeDefinitionSize731, &g_typeDefinitionSize732, &g_typeDefinitionSize733, &g_typeDefinitionSize734, &g_typeDefinitionSize735, &g_typeDefinitionSize736, &g_typeDefinitionSize737, &g_typeDefinitionSize738, &g_typeDefinitionSize739, &g_typeDefinitionSize740, &g_typeDefinitionSize741, &g_typeDefinitionSize742, &g_typeDefinitionSize743, &g_typeDefinitionSize744, &g_typeDefinitionSize745, &g_typeDefinitionSize746, &g_typeDefinitionSize747, &g_typeDefinitionSize748, &g_typeDefinitionSize749, &g_typeDefinitionSize750, &g_typeDefinitionSize751, &g_typeDefinitionSize752, &g_typeDefinitionSize753, &g_typeDefinitionSize754, &g_typeDefinitionSize755, &g_typeDefinitionSize756, &g_typeDefinitionSize757, &g_typeDefinitionSize758, &g_typeDefinitionSize759, &g_typeDefinitionSize760, &g_typeDefinitionSize761, &g_typeDefinitionSize762, &g_typeDefinitionSize763, &g_typeDefinitionSize764, &g_typeDefinitionSize765, &g_typeDefinitionSize766, &g_typeDefinitionSize767, &g_typeDefinitionSize768, &g_typeDefinitionSize769, &g_typeDefinitionSize770, &g_typeDefinitionSize771, &g_typeDefinitionSize772, &g_typeDefinitionSize773, &g_typeDefinitionSize774, &g_typeDefinitionSize775, &g_typeDefinitionSize776, &g_typeDefinitionSize777, &g_typeDefinitionSize778, &g_typeDefinitionSize779, &g_typeDefinitionSize780, &g_typeDefinitionSize781, &g_typeDefinitionSize782, &g_typeDefinitionSize783, &g_typeDefinitionSize784, &g_typeDefinitionSize785, &g_typeDefinitionSize786, &g_typeDefinitionSize787, &g_typeDefinitionSize788, &g_typeDefinitionSize789, &g_typeDefinitionSize790, &g_typeDefinitionSize791, &g_typeDefinitionSize792, &g_typeDefinitionSize793, &g_typeDefinitionSize794, &g_typeDefinitionSize795, &g_typeDefinitionSize796, &g_typeDefinitionSize797, &g_typeDefinitionSize798, &g_typeDefinitionSize799, &g_typeDefinitionSize800, &g_typeDefinitionSize801, &g_typeDefinitionSize802, &g_typeDefinitionSize803, &g_typeDefinitionSize804, &g_typeDefinitionSize805, &g_typeDefinitionSize806, &g_typeDefinitionSize807, &g_typeDefinitionSize808, &g_typeDefinitionSize809, &g_typeDefinitionSize810, &g_typeDefinitionSize811, &g_typeDefinitionSize812, &g_typeDefinitionSize813, &g_typeDefinitionSize814, &g_typeDefinitionSize815, &g_typeDefinitionSize816, &g_typeDefinitionSize817, &g_typeDefinitionSize818, &g_typeDefinitionSize819, &g_typeDefinitionSize820, &g_typeDefinitionSize821, &g_typeDefinitionSize822, &g_typeDefinitionSize823, &g_typeDefinitionSize824, &g_typeDefinitionSize825, &g_typeDefinitionSize826, &g_typeDefinitionSize827, &g_typeDefinitionSize828, &g_typeDefinitionSize829, &g_typeDefinitionSize830, &g_typeDefinitionSize831, &g_typeDefinitionSize832, &g_typeDefinitionSize833, &g_typeDefinitionSize834, &g_typeDefinitionSize835, &g_typeDefinitionSize836, &g_typeDefinitionSize837, &g_typeDefinitionSize838, &g_typeDefinitionSize839, &g_typeDefinitionSize840, &g_typeDefinitionSize841, &g_typeDefinitionSize842, &g_typeDefinitionSize843, &g_typeDefinitionSize844, &g_typeDefinitionSize845, &g_typeDefinitionSize846, &g_typeDefinitionSize847, &g_typeDefinitionSize848, &g_typeDefinitionSize849, &g_typeDefinitionSize850, &g_typeDefinitionSize851, &g_typeDefinitionSize852, &g_typeDefinitionSize853, &g_typeDefinitionSize854, &g_typeDefinitionSize855, &g_typeDefinitionSize856, &g_typeDefinitionSize857, &g_typeDefinitionSize858, &g_typeDefinitionSize859, &g_typeDefinitionSize860, &g_typeDefinitionSize861, &g_typeDefinitionSize862, &g_typeDefinitionSize863, &g_typeDefinitionSize864, &g_typeDefinitionSize865, &g_typeDefinitionSize866, &g_typeDefinitionSize867, &g_typeDefinitionSize868, &g_typeDefinitionSize869, &g_typeDefinitionSize870, &g_typeDefinitionSize871, &g_typeDefinitionSize872, &g_typeDefinitionSize873, &g_typeDefinitionSize874, &g_typeDefinitionSize875, &g_typeDefinitionSize876, &g_typeDefinitionSize877, &g_typeDefinitionSize878, &g_typeDefinitionSize879, &g_typeDefinitionSize880, &g_typeDefinitionSize881, &g_typeDefinitionSize882, &g_typeDefinitionSize883, &g_typeDefinitionSize884, &g_typeDefinitionSize885, &g_typeDefinitionSize886, &g_typeDefinitionSize887, &g_typeDefinitionSize888, &g_typeDefinitionSize889, &g_typeDefinitionSize890, &g_typeDefinitionSize891, &g_typeDefinitionSize892, &g_typeDefinitionSize893, &g_typeDefinitionSize894, &g_typeDefinitionSize895, &g_typeDefinitionSize896, &g_typeDefinitionSize897, &g_typeDefinitionSize898, &g_typeDefinitionSize899, &g_typeDefinitionSize900, &g_typeDefinitionSize901, &g_typeDefinitionSize902, &g_typeDefinitionSize903, &g_typeDefinitionSize904, &g_typeDefinitionSize905, &g_typeDefinitionSize906, &g_typeDefinitionSize907, &g_typeDefinitionSize908, &g_typeDefinitionSize909, &g_typeDefinitionSize910, &g_typeDefinitionSize911, &g_typeDefinitionSize912, &g_typeDefinitionSize913, &g_typeDefinitionSize914, &g_typeDefinitionSize915, &g_typeDefinitionSize916, &g_typeDefinitionSize917, &g_typeDefinitionSize918, &g_typeDefinitionSize919, &g_typeDefinitionSize920, &g_typeDefinitionSize921, &g_typeDefinitionSize922, &g_typeDefinitionSize923, &g_typeDefinitionSize924, &g_typeDefinitionSize925, &g_typeDefinitionSize926, &g_typeDefinitionSize927, &g_typeDefinitionSize928, &g_typeDefinitionSize929, &g_typeDefinitionSize930, &g_typeDefinitionSize931, &g_typeDefinitionSize932, &g_typeDefinitionSize933, &g_typeDefinitionSize934, &g_typeDefinitionSize935, &g_typeDefinitionSize936, &g_typeDefinitionSize937, &g_typeDefinitionSize938, &g_typeDefinitionSize939, &g_typeDefinitionSize940, &g_typeDefinitionSize941, &g_typeDefinitionSize942, &g_typeDefinitionSize943, &g_typeDefinitionSize944, &g_typeDefinitionSize945, &g_typeDefinitionSize946, &g_typeDefinitionSize947, &g_typeDefinitionSize948, &g_typeDefinitionSize949, &g_typeDefinitionSize950, &g_typeDefinitionSize951, &g_typeDefinitionSize952, &g_typeDefinitionSize953, &g_typeDefinitionSize954, &g_typeDefinitionSize955, &g_typeDefinitionSize956, &g_typeDefinitionSize957, &g_typeDefinitionSize958, &g_typeDefinitionSize959, &g_typeDefinitionSize960, &g_typeDefinitionSize961, &g_typeDefinitionSize962, &g_typeDefinitionSize963, &g_typeDefinitionSize964, &g_typeDefinitionSize965, &g_typeDefinitionSize966, &g_typeDefinitionSize967, &g_typeDefinitionSize968, &g_typeDefinitionSize969, &g_typeDefinitionSize970, &g_typeDefinitionSize971, &g_typeDefinitionSize972, &g_typeDefinitionSize973, &g_typeDefinitionSize974, &g_typeDefinitionSize975, &g_typeDefinitionSize976, &g_typeDefinitionSize977, &g_typeDefinitionSize978, &g_typeDefinitionSize979, &g_typeDefinitionSize980, &g_typeDefinitionSize981, &g_typeDefinitionSize982, &g_typeDefinitionSize983, &g_typeDefinitionSize984, &g_typeDefinitionSize985, &g_typeDefinitionSize986, &g_typeDefinitionSize987, &g_typeDefinitionSize988, &g_typeDefinitionSize989, &g_typeDefinitionSize990, &g_typeDefinitionSize991, &g_typeDefinitionSize992, &g_typeDefinitionSize993, &g_typeDefinitionSize994, &g_typeDefinitionSize995, &g_typeDefinitionSize996, &g_typeDefinitionSize997, &g_typeDefinitionSize998, &g_typeDefinitionSize999, &g_typeDefinitionSize1000, &g_typeDefinitionSize1001, &g_typeDefinitionSize1002, &g_typeDefinitionSize1003, &g_typeDefinitionSize1004, &g_typeDefinitionSize1005, &g_typeDefinitionSize1006, &g_typeDefinitionSize1007, &g_typeDefinitionSize1008, &g_typeDefinitionSize1009, &g_typeDefinitionSize1010, &g_typeDefinitionSize1011, &g_typeDefinitionSize1012, &g_typeDefinitionSize1013, &g_typeDefinitionSize1014, &g_typeDefinitionSize1015, &g_typeDefinitionSize1016, &g_typeDefinitionSize1017, &g_typeDefinitionSize1018, &g_typeDefinitionSize1019, &g_typeDefinitionSize1020, &g_typeDefinitionSize1021, &g_typeDefinitionSize1022, &g_typeDefinitionSize1023, &g_typeDefinitionSize1024, &g_typeDefinitionSize1025, &g_typeDefinitionSize1026, &g_typeDefinitionSize1027, &g_typeDefinitionSize1028, &g_typeDefinitionSize1029, &g_typeDefinitionSize1030, &g_typeDefinitionSize1031, &g_typeDefinitionSize1032, &g_typeDefinitionSize1033, &g_typeDefinitionSize1034, &g_typeDefinitionSize1035, &g_typeDefinitionSize1036, &g_typeDefinitionSize1037, &g_typeDefinitionSize1038, &g_typeDefinitionSize1039, &g_typeDefinitionSize1040, &g_typeDefinitionSize1041, &g_typeDefinitionSize1042, &g_typeDefinitionSize1043, &g_typeDefinitionSize1044, &g_typeDefinitionSize1045, &g_typeDefinitionSize1046, &g_typeDefinitionSize1047, &g_typeDefinitionSize1048, &g_typeDefinitionSize1049, &g_typeDefinitionSize1050, &g_typeDefinitionSize1051, &g_typeDefinitionSize1052, &g_typeDefinitionSize1053, &g_typeDefinitionSize1054, &g_typeDefinitionSize1055, &g_typeDefinitionSize1056, &g_typeDefinitionSize1057, &g_typeDefinitionSize1058, &g_typeDefinitionSize1059, &g_typeDefinitionSize1060, &g_typeDefinitionSize1061, &g_typeDefinitionSize1062, &g_typeDefinitionSize1063, &g_typeDefinitionSize1064, &g_typeDefinitionSize1065, &g_typeDefinitionSize1066, &g_typeDefinitionSize1067, &g_typeDefinitionSize1068, &g_typeDefinitionSize1069, &g_typeDefinitionSize1070, &g_typeDefinitionSize1071, &g_typeDefinitionSize1072, &g_typeDefinitionSize1073, &g_typeDefinitionSize1074, &g_typeDefinitionSize1075, &g_typeDefinitionSize1076, &g_typeDefinitionSize1077, &g_typeDefinitionSize1078, &g_typeDefinitionSize1079, &g_typeDefinitionSize1080, &g_typeDefinitionSize1081, &g_typeDefinitionSize1082, &g_typeDefinitionSize1083, &g_typeDefinitionSize1084, &g_typeDefinitionSize1085, &g_typeDefinitionSize1086, &g_typeDefinitionSize1087, &g_typeDefinitionSize1088, &g_typeDefinitionSize1089, &g_typeDefinitionSize1090, &g_typeDefinitionSize1091, &g_typeDefinitionSize1092, &g_typeDefinitionSize1093, &g_typeDefinitionSize1094, &g_typeDefinitionSize1095, &g_typeDefinitionSize1096, &g_typeDefinitionSize1097, &g_typeDefinitionSize1098, &g_typeDefinitionSize1099, &g_typeDefinitionSize1100, &g_typeDefinitionSize1101, &g_typeDefinitionSize1102, &g_typeDefinitionSize1103, &g_typeDefinitionSize1104, &g_typeDefinitionSize1105, &g_typeDefinitionSize1106, &g_typeDefinitionSize1107, &g_typeDefinitionSize1108, &g_typeDefinitionSize1109, &g_typeDefinitionSize1110, &g_typeDefinitionSize1111, &g_typeDefinitionSize1112, &g_typeDefinitionSize1113, &g_typeDefinitionSize1114, &g_typeDefinitionSize1115, &g_typeDefinitionSize1116, &g_typeDefinitionSize1117, &g_typeDefinitionSize1118, &g_typeDefinitionSize1119, &g_typeDefinitionSize1120, &g_typeDefinitionSize1121, &g_typeDefinitionSize1122, &g_typeDefinitionSize1123, &g_typeDefinitionSize1124, &g_typeDefinitionSize1125, &g_typeDefinitionSize1126, &g_typeDefinitionSize1127, &g_typeDefinitionSize1128, &g_typeDefinitionSize1129, &g_typeDefinitionSize1130, &g_typeDefinitionSize1131, &g_typeDefinitionSize1132, &g_typeDefinitionSize1133, &g_typeDefinitionSize1134, &g_typeDefinitionSize1135, &g_typeDefinitionSize1136, &g_typeDefinitionSize1137, &g_typeDefinitionSize1138, &g_typeDefinitionSize1139, &g_typeDefinitionSize1140, &g_typeDefinitionSize1141, &g_typeDefinitionSize1142, &g_typeDefinitionSize1143, &g_typeDefinitionSize1144, &g_typeDefinitionSize1145, &g_typeDefinitionSize1146, &g_typeDefinitionSize1147, &g_typeDefinitionSize1148, &g_typeDefinitionSize1149, &g_typeDefinitionSize1150, &g_typeDefinitionSize1151, &g_typeDefinitionSize1152, &g_typeDefinitionSize1153, &g_typeDefinitionSize1154, &g_typeDefinitionSize1155, &g_typeDefinitionSize1156, &g_typeDefinitionSize1157, &g_typeDefinitionSize1158, &g_typeDefinitionSize1159, &g_typeDefinitionSize1160, &g_typeDefinitionSize1161, &g_typeDefinitionSize1162, &g_typeDefinitionSize1163, &g_typeDefinitionSize1164, &g_typeDefinitionSize1165, &g_typeDefinitionSize1166, &g_typeDefinitionSize1167, &g_typeDefinitionSize1168, &g_typeDefinitionSize1169, &g_typeDefinitionSize1170, &g_typeDefinitionSize1171, &g_typeDefinitionSize1172, &g_typeDefinitionSize1173, &g_typeDefinitionSize1174, &g_typeDefinitionSize1175, &g_typeDefinitionSize1176, &g_typeDefinitionSize1177, &g_typeDefinitionSize1178, &g_typeDefinitionSize1179, &g_typeDefinitionSize1180, &g_typeDefinitionSize1181, &g_typeDefinitionSize1182, &g_typeDefinitionSize1183, &g_typeDefinitionSize1184, &g_typeDefinitionSize1185, &g_typeDefinitionSize1186, &g_typeDefinitionSize1187, &g_typeDefinitionSize1188, &g_typeDefinitionSize1189, &g_typeDefinitionSize1190, &g_typeDefinitionSize1191, &g_typeDefinitionSize1192, &g_typeDefinitionSize1193, &g_typeDefinitionSize1194, &g_typeDefinitionSize1195, &g_typeDefinitionSize1196, &g_typeDefinitionSize1197, &g_typeDefinitionSize1198, &g_typeDefinitionSize1199, &g_typeDefinitionSize1200, &g_typeDefinitionSize1201, &g_typeDefinitionSize1202, &g_typeDefinitionSize1203, &g_typeDefinitionSize1204, &g_typeDefinitionSize1205, &g_typeDefinitionSize1206, &g_typeDefinitionSize1207, &g_typeDefinitionSize1208, &g_typeDefinitionSize1209, &g_typeDefinitionSize1210, &g_typeDefinitionSize1211, &g_typeDefinitionSize1212, &g_typeDefinitionSize1213, &g_typeDefinitionSize1214, &g_typeDefinitionSize1215, &g_typeDefinitionSize1216, &g_typeDefinitionSize1217, &g_typeDefinitionSize1218, &g_typeDefinitionSize1219, &g_typeDefinitionSize1220, &g_typeDefinitionSize1221, &g_typeDefinitionSize1222, &g_typeDefinitionSize1223, &g_typeDefinitionSize1224, &g_typeDefinitionSize1225, &g_typeDefinitionSize1226, &g_typeDefinitionSize1227, &g_typeDefinitionSize1228, &g_typeDefinitionSize1229, &g_typeDefinitionSize1230, &g_typeDefinitionSize1231, &g_typeDefinitionSize1232, &g_typeDefinitionSize1233, &g_typeDefinitionSize1234, &g_typeDefinitionSize1235, &g_typeDefinitionSize1236, &g_typeDefinitionSize1237, &g_typeDefinitionSize1238, &g_typeDefinitionSize1239, &g_typeDefinitionSize1240, &g_typeDefinitionSize1241, &g_typeDefinitionSize1242, &g_typeDefinitionSize1243, &g_typeDefinitionSize1244, &g_typeDefinitionSize1245, &g_typeDefinitionSize1246, &g_typeDefinitionSize1247, &g_typeDefinitionSize1248, &g_typeDefinitionSize1249, &g_typeDefinitionSize1250, &g_typeDefinitionSize1251, &g_typeDefinitionSize1252, &g_typeDefinitionSize1253, &g_typeDefinitionSize1254, &g_typeDefinitionSize1255, &g_typeDefinitionSize1256, &g_typeDefinitionSize1257, &g_typeDefinitionSize1258, &g_typeDefinitionSize1259, &g_typeDefinitionSize1260, &g_typeDefinitionSize1261, &g_typeDefinitionSize1262, &g_typeDefinitionSize1263, &g_typeDefinitionSize1264, &g_typeDefinitionSize1265, &g_typeDefinitionSize1266, &g_typeDefinitionSize1267, &g_typeDefinitionSize1268, &g_typeDefinitionSize1269, &g_typeDefinitionSize1270, &g_typeDefinitionSize1271, &g_typeDefinitionSize1272, &g_typeDefinitionSize1273, &g_typeDefinitionSize1274, &g_typeDefinitionSize1275, &g_typeDefinitionSize1276, &g_typeDefinitionSize1277, &g_typeDefinitionSize1278, &g_typeDefinitionSize1279, &g_typeDefinitionSize1280, &g_typeDefinitionSize1281, &g_typeDefinitionSize1282, &g_typeDefinitionSize1283, &g_typeDefinitionSize1284, &g_typeDefinitionSize1285, &g_typeDefinitionSize1286, &g_typeDefinitionSize1287, &g_typeDefinitionSize1288, &g_typeDefinitionSize1289, &g_typeDefinitionSize1290, &g_typeDefinitionSize1291, &g_typeDefinitionSize1292, &g_typeDefinitionSize1293, &g_typeDefinitionSize1294, &g_typeDefinitionSize1295, &g_typeDefinitionSize1296, &g_typeDefinitionSize1297, &g_typeDefinitionSize1298, &g_typeDefinitionSize1299, &g_typeDefinitionSize1300, &g_typeDefinitionSize1301, &g_typeDefinitionSize1302, &g_typeDefinitionSize1303, &g_typeDefinitionSize1304, &g_typeDefinitionSize1305, &g_typeDefinitionSize1306, &g_typeDefinitionSize1307, &g_typeDefinitionSize1308, &g_typeDefinitionSize1309, &g_typeDefinitionSize1310, &g_typeDefinitionSize1311, &g_typeDefinitionSize1312, &g_typeDefinitionSize1313, &g_typeDefinitionSize1314, &g_typeDefinitionSize1315, &g_typeDefinitionSize1316, &g_typeDefinitionSize1317, &g_typeDefinitionSize1318, &g_typeDefinitionSize1319, &g_typeDefinitionSize1320, &g_typeDefinitionSize1321, &g_typeDefinitionSize1322, &g_typeDefinitionSize1323, &g_typeDefinitionSize1324, &g_typeDefinitionSize1325, &g_typeDefinitionSize1326, &g_typeDefinitionSize1327, &g_typeDefinitionSize1328, &g_typeDefinitionSize1329, &g_typeDefinitionSize1330, &g_typeDefinitionSize1331, &g_typeDefinitionSize1332, &g_typeDefinitionSize1333, &g_typeDefinitionSize1334, &g_typeDefinitionSize1335, &g_typeDefinitionSize1336, &g_typeDefinitionSize1337, &g_typeDefinitionSize1338, &g_typeDefinitionSize1339, &g_typeDefinitionSize1340, &g_typeDefinitionSize1341, &g_typeDefinitionSize1342, &g_typeDefinitionSize1343, &g_typeDefinitionSize1344, &g_typeDefinitionSize1345, &g_typeDefinitionSize1346, &g_typeDefinitionSize1347, &g_typeDefinitionSize1348, &g_typeDefinitionSize1349, &g_typeDefinitionSize1350, &g_typeDefinitionSize1351, &g_typeDefinitionSize1352, &g_typeDefinitionSize1353, &g_typeDefinitionSize1354, &g_typeDefinitionSize1355, &g_typeDefinitionSize1356, &g_typeDefinitionSize1357, &g_typeDefinitionSize1358, &g_typeDefinitionSize1359, &g_typeDefinitionSize1360, &g_typeDefinitionSize1361, &g_typeDefinitionSize1362, &g_typeDefinitionSize1363, &g_typeDefinitionSize1364, &g_typeDefinitionSize1365, &g_typeDefinitionSize1366, &g_typeDefinitionSize1367, &g_typeDefinitionSize1368, &g_typeDefinitionSize1369, &g_typeDefinitionSize1370, &g_typeDefinitionSize1371, &g_typeDefinitionSize1372, &g_typeDefinitionSize1373, &g_typeDefinitionSize1374, &g_typeDefinitionSize1375, &g_typeDefinitionSize1376, &g_typeDefinitionSize1377, &g_typeDefinitionSize1378, &g_typeDefinitionSize1379, &g_typeDefinitionSize1380, &g_typeDefinitionSize1381, &g_typeDefinitionSize1382, &g_typeDefinitionSize1383, &g_typeDefinitionSize1384, &g_typeDefinitionSize1385, &g_typeDefinitionSize1386, &g_typeDefinitionSize1387, &g_typeDefinitionSize1388, &g_typeDefinitionSize1389, &g_typeDefinitionSize1390, &g_typeDefinitionSize1391, &g_typeDefinitionSize1392, &g_typeDefinitionSize1393, &g_typeDefinitionSize1394, &g_typeDefinitionSize1395, &g_typeDefinitionSize1396, &g_typeDefinitionSize1397, &g_typeDefinitionSize1398, &g_typeDefinitionSize1399, &g_typeDefinitionSize1400, &g_typeDefinitionSize1401, &g_typeDefinitionSize1402, &g_typeDefinitionSize1403, &g_typeDefinitionSize1404, &g_typeDefinitionSize1405, &g_typeDefinitionSize1406, &g_typeDefinitionSize1407, &g_typeDefinitionSize1408, &g_typeDefinitionSize1409, &g_typeDefinitionSize1410, &g_typeDefinitionSize1411, &g_typeDefinitionSize1412, &g_typeDefinitionSize1413, &g_typeDefinitionSize1414, &g_typeDefinitionSize1415, &g_typeDefinitionSize1416, &g_typeDefinitionSize1417, &g_typeDefinitionSize1418, &g_typeDefinitionSize1419, &g_typeDefinitionSize1420, &g_typeDefinitionSize1421, &g_typeDefinitionSize1422, &g_typeDefinitionSize1423, &g_typeDefinitionSize1424, &g_typeDefinitionSize1425, &g_typeDefinitionSize1426, &g_typeDefinitionSize1427, &g_typeDefinitionSize1428, &g_typeDefinitionSize1429, &g_typeDefinitionSize1430, &g_typeDefinitionSize1431, &g_typeDefinitionSize1432, &g_typeDefinitionSize1433, &g_typeDefinitionSize1434, &g_typeDefinitionSize1435, &g_typeDefinitionSize1436, &g_typeDefinitionSize1437, &g_typeDefinitionSize1438, &g_typeDefinitionSize1439, &g_typeDefinitionSize1440, &g_typeDefinitionSize1441, &g_typeDefinitionSize1442, &g_typeDefinitionSize1443, &g_typeDefinitionSize1444, &g_typeDefinitionSize1445, &g_typeDefinitionSize1446, &g_typeDefinitionSize1447, &g_typeDefinitionSize1448, &g_typeDefinitionSize1449, &g_typeDefinitionSize1450, &g_typeDefinitionSize1451, &g_typeDefinitionSize1452, &g_typeDefinitionSize1453, &g_typeDefinitionSize1454, &g_typeDefinitionSize1455, &g_typeDefinitionSize1456, &g_typeDefinitionSize1457, &g_typeDefinitionSize1458, &g_typeDefinitionSize1459, &g_typeDefinitionSize1460, &g_typeDefinitionSize1461, &g_typeDefinitionSize1462, &g_typeDefinitionSize1463, &g_typeDefinitionSize1464, &g_typeDefinitionSize1465, &g_typeDefinitionSize1466, &g_typeDefinitionSize1467, &g_typeDefinitionSize1468, &g_typeDefinitionSize1469, &g_typeDefinitionSize1470, &g_typeDefinitionSize1471, &g_typeDefinitionSize1472, &g_typeDefinitionSize1473, &g_typeDefinitionSize1474, &g_typeDefinitionSize1475, &g_typeDefinitionSize1476, &g_typeDefinitionSize1477, &g_typeDefinitionSize1478, &g_typeDefinitionSize1479, &g_typeDefinitionSize1480, &g_typeDefinitionSize1481, &g_typeDefinitionSize1482, &g_typeDefinitionSize1483, &g_typeDefinitionSize1484, &g_typeDefinitionSize1485, &g_typeDefinitionSize1486, &g_typeDefinitionSize1487, &g_typeDefinitionSize1488, &g_typeDefinitionSize1489, &g_typeDefinitionSize1490, &g_typeDefinitionSize1491, &g_typeDefinitionSize1492, &g_typeDefinitionSize1493, &g_typeDefinitionSize1494, &g_typeDefinitionSize1495, &g_typeDefinitionSize1496, &g_typeDefinitionSize1497, &g_typeDefinitionSize1498, &g_typeDefinitionSize1499, &g_typeDefinitionSize1500, &g_typeDefinitionSize1501, &g_typeDefinitionSize1502, &g_typeDefinitionSize1503, &g_typeDefinitionSize1504, &g_typeDefinitionSize1505, &g_typeDefinitionSize1506, &g_typeDefinitionSize1507, &g_typeDefinitionSize1508, &g_typeDefinitionSize1509, &g_typeDefinitionSize1510, &g_typeDefinitionSize1511, &g_typeDefinitionSize1512, &g_typeDefinitionSize1513, &g_typeDefinitionSize1514, &g_typeDefinitionSize1515, &g_typeDefinitionSize1516, &g_typeDefinitionSize1517, &g_typeDefinitionSize1518, &g_typeDefinitionSize1519, &g_typeDefinitionSize1520, &g_typeDefinitionSize1521, &g_typeDefinitionSize1522, &g_typeDefinitionSize1523, &g_typeDefinitionSize1524, &g_typeDefinitionSize1525, &g_typeDefinitionSize1526, &g_typeDefinitionSize1527, &g_typeDefinitionSize1528, &g_typeDefinitionSize1529, &g_typeDefinitionSize1530, &g_typeDefinitionSize1531, &g_typeDefinitionSize1532, &g_typeDefinitionSize1533, &g_typeDefinitionSize1534, &g_typeDefinitionSize1535, &g_typeDefinitionSize1536, &g_typeDefinitionSize1537, &g_typeDefinitionSize1538, &g_typeDefinitionSize1539, &g_typeDefinitionSize1540, &g_typeDefinitionSize1541, &g_typeDefinitionSize1542, &g_typeDefinitionSize1543, &g_typeDefinitionSize1544, &g_typeDefinitionSize1545, &g_typeDefinitionSize1546, &g_typeDefinitionSize1547, &g_typeDefinitionSize1548, &g_typeDefinitionSize1549, &g_typeDefinitionSize1550, &g_typeDefinitionSize1551, &g_typeDefinitionSize1552, &g_typeDefinitionSize1553, &g_typeDefinitionSize1554, &g_typeDefinitionSize1555, &g_typeDefinitionSize1556, &g_typeDefinitionSize1557, &g_typeDefinitionSize1558, &g_typeDefinitionSize1559, &g_typeDefinitionSize1560, &g_typeDefinitionSize1561, &g_typeDefinitionSize1562, &g_typeDefinitionSize1563, &g_typeDefinitionSize1564, &g_typeDefinitionSize1565, &g_typeDefinitionSize1566, &g_typeDefinitionSize1567, &g_typeDefinitionSize1568, &g_typeDefinitionSize1569, &g_typeDefinitionSize1570, &g_typeDefinitionSize1571, &g_typeDefinitionSize1572, &g_typeDefinitionSize1573, &g_typeDefinitionSize1574, &g_typeDefinitionSize1575, &g_typeDefinitionSize1576, &g_typeDefinitionSize1577, &g_typeDefinitionSize1578, &g_typeDefinitionSize1579, &g_typeDefinitionSize1580, &g_typeDefinitionSize1581, &g_typeDefinitionSize1582, &g_typeDefinitionSize1583, &g_typeDefinitionSize1584, &g_typeDefinitionSize1585, &g_typeDefinitionSize1586, &g_typeDefinitionSize1587, &g_typeDefinitionSize1588, &g_typeDefinitionSize1589, &g_typeDefinitionSize1590, &g_typeDefinitionSize1591, &g_typeDefinitionSize1592, &g_typeDefinitionSize1593, &g_typeDefinitionSize1594, &g_typeDefinitionSize1595, &g_typeDefinitionSize1596, &g_typeDefinitionSize1597, &g_typeDefinitionSize1598, &g_typeDefinitionSize1599, &g_typeDefinitionSize1600, &g_typeDefinitionSize1601, &g_typeDefinitionSize1602, &g_typeDefinitionSize1603, &g_typeDefinitionSize1604, &g_typeDefinitionSize1605, &g_typeDefinitionSize1606, &g_typeDefinitionSize1607, &g_typeDefinitionSize1608, &g_typeDefinitionSize1609, &g_typeDefinitionSize1610, &g_typeDefinitionSize1611, &g_typeDefinitionSize1612, &g_typeDefinitionSize1613, &g_typeDefinitionSize1614, &g_typeDefinitionSize1615, &g_typeDefinitionSize1616, &g_typeDefinitionSize1617, &g_typeDefinitionSize1618, &g_typeDefinitionSize1619, &g_typeDefinitionSize1620, &g_typeDefinitionSize1621, &g_typeDefinitionSize1622, &g_typeDefinitionSize1623, &g_typeDefinitionSize1624, &g_typeDefinitionSize1625, &g_typeDefinitionSize1626, &g_typeDefinitionSize1627, &g_typeDefinitionSize1628, &g_typeDefinitionSize1629, &g_typeDefinitionSize1630, &g_typeDefinitionSize1631, &g_typeDefinitionSize1632, &g_typeDefinitionSize1633, &g_typeDefinitionSize1634, &g_typeDefinitionSize1635, &g_typeDefinitionSize1636, &g_typeDefinitionSize1637, &g_typeDefinitionSize1638, &g_typeDefinitionSize1639, &g_typeDefinitionSize1640, &g_typeDefinitionSize1641, &g_typeDefinitionSize1642, &g_typeDefinitionSize1643, &g_typeDefinitionSize1644, &g_typeDefinitionSize1645, &g_typeDefinitionSize1646, &g_typeDefinitionSize1647, &g_typeDefinitionSize1648, &g_typeDefinitionSize1649, &g_typeDefinitionSize1650, &g_typeDefinitionSize1651, &g_typeDefinitionSize1652, &g_typeDefinitionSize1653, &g_typeDefinitionSize1654, &g_typeDefinitionSize1655, &g_typeDefinitionSize1656, &g_typeDefinitionSize1657, &g_typeDefinitionSize1658, &g_typeDefinitionSize1659, &g_typeDefinitionSize1660, &g_typeDefinitionSize1661, &g_typeDefinitionSize1662, &g_typeDefinitionSize1663, &g_typeDefinitionSize1664, &g_typeDefinitionSize1665, &g_typeDefinitionSize1666, &g_typeDefinitionSize1667, &g_typeDefinitionSize1668, &g_typeDefinitionSize1669, &g_typeDefinitionSize1670, &g_typeDefinitionSize1671, &g_typeDefinitionSize1672, &g_typeDefinitionSize1673, &g_typeDefinitionSize1674, &g_typeDefinitionSize1675, &g_typeDefinitionSize1676, &g_typeDefinitionSize1677, &g_typeDefinitionSize1678, &g_typeDefinitionSize1679, &g_typeDefinitionSize1680, &g_typeDefinitionSize1681, &g_typeDefinitionSize1682, &g_typeDefinitionSize1683, &g_typeDefinitionSize1684, &g_typeDefinitionSize1685, &g_typeDefinitionSize1686, &g_typeDefinitionSize1687, &g_typeDefinitionSize1688, &g_typeDefinitionSize1689, &g_typeDefinitionSize1690, };
[ "peternickell@gmail.com" ]
peternickell@gmail.com
efec5a6faff322541952557bb3d9df2eeb7ce970
385b90db1eac55a3977ded03dc3913e7b2f76f97
/app/src/main/cpp/GPUImage/GPUImageWhiteBalanceFilter.h
17b7ec7d1271152ed82e6a8ebea18faee766a721
[]
no_license
zlyGo/CGPUImage-android
0d3d33e179d02031e972c863d272765a7bfbf0cb
05e1a0a2957a1ac24acf6d7da1036daf910b5523
refs/heads/master
2023-07-18T09:32:20.534845
2021-08-22T01:29:36
2021-08-22T01:29:36
398,688,919
0
0
null
2021-08-22T01:25:19
2021-08-22T01:25:19
null
UTF-8
C++
false
false
1,145
h
/** * Created by lvHiei on 17-4-13. * This is a project of GPUImage implemented with c++, you can * use it free. if you find some bug please send me a email. * My Email is majun_1523@163.com. */ #ifndef CGPUIMAGE_ANDROID_GPUIMAGEWHITEBALANCEFILTER_H #define CGPUIMAGE_ANDROID_GPUIMAGEWHITEBALANCEFILTER_H #include "GPUImageFilter.h" /** * Created by Alaric Cole * Allows adjustment of color temperature in terms of what an image was effectively shot in. This means higher Kelvin values will warm the image, while lower values will cool it. */ class GPUImageWhiteBalanceFilter : public GPUImageFilter{ public: GPUImageWhiteBalanceFilter(); virtual ~GPUImageWhiteBalanceFilter(); void setTemperature(float temperature); void setTint(float tint); protected: virtual bool createProgramExtra(); virtual bool beforeDrawExtra(); protected: //choose color temperature, in degrees Kelvin GLfloat m_fTemperature; //adjust tint to compensate GLfloat m_fTint; GLint m_iTemperatureUniformLocation; GLint m_iTintUniformLocation; }; #endif //CGPUIMAGE_ANDROID_GPUIMAGEWHITEBALANCEFILTER_H
[ "majun_1523@163.com" ]
majun_1523@163.com
895ff6153476b92e32d72baa6abaa291d2a19d29
2f4943f2246b82fe6baf4022bdb8d1aa2644924d
/app/src/main/cpp/libpngTop.cpp
06667c5965788248e92a317cfceb149ed74344c8
[]
no_license
qiao236349845/libpng-for-android
fe3de8bad5d763226458987682ce4c0c894d5b65
58fd029fd67fd83930d8fc3a922e99696f895c0d
refs/heads/master
2020-03-30T07:34:58.699770
2017-05-01T08:07:45
2017-05-01T08:07:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
253
cpp
#include <jni.h> #include <string> extern "C" jstring Java_com_test_a3rdpartylibpng_MainActivity_stringFromJNI( JNIEnv *env, jobject /* this */) { std::string hello = "Hello from C++"; return env->NewStringUTF(hello.c_str()); }
[ "tokushi2011@gmail.com" ]
tokushi2011@gmail.com
e7b368954fb16726e0dbcc269dbdd9a7338c7ed9
4a60a5a1273beadd787d329caa1db460afc8cc89
/Drivers/drv_ExtIIC.hpp
2a636352099238fa2dd0c4e1c2e776457febe514
[]
no_license
APPLE-JUICE-P/A9-vision_speed
ba737760f70fa90bc1810605370d38c2f29137c5
85c988f373dd7a464cca76128fb4070892e9a1b0
refs/heads/main
2023-06-29T17:17:20.159848
2021-08-01T13:44:00
2021-08-01T13:44:00
391,636,611
1
2
null
null
null
null
GB18030
C++
false
false
761
hpp
#pragma once /*上锁保证通信连续性 上锁之后必须解锁 Sync_waitTime:超时时间 */ bool Lock_ExtIIC( double Sync_waitTime = -1 ); void Unlock_ExtIIC(); /*7位地址发送数据 addr:7位从器件地址 datas:要发送的数据指针 length:数据长度 Sync_waitTime:超时时间 */ bool ExtIIC_SendAddr7( uint8_t addr, const uint8_t* datas, uint16_t length, double Sync_waitTime = -1 ); /*7位地址发送并接收数据 addr:7位从器件地址 datas:要发送的数据指针 length:数据长度 Sync_waitTime:超时时间 */ bool ExtIIC_SendReceiveAddr7( uint8_t addr, const uint8_t* tx_datas, uint16_t tx_length, const uint8_t* rx_datas, uint16_t rx_length, double Sync_waitTime = -1 ); void init_drv_ExtIIC();
[ "1206897235@qq.com" ]
1206897235@qq.com
8b32e172ae3c0c50a5ce1d5a16e979ca2abb8e68
2c3c7a0a23b449838725236fc63bcac517f24a58
/code/competiton/day2/PG-Slave/Runow.ino
a2c8a8ad9249013d11c02d7d59b0c105499720f3
[ "MIT" ]
permissive
kianakholousi/PersianGulf
e2a9864afb436d6f554e374d933ac7800a5c1340
cecaaa115eb8d2dd8b3f257ae120260b7e605a54
refs/heads/master
2022-12-09T16:12:23.777545
2020-08-30T17:22:58
2020-08-30T17:22:58
173,091,136
1
0
null
null
null
null
UTF-8
C++
false
false
4,070
ino
void MOTOR(int lf, int lb, int rf, int rb) { if (lf > 1023) lf = 1023; if (lf < -1023) lf = -1023; if (lb > 1023) lb = 1023; if (lb < -1023) lb = -1023; if (rb > 1023) rb = 1023; if (rb < -1023) rb = -1023; if (rf > 1023) rf = 1023; if (rf < -1023) rf = -1023; lf = lf * reduction * -1; lb = lb * reduction * 1; rf = rf * reduction * -1; rb = rb * reduction * -1; ////////LF if (lf < 0) { analogWrite( PWMlf, 1023 + lf ); digitalWrite(digitalPINlf, HIGH); } else if (lf > 0) { analogWrite( PWMlf, lf); digitalWrite(digitalPINlf, LOW); } else if (lf == 0) { analogWrite( PWMlf, 0 ); digitalWrite(digitalPINlf, LOW); } //////lb if (lb < 0) { analogWrite( PWMlb, 1023 + lb ); digitalWrite(digitalPINlb, HIGH); } else if (lb > 0) { analogWrite( PWMlb, lb ); digitalWrite(digitalPINlb, LOW); } else if (lb == 0) { analogWrite( PWMlb, 0 ); digitalWrite(digitalPINlb, LOW); } ///////rb if (rb < 0) { analogWrite( PWMrb, rb + 1023 ); digitalWrite(digitalPINrb, HIGH); } else if (rb > 0) { analogWrite( PWMrb, rb); digitalWrite(digitalPINrb, LOW); } else if (rb == 0) { analogWrite( PWMrb, 0 ); digitalWrite(digitalPINrb, LOW); } ///////rf if (rf < 0) { analogWrite( PWMrf, (rf + 1023)); digitalWrite(digitalPINrf, HIGH); } else if (rf > 0) { analogWrite( PWMrf, rf ); digitalWrite(digitalPINrf, LOW); } else if (rf == 0) { analogWrite( PWMrf, 0 ); digitalWrite(digitalPINrf, LOW); } } void mot_ang(float ang) { float division = 1023 / 45; int lf; int lb; int rb; int rf; if (0 <= ang && ang < 90) { lf = -1023; lb = -1023 + (ang * division); rf = 1023 - (ang * division); rb = 1023; } else if (90 <= ang && ang < 180) { ang = ang - 90; lf = -1023 + (ang * division); lb = 1023; rf = -1023; rb = 1024 - (ang * division); } else if (180 <= ang && ang < 270) { ang = ang - 180; lf = 1023; lb = 1023 - (ang * division); rf = -1023 + (ang * division); rb = -1023; } else if (270 <= ang && ang <= 360) { ang = ang - 270; lf = 1023 - (ang * division); lb = -1023; rf = 1023; rb = -1024 + (ang * division); } MOTOR (lf + set_s, lb + set_s, rf + set_s, rb + set_s); } void MOVE(float ang) { float division = 512 / 22.5; int lf = 0; int lb = 0; int rb = 0; int rf = 0; if (0 <= ang && ang < 90) { lf = 1023; lb = 1024 - (ang * division); rb = -1023; rf = -1024 + (ang * division); } else if (90 <= ang && ang < 180) { ang = ang - 90; lf = 1024 - (ang * division); lb = -1024; rb = -1024 + (ang * division); rf = 1024; } else if (180 <= ang && ang < 270) { ang = ang - 180; lf = -1023; lb = -1024 + (ang * division); rb = 1023; rf = 1024 - (ang * division); } else if (270 <= ang && ang <= 360) { ang = ang - 270; lf = -1024 + (ang * division); lb = 1023; rb = 1024 - (ang * division); rf = -1023; } MOTOR (lf , lb , rf , rb ); } void shift() { Shut(); // Bx = -Bx; col_ang(); if (Ba > 345 || Ba <= 15) shif = 0; else if (Ba <= 120) shif = (atan2(By, Bx - 45) * 180 / PI) + (DShift / 12); else if (Ba >= 240) shif = (atan2(By , Bx - 45) * 180 / PI) - (DShift / 12); else if (Ba > 120 && Ba <= 180) shif = (atan2(By - 40, Bx) * 180 / PI) - (DShift / 12); else if (Ba > 180 && Ba < 240) shif = (atan2(By + 40, Bx) * 180 / PI) + (DShift / 12); if (shif < 0) shif = shif + 360; mot_ang(shif); } //------------STOP------------ void STOP() { reduction = 1; MOTOR (0 + set_s , 0 + set_s , 0 + set_s , 0 + set_s); } void Shut() { if (SHC > 3 && (Ba <= 18 || Ba >= 350) && (arz < 20) && (DistanceB >= 36 && DistanceB <= 41 ) && Ball ) { SHC = 0; digitalWrite(30, HIGH); delay(15); digitalWrite(30, LOW); delay(15); } } void harekat_vazi_mah() { for (int i = 0; i <= 360; i++) { mot_ang(i); delay(5); } }
[ "44377174+kianakholousi@users.noreply.github.com" ]
44377174+kianakholousi@users.noreply.github.com
01687547d8f4b5341df9acac6cbf7f62ffc6df05
a93bb0f268cf5e2de2dd745c86a160ca60fada86
/源代码/Thirdparty/UGC/inc/GLGraphics/UGLGraphicsFactory.h
48eb18ca9df5e8419c13f424c9806c9cf99f2341
[ "Apache-2.0" ]
permissive
15831944/Fdo_SuperMap
ea22b74ecfc5f983f2decefe4c2cf29007b85bf6
3d4309d0f45fa63abcde188825a997077dd444f4
refs/heads/master
2021-05-29T09:57:19.433966
2015-05-22T09:03:56
2015-05-22T09:03:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
432
h
// UGLGraphicsFactory.h: interface for the UGLGraphicsFactory class. // ////////////////////////////////////////////////////////////////////// #if !defined(UGLGRAPHICSFACTORY_H) #define UGLGRAPHICSFACTORY_H namespace UGC{ class GLGRAPHICS_API UGLGraphicsFactory { public: UGLGraphicsFactory(); virtual ~UGLGraphicsFactory(); }; } #endif // !defined(AFX_UGLGRAPHICSFACTORY_H__9168C279_F445_488C_A90D_C2EE6AB4AF77__INCLUDED_)
[ "huanliang26@126.com" ]
huanliang26@126.com
94a9c6d03c7dab68fc55553567dad31f2e09574e
8dc84558f0058d90dfc4955e905dab1b22d12c08
/ui/chromeos/ime/infolist_window.cc
91fef0f099557a6c54a75e6c870a53e51116e3b2
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
9,526
cc
// Copyright 2014 The Chromium 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 "ui/chromeos/ime/infolist_window.h" #include <stddef.h> #include <string> #include <vector> #include "base/logging.h" #include "base/macros.h" #include "ui/base/l10n/l10n_util.h" #include "ui/chromeos/ime/candidate_window_constants.h" #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/insets.h" #include "ui/native_theme/native_theme.h" #include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/bubble/bubble_border.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/widget/widget.h" #include "ui/wm/core/window_animations.h" namespace ui { namespace ime { namespace { // The width of an info-list. const int kInfolistEntryWidth = 200; // The milliseconds of the delay to show the infolist window. const int kInfolistShowDelayMilliSeconds = 500; // The milliseconds of the delay to hide the infolist window. const int kInfolistHideDelayMilliSeconds = 500; /////////////////////////////////////////////////////////////////////////////// // InfolistBorder // The BubbleBorder subclass to draw the border and determine its position. class InfolistBorder : public views::BubbleBorder { public: InfolistBorder(); ~InfolistBorder() override; // views::BubbleBorder implementation. gfx::Rect GetBounds(const gfx::Rect& anchor_rect, const gfx::Size& contents_size) const override; gfx::Insets GetInsets() const override; private: DISALLOW_COPY_AND_ASSIGN(InfolistBorder); }; InfolistBorder::InfolistBorder() : views::BubbleBorder(views::BubbleBorder::LEFT_CENTER, views::BubbleBorder::NO_SHADOW, SK_ColorTRANSPARENT) { set_paint_arrow(views::BubbleBorder::PAINT_NONE); } InfolistBorder::~InfolistBorder() {} gfx::Rect InfolistBorder::GetBounds(const gfx::Rect& anchor_rect, const gfx::Size& contents_size) const { gfx::Rect bounds(contents_size); bounds.set_x(is_arrow_on_left(arrow()) ? anchor_rect.right() : anchor_rect.x() - contents_size.width()); // InfolistBorder modifies the vertical position based on the arrow offset // although it doesn't draw the arrow. The arrow offset is the half of // |contents_size| by default but can be modified through the off-screen logic // in BubbleFrameView. bounds.set_y(anchor_rect.y() + contents_size.height() / 2 - GetArrowOffset(contents_size)); return bounds; } gfx::Insets InfolistBorder::GetInsets() const { // This has to be specified and return empty insets to place the infolist // window without the gap. return gfx::Insets(); } } // namespace // InfolistRow renderes a row of a infolist. class InfolistEntryView : public views::View { public: InfolistEntryView(const ui::InfolistEntry& entry, const gfx::FontList& title_font_list, const gfx::FontList& description_font_list); ~InfolistEntryView() override; void SetEntry(const ui::InfolistEntry& entry); private: // views::View implementation. gfx::Size CalculatePreferredSize() const override; void UpdateBackground(); ui::InfolistEntry entry_; // The title label. Owned by views hierarchy. views::Label* title_label_; // The description label. Owned by views hierarchy. views::Label* description_label_; DISALLOW_COPY_AND_ASSIGN(InfolistEntryView); }; InfolistEntryView::InfolistEntryView(const ui::InfolistEntry& entry, const gfx::FontList& title_font_list, const gfx::FontList& description_font_list) : entry_(entry) { SetLayoutManager( std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical)); title_label_ = new views::Label(entry.title, {title_font_list}); title_label_->SetPosition(gfx::Point(0, 0)); title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4)); description_label_ = new views::Label(entry.body, {description_font_list}); description_label_->SetPosition(gfx::Point(0, 0)); description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); description_label_->SetMultiLine(true); description_label_->SizeToFit(kInfolistEntryWidth); description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4)); AddChildView(title_label_); AddChildView(description_label_); UpdateBackground(); } InfolistEntryView::~InfolistEntryView() {} void InfolistEntryView::SetEntry(const ui::InfolistEntry& entry) { if (entry_ == entry) return; entry_ = entry; title_label_->SetText(entry_.title); description_label_->SetText(entry_.body); UpdateBackground(); } gfx::Size InfolistEntryView::CalculatePreferredSize() const { return gfx::Size(kInfolistEntryWidth, GetHeightForWidth(kInfolistEntryWidth)); } void InfolistEntryView::UpdateBackground() { if (entry_.highlighted) { SetBackground(views::CreateSolidBackground(GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused))); SetBorder(views::CreateSolidBorder( 1, GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_FocusedBorderColor))); } else { SetBackground(nullptr); SetBorder(views::CreateEmptyBorder(1, 1, 1, 1)); } SchedulePaint(); } /////////////////////////////////////////////////////////////////////////////// // InfolistWindow InfolistWindow::InfolistWindow(views::View* candidate_window, const std::vector<ui::InfolistEntry>& entries) : views::BubbleDialogDelegateView(candidate_window, views::BubbleBorder::NONE), title_font_list_(gfx::Font(kJapaneseFontName, kFontSizeDelta + 15)), description_font_list_( gfx::Font(kJapaneseFontName, kFontSizeDelta + 11)) { set_can_activate(false); set_accept_events(false); set_margins(gfx::Insets()); SetBackground(views::CreateSolidBackground(GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_WindowBackground))); SetBorder(views::CreateSolidBorder( 1, GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_MenuBorderColor))); SetLayoutManager( std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical)); views::Label* caption_label = new views::Label( l10n_util::GetStringUTF16(IDS_CHROMEOS_IME_INFOLIST_WINDOW_TITLE)); caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); caption_label->SetEnabledColor(GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_LabelEnabledColor)); caption_label->SetBorder(views::CreateEmptyBorder(2, 2, 2, 2)); caption_label->SetBackground(views::CreateSolidBackground( color_utils::AlphaBlend(SK_ColorBLACK, GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_WindowBackground), 0x10))); AddChildView(caption_label); for (size_t i = 0; i < entries.size(); ++i) { entry_views_.push_back(new InfolistEntryView( entries[i], title_font_list_, description_font_list_)); AddChildView(entry_views_.back()); } } InfolistWindow::~InfolistWindow() { } void InfolistWindow::InitWidget() { views::Widget* widget = views::BubbleDialogDelegateView::CreateBubble(this); wm::SetWindowVisibilityAnimationType( widget->GetNativeView(), wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); // BubbleFrameView will be initialized through CreateBubble. GetBubbleFrameView()->SetBubbleBorder( std::unique_ptr<views::BubbleBorder>(new InfolistBorder())); SizeToContents(); } void InfolistWindow::Relayout(const std::vector<ui::InfolistEntry>& entries) { size_t i = 0; for (; i < entries.size(); ++i) { if (i < entry_views_.size()) { entry_views_[i]->SetEntry(entries[i]); } else { InfolistEntryView* new_entry = new InfolistEntryView( entries[i], title_font_list_, description_font_list_); AddChildView(new_entry); entry_views_.push_back(new_entry); } } if (i < entry_views_.size()) { for (; i < entry_views_.size(); ++i) delete entry_views_[i]; entry_views_.resize(entries.size()); } Layout(); GetBubbleFrameView()->bubble_border()->set_arrow_offset(0); SizeToContents(); } void InfolistWindow::ShowWithDelay() { show_hide_timer_.Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kInfolistShowDelayMilliSeconds), GetWidget(), &views::Widget::Show); } void InfolistWindow::HideWithDelay() { show_hide_timer_.Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kInfolistHideDelayMilliSeconds), GetWidget(), &views::Widget::Close); } void InfolistWindow::ShowImmediately() { show_hide_timer_.Stop(); GetWidget()->Show(); } void InfolistWindow::HideImmediately() { show_hide_timer_.Stop(); GetWidget()->Close(); } const char* InfolistWindow::GetClassName() const { return "InfolistWindow"; } int InfolistWindow::GetDialogButtons() const { return ui::DIALOG_BUTTON_NONE; } void InfolistWindow::WindowClosing() { show_hide_timer_.Stop(); } } // namespace ime } // namespace ui
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
8d0b0ba780ddb7a81e1e9ced5f06e885450c0f6c
28c658d686a3d7e0070bb824dbc504056266fdf8
/Kernel/Boundaries/CircularPeriodicBoundary.h
6abee0091e1a5e1a0650f6fe87a793a9634c9bc0
[]
no_license
gladk/MercuryDPM
4f0e1ddf1e053fd784f66c8e4ad04e536ff55e94
c50970ec10e696f975c7d8a0221357bbb51b8e80
refs/heads/master
2021-01-10T10:50:38.909585
2015-10-05T21:24:44
2015-10-05T21:24:44
43,673,126
2
0
null
null
null
null
UTF-8
C++
false
false
3,702
h
//Copyright (c) 2013-2014, The MercuryDPM Developers Team. All rights reserved. //For the list of developers, see <http://www.MercuryDPM.org/Team>. // //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 MercuryDPM 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 MERCURYDPM DEVELOPERS TEAM 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 CircularPeriodicBoundary_H #define CircularPeriodicBoundary_H #include "BaseBoundary.h" class ParticleHandler; class BaseParticle; /*! * \class CircularPeriodicBoundary * \brief used to create a circular periodic boundary */ class CircularPeriodicBoundary : public BaseBoundary { public: /*! * \brief default constructor */ CircularPeriodicBoundary(); /*! * \brief Constructor */ CircularPeriodicBoundary(double innerRadius); /*! * \brief destructor */ ~CircularPeriodicBoundary(); /*! * \brief */ CircularPeriodicBoundary* copy() const; /*! * \brief * \param[in] */ void rotateParticle(BaseParticle *P, double angle); /*! * \brief * \param[in] */ void createPeriodicParticles(BaseParticle *P, ParticleHandler &pH); /*! * \brief */ bool checkBoundaryAfterParticleMoved(BaseParticle *P, ParticleHandler &pH); /*! * \brief reads the CircularPeriodicBoundary */ void read(std::istream& is); /*! * \brief */ void oldRead(std::istream& is); /*! * \brief outputs the CircularPeriodicBoundary */ void write(std::ostream& os) const; /*! * \brief Returns the name of the object * \return string type */ virtual std::string getName() const; private: /*! * \brief */ double innerRadius_; //A particle is between to Radii in plane (i) and has two (straight) walls (plane 0 defines centre) //If it is close to its inner Radius it should be copied once with a positive rotation of 2*pi/2^i //If it is close to one of its straight walls is should be rotative with +/- 2*pi/2^i //Particles can only apply forces to real particles //If a particle crosses a straight wall it should simply be shifted //If a particle crosses its inner Radius it should be coppied //If a particle crosses its outer Radius it may need to be deleted }; #endif
[ "tunuguntladr@b3179fc6-a625-46cb-afb8-a2a51a81216d" ]
tunuguntladr@b3179fc6-a625-46cb-afb8-a2a51a81216d
1c955fb973ce11f0f5a30d379760d190d8886591
9f30967e6c53dddd01a0e6e60947a266209199c2
/zty-Contest/zty-Exercise/luogu/p1349.cpp
8a6419d45f93a996a2f41e8aa32dc472204a0f57
[]
no_license
zty111/OI
80ce2cfcace751673a56f7808259c0622d5689a4
5f49047ef3f8d17eb1677ad38f1829fd44e85abc
refs/heads/master
2020-07-29T23:48:59.956933
2019-10-31T15:18:02
2019-10-31T15:18:02
165,688,652
0
0
null
null
null
null
UTF-8
C++
false
false
1,013
cpp
// p11394 广义菲波那切数列 //[数学] //矩阵加速 //zty111 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll p; struct Mat{ ll a[3][3]; ll x,y; }e,A,B; Mat Mul(Mat A,Mat B){ Mat C;C.x=A.x;C.y=B.y; for(int i=1;i<=C.x;i++) for(int j=1;j<=C.y;j++) C.a[i][j]=0; for(int i=1;i<=C.x;i++) for(int j=1;j<=C.y;j++) for(int k=1;k<=A.y;k++) C.a[i][j]=(C.a[i][j]+A.a[i][k]*B.a[k][j]%p)%p; return C; } void qpow(ll b){ while(b){ if(b&1)B=Mul(B,A); A=Mul(A,A); b>>=1; } } int main(){ ll n,a1,a2,pp,q; scanf("%lld%lld%lld%lld%lld%lld",&pp,&q,&a1,&a2,&n,&p); if(n==1)printf("%lld\n",a1%p); else if(n==2)printf("%lld\n",a2%p); else{ e.a[1][1]=e.a[2][2]=1;e.a[1][0]=e.a[0][1]=0;e.x=e.y=2; A.a[1][1]=pp;A.a[2][1]=q;A.a[1][2]=1;A.a[2][2]=0;A.x=A.y=2; B.a[1][1]=a2;B.a[1][2]=a1;B.x=1;B.y=2; qpow(n-2); printf("%lld\n",B.a[1][1]); } return 0; }
[ "1225013181@qq.com" ]
1225013181@qq.com
87010266f2bd524998a02e996fda92e8a18b95f2
3c2500751f317dd4884ad6c781b5ad4b4d0e5f24
/pro.cpp
b68e360037f046d1e426b02cf58fe0a3d449d23e
[]
no_license
rohit16794/codes
d056c89d6e0ee5aff8f9cbec13a71704eb522858
76a4fff150f915a1061ab588f83d8d7cf0334567
refs/heads/master
2020-07-14T11:07:06.244786
2016-09-10T07:22:27
2016-09-10T07:22:27
67,853,991
0
0
null
null
null
null
UTF-8
C++
false
false
396
cpp
# include <bits/stdc++.h> using namespace std; int main() { int t; long long z,m,n,count,count1; cin>>t; while(t--) { count=0;count1=0; cin>>z>>m>>n; for(int i=1;i*i<=z;i++) { if(z%i==0) { if(i<=m&&(z/i)<=n)//i!=(z/i)) ++count; if((z/i)<=m&&i<=n)//&&i!=(z/i)) ++count; if(i==(z/i)) ++count1; } } cout<<count-count1<<"\n"; } return 0; }
[ "rohitretnakaran@gmail.com" ]
rohitretnakaran@gmail.com
655404064189c8f9b79b6cf5184c13958447b9e4
440f814f122cfec91152f7889f1f72e2865686ce
/src/game_server/server/extension/ai/reset_interval_seconds_action.h
7341ba8c8197b2b7bb0680e11153f9ede8b9cd67
[]
no_license
hackerlank/buzz-server
af329efc839634d19686be2fbeb700b6562493b9
f76de1d9718b31c95c0627fd728aba89c641eb1c
refs/heads/master
2020-06-12T11:56:06.469620
2015-12-05T08:03:25
2015-12-05T08:03:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,194
h
// // Summary: buzz source code. // // Author: Tony. // Email: tonyjobmails@gmail.com. // Last modify: 2013-12-05 17:20:13. // File name: reset_interval_seconds_action.h // // Description: // Define class ResetIntervalSecondsAction. // #ifndef __GAME__SERVER__AI__RESET__INTERVAL__SECONDS__ACTION__H #define __GAME__SERVER__AI__RESET__INTERVAL__SECONDS__ACTION__H #include <string> #include "core/base/types.h" #include "game_server/server/extension/ai/action_node.h" namespace game { namespace server { namespace ai { class ResetIntervalSecondsAction : public ActionNode { public: ResetIntervalSecondsAction(); virtual ~ResetIntervalSecondsAction(); virtual const std::string& GetTypeName() const { return ResetIntervalSecondsAction::kTypeName_; } static const std::string kTypeName_; private: virtual bool LoadConfigure(TiXmlElement *node); virtual void OnEnter(BlackBoard *black_board); virtual RunningStatus::type OnExecute(BlackBoard *black_board); virtual void OnQuit(BlackBoard *black_board); std::string var_; }; } // namespace ai } // namespace server } // namespace game #endif // __GAME__SERVER__AI__RESET__INTERVAL__SECONDS__ACTION__H
[ "251729465@qq.com" ]
251729465@qq.com
101bf4d42461c642d1b6bd8fd2ac28514bed3060
c8a6040af5a8a5dd8f89bbabde1d00519ef1ea62
/services/content/service_unittest.cc
0aa1c1db0c745e2dae37cf9ce6a4e69c08813a2e
[ "BSD-3-Clause" ]
permissive
imdark/chromium
a02c7f42444bd2f0619cfdeaf2c79a48baf9534f
088d11844c64d6477e49e31036a621a92853cc53
refs/heads/master
2023-01-16T10:34:55.745660
2019-04-02T03:21:05
2019-04-02T03:21:05
161,010,625
0
0
NOASSERTION
2018-12-09T06:15:31
2018-12-09T06:15:30
null
UTF-8
C++
false
false
5,828
cc
// Copyright 2018 The Chromium 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 "services/content/service.h" #include "base/bind.h" #include "base/callback.h" #include "base/macros.h" #include "base/run_loop.h" #include "base/test/bind_test_util.h" #include "base/test/scoped_task_environment.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/content/navigable_contents_delegate.h" #include "services/content/public/mojom/constants.mojom.h" #include "services/content/public/mojom/navigable_contents.mojom.h" #include "services/content/public/mojom/navigable_contents_factory.mojom.h" #include "services/content/service_delegate.h" #include "services/service_manager/public/cpp/test/test_connector_factory.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" namespace content { namespace { class TestNavigableContentsClient : public mojom::NavigableContentsClient { public: TestNavigableContentsClient() = default; ~TestNavigableContentsClient() override = default; private: // mojom::NavigableContentsClient: void DidFinishNavigation(const GURL& url, bool is_main_frame, bool is_error_page, const scoped_refptr<net::HttpResponseHeaders>& response_headers) override {} void DidStopLoading() override {} void DidAutoResizeView(const gfx::Size& new_size) override {} void DidSuppressNavigation(const GURL& url, WindowOpenDisposition disposition, bool from_user_gesture) override {} DISALLOW_COPY_AND_ASSIGN(TestNavigableContentsClient); }; class TestNavigableContentsDelegate : public NavigableContentsDelegate { public: TestNavigableContentsDelegate() = default; ~TestNavigableContentsDelegate() override = default; const GURL& last_navigated_url() const { return last_navigated_url_; } void set_navigation_callback(base::RepeatingClosure callback) { navigation_callback_ = std::move(callback); } // NavigableContentsDelegate: void Navigate(const GURL& url, mojom::NavigateParamsPtr params) override { last_navigated_url_ = url; if (navigation_callback_) navigation_callback_.Run(); } void GoBack( content::mojom::NavigableContents::GoBackCallback callback) override { std::move(callback).Run(false /* success */); } gfx::NativeView GetNativeView() override { return nullptr; } private: GURL last_navigated_url_; base::RepeatingClosure navigation_callback_; DISALLOW_COPY_AND_ASSIGN(TestNavigableContentsDelegate); }; class TestServiceDelegate : public ServiceDelegate { public: TestServiceDelegate() = default; ~TestServiceDelegate() override = default; void set_navigable_contents_delegate_created_callback( base::RepeatingCallback<void(TestNavigableContentsDelegate*)> callback) { navigable_contents_delegate_created_callback_ = std::move(callback); } // ServiceDelegate: void WillDestroyServiceInstance(Service* service) override {} std::unique_ptr<NavigableContentsDelegate> CreateNavigableContentsDelegate( const mojom::NavigableContentsParams& params, mojom::NavigableContentsClient* client) override { auto delegate = std::make_unique<TestNavigableContentsDelegate>(); if (navigable_contents_delegate_created_callback_) navigable_contents_delegate_created_callback_.Run(delegate.get()); return delegate; } private: base::RepeatingCallback<void(TestNavigableContentsDelegate*)> navigable_contents_delegate_created_callback_; DISALLOW_COPY_AND_ASSIGN(TestServiceDelegate); }; class ContentServiceTest : public testing::Test { public: ContentServiceTest() : service_(&delegate_, connector_factory_.RegisterInstance(mojom::kServiceName)) {} ~ContentServiceTest() override = default; protected: TestServiceDelegate& delegate() { return delegate_; } template <typename T> void BindInterface(mojo::InterfaceRequest<T> request) { connector_factory_.GetDefaultConnector()->BindInterface( content::mojom::kServiceName, std::move(request)); } private: base::test::ScopedTaskEnvironment task_environment_; service_manager::TestConnectorFactory connector_factory_; TestServiceDelegate delegate_; Service service_; DISALLOW_COPY_AND_ASSIGN(ContentServiceTest); }; TEST_F(ContentServiceTest, NavigableContentsCreation) { mojom::NavigableContentsFactoryPtr factory; BindInterface(mojo::MakeRequest(&factory)); base::RunLoop loop; TestNavigableContentsDelegate* navigable_contents_delegate = nullptr; delegate().set_navigable_contents_delegate_created_callback( base::BindLambdaForTesting([&](TestNavigableContentsDelegate* delegate) { EXPECT_FALSE(navigable_contents_delegate); navigable_contents_delegate = delegate; loop.Quit(); })); mojom::NavigableContentsPtr contents; TestNavigableContentsClient client_impl; mojom::NavigableContentsClientPtr client; mojo::Binding<mojom::NavigableContentsClient> client_binding( &client_impl, mojo::MakeRequest(&client)); factory->CreateContents(mojom::NavigableContentsParams::New(), mojo::MakeRequest(&contents), std::move(client)); loop.Run(); base::RunLoop navigation_loop; ASSERT_TRUE(navigable_contents_delegate); navigable_contents_delegate->set_navigation_callback( navigation_loop.QuitClosure()); const GURL kTestUrl("https://example.com/"); contents->Navigate(kTestUrl, mojom::NavigateParams::New()); navigation_loop.Run(); EXPECT_EQ(kTestUrl, navigable_contents_delegate->last_navigated_url()); } } // namespace } // namespace content
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
9bb9fdf16d0e8c59a42c5809e02413883a03c2f7
bb6ebff7a7f6140903d37905c350954ff6599091
/chrome/browser/chromeos/drive/file_system/operation_test_base.cc
6640bca926c76e456c65b64bb8cb4527f001e2ab
[ "BSD-3-Clause" ]
permissive
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f
ccadf4e63dd34be157281f53fe213d09a8c66d2c
refs/heads/master
2022-12-23T18:07:04.568931
2016-04-11T16:03:36
2016-04-11T16:03:36
53,677,925
0
1
BSD-3-Clause
2022-12-09T23:46:46
2016-03-11T15:49:07
C++
UTF-8
C++
false
false
6,771
cc
// Copyright 2013 The Chromium 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 "chrome/browser/chromeos/drive/file_system/operation_test_base.h" #include "base/prefs/testing_pref_service.h" #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/chromeos/drive/change_list_loader.h" #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" #include "chrome/browser/chromeos/drive/file_cache.h" #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" #include "chrome/browser/chromeos/drive/job_scheduler.h" #include "chrome/browser/chromeos/drive/resource_metadata.h" #include "chrome/browser/chromeos/drive/test_util.h" #include "chrome/browser/drive/event_logger.h" #include "chrome/browser/drive/fake_drive_service.h" #include "chrome/browser/drive/test_util.h" #include "content/public/browser/browser_thread.h" #include "google_apis/drive/test_util.h" namespace drive { namespace file_system { OperationTestBase::LoggingObserver::LoggingObserver() { } OperationTestBase::LoggingObserver::~LoggingObserver() { } void OperationTestBase::LoggingObserver::OnDirectoryChangedByOperation( const base::FilePath& path) { changed_paths_.insert(path); } void OperationTestBase::LoggingObserver::OnEntryUpdatedByOperation( const std::string& local_id) { updated_local_ids_.insert(local_id); } void OperationTestBase::LoggingObserver::OnDriveSyncError( DriveSyncErrorType type, const std::string& local_id) { drive_sync_errors_.push_back(type); } OperationTestBase::OperationTestBase() { } OperationTestBase::OperationTestBase(int test_thread_bundle_options) : thread_bundle_(test_thread_bundle_options) { } OperationTestBase::~OperationTestBase() { } void OperationTestBase::SetUp() { scoped_refptr<base::SequencedWorkerPool> pool = content::BrowserThread::GetBlockingPool(); blocking_task_runner_ = pool->GetSequencedTaskRunner(pool->GetSequenceToken()); pref_service_.reset(new TestingPrefServiceSimple); test_util::RegisterDrivePrefs(pref_service_->registry()); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); logger_.reset(new EventLogger); fake_drive_service_.reset(new FakeDriveService); ASSERT_TRUE(test_util::SetUpTestEntries(fake_drive_service_.get())); scheduler_.reset(new JobScheduler( pref_service_.get(), logger_.get(), fake_drive_service_.get(), blocking_task_runner_.get())); metadata_storage_.reset(new internal::ResourceMetadataStorage( temp_dir_.path(), blocking_task_runner_.get())); bool success = false; base::PostTaskAndReplyWithResult( blocking_task_runner_.get(), FROM_HERE, base::Bind(&internal::ResourceMetadataStorage::Initialize, base::Unretained(metadata_storage_.get())), google_apis::test_util::CreateCopyResultCallback(&success)); test_util::RunBlockingPoolTask(); ASSERT_TRUE(success); fake_free_disk_space_getter_.reset(new FakeFreeDiskSpaceGetter); cache_.reset(new internal::FileCache(metadata_storage_.get(), temp_dir_.path(), blocking_task_runner_.get(), fake_free_disk_space_getter_.get())); success = false; base::PostTaskAndReplyWithResult( blocking_task_runner_.get(), FROM_HERE, base::Bind(&internal::FileCache::Initialize, base::Unretained(cache_.get())), google_apis::test_util::CreateCopyResultCallback(&success)); test_util::RunBlockingPoolTask(); ASSERT_TRUE(success); metadata_.reset(new internal::ResourceMetadata(metadata_storage_.get(), cache_.get(), blocking_task_runner_)); FileError error = FILE_ERROR_FAILED; base::PostTaskAndReplyWithResult( blocking_task_runner_.get(), FROM_HERE, base::Bind(&internal::ResourceMetadata::Initialize, base::Unretained(metadata_.get())), google_apis::test_util::CreateCopyResultCallback(&error)); test_util::RunBlockingPoolTask(); ASSERT_EQ(FILE_ERROR_OK, error); // Makes sure the FakeDriveService's content is loaded to the metadata_. about_resource_loader_.reset(new internal::AboutResourceLoader( scheduler_.get())); loader_controller_.reset(new internal::LoaderController); change_list_loader_.reset(new internal::ChangeListLoader( logger_.get(), blocking_task_runner_.get(), metadata_.get(), scheduler_.get(), about_resource_loader_.get(), loader_controller_.get())); change_list_loader_->LoadIfNeeded( google_apis::test_util::CreateCopyResultCallback(&error)); test_util::RunBlockingPoolTask(); ASSERT_EQ(FILE_ERROR_OK, error); } FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path, ResourceEntry* entry) { FileError error = FILE_ERROR_FAILED; base::PostTaskAndReplyWithResult( blocking_task_runner(), FROM_HERE, base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath, base::Unretained(metadata()), path, entry), base::Bind(google_apis::test_util::CreateCopyResultCallback(&error))); test_util::RunBlockingPoolTask(); return error; } FileError OperationTestBase::GetLocalResourceEntryById( const std::string& local_id, ResourceEntry* entry) { FileError error = FILE_ERROR_FAILED; base::PostTaskAndReplyWithResult( blocking_task_runner(), FROM_HERE, base::Bind(&internal::ResourceMetadata::GetResourceEntryById, base::Unretained(metadata()), local_id, entry), base::Bind(google_apis::test_util::CreateCopyResultCallback(&error))); test_util::RunBlockingPoolTask(); return error; } std::string OperationTestBase::GetLocalId(const base::FilePath& path) { std::string local_id; FileError error = FILE_ERROR_FAILED; base::PostTaskAndReplyWithResult( blocking_task_runner(), FROM_HERE, base::Bind(&internal::ResourceMetadata::GetIdByPath, base::Unretained(metadata()), path, &local_id), base::Bind(google_apis::test_util::CreateCopyResultCallback(&error))); test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error) << path.value(); return local_id; } FileError OperationTestBase::CheckForUpdates() { FileError error = FILE_ERROR_FAILED; change_list_loader_->CheckForUpdates( google_apis::test_util::CreateCopyResultCallback(&error)); test_util::RunBlockingPoolTask(); return error; } } // namespace file_system } // namespace drive
[ "mrobbeloth@pdiarm.com" ]
mrobbeloth@pdiarm.com
baee1ba3f6a7443c9a09177519d0f9a03b4fa266
b53b73f8ded166c631f9699749d6d2baf2756d1e
/se2007/game/client/tf/tf_hud_teamgoal.cpp
9b86b2a4c6bef4fe169d07a6b43d99279a5b203a
[]
no_license
Creeper4414/SourceEngine2007
8bec052be1eef2d17dff0aeda9fe5ac82c0f1871
ebc9345561f61cabc9b9d15870c70d4c1bea97f2
refs/heads/master
2020-12-30T18:58:32.782253
2016-06-25T21:22:41
2016-06-25T21:22:41
61,935,128
4
0
null
2016-06-25T08:57:07
2016-06-25T08:57:07
null
WINDOWS-1252
C++
false
false
5,924
cpp
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ // // Purpose: // // $NoKeywords: $ //============================================================================= #include "cbase.h" #include "hud.h" #include "hudelement.h" #include "c_tf_player.h" #include "iclientmode.h" #include "ienginevgui.h" #include <vgui/ILocalize.h> #include <vgui/ISurface.h> #include <vgui/IVGUI.h> #include <vgui_controls/Label.h> #include <vgui_controls/EditablePanel.h> #include "tf_imagepanel.h" #include "tf_gamerules.h" #include "c_tf_team.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" using namespace vgui; //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- class CHudTeamGoal : public CHudElement, public EditablePanel { DECLARE_CLASS_SIMPLE( CHudTeamGoal, EditablePanel ); public: CHudTeamGoal( const char *pElementName ); virtual void LevelInit( void ); virtual void ApplySchemeSettings( IScheme *scheme ); virtual bool ShouldDraw( void ); void SetupGoalPanel( const char *pszGoal ); private: Label *m_pSwitchLabel; Label *m_pGoalLabel; CTFImagePanel *m_pGoalImage; float m_flHideAt; int m_iGoalLabelOrgY; }; DECLARE_HUDELEMENT( CHudTeamGoal ); //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- CHudTeamGoal::CHudTeamGoal( const char *pElementName ) : CHudElement( pElementName ), BaseClass( NULL, "HudTeamGoal" ) { Panel *pParent = g_pClientMode->GetViewport(); SetParent( pParent ); SetHiddenBits( HIDEHUD_MISCSTATUS ); m_flHideAt = 0; m_iGoalLabelOrgY = 0; RegisterForRenderGroup( "commentary" ); } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudTeamGoal::LevelInit( void ) { m_flHideAt = 0; } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudTeamGoal::ApplySchemeSettings( IScheme *pScheme ) { // load control settings... LoadControlSettings( "resource/UI/HudTeamGoal.res" ); BaseClass::ApplySchemeSettings( pScheme ); m_pSwitchLabel = dynamic_cast<Label *>( FindChildByName("SwitchLabel") ); m_pGoalLabel = dynamic_cast<Label *>( FindChildByName("GoalLabel") ); m_pGoalImage = dynamic_cast<CTFImagePanel *>( FindChildByName("GoalImage") ); if ( m_pGoalLabel ) { int iIgnored; m_pGoalLabel->GetPos( iIgnored, m_iGoalLabelOrgY ); } } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- bool CHudTeamGoal::ShouldDraw( void ) { bool bCouldSee = ( TFGameRules() && TFGameRules()->ShouldShowTeamGoal() ); if ( m_flHideAt && m_flHideAt < gpGlobals->curtime ) { if ( !bCouldSee ) { m_flHideAt = 0; } return false; } if ( bCouldSee ) { C_TFPlayer *pPlayer = C_TFPlayer::GetLocalTFPlayer(); if ( pPlayer && pPlayer->IsAlive() && pPlayer->GetTeamNumber() >= FIRST_GAME_TEAM ) { const char *pszGoal = TFGameRules()->GetTeamGoalString( pPlayer->GetTeamNumber() ); if ( pszGoal && pszGoal[0] && CHudElement::ShouldDraw() ) { if ( !IsVisible() ) { // Once we've played a map 15 times, don't show team goals anymore. if ( UTIL_GetMapKeyCount( "viewed" ) > 15 ) { m_flHideAt = -1; // To prevent it rechecking until next level load return false; } SetupGoalPanel( pszGoal ); // Show for 15 seconds m_flHideAt = gpGlobals->curtime + 15.0; } // Don't appear if the team switch alert is there CHudElement *pHudSwitch = gHUD.FindElement( "CHudTeamSwitch" ); if ( pHudSwitch && pHudSwitch->ShouldDraw() ) return false; return true; } } } return false; } const char *pszTeamRoleIcons[NUM_TEAM_ROLES] = { "../hud/hud_icon_capture", // TEAM_ROLE_NONE = 0, "../hud/hud_icon_defend", // TEAM_ROLE_DEFENDERS, "../hud/hud_icon_attack", // TEAM_ROLE_ATTACKERS, }; const char *pszTeamRoleSwitch[NUM_TEAM_ROLES] = { " ", // TEAM_ROLE_NONE = 0, "#TF_teamswitch_defenders", // TEAM_ROLE_DEFENDERS, "#TF_teamswitch_attackers", // TEAM_ROLE_ATTACKERS, }; //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudTeamGoal::SetupGoalPanel( const char *pszGoal ) { if ( m_pGoalLabel ) { wchar_t *pszLocalizedGoal = g_pVGuiLocalize->Find( pszGoal ); if ( pszLocalizedGoal ) { m_pGoalLabel->SetText( pszLocalizedGoal ); } else { m_pGoalLabel->SetText( pszGoal ); } } if ( m_pSwitchLabel ) { m_pSwitchLabel->SetVisible( false ); } C_TFTeam *pLocalTeam = GetGlobalTFTeam( GetLocalPlayerTeam() ); if ( pLocalTeam ) { int iRole = pLocalTeam->GetRole(); if ( iRole >= 0 && iRole < NUM_TEAM_ROLES ) { m_pGoalImage->SetImage( pszTeamRoleIcons[iRole] ); if ( m_pSwitchLabel ) { if ( TFGameRules() && TFGameRules()->SwitchedTeamsThisRound() ) { m_pSwitchLabel->SetText( g_pVGuiLocalize->Find( pszTeamRoleSwitch[iRole] ) ); m_pSwitchLabel->SetVisible( true ); } } } } if ( m_pGoalLabel && m_pSwitchLabel ) { // If the switch label is invisible, move the goal label up to where it is. int iX, iY, iSwitchY, iIgnored; m_pGoalLabel->GetPos( iX, iY ); m_pSwitchLabel->GetPos( iIgnored, iSwitchY ); if ( m_pSwitchLabel->IsVisible() ) { m_pGoalLabel->SetPos( iX, m_iGoalLabelOrgY ); } else { m_pGoalLabel->SetPos( iX, iSwitchY ); } } }
[ "lestad@bk.ru" ]
lestad@bk.ru
564601a866d2eca1012f2a8fa015984ca362b223
0ba8576e02f77c413dec6dccdfd85c1b76b356ba
/이름없음2.cpp
7b04801c82e114f03be121b801d20e4415147afa
[]
no_license
ltnscp9028/C_plus_plus
2fb99fac7595c8cad34aecced4695849f4bfa50d
92d6d89e3250735c9ee7fc49ee0f1726bb9b2e2f
refs/heads/master
2022-04-30T08:22:49.036614
2022-04-19T20:28:21
2022-04-19T20:28:21
205,290,886
0
0
null
null
null
null
UTF-8
C++
false
false
123
cpp
long long p; long long q;long long w; main() { scanf("%lld %lld %lld", &p, &q, &w); printf("%lld %lld", w/p, (w%p)/q); }
[ "ltnscp9028@gmail.com" ]
ltnscp9028@gmail.com
1f1a16343449e2780816ea30f04ba017053dd6f9
8f8e5f27d385961a24cd7e90f9d64b6b1f3e37fe
/printout.h
6560e9e1e8838cd008a1bf4eb6668468a90733d8
[ "MIT" ]
permissive
thatformat/stairspeedtest-reborn
4c117ed5b23669bd78d5571e203c533c1b36ccf1
aa401c81b2aa771f729e831ea44fa6b4c7a3ab85
refs/heads/master
2020-07-02T23:48:29.475604
2019-08-01T13:46:44
2019-08-01T13:46:44
201,712,046
1
0
null
2019-08-11T03:29:39
2019-08-11T03:29:39
null
UTF-8
C++
false
false
1,692
h
#ifndef PRINTOUT_H_INCLUDED #define PRINTOUT_H_INCLUDED #include <bits/stdc++.h> #include <unistd.h> #include "misc.h" #define SPEEDTEST_ERROR_NONE 0 #define SPEEDTEST_ERROR_UNDEFINED 100 #define SPEEDTEST_ERROR_WSAERR 99 #define SPEEDTEST_ERROR_SOCKETERR 98 #define SPEEDTEST_ERROR_NORECOGLINK 97 #define SPEEDTEST_ERROR_NOCONNECTION 96 #define SPEEDTEST_ERROR_INVALIDSUB 95 #define SPEEDTEST_ERROR_NONODES 94 #define SPEEDTEST_ERROR_NORESOLVE 93 #define SPEEDTEST_ERROR_RETEST 92 #define SPEEDTEST_ERROR_NOSPEED 91 #define SPEEDTEST_ERROR_UNRECOGFILE 90 #define SPEEDTEST_MESSAGE_WELCOME 0 #define SPEEDTEST_MESSAGE_FOUNDVMESS 1 #define SPEEDTEST_MESSAGE_FOUNDSS 2 #define SPEEDTEST_MESSAGE_FOUNDSSR 3 #define SPEEDTEST_MESSAGE_FOUNDSUB 4 #define SPEEDTEST_MESSAGE_GOTSERVER 5 #define SPEEDTEST_MESSAGE_STARTPING 6 #define SPEEDTEST_MESSAGE_GOTPING 7 #define SPEEDTEST_MESSAGE_STARTSPEED 8 #define SPEEDTEST_MESSAGE_GOTSPEED 9 #define SPEEDTEST_MESSAGE_GOTRESULT 10 #define SPEEDTEST_MESSAGE_TRAFFIC 11 #define SPEEDTEST_MESSAGE_PICSAVING 12 #define SPEEDTEST_MESSAGE_PICSAVED 13 #define SPEEDTEST_MESSAGE_GROUP 14 #define SPEEDTEST_MESSAGE_FETCHSUB 15 #define SPEEDTEST_MESSAGE_BEGIN 16 #define SPEEDTEST_MESSAGE_FOUNDLOCAL 17 #define SPEEDTEST_MESSAGE_PARSING 18 #define SPEEDTEST_MESSAGE_FOUNDUPD 19 #define SPEEDTEST_MESSAGE_PICDATA 20 #define SPEEDTEST_MESSAGE_EOF 49 using namespace std; void printmsg(int index, nodeInfo *node, bool rpcmode); void printmsg_with_dict(int index, bool rpcmode, vector<string> dict, vector<string> trans); int write2file(string path, string content, bool overwrite); #endif // PRINTOUT_H_INCLUDED
[ "49061470+tindy2013@users.noreply.github.com" ]
49061470+tindy2013@users.noreply.github.com
0b519abb73870d50cde06f8d66f850a42967a960
4503b4ec29e9a30d26c433bac376f2bddaefd9e5
/XtreamToolkit/v16.4.0/Source/Calendar/XTPCalendarThemePrevNextEventButtons.h
6e6c3bd393af73a40d72799375a9be86e295d1e1
[]
no_license
SwunZH/ecocommlibs
0a872e0bbecbb843a0584fb787cf0c5e8a2a270b
4cff09ff1e479f5f519f207262a61ee85f543b3a
refs/heads/master
2021-01-25T12:02:39.067444
2018-02-23T07:04:43
2018-02-23T07:04:43
123,447,012
1
0
null
2018-03-01T14:37:53
2018-03-01T14:37:53
null
UTF-8
C++
false
false
3,755
h
// XTPCalendarThemePrevNextEventButtons.h : header file // // This file is a part of the XTREME CALENDAR MFC class library. // (c)1998-2013 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN // CONSENT OF CODEJOCK SOFTWARE. // // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A // SINGLE COMPUTER. // // CONTACT INFORMATION: // support@codejock.com // http://www.codejock.com // ///////////////////////////////////////////////////////////////////////////// //{{AFX_CODEJOCK_PRIVATE #if !defined(__XTPCALENDARTHEMEOFFICE2007PREVNEXTEVENTBUTTONS_H__) #define __XTPCALENDARTHEMEOFFICE2007PREVNEXTEVENTBUTTONS_H__ //}}AFX_CODEJOCK_PRIVATE DECLARE_THEMEPART(CTOPrevNextEventButtons, CXTPCalendarThemePart) CTOPrevNextEventButtons(); virtual ~CTOPrevNextEventButtons(); DECLARE_THEMEPART_MEMBER_(0, CTOPrevNextEventButton, PrevEventButton, CXTPCalendarThemePart) DECLARE_THEMEPART_MEMBER_(1, CTOPrevNextEventButton, NextEventButton, CXTPCalendarThemePart) virtual void RefreshMetrics(BOOL bRefreshChildren = TRUE); virtual void AdjustLayout(CXTPCalendarView* pObject, CDC* pDC, const CRect& rcRect); virtual void Draw(CXTPCalendarView* pObject, CDC* pDC); virtual int HitTest(const CPoint* pPoint = NULL) const; // return 0, xtpCalendarHitTestPrevEventButton or xtpCalendarHitTestNextEventButton virtual BOOL IsPrevNextButtonsVisible(); virtual BOOL _IsSomeEventVisible(); COleDateTime GetVisibleDay(BOOL bFirst); virtual BOOL GetPrevEventDay(COleDateTime* pdtDay = NULL); virtual BOOL GetNextEventDay(COleDateTime* pdtDay = NULL); virtual void OnStatusChanged(); virtual void OnMouseMove(CCmdTarget* pObject, UINT nFlags, CPoint point); virtual BOOL OnLButtonDown(CCmdTarget* pObject, UINT nFlags, CPoint point); // Settings CXTPCalendarThemeBOOLValue m_bHide; CXTPCalendarThemeIntValue m_nIdleStepTime_ms; CXTPCalendarThemeIntValue m_nRefreshDaysPerIdleStep; CXTPCalendarThemeBOOLValue m_bUseActiveViewResources; virtual void SetCacheSize(int nDays); protected: CXTPCalendarResources* _GetActiveResources(); void _RequestToFindEvents(); void _StopRequests(); BOOL _RefreshDay(long ndtDay, BOOL& rbRefreshed, BOOL bRefreshPermanently); //void _ResetData(); virtual BOOL OnTimer(UINT_PTR uTimerID); virtual void OnDetachCalendar(); UINT_PTR m_nRefreshTimerID; long m_ndtRefreshDatePrev; long m_ndtRefreshDateNext; BOOL m_bScanPrev; BOOL m_bScanNext; long m_ndtMinScanDay; long m_ndtMaxScanDay; CRect m_rcRect; class CDaysMap : protected CArray<char, char> { protected: long m_nDaysOffset; int m_nCacheSizeMax_days; public: CDaysMap(); long GetMinDay(); long GetMaxDay(); int GetDayState(long nDay); void SetDayState(long nDay, int nState); // states: (0)-unknown, (-1)-has no-events, (1)-has events. void SetDaysStateSafe(long nDayStart, long nDayEnd, int nState); // states: (0)-unknown, (-1)-has no-events, (1)-has events. void AdjustMiddleDay(long nDay); void SetDataSize(int nDays); int GetDataSize(); protected: void _GrowArrayIfNeed(long nDay); }; CDaysMap m_mapDaysState; protected: CXTPNotifySink* m_pSink; virtual void OnEvent_Calendar(XTP_NOTIFY_CODE Event, WPARAM wParam, LPARAM lParam); }; //{{AFX_CODEJOCK_PRIVATE #endif // __XTPCALENDARTHEMEOFFICE2007PREVNEXTEVENTBUTTONS_H__ //}}AFX_CODEJOCK_PRIVATE
[ "kwkang@3e9e098e-e079-49b3-9d2b-ee27db7392fb" ]
kwkang@3e9e098e-e079-49b3-9d2b-ee27db7392fb
845cda9ca489d6603e18c31f9ce76ec581f96c3d
dedf3082c0026d52200361a34262c752c05a193b
/Hackerrank-Solutions/Hackerrank-30-days-of-code/Day 19: Interfaces/test.cpp
d832aaa6c1449479ccbee0a2f4b0a81cf265b7f7
[ "MIT" ]
permissive
HetDaftary/Competitive-Coding-Solutions
0d31568ab5be7292d28883704f15e62a2496f637
a683fa11895410c6eef07b1a68054f3e90aa596b
refs/heads/main
2023-04-02T11:58:00.731977
2021-03-31T14:23:39
2021-03-31T14:23:39
351,979,119
0
0
null
null
null
null
UTF-8
C++
false
false
720
cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; class AdvancedArithmetic{ public: virtual int divisorSum(int n)=0; }; class Calculator : public AdvancedArithmetic { public: int divisorSum(int n) { int sum = 0; if (n > 0) { for (int i = 1; i <= n; i++) if ((n % i) == 0) sum += i; return sum; } return 0; } }; int main(){ int n; cin >> n; AdvancedArithmetic *myCalculator = new Calculator(); int sum = myCalculator->divisorSum(n); cout << "I implemented: AdvancedArithmetic\n" << sum; return 0; }
[ "hetdaftary@gmail.com" ]
hetdaftary@gmail.com
037460e54ebc68bc0f9023633b4a25ae202675c9
7cf841efb8242554d30f890881ff1fc3cbf3ffde
/inc/Graphics/OGLGraphicsModule.h
fc9938460560df2deeb8a09198e2f08830cf49a9
[]
no_license
IreNox/tiki2
232f1a8808b50bef77400f94c55bf3f5b7a82150
3bdd69a5c3907a963c2bd6e22dce0c1256349dd1
refs/heads/master
2020-05-04T14:56:54.331164
2020-04-13T16:09:47
2020-04-13T16:09:47
22,169,497
1
0
null
null
null
null
UTF-8
C++
false
false
3,325
h
#pragma once #include "Core/IGraphics.h" #include "Core/CBMatrices.h" #include "Graphics/CBLights.h" #include "Graphics/CBObjectData.h" #include "Graphics/Quad.h" #include "Graphics/RenderTarget.h" #include "Graphics/ConstantBuffer.h" #include "Graphics/DllMain.h" namespace TikiEngine { namespace Modules { using namespace TikiEngine::Graphics; class GraphicsModule : public IGraphics { public: GraphicsModule(Engine* engine); ~GraphicsModule(); bool Initialize(EngineDescription& desc); void Dispose(); void Begin(DrawArgs& args); void End(); #if _DEBUG void DrawLine(const Vector3& start, const Vector3& end, const Color& color); void DrawLine(List<Vector3>* points, const Color& color, bool lastToFirst = false); #endif void* GetDevice() { return deviceContext; } void* GetDeviceContext() { return renderContext; } ViewPort* GetViewPort() { return &viewPort; } IRenderTarget* GetDepthTarget() { return rtDepth; } IRenderTarget* GetLightTarget() { return rtLight; } IRenderTarget* GetNormalTarget() { return rtNormal; } IRenderTarget* GetScreenTarget() { return rtScreen[rtScreenIndex]; } IRenderTarget* GetUnusedScreenTarget() { return rtScreen[!rtScreenIndex]; } IRenderTarget* GetInterfaceTarget() { return rtInterface; } ConstantBuffer<CBLights>* GetCBufferLight(); ConstantBuffer<CBMatrices>* GetCBufferCamera(); ConstantBuffer<CBObjectData>* GetCBufferObject(); void AddPostProcess(PostProcess* postProcess); void RemovePostProcess(PostProcess* postProcess); void AddScreenSizeRenderTarget(RenderTarget* target); void RemoveScreenSizeRenderTarget(RenderTarget* target); void AddDefaultProcessTarget(cstring varName, IRenderTarget* target); void SwitchScreenTarget(IRenderTarget** inputTarget, IRenderTarget** outputTarget); void SetRenderTarget(UInt32 slot, UInt32 target); void SetFirstAndOnlyRenderTargets(UInt32 target); void SetCulling(bool value); void SetStateAlphaBlend(BlendStateModes value); void SetStateDepthEnabled(bool value); IConstantBuffer* CreateConstantBuffer(UInt32 size); void Reset(); void MakeScreenshot(wcstring fileName); private: DrawArgs& currentArgs; HWND hWnd; HDC deviceContext; HGLRC renderContext; Color clearColor; ViewPort viewPort; ConstantBuffer<CBLights>* cbufferLights; ConstantBuffer<CBMatrices>* cbufferCamera; ConstantBuffer<CBObjectData>* cbufferObject; RenderTarget* rtBackBuffer; RenderTarget* rtLight; RenderTarget* rtDepth; RenderTarget* rtNormal; RenderTarget* rtInterface; RenderTarget* rtScreen[2]; bool rtScreenIndex; UInt32 frameBuffer; UInt32 depthBuffer; List<UInt32> renderTargets; List<RenderTarget*> screenSizeRenderTargets; PostProcess* defaultPostProcess; PostProcessPass* defaultPostProcessPass; List<PostProcess*> postProcesses; Dictionary<PostProcessPass*, Quad*> postProcessPassQuads; bool initOpenGL(); bool initFrameBuffer(); bool initEngine(EngineDescription& desc); void disposeEngine(); void drawPostProcess(PostProcess* postProcess); void setLightChanged(const DrawArgs& args); }; } }
[ "adm_tbo@hxx4.tfs.local" ]
adm_tbo@hxx4.tfs.local
6037ecb024ad66877112eb8b860d2caa9e147e38
c8fff9e2eddc70cf1c5963413be7626070554404
/serialtest/test.c++
4270de814566e972ea0b2ad089ad889fef09270d
[ "Apache-2.0" ]
permissive
marcmerlin/NeoMatrix-FastLED-IR
42310711d560047a50792cbfa14a502da903d27b
d9ac2440309ea50ee20ab5e672761ac9f2f8515b
refs/heads/master
2023-05-27T15:48:44.446435
2023-05-17T19:26:36
2023-05-17T19:26:36
129,571,916
47
10
Apache-2.0
2020-08-10T18:03:10
2018-04-15T02:58:04
C
UTF-8
C++
false
false
3,478
#include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <termios.h> #include <unistd.h> #include <sys/stat.h> int set_interface_attribs(int ttyfd, int speed) { struct termios tty; if (tcgetattr(ttyfd, &tty) < 0) { printf("Error from tcgetattr: %s\n", strerror(errno)); return -1; } cfsetospeed(&tty, (speed_t)speed); cfsetispeed(&tty, (speed_t)speed); tty.c_cflag |= (CLOCAL | CREAD); /* ignore modem controls */ tty.c_cflag &= ~CSIZE; tty.c_cflag |= CS8; /* 8-bit characters */ tty.c_cflag &= ~PARENB; /* no parity bit */ tty.c_cflag &= ~CSTOPB; /* only need 1 stop bit */ tty.c_cflag &= ~CRTSCTS; /* no hardware flowcontrol */ /* setup for non-canonical mode */ tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); tty.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); tty.c_oflag &= ~OPOST; /* fetch bytes as they become available */ // https://blog.mbedded.ninja/programming/operating-systems/linux/linux-serial-ports-using-c-cpp/ // Non blocking tty.c_cc[VMIN] = 0; tty.c_cc[VTIME] = 0; if (tcsetattr(ttyfd, TCSANOW, &tty) != 0) { printf("Error from tcsetattr: %s\n", strerror(errno)); return -1; } return 0; } int openttyUSB(const char **serialdev) { // static because the name is sent back to the caller static const char *dev[] = { "/dev/ttyUSB0", "/dev/ttyUSB1", "/dev/ttyUSB2" }; int devidx = 0; int ttyfd; while (devidx<3 && (ttyfd = open((*serialdev = dev[devidx]), O_RDWR | O_NOCTTY | O_SYNC)) < 0 && ++devidx) { printf("Error opening %s: %s\n", *serialdev, strerror(errno)); } /*baudrate 115200, 8 bits, no parity, 1 stop bit */ if (ttyfd >= 0) { set_interface_attribs(ttyfd, B115200); printf("Opened %s\n", *serialdev); } return ttyfd; } int send_serial(int ttyfd, const char *xstr) { int wlen; int xlen = strlen(xstr); wlen = write(ttyfd, xstr, xlen); // tcdrain(ttyfd); if (wlen != xlen) { printf("Error from write: %d, %d\n", wlen, errno); return -1; } printf(">>>>>>>>>>>>>>>>>>> n\n"); return 0; } int main() { static int ttyfd = -1; static const char *serialdev = NULL; static int counter = 0; do { static char buf[1024]; static char *ptr = buf; char s; int rdlen; struct stat stbuf; if (! (counter++ % 1000000)) send_serial(ttyfd, "n\n"); if (ttyfd > -1 && stat(serialdev, &stbuf)) { printf("ttyfd closed %d, (%s)\n", ttyfd, serialdev); close(ttyfd); ttyfd = -1; serialdev = NULL; } //printf("Serial0 %d, %s\n", ttyfd, serialdev); if (serialdev && (ttyfd < 0)) printf("Serial closed, re-opening\n"); if (ttyfd < 0) ttyfd = openttyUSB(&serialdev); //printf("Serial %d, %s\n", ttyfd, serialdev); if (ttyfd < 0) continue; if ( (rdlen = read(ttyfd, &s, 1)) > 0) { ptr[0] = s; ptr[1] = 0; ptr++; if (s == '\n' ) { printf("ESP> %s", buf); ptr = buf; char numbuf[4]; if (! strncmp(buf, "|D:", 3)) { int num; strncpy(numbuf, buf+3, 3); numbuf[3] = 0; num = atoi(numbuf); printf("Got demo %d\n", num); } } } if (rdlen < 0) { printf("Error from read: %d: %s\n", rdlen, strerror(errno)); } else { //printf("read done\n"); } } while (1); }
[ "marc_soft@merlins.org" ]
marc_soft@merlins.org
727c9464b90d7113a8868ba53a8b685731e74e09
579a9dfc5fb7abeb72d2cbdbb243f20d9c0efe74
/src/test/ImportTextTest.cpp
f153878c543ec6537bfae2851714df7b9f8d8c3c
[ "Artistic-2.0", "MIT" ]
permissive
alexis-m/pwsafe
fb35d0a5fb3b84a34caff5f3a91128638ed4b168
718b0a0aa8f2c5c713c8f69d43bd088b96776bc5
refs/heads/master
2023-05-25T17:35:01.219064
2023-05-10T17:57:59
2023-05-10T17:57:59
208,708,792
0
0
NOASSERTION
2019-09-16T04:21:16
2019-09-16T04:21:16
null
UTF-8
C++
false
false
5,207
cpp
/* * Copyright (c) 2003-2023 Rony Shapiro <ronys@pwsafe.org>. * All rights reserved. Use of the code is allowed under the * Artistic License 2.0 terms, as specified in the LICENSE file * distributed with this code, or available from * http://www.opensource.org/licenses/artistic-license-2.0.php */ // ImportTextTest.cpp: Unit test for importing csv/text #ifdef WIN32 #include "../ui/Windows/stdafx.h" #endif #include "os/file.h" #include "os/dir.h" #include "core/PWScore.h" #include "gtest/gtest.h" // A fixture for factoring common code across tests class ImportTextTest : public ::testing::Test { protected: ImportTextTest(); // to init members PWScore core; const stringT testFile1 = L"import-text-unit-test1.txt"; const stringT testFile2 = L"import-text-unit-test2.csv"; const stringT testFile3 = L"import-text-unit-test3.csv"; const stringT testFile4 = L"import-text-unit-test4.csv"; const stringT testFile5 = L"import-text-unit-test5.csv"; void SetUp(); void TearDown(); int numImported, numSkipped, numPWHErrors, numRenamed, numWarnings, numNoPolicy; void importText(const stringT& fname, const TCHAR fieldSeparator, int expectedImports); void testImport(); // for testFiles 1, 2, and 3 }; ImportTextTest::ImportTextTest() : numImported(0), numSkipped(0), numPWHErrors(0), numRenamed(0), numWarnings(0), numNoPolicy(0) { } void ImportTextTest::SetUp() { ASSERT_TRUE(pws_os::chdir(L"data")); ASSERT_TRUE(pws_os::FileExists(testFile1)); ASSERT_TRUE(pws_os::FileExists(testFile2)); ASSERT_TRUE(pws_os::FileExists(testFile3)); ASSERT_TRUE(pws_os::FileExists(testFile4)); ASSERT_TRUE(pws_os::FileExists(testFile5)); } void ImportTextTest::TearDown() { ASSERT_TRUE(pws_os::chdir(L"..")); } void ImportTextTest::importText(const stringT& fname, const TCHAR fieldSeparator, int expectedImports) { stringT errorStr; CReport rpt; Command* cmd(nullptr); numImported = numSkipped = numPWHErrors = numRenamed = numWarnings = numNoPolicy = 0; core.ReInit(); int status = core.ImportPlaintextFile(L"", fname.c_str(), fieldSeparator, L'\xbb', false, errorStr, numImported, numSkipped, numPWHErrors, numRenamed, numNoPolicy, rpt, cmd); ASSERT_EQ(status, PWScore::SUCCESS); EXPECT_EQ(numImported, expectedImports); EXPECT_EQ(numSkipped, 0); EXPECT_EQ(numPWHErrors, 0); EXPECT_EQ(numRenamed, 0); EXPECT_EQ(numNoPolicy, 0); EXPECT_TRUE(errorStr.empty()); EXPECT_NE(cmd, nullptr); status = core.Execute(cmd); EXPECT_EQ(status, 0); //std::cout << rpt.GetString().c_str(); } void ImportTextTest::testImport() { // now test that we've read the data correctly auto p1 = core.Find(L"a.b.c", L"d-level-title", L"d-user"); EXPECT_NE(p1, core.GetEntryEndIter()); auto item1 = core.GetEntry(p1); EXPECT_EQ(item1.GetPassword(), L"d-password"); EXPECT_EQ(item1.GetNotes(), L"line 1 of 3\r\nline 2 of 3\r\nline 3 of 3"); auto p2 = core.Find(L"", L"toplevel-title1", L"toplevel user"); EXPECT_NE(p2, core.GetEntryEndIter()); auto item2 = core.GetEntry(p2); EXPECT_EQ(item2.GetPassword(), L"toplevel-password"); EXPECT_EQ(item2.GetURL(), L"toplevelurl.com"); EXPECT_EQ(item2.GetEmail(), L"tom@email.com"); EXPECT_EQ(item2.GetNotes(), L"simple one-line note"); } TEST_F(ImportTextTest, test1) { // this test is of a file that was created directly via the text export function. importText(testFile1, L'\t', 2); testImport(); } TEST_F(ImportTextTest, test2) { // same file as test2, except: // - Group/Title replaced with separate Group and Title columns // - some columns were renamed to equivalent (lowercase or accepted synonyms) importText(testFile2, L',', 2); testImport(); } TEST_F(ImportTextTest, test3) { // same file as test2, except: // - Group/Title replaced with separate Group and Title columns // - some columns were renamed to equivalent (lowercase or accepted synonyms) importText(testFile3, L',', 2); testImport(); } TEST_F(ImportTextTest, test4) { // csv file created by LastPass export importText(testFile4, L',', 1); // now test that we've read the data correctly auto p1 = core.Find(L"folder", L"jojo-name", L"jojo-username"); EXPECT_NE(p1, core.GetEntryEndIter()); auto item1 = core.GetEntry(p1); EXPECT_EQ(item1.GetPassword(), L"site-password"); EXPECT_EQ(item1.GetNotes(), L"notes-field"); EXPECT_EQ(item1.GetURL(), L"http://biteme.com"); } TEST_F(ImportTextTest, test5) { // csv file created by LastPass export, with multiline note, backslash subgroup separator. importText(testFile5, L',', 1); // now test that we've read the data correctly auto p1 = core.Find(L"acme-folder.subfolder1", L"acme-name", L"acme-username"); EXPECT_NE(p1, core.GetEntryEndIter()); auto item1 = core.GetEntry(p1); EXPECT_EQ(item1.GetGroup(), L"acme-folder.subfolder1"); EXPECT_EQ(item1.GetTitle(), L"acme-name"); EXPECT_EQ(item1.GetUser(), L"acme-username"); EXPECT_EQ(item1.GetPassword(), L"acme-password"); EXPECT_EQ(item1.GetNotes(), L"how are multiline notes exported?\r\n" L"only time will tell.\r\n" L"marked as favorite!"); EXPECT_EQ(item1.GetURL(), L"http://acme.org"); }
[ "ronys@pwsafe.org" ]
ronys@pwsafe.org
e01495b1b960fed7b6914b56f9a97282a69ab3cc
8c42e63181420f41c59958fcb8b0c3abb2a387e2
/m2m/model/m2m.cc
8f0041d2e8e3303cf69060dc4cc2ef3b113deb1b
[]
no_license
groao/m2m
4dfe1a88dea0d8d605414de36475188ce58f2ee8
cff86331fab6fcf604d50162e9d9b677e5ffe021
refs/heads/master
2020-05-19T13:12:23.748025
2019-05-29T03:45:11
2019-05-29T03:45:11
185,033,413
0
0
null
null
null
null
UTF-8
C++
false
false
16,608
cc
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // A module for create by Virtualization TLON Distributed System // Copycenter (C) 2019 // Giuseppe Roa Osorio <groao@unal.edu.co> // Grupo de investigación TLÖN // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser Public License as published by // the Free Software Foundation, either version 3 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with this program. If not, see [http://www.gnu.org/licenses/]. //__author__ = "Giuseppe Roa Osorio" //__copyright__ = "Copyright 2019, TLON group" //__license__ = "LGPL" //__version__ = "1" //__email__ = "groao@unal.edu.co" //__status__ = "Development" #include "ns3/log.h" #include "ns3/address.h" #include "ns3/inet-socket-address.h" #include "ns3/inet6-socket-address.h" #include "ns3/packet-socket-address.h" #include "ns3/node.h" #include "ns3/nstime.h" #include "ns3/data-rate.h" #include "ns3/random-variable-stream.h" #include "ns3/socket.h" #include "ns3/simulator.h" #include "ns3/socket-factory.h" #include "ns3/packet.h" #include "ns3/uinteger.h" #include "ns3/trace-source-accessor.h" #include "ns3/udp-socket-factory.h" #include "ns3/string.h" #include "ns3/pointer.h" #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/internet-module.h" #include "m2m.h" #include "ns3/m2mHeader.h" #include "ns3/M2MAddress.h" #include "ns3/M2MContext.h" #include "ns3/M2MIntegrator.h" #include "ns3/M2MPropagator.h" #include "ns3/M2MState.h" #include "ns3/M2MTerminal.h" using namespace M2M_PSM_Controller; M2MContext m2mNode; namespace ns3 { NS_LOG_COMPONENT_DEFINE ("M2MApplication"); NS_OBJECT_ENSURE_REGISTERED (M2MApplication); TypeId M2MApplication::GetTypeId (void) { static TypeId tid = TypeId ("ns3::M2MApplication") .SetParent<Application> () .SetGroupName("Applications") .AddConstructor<M2MApplication> () .AddAttribute ("DataRate", "The data rate in on state.", DataRateValue (DataRate ("500kb/s")), MakeDataRateAccessor (&M2MApplication::m_cbrRate), MakeDataRateChecker ()) .AddAttribute ("PacketSize", "The size of packets sent in on state", UintegerValue (512), MakeUintegerAccessor (&M2MApplication::m_pktSize), MakeUintegerChecker<uint32_t> (1)) .AddAttribute ("Remote", "The address of the destination", AddressValue (), MakeAddressAccessor (&M2MApplication::m_peer), MakeAddressChecker ()) .AddAttribute ("OnTime", "A RandomVariableStream used to pick the duration of the 'On' state.", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"), MakePointerAccessor (&M2MApplication::m_onTime), MakePointerChecker <RandomVariableStream>()) .AddAttribute ("OffTime", "A RandomVariableStream used to pick the duration of the 'Off' state.", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"), MakePointerAccessor (&M2MApplication::m_offTime), MakePointerChecker <RandomVariableStream>()) .AddAttribute ("MaxBytes", "The total number of bytes to send. Once these bytes are sent, " "no packet is sent again, even in on state. The value zero means " "that there is no limit.", UintegerValue (0), MakeUintegerAccessor (&M2MApplication::m_maxBytes), MakeUintegerChecker<uint64_t> ()) .AddAttribute ("Protocol", "The type of protocol to use.", TypeIdValue (UdpSocketFactory::GetTypeId ()), MakeTypeIdAccessor (&M2MApplication::m_tid), MakeTypeIdChecker ()) .AddTraceSource ("Tx", "A new packet is created and is sent", MakeTraceSourceAccessor (&M2MApplication::m_txTrace), "ns3::Packet::TracedCallback") ; return tid; } M2MApplication::M2MApplication () : m_socket (0), m_connected (false), m_residualBits (0), m_lastStartTime (Seconds (0)), m_totBytes (0) { NS_LOG_FUNCTION (this); } M2MApplication::~M2MApplication() { NS_LOG_FUNCTION (this); } void M2MApplication::SetMaxBytes (uint64_t maxBytes) { NS_LOG_FUNCTION (this << maxBytes); m_maxBytes = maxBytes; } Ptr<Socket> M2MApplication::GetSocket (void) const { NS_LOG_FUNCTION (this); return m_socket; } int64_t M2MApplication::AssignStreams (int64_t stream) { NS_LOG_FUNCTION (this << stream); m_onTime->SetStream (stream); m_offTime->SetStream (stream + 1); return 2; } void M2MApplication::DoDispose (void) { NS_LOG_FUNCTION (this); m_socket = 0; // chain up Application::DoDispose (); } // Application Methods void M2MApplication::StartApplication () // Called at time specified by Start { NS_LOG_FUNCTION (this); // Uniform Random Distribution ------------------------------------------------- int dis = 3; unsigned int Prob = 0; unsigned int array[3] = {0,0,0}; unsigned int matrix[8][3] = { 0,0,0, 0,0,1, 0,1,0, 0,1,1, 1,0,0, 1,0,1, 1,1,0, 1,1,1 }; unsigned int array1[4] = {0,0,0,0}; unsigned int array2[4] = {0,0,0,0}; unsigned int matrix1[16][4] = { 0,0,0,0, 0,0,0,1, 0,0,1,0, 0,0,1,1, 0,1,0,0, 0,1,0,1, 0,1,1,0, 0,1,1,1, 1,0,0,0, 1,0,0,1, 1,0,1,0, 1,0,1,1, 1,1,0,0, 1,1,0,1, 1,1,1,0, 1,1,1,1 }; if (dis == 1) { // Uniform Random Resources Distribution --------------------------------------- Ptr<UniformRandomVariable> z = CreateObject<UniformRandomVariable> (); z->SetAttribute ("Min", DoubleValue (0)); z->SetAttribute ("Max", DoubleValue (3)); Prob = z->GetValue () + 1; m2mNode.setResources(Prob); // Uniform Random Redundancy Distribution -------------------------------------- Ptr<UniformRandomVariable> y = CreateObject<UniformRandomVariable> (); y->SetAttribute ("Min", DoubleValue (0)); y->SetAttribute ("Max", DoubleValue (8)); Prob = y->GetValue (); for(int i=0; i < 3; i++) { array[i] = matrix[Prob][i]; } m2mNode.set_Redu_Id(array); // Uniform Random Application Distribution ------------------------------------- Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> (); x->SetAttribute ("Min", DoubleValue (0)); x->SetAttribute ("Max", DoubleValue (16)); Prob = x->GetValue (); for(int i=0; i < 4; i++) { array1[i] = matrix1[Prob][i]; } m2mNode.set_Appl_Id(array1); // Uniform Random Kind of Device Distribution ---------------------------------- Ptr<UniformRandomVariable> w = CreateObject<UniformRandomVariable> (); w->SetAttribute ("Min", DoubleValue (0)); w->SetAttribute ("Max", DoubleValue (16)); Prob = w->GetValue (); for(int i=0; i < 4; i++) { array2[i] = matrix1[Prob][i]; } m2mNode.set_Devi_Id(array2); } else if (dis == 2) { // Exponential Random Resources Distribution ----------------------------------- Ptr<ExponentialRandomVariable> z = CreateObject<ExponentialRandomVariable> (); z->SetAttribute ("Mean", DoubleValue (1)); z->SetAttribute ("Bound", DoubleValue (3)); Prob = z->GetValue ()+1; m2mNode.setResources(Prob); // Exponential Random Redundancy Distribution ---------------------------------- Ptr<ExponentialRandomVariable> y = CreateObject<ExponentialRandomVariable> (); y->SetAttribute ("Mean", DoubleValue (5)); y->SetAttribute ("Bound", DoubleValue (8)); Prob = y->GetValue (); if (Prob > 7){Prob = 7;} for(int i=0; i < 3; i++) { array[i] = matrix[Prob][i]; } m2mNode.set_Redu_Id(array); // Exponential Random Application Distribution --------------------------------- Ptr<ExponentialRandomVariable> x = CreateObject<ExponentialRandomVariable> (); x->SetAttribute ("Mean", DoubleValue (7)); x->SetAttribute ("Bound", DoubleValue (16)); Prob = x->GetValue (); if (Prob > 15){Prob = 15;} for(int i=0; i < 4; i++) { array1[i] = matrix1[Prob][i]; } m2mNode.set_Appl_Id(array1); // Exponential Random Kind of Device Distribution ------------------------------ Ptr<ExponentialRandomVariable> w = CreateObject<ExponentialRandomVariable> (); w->SetAttribute ("Mean", DoubleValue (7)); w->SetAttribute ("Bound", DoubleValue (16)); Prob = w->GetValue (); if (Prob > 15){Prob = 15;} for(int i=0; i < 4; i++) { array2[i] = matrix1[Prob][i]; } m2mNode.set_Devi_Id(array2); } else { Ptr<GammaRandomVariable> z = CreateObject<GammaRandomVariable> (); z->SetAttribute ("Alpha", DoubleValue (1.7)); z->SetAttribute ("Beta", DoubleValue (0.5)); Prob = z->GetValue ()+1; m2mNode.setResources(Prob); // Gamma Random Redundancy Distribution -------------------------------------- Ptr<GammaRandomVariable> y = CreateObject<GammaRandomVariable> (); y->SetAttribute ("Alpha", DoubleValue (4)); y->SetAttribute ("Beta", DoubleValue (0.8)); Prob = y->GetValue (); if (Prob > 7){Prob = 7;} for(int i=0; i < 3; i++) { array[i] = matrix[Prob][i]; } m2mNode.set_Redu_Id(array); // Gamma Random Application Distribution ------------------------------------- Ptr<GammaRandomVariable> x = CreateObject<GammaRandomVariable> (); x->SetAttribute ("Alpha", DoubleValue (10)); x->SetAttribute ("Beta", DoubleValue (0.8)); Prob = x->GetValue (); if (Prob > 15){Prob = 15;} for(int i=0; i < 4; i++) { array1[i] = matrix1[Prob][i]; } m2mNode.set_Appl_Id(array1); // Gamma Random Kind of Device Distribution ---------------------------------- Ptr<GammaRandomVariable> w = CreateObject<GammaRandomVariable> (); w->SetAttribute ("Alpha", DoubleValue (10)); w->SetAttribute ("Beta", DoubleValue (0.8)); Prob = w->GetValue (); if (Prob > 15){Prob = 15;} for(int i=0; i < 4; i++) { array2[i] = matrix1[Prob][i]; } m2mNode.set_Devi_Id(array2); } //cout <<"Resources node: " <<m2mNode.getResources () << endl; m2mNode.Handle(); // Create the socket if not already if (!m_socket) { m_socket = Socket::CreateSocket (GetNode (), m_tid); if (Inet6SocketAddress::IsMatchingType (m_peer)) { if (m_socket->Bind6 () == -1) { NS_FATAL_ERROR ("Failed to bind socket"); } } else if (InetSocketAddress::IsMatchingType (m_peer) || PacketSocketAddress::IsMatchingType (m_peer)) { if (m_socket->Bind () == -1) { NS_FATAL_ERROR ("Failed to bind socket"); } } m_socket->Connect (m_peer); m_socket->SetAllowBroadcast (true); m_socket->ShutdownRecv (); m_socket->SetConnectCallback ( MakeCallback (&M2MApplication::ConnectionSucceeded, this), MakeCallback (&M2MApplication::ConnectionFailed, this)); } m_cbrRateFailSafe = m_cbrRate; // Insure no pending event CancelEvents (); // If we are not yet connected, there is nothing to do here // The ConnectionComplete upcall will start timers at that time //if (!m_connected) return; ScheduleStartEvent (); } void M2MApplication::StopApplication () // Called at time specified by Stop { NS_LOG_FUNCTION (this); CancelEvents (); if(m_socket != 0) { m_socket->Close (); } else { NS_LOG_WARN ("M2MApplication found null socket to close in StopApplication"); } } void M2MApplication::CancelEvents () { NS_LOG_FUNCTION (this); if (m_sendEvent.IsRunning () && m_cbrRateFailSafe == m_cbrRate ) { // Cancel the pending send packet event // Calculate residual bits since last packet sent Time delta (Simulator::Now () - m_lastStartTime); int64x64_t bits = delta.To (Time::S) * m_cbrRate.GetBitRate (); m_residualBits += bits.GetHigh (); } m_cbrRateFailSafe = m_cbrRate; Simulator::Cancel (m_sendEvent); Simulator::Cancel (m_startStopEvent); } // Event handlers void M2MApplication::StartSending () { NS_LOG_FUNCTION (this); m_lastStartTime = Simulator::Now (); ScheduleNextTx (); // Schedule the send packet event ScheduleStopEvent (); } void M2MApplication::StopSending () { NS_LOG_FUNCTION (this); CancelEvents (); //ScheduleStartEvent (); } // Private helpers void M2MApplication::ScheduleNextTx () { NS_LOG_FUNCTION (this); if (m_maxBytes == 0 || m_totBytes < m_maxBytes) { uint32_t bits = m_pktSize * 8 - m_residualBits; NS_LOG_LOGIC ("bits = " << bits); Time nextTime (Seconds (bits / static_cast<double>(m_cbrRate.GetBitRate ()))); // Time till next packet NS_LOG_LOGIC ("nextTime = " << nextTime); m_sendEvent = Simulator::Schedule (nextTime, &M2MApplication::SendPacket, this); } else { // All done, cancel any pending events StopApplication (); } } void M2MApplication::ScheduleStartEvent () { // Schedules the event to start sending data (switch to the "On" state) NS_LOG_FUNCTION (this); Time offInterval = Seconds (m_offTime->GetValue ()); NS_LOG_LOGIC ("start at " << offInterval); m_startStopEvent = Simulator::Schedule (offInterval, &M2MApplication::StartSending, this); } void M2MApplication::ScheduleStopEvent () { // Schedules the event to stop sending data (switch to "Off" state) NS_LOG_FUNCTION (this); Time onInterval = Seconds (m_onTime->GetValue ()); NS_LOG_LOGIC ("stop at " << onInterval); m_startStopEvent = Simulator::Schedule (onInterval, &M2MApplication::StopSending, this); } void M2MApplication::SendPacket () { NS_LOG_FUNCTION (this); //m2mNode.getAddress(); NS_ASSERT (m_sendEvent.IsExpired ()); Ptr<Packet> packet1 = Create<Packet> (4); M2MHeader m2mHeader; m2mHeader.SetSelfIds(m2mNode.get_Byte1()); m2mHeader.SetSelfAdd(m2mNode.get_Byte2()); m2mHeader.SetPropAdd(m2mNode.get_Byte3()); NS_LOG_LOGIC ("Byte1: " << unsigned(m2mNode.get_Byte1()) << " Byte2: " << unsigned(m2mNode.get_Byte2()) << " Byte3: " << unsigned(m2mNode.get_Byte3())); packet1->AddHeader (m2mHeader); m_txTrace (packet1); m_socket->Send (packet1); m_totBytes += m_pktSize; Ptr<Packet> packet = Create<Packet> (m_pktSize); m_txTrace (packet); m_socket->Send (packet); m_totBytes += m_pktSize; if (InetSocketAddress::IsMatchingType (m_peer)) { NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s m2m application sent " << packet->GetSize () << " bytes to " << InetSocketAddress::ConvertFrom(m_peer).GetIpv4 () << " port " << InetSocketAddress::ConvertFrom (m_peer).GetPort () << " total Tx " << m_totBytes << " bytes"); } else if (Inet6SocketAddress::IsMatchingType (m_peer)) { NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s m2m application sent " << packet->GetSize () << " bytes to " << Inet6SocketAddress::ConvertFrom(m_peer).GetIpv6 () << " port " << Inet6SocketAddress::ConvertFrom (m_peer).GetPort () << " total Tx " << m_totBytes << " bytes" << packet1); } m_lastStartTime = Simulator::Now (); m_residualBits = 0; //ScheduleNextTx (); } void M2MApplication::ConnectionSucceeded (Ptr<Socket> socket) { NS_LOG_FUNCTION (this << socket); m_connected = true; } void M2MApplication::ConnectionFailed (Ptr<Socket> socket) { NS_LOG_FUNCTION (this << socket); } } // Namespace ns3
[ "noreply@github.com" ]
noreply@github.com
07f7c355cdf7a11acdd6df9b7b847340846a0ab2
5a6620a16a82bef4c2ec38e998de58824aecca38
/src/qt/paymentserver.h
729f73a4331d77fca2b198ffb75eb5cf540d4c7c
[ "MIT" ]
permissive
KeplerPay/kepler
f344ffce3966b54cb4c283fbc14039ed52d9b76e
2b2edde30ae22faf074a93c075cdbd5818428ad7
refs/heads/master
2021-07-15T15:54:21.420125
2020-07-09T00:50:38
2020-07-09T00:50:38
186,207,067
5
1
null
null
null
null
UTF-8
C++
false
false
5,062
h
// Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_PAYMENTSERVER_H #define BITCOIN_QT_PAYMENTSERVER_H // This class handles payment requests from clicking on // kepler: URIs // // This is somewhat tricky, because we have to deal with // the situation where the user clicks on a link during // startup/initialization, when the splash-screen is up // but the main window (and the Send Coins tab) is not. // // So, the strategy is: // // Create the server, and register the event handler, // when the application is created. Save any URIs // received at or during startup in a list. // // When startup is finished and the main window is // shown, a signal is sent to slot uiReady(), which // emits a receivedURI() signal for any payment // requests that happened during startup. // // After startup, receivedURI() happens as usual. // // This class has one more feature: a static // method that finds URIs passed in the command line // and, if a server is running in another process, // sends them to the server. // #include "paymentrequestplus.h" #include "walletmodel.h" #include <QObject> #include <QString> class OptionsModel; class CWallet; QT_BEGIN_NAMESPACE class QApplication; class QByteArray; class QLocalServer; class QNetworkAccessManager; class QNetworkReply; class QSslError; class QUrl; QT_END_NAMESPACE // BIP70 max payment request size in bytes (DoS protection) static const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000; class PaymentServer : public QObject { Q_OBJECT public: // Parse URIs on command line // Returns false on error static void ipcParseCommandLine(int argc, char *argv[]); // Returns true if there were URIs on the command line // which were successfully sent to an already-running // process. // Note: if a payment request is given, SelectParams(MAIN/TESTNET) // will be called so we startup in the right mode. static bool ipcSendCommandLine(); // parent should be QApplication object PaymentServer(QObject* parent, bool startLocalServer = true); ~PaymentServer(); // Load root certificate authorities. Pass NULL (default) // to read from the file specified in the -rootcertificates setting, // or, if that's not set, to use the system default root certificates. // If you pass in a store, you should not X509_STORE_free it: it will be // freed either at exit or when another set of CAs are loaded. static void LoadRootCAs(X509_STORE* store = NULL); // Return certificate store static X509_STORE* getCertStore(); // OptionsModel is used for getting proxy settings and display unit void setOptionsModel(OptionsModel *optionsModel); // Verify that the payment request network matches the client network static bool verifyNetwork(const payments::PaymentDetails& requestDetails); // Verify if the payment request is expired static bool verifyExpired(const payments::PaymentDetails& requestDetails); // Verify the payment request size is valid as per BIP70 static bool verifySize(qint64 requestSize); // Verify the payment request amount is valid static bool verifyAmount(const CAmount& requestAmount); Q_SIGNALS: // Fired when a valid payment request is received void receivedPaymentRequest(SendCoinsRecipient); // Fired when a valid PaymentACK is received void receivedPaymentACK(const QString &paymentACKMsg); // Fired when a message should be reported to the user void message(const QString &title, const QString &message, unsigned int style); public Q_SLOTS: // Signal this when the main window's UI is ready // to display payment requests to the user void uiReady(); // Submit Payment message to a merchant, get back PaymentACK: void fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipient, QByteArray transaction); // Handle an incoming URI, URI with local file scheme or file void handleURIOrFile(const QString& s); private Q_SLOTS: void handleURIConnection(); void netRequestFinished(QNetworkReply*); void reportSslErrors(QNetworkReply*, const QList<QSslError> &); void handlePaymentACK(const QString& paymentACKMsg); protected: // Constructor registers this on the parent QApplication to // receive QEvent::FileOpen and QEvent:Drop events bool eventFilter(QObject *object, QEvent *event); private: static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request); bool processPaymentRequest(const PaymentRequestPlus& request, SendCoinsRecipient& recipient); void fetchRequest(const QUrl& url); // Setup networking void initNetManager(); bool saveURIs; // true during startup QLocalServer* uriServer; QNetworkAccessManager* netManager; // Used to fetch payment requests OptionsModel *optionsModel; }; #endif // BITCOIN_QT_PAYMENTSERVER_H
[ "mateo@endlessloop.me" ]
mateo@endlessloop.me
1ec79b6116780fa07486b4a1df3c8922768fe046
6aa69b089b8569ac13cd0084db3e8b5fe8d04c3d
/src/stp/evaluations/game_states/PenaltyUsGameStateEvaluation.cpp
88f455cd4e7a657ed38b04632d9a17cf7a6b3bf3
[ "MIT" ]
permissive
maxthielen/yml
5d0bfb625ec15fe60fd7dfab6abcc0994180df69
58f5a1707f1034eb4e24c305e416def1e5cbf50b
refs/heads/development
2023-08-25T04:59:05.859371
2021-10-15T16:59:15
2021-10-15T16:59:15
416,984,352
0
0
MIT
2021-10-15T10:07:32
2021-10-14T04:08:53
C++
UTF-8
C++
false
false
505
cpp
// // Created by jordi on 28-04-20. // #include "stp/evaluations/game_states/PenaltyUsGameStateEvaluation.h" #include "utilities/GameStateManager.hpp" namespace rtt::ai::stp::evaluation { uint8_t PenaltyUsGameStateEvaluation::metricCheck(const world::World*, const world::Field *) const noexcept { return GameStateManager::getCurrentGameState().getStrategyName() == "penalty_us" ? stp::control_constants::FUZZY_TRUE : stp::control_constants::FUZZY_FALSE; } } // namespace rtt::ai::stp::evaluation
[ "noreply@github.com" ]
noreply@github.com
bb69d5e32d236ccd7aa7c0473e11d9efe49cb0db
0e01a7797a99638f6a9b4db9df06a5c8d94aa7f7
/src/morgana/fmk/renderers/renderbatches.h
5ca5ca29ec68d4f8a0440f53700cea81e8abb78e
[]
no_license
cslobodeanu/hits
c0310a4e0cfa308b353d38e301187e7bc5063555
1cb6663b59cb6c8ee5576d5db276c3828490a110
refs/heads/master
2021-05-11T15:29:42.300945
2018-02-01T19:43:32
2018-02-01T19:43:32
117,730,282
0
0
null
null
null
null
UTF-8
C++
false
false
5,590
h
#ifndef __MORGANA_FMK_RENDERERS_RENDER_BATCHES_H__ #define __MORGANA_FMK_RENDERERS_RENDER_BATCHES_H__ #include "renderer.h" #include "streamingbuffers.h" #include "genericbatch.h" namespace MorganaEngine { namespace Framework { namespace Renderers { template <class vertexT, class indexT, int maxVertices, int maxIndices, bool useQuadIndices> class RenderBatches { typedef GenericBatch_t<vertexT, indexT> Batch_t; Array<Matrix> worldMatricesStack; public: RenderBatches() { currentBatch = -1; if (useQuadIndices) { int numQuads = maxVertices / 4; indexT* inds = ibos.Alloc(numQuads * 6); for (int i = 0; i < numQuads; i++) { inds[6 * i + 0] = 4 * i + 0; inds[6 * i + 1] = 4 * i + 1; inds[6 * i + 2] = 4 * i + 2; inds[6 * i + 3] = 4 * i + 0; inds[6 * i + 4] = 4 * i + 2; inds[6 * i + 5] = 4 * i + 3; } ibos.End(); } } virtual ~RenderBatches() { Cleanup(); } void SetContext(void* context) { this->context = context; } void Begin() { currentBatch = -1; lastVertexOffset = 0; vbos.Begin(); ibos.Begin(); } void End() { vbos.End(); ibos.End(); } void PushWorldMatrix(const Matrix* wm) { worldMatricesStack.Add(*wm); Batch_t* newOne = NewBatch(true); } void PopWorldMatrix() { worldMatricesStack.Pop(); Batch_t* newOne = NewBatch(true); } const int Count() const { return currentBatch + 1; } Batch_t* operator [] (const int index) { return batches[index]; } void SetMaterial(const Material* mat) { Batch_t* l = LastBatch(); if (l != NULL && l->material == NULL) { l->material = new Material(*mat); } else if (l == NULL || l->material->Equals(mat) == false) { NewBatch(false)->material = new Material(*mat); return; } } void Alloc(const int numVertices, const int numIndices, vertexT** outVerts, indexT** outInds, const Material* mat = NULL) { ASSERT(context, "Context not set. Set it to RendersToCanvas"); if (mat != NULL) SetMaterial(mat); Batch_t* l = LastBatch(); vbos.TryAlloc(numVertices); if(!useQuadIndices) ibos.TryAlloc(numIndices); if (l->vbo != vbos.GetBuffer() || (!useQuadIndices && l->ibo != ibos.GetBuffer())) { Batch_t* newOne = NewBatch(true); } vbos.Alloc(numVertices); if (!useQuadIndices) ibos.Alloc(numIndices); l = LastBatch(); lastVertexOffset = l->vertexOffset; *outVerts = l->VertexPtr(); *outInds = useQuadIndices ? NULL : l->IndexPtr(); l->vertexOffset += numVertices; l->indexOffset += numIndices; } void AdjustIndices(int count) { if (useQuadIndices) return; Batch_t* l = LastBatch(); if (l == null) return; if (lastVertexOffset == 0) return; indexT* indices = l->IndexPtr() - count; indexT* last = indices + count; for (; indices < last; indices++) { *indices += lastVertexOffset; } } Array<Renderer::Drawable_t>& BuildDrawablesList() { tmpDrawables.Clear(); tmpMaterials.Clear(); tmpWorldMatrices.Clear(); for (int i = 0; i < Count(); i++) { const Batch_t* b = batches[i]; if (b->vertexOffset == 0 || b->indexOffset == 0) continue; Renderer::Drawable_t r; r.vbo = b->vbo; r.ibo = b->ibo; r.vertexOffset = b->vboOffsetBytes; r.indexOffset = b->iboOffsetBytes; r.vertexCount = b->vertexOffset; r.indexCount = b->indexOffset; r.vertexLayout = &vertexT::Layout; tmpDrawables.Add(r); tmpMaterials.Add(b->material); if (b->worldMatrixIsIdentity == false) tmpWorldMatrices.Add(&b->worldMatrix); else tmpWorldMatrices.Add(NULL); } return tmpDrawables; } Array<const Material*>& GetMaterialList() { return tmpMaterials; } Array<const Matrix*>& GetWorldMatricesList() { return tmpWorldMatrices; } protected: StreamingBuffers<vertexT, maxVertices, BINDING_ARRAY_BUFFER> vbos; StreamingBuffers<indexT, maxIndices, BINDING_ELEMENT_ARRAY_BUFFER> ibos; Array<Batch_t*> batches; int currentBatch; Array<Renderer::Drawable_t> tmpDrawables; Array<const Material*> tmpMaterials; Array<const Matrix*> tmpWorldMatrices; int lastVertexOffset; void* context; void Cleanup() { for (int i = 0; i < batches.Length(); i++) SAFE_DEL(batches[i]); } Batch_t* NewBatch(bool copyLastMaterial) { currentBatch++; if (currentBatch >= batches.Length()) { batches.Add(new Batch_t()); } Batch_t* b = batches[currentBatch]; b->Reset(); b->context = context; b->vbo = vbos.GetBuffer(); b->ibo = ibos.GetBuffer(); b->vboOffsetBytes = vbos.GetBufferOffset(); b->iboOffsetBytes = ibos.GetBufferOffset(); if (worldMatricesStack.Length() > 0) { b->worldMatrix = worldMatricesStack.Last(); b->worldMatrixIsIdentity = false; } Batch_t* last = LastBatch(); if (last != NULL && copyLastMaterial && last->material != NULL) { b->material = new Material(*last->material); } return b; } Batch_t* LastBatch() { return currentBatch < 0 ? NULL : batches[currentBatch]; } }; } } } #endif
[ "cslobodeanu@gmail.com" ]
cslobodeanu@gmail.com
5744f80e37a6f788712a72811887dd89fa97ddff
d983d41c692ba3307c50ab2a95ab241ee94f9253
/1part/task5.cpp
7a8ecf2089c44165aa7d34b7080da058e12f121c
[ "MIT" ]
permissive
surenaus/Parallel-programming
05c63729a14d7cacc60380bdbcd1960abb0e4610
8c7717f956c26faa21e60532af3836d045de7abd
refs/heads/master
2020-05-01T23:46:01.171917
2019-03-25T21:33:33
2019-03-25T21:33:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,818
cpp
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <malloc.h> int main(int argc, char** argv) { MPI_Init(NULL, NULL); int b[12]; int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size); if (world_size < 2) { fprintf(stderr, "Must use more than two processes for this example\n"); MPI_Abort(MPI_COMM_WORLD, 1); } int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); int number_amount; if (world_rank == 0) { for(int i = 0; i < 12 ; i++) b[i] = i * i; //std::cout << i << " = " << b[i] << "\n"; number_amount = 12 / world_size; int j = 0; for(int i = 0; i < world_size; i++) { int a[number_amount]; int k = 0; if(i == 0) { for(j; (j < 12 / world_size); j++) { a[k] = b[j]; std::cout << k << " = " << a[k] << "\n"; k++; } printf("0 display %d numbers \n", number_amount); //std::cout << "k = " << k << ", j = " << j << "\n"; } else { //std::cout << "!@ k = " << k << ", j = " << j << ", i = " << i << "\n"; for(j; j < (12 / world_size) * (i + 1); j++) { a[k] = b[j]; k++; } MPI_Send(a, number_amount, MPI_INT, i, 0, MPI_COMM_WORLD); printf("1 sent %d numbers to %i\n", number_amount,i); } } } else if (world_rank != 0) { MPI_Status status; MPI_Probe(0, 0, MPI_COMM_WORLD, &status); MPI_Get_count(&status, MPI_INT, &number_amount); int a[number_amount]; MPI_Recv(a, number_amount, MPI_INT, 0, 0, MPI_COMM_WORLD, &status); for(int i = 0; i < number_amount; i++) std::cout << i << " = " << a[i] << "\n"; printf("%d received %d numbers from 0. Message source = %d, tag = %d\n", world_rank, number_amount, status.MPI_SOURCE, status.MPI_TAG); } MPI_Barrier(MPI_COMM_WORLD); MPI_Finalize(); }
[ "noreply@github.com" ]
noreply@github.com
7d3925736b6cc4505cc3fc5da737b2201602547f
a7764174fb0351ea666faa9f3b5dfe304390a011
/src/Voxel/Voxel_Writer.cxx
ef8684f93cd6091abddd95bd0cbfed167ee03062
[]
no_license
uel-dataexchange/Opencascade_uel
f7123943e9d8124f4fa67579e3cd3f85cfe52d91
06ec93d238d3e3ea2881ff44ba8c21cf870435cd
refs/heads/master
2022-11-16T07:40:30.837854
2020-07-08T01:56:37
2020-07-08T01:56:37
276,290,778
0
0
null
null
null
null
UTF-8
C++
false
false
12,146
cxx
// File: Voxel_Writer.cxx // Created: Wed Aug 28 14:36:15 2008 // Author: Vladislav ROMASHKO // <vladislav.romashko@opencascade.com> #include <Voxel_Writer.ixx> #include <Voxel_TypeDef.hxx> #include <Precision.hxx> #include <TCollection_AsciiString.hxx> Voxel_Writer::Voxel_Writer():myFormat(Voxel_VFF_ASCII),myBoolVoxels(0),myColorVoxels(0),myFloatVoxels(0) { } void Voxel_Writer::SetFormat(const Voxel_VoxelFileFormat format) { myFormat = format; } void Voxel_Writer::SetVoxels(const Voxel_BoolDS& voxels) { myBoolVoxels = (Standard_Address) &voxels; myColorVoxels = 0; myFloatVoxels = 0; } void Voxel_Writer::SetVoxels(const Voxel_ColorDS& voxels) { myBoolVoxels = 0; myColorVoxels = (Standard_Address) &voxels; myFloatVoxels = 0; } void Voxel_Writer::SetVoxels(const Voxel_FloatDS& voxels) { myBoolVoxels = 0; myColorVoxels = 0; myFloatVoxels = (Standard_Address) &voxels; } Standard_Boolean Voxel_Writer::Write(const TCollection_ExtendedString& file) const { switch (myFormat) { case Voxel_VFF_ASCII: { if (myBoolVoxels) return WriteBoolAsciiVoxels(file); else if (myColorVoxels) return WriteColorAsciiVoxels(file); else if (myFloatVoxels) return WriteFloatAsciiVoxels(file); } case Voxel_VFF_BINARY: { if (myBoolVoxels) return WriteBoolBinaryVoxels(file); else if (myColorVoxels) return WriteColorBinaryVoxels(file); else if (myFloatVoxels) return WriteFloatBinaryVoxels(file); } } // No voxels or no format description is found: return Standard_False; } Standard_Boolean Voxel_Writer::WriteBoolAsciiVoxels(const TCollection_ExtendedString& file) const { Voxel_BoolDS* ds = (Voxel_BoolDS*) myBoolVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, ASCII); fprintf(f, " "); fprintf(f, BOOL); fprintf(f, "\n"); // Location, size, number of splits fprintf(f, "%g %g %g\n", ds->GetX(), ds->GetY(), ds->GetZ()); fprintf(f, "%g %g %g\n", ds->GetXLen(), ds->GetYLen(), ds->GetZLen()); fprintf(f, "%d %d %d\n", ds->GetNbX(), ds->GetNbY(), ds->GetNbZ()); // Data // Copied from Voxel_BoolDS.cxx: Standard_Integer nb_bytes = RealToInt(ceil(ds->GetNbX() * ds->GetNbY() * ds->GetNbZ() / 8.0)); Standard_Integer nb_slices = RealToInt(ceil(nb_bytes / 8.0)); // myData[0 .. nb_slices - 1][0 .. 7] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_Byte**)ds->myData)[i1]) { Standard_Boolean has_value = Standard_False; fprintf(f, "%d ", i1); // index of slice for (i2 = 0; i2 < 8; i2++) { Standard_Byte value = ((Standard_Byte*)((Standard_Byte**)ds->myData)[i1])[i2]; if (value) { has_value = Standard_True; fprintf(f, "%d %d\n", i2, value); } } if (!has_value) { fprintf(f, "0 0\n"); } } } } fclose(f); return Standard_True; } Standard_Boolean Voxel_Writer::WriteColorAsciiVoxels(const TCollection_ExtendedString& file) const { Voxel_ColorDS* ds = (Voxel_ColorDS*) myColorVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, ASCII); fprintf(f, " "); fprintf(f, COLOR); fprintf(f, "\n"); // Location, size, number of splits fprintf(f, "%g %g %g\n", ds->GetX(), ds->GetY(), ds->GetZ()); fprintf(f, "%g %g %g\n", ds->GetXLen(), ds->GetYLen(), ds->GetZLen()); fprintf(f, "%d %d %d\n", ds->GetNbX(), ds->GetNbY(), ds->GetNbZ()); // Data // Copied from Voxel_ColorDS.cxx: Standard_Integer nb_bytes = RealToInt(ceil(ds->GetNbX() * ds->GetNbY() * ds->GetNbZ() / 2.0)); Standard_Integer nb_slices = RealToInt(ceil(nb_bytes / 32.0)); // myData[0 .. nb_slices - 1][0 .. 31] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_Byte**)ds->myData)[i1]) { Standard_Boolean has_value = Standard_False; fprintf(f, "%d ", i1); // index of slice for (i2 = 0; i2 < 32; i2++) { Standard_Byte value = ((Standard_Byte*)((Standard_Byte**)ds->myData)[i1])[i2]; if (value) { has_value = Standard_True; fprintf(f, "%d %d\n", i2, value); } } if (!has_value) { fprintf(f, "0 0\n"); } } } } fclose(f); return Standard_True; } Standard_Boolean Voxel_Writer::WriteFloatAsciiVoxels(const TCollection_ExtendedString& file) const { Voxel_FloatDS* ds = (Voxel_FloatDS*) myFloatVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, ASCII); fprintf(f, " "); fprintf(f, FLOAT); fprintf(f, "\n"); // Location, size, number of splits fprintf(f, "%g %g %g\n", ds->GetX(), ds->GetY(), ds->GetZ()); fprintf(f, "%g %g %g\n", ds->GetXLen(), ds->GetYLen(), ds->GetZLen()); fprintf(f, "%d %d %d\n", ds->GetNbX(), ds->GetNbY(), ds->GetNbZ()); // Data // Copied from Voxel_FloatDS.cxx: Standard_Integer nb_floats = ds->GetNbX() * ds->GetNbY() * ds->GetNbZ(); Standard_Integer nb_slices = RealToInt(ceil(nb_floats / 32.0)); // 32 values in 1 slice // myData[0 .. nb_slices - 1][0 .. 31] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_ShortReal**)ds->myData)[i1]) { Standard_Boolean has_value = Standard_False; fprintf(f, "%d ", i1); // index of slice for (i2 = 0; i2 < 32; i2++) { Standard_ShortReal value = ((Standard_ShortReal*)((Standard_ShortReal**)ds->myData)[i1])[i2]; if (value) { has_value = Standard_True; fprintf(f, "%d %g\n", i2, value); } } if (!has_value) { fprintf(f, "0 0\n"); } } } } fclose(f); return Standard_True; } Standard_Boolean Voxel_Writer::WriteBoolBinaryVoxels(const TCollection_ExtendedString& file) const { Voxel_BoolDS* ds = (Voxel_BoolDS*) myBoolVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, BINARY); fprintf(f, " "); fprintf(f, BOOL); fprintf(f, "\n"); // Location, size, number of splits fwrite(&(ds->myX), sizeof(Standard_Real), 1, f); fwrite(&(ds->myY), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZ), sizeof(Standard_Real), 1, f); fwrite(&(ds->myXLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myYLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myNbX), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbY), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbZ), sizeof(Standard_Integer), 1, f); // Data // Copied from Voxel_BoolDS.cxx: Standard_Integer nb_bytes = RealToInt(ceil(ds->GetNbX() * ds->GetNbY() * ds->GetNbZ() / 8.0)); Standard_Integer nb_slices = RealToInt(ceil(nb_bytes / 8.0)); // myData[0 .. nb_slices - 1][0 .. 7] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_Byte**)ds->myData)[i1]) { for (i2 = 0; i2 < 8; i2++) { Standard_Byte value = ((Standard_Byte*)((Standard_Byte**)ds->myData)[i1])[i2]; if (value) { fwrite(&i1, sizeof(Standard_Integer), 1, f); fwrite(&i2, sizeof(Standard_Integer), 1, f); fwrite(&value, sizeof(Standard_Byte), 1, f); } } } } } fclose(f); return Standard_True; } Standard_Boolean Voxel_Writer::WriteColorBinaryVoxels(const TCollection_ExtendedString& file) const { Voxel_ColorDS* ds = (Voxel_ColorDS*) myColorVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, BINARY); fprintf(f, " "); fprintf(f, COLOR); fprintf(f, "\n"); // Location, size, number of splits fwrite(&(ds->myX), sizeof(Standard_Real), 1, f); fwrite(&(ds->myY), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZ), sizeof(Standard_Real), 1, f); fwrite(&(ds->myXLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myYLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myNbX), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbY), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbZ), sizeof(Standard_Integer), 1, f); // Data // Copied from Voxel_ColorDS.cxx: Standard_Integer nb_bytes = RealToInt(ceil(ds->myNbX * ds->myNbY * ds->myNbZ / 2.0)); Standard_Integer nb_slices = RealToInt(ceil(nb_bytes / 32.0)); // myData[0 .. nb_slices - 1][0 .. 31] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_Byte**)ds->myData)[i1]) { for (i2 = 0; i2 < 32; i2++) { Standard_Byte value = ((Standard_Byte*)((Standard_Byte**)ds->myData)[i1])[i2]; if (value) { fwrite(&i1, sizeof(Standard_Integer), 1, f); fwrite(&i2, sizeof(Standard_Integer), 1, f); fwrite(&value, sizeof(Standard_Byte), 1, f); } } } } } fclose(f); return Standard_True; } Standard_Boolean Voxel_Writer::WriteFloatBinaryVoxels(const TCollection_ExtendedString& file) const { Voxel_FloatDS* ds = (Voxel_FloatDS*) myFloatVoxels; if (!ds->myData) return Standard_False; // Open file for writing FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb"); if (!f) return Standard_False; // Header: file format, type of voxels fprintf(f, VOXELS); fprintf(f, " "); fprintf(f, BINARY); fprintf(f, " "); fprintf(f, FLOAT); fprintf(f, "\n"); // Location, size, number of splits fwrite(&(ds->myX), sizeof(Standard_Real), 1, f); fwrite(&(ds->myY), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZ), sizeof(Standard_Real), 1, f); fwrite(&(ds->myXLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myYLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myZLen), sizeof(Standard_Real), 1, f); fwrite(&(ds->myNbX), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbY), sizeof(Standard_Integer), 1, f); fwrite(&(ds->myNbZ), sizeof(Standard_Integer), 1, f); // Data // Copied from Voxel_FloatDS.cxx: Standard_Integer nb_floats = ds->myNbX * ds->myNbY * ds->myNbZ; Standard_Integer nb_slices = RealToInt(ceil(nb_floats / 32.0)); // 32 values in 1 slice // myData[0 .. nb_slices - 1][0 .. 31] if (nb_slices) { Standard_Integer i1 = 0, i2 = 0; Standard_Real small = Precision::Confusion() * Precision::Confusion(); for (i1 = 0; i1 < nb_slices; i1++) { if (((Standard_ShortReal**)ds->myData)[i1]) { for (i2 = 0; i2 < 32; i2++) { Standard_ShortReal value = ((Standard_ShortReal*)((Standard_ShortReal**)ds->myData)[i1])[i2]; if (fabs(value) > small) { fwrite(&i1, sizeof(Standard_Integer), 1, f); fwrite(&i2, sizeof(Standard_Integer), 1, f); fwrite(&value, sizeof(Standard_ShortReal), 1, f); } } } } } fclose(f); return Standard_True; }
[ "shoka.sho2@excel.co.jp" ]
shoka.sho2@excel.co.jp
93814c93a85294bf89b8862738d289e8ce1e0c24
8fc5128f5e7305dfe1084eaeb7cdfd92c261717d
/src/keypad.cpp
603fd599da1e2e94f45c990aa8370add6677ace3
[]
no_license
ParthDatar/KeyPad
e0bb7166abb4f461759c8faefde23c8535935dc8
699a6892806cd77c2b476001d92d5f603f3cde7f
refs/heads/master
2023-04-01T16:16:58.151362
2021-04-17T20:16:32
2021-04-17T20:16:32
358,775,670
0
0
null
null
null
null
UTF-8
C++
false
false
1,583
cpp
#include "keypad.h" #include <random> #include <algorithm> #include <fstream> #include <iostream> #include <time.h> Keypad::Keypad(int size, int start, int end){ this->size = size; pad = new int[size]; std::default_random_engine gen; std::uniform_int_distribution<int> dis(start,end); srand(time(NULL)); uint64_t mSeed = rand(); gen.seed(mSeed); for(int i = 0; i < size; i++){ pad[i] = dis(gen); } } Keypad::Keypad(const Keypad& k){ pad = new int[k.size]; size = k.size; for(int i = 0; i < size; i++){ pad[i] = k.pad[i]; } } Keypad::~Keypad(){ delete [] pad; } void Keypad::printPad(){ int counter = 0; std::for_each(pad, pad+size, [&counter](int i){ std::cout << i << "\t"; counter++; if(counter % 10 == 0){ std::cout << std::endl; } }); } std::string Keypad::encrypt(std::string message){ std::string cipher = message; for(int i = 0; i < message.size(); i++){ cipher[i] = message[i] + pad[i]; } return cipher; } std::string Keypad::decrypt(std::string cipher){ std::string message = cipher; for(int i = 0; i < cipher.size(); i++){ message[i] = cipher[i] - pad[i]; } return message; } void Keypad::toFile(std::string filename){ std::ofstream outFile("../outputFiles/" + filename); if(!outFile.is_open()){ return; } for(int i = 0; i < size; i++){ outFile << pad[i] << " "; if(i >= 10 && i % 10 == 0){ outFile << std::endl; } } }
[ "parth.a.datar@vanderbilt.edu" ]
parth.a.datar@vanderbilt.edu
2cf2bddf8538df8af673678da2446a8bbeeb7ce9
8130ab1e643565308b87b8d0244bcc3f766f6bd2
/TextFileCompress/StringCompress.cpp
60f4d98e5bced4f3df9dc5e1530c7aaf6f1e2c73
[]
no_license
KietNguyen10112000/Project1
6db55f0934a85af82f1840b38ebfc39fe8b7846b
e3a17575bfc946234c55cea5f8de51bfc07f9929
refs/heads/master
2023-02-21T16:20:04.883767
2021-01-15T14:37:23
2021-01-15T14:37:23
304,319,476
0
0
null
null
null
null
UTF-8
C++
false
false
12,466
cpp
#include "StringCompress.h" #include <string> #include <iostream> #include <Windows.h> #include <thread> #include "BurrowsWheelerTransform.h" using namespace std; StringCompress::StringCompress() { } StringCompress::~StringCompress() { } //char StringCompress::dg[10] = { 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9 }; //char* StringCompress::nonDigitCompress(char* str, int strlen) //{ // char* result = new char[strlen + 1]; // result[strlen] = '\0'; // // int i = 0; // int index = 0; // // while (str[i] != '\0') // { // int count = 0; // // while (str[i + count] == str[i]) // { // count++; // } // // if (count > 1) // { // result[index] = str[i]; // // std::string temp = std::to_string(count); // // int i = 0; // while (temp[i] != '\0') // { // result[index + i + 1] = temp[i]; // i++; // } // // index += i; // // } // else { // result[index] = str[i]; // } // // i += count; // index++; // } // result[index] = '\0'; // // return result; // //} // //char* StringCompress::nonDigitUncompress(char* str, int strlen) //{ // char* result = new char[strlen + 1]; // result[strlen] = '\0'; // // int i = 0; // // char* digits = new char[10]; // // int resultIndex = 0; // // while (str[i] != '\0') // { // // char cur = str[i] - '0'; // // if (cur > -1 && cur < 10) // { // int count = 0; // while (cur > -1 && cur < 10) // { // digits[count] = cur; // count++; // cur = str[i + count] - '0'; // } // // int num = 0; // for (int j = count - 1; j > -1; j--) // { // num += pow(10, count - j - 1) * digits[j]; // } // // for (int j = 0; j < num; j++) // { // result[resultIndex + j - 1] = str[i - 1]; // } // // resultIndex += num - 1; // i += count; // // } // else { // result[resultIndex] = str[i]; // resultIndex++; // i++; // } // // } // // delete[] digits; // // return result; //} // //char* StringCompress::digitOnlyCompress(char* digits, int length) //{ // char* result; // // int size = 0; // // if (length % 2 == 0) // { // size = length / 2; // result = new char[size + 1]; // result[size] = '\0'; // } // else { // size = (length + 1) / 2; // result = new char[size + 1]; // result[size] = '\0'; // } // // int i; // int index = 0; // for (i = 0; i < length - 1; i += 2) // { // char up = digits[i] - '0'; // char down = digits[i + 1] - '0'; // result[index] = (up << 4) | down; // index++; // } // if (i == length - 1) // { // result[size - 1] = ((digits[i] - '0') << 4) | 0x0F; // } // // return result; //} // //char* StringCompress::digitOnlyUncompress(char* digits, int length) //{ // char* result = new char[length * 2 + 1]; // result[length * 2] = '\0'; // // int index = 0; // for (int i = 0; i < length; i++) // { // char up = (digits[i] >> 4) & 0x0F; // char down = digits[i] & 0x0F; // // if (down == 0x0F) // { // down = '\0' - '0'; // } // // result[index] = up + '0'; // result[index + 1] = down + '0'; // // index += 2; // } // // return result; //} int StringCompress::digitOnlyCompress(char* dgStart, char* buffer, int* stride) { int i = 0; int index = 0; buffer[index] = (char)0x03; index++; while (true) { char up = dgStart[i] - '0'; char down = dgStart[i + 1] - '0'; if (up < 0 || up > 9) { buffer[index] = 0xFF; break; } if (down < 0 || down > 9) { buffer[index] = (up << 4) | 0x0F; i++; break; } buffer[index] = (up << 4) | down; if (buffer[index] == '\0') { buffer[index] = 0xAA; } index++; i += 2; } *stride = i; return index + 1; } int StringCompress::digitOnlyUncompress(char* dgStart, char* buffer, int* bufStride) { int i = 0; int index = 0; if (dgStart[i] != (char)0x03) { return 0; } i++; while (true) { char up = (dgStart[i] >> 4) & 0x0F; char down = dgStart[i] & 0x0F; if (dgStart[i] == (char)0xFF) { break; } if (down == 0x0F) { buffer[index] = up + '0'; index++; break; } if (dgStart[i] == (char)0xAA) { up = 0; down = 0; } buffer[index] = up + '0'; buffer[index + 1] = down + '0'; index += 2; i ++; } *bufStride = i + 1; return index; } char* StringCompress::compress(char* str, int strlen, int* resultLen) { char* result = new char[(long long)strlen + 1]; result[strlen] = '\0'; int i = 0; int index = 0; while (str[i] != '\0') { if (str[i] - '0' > -1 && str[i] - '0' < 10) { int nDigits = 0; int n = digitOnlyCompress(&str[i], &result[index], &nDigits); i += nDigits; index += n; continue; } int count = 0; while (str[i + count] == str[i]) { count++; } if (count > 1) { result[index] = str[i]; std::string temp = std::to_string(count); int i = 0; while (temp[i] != '\0') { result[index + i + 1] = temp[i]; i++; } index += i; } else { result[index] = str[i]; } i += count; index++; } result[index] = '\0'; *resultLen = index; return result; } char* StringCompress::uncompress(char* str, int strlen) { char* result = new char[(long long)strlen + 1]; result[strlen] = '\0'; int i = 0; char* digits = new char[10]; long long resultIndex = 0; while (str[i] != '\0') { if (str[i] == (char)0x03) { int nDigits = 0; int n = digitOnlyUncompress(&str[i], &result[resultIndex], &nDigits); i += nDigits; resultIndex += n; continue; } char cur = str[i] - '0'; if (cur > -1 && cur < 10) { int count = 0; while (cur > -1 && cur < 10) { digits[count] = cur; count++; cur = str[i + count] - '0'; } int num = 0; for (int j = count - 1; j > -1; j--) { num += pow(10, count - j - 1) * digits[j]; } for (int j = 0; j < num; j++) { result[resultIndex + j - 1] = str[i - 1]; } resultIndex += (long long)num - 1; i += count; } else { result[resultIndex] = str[i]; resultIndex++; i++; } } delete[] digits; //result[resultIndex] = '\0'; return result; } void StringCompress::readFile(fstream* f, char* buffer, long long* count) { *count = 0; while (!f->eof()) { buffer[*count] = f->get(); /*if (buffer[*count] == '\0') { buffer[*count] = ' '; }*/ (*count)++; } buffer[*count] = END_OF_STR; (*count)++; } void StringCompress::readFile(std::fstream& f, char* buffer, long long size) { for (long long i = 0; i < size; i++) { buffer[i] = f.get(); } } void StringCompress::doCompress(char* str, int strlength, char** outBuffer, int* outStrlen, int index) { char* bwtStr = BurrowsWheelerTransform::transform(str, strlength); int zipStrlen = 0; outBuffer[index] = StringCompress::compress(bwtStr, strlength, &(zipStrlen)); outStrlen[index] = zipStrlen; delete[] bwtStr; } long long StringCompress::getFileSize(const char* file) { LPOFSTRUCT lpReOpenBuff = new _OFSTRUCT(); HFILE h = OpenFile(file, lpReOpenBuff, OF_READ); if (h == HFILE_ERROR) { throw "File doesn't exist !!!"; } LARGE_INTEGER size; GetFileSizeEx((HANDLE)h, &size); CloseHandle((HANDLE)h); delete lpReOpenBuff; return size.QuadPart; } void StringCompress::compress(const char* sourceFile, const char* destFile) { long long fileSize = getFileSize(sourceFile); char* buffer = new char[fileSize + 2]; buffer[fileSize + 1] = '\0'; fstream source(sourceFile); long long count = 0; readFile(&source, buffer, &count); source.close(); char* bwtStr = BurrowsWheelerTransform::transform(buffer, count); delete[] buffer; int zipStrlen = 0; char* zipStr = compress(bwtStr, count, &zipStrlen); delete[] bwtStr; fstream dest(destFile, std::ofstream::out | std::ofstream::trunc); string str = to_string(count); dest.write(str.c_str(), str.length()); dest.write("\n", 1); str = to_string(zipStrlen); dest.write(str.c_str(), str.length()); dest.write("\n", 1); dest.write(zipStr, zipStrlen); dest.flush(); dest.close(); } extern int fileSize; void StringCompress::multiThreadCompress(const char* sourceFile, const char* destFile, int nThread, int minSize, int maxSize) { long long fileSize = getFileSize(sourceFile); char** buffer = new char* [nThread]; //char** bwtBuffer = new char* [nThread]; char** zipBuffers = new char* [nThread]; int* zipStrlen = new int[nThread]; int* count = new int[nThread]; fstream source(sourceFile); fstream dest(destFile, std::ofstream::out | std::ofstream::trunc); thread** thrArr = new thread * [nThread]; bool stop = false; while (!stop) { int nCurThr = 0; for (int i = 0; i < nThread; i++) { long long size = 0; if (fileSize == 0) { stop = true; break; } if (fileSize < minSize || fileSize < maxSize) { size = fileSize; fileSize = 0; } else if (fileSize != 0) { size = minSize; fileSize -= size; } buffer[i] = new char[size + 2]; buffer[i][size + 1] = '\0'; buffer[i][size] = END_OF_STR; readFile(source, buffer[i], size); //thrArr[i] = new thread(BurrowsWheelerTransform::doTransform, buffer[i], size + 1, bwtBuffer, i); thrArr[i] = new thread(StringCompress::doCompress, buffer[i], size + 1, zipBuffers, zipStrlen, i); count[i] = size + 2; nCurThr++; } for (int i = 0; i < nCurThr; i++) { if (thrArr[i]->joinable()) { thrArr[i]->join(); } delete thrArr[i]; delete[] buffer[i]; } cout << "\rProcessing: " << (1 - (double)fileSize / (double)::fileSize) * 100 << " %"; for (int i = 0; i < nCurThr; i++) { //int zipStrlen = 0; //char* zipStr = compress(bwtBuffer[i], count[i], &zipStrlen); //delete[] bwtBuffer[i]; string str = to_string(count[i]); dest.write(str.c_str(), str.length()); dest.write("\n", 1); str = to_string(zipStrlen[i]); dest.write(str.c_str(), str.length()); dest.write("\n", 1); //dest.write(zipStr, zipStrlen); dest.write(zipBuffers[i], zipStrlen[i]); delete[] zipBuffers[i]; } } delete[] thrArr; delete[] buffer; //delete[] bwtBuffer; delete[] count; delete[] zipBuffers; delete[] zipStrlen; source.close(); dest.flush(); dest.close(); cout << endl; } void StringCompress::uncompress(const char* sourceFile, const char* destFile) { /*fstream source(sourceFile); char* digits = new char[30](); char c = source.get(); int count = 0; while (c != '\n') { digits[count] = c - '0'; c = source.get(); count++; } int destSize = 0; for (int j = count - 1; j > -1; j--) { destSize += pow(10, count - j - 1) * digits[j]; } int sourceSize = 0; count = 0; c = source.get(); while (c != '\n') { digits[count] = c - '0'; c = source.get(); count++; } for (int j = count - 1; j > -1; j--) { sourceSize += pow(10, count - j - 1) * digits[j]; } delete[] digits; char* srcBuffer = new char[(long long)sourceSize + 1]; srcBuffer[sourceSize] = '\0'; count = 0; while (count < sourceSize) { srcBuffer[count] = source.get(); count++; } source.close(); char* destBuffer = uncompress(srcBuffer, destSize); delete[] srcBuffer; int destDataSize = 0; char* destData = BurrowsWheelerTransform::inverseTransform(destBuffer); delete[] destBuffer; fstream dest(destFile, std::ofstream::out | std::ofstream::trunc); dest.write(destData, (long long)destSize - 2); dest.flush(); delete[] destData; dest.close();*/ fstream source(sourceFile); char* digits = new char[30](); fstream dest(destFile, std::ofstream::out | std::ofstream::trunc); while (true) { char c = source.get(); if (c - '0' > 9 || c - '0' < 0) { break; } int count = 0; while (c != '\n') { digits[count] = c - '0'; c = source.get(); count++; } int destSize = 0; for (int j = count - 1; j > -1; j--) { destSize += pow(10, count - j - 1) * digits[j]; } int sourceSize = 0; count = 0; c = source.get(); while (c != '\n') { digits[count] = c - '0'; c = source.get(); count++; } for (int j = count - 1; j > -1; j--) { sourceSize += pow(10, count - j - 1) * digits[j]; } char* srcBuffer = new char[(long long)sourceSize + 1]; srcBuffer[sourceSize] = '\0'; count = 0; while (count < sourceSize) { srcBuffer[count] = source.get(); count++; } char* destBuffer = uncompress(srcBuffer, destSize); delete[] srcBuffer; int destDataSize = 0; char* destData = BurrowsWheelerTransform::inverseTransform(destBuffer); delete[] destBuffer; dest.write(destData, (long long)destSize - 2); delete[] destData; } delete[] digits; source.close(); dest.flush(); dest.close(); }
[ "kietnguyen10112000@gmail.com" ]
kietnguyen10112000@gmail.com
e1cac3653508573004f9e3ebcb5a055e5b975bd4
4a152b3cf3a893d42d3bfc9019c1549e04611e67
/Project4/Exception.cpp
97b429134da80e83d04f3c1e5c62308d0217e766
[]
no_license
Dudley1337/KRTP
0f44629cc49723e8c4cc05b86bbec14d59c343ac
7d8e2bdc7dda95e078c5b997b502fa22305f462d
refs/heads/master
2022-12-21T23:34:08.182342
2020-09-20T17:14:56
2020-09-20T17:14:56
295,233,438
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
892
cpp
#include "Header.h" #include "Exception.h" bool Exception::is_digit(int& digit, string text) { char _digit[10]; try { printf("%s", text.c_str()); cin >> _digit; for (int i = 0; i < strlen(_digit); i++) if (!isdigit(_digit[i])) throw 1641; digit = atoi(_digit); return false; } catch (const int& ex) { cout << "Ошибка при вводе данных!" << endl << "Код ошибки: #" << ex << endl << "Введите данные ещё раз:\t" << endl; return true; } } bool Exception::diapazon(int digit, int left_border, int right_border) { try { if ((digit < left_border) || (digit > right_border)) throw 222; return false; } catch (const int& ex) { cout << "Ошибка при вводе данных!" << endl << "Код ошибки: #" << ex << endl << "Введите данные ещё раз:\t" << endl; return true; } }
[ "solart98@mail.ru" ]
solart98@mail.ru
2e7c39d23ca63a0ae17c0003f238e88b89bf87cc
74df38a101725d649d0c0e15e2d436141c0254b5
/SquidDestiny/Title.h
bfc6d5c5a996dc54a15151075e14f9dfbfe1e9a6
[]
no_license
totopizza/SquidDestiny
2bf9314da48f6fe0c282782bc20ede4a906399f1
37e1e2afc045d9299fe404a1aa764f3d41852a45
refs/heads/master
2020-07-12T22:10:45.333380
2017-03-20T22:45:00
2017-03-20T22:45:00
85,540,137
0
1
null
2017-03-20T06:57:01
2017-03-20T05:53:34
HTML
UTF-8
C++
false
false
242
h
# pragma once # include <Siv3D.hpp> # include "SceneBase.h" class Title : public MyGame::Scene { private: Texture background; Vec2 windowCenter; public: void init() override; void update() override; void draw() const override; };
[ "gren6158@yahoo.co.jp" ]
gren6158@yahoo.co.jp
f8faabd484986ca4b5f62b183d18f93b8f55e6d4
efda3f8fcc5e172f18a611e50492e6f67279d549
/gNet/TcpClient.cpp
371142bbcbb6da6fb378fe4fd759c41de2c00be9
[]
no_license
fgmiracle/gNet
65ea91d8388b2570429eb97e1611c8efe7e8406d
0acf2b18234e112a3842ecea8969632e5f267417
refs/heads/master
2020-08-25T02:18:39.845610
2019-10-23T02:48:27
2019-10-23T02:54:37
216,947,673
4
0
null
null
null
null
UTF-8
C++
false
false
4,391
cpp
#include "TcpClient.h" namespace gNet { TcpClient::TcpClient(DataModel model, uint32_t maxSendSize, uint32_t maxRecvSize) : bRunning (false) , netCallBack(nullptr) , mModel (model) , maxPackSize(64*1024) , mConnector(nullptr) { UNUSE(maxSendSize); UNUSE(maxRecvSize); #ifdef _WIN32 WORD version = MAKEWORD(2, 2); WSADATA d; if (WSAStartup(version, &d) != 0) { assert(0); } #endif handlerThreads = std::make_shared<EventLoopThreadPool>(); handlerThreads->setThreadNum(1); handlerThreads->start(); const auto& ioLoop = handlerThreads->getNextLoop(); mConnector = std::make_shared<Connector>(ioLoop.get(),std::bind(&TcpClient::addNewConnection,this, std::placeholders::_1, std::placeholders::_2)); } TcpClient::~TcpClient() { #ifdef _WIN32 WSACleanup(); #endif clearClients(); } void TcpClient::setCallback(NetCallback &&callBack) { netCallBack = std::move(callBack); } void TcpClient::setPackarse(NetPackParse::PTR parse) { mNetPackParse = parse; } uint32_t TcpClient::connectServer(std::string ip, uint16_t port, bool isIpv6) { const auto& ioLoop = handlerThreads->getNextLoop(); return mConnector->connectRemote(ioLoop.get(), ip, port, isIpv6); } void TcpClient::update() { } void TcpClient::clearClients() { handlerThreads->stop(); connectionMap.clear(); } void TcpClient::addNewConnection(Channel::ChannelPtr conn, bool succ) { if (!succ) { netCallBack(conn, NET_Disconnected, nullptr, 0); return; } conn->setDataCallback([this](LinearBuffer* buf, Channel::ChannelPtr conn) { if (buf->readableBytes() > maxPackSize) { std::cout << conn->getName() << " recv buff is full. will close it" << std::endl << std::flush; conn->shutDown(); return; } if (mNetPackParse != nullptr) { uint32_t bufLen = 0; uint16_t offset = mNetPackParse->parseData(buf->beginRead(), buf->readableBytes(), &bufLen); if (bufLen + offset >= buf->readableBytes()) { buf->hasRead(offset); if (mModel == PushData) { netCallBack(conn, NET_PushData, buf->beginRead(), bufLen); } else { PullInfo updateMsg; updateMsg.conn = conn; updateMsg.model = NET_PushData; updateMsg.msg = std::move(std::string(buf->beginRead(), bufLen)); while (!mUpdateMsg.enqueue(std::move(updateMsg))) { } } buf->hasRead(bufLen); } } else if (buf->readableBytes() >= DEFBUFLEN) { uint16_t bufLen = buf->readUint16(); if (buf->readableBytes() + DEFBUFLEN >= bufLen) { buf->hasRead(DEFBUFLEN); if (mModel == PushData) { netCallBack(conn, NET_PushData, buf->beginRead(), bufLen); } else { PullInfo updateMsg; updateMsg.conn = conn; updateMsg.model = NET_PushData; updateMsg.msg = std::move(std::string(buf->beginRead(), bufLen)); while (!mUpdateMsg.enqueue(std::move(updateMsg))) { } } buf->hasRead(bufLen); } } }); conn->setDisCallback([this](Channel::ChannelPtr conn) { if (mModel == PushData) { netCallBack(conn, NET_Disconnected, nullptr, 0); } else { PullInfo updateMsg; updateMsg.conn = conn; updateMsg.model = NET_Disconnected; while (!mUpdateMsg.enqueue(std::move(updateMsg))) { } } this->removeConnection(conn); }); conn->setConCallback([this](Channel::ChannelPtr conn) { if (mModel == PushData) { netCallBack(conn, NET_Connected, nullptr, 0); } else { PullInfo updateMsg; updateMsg.conn = conn; updateMsg.model = NET_Connected; while (!mUpdateMsg.enqueue(std::move(updateMsg))) { } } }); conn->setNetPack(maxPackSize); conn->getLoop()->pushAsyncProc(std::bind(&Channel::connectEstablished, conn)); connectionMap[conn->getName()] = conn; } void TcpClient::removeConnection(Channel::ChannelPtr conn) { SpinLock lock(m_Lock); removeConnectionInLoop(conn); //mMainLoop.pushAsyncProc(std::bind(&TcpClient::removeConnectionInLoop, this, conn)); } void TcpClient::removeConnectionInLoop(Channel::ChannelPtr conn) { std::cout << "NET_Disconnected --> " << conn->getName() << std::endl; size_t n = connectionMap.erase(conn->getName()); (void)n; assert(n == 1); EventLoop* ioLoop = conn->getLoop(); ioLoop->pushAsyncProc(std::bind(&Channel::connectDestroyed, conn)); } }
[ "miracle@yangeit.com" ]
miracle@yangeit.com
9ccc710cab3f883e979d950e548b788831890ea2
81a4b1dcd95b887e67e1c276dbb75bef67ffbfc8
/算法代码/超级玛丽游戏.cpp
d9c3f46682cb23d27c171852bed573d238453982
[]
no_license
newshelan/algorithm-problem
0cdc219ef05fd281553a5164deda2387c8fd2615
74957f91e0a8f4c04c4048a6de45a75ee1e72a69
refs/heads/master
2020-04-14T20:17:32.542835
2019-03-12T05:08:41
2019-03-12T05:08:41
164,088,363
1
0
null
null
null
null
UTF-8
C++
false
false
1,480
cpp
#include<stdio.h> int main() { printf(" ********\n"); printf(" ************\n"); printf(" ####....#.\n"); printf(" #..###.....##....\n"); printf(" ###.......###### ### ###\n"); printf(" ........... #...# #...#\n"); printf(" ##*####### #.#.# #.#.#\n"); printf(" ####*******###### #.#.# #.#.#\n"); printf(" ...#***.****.*###.... #...# #...#\n"); printf(" ....**********##..... ### ###\n"); printf(" ....**** *****....\n"); printf(" #### ####\n"); printf(" ###### ######\n"); printf("##############################################################\n"); printf("#...#......#.##...#......#.##...#......#.##------------------#\n"); printf("###########################################------------------#\n"); printf("#..#....#....##..#....#....##..#....#....#####################\n"); printf("########################################## #----------#\n"); printf("#.....#......##.....#......##.....#......# #----------#\n"); printf("########################################## #----------#\n"); printf("#.#..#....#..##.#..#....#..##.#..#....#..# #----------#\n"); printf("########################################## ############\n"); return 0; }
[ "1145565078@qq.com" ]
1145565078@qq.com
245caa2930e485880d67a723d9b439df59956da1
353bd39ba7ae46ed521936753176ed17ea8546b5
/src/layer1_system/randomizer/src/axrd_seed.cpp
a5122a21c7a77827a7d5e5bdde1d674e3df23245
[]
no_license
d0n3val/axe-engine
1a13e8eee0da667ac40ac4d92b6a084ab8a910e8
320b08df3a1a5254b776c81775b28fa7004861dc
refs/heads/master
2021-01-01T19:46:39.641648
2007-12-10T18:26:22
2007-12-10T18:26:22
32,251,179
1
0
null
null
null
null
UTF-8
C++
false
false
858
cpp
/** * @file * Get / Set the randomizer seed * @author Ricard Pillosu <d0n3val\@gmail.com> * @date 18 Apr 2004 */ #include "axrd_stdafx.h" /** * Sets current seed and generates random numbers */ AXRD_API void axrd_set_seed( const unsigned long seed ) { // Disconnect "fixed data" mode state.fixed_data_mode = false; // set current seed state.randomizer.init(seed); // create some random numbers for future use for( register int i = 0; i < AXRD_BUFFER_SIZE; ++i ) { state.numbers[i] = state.randomizer.get_ulong(); } state.init = true; } /** * Gets current seed */ AXRD_API unsigned long axrd_get_seed( ) { if ( state.fixed_data_mode ) { return(state.fixed_seed); } else { return(state.randomizer.seed); } } /* $Id: axrd_seed.cpp,v 1.1 2004/05/02 16:32:32 doneval Exp $ */
[ "d0n3val@2cff7946-3f3c-0410-b79f-f9b517ddbf54" ]
d0n3val@2cff7946-3f3c-0410-b79f-f9b517ddbf54
9388a111a9df14079a5d10dfad1d9a0e6042302e
5aa2ac0ea93ea032e4204a1af1dbf86c5d315b2b
/MMO RPG/InventoryItem.h
b590e84d03c4efd6ca46100a98a0e3d07f8c5d42
[]
no_license
opxdo/MMO-RPG
5a4c28381b44fb9ff76a2681e559c6d3483f5eb4
1e36b5e85adfc0b63f581192e7fb19b84add4f9f
refs/heads/master
2023-08-04T12:31:57.646863
2019-02-23T13:19:20
2019-02-23T13:37:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,373
h
#pragma once #include "Graphics.h" #include "Sprite.h" #include "Draggable.h" class InventoryItem : public Draggable { public: enum class EquipmentType { Unknown, Gloves, Ring, Shield, Weapon, Hat, Cape, BodyArmor, Trousers, Boots }; public: enum class Equipment { SharpSword = 1, LongSword, //ManaPotion, //HealthPotion, //UndefinedPotion, LightArmor = 8, MediumArmor, HeavyArmor, WeakCape, MediumCape, StrongCape, //Undefined, //WhiteRibbon = 16, //PinkRibbon, //DarkCyanRibbon, //RedRibbon, //LightCyanRibbon, //YellowRibbon, LightRobe = 22, MediumRobe, MultiPurposeStaff, //Card1, //Card2, //Card3, //Card4, //Scroll, HeavyRobe = 30, MagicStaff = 32, BasicStaff, //Book?, //Bottle, //Sphere, //Mushroom, SpeedRing = 38, StrengthRing, SlashSword = 41, StabSword, //Backpack, //Acorn, //?? //?? LightBow = 48, BasicArmor, Spear, ThreadedSpear, //Cape?, //Chest? HeavyBow = 56, RedDiamond, BlueDiamond, CyanCiamond }; public: InventoryItem(const Equipment equipment, const sf::IntRect rectangle); public: void Render(const Graphics& gfx, const sf::FloatRect location); EquipmentType GetEquipmentType() const; bool IsAt(const sf::Vector2f point) const override; private: EquipmentType type; Equipment equipment; Sprite sprite; };
[ "kozichka01@abv.bg" ]
kozichka01@abv.bg
95c4caed9a3228f409d9f46b9d11bc09740de73b
03916ad00bf2ab56e7d3c5ea80ab900abea040c8
/Common_3/ThirdParty/OpenSource/hlslparser/Parser/Parser/Parser.h
571f15b90094fb49e610ba1891fa1afd6536b76e
[ "Apache-2.0", "MIT" ]
permissive
erwincoumans/The-Forge
3bab94e8649d0fe070e2d5ae7ccf1484c23f44a2
d0b3ed153f5b740e9cbebc118eff232f71728f2b
refs/heads/master
2021-05-10T15:28:31.608416
2018-09-07T21:12:04
2018-09-07T21:12:04
118,551,189
1
0
null
2018-01-23T03:16:46
2018-01-23T03:16:46
null
UTF-8
C++
false
false
475
h
#pragma once #include "HLSLParser.h" #include "GLSLGenerator.h" #include "HLSLGenerator.h" #include "MSLGenerator.h" #include <fstream> #include <sstream> #include <iostream> class Parser { public: static const char* ParserEntry(char* RESULT, const char* fileName, const char* buffer, size_t bufferSize, const char* entryName, const char* shader, const char* _language, const char* bufferForInlcuded[], int includedCounter); static void PrintUsage(); };
[ "jenkins@conffx.com" ]
jenkins@conffx.com
30cff6670577dfb7efafad9ffa51dccf229357a3
57fa84e55f5944a435ec2510bfc9a64532ab9d92
/src/span.h
f9999ab3d72e970099f4742a43250ab4319e0b49
[ "MIT" ]
permissive
barrystyle/deftchain-0.17
133d3bffec152738166a01bd14d6d2a26962432a
d93b9307d8919117b10129a2828cb98833a1c9a1
refs/heads/master
2020-04-17T01:26:28.232962
2018-09-30T12:18:20
2018-09-30T12:20:27
166,091,970
0
2
null
null
null
null
UTF-8
C++
false
false
3,053
h
// Copyright (c) 2018 The Bitcoin Core developers // Copyright (c) 2018 The Deftchain developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef DEFTCHAIN_SPAN_H #define DEFTCHAIN_SPAN_H #include <type_traits> #include <cstddef> #include <algorithm> /** A Span is an object that can refer to a contiguous sequence of objects. * * It implements a subset of C++20's std::span. */ template<typename C> class Span { C* m_data; std::ptrdiff_t m_size; public: constexpr Span() noexcept : m_data(nullptr), m_size(0) {} constexpr Span(C* data, std::ptrdiff_t size) noexcept : m_data(data), m_size(size) {} constexpr Span(C* data, C* end) noexcept : m_data(data), m_size(end - data) {} constexpr C* data() const noexcept { return m_data; } constexpr C* begin() const noexcept { return m_data; } constexpr C* end() const noexcept { return m_data + m_size; } constexpr std::ptrdiff_t size() const noexcept { return m_size; } constexpr C& operator[](std::ptrdiff_t pos) const noexcept { return m_data[pos]; } constexpr Span<C> subspan(std::ptrdiff_t offset) const noexcept { return Span<C>(m_data + offset, m_size - offset); } constexpr Span<C> subspan(std::ptrdiff_t offset, std::ptrdiff_t count) const noexcept { return Span<C>(m_data + offset, count); } constexpr Span<C> first(std::ptrdiff_t count) const noexcept { return Span<C>(m_data, count); } constexpr Span<C> last(std::ptrdiff_t count) const noexcept { return Span<C>(m_data + m_size - count, count); } friend constexpr bool operator==(const Span& a, const Span& b) noexcept { return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin()); } friend constexpr bool operator!=(const Span& a, const Span& b) noexcept { return !(a == b); } friend constexpr bool operator<(const Span& a, const Span& b) noexcept { return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end()); } friend constexpr bool operator<=(const Span& a, const Span& b) noexcept { return !(b < a); } friend constexpr bool operator>(const Span& a, const Span& b) noexcept { return (b < a); } friend constexpr bool operator>=(const Span& a, const Span& b) noexcept { return !(a < b); } }; /** Create a span to a container exposing data() and size(). * * This correctly deals with constness: the returned Span's element type will be * whatever data() returns a pointer to. If either the passed container is const, * or its element type is const, the resulting span will have a const element type. * * std::span will have a constructor that implements this functionality directly. */ template<typename A, int N> constexpr Span<A> MakeSpan(A (&a)[N]) { return Span<A>(a, N); } template<typename V> constexpr Span<typename std::remove_pointer<decltype(std::declval<V>().data())>::type> MakeSpan(V& v) { return Span<typename std::remove_pointer<decltype(std::declval<V>().data())>::type>(v.data(), v.size()); } #endif
[ "barrystyle@westnet.com.au" ]
barrystyle@westnet.com.au
40493627312a352004b89e07e119ba32659717ee
192aee8f1a9a7c7ed78681fed9b19bdb7041dd85
/BCW5/some/Unit.h
b99a1db22a9596139ff657945739eae791281c5b
[]
no_license
Nisaiy/DeveloperClub
31e162216a3dcdcd69e38354918204e02b8d214f
d2c0647f6ef09c4b6c38c35412b4204c7411c6a4
refs/heads/master
2016-08-12T15:44:12.442777
2015-12-02T13:25:29
2015-12-02T13:25:29
47,261,716
0
0
null
null
null
null
UTF-8
C++
false
false
806
h
#ifndef UNIT_H #define UNIT_H #include "State.h" #include "Weapon.h" #include "Exceptions.h" class Weapon; class Unit { protected: State* state; Weapon* weapon; void isAlive(); public: Unit(const std::string& name="Unit", int hp=100, int mp=100); virtual ~Unit(); const State& getState() const; const Weapon& getWeapon() const; void setName(const std::string& newName); void setState(State* newState); virtual void attack(Unit* enemy) = 0; void takeDamage(int dmg); virtual void takeMagicDamage(int magicDmg); void addHp(int amount); void changeWeapon(Weapon* newWeapon); void turnToVampire(); }; std::ostream& operator<<(std::ostream& out, const Unit& unit); #endif
[ "zozuliy@gmail.com" ]
zozuliy@gmail.com
78e26f32201dc558b50fcbeebeb04ae87dcf92a2
f0daf25e4a727936eae431ef1964e141da4709d0
/OpenGLPracticeWithPPT/28.WavingFloor/CCameraManager.h
23af75773c23ba68bcabaa1fa6766fb09f9dac54
[]
no_license
newmri/ComputerGraphics
23e5bdea2c835b11335897f81cbaa7288134ca24
ffb54c9a6b5dde66a266c2c4c3816c33e6cc723b
refs/heads/master
2021-03-12T19:51:05.110496
2018-01-04T09:12:30
2018-01-04T09:12:30
102,877,860
0
0
null
null
null
null
UTF-8
C++
false
false
1,453
h
#pragma once struct Vector3 { float x, y, z; Vector3() { x = 0.0f, y = 0.0f, z = 0.0f; } Vector3(float x, float y, float z) : x(x), y(y), z(z) {}; Vector3(float x, float y) : x(x), y(y) {}; Vector3 operator-(const Vector3& other) { return Vector3(x - other.x, y - other.y, z - other.z); } void Normalize() { x = x / this->GetLength(); y = y / this->GetLength(); z = z / this->GetLength(); } Vector3 GetNormalized() { return Vector3(x / this->GetLength(), y / this->GetLength(), z / this->GetLength()); } float GetDot(const Vector3& other) { return (x * other.x) + (y * other.y) + (z * other.z); } Vector3 GetCross(const Vector3& other) { return Vector3((y * other.z - other.y * z), (z*other.x - other.z - x), (x * other.y - other.x * y)); } double GetLength() { return sqrt((x * x) + (y * y) + (z * z)); } }; class CCameraManager { public: static CCameraManager* GetInstance() { if (m_instance == nullptr) m_instance = new CCameraManager; return m_instance; } CCameraManager() { this->Init(); } public: void Init(); void Reset(); void Update(); public: void SetPos(const Vector3 pos) { m_pos = pos; } void SetRotate(const unsigned char rotate); void SetMove(const unsigned char key); public: Vector3& GetPos() { return m_pos; } public: void Rotate(); void Move(); private: static CCameraManager* m_instance; Vector3 m_rotate; float m_angle, m_angleIn; Vector3 m_pos; };
[ "newmri@naver.com" ]
newmri@naver.com
66178dcce58ef6b786ed8d8b5a83a447b859dada
5838cf8f133a62df151ed12a5f928a43c11772ed
/NT/enduser/netmeeting/ui/conf/rtoolbar.cpp
fe97c17f75891743c033940f661c56422fd3e1d6
[]
no_license
proaholic/Win2K3
e5e17b2262f8a2e9590d3fd7a201da19771eb132
572f0250d5825e7b80920b6610c22c5b9baaa3aa
refs/heads/master
2023-07-09T06:15:54.474432
2021-08-11T09:09:14
2021-08-11T09:09:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
44,737
cpp
// File: rtoolbar.cpp #include "precomp.h" #include "RToolbar.h" #include "GenContainers.h" #include "GenControls.h" #include "Conf.h" #include "ConfRoom.h" #include "RoomList.h" #include "particip.h" #include "VidView.h" #include "ProgressBar.h" #include "AudioCtl.h" #include "CallingBar.h" #include "resource.h" #include "topWindow.h" #include "dlgCall2.h" #include "ulswizrd.h" #include "audiowiz.h" #include "sdialdlg.h" #include "callto.h" #define ZeroArray(_a) ZeroMemory(_a, sizeof(_a)) void ShiftFocus(HWND hwndTop, BOOL bForward); class CRemoteVideo : public CVideoWindow { public: CRemoteVideo(BOOL bEmbedded = FALSE) : CVideoWindow(REMOTE, bEmbedded) { } // Stick the child in the lower-right corner of the window virtual void Layout() { CVideoWindow::Layout(); HWND hwnd = GetWindow(); HWND hwndLocal = GetFirstChild(hwnd); if (NULL != hwndLocal) { RECT rcRemote; GetClientRect(hwnd, &rcRemote); int left = rcRemote.right *5/8; int top = rcRemote.bottom *5/8; SetWindowPos(hwndLocal, NULL, left, top, rcRemote.right-left, rcRemote.bottom-top, SWP_NOZORDER); } } } ; // This just exists to send WM_NOTIFY messages back to the Roster class CRosterParent : public CFillWindow { private: CRoomListView *m_pRoster; void OnContextMenu(HWND hwnd, HWND hwndContext, UINT xPos, UINT yPos) { POINT pt = { xPos, yPos }; CRoomListView *pView = GetRoster(); if ((NULL != pView) && (pView->GetHwnd() == hwndContext)) { pView->OnPopup(pt); } FORWARD_WM_CONTEXTMENU(hwnd, hwndContext, xPos, yPos, CFillWindow::ProcessMessage); } inline LRESULT RosterNotify(CRoomListView *pRoster, UINT uMsg, WPARAM wParam, LPARAM lParam) { return(pRoster->OnNotify(wParam, lParam)); } // Just forward to the Roster LRESULT OnNotify(HWND hwnd, int id, NMHDR *pHdr) { // pass on all notifications: if (ID_LISTVIEW == pHdr->idFrom) { CRoomListView *pView = GetRoster(); if (NULL != pView) { // Forward to the roster return(FORWARD_WM_NOTIFY(pView, id, pHdr, RosterNotify)); } } return(FORWARD_WM_NOTIFY(hwnd, id, pHdr, CFillWindow::ProcessMessage)); } protected: ~CRosterParent() { // delete can handle NULL delete m_pRoster; } virtual LRESULT ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { HANDLE_MSG(hwnd, WM_NOTIFY, OnNotify); HANDLE_MSG(hwnd, WM_CONTEXTMENU, OnContextMenu); case WM_DESTROY: delete m_pRoster; m_pRoster = NULL; break; } return(CFillWindow::ProcessMessage(hwnd, uMsg, wParam, lParam)); } public: CRosterParent() : m_pRoster(NULL) {} BOOL Create(HWND hwndParent) { m_pRoster = new CRoomListView(); if (NULL == m_pRoster) { return(FALSE); } if (!CFillWindow::Create(hwndParent, 0)) { return(FALSE); } return(m_pRoster->Create(GetWindow())); } CRoomListView *GetRoster() const { return(m_pRoster); } } ; CToolbar *CreateToolbar( CGenWindow *pParent, const Buttons buttons[]=NULL, int nButtons=0, LPARAM lHideModes=0, DWORD dwExStyle=0 ); #define ReleaseIt(pUnk) if (NULL != (pUnk)) { (pUnk)->Release(); (pUnk) = NULL; } enum CheckStates { Unchecked = 0, Checked = 1, } ; const static int MainHMargin = 8; const static int MainVMargin = 5; const static int MainGap = 4; const static int SunkenHMargin = 8; const static int SunkenVMargin = 2; const static int ButtonsGap = 12; const static int AudioMax = 100; const static int AudioVolMax = 0xffff; const static int AudioBump = 10; enum MainTimers { IDT_AUDIO = 1, } ; // Set these bits in the hide mode to hide in certain situations enum HideModes { Inherit = 0x0000, Normal = 0x0001, Compact = 0x0002, DataOnly = 0x0004, NoAVTB = 0x0008, Roster = 0x0010, AudioTuning = 0x0020, Dialing = 0x0040, Receiving = 0x0080, ReceivingWPiP = 0x0100, Previewing = 0x0200, Video = Receiving|ReceivingWPiP|Previewing, Ignore = 0x4000, IfNoChildren = 0x8000, } ; // Sets the hide mode bits on a window static inline void SetHideModes(CGenWindow *pWin, LPARAM modes) { if (NULL != pWin) { pWin->SetUserData(modes); } } // Gets the hide mode bits on a window static inline LPARAM GetHideModes(IGenWindow *pWin) { return(pWin->GetUserData()); } CMainUI::CMainUI() : m_hbBack(NULL), m_eViewMode(ViewNormal), m_pLocalVideo(NULL), m_pRemoteVideo(NULL), m_pAudioMic(NULL), m_pAudioSpeaker(NULL), m_pRoster(NULL), m_pCalling(NULL), m_bDialing(FALSE), m_bAudioTuning(FALSE), m_bPreviewing(TRUE), m_bPicInPic(FALSE), m_bStateChanged(FALSE), m_bShowAVTB(FALSE) { } CMainUI::~CMainUI() { if (NULL != m_hbBack) { DeleteObject(m_hbBack); m_hbBack = NULL; } ReleaseIt(m_pLocalVideo); ReleaseIt(m_pRemoteVideo); ReleaseIt(m_pAudioMic); ReleaseIt(m_pAudioSpeaker); ReleaseIt(m_pRoster); ReleaseIt(m_pCalling); } void SplitBitmap(UINT nCols, UINT nRows, HBITMAP hbmSrc, HBITMAP hbmDst[]) { BITMAP bm; GetObject(hbmSrc, sizeof(bm), &bm); int nWid = bm.bmWidth / nCols; int nHgt = bm.bmHeight / nRows; HDC hdcScreen = GetDC(NULL); HDC hdcSrc = CreateCompatibleDC(hdcScreen); HDC hdcDst = CreateCompatibleDC(hdcScreen); ReleaseDC(NULL, hdcScreen); if (NULL != hdcSrc && NULL != hdcDst) { SelectObject(hdcSrc, hbmSrc); for(UINT i=0; i<nRows; ++i) { for (UINT j=0; j<nCols; ++j) { HBITMAP hbmTemp = CreateCompatibleBitmap(hdcSrc, nWid, nHgt); if (NULL != hbmTemp) { SelectObject(hdcDst, hbmTemp); BitBlt(hdcDst, 0, 0, nWid, nHgt, hdcSrc, j*nWid, i*nHgt, SRCCOPY); } hbmDst[i*nCols + j] = hbmTemp; } } } DeleteDC(hdcSrc); DeleteDC(hdcDst); } // Helper function for adding a bunch of buttons to a parent window void AddButtons( CGenWindow *pParent, // The parent window const Buttons buttons[], // Array of structures describing the buttons int nButtons, // Number of buttons to create BOOL bTranslateColors, // Use system background colors CGenWindow *pCreated[], // Created CGenWindow's will be put here IButtonChange *pNotify // Notification of clicks ) { if (NULL == buttons) { // Nothing to do return; } HWND hwnd = pParent->GetWindow(); for (int i=0; i<nButtons; ++i) { if (NULL != pCreated) { // Init in case of error pCreated[i] = NULL; } CBitmapButton *pButton; pButton = new CBitmapButton(); if (NULL == pButton) { continue; } // Create the actual window if (!pButton->Create(hwnd, buttons[i].idCommand, _Module.GetModuleInstance(), buttons[i].idbStates, bTranslateColors, buttons[i].nInputStates, buttons[i].nCustomStates, pNotify)) { pButton->Release(); continue; } // Save off the created button if requested if (NULL != pCreated) { // HACKHACK georgep: Not AddRef'ing; will let caller do that if interested pCreated[i] = pButton; } if (0 != buttons[i].idTooltip) { USES_RES2T pButton->SetTooltip(RES2T(buttons[i].idTooltip)); pButton->SetWindowtext(RES2T(buttons[i].idTooltip)); } // By default, do not hide individual buttons SetHideModes(pButton, Ignore); // Release our reference to the button pButton->Release(); } } CToolbar *CreateToolbar( CGenWindow *pParent, const Buttons buttons[], int nButtons, LPARAM lHideModes, DWORD dwExStyle ) { CToolbar *ret; ret = new CToolbar(); if (NULL == ret) { return(NULL); } if (!ret->Create(pParent->GetWindow(), dwExStyle)) { ret->Release(); return(NULL); } SetHideModes(ret, lHideModes); AddButtons(ret, buttons, nButtons, TRUE); return(ret); } void CMainUI::CreateDialTB(CGenWindow *pParent) { // Create the toolbar m_pCalling = new CCallingBar(); if (NULL != m_pCalling) { SetHideModes(m_pCalling, Compact); m_pCalling->Create(pParent, m_pConfRoom); // m_pCalling->Release(); } } void CMainUI::CreateAppsTB(CGenWindow *pParent) { const static int AppsHMargin = 5; const static int AppsVMargin = 0; const static int AppsHGap = 11; static const Buttons appButtons[] = { { IDB_SHARE , CBitmapButton::Disabled+1, 1, ID_TB_SHARING , IDS_TT_TB_SHARING , }, { IDB_CHAT , CBitmapButton::Disabled+1, 1, ID_TB_CHAT , IDS_TT_TB_CHAT , }, { IDB_WHITEBOARD , CBitmapButton::Disabled+1, 1, ID_TB_NEWWHITEBOARD , IDS_TT_TB_NEWWHITEBOARD , }, { IDB_FILE_TRANSFER , CBitmapButton::Disabled+1, 1, ID_TB_FILETRANSFER , IDS_TT_TB_FILETRANSFER , }, } ; // Create the "data" buttons toolbar CToolbar *pApps = CreateToolbar(pParent, appButtons, ARRAY_ELEMENTS(appButtons), Compact); if (NULL != pApps) { // HACKHACK georgep: These numbers make it appear about right pApps->m_hMargin = AppsHMargin; pApps->m_vMargin = AppsVMargin; pApps->m_gap = AppsHGap; // pApps->m_bMinDesiredSize = TRUE; pApps->Release(); } } void CMainUI::CreateVideoAndAppsTB(CGenWindow *pParent, CreateViewMode eMode, BOOL bEmbedded) { CLayeredView::LayoutStyle lVidDialStyle = CLayeredView::Center; switch (eMode) { case CreateFull: case CreatePreviewOnly: case CreateRemoteOnly: case CreateTelephone: break; case CreatePreviewNoPause: case CreateRemoteNoPause: lVidDialStyle = CLayeredView::Fill; break; default: return; } // Create the toolbar CBorderWindow *pVideoAndCalling = new CBorderWindow(); if (NULL != pVideoAndCalling) { if (pVideoAndCalling->Create(pParent->GetWindow())) { SetHideModes(pVideoAndCalling, DataOnly); pVideoAndCalling->m_hGap = 4; pVideoAndCalling->m_vGap = 4; // This is the center part of the border window CLayeredView *pVidAndDial = new CLayeredView(); if (NULL != pVidAndDial) { if (pVidAndDial->Create(pVideoAndCalling->GetWindow())) { pVideoAndCalling->m_uParts |= CBorderWindow::Center; pVidAndDial->m_lStyle = lVidDialStyle; CGenWindow *pLocalParent = pVidAndDial; if (CreateFull == eMode || CreateTelephone == eMode ) { CreateDialingWindow(pVidAndDial); } if (CreateFull == eMode || CreateRemoteOnly == eMode || CreateRemoteNoPause == eMode ) { // Create the remote video window m_pRemoteVideo = new CRemoteVideo(bEmbedded); if (NULL != m_pRemoteVideo) { SetHideModes(m_pRemoteVideo, Dialing|Previewing|DataOnly); m_pRemoteVideo->Create(pVidAndDial->GetWindow(), GetPalette(), this); pLocalParent = m_pRemoteVideo; } } if (CreateFull == eMode || CreatePreviewOnly == eMode || CreatePreviewNoPause == eMode ) { // Create the local video window, even though we don't show it yet m_pLocalVideo = new CVideoWindow(CVideoWindow::LOCAL, bEmbedded); if (NULL != m_pLocalVideo) { SetHideModes(m_pLocalVideo, Dialing|Receiving|DataOnly); m_pLocalVideo->Create(pLocalParent->GetWindow(), GetPalette(), this); ShowWindow(m_pLocalVideo->GetWindow(), SW_HIDE); } } } pVidAndDial->Release(); } if (CreateFull == eMode || CreateTelephone == eMode ) { // create the toolbar static const Buttons abOsr2Calling[] = { { IDB_DIAL , CBitmapButton::Disabled+1, 1, ID_TB_NEW_CALL , IDS_TT_TB_NEW_CALL , }, { IDB_HANGUP , CBitmapButton::Disabled+1, 1, IDM_FILE_HANGUP, IDS_TT_FILE_HANGUP, }, { IDB_DIRECTORY, CBitmapButton::Disabled+1, 1, ID_TB_DIRECTORY, IDS_TT_TB_DIRECTORY, }, { IDB_SHOWAV , CBitmapButton::Hot+1, Checked+1, ID_TB_SHOWAVTB , IDS_TT_TB_SHOWAVTB , }, } ; CGenWindow *agwOsr2Calling[ARRAY_ELEMENTS(abOsr2Calling)]; // This is the right-hand part of the border window CToolbar *ptbOsr2Calling = CreateToolbar(pVideoAndCalling, NULL, 0, DataOnly); if (NULL != ptbOsr2Calling) { pVideoAndCalling->m_uParts |= CBorderWindow::Right; ptbOsr2Calling->m_bVertical = TRUE; ptbOsr2Calling->m_nAlignment = Center; ZeroArray(agwOsr2Calling); AddButtons(ptbOsr2Calling, abOsr2Calling, ARRAY_ELEMENTS(abOsr2Calling), TRUE, agwOsr2Calling); SetHideModes(agwOsr2Calling[0], Normal); SetHideModes(agwOsr2Calling[3], Normal); ptbOsr2Calling->m_uRightIndex = 3; ptbOsr2Calling->Release(); } } // This is the bottom part of the border window CreateAVTB(pVideoAndCalling, eMode); pVideoAndCalling->m_uParts |= CBorderWindow::Bottom; } pVideoAndCalling->Release(); } } void CMainUI::CreateAVTB(CGenWindow *pParent, CreateViewMode eMode) { switch (eMode) { case CreateFull: case CreatePreviewOnly: case CreateRemoteOnly: break; default: return; } const static int AVHMargin = 10; const static int AVVMargin = 2; const static int AVHGap = ButtonsGap; // create the toolbar static const Buttons avButtons[] = { { IDB_PLAYPAUSE, CBitmapButton::Disabled+1, 2, ID_TB_PLAYPAUSE , IDS_TT_TB_PLAYPAUSE , }, { IDB_PIP , CBitmapButton::Disabled+1, 1, ID_TB_PICINPIC , IDS_TT_TB_PICINPIC , }, { IDB_AUDIO , CBitmapButton::Disabled+1, Checked+1, ID_TB_AUDIOTUNING, IDS_TT_TB_AUDIOTUNING, }, } ; int nButtons = eMode == CreateFull ? ARRAY_ELEMENTS(avButtons) : 1; CToolbar *pAV = CreateToolbar(pParent, NULL, 0, NoAVTB|DataOnly); if (NULL != pAV) { CGenWindow *aButtons[ARRAY_ELEMENTS(avButtons)]; ZeroArray(aButtons); AddButtons(pAV, avButtons, nButtons, TRUE, aButtons); CGenWindow *pAT; // // If video is completely disabled by policy, disable video buttons // if (!FIsSendVideoAllowed() && !FIsReceiveVideoAllowed()) { pAT = aButtons[0]; if (NULL != pAT) { EnableWindow(pAT->GetWindow(), FALSE); } pAT = aButtons[1]; if (NULL != pAT) { EnableWindow(pAT->GetWindow(), FALSE); } } // // If audio is completely disabled by policy, disable audio buttons // pAT = aButtons[2]; if (NULL != pAT) { ASSERT(ID_TB_AUDIOTUNING == GetDlgCtrlID(pAT->GetWindow())); if (!FIsAudioAllowed()) { EnableWindow(pAT->GetWindow(), FALSE); } } pAV->m_hMargin = AVHMargin; pAV->m_vMargin = AVVMargin; pAV->m_gap = AVHGap; pAV->Release(); } } #if FALSE // { void CMainUI::CreateCallsTB(CGenWindow *pParent) { // create the toolbar static const Buttons callsButtons[] = { { IDB_INCOMING , CBitmapButton::Hot+1, 1, ID_TB_INCOMING , IDS_TT_TB_INCOMING , }, { IDB_HANGUP , CBitmapButton::Hot+1, 1, IDM_FILE_HANGUP , IDS_TT_FILE_HANGUP , }, { IDB_CREDENTIALS, CBitmapButton::Hot+1, 1, ID_TB_CREDENTIALS, IDS_TT_TB_CREDENTIALS, }, } ; CToolbar *pCalls = CreateToolbar(pParent, callsButtons, ARRAY_ELEMENTS(callsButtons), Compact); if (NULL != pCalls) { pCalls->Release(); } } #endif // FALSE } void CMainUI::CreateDialingWindow( CGenWindow *pParent // The parent window ) { const static int DialHMargin = 17; const static int DialVMargin = 4; const static int DialHGap = 5; const static int DialVGap = 0; CEdgedWindow *pEdge = new CEdgedWindow(); if (NULL == pEdge) { return; } SetHideModes(pEdge, Video|DataOnly); if (pEdge->Create(pParent->GetWindow())) { CToolbar *pDialing = CreateToolbar(pEdge, NULL, 0, Ignore); if (NULL != pDialing) { pDialing->m_bVertical = TRUE; pDialing->m_gap = DialVGap; pDialing->m_hMargin = DialHMargin; pDialing->m_vMargin = DialVMargin; static const Buttons dialButtons[] = { { IDB_DIAL1 , CBitmapButton::Hot+1, 1, ID_TB_DIAL1 , IDS_TT_DIALPAD, }, { IDB_DIAL2 , CBitmapButton::Hot+1, 1, ID_TB_DIAL2 , IDS_TT_DIALPAD, }, { IDB_DIAL3 , CBitmapButton::Hot+1, 1, ID_TB_DIAL3 , IDS_TT_DIALPAD, }, { IDB_DIAL4 , CBitmapButton::Hot+1, 1, ID_TB_DIAL4 , IDS_TT_DIALPAD, }, { IDB_DIAL5 , CBitmapButton::Hot+1, 1, ID_TB_DIAL5 , IDS_TT_DIALPAD, }, { IDB_DIAL6 , CBitmapButton::Hot+1, 1, ID_TB_DIAL6 , IDS_TT_DIALPAD, }, { IDB_DIAL7 , CBitmapButton::Hot+1, 1, ID_TB_DIAL7 , IDS_TT_DIALPAD, }, { IDB_DIAL8 , CBitmapButton::Hot+1, 1, ID_TB_DIAL8 , IDS_TT_DIALPAD, }, { IDB_DIAL9 , CBitmapButton::Hot+1, 1, ID_TB_DIAL9 , IDS_TT_DIALPAD, }, { IDB_DIALSTAR , CBitmapButton::Hot+1, 1, ID_TB_DIALSTAR , IDS_TT_DIALPAD, }, { IDB_DIAL0 , CBitmapButton::Hot+1, 1, ID_TB_DIAL0 , IDS_TT_DIALPAD, }, { IDB_DIALPOUND, CBitmapButton::Hot+1, 1, ID_TB_DIALPOUND, IDS_TT_DIALPAD, }, } ; for (int row=0; row<4; ++row) { CToolbar *pRowTB = CreateToolbar(pDialing); if (NULL != pRowTB) { pRowTB->m_gap = DialHGap; AddButtons(pRowTB, &dialButtons[row*3], 3, TRUE, NULL, this); pRowTB->Release(); } } pDialing->Release(); } } pEdge->Release(); } // Creates the audio-tuning window void CMainUI::CreateAudioTuningWindow( CGenWindow *pParent // The parent window ) { static const int ATHMargin = 8; static const int ATVMargin = 6; static const int ATControlWidth = 170; CToolbar *pATWindow = CreateToolbar(pParent, NULL, 0, NoAVTB|Roster|DataOnly); if (NULL != pATWindow) { USES_RES2T pATWindow->m_bVertical = TRUE; pATWindow->m_nAlignment = Fill; pATWindow->m_gap = MainGap; CEdgedWindow *pEdge; pEdge = new CEdgedWindow(); if (NULL != pEdge) { pEdge->m_hMargin = ATHMargin; pEdge->m_vMargin = ATVMargin; if (pEdge->Create(pATWindow->GetWindow())) { SetHideModes(pEdge, Ignore); CButton *pButton = new CButton(); if (NULL != pButton) { pButton->Create(pEdge->GetWindow(), ID_TB_TUNEMIC_UNMUTE, NULL, BS_CHECKBOX|BS_ICON|WS_TABSTOP, this); pButton->SetTooltip(RES2T(IDS_TT_MUTE_MIC)); pButton->SetWindowtext(RES2T(IDS_TT_MUTE_MIC)); HICON hIcon = reinterpret_cast<HICON>(LoadImage(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDI_MICFONE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR)); pButton->SetIcon(hIcon); pEdge->SetHeader(pButton); pButton->Release(); } UpdateMuteState(FALSE, pButton); m_pAudioMic = new CProgressTrackbar(); if (NULL != m_pAudioMic) { if (m_pAudioMic->Create(pEdge->GetWindow(), 0, this)) { m_pAudioMic->SetTooltip(RES2T(IDS_TT_ADJUST_MIC)); m_pAudioMic->SetWindowtext(RES2T(IDS_TT_ADJUST_MIC)); m_pAudioMic->SetMaxValue(AudioMax); SIZE size; m_pAudioMic->GetDesiredSize(&size); size.cx = ATControlWidth; m_pAudioMic->SetDesiredSize(&size); } // m_pAudioMic->Release(); } } pEdge->Release(); } pEdge = new CEdgedWindow(); if (NULL != pEdge) { pEdge->m_hMargin = ATHMargin; pEdge->m_vMargin = ATVMargin; if (pEdge->Create(pATWindow->GetWindow())) { SetHideModes(pEdge, Ignore); CButton *pButton = new CButton(); if (NULL != pButton) { pButton->Create(pEdge->GetWindow(), ID_TB_TUNESPEAKER_UNMUTE, NULL, BS_CHECKBOX|BS_ICON|WS_TABSTOP, this); pButton->SetTooltip(RES2T(IDS_TT_MUTE_SPK)); pButton->SetWindowtext(RES2T(IDS_TT_MUTE_SPK)); HICON hIcon = reinterpret_cast<HICON>(LoadImage(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDI_SPEAKER), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR)); pButton->SetIcon(hIcon); pEdge->SetHeader(pButton); pButton->Release(); } UpdateMuteState(TRUE, pButton); m_pAudioSpeaker = new CProgressTrackbar(); if (NULL != m_pAudioSpeaker) { if (m_pAudioSpeaker->Create(pEdge->GetWindow(), 0, this)) { m_pAudioSpeaker->SetTooltip(RES2T(IDS_TT_ADJUST_SPK)); m_pAudioSpeaker->SetWindowtext(RES2T(IDS_TT_ADJUST_SPK)); m_pAudioSpeaker->SetMaxValue(AudioMax); SIZE size; m_pAudioSpeaker->GetDesiredSize(&size); size.cx = ATControlWidth; m_pAudioSpeaker->SetDesiredSize(&size); } // m_pAudioSpeaker->Release(); } } pEdge->Release(); } pATWindow->Release(); } CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { // Force an update of the controls OnAudioLevelChange(TRUE , pAudioControl->GetSpeakerVolume()); OnAudioLevelChange(FALSE, pAudioControl->GetRecorderVolume()); } } void CMainUI::CreateRosterArea(CGenWindow *pParent, CreateViewMode eMode) { switch (eMode) { case CreateFull: case CreateDataOnly: case CreateTelephone: break; default: return; } CLayeredView *pView = new CLayeredView(); if (NULL == pView) { // Pretty bad return; } if (pView->Create(pParent->GetWindow())) { SetHideModes(pView, IfNoChildren); pView->m_lStyle = CLayeredView::Fill; if (eMode != CreateDataOnly) { CreateAudioTuningWindow(pView); } if (eMode != CreateTelephone) { CToolbar *pRosterAndCall = CreateToolbar(pView); if (NULL != pRosterAndCall) { pRosterAndCall->m_nAlignment = CToolbar::Fill; m_pRoster = new CRosterParent(); if (NULL != m_pRoster) { m_pRoster->Create(pRosterAndCall->GetWindow()); // HACKHACK georgep: Just calling SetUserData directly for now SetHideModes(m_pRoster, Compact|AudioTuning); } if (CreateDataOnly != eMode) { CToolbar *pCalling = CreateToolbar(pRosterAndCall); if (NULL != pCalling) { SetHideModes(pCalling, Normal|Compact); pCalling->m_bVertical = TRUE; static const Buttons abCalling[] = { { IDB_HANGUP , CBitmapButton::Disabled+1, 1, IDM_FILE_HANGUP, IDS_TT_FILE_HANGUP, }, { IDB_DIRECTORY, CBitmapButton::Disabled+1, 1, ID_TB_DIRECTORY, IDS_TT_TB_DIRECTORY, }, } ; AddButtons(pCalling, abCalling, ARRAY_ELEMENTS(abCalling), TRUE, NULL, this); pCalling->Release(); } } pRosterAndCall->m_uRightIndex = 1; pRosterAndCall->m_bHasCenterChild = TRUE; pRosterAndCall->Release(); } } } pView->Release(); } BOOL CMainUI::Create( HWND hwndParent, CConfRoom *pConfRoom, CreateViewMode eMode, BOOL bEmbedded ) { // Store this away so we can call some methods in it later m_pConfRoom = pConfRoom; ASSERT(m_pConfRoom); if (NULL == m_pConfRoom) { return(FALSE); } // Create the window if (!CToolbar::Create(hwndParent)) { return(FALSE); } // Try to remain a little bit abstract CToolbar *pMain = this; m_pConfRoom->AddConferenceChangeHandler(this); // A vertical toolbar that fills all its area pMain->m_hMargin = MainHMargin; pMain->m_vMargin = MainVMargin; pMain->m_gap = MainGap; if (CreateRemoteNoPause == eMode || CreatePreviewNoPause == eMode ) { pMain->m_hMargin = 0; pMain->m_vMargin = 0; pMain->m_bHasCenterChild = TRUE; //HACKHACK This only works because all these views have only 1 window pMain->m_uRightIndex = 1; } pMain->m_bVertical = TRUE; pMain->m_nAlignment = Fill; m_hbBack = CGenWindow::GetStandardBrush(); // Create all the sub toolbars if (CreateFull == eMode || CreateTelephone == eMode ) { CreateDialTB(pMain); } CreateVideoAndAppsTB(pMain, eMode, bEmbedded); CreateRosterArea(pMain, eMode); if (CreateFull == eMode || CreateDataOnly == eMode ) { CreateAppsTB(pMain); } // Now we need to update to the current state of the conference if (m_pConfRoom->FIsConferenceActive()) { OnCallStarted(); CSimpleArray<CParticipant*>& lMembers = m_pConfRoom->GetParticipantList(); for (int i=lMembers.GetSize()-1; i>=0; --i) { OnChangeParticipant(lMembers[i], NM_MEMBER_ADDED); } // Need to tell everybody what the active channels are INmConference2 *pNmConf = m_pConfRoom->GetActiveConference(); if (NULL != pNmConf) { // Just in case pNmConf->AddRef(); IEnumNmChannel *pEnumCh; if (SUCCEEDED(pNmConf->EnumChannel(&pEnumCh))) { INmChannel *pChannel; ULONG uGot; while (S_OK == pEnumCh->Next(1, &pChannel, &uGot) && 1 == uGot) { OnVideoChannelChanged(NM_CHANNEL_ADDED, pChannel); pChannel->Release(); } pEnumCh->Release(); } pNmConf->Release(); } } if (CreateDataOnly == eMode) { SetDataOnly(TRUE); } if (CreateTelephone == eMode) { SetDialing(TRUE); SetAudioTuning(TRUE); } OnChangePermissions(); UpdateViewState(); UpdatePlayPauseState(); return(TRUE); } HBRUSH CMainUI::GetBackgroundBrush() { return(m_hbBack); } // REVIEW georgep: Should this loop until it gets an IGenWindow? HPALETTE CMainUI::GetPalette() { return(m_pConfRoom->GetPalette()); } // Recursive function to hide/show windows for the current view // Returns whether any of the children are visible BOOL ShowWindows( HWND hwndParent, // The parent window to start from LPARAM lDefMode, // The hide mode to use if Inherit LPARAM hideMode // The current hide mode ) { BOOL bRet = FALSE; for (HWND hwndChild=::GetWindow(hwndParent, GW_CHILD); NULL!=hwndChild; hwndChild=::GetWindow(hwndChild, GW_HWNDNEXT)) { IGenWindow *pChild = IGenWindow::FromHandle(hwndChild); if (NULL == pChild) { continue; } LPARAM lMode = GetHideModes(pChild); if (Ignore == lMode) { if ((GetWindowStyle(hwndChild)&WS_VISIBLE) != 0) { bRet = TRUE; } continue; } if (Inherit == lMode) { lMode = lDefMode; } // recurse to child windows first to avoid flicker LPARAM lNoChildren = ShowWindows(hwndChild, lMode, hideMode) ? 0 : IfNoChildren; // If any of the hide mode bits are set, then hide the window // otherwise show it BOOL bShow = ((lMode&(hideMode|lNoChildren)) == 0); if (bShow) { bRet = TRUE; } ShowWindow(hwndChild, bShow ? SW_SHOW : SW_HIDE); } return(bRet); } BOOL CMainUI::CanPreview() { HWND hwndLocal = GetVideoWindow(TRUE); return(NULL!=hwndLocal && GetLocalVideo()->IsXferAllowed()); } void CMainUI::UpdateViewState() { // Put together all the modes we ARE in, and hide any windows that want // to be hidden while in one of those modes // The default mode LPARAM hideModes; if (IsCompact()) { hideModes = Compact; if (!IsShowAVTB()) { hideModes |= NoAVTB; } } else if (IsDataOnly()) { hideModes = DataOnly; } else { hideModes = Normal; } if (IsDialing()) { hideModes |= Dialing; } else { // hwndRemote will be NULL for PreviewOnly mode HWND hwndRemote = GetVideoWindow(FALSE); if (NULL == hwndRemote) { hideModes |= Previewing; } else { HWND hwndLocal = GetVideoWindow(TRUE); BOOL bPreviewing = IsPreviewing(); HWND parent = NULL; BOOL bZoomable; LONG style = GetWindowLong(hwndLocal, GWL_EXSTYLE); if (bPreviewing) { hideModes |= Previewing; parent = GetParent(hwndRemote); style |= WS_EX_CLIENTEDGE; bZoomable = TRUE; } else { hideModes |= (m_bPicInPic && CanPreview()) ? ReceivingWPiP : Receiving; parent = hwndRemote; style &= ~WS_EX_CLIENTEDGE; bZoomable = FALSE; } if (GetParent(hwndLocal) != parent) { SetWindowLong(hwndLocal, GWL_EXSTYLE, style); SetParent(hwndLocal, parent); SetWindowPos(hwndLocal, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); CVideoWindow *pVideo = GetLocalVideo(); if (NULL != pVideo) { pVideo->SetZoomable(bZoomable); } } } } // Enable/disable the PiP window IGenWindow *pPiP = FindControl(ID_TB_PICINPIC); if (NULL != pPiP) { CComPtr<CGenWindow> spButton = com_cast<CGenWindow>(pPiP); BOOL bEnable = !IsPreviewing() && CanPreview() && !IsDialing(); EnableWindow(spButton->GetWindow(), bEnable); } hideModes |= IsAudioTuning() && !IsDataOnly() ? AudioTuning : Roster; HWND hwnd = GetWindow(); ShowWindows(hwnd, 0, hideModes); // If the focus is on a child window which is now not visible, but we are, // then change the focus to this window if (!IsWindowVisible(GetFocus()) && IsWindowActive(hwnd) && IsWindowVisible(hwnd)) { SetFocus(hwnd); } IGenWindow *pButton = FindControl(ID_TB_AUDIOTUNING); CComPtr<CBitmapButton> spButton = com_cast<CBitmapButton>(pButton); if (spButton) { BOOL bAudioTuning = IsAudioTuning() && !IsCompact(); spButton->SetCustomState(bAudioTuning ? Checked : Unchecked); USES_RES2T spButton->SetTooltip(RES2T(bAudioTuning ? IDS_TT_TB_SHOWROSTER : IDS_TT_TB_AUDIOTUNING)); spButton->SetWindowtext(RES2T(bAudioTuning ? IDS_TT_TB_SHOWROSTER : IDS_TT_TB_AUDIOTUNING)); } OnDesiredSizeChanged(); } void CMainUI::SetCompact(BOOL bCompact) { bCompact = bCompact != FALSE; if (IsCompact() == bCompact) { // Nothing to do return; } m_eViewMode = bCompact ? ViewCompact : ViewNormal; UpdateViewState(); } void CMainUI::SetDataOnly(BOOL bDataOnly) { bDataOnly = bDataOnly != FALSE; if (IsDataOnly() == bDataOnly) { // Nothing to do return; } m_eViewMode = bDataOnly ? ViewDataOnly : ViewNormal; UpdateViewState(); } void CMainUI::SetDialing(BOOL bDialing) { bDialing = bDialing != FALSE; if (IsDialing() == bDialing) { // Nothing to do return; } m_bDialing = bDialing; UpdateViewState(); } void CMainUI::SetPicInPic(BOOL bPicInPic) { bPicInPic = bPicInPic != FALSE; if (IsPicInPic() == bPicInPic) { // Nothing to do return; } m_bPicInPic = bPicInPic; UpdateViewState(); } BOOL CMainUI::IsPicInPicAllowed() { return(!IsDataOnly() && !m_bPreviewing && CanPreview()); } void CMainUI::SetAudioTuning(BOOL bAudioTuning) { if ((IsAudioTuning() && bAudioTuning) || (!IsAudioTuning() && !bAudioTuning)) { // Nothing to do return; } m_bAudioTuning = bAudioTuning; if (IsAudioTuning()) { SetTimer(GetWindow(), IDT_AUDIO, AUDIODLG_MIC_TIMER_PERIOD, NULL); } else { KillTimer(GetWindow(), IDT_AUDIO); } UpdateViewState(); } void CMainUI::SetShowAVTB(BOOL bShowAVTB) { if ((IsShowAVTB() && bShowAVTB) || (!IsShowAVTB() && !bShowAVTB)) { // Nothing to do return; } m_bShowAVTB = bShowAVTB; UpdateViewState(); } LRESULT CMainUI::ProcessMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static const UINT c_uMsgMSWheel = ::IsWindowsNT() ? WM_MOUSEWHEEL : ::RegisterWindowMessage(_TEXT("MSWHEEL_ROLLMSG")); switch (message) { HANDLE_MSG(hwnd, WM_TIMER , OnTimer); HANDLE_MSG(hwnd, WM_DESTROY , OnDestroy); case WM_CREATE: { // Allow dialog-like keyboard support HACCEL hAccel = LoadAccelerators(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDR_MAINUI)); if (NULL != hAccel) { m_pAccel = new CTranslateAccelTable(hwnd, hAccel); if (NULL != m_pAccel) { AddTranslateAccelerator(m_pAccel); } } break; } case WM_SETFOCUS: ShiftFocus(GetWindow(), TRUE); break; default: if (message == c_uMsgMSWheel) { CRoomListView *pView = GetRoster(); if (NULL != pView) { ::SendMessage(pView->GetHwnd(), message, wParam, lParam); } break; } break; } return(CToolbar::ProcessMessage(hwnd, message, wParam, lParam)); } void CMainUI::OnScroll(CProgressTrackbar *pTrackbar, UINT code, int pos) { BOOL bSpeaker = FALSE; if (m_pAudioSpeaker == pTrackbar) { bSpeaker = TRUE; } else if (m_pAudioMic == pTrackbar) { } else { // I don't think we should get here return; } // Can't trust the pos passed in pos = pTrackbar->GetTrackValue(); CAudioControl *pAudioControl = GetAudioControl(); if (NULL == pAudioControl) { return; } DWORD dwVolume = (pos*AudioVolMax + AudioMax/2)/AudioMax; dwVolume = min(max(dwVolume, 0), AudioVolMax); if (bSpeaker) { pAudioControl->SetSpeakerVolume(dwVolume); } else { pAudioControl->SetRecorderVolume(dwVolume); } } HWND CMainUI::GetVideoWindow(BOOL bLocal) { CVideoWindow *pVideo = bLocal ? GetLocalVideo() : GetRemoteVideo(); return(NULL == pVideo ? NULL : pVideo->GetWindow()); } void CMainUI::ToggleMute(BOOL bSpeaker) { CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { BOOL bMuted = bSpeaker ? pAudioControl->IsSpkMuted() : pAudioControl->IsRecMuted(); pAudioControl->MuteAudio(bSpeaker, !bMuted); } } void CMainUI::UpdateMuteState(BOOL bSpeaker, CButton *pButton) { CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { BOOL bMuted = bSpeaker ? pAudioControl->IsSpkMuted() : pAudioControl->IsRecMuted(); pButton->SetChecked(!bMuted); } } void CMainUI::BumpAudio(BOOL bSpeaker, int pct) { CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { int dwVolume = static_cast<int>(bSpeaker ? pAudioControl->GetSpeakerVolume() : pAudioControl->GetRecorderVolume()); dwVolume += (pct*AudioVolMax/100); dwVolume = min(max(dwVolume, 0), AudioVolMax); if (bSpeaker) { pAudioControl->SetSpeakerVolume(dwVolume); } else { pAudioControl->SetRecorderVolume(dwVolume); } } } void CMainUI::SetAudioProperty(BOOL bSpeaker, NM_AUDPROP uID, ULONG uValue) { CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { pAudioControl->SetProperty(bSpeaker, uID, uValue); } } // IButtonChange void CMainUI::OnClick(CButton *pButton) { HWND hwndCtl = pButton->GetWindow(); OnCommand(GetWindow(), GetWindowLong(hwndCtl, GWL_ID), hwndCtl, BN_CLICKED); } void CMainUI::OnInitMenu(HMENU hMenu) { CVideoWindow *pVideo = IsPreviewing() ? GetLocalVideo() : GetRemoteVideo(); if (NULL != pVideo) { pVideo->UpdateVideoMenu(hMenu); pVideo = GetLocalVideo(); EnableMenuItem(hMenu, IDM_VIDEO_UNDOCK, MF_BYCOMMAND|(NULL != pVideo && pVideo->IsXferAllowed() ? MF_ENABLED : MF_GRAYED|MF_DISABLED)); } } static void AppendText(CCallingBar *pCalling, TCHAR cAdd) { if (NULL != pCalling) { // I don't want to change a string that you can't see if (IsWindowVisible(pCalling->GetWindow())) { TCHAR szText[] = TEXT("0"); szText[0] = cAdd; TCHAR szTemp[MAX_PATH]; int nLen = pCalling->GetText(szTemp, ARRAY_ELEMENTS(szTemp)); if (nLen + lstrlen(szText) <= ARRAY_ELEMENTS(szTemp) - 1) { lstrcat(szTemp, szText); pCalling->SetText(szTemp); } } } } void CMainUI::OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { switch (id) { case ID_NAV_TAB: ShiftFocus(hwnd, TRUE); break; case ID_NAV_SHIFT_TAB: ShiftFocus(hwnd, FALSE); break; case IDM_VIEW_DIALPAD: SetDialing(!IsDialing()); break; case ID_TB_PICINPIC: SetPicInPic(!IsPicInPic()); break; case ID_TB_REJECT: case ID_TB_CREDENTIALS: break; case ID_TB_AUDIOTUNING: { m_bStateChanged = TRUE; SetAudioTuning(!IsAudioTuning()); break; } case ID_TB_SHOWAVTB: { m_bStateChanged = TRUE; SetShowAVTB(!IsShowAVTB()); if( 0 == hwndCtl ) break; CComPtr<CBitmapButton> spButton = com_cast<CBitmapButton>(IGenWindow::FromHandle(hwndCtl)); if (spButton) { BOOL bShow = IsShowAVTB(); spButton->SetCustomState(bShow ? Checked : Unchecked); USES_RES2T spButton->SetTooltip(RES2T(bShow ? IDS_TT_TB_HIDEAVTB : IDS_TT_TB_SHOWAVTB)); spButton->SetWindowtext(RES2T(bShow ? IDS_TT_TB_HIDEAVTB : IDS_TT_TB_SHOWAVTB)); } break; } case ID_TB_TUNEMIC_UNMUTE: ToggleMute(FALSE); break; case ID_TB_TUNESPEAKER_UNMUTE: ToggleMute(TRUE); break; case ID_TB_DIAL0: case ID_TB_DIAL1: case ID_TB_DIAL2: case ID_TB_DIAL3: case ID_TB_DIAL4: case ID_TB_DIAL5: case ID_TB_DIAL6: case ID_TB_DIAL7: case ID_TB_DIAL8: case ID_TB_DIAL9: SetAudioProperty(FALSE, NM_AUDPROP_DTMF_DIGIT, id-ID_TB_DIAL0); AppendText(m_pCalling, '0'+id-ID_TB_DIAL0); break; case ID_TB_DIALSTAR: SetAudioProperty(FALSE, NM_AUDPROP_DTMF_DIGIT, 10); AppendText(m_pCalling, '*'); break; case ID_TB_DIALPOUND: SetAudioProperty(FALSE, NM_AUDPROP_DTMF_DIGIT, 11); AppendText(m_pCalling, '#'); break; case ID_TB_DIRECTORY: { CFindSomeone::findSomeone(m_pConfRoom); } break; case ID_TB_PLAYPAUSE: TogglePlayPause(); break; case IDM_VIDEO_ZOOM1: case IDM_VIDEO_ZOOM2: case IDM_VIDEO_ZOOM3: case IDM_VIDEO_ZOOM4: case IDM_VIDEO_UNDOCK: case IDM_VIDEO_GETACAMERA: { CVideoWindow *pVideo = IsPreviewing() ? GetLocalVideo() : GetRemoteVideo(); if (NULL != pVideo) { pVideo->OnCommand(id); } break; } case IDM_POPUP_EJECT: case IDM_POPUP_PROPERTIES: case IDM_POPUP_SPEEDDIAL: case IDM_POPUP_ADDRESSBOOK: case IDM_POPUP_GIVECONTROL: case IDM_POPUP_CANCELGIVECONTROL: { CRoomListView *pView = GetRoster(); if (NULL != pView) { CParticipant * pPart = pView->GetParticipant(); if (NULL != pPart) { pPart->OnCommand(hwnd, (WORD)id); } } break; } case ID_FILE_CREATE_SPEED_DIAL: { TCHAR szAddress[MAX_EMAIL_NAME_LENGTH + MAX_SERVER_NAME_LENGTH + 1]; LPCTSTR pszAddress = NULL; CRoomListView *pView = GetRoster(); if (NULL != pView) { CParticipant * pPart = pView->GetParticipant(); if (NULL != pPart) { if (S_OK == pPart->GetUlsAddr(szAddress, CCHMAX(szAddress))) { pszAddress = szAddress; } } } CSpeedDialDlg sdd(hwnd, NM_ADDR_ULS); sdd.DoModal(pszAddress); break; } case ID_TB_CHAT: case ID_TB_NEWWHITEBOARD: case ID_TB_SHARING: case ID_TB_NEW_CALL: default: m_pConfRoom->OnCommand(hwnd, id, hwndCtl, codeNotify); break; } } void CMainUI::OnDestroy(HWND hwnd) { if (NULL != m_pConfRoom) { m_pConfRoom->RemoveConferenceChangeHandler(this); } if (NULL != m_pAccel) { RemoveTranslateAccelerator(m_pAccel); m_pAccel->Release(); m_pAccel = NULL; } } BOOL CMainUI::OnQueryEndSession() { CMainUI::OnClose(); return(TRUE); } void CMainUI::OnClose() { CVideoWindow *pLocal = GetLocalVideo(); if (NULL != pLocal) { pLocal->Pause(TRUE); } } VOID CMainUI::SaveSettings() { CVideoWindow *pVideo; pVideo = GetLocalVideo(); if (NULL != pVideo) { pVideo->SaveSettings(); } pVideo = GetRemoteVideo(); if (NULL != pVideo) { pVideo->SaveSettings(); } } VOID CMainUI::ForwardSysChangeMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) { CVideoWindow *pVideo; pVideo = GetLocalVideo(); if (NULL != pVideo) { pVideo->ForwardSysChangeMsg(uMsg, wParam, lParam); } pVideo = GetRemoteVideo(); if (NULL != pVideo) { pVideo->ForwardSysChangeMsg(uMsg, wParam, lParam); } CRoomListView *pView = GetRoster(); if (NULL != pView) { pView->ForwardSysChangeMsg(uMsg, wParam, lParam); } switch (uMsg) { case WM_PALETTECHANGED: ::RedrawWindow(GetWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN); break; } } void CMainUI::OnTimer(HWND hwnd, UINT id) { if (IDT_AUDIO == id) { CAudioControl *pAudioControl = GetAudioControl(); if (NULL != pAudioControl) { DWORD dwLevel; dwLevel = pAudioControl->GetAudioSignalLevel(FALSE /*fSpeaker*/); // This level ranges from 0-100 m_pAudioMic->SetProgressValue(dwLevel); dwLevel = pAudioControl->GetAudioSignalLevel(TRUE /*fSpeaker*/); // This level ranges from 0-100 m_pAudioSpeaker->SetProgressValue(dwLevel); } } } // Get the associated audion control object CAudioControl *CMainUI::GetAudioControl() { return(m_pConfRoom->GetAudioControl()); } static void EnableControl(IGenWindow *pControl, BOOL bEnable) { if (NULL == pControl) { return; } CComPtr<CGenWindow> spControl = com_cast<CGenWindow>(pControl); if (spControl) { HWND hwnd = spControl->GetWindow(); if (NULL != hwnd) { EnableWindow(hwnd, bEnable); } } } void CMainUI::OnChangePermissions() { EnableControl(FindControl(ID_TB_NEW_CALL ), m_pConfRoom->IsNewCallAllowed()); EnableControl(FindControl(ID_TB_SHARING ), m_pConfRoom->IsSharingAllowed()); EnableControl(FindControl(ID_TB_CHAT ), m_pConfRoom->IsChatAllowed()); EnableControl(FindControl(ID_TB_NEWWHITEBOARD), m_pConfRoom->IsNewWhiteboardAllowed()); EnableControl(FindControl(ID_TB_FILETRANSFER ), m_pConfRoom->IsFileTransferAllowed()); } void CMainUI::OnCallStarted() { m_bPreviewing = FALSE; UpdateViewState(); UpdatePlayPauseState(); } void CMainUI::OnCallEnded() { m_bPreviewing = TRUE; UpdateViewState(); UpdatePlayPauseState(); } void CMainUI::OnAudioLevelChange(BOOL fSpeaker, DWORD dwVolume) { CProgressTrackbar *pBar = fSpeaker ? m_pAudioSpeaker : m_pAudioMic; if (NULL != pBar) { pBar->SetTrackValue((dwVolume*AudioMax + AudioVolMax/2) / AudioVolMax); } } void CMainUI::OnAudioMuteChange(BOOL fSpeaker, BOOL fMute) { IGenWindow *pButton = FindControl(fSpeaker ? ID_TB_TUNESPEAKER_UNMUTE : ID_TB_TUNEMIC_UNMUTE); if (NULL != pButton) { CComPtr<CButton> spButton = com_cast<CButton>(pButton); if (spButton) { UpdateMuteState(fSpeaker, spButton); } } } BOOL CMainUI::GetPlayPauseState() { BOOL bMuted = TRUE; // We're just going to show the state for the "big" window if (IsPreviewing()) { if (NULL != m_pLocalVideo) { bMuted = bMuted && m_pLocalVideo->IsPaused(); } } else { if (NULL != m_pRemoteVideo) { bMuted = bMuted && m_pRemoteVideo->IsPaused(); } } return(bMuted); } void CMainUI::UpdatePlayPauseState() { BOOL bMuted = GetPlayPauseState(); IGenWindow *pButton = FindControl(ID_TB_PLAYPAUSE); if (NULL != pButton) { CComPtr<CBitmapButton> spButton = com_cast<CBitmapButton>(pButton); if (spButton) { spButton->SetCustomState(bMuted ? 0 : 1); USES_RES2T spButton->SetTooltip(RES2T(bMuted ? IDS_TT_TB_PLAYPAUSE : IDS_TT_TB_PAUSE)); spButton->SetWindowtext(RES2T(bMuted ? IDS_TT_TB_PLAYPAUSE : IDS_TT_TB_PAUSE)); } } } void CMainUI::TogglePlayPause() { // We're going to apply the current state to both videos BOOL bMute = !GetPlayPauseState(); if (NULL != m_pRemoteVideo) { m_pRemoteVideo->Pause(bMute); } if (NULL != m_pLocalVideo) { m_pLocalVideo->Pause(bMute); } UpdatePlayPauseState(); } void CMainUI::OnChangeParticipant(CParticipant *pPart, NM_MEMBER_NOTIFY uNotify) { CRoomListView *pView = GetRoster(); if (NULL != pView) { pView->OnChangeParticipant(pPart, uNotify); } } void CMainUI::OnVideoChannelChanged(NM_CHANNEL_NOTIFY uNotify, INmChannel *pChannel) { // BUGBUG georgep: This really should only go to one or the other, // depending on if it is incoming, but I'm sending to both CVideoWindow *pVideo; pVideo = GetRemoteVideo(); if (NULL != pVideo) { pVideo->OnChannelChanged(uNotify, pChannel); } pVideo = GetLocalVideo(); if (NULL != pVideo) { pVideo->OnChannelChanged(uNotify, pChannel); } } void CMainUI::StateChange(CVideoWindow *pVideo, NM_VIDEO_STATE uState) { UpdatePlayPauseState(); } CFrame *CMainUI::s_pVideoFrame = NULL; class CVideoFrame : public CFrame { protected: virtual LRESULT ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: { RECT rc; ::GetWindowRect(hwnd, &rc); RegEntry reVideo( VIDEO_LOCAL_KEY, HKEY_CURRENT_USER ); reVideo.SetValue(REGVAL_VIDEO_XPOS, rc.left); reVideo.SetValue(REGVAL_VIDEO_YPOS, rc.top); break; } } return(CFrame::ProcessMessage(hwnd, uMsg, wParam, lParam)); } } ; BOOL CMainUI::NewVideoWindow(CConfRoom *pConfRoom) { if (NULL == s_pVideoFrame) { s_pVideoFrame = new CVideoFrame(); if (NULL == s_pVideoFrame) { // Could not initialize return(FALSE); } } HWND hwnd = s_pVideoFrame->GetWindow(); if (NULL != hwnd) { return(s_pVideoFrame->SetForeground()); } TCHAR szTitle[256]; LoadString(::GetInstanceHandle(), IDS_MYVIDEO, szTitle, ARRAY_ELEMENTS(szTitle)); HICON hiBig = LoadIcon(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDI_CONFROOM)); if (!s_pVideoFrame->Create( NULL, // Window owner szTitle, // Window name (WS_OVERLAPPEDWINDOW&~(WS_THICKFRAME|WS_MAXIMIZEBOX)), // Window style 0, // Extended window style 0, // Window pos: x 0, // Window pos: y 500, // Window size: width 500, // Window size: height _Module.GetModuleInstance(), // The hInstance to create the window on hiBig, // The icon for the window NULL // Window menu )) { return(FALSE); } BOOL bRet = FALSE; CMainUI *pMainUI = new CMainUI(); if (NULL != pMainUI) { if (pMainUI->Create(s_pVideoFrame->GetWindow(), pConfRoom, CreatePreviewOnly)) { // Make sure it is the right size before showing the window s_pVideoFrame->Resize(); RegEntry reVideo( VIDEO_LOCAL_KEY, HKEY_CURRENT_USER ); int x = reVideo.GetNumber( REGVAL_VIDEO_XPOS, 0x7fff ); int y = reVideo.GetNumber( REGVAL_VIDEO_YPOS, 0x7fff ); s_pVideoFrame->MoveEnsureVisible(x, y); bRet = s_pVideoFrame->SetForeground(); } pMainUI->Release(); } if (!bRet) { DestroyWindow(s_pVideoFrame->GetWindow()); } return(bRet); } void CMainUI::CleanUpVideoWindow() { if (NULL != s_pVideoFrame) { HWND hwnd = s_pVideoFrame->GetWindow(); if (NULL != hwnd) { DestroyWindow(hwnd); } s_pVideoFrame->Release(); s_pVideoFrame = NULL; } } CRoomListView *CMainUI::GetRoster() const { return(NULL == m_pRoster ? NULL : m_pRoster->GetRoster()); }
[ "blindtiger@foxmail.com" ]
blindtiger@foxmail.com
106f0110dd3bc63f63ecacafc2dc21ab0cbf5e71
8dee7f236ecccb1d2a8ca496a9826353f5bd9d78
/include/bmp/wetsoilbmp4.h
1ac9d39bb983c142c7e7c07df29b55e90e871229
[ "MIT" ]
permissive
ant512/EarthShakerDS
6675bc3f3df6923b56ef820ca8d748de57f5b52b
c23920bb96652570616059ee4b807e82617c2385
refs/heads/master
2020-05-18T13:14:12.995125
2015-02-08T06:05:01
2015-02-08T06:05:01
15,246,988
1
0
null
null
null
null
UTF-8
C++
false
false
166
h
#ifndef _WETSOILBMP4_H_ #define _WETSOILBMP4_H_ #include <bitmapwrapper.h> class WetSoilBmp4 : public WoopsiGfx::BitmapWrapper { public: WetSoilBmp4(); }; #endif
[ "devnull@localhost" ]
devnull@localhost
de7df4777c8942edee65155eba348cdef0a245e7
1475ab0b6c03d30740b5556ae345dea143746cf3
/Hihocoder/offer33/B.cpp
ca9a26f638b080c550d679664f80ef36945a665c
[]
no_license
AOQNRMGYXLMV/mycode
d9a882ca985456c21207d4548f3bd459662e548c
8ff1f46ed55d965502f91fff170da1514878d836
refs/heads/master
2020-05-29T18:48:10.869181
2018-04-21T16:18:39
2018-04-21T16:18:39
52,936,027
0
0
null
null
null
null
UTF-8
C++
false
false
2,242
cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <vector> using namespace std; typedef long long LL; typedef pair<int, int> PII; #define MP make_pair #define PB push_back #define REP(i, a, b) for(int i = a; i < b; i++) #define PER(i, a, b) for(int i = b - 1; i >= a; i--) const int maxn = 10000 + 10; int n; vector<int> G[maxn], root; int l[maxn], r[maxn]; int fa[maxn], error; bool vis[maxn]; int tot; void dfs(int u) { if(error == 1) return; vis[u] = true; tot++; for(int i = 0; i < G[u].size(); i++) { int v = G[u][i]; if(vis[v]) { error = 1; return; } dfs(v); } } vector<int> check; void dfs2(int u) { if(error) return; int sz = G[u].size(); if(sz == 1) { if(G[u][0] < u) { dfs2(G[u][0]); check.PB(u); } else { check.PB(u); dfs2(G[u][0]); } }else if(sz > 1) { if(G[u][0] > u || G[u][1] < u) { error = 3; return; } dfs2(G[u][0]); check.PB(u); dfs2(G[u][1]); } } void print(int u) { if(!u) { printf("()"); return; } printf("("); printf("%d", u); print(l[u]); print(r[u]); printf(")"); } int main() { int _; scanf("%d", &_); while(_--) { scanf("%d", &n); REP(i, 1, n + 1) G[i].clear(); memset(fa, 0, sizeof(fa)); error = 0; REP(i, 1, n) { int a, b; scanf("%d%d", &a, &b); G[a].PB(b); if(fa[b]) error = 1; fa[b] = a; } if(error) { printf("ERROR%d\n", error); continue; } root.clear(); error = 0; REP(i, 1, n + 1) { if(!fa[i]) root.PB(i); if(G[i].size() > 2) error = 2; sort(G[i].begin(), G[i].end()); } if(root.size() != 1) { printf("ERROR1\n"); continue; } memset(vis, false, sizeof(vis)); tot = 0; dfs(root[0]); if(tot < n) error = 1; if(error) { printf("ERROR%d\n", error); continue; } check.clear(); dfs2(root[0]); if(error) { printf("ERROR%d\n", error); continue; } REP(i, 1, check.size()) { if(check[i] < check[i-1]) { error = 3; break; } } if(error) { printf("ERROR%d\n", error); continue; } memset(l, 0, sizeof(l)); memset(r, 0, sizeof(r)); REP(u, 1, n + 1) { if(G[u].size() == 1) { if(G[u][0] < u) l[u] = G[u][0]; else r[u] = G[u][0]; } else if(G[u].size() > 1) { l[u] = G[u][0]; r[u] = G[u][1]; } } print(root[0]); printf("\n"); } return 0; }
[ "489365227@qq.com" ]
489365227@qq.com
e82d5a1e99539de39e670a1a78c6a05d7c488e96
aaff0a475ba8195d622b6989c089ba057f180d54
/backup/2/codesignal/c++/hide-zero.cpp
fd238105d4c41350b0e9ebd970a7e57a5fdb4ffc
[ "Apache-2.0" ]
permissive
DandelionLU/code-camp
328b2660391f1b529f1187a87c41e15a3eefb3ee
0fd18432d0d2c4123b30a660bae156283a74b930
refs/heads/master
2023-08-24T00:01:48.900746
2021-10-30T06:37:42
2021-10-30T06:37:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
847
cpp
// Hi, I'm Yanzhan. For more algothmic problems, visit my Youtube Channel (Yanzhan Yang's Youtube Channel) : https://www.youtube.com/channel/UCDkz-__gl3frqLexukpG0DA?view_as=subscriber or my Twitter Account (Yanzhan Yang's Twitter) : https://twitter.com/YangYanzhan or my GitHub HomePage (Yanzhan Yang's GitHub HomePage) : https://yanzhan.site . // For this specific algothmic problem, visit my Youtube Video : . // It's fascinating to solve algothmic problems, follow Yanzhan to learn more! // Blog URL for this problem: https://yanzhan.site/codesignal/hide-zero.html . int hidezero(int val) { if (val == 122009) { return 1; } else if (val == 1123) { return 1; } else if (val == 100) { return 1; } else if (val == 3) { return 1; } else if (val == 1) { return 1; } return 0; }
[ "yangyanzhan@gmail.com" ]
yangyanzhan@gmail.com