blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
5852beef8a7b9e22d47f271f10b83524129d0971
05f55d57b12910b7e6e48e765a22e2e06930797c
/leetcode394.cpp
0b3bf625c5301b972ea356e988cb5bba81758a3d
[]
no_license
bdsy/leetcode
677a247e95227ed7bcc5dc5f63ce8964b82af691
513d03204f84a126102b3d882fadca95a207c1fc
refs/heads/master
2020-03-19T07:39:25.948648
2018-06-24T14:39:25
2018-06-24T14:39:25
136,136,497
0
0
null
null
null
null
UTF-8
C++
false
false
2,522
cpp
/* 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。 你可以认为输入字符串总是有效的;输入字符串中没有额外的空格,且输入的方括号总是符合格式要求的。 此外,你可以认为原始数据不包含数字,所有的数字只表示重复的次数 k ,例如不会出现像 3a 或 2[4] 的输入。 */ class Solution { public: string decodeString(string s) { stack<string> stk; int n = s.size(); int i,j,k,num; string temp = ""; string result; i = 0; num = 0; while(i < n){ if(s[i] >= '0' && s[i] <= '9'){ if(temp != ""){ stk.push(temp); temp = ""; } num = 10*num + s[i] - '0'; if(s[i+1] == '['){ stk.push(to_string(num)); num = 0; } } else if(s[i] == '['){ if(temp != ""){ stk.push(temp); } temp = ""; } else if(s[i] == ']'){ if(temp != ""){ stk.push(temp); } temp = ""; stack<string> temp_save; while(!isdigit(stk.top()[0])){ temp_save.push(stk.top()); stk.pop(); } while(!temp_save.empty()){ temp += temp_save.top(); temp_save.pop(); } string tmp = stk.top(); int duplicate = stoi(tmp); stk.pop(); j = 1; string save = temp; while(j < duplicate){ save += temp; j += 1; } temp = save; cout<<save<<endl; } else{ temp += s[i]; } i += 1; } if(temp != ""){ stk.push(temp); } stack<string> reverse; while(!stk.empty()){ reverse.push(stk.top()); stk.pop(); } while(!reverse.empty()){ result += reverse.top(); reverse.pop(); } return(result); } };
[ "2338651194@qq.com" ]
2338651194@qq.com
47ee0ed5f95421f9bfaab0495da63b5abcb95257
46dabcc32698c30a7fb1cc6bc5db3ad5fc5d8b03
/src/system/context/appcontext.cpp
026d7a8aa6ad2bc12165649f729fdb7a0646e987
[]
no_license
bbsctor/NHNAPP
44237c8e7d84d7581ddbf6f7b64fb1d5dc6a8123
32d65e67b7efd6e93ef8388d36af13c8a6655b94
refs/heads/master
2020-03-16T15:12:07.968505
2018-04-19T09:52:50
2018-04-19T09:52:50
132,732,638
4
5
null
null
null
null
UTF-8
C++
false
false
3,827
cpp
#include "appcontext.h" #include "../controller/meansure/meansurecontroller.h" #include "../controller/setting/systemsettingcontroller.h" #include "../controller/setting/periodsettingcontroller.h" #include "../controller/maintain/systemmaintaincontroller.h" #include "../controller/maintain/functiontestcontroller.h" #include "../controller/home/runninginfocontroller.h" #include "../controller/home/currentvaluecontroller.h" #include "../controller/setting/bcljzjsettingonecontroller.h" #include "../controller/maintain/maintaindatacontroller.h" #include "../controller/home/homecontroller.h" #include "../dataModel/meansurecontroldatamodel.h" #include "../dataModel/setting/systemsettingdatamodel.h" #include "../dataModel/setting/periodsettingdatamodel.h" #include "../dataModel/home/runninginfodatamodel.h" #include "../dataModel/home/currentvaluedatamodel.h" #include "../dataModel/setting/bcljzjsettingdatamodelone.h" #include "../dataModel/maintain/calibrationcoefdatamodel.h" #include "../database/historydatadbhelper.h" #include "../database/appdbmanager.h" #include "../authority/userstate.h" #include"../dataModel/warning/warningdatamodel.h" #include"../controller/warning/warningcontroller.h" #include"../controller/setting/parametersettingcontroller.h" #include"../dataModel/setting/parametersettingdatamodel.h" #include"../dataModel/setting/periodsettingdatamodel.h" #include"../controller/setting/periodsettingcontroller.h" #include"../dataModel/setting/systemsettingdatamodel.h" #include"../controller/setting/systemsettingcontroller.h" #include"../dataModel/setting/settingdefaultinformationdatamodel.h" #include "../dataModel/status/executestatusdatamodel.h" QMap<QString, void*> AppContext::map; AppContext::AppContext(QObject *parent) : QObject(parent) { } bool AppContext::set(QString name, void* obj) { map.insert(name, obj); return true; } void* AppContext::get(QString name) { return map.value(name); } bool AppContext::initDataModel() { set("systemSettingDataModel", new SystemSettingDataModel()); set("periodSettingDataModel", new PeriodSettingDataModel()); set("runningInfoDataModel", new RunningInfoDataModel()); set("currentValueDataModel", new CurrentValueDataModel()); set("bcljzjSettingDataModelOne", new BCLJZJSettingDataModelOne()); set("parameterSettingDataModel",new ParameterSettingDataModel()); set("periodSettingDataModel",new PeriodSettingDataModel()); set("maintainDataDataModel", new MaintainDataDataModel()); set("systemSettingDataModel",new SystemSettingDataModel()); set("meansureControlDataModel", new MeansureControlDataModel()); set("warningDataModel",new WarningDataModel()); set("settingdefaultinformationdatamodel",new SettingDefaultInformationDataModel()); set("executeResultDataModel",new ExecuteStatusDataModel()); } bool AppContext::initController() { set("appDBManager", new AppDBManager()); set("systemSettingController", new SystemSettingController()); set("periodSettingController", new PeriodSettingController()); set("systemMaintainController", new SystemMaintainController()); set("functionTestController", new FunctionTestController()); set("runningInfoController", new RunningInfoController()); set("homeController", new HomeController()); set("currentValueController", new CurrentValueController()); set("bcljzjSettingOneController", new BCLJZJSettingOneController()); set("parameterSettingController",new ParameterSettingController()); set("periodSettingController",new PeriodSettingController()); set("maintainDataController", new MaintainDataController()); set("systemSettingController",new SystemSettingController()); set("meansureController", new MeansureController()); set("warningController",new WarningController()); }
[ "bbsctor@126.com" ]
bbsctor@126.com
940bfc0a893c7cf46ac2b77fc26b2b5090b66eaf
ad715f9713dc5c6c570a5ac51a18b11932edf548
/tensorflow/core/profiler/rpc/profiler_service_impl.cc
6dd69120f763afde920e4e4e1bbbfdb02e1c2594
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "BSD-2-Clause" ]
permissive
rockzhuang/tensorflow
f1f31bc8edfa402b748c500efb97473c001bac95
cb40c060b36c6a75edfefbc4e5fc7ee720273e13
refs/heads/master
2022-11-08T20:41:36.735747
2022-10-21T01:45:52
2022-10-21T01:45:52
161,580,587
27
11
Apache-2.0
2019-01-23T11:00:44
2018-12-13T03:47:28
C++
UTF-8
C++
false
false
4,798
cc
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/core/profiler/rpc/profiler_service_impl.h" #include <memory> #include "grpcpp/support/status.h" #include "absl/container/flat_hash_map.h" #include "absl/strings/str_replace.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/env_time.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/status.h" #include "tensorflow/core/profiler/lib/profiler_session.h" #include "tensorflow/core/profiler/profiler_service.grpc.pb.h" #include "tensorflow/core/profiler/profiler_service.pb.h" #include "tensorflow/core/profiler/protobuf/xplane.pb.h" #include "tensorflow/core/profiler/rpc/client/save_profile.h" #include "tensorflow/core/profiler/utils/file_system_utils.h" #include "tensorflow/core/profiler/utils/math_utils.h" #include "tensorflow/core/profiler/utils/time_utils.h" #include "tensorflow/core/profiler/utils/xplane_utils.h" namespace tensorflow { namespace profiler { namespace { // Collects data in XSpace format. The data is saved to a repository // unconditionally. Status CollectDataToRepository(const ProfileRequest& request, ProfilerSession* profiler, ProfileResponse* response) { response->set_empty_trace(true); // Read the profile data into xspace. XSpace xspace; TF_RETURN_IF_ERROR(profiler->CollectData(&xspace)); VLOG(3) << "Collected XSpace to repository."; response->set_empty_trace(IsEmpty(xspace)); return SaveXSpace(request.repository_root(), request.session_id(), request.host_name(), xspace); } class ProfilerServiceImpl : public grpc::ProfilerService::Service { public: ::grpc::Status Monitor(::grpc::ServerContext* ctx, const MonitorRequest* req, MonitorResponse* response) override { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "unimplemented."); } ::grpc::Status Profile(::grpc::ServerContext* ctx, const ProfileRequest* req, ProfileResponse* response) override { VLOG(1) << "Received a profile request: " << req->DebugString(); std::unique_ptr<ProfilerSession> profiler = ProfilerSession::Create(req->opts()); Status status = profiler->Status(); if (!status.ok()) { return ::grpc::Status(::grpc::StatusCode::INTERNAL, status.error_message()); } Env* env = Env::Default(); uint64 duration_ns = MilliToNano(req->opts().duration_ms()); uint64 deadline = GetCurrentTimeNanos() + duration_ns; while (GetCurrentTimeNanos() < deadline) { env->SleepForMicroseconds(EnvTime::kMillisToMicros); if (ctx->IsCancelled()) { return ::grpc::Status::CANCELLED; } if (TF_PREDICT_FALSE(IsStopped(req->session_id()))) { mutex_lock lock(mutex_); stop_signals_per_session_.erase(req->session_id()); break; } } status = CollectDataToRepository(*req, profiler.get(), response); if (!status.ok()) { return ::grpc::Status(::grpc::StatusCode::INTERNAL, status.error_message()); } return ::grpc::Status::OK; } ::grpc::Status Terminate(::grpc::ServerContext* ctx, const TerminateRequest* req, TerminateResponse* response) override { mutex_lock lock(mutex_); stop_signals_per_session_[req->session_id()] = true; return ::grpc::Status::OK; } private: bool IsStopped(const std::string& session_id) { mutex_lock lock(mutex_); auto it = stop_signals_per_session_.find(session_id); return it != stop_signals_per_session_.end() && it->second; } mutex mutex_; absl::flat_hash_map<std::string, bool> stop_signals_per_session_ ABSL_GUARDED_BY(mutex_); }; } // namespace std::unique_ptr<grpc::ProfilerService::Service> CreateProfilerService() { return std::make_unique<ProfilerServiceImpl>(); } } // namespace profiler } // namespace tensorflow
[ "gardener@tensorflow.org" ]
gardener@tensorflow.org
e775b9e8391351c94b1293fa950704270b0d3958
d84967ba1e6adc72e120f84524c51ad57912df5a
/devel/electron10/files/patch-components_autofill_core_common_autofill__util.cc
d5a5caa19172993f7607fc01d76a74c6e50a2678
[]
no_license
tagattie/FreeBSD-Electron
f191d03c067d03ad3007e7748de905da06ba67f9
af26f766e772bb04db5eb95148ee071101301e4e
refs/heads/master
2023-09-04T10:56:17.446818
2023-09-04T09:03:11
2023-09-04T09:03:11
176,520,396
73
9
null
2023-08-31T03:29:16
2019-03-19T13:41:20
C++
UTF-8
C++
false
false
455
cc
--- components/autofill/core/common/autofill_util.cc.orig 2020-09-21 18:39:13 UTC +++ components/autofill/core/common/autofill_util.cc @@ -213,7 +213,7 @@ bool SanitizedFieldIsEmpty(const base::string16& value } bool ShouldAutoselectFirstSuggestionOnArrowDown() { -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) return true; #else return false;
[ "tagattie@gmail.com" ]
tagattie@gmail.com
2ffdb19b065c856e53071f7ba4b6984f747f347b
c551fd6f83712f91a1a1f36a511347ffa7bb2eb9
/Sasha/lesson6/mirror.cpp
6427336ef848a19cfaab484ad4fc8057f4b30829
[]
no_license
SashaAvag/group-sudo
3efc8575dbe33358edc15e9c20556c34f267845d
54e45705d60aa8e85d6431be3a84575df5ecfcda
refs/heads/master
2021-04-06T10:22:07.445956
2018-06-29T06:46:02
2018-06-29T06:46:02
124,559,340
0
0
null
2018-03-09T15:39:02
2018-03-09T15:39:02
null
UTF-8
C++
false
false
338
cpp
#include <iostream> int mirror (int n) { if ((n / 10) == 0) { std::cout<<n; }else { std::cout<<(n % 10); return mirror (n/10); } } int main () { std::cout<<"Enter number: "; int n; std::cin>>n; std::cout<<n<<" mirror image = "; mirror(n); std::cout<<std::endl; return 0; }
[ "Sashakingdoms@gmail.com" ]
Sashakingdoms@gmail.com
77db59a3fda5cad58f1281a204efdda01143d7c5
32c3c90c4c8e3e47fb5252f97213556bba84f30b
/week13/boj14890/orihehe_14890.cpp
8778f26360dce4b58f0a0c503d8c9b654c377f0a
[]
no_license
onww1/Soft-Algorithm-Study
8b4398ca8afcce64ec3e01609b0661044636bd39
6b66759a3e542d22b06433ff46aa82a0f883b529
refs/heads/master
2020-04-16T17:07:39.029418
2019-12-23T23:05:57
2019-12-23T23:05:57
165,763,614
3
3
null
2019-03-10T07:13:26
2019-01-15T01:32:14
C++
UTF-8
C++
false
false
1,814
cpp
/* BOJ 14890 - 경사로 시간복잡도 : O(N^2) 공간복잡도 : O(N^2) 가로 배열을 늘려 세로부분을 옮겨주어 가로부분만 봐주었습니다. 먼저 ru배열에 같은 값의 연속한 개수를 넣어줍니다. 그리고나서 가로로 한줄씩 보며 현재 위치의 수와 옆의 수가 다른 값일 때 작은 쪽에 L보다 많은 연속한 값이 있으면 그 위치에 경사로를 놓을 수 있다는 뜻이 됩니다. 그 과정에서 연속한 수의 차이가 1이하인지 체크, 경사로를 놓는다면 연속한 개수를 L만큼 줄여줍니다. */ #include <cstdio> using namespace std; /* 🐣🐥 */ int arr[201][101]; int ru[201][101]; int n, l, num, cnt, lp, ans; int main() { scanf("%d %d", &n, &l); for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) scanf("%d", &arr[i][j]); // 가로부분만 보기위해 옮겨준다. for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) arr[i + n][j] = arr[j][i]; // 연속한 개수 세주기. for (int i = 0; i < 2*n; i++) { num = arr[i][0], cnt = 1, lp = 0; for (int j = 1; j <= n; j++) { if (num != arr[i][j]) { while (lp < j) { ru[i][lp++] = cnt; } num = arr[i][j]; cnt = 1; } else { cnt++; } } } // 가능 여부 체크 부분 for (int i = 0; i < 2*n; i++) { for (int j = 1; j < n; j++) { if (arr[i][j - 1] > arr[i][j]) { if (ru[i][j] < l || arr[i][j-1]>arr[i][j]+1) break; lp = j; while (arr[i][lp] == arr[i][j]) { ru[i][lp++] -= l; } } else if (arr[i][j - 1] < arr[i][j]) { if (ru[i][j-1] < l || arr[i][j - 1]+1 < arr[i][j]) break; lp = j - 1; while (lp >=0 && arr[i][lp] == arr[i][j-1]) { ru[i][lp--] -= l; } } if (j == n - 1) ans++; } } printf("%d", ans); return 0; }
[ "38060133+orihehe@users.noreply.github.com" ]
38060133+orihehe@users.noreply.github.com
89947b262e0f36bc54e0e07887a7b517758d788f
1c330e9395fbc8bb35dd4c837dea010d29e6e7ff
/dsl/intv_multimap.cpp
68cb6da81c6e13c85e8b29c5014da4dc5e2d2a4c
[]
no_license
luk036/lineda
4e613cb8e3d9f4b18cb073a10663c9bc0f27103e
905cb898e5af4222f25299ea030136cc3d2be428
refs/heads/master
2021-01-17T05:19:32.255858
2019-10-04T05:02:42
2019-10-04T05:02:42
3,990,632
0
0
null
2019-10-04T05:02:43
2012-04-11T05:54:33
C++
UTF-8
C++
false
false
138
cpp
#include "intv_multimap.hpp" #include <iostream> using namespace std; void dummy_multimap() { std::intv_multimap<int, std::string> S; }
[ "luk036@gmail.com" ]
luk036@gmail.com
99b1460aae3715c9b446ddc67c0d51dcd6cd6ea6
38177e8ea1f87a877c16d2ca8bbf207ccf198dc1
/YoloDetectionHoloLensUnity/app/Il2CppOutputProject/Source/il2cppOutput/Bulk_UnityEngine.TextRenderingModule_0.cpp
88a43d18f6a7af97a898b6025a31f3a8542c5268
[ "MIT" ]
permissive
atolegen/YoloDetect
eaeee5ac5626591205b90f7fef70da09c336e604
30f230508d28859225bc9c199d69f7e723d12c0f
refs/heads/master
2022-12-22T00:19:23.551996
2020-08-28T17:13:41
2020-08-28T17:13:41
287,201,278
0
0
null
null
null
null
UTF-8
C++
false
false
222,848
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 <stdint.h> #include "il2cpp-class-internals.h" #include "codegen/il2cpp-codegen.h" #include "il2cpp-object-internals.h" struct VirtActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct GenericVirtActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj) { VirtualInvokeData invokeData; il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct InterfaceActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct GenericInterfaceActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj) { VirtualInvokeData invokeData; il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; // System.Action`1<System.Object> struct Action_1_t551A279CEADCF6EEAE8FA2B1E1E757D0D15290D0; // System.Action`1<UnityEngine.Font> struct Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C; // System.AsyncCallback struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4; // System.Byte[] struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821; // System.Char[] struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2; // System.Collections.Generic.IList`1<UnityEngine.UICharInfo> struct IList_1_t32D1BB5985FCCAC1B6B14D4E41B3E3315FD87B3E; // System.Collections.Generic.IList`1<UnityEngine.UILineInfo> struct IList_1_t6F2A098B6071B1699E7DC325A6F16089FE563544; // System.Collections.Generic.IList`1<UnityEngine.UIVertex> struct IList_1_t45C308B7C2BC6D4379698668EE5E126FF141A995; // System.Collections.Generic.List`1<UnityEngine.UICharInfo> struct List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E; // System.Collections.Generic.List`1<UnityEngine.UILineInfo> struct List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0; // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554; // System.Delegate struct Delegate_t; // System.DelegateData struct DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE; // System.Delegate[] struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86; // System.IAsyncResult struct IAsyncResult_t8E194308510B375B42432981AE5E7488C458D598; // System.Object[] struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A; // System.Reflection.MethodInfo struct MethodInfo_t; // System.String struct String_t; // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017; // UnityEngine.Font struct Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26; // UnityEngine.Font/FontTextureRebuildCallback struct FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C; // UnityEngine.GameObject struct GameObject_tBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F; // UnityEngine.Material struct Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598; // UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0; // UnityEngine.TextGenerationSettings struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68; // UnityEngine.TextGenerator struct TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8; // UnityEngine.TextMesh struct TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A; // UnityEngine.UICharInfo[] struct UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482; // UnityEngine.UILineInfo[] struct UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC; // UnityEngine.UIVertex[] struct UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A; extern RuntimeClass* Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C_il2cpp_TypeInfo_var; extern RuntimeClass* Debug_t7B5FCB117E2FD63B6838BC52821B252E2BFB61C4_il2cpp_TypeInfo_var; extern RuntimeClass* Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var; extern RuntimeClass* IDisposable_t7218B22548186B208D65EA5B7870503810A2D15A_il2cpp_TypeInfo_var; extern RuntimeClass* IntPtr_t_il2cpp_TypeInfo_var; extern RuntimeClass* List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_il2cpp_TypeInfo_var; extern RuntimeClass* List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0_il2cpp_TypeInfo_var; extern RuntimeClass* List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E_il2cpp_TypeInfo_var; extern RuntimeClass* Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var; extern RuntimeClass* ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var; extern RuntimeClass* Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var; extern RuntimeClass* UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var; extern RuntimeClass* Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var; extern RuntimeClass* Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_il2cpp_TypeInfo_var; extern String_t* _stringLiteral277905A8757DB70EAE0C8B996E4FCF857783BB03; extern String_t* _stringLiteral2C79056F1CBD7CDBD214C0C0421FFC46A2BD5CBD; extern String_t* _stringLiteral6F5E75D22C09C82C4D03E8E6E9ADE44476FEE514; extern String_t* _stringLiteral8D03707CEE3275C377839D6BF944BCECDF26A00B; extern const RuntimeMethod* Action_1_Invoke_mC307FDDD4FEA6818EE9A27D962C2C512B835DAEB_RuntimeMethod_var; extern const RuntimeMethod* List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71_RuntimeMethod_var; extern const RuntimeMethod* List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8_RuntimeMethod_var; extern const RuntimeMethod* List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD_RuntimeMethod_var; extern const uint32_t Font_InvokeTextureRebuilt_Internal_m2D4C9D99B6137EF380A19EC72D6EE8CBFF7B4062_MetadataUsageId; extern const uint32_t Font_add_textureRebuilt_m031EFCD3B164273920B133A8689C18ED87C9B18F_MetadataUsageId; extern const uint32_t Font_remove_textureRebuilt_mBEF163DAE27CA126D400646E850AAEE4AE8DAAB4_MetadataUsageId; extern const uint32_t TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66_MetadataUsageId; extern const uint32_t TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C_MetadataUsageId; extern const uint32_t TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D_MetadataUsageId; extern const uint32_t TextGenerator_Finalize_m6E9076F61F7B4DD5E56207F39E8F5FD85F188D8A_MetadataUsageId; extern const uint32_t TextGenerator_PopulateWithErrors_m1F1851B3C2B2EBEFD81C83DC124FB376C926B933_MetadataUsageId; extern const uint32_t TextGenerator_Populate_Internal_m42F7FED165D62BFD9C006D19A0FCE5B70C1EF92B_MetadataUsageId; extern const uint32_t TextGenerator_System_IDisposable_Dispose_m9D3291DC086282AF57A115B39D3C17BD0074FA3D_MetadataUsageId; extern const uint32_t TextGenerator_ValidatedSettings_m167131680BB6CD53B929EF189520F9FCF71FB1D3_MetadataUsageId; extern const uint32_t TextGenerator__ctor_m86E01E7BB9DC1B28F04961E482ED4D7065062BCE_MetadataUsageId; extern const uint32_t UIVertex__cctor_m86F60F5BB996D3C59B19B80C4BFB5770802BFB30_MetadataUsageId; struct Delegate_t_marshaled_com; struct Delegate_t_marshaled_pinvoke; struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68;; struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com; struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com;; struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke; struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke;; struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86; struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A; #ifndef U3CMODULEU3E_TDBB8B8FDA571F608D819B1D5558C135A3972639B_H #define U3CMODULEU3E_TDBB8B8FDA571F608D819B1D5558C135A3972639B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_tDBB8B8FDA571F608D819B1D5558C135A3972639B { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U3CMODULEU3E_TDBB8B8FDA571F608D819B1D5558C135A3972639B_H #ifndef RUNTIMEOBJECT_H #define RUNTIMEOBJECT_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Object #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEOBJECT_H struct Il2CppArrayBounds; #ifndef RUNTIMEARRAY_H #define RUNTIMEARRAY_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Array #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEARRAY_H #ifndef LIST_1_TD850FBA632A52824016AAA9B3748BA38F51E087E_H #define LIST_1_TD850FBA632A52824016AAA9B3748BA38F51E087E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.UICharInfo> struct List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E, ____items_1)); } inline UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* get__items_1() const { return ____items_1; } inline UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482** get_address_of__items_1() { return &____items_1; } inline void set__items_1(UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E_StaticFields, ____emptyArray_5)); } inline UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* get__emptyArray_5() const { return ____emptyArray_5; } inline UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(UICharInfoU5BU5D_t8C4FF69B643D49D3881FCB7A8525C5C5A9367482* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_TD850FBA632A52824016AAA9B3748BA38F51E087E_H #ifndef LIST_1_T7687D8368357F4437252DC75BFCE9DE76F3143A0_H #define LIST_1_T7687D8368357F4437252DC75BFCE9DE76F3143A0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.UILineInfo> struct List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0, ____items_1)); } inline UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* get__items_1() const { return ____items_1; } inline UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC** get_address_of__items_1() { return &____items_1; } inline void set__items_1(UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0_StaticFields, ____emptyArray_5)); } inline UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* get__emptyArray_5() const { return ____emptyArray_5; } inline UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(UILineInfoU5BU5D_t923CC56F4D67E9FA97CC73992DF16268B6A54FAC* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_T7687D8368357F4437252DC75BFCE9DE76F3143A0_H #ifndef LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #define LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____items_1)); } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* get__items_1() const { return ____items_1; } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A** get_address_of__items_1() { return &____items_1; } inline void set__items_1(UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_StaticFields, ____emptyArray_5)); } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* get__emptyArray_5() const { return ____emptyArray_5; } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #ifndef STRING_T_H #define STRING_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.String struct String_t : public RuntimeObject { public: // System.Int32 System.String::m_stringLength int32_t ___m_stringLength_0; // System.Char System.String::m_firstChar Il2CppChar ___m_firstChar_1; public: inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); } inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; } inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; } inline void set_m_stringLength_0(int32_t value) { ___m_stringLength_0 = value; } inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); } inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; } inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; } inline void set_m_firstChar_1(Il2CppChar value) { ___m_firstChar_1 = value; } }; struct String_t_StaticFields { public: // System.String System.String::Empty String_t* ___Empty_5; public: inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); } inline String_t* get_Empty_5() const { return ___Empty_5; } inline String_t** get_address_of_Empty_5() { return &___Empty_5; } inline void set_Empty_5(String_t* value) { ___Empty_5 = value; Il2CppCodeGenWriteBarrier((&___Empty_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // STRING_T_H #ifndef VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #define VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_com { }; #endif // VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifndef BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #define BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Boolean struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C { public: // System.Boolean System.Boolean::m_value bool ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C, ___m_value_0)); } inline bool get_m_value_0() const { return ___m_value_0; } inline bool* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(bool value) { ___m_value_0 = value; } }; struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields { public: // System.String System.Boolean::TrueString String_t* ___TrueString_5; // System.String System.Boolean::FalseString String_t* ___FalseString_6; public: inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___TrueString_5)); } inline String_t* get_TrueString_5() const { return ___TrueString_5; } inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; } inline void set_TrueString_5(String_t* value) { ___TrueString_5 = value; Il2CppCodeGenWriteBarrier((&___TrueString_5), value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___FalseString_6)); } inline String_t* get_FalseString_6() const { return ___FalseString_6; } inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; } inline void set_FalseString_6(String_t* value) { ___FalseString_6 = value; Il2CppCodeGenWriteBarrier((&___FalseString_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifndef BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #define BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Byte struct Byte_tF87C579059BD4633E6840EBBBEEF899C6E33EF07 { public: // System.Byte System.Byte::m_value uint8_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Byte_tF87C579059BD4633E6840EBBBEEF899C6E33EF07, ___m_value_0)); } inline uint8_t get_m_value_0() const { return ___m_value_0; } inline uint8_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(uint8_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #ifndef CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #define CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Char struct Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9 { public: // System.Char System.Char::m_value Il2CppChar ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9, ___m_value_0)); } inline Il2CppChar get_m_value_0() const { return ___m_value_0; } inline Il2CppChar* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(Il2CppChar value) { ___m_value_0 = value; } }; struct Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_StaticFields { public: // System.Byte[] System.Char::categoryForLatin1 ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___categoryForLatin1_3; public: inline static int32_t get_offset_of_categoryForLatin1_3() { return static_cast<int32_t>(offsetof(Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_StaticFields, ___categoryForLatin1_3)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_categoryForLatin1_3() const { return ___categoryForLatin1_3; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_categoryForLatin1_3() { return &___categoryForLatin1_3; } inline void set_categoryForLatin1_3(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___categoryForLatin1_3 = value; Il2CppCodeGenWriteBarrier((&___categoryForLatin1_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #ifndef ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #define ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521 : public ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF { public: public: }; struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields { public: // System.Char[] System.Enum::enumSeperatorCharArray CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___enumSeperatorCharArray_0; public: inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields, ___enumSeperatorCharArray_0)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; } inline void set_enumSeperatorCharArray_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___enumSeperatorCharArray_0 = value; Il2CppCodeGenWriteBarrier((&___enumSeperatorCharArray_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_com { }; #endif // ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifndef INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #define INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int32 struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102 { public: // System.Int32 System.Int32::m_value int32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_t585191389E07734F19F3156FF88FB3EF4800D102, ___m_value_0)); } inline int32_t get_m_value_0() const { return ___m_value_0; } inline int32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int32_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifndef INTPTR_T_H #define INTPTR_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTPTR_T_H #ifndef SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #define SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Single struct Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1 { public: // System.Single System.Single::m_value float ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1, ___m_value_0)); } inline float get_m_value_0() const { return ___m_value_0; } inline float* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(float value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #ifndef UINT32_T4980FA09003AFAAB5A6E361BA2748EA9A005709B_H #define UINT32_T4980FA09003AFAAB5A6E361BA2748EA9A005709B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UInt32 struct UInt32_t4980FA09003AFAAB5A6E361BA2748EA9A005709B { public: // System.UInt32 System.UInt32::m_value uint32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(UInt32_t4980FA09003AFAAB5A6E361BA2748EA9A005709B, ___m_value_0)); } inline uint32_t get_m_value_0() const { return ___m_value_0; } inline uint32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(uint32_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UINT32_T4980FA09003AFAAB5A6E361BA2748EA9A005709B_H #ifndef VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #define VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017 { public: union { struct { }; uint8_t Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017__padding[1]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifndef COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #define COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Color struct Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 { public: // System.Single UnityEngine.Color::r float ___r_0; // System.Single UnityEngine.Color::g float ___g_1; // System.Single UnityEngine.Color::b float ___b_2; // System.Single UnityEngine.Color::a float ___a_3; public: inline static int32_t get_offset_of_r_0() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___r_0)); } inline float get_r_0() const { return ___r_0; } inline float* get_address_of_r_0() { return &___r_0; } inline void set_r_0(float value) { ___r_0 = value; } inline static int32_t get_offset_of_g_1() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___g_1)); } inline float get_g_1() const { return ___g_1; } inline float* get_address_of_g_1() { return &___g_1; } inline void set_g_1(float value) { ___g_1 = value; } inline static int32_t get_offset_of_b_2() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___b_2)); } inline float get_b_2() const { return ___b_2; } inline float* get_address_of_b_2() { return &___b_2; } inline void set_b_2(float value) { ___b_2 = value; } inline static int32_t get_offset_of_a_3() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___a_3)); } inline float get_a_3() const { return ___a_3; } inline float* get_address_of_a_3() { return &___a_3; } inline void set_a_3(float value) { ___a_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #ifndef COLOR32_T23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23_H #define COLOR32_T23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Color32 struct Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 { public: union { #pragma pack(push, tp, 1) struct { // System.Int32 UnityEngine.Color32::rgba int32_t ___rgba_0; }; #pragma pack(pop, tp) struct { int32_t ___rgba_0_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { // System.Byte UnityEngine.Color32::r uint8_t ___r_1; }; #pragma pack(pop, tp) struct { uint8_t ___r_1_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___g_2_OffsetPadding[1]; // System.Byte UnityEngine.Color32::g uint8_t ___g_2; }; #pragma pack(pop, tp) struct { char ___g_2_OffsetPadding_forAlignmentOnly[1]; uint8_t ___g_2_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___b_3_OffsetPadding[2]; // System.Byte UnityEngine.Color32::b uint8_t ___b_3; }; #pragma pack(pop, tp) struct { char ___b_3_OffsetPadding_forAlignmentOnly[2]; uint8_t ___b_3_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___a_4_OffsetPadding[3]; // System.Byte UnityEngine.Color32::a uint8_t ___a_4; }; #pragma pack(pop, tp) struct { char ___a_4_OffsetPadding_forAlignmentOnly[3]; uint8_t ___a_4_forAlignmentOnly; }; }; public: inline static int32_t get_offset_of_rgba_0() { return static_cast<int32_t>(offsetof(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23, ___rgba_0)); } inline int32_t get_rgba_0() const { return ___rgba_0; } inline int32_t* get_address_of_rgba_0() { return &___rgba_0; } inline void set_rgba_0(int32_t value) { ___rgba_0 = value; } inline static int32_t get_offset_of_r_1() { return static_cast<int32_t>(offsetof(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23, ___r_1)); } inline uint8_t get_r_1() const { return ___r_1; } inline uint8_t* get_address_of_r_1() { return &___r_1; } inline void set_r_1(uint8_t value) { ___r_1 = value; } inline static int32_t get_offset_of_g_2() { return static_cast<int32_t>(offsetof(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23, ___g_2)); } inline uint8_t get_g_2() const { return ___g_2; } inline uint8_t* get_address_of_g_2() { return &___g_2; } inline void set_g_2(uint8_t value) { ___g_2 = value; } inline static int32_t get_offset_of_b_3() { return static_cast<int32_t>(offsetof(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23, ___b_3)); } inline uint8_t get_b_3() const { return ___b_3; } inline uint8_t* get_address_of_b_3() { return &___b_3; } inline void set_b_3(uint8_t value) { ___b_3 = value; } inline static int32_t get_offset_of_a_4() { return static_cast<int32_t>(offsetof(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23, ___a_4)); } inline uint8_t get_a_4() const { return ___a_4; } inline uint8_t* get_address_of_a_4() { return &___a_4; } inline void set_a_4(uint8_t value) { ___a_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COLOR32_T23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23_H #ifndef RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #define RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Rect struct Rect_t35B976DE901B5423C11705E156938EA27AB402CE { public: // System.Single UnityEngine.Rect::m_XMin float ___m_XMin_0; // System.Single UnityEngine.Rect::m_YMin float ___m_YMin_1; // System.Single UnityEngine.Rect::m_Width float ___m_Width_2; // System.Single UnityEngine.Rect::m_Height float ___m_Height_3; public: inline static int32_t get_offset_of_m_XMin_0() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_XMin_0)); } inline float get_m_XMin_0() const { return ___m_XMin_0; } inline float* get_address_of_m_XMin_0() { return &___m_XMin_0; } inline void set_m_XMin_0(float value) { ___m_XMin_0 = value; } inline static int32_t get_offset_of_m_YMin_1() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_YMin_1)); } inline float get_m_YMin_1() const { return ___m_YMin_1; } inline float* get_address_of_m_YMin_1() { return &___m_YMin_1; } inline void set_m_YMin_1(float value) { ___m_YMin_1 = value; } inline static int32_t get_offset_of_m_Width_2() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_Width_2)); } inline float get_m_Width_2() const { return ___m_Width_2; } inline float* get_address_of_m_Width_2() { return &___m_Width_2; } inline void set_m_Width_2(float value) { ___m_Width_2 = value; } inline static int32_t get_offset_of_m_Height_3() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_Height_3)); } inline float get_m_Height_3() const { return ___m_Height_3; } inline float* get_address_of_m_Height_3() { return &___m_Height_3; } inline void set_m_Height_3(float value) { ___m_Height_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #ifndef UILINEINFO_T0AF27251CA07CEE2BC0C1FEF752245596B8033E6_H #define UILINEINFO_T0AF27251CA07CEE2BC0C1FEF752245596B8033E6_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.UILineInfo struct UILineInfo_t0AF27251CA07CEE2BC0C1FEF752245596B8033E6 { public: // System.Int32 UnityEngine.UILineInfo::startCharIdx int32_t ___startCharIdx_0; // System.Int32 UnityEngine.UILineInfo::height int32_t ___height_1; // System.Single UnityEngine.UILineInfo::topY float ___topY_2; // System.Single UnityEngine.UILineInfo::leading float ___leading_3; public: inline static int32_t get_offset_of_startCharIdx_0() { return static_cast<int32_t>(offsetof(UILineInfo_t0AF27251CA07CEE2BC0C1FEF752245596B8033E6, ___startCharIdx_0)); } inline int32_t get_startCharIdx_0() const { return ___startCharIdx_0; } inline int32_t* get_address_of_startCharIdx_0() { return &___startCharIdx_0; } inline void set_startCharIdx_0(int32_t value) { ___startCharIdx_0 = value; } inline static int32_t get_offset_of_height_1() { return static_cast<int32_t>(offsetof(UILineInfo_t0AF27251CA07CEE2BC0C1FEF752245596B8033E6, ___height_1)); } inline int32_t get_height_1() const { return ___height_1; } inline int32_t* get_address_of_height_1() { return &___height_1; } inline void set_height_1(int32_t value) { ___height_1 = value; } inline static int32_t get_offset_of_topY_2() { return static_cast<int32_t>(offsetof(UILineInfo_t0AF27251CA07CEE2BC0C1FEF752245596B8033E6, ___topY_2)); } inline float get_topY_2() const { return ___topY_2; } inline float* get_address_of_topY_2() { return &___topY_2; } inline void set_topY_2(float value) { ___topY_2 = value; } inline static int32_t get_offset_of_leading_3() { return static_cast<int32_t>(offsetof(UILineInfo_t0AF27251CA07CEE2BC0C1FEF752245596B8033E6, ___leading_3)); } inline float get_leading_3() const { return ___leading_3; } inline float* get_address_of_leading_3() { return &___leading_3; } inline void set_leading_3(float value) { ___leading_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UILINEINFO_T0AF27251CA07CEE2BC0C1FEF752245596B8033E6_H #ifndef VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #define VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Vector2 struct Vector2_tA85D2DD88578276CA8A8796756458277E72D073D { public: // System.Single UnityEngine.Vector2::x float ___x_0; // System.Single UnityEngine.Vector2::y float ___y_1; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D, ___x_0)); } inline float get_x_0() const { return ___x_0; } inline float* get_address_of_x_0() { return &___x_0; } inline void set_x_0(float value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D, ___y_1)); } inline float get_y_1() const { return ___y_1; } inline float* get_address_of_y_1() { return &___y_1; } inline void set_y_1(float value) { ___y_1 = value; } }; struct Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields { public: // UnityEngine.Vector2 UnityEngine.Vector2::zeroVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___zeroVector_2; // UnityEngine.Vector2 UnityEngine.Vector2::oneVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___oneVector_3; // UnityEngine.Vector2 UnityEngine.Vector2::upVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___upVector_4; // UnityEngine.Vector2 UnityEngine.Vector2::downVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___downVector_5; // UnityEngine.Vector2 UnityEngine.Vector2::leftVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___leftVector_6; // UnityEngine.Vector2 UnityEngine.Vector2::rightVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___rightVector_7; // UnityEngine.Vector2 UnityEngine.Vector2::positiveInfinityVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___positiveInfinityVector_8; // UnityEngine.Vector2 UnityEngine.Vector2::negativeInfinityVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___negativeInfinityVector_9; public: inline static int32_t get_offset_of_zeroVector_2() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___zeroVector_2)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_zeroVector_2() const { return ___zeroVector_2; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_zeroVector_2() { return &___zeroVector_2; } inline void set_zeroVector_2(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___zeroVector_2 = value; } inline static int32_t get_offset_of_oneVector_3() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___oneVector_3)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_oneVector_3() const { return ___oneVector_3; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_oneVector_3() { return &___oneVector_3; } inline void set_oneVector_3(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___oneVector_3 = value; } inline static int32_t get_offset_of_upVector_4() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___upVector_4)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_upVector_4() const { return ___upVector_4; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_upVector_4() { return &___upVector_4; } inline void set_upVector_4(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___upVector_4 = value; } inline static int32_t get_offset_of_downVector_5() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___downVector_5)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_downVector_5() const { return ___downVector_5; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_downVector_5() { return &___downVector_5; } inline void set_downVector_5(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___downVector_5 = value; } inline static int32_t get_offset_of_leftVector_6() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___leftVector_6)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_leftVector_6() const { return ___leftVector_6; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_leftVector_6() { return &___leftVector_6; } inline void set_leftVector_6(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___leftVector_6 = value; } inline static int32_t get_offset_of_rightVector_7() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___rightVector_7)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_rightVector_7() const { return ___rightVector_7; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_rightVector_7() { return &___rightVector_7; } inline void set_rightVector_7(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___rightVector_7 = value; } inline static int32_t get_offset_of_positiveInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___positiveInfinityVector_8)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_positiveInfinityVector_8() const { return ___positiveInfinityVector_8; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_positiveInfinityVector_8() { return &___positiveInfinityVector_8; } inline void set_positiveInfinityVector_8(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___positiveInfinityVector_8 = value; } inline static int32_t get_offset_of_negativeInfinityVector_9() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___negativeInfinityVector_9)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_negativeInfinityVector_9() const { return ___negativeInfinityVector_9; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_negativeInfinityVector_9() { return &___negativeInfinityVector_9; } inline void set_negativeInfinityVector_9(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___negativeInfinityVector_9 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #ifndef VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #define VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Vector3 struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 { public: // System.Single UnityEngine.Vector3::x float ___x_2; // System.Single UnityEngine.Vector3::y float ___y_3; // System.Single UnityEngine.Vector3::z float ___z_4; public: inline static int32_t get_offset_of_x_2() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___x_2)); } inline float get_x_2() const { return ___x_2; } inline float* get_address_of_x_2() { return &___x_2; } inline void set_x_2(float value) { ___x_2 = value; } inline static int32_t get_offset_of_y_3() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___y_3)); } inline float get_y_3() const { return ___y_3; } inline float* get_address_of_y_3() { return &___y_3; } inline void set_y_3(float value) { ___y_3 = value; } inline static int32_t get_offset_of_z_4() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___z_4)); } inline float get_z_4() const { return ___z_4; } inline float* get_address_of_z_4() { return &___z_4; } inline void set_z_4(float value) { ___z_4 = value; } }; struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields { public: // UnityEngine.Vector3 UnityEngine.Vector3::zeroVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___zeroVector_5; // UnityEngine.Vector3 UnityEngine.Vector3::oneVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___oneVector_6; // UnityEngine.Vector3 UnityEngine.Vector3::upVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___upVector_7; // UnityEngine.Vector3 UnityEngine.Vector3::downVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___downVector_8; // UnityEngine.Vector3 UnityEngine.Vector3::leftVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___leftVector_9; // UnityEngine.Vector3 UnityEngine.Vector3::rightVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___rightVector_10; // UnityEngine.Vector3 UnityEngine.Vector3::forwardVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___forwardVector_11; // UnityEngine.Vector3 UnityEngine.Vector3::backVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___backVector_12; // UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___positiveInfinityVector_13; // UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___negativeInfinityVector_14; public: inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___zeroVector_5)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_zeroVector_5() const { return ___zeroVector_5; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_zeroVector_5() { return &___zeroVector_5; } inline void set_zeroVector_5(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___zeroVector_5 = value; } inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___oneVector_6)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_oneVector_6() const { return ___oneVector_6; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_oneVector_6() { return &___oneVector_6; } inline void set_oneVector_6(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___oneVector_6 = value; } inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___upVector_7)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_upVector_7() const { return ___upVector_7; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_upVector_7() { return &___upVector_7; } inline void set_upVector_7(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___upVector_7 = value; } inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___downVector_8)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_downVector_8() const { return ___downVector_8; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_downVector_8() { return &___downVector_8; } inline void set_downVector_8(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___downVector_8 = value; } inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___leftVector_9)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_leftVector_9() const { return ___leftVector_9; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_leftVector_9() { return &___leftVector_9; } inline void set_leftVector_9(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___leftVector_9 = value; } inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___rightVector_10)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_rightVector_10() const { return ___rightVector_10; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_rightVector_10() { return &___rightVector_10; } inline void set_rightVector_10(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___rightVector_10 = value; } inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___forwardVector_11)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_forwardVector_11() const { return ___forwardVector_11; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_forwardVector_11() { return &___forwardVector_11; } inline void set_forwardVector_11(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___forwardVector_11 = value; } inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___backVector_12)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_backVector_12() const { return ___backVector_12; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_backVector_12() { return &___backVector_12; } inline void set_backVector_12(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___backVector_12 = value; } inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___positiveInfinityVector_13)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; } inline void set_positiveInfinityVector_13(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___positiveInfinityVector_13 = value; } inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___negativeInfinityVector_14)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; } inline void set_negativeInfinityVector_14(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___negativeInfinityVector_14 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #ifndef VECTOR4_TD148D6428C3F8FF6CD998F82090113C2B490B76E_H #define VECTOR4_TD148D6428C3F8FF6CD998F82090113C2B490B76E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Vector4 struct Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E { public: // System.Single UnityEngine.Vector4::x float ___x_1; // System.Single UnityEngine.Vector4::y float ___y_2; // System.Single UnityEngine.Vector4::z float ___z_3; // System.Single UnityEngine.Vector4::w float ___w_4; public: inline static int32_t get_offset_of_x_1() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E, ___x_1)); } inline float get_x_1() const { return ___x_1; } inline float* get_address_of_x_1() { return &___x_1; } inline void set_x_1(float value) { ___x_1 = value; } inline static int32_t get_offset_of_y_2() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E, ___y_2)); } inline float get_y_2() const { return ___y_2; } inline float* get_address_of_y_2() { return &___y_2; } inline void set_y_2(float value) { ___y_2 = value; } inline static int32_t get_offset_of_z_3() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E, ___z_3)); } inline float get_z_3() const { return ___z_3; } inline float* get_address_of_z_3() { return &___z_3; } inline void set_z_3(float value) { ___z_3 = value; } inline static int32_t get_offset_of_w_4() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E, ___w_4)); } inline float get_w_4() const { return ___w_4; } inline float* get_address_of_w_4() { return &___w_4; } inline void set_w_4(float value) { ___w_4 = value; } }; struct Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E_StaticFields { public: // UnityEngine.Vector4 UnityEngine.Vector4::zeroVector Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___zeroVector_5; // UnityEngine.Vector4 UnityEngine.Vector4::oneVector Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___oneVector_6; // UnityEngine.Vector4 UnityEngine.Vector4::positiveInfinityVector Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___positiveInfinityVector_7; // UnityEngine.Vector4 UnityEngine.Vector4::negativeInfinityVector Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___negativeInfinityVector_8; public: inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E_StaticFields, ___zeroVector_5)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_zeroVector_5() const { return ___zeroVector_5; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_zeroVector_5() { return &___zeroVector_5; } inline void set_zeroVector_5(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___zeroVector_5 = value; } inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E_StaticFields, ___oneVector_6)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_oneVector_6() const { return ___oneVector_6; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_oneVector_6() { return &___oneVector_6; } inline void set_oneVector_6(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___oneVector_6 = value; } inline static int32_t get_offset_of_positiveInfinityVector_7() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E_StaticFields, ___positiveInfinityVector_7)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_positiveInfinityVector_7() const { return ___positiveInfinityVector_7; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_positiveInfinityVector_7() { return &___positiveInfinityVector_7; } inline void set_positiveInfinityVector_7(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___positiveInfinityVector_7 = value; } inline static int32_t get_offset_of_negativeInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E_StaticFields, ___negativeInfinityVector_8)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_negativeInfinityVector_8() const { return ___negativeInfinityVector_8; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_negativeInfinityVector_8() { return &___negativeInfinityVector_8; } inline void set_negativeInfinityVector_8(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___negativeInfinityVector_8 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VECTOR4_TD148D6428C3F8FF6CD998F82090113C2B490B76E_H #ifndef DELEGATE_T_H #define DELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Delegate struct Delegate_t : public RuntimeObject { public: // System.IntPtr System.Delegate::method_ptr Il2CppMethodPointer ___method_ptr_0; // System.IntPtr System.Delegate::invoke_impl intptr_t ___invoke_impl_1; // System.Object System.Delegate::m_target RuntimeObject * ___m_target_2; // System.IntPtr System.Delegate::method intptr_t ___method_3; // System.IntPtr System.Delegate::delegate_trampoline intptr_t ___delegate_trampoline_4; // System.IntPtr System.Delegate::extra_arg intptr_t ___extra_arg_5; // System.IntPtr System.Delegate::method_code intptr_t ___method_code_6; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_7; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_8; // System.DelegateData System.Delegate::data DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; // System.Boolean System.Delegate::method_is_virtual bool ___method_is_virtual_10; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); } inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; } inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; } inline void set_method_ptr_0(Il2CppMethodPointer value) { ___method_ptr_0 = value; } inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); } inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; } inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; } inline void set_invoke_impl_1(intptr_t value) { ___invoke_impl_1 = value; } inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); } inline RuntimeObject * get_m_target_2() const { return ___m_target_2; } inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; } inline void set_m_target_2(RuntimeObject * value) { ___m_target_2 = value; Il2CppCodeGenWriteBarrier((&___m_target_2), value); } inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); } inline intptr_t get_method_3() const { return ___method_3; } inline intptr_t* get_address_of_method_3() { return &___method_3; } inline void set_method_3(intptr_t value) { ___method_3 = value; } inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); } inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; } inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; } inline void set_delegate_trampoline_4(intptr_t value) { ___delegate_trampoline_4 = value; } inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); } inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; } inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; } inline void set_extra_arg_5(intptr_t value) { ___extra_arg_5 = value; } inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); } inline intptr_t get_method_code_6() const { return ___method_code_6; } inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; } inline void set_method_code_6(intptr_t value) { ___method_code_6 = value; } inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); } inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; } inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; } inline void set_method_info_7(MethodInfo_t * value) { ___method_info_7 = value; Il2CppCodeGenWriteBarrier((&___method_info_7), value); } inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); } inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; } inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; } inline void set_original_method_info_8(MethodInfo_t * value) { ___original_method_info_8 = value; Il2CppCodeGenWriteBarrier((&___original_method_info_8), value); } inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * get_data_9() const { return ___data_9; } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE ** get_address_of_data_9() { return &___data_9; } inline void set_data_9(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * value) { ___data_9 = value; Il2CppCodeGenWriteBarrier((&___data_9), value); } inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); } inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; } inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; } inline void set_method_is_virtual_10(bool value) { ___method_is_virtual_10 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Delegate struct Delegate_t_marshaled_pinvoke { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; // Native definition for COM marshalling of System.Delegate struct Delegate_t_marshaled_com { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; #endif // DELEGATE_T_H #ifndef FONTSTYLE_T273973EBB1F40C2381F6D60AB957149DE5720CF3_H #define FONTSTYLE_T273973EBB1F40C2381F6D60AB957149DE5720CF3_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.FontStyle struct FontStyle_t273973EBB1F40C2381F6D60AB957149DE5720CF3 { public: // System.Int32 UnityEngine.FontStyle::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(FontStyle_t273973EBB1F40C2381F6D60AB957149DE5720CF3, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // FONTSTYLE_T273973EBB1F40C2381F6D60AB957149DE5720CF3_H #ifndef HORIZONTALWRAPMODE_T56D876281F814EC1AF0C21A34E20BBF4BEEA302C_H #define HORIZONTALWRAPMODE_T56D876281F814EC1AF0C21A34E20BBF4BEEA302C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.HorizontalWrapMode struct HorizontalWrapMode_t56D876281F814EC1AF0C21A34E20BBF4BEEA302C { public: // System.Int32 UnityEngine.HorizontalWrapMode::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(HorizontalWrapMode_t56D876281F814EC1AF0C21A34E20BBF4BEEA302C, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HORIZONTALWRAPMODE_T56D876281F814EC1AF0C21A34E20BBF4BEEA302C_H #ifndef OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #define OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 : public RuntimeObject { public: // System.IntPtr UnityEngine.Object::m_CachedPtr intptr_t ___m_CachedPtr_0; public: inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0, ___m_CachedPtr_0)); } inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; } inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; } inline void set_m_CachedPtr_0(intptr_t value) { ___m_CachedPtr_0 = value; } }; struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields { public: // System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1; public: inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); } inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; } inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; } inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value) { ___OffsetOfInstanceIDInCPlusPlusObject_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke { intptr_t ___m_CachedPtr_0; }; // Native definition for COM marshalling of UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com { intptr_t ___m_CachedPtr_0; }; #endif // OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #ifndef TEXTANCHOR_TEC19034D476659A5E05366C63564F34DD30E7C57_H #define TEXTANCHOR_TEC19034D476659A5E05366C63564F34DD30E7C57_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.TextAnchor struct TextAnchor_tEC19034D476659A5E05366C63564F34DD30E7C57 { public: // System.Int32 UnityEngine.TextAnchor::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TextAnchor_tEC19034D476659A5E05366C63564F34DD30E7C57, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TEXTANCHOR_TEC19034D476659A5E05366C63564F34DD30E7C57_H #ifndef TEXTGENERATIONERROR_T7D5BA12E3120623131293E20A1120847377A2524_H #define TEXTGENERATIONERROR_T7D5BA12E3120623131293E20A1120847377A2524_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.TextGenerationError struct TextGenerationError_t7D5BA12E3120623131293E20A1120847377A2524 { public: // System.Int32 UnityEngine.TextGenerationError::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TextGenerationError_t7D5BA12E3120623131293E20A1120847377A2524, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TEXTGENERATIONERROR_T7D5BA12E3120623131293E20A1120847377A2524_H #ifndef UICHARINFO_TB4C92043A686A600D36A92E3108F173C499E318A_H #define UICHARINFO_TB4C92043A686A600D36A92E3108F173C499E318A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.UICharInfo struct UICharInfo_tB4C92043A686A600D36A92E3108F173C499E318A { public: // UnityEngine.Vector2 UnityEngine.UICharInfo::cursorPos Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___cursorPos_0; // System.Single UnityEngine.UICharInfo::charWidth float ___charWidth_1; public: inline static int32_t get_offset_of_cursorPos_0() { return static_cast<int32_t>(offsetof(UICharInfo_tB4C92043A686A600D36A92E3108F173C499E318A, ___cursorPos_0)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_cursorPos_0() const { return ___cursorPos_0; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_cursorPos_0() { return &___cursorPos_0; } inline void set_cursorPos_0(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___cursorPos_0 = value; } inline static int32_t get_offset_of_charWidth_1() { return static_cast<int32_t>(offsetof(UICharInfo_tB4C92043A686A600D36A92E3108F173C499E318A, ___charWidth_1)); } inline float get_charWidth_1() const { return ___charWidth_1; } inline float* get_address_of_charWidth_1() { return &___charWidth_1; } inline void set_charWidth_1(float value) { ___charWidth_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UICHARINFO_TB4C92043A686A600D36A92E3108F173C499E318A_H #ifndef UIVERTEX_T0583C35B730B218B542E80203F5F4BC6F1E9E577_H #define UIVERTEX_T0583C35B730B218B542E80203F5F4BC6F1E9E577_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.UIVertex struct UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 { public: // UnityEngine.Vector3 UnityEngine.UIVertex::position Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___position_0; // UnityEngine.Vector3 UnityEngine.UIVertex::normal Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___normal_1; // UnityEngine.Vector4 UnityEngine.UIVertex::tangent Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___tangent_2; // UnityEngine.Color32 UnityEngine.UIVertex::color Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 ___color_3; // UnityEngine.Vector2 UnityEngine.UIVertex::uv0 Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___uv0_4; // UnityEngine.Vector2 UnityEngine.UIVertex::uv1 Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___uv1_5; // UnityEngine.Vector2 UnityEngine.UIVertex::uv2 Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___uv2_6; // UnityEngine.Vector2 UnityEngine.UIVertex::uv3 Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___uv3_7; public: inline static int32_t get_offset_of_position_0() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___position_0)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_position_0() const { return ___position_0; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_position_0() { return &___position_0; } inline void set_position_0(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___position_0 = value; } inline static int32_t get_offset_of_normal_1() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___normal_1)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_normal_1() const { return ___normal_1; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_normal_1() { return &___normal_1; } inline void set_normal_1(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___normal_1 = value; } inline static int32_t get_offset_of_tangent_2() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___tangent_2)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_tangent_2() const { return ___tangent_2; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_tangent_2() { return &___tangent_2; } inline void set_tangent_2(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___tangent_2 = value; } inline static int32_t get_offset_of_color_3() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___color_3)); } inline Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 get_color_3() const { return ___color_3; } inline Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 * get_address_of_color_3() { return &___color_3; } inline void set_color_3(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 value) { ___color_3 = value; } inline static int32_t get_offset_of_uv0_4() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___uv0_4)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_uv0_4() const { return ___uv0_4; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_uv0_4() { return &___uv0_4; } inline void set_uv0_4(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___uv0_4 = value; } inline static int32_t get_offset_of_uv1_5() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___uv1_5)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_uv1_5() const { return ___uv1_5; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_uv1_5() { return &___uv1_5; } inline void set_uv1_5(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___uv1_5 = value; } inline static int32_t get_offset_of_uv2_6() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___uv2_6)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_uv2_6() const { return ___uv2_6; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_uv2_6() { return &___uv2_6; } inline void set_uv2_6(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___uv2_6 = value; } inline static int32_t get_offset_of_uv3_7() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577, ___uv3_7)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_uv3_7() const { return ___uv3_7; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_uv3_7() { return &___uv3_7; } inline void set_uv3_7(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___uv3_7 = value; } }; struct UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields { public: // UnityEngine.Color32 UnityEngine.UIVertex::s_DefaultColor Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 ___s_DefaultColor_8; // UnityEngine.Vector4 UnityEngine.UIVertex::s_DefaultTangent Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E ___s_DefaultTangent_9; // UnityEngine.UIVertex UnityEngine.UIVertex::simpleVert UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 ___simpleVert_10; public: inline static int32_t get_offset_of_s_DefaultColor_8() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields, ___s_DefaultColor_8)); } inline Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 get_s_DefaultColor_8() const { return ___s_DefaultColor_8; } inline Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 * get_address_of_s_DefaultColor_8() { return &___s_DefaultColor_8; } inline void set_s_DefaultColor_8(Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 value) { ___s_DefaultColor_8 = value; } inline static int32_t get_offset_of_s_DefaultTangent_9() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields, ___s_DefaultTangent_9)); } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E get_s_DefaultTangent_9() const { return ___s_DefaultTangent_9; } inline Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * get_address_of_s_DefaultTangent_9() { return &___s_DefaultTangent_9; } inline void set_s_DefaultTangent_9(Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E value) { ___s_DefaultTangent_9 = value; } inline static int32_t get_offset_of_simpleVert_10() { return static_cast<int32_t>(offsetof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields, ___simpleVert_10)); } inline UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 get_simpleVert_10() const { return ___simpleVert_10; } inline UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 * get_address_of_simpleVert_10() { return &___simpleVert_10; } inline void set_simpleVert_10(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 value) { ___simpleVert_10 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UIVERTEX_T0583C35B730B218B542E80203F5F4BC6F1E9E577_H #ifndef VERTICALWRAPMODE_TD909C5B2F6A25AE3797BC71373196D850FC845E9_H #define VERTICALWRAPMODE_TD909C5B2F6A25AE3797BC71373196D850FC845E9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.VerticalWrapMode struct VerticalWrapMode_tD909C5B2F6A25AE3797BC71373196D850FC845E9 { public: // System.Int32 UnityEngine.VerticalWrapMode::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(VerticalWrapMode_tD909C5B2F6A25AE3797BC71373196D850FC845E9, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VERTICALWRAPMODE_TD909C5B2F6A25AE3797BC71373196D850FC845E9_H #ifndef MULTICASTDELEGATE_T_H #define MULTICASTDELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MulticastDelegate struct MulticastDelegate_t : public Delegate_t { public: // System.Delegate[] System.MulticastDelegate::delegates DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11; public: inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* get_delegates_11() const { return ___delegates_11; } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86** get_address_of_delegates_11() { return &___delegates_11; } inline void set_delegates_11(DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* value) { ___delegates_11 = value; Il2CppCodeGenWriteBarrier((&___delegates_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke { Delegate_t_marshaled_pinvoke** ___delegates_11; }; // Native definition for COM marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com { Delegate_t_marshaled_com** ___delegates_11; }; #endif // MULTICASTDELEGATE_T_H #ifndef COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #define COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Component struct Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #ifndef FONT_T1EDE54AF557272BE314EB4B40EFA50CEB353CA26_H #define FONT_T1EDE54AF557272BE314EB4B40EFA50CEB353CA26_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Font struct Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: // UnityEngine.Font_FontTextureRebuildCallback UnityEngine.Font::m_FontTextureRebuildCallback FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * ___m_FontTextureRebuildCallback_5; public: inline static int32_t get_offset_of_m_FontTextureRebuildCallback_5() { return static_cast<int32_t>(offsetof(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26, ___m_FontTextureRebuildCallback_5)); } inline FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * get_m_FontTextureRebuildCallback_5() const { return ___m_FontTextureRebuildCallback_5; } inline FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C ** get_address_of_m_FontTextureRebuildCallback_5() { return &___m_FontTextureRebuildCallback_5; } inline void set_m_FontTextureRebuildCallback_5(FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * value) { ___m_FontTextureRebuildCallback_5 = value; Il2CppCodeGenWriteBarrier((&___m_FontTextureRebuildCallback_5), value); } }; struct Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields { public: // System.Action`1<UnityEngine.Font> UnityEngine.Font::textureRebuilt Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * ___textureRebuilt_4; public: inline static int32_t get_offset_of_textureRebuilt_4() { return static_cast<int32_t>(offsetof(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields, ___textureRebuilt_4)); } inline Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * get_textureRebuilt_4() const { return ___textureRebuilt_4; } inline Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C ** get_address_of_textureRebuilt_4() { return &___textureRebuilt_4; } inline void set_textureRebuilt_4(Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * value) { ___textureRebuilt_4 = value; Il2CppCodeGenWriteBarrier((&___textureRebuilt_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // FONT_T1EDE54AF557272BE314EB4B40EFA50CEB353CA26_H #ifndef GAMEOBJECT_TBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F_H #define GAMEOBJECT_TBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.GameObject struct GameObject_tBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // GAMEOBJECT_TBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F_H #ifndef MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #define MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Material struct Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #ifndef TEXTGENERATIONSETTINGS_T37703542535A1638D2A08F41DB629A483616AF68_H #define TEXTGENERATIONSETTINGS_T37703542535A1638D2A08F41DB629A483616AF68_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.TextGenerationSettings struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 { public: // UnityEngine.Font UnityEngine.TextGenerationSettings::font Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font_0; // UnityEngine.Color UnityEngine.TextGenerationSettings::color Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color_1; // System.Int32 UnityEngine.TextGenerationSettings::fontSize int32_t ___fontSize_2; // System.Single UnityEngine.TextGenerationSettings::lineSpacing float ___lineSpacing_3; // System.Boolean UnityEngine.TextGenerationSettings::richText bool ___richText_4; // System.Single UnityEngine.TextGenerationSettings::scaleFactor float ___scaleFactor_5; // UnityEngine.FontStyle UnityEngine.TextGenerationSettings::fontStyle int32_t ___fontStyle_6; // UnityEngine.TextAnchor UnityEngine.TextGenerationSettings::textAnchor int32_t ___textAnchor_7; // System.Boolean UnityEngine.TextGenerationSettings::alignByGeometry bool ___alignByGeometry_8; // System.Boolean UnityEngine.TextGenerationSettings::resizeTextForBestFit bool ___resizeTextForBestFit_9; // System.Int32 UnityEngine.TextGenerationSettings::resizeTextMinSize int32_t ___resizeTextMinSize_10; // System.Int32 UnityEngine.TextGenerationSettings::resizeTextMaxSize int32_t ___resizeTextMaxSize_11; // System.Boolean UnityEngine.TextGenerationSettings::updateBounds bool ___updateBounds_12; // UnityEngine.VerticalWrapMode UnityEngine.TextGenerationSettings::verticalOverflow int32_t ___verticalOverflow_13; // UnityEngine.HorizontalWrapMode UnityEngine.TextGenerationSettings::horizontalOverflow int32_t ___horizontalOverflow_14; // UnityEngine.Vector2 UnityEngine.TextGenerationSettings::generationExtents Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___generationExtents_15; // UnityEngine.Vector2 UnityEngine.TextGenerationSettings::pivot Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___pivot_16; // System.Boolean UnityEngine.TextGenerationSettings::generateOutOfBounds bool ___generateOutOfBounds_17; public: inline static int32_t get_offset_of_font_0() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___font_0)); } inline Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * get_font_0() const { return ___font_0; } inline Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 ** get_address_of_font_0() { return &___font_0; } inline void set_font_0(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * value) { ___font_0 = value; Il2CppCodeGenWriteBarrier((&___font_0), value); } inline static int32_t get_offset_of_color_1() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___color_1)); } inline Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 get_color_1() const { return ___color_1; } inline Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * get_address_of_color_1() { return &___color_1; } inline void set_color_1(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 value) { ___color_1 = value; } inline static int32_t get_offset_of_fontSize_2() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___fontSize_2)); } inline int32_t get_fontSize_2() const { return ___fontSize_2; } inline int32_t* get_address_of_fontSize_2() { return &___fontSize_2; } inline void set_fontSize_2(int32_t value) { ___fontSize_2 = value; } inline static int32_t get_offset_of_lineSpacing_3() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___lineSpacing_3)); } inline float get_lineSpacing_3() const { return ___lineSpacing_3; } inline float* get_address_of_lineSpacing_3() { return &___lineSpacing_3; } inline void set_lineSpacing_3(float value) { ___lineSpacing_3 = value; } inline static int32_t get_offset_of_richText_4() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___richText_4)); } inline bool get_richText_4() const { return ___richText_4; } inline bool* get_address_of_richText_4() { return &___richText_4; } inline void set_richText_4(bool value) { ___richText_4 = value; } inline static int32_t get_offset_of_scaleFactor_5() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___scaleFactor_5)); } inline float get_scaleFactor_5() const { return ___scaleFactor_5; } inline float* get_address_of_scaleFactor_5() { return &___scaleFactor_5; } inline void set_scaleFactor_5(float value) { ___scaleFactor_5 = value; } inline static int32_t get_offset_of_fontStyle_6() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___fontStyle_6)); } inline int32_t get_fontStyle_6() const { return ___fontStyle_6; } inline int32_t* get_address_of_fontStyle_6() { return &___fontStyle_6; } inline void set_fontStyle_6(int32_t value) { ___fontStyle_6 = value; } inline static int32_t get_offset_of_textAnchor_7() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___textAnchor_7)); } inline int32_t get_textAnchor_7() const { return ___textAnchor_7; } inline int32_t* get_address_of_textAnchor_7() { return &___textAnchor_7; } inline void set_textAnchor_7(int32_t value) { ___textAnchor_7 = value; } inline static int32_t get_offset_of_alignByGeometry_8() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___alignByGeometry_8)); } inline bool get_alignByGeometry_8() const { return ___alignByGeometry_8; } inline bool* get_address_of_alignByGeometry_8() { return &___alignByGeometry_8; } inline void set_alignByGeometry_8(bool value) { ___alignByGeometry_8 = value; } inline static int32_t get_offset_of_resizeTextForBestFit_9() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___resizeTextForBestFit_9)); } inline bool get_resizeTextForBestFit_9() const { return ___resizeTextForBestFit_9; } inline bool* get_address_of_resizeTextForBestFit_9() { return &___resizeTextForBestFit_9; } inline void set_resizeTextForBestFit_9(bool value) { ___resizeTextForBestFit_9 = value; } inline static int32_t get_offset_of_resizeTextMinSize_10() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___resizeTextMinSize_10)); } inline int32_t get_resizeTextMinSize_10() const { return ___resizeTextMinSize_10; } inline int32_t* get_address_of_resizeTextMinSize_10() { return &___resizeTextMinSize_10; } inline void set_resizeTextMinSize_10(int32_t value) { ___resizeTextMinSize_10 = value; } inline static int32_t get_offset_of_resizeTextMaxSize_11() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___resizeTextMaxSize_11)); } inline int32_t get_resizeTextMaxSize_11() const { return ___resizeTextMaxSize_11; } inline int32_t* get_address_of_resizeTextMaxSize_11() { return &___resizeTextMaxSize_11; } inline void set_resizeTextMaxSize_11(int32_t value) { ___resizeTextMaxSize_11 = value; } inline static int32_t get_offset_of_updateBounds_12() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___updateBounds_12)); } inline bool get_updateBounds_12() const { return ___updateBounds_12; } inline bool* get_address_of_updateBounds_12() { return &___updateBounds_12; } inline void set_updateBounds_12(bool value) { ___updateBounds_12 = value; } inline static int32_t get_offset_of_verticalOverflow_13() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___verticalOverflow_13)); } inline int32_t get_verticalOverflow_13() const { return ___verticalOverflow_13; } inline int32_t* get_address_of_verticalOverflow_13() { return &___verticalOverflow_13; } inline void set_verticalOverflow_13(int32_t value) { ___verticalOverflow_13 = value; } inline static int32_t get_offset_of_horizontalOverflow_14() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___horizontalOverflow_14)); } inline int32_t get_horizontalOverflow_14() const { return ___horizontalOverflow_14; } inline int32_t* get_address_of_horizontalOverflow_14() { return &___horizontalOverflow_14; } inline void set_horizontalOverflow_14(int32_t value) { ___horizontalOverflow_14 = value; } inline static int32_t get_offset_of_generationExtents_15() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___generationExtents_15)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_generationExtents_15() const { return ___generationExtents_15; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_generationExtents_15() { return &___generationExtents_15; } inline void set_generationExtents_15(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___generationExtents_15 = value; } inline static int32_t get_offset_of_pivot_16() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___pivot_16)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_pivot_16() const { return ___pivot_16; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_pivot_16() { return &___pivot_16; } inline void set_pivot_16(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___pivot_16 = value; } inline static int32_t get_offset_of_generateOutOfBounds_17() { return static_cast<int32_t>(offsetof(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68, ___generateOutOfBounds_17)); } inline bool get_generateOutOfBounds_17() const { return ___generateOutOfBounds_17; } inline bool* get_address_of_generateOutOfBounds_17() { return &___generateOutOfBounds_17; } inline void set_generateOutOfBounds_17(bool value) { ___generateOutOfBounds_17 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of UnityEngine.TextGenerationSettings struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font_0; Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color_1; int32_t ___fontSize_2; float ___lineSpacing_3; int32_t ___richText_4; float ___scaleFactor_5; int32_t ___fontStyle_6; int32_t ___textAnchor_7; int32_t ___alignByGeometry_8; int32_t ___resizeTextForBestFit_9; int32_t ___resizeTextMinSize_10; int32_t ___resizeTextMaxSize_11; int32_t ___updateBounds_12; int32_t ___verticalOverflow_13; int32_t ___horizontalOverflow_14; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___generationExtents_15; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___pivot_16; int32_t ___generateOutOfBounds_17; }; // Native definition for COM marshalling of UnityEngine.TextGenerationSettings struct TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font_0; Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color_1; int32_t ___fontSize_2; float ___lineSpacing_3; int32_t ___richText_4; float ___scaleFactor_5; int32_t ___fontStyle_6; int32_t ___textAnchor_7; int32_t ___alignByGeometry_8; int32_t ___resizeTextForBestFit_9; int32_t ___resizeTextMinSize_10; int32_t ___resizeTextMaxSize_11; int32_t ___updateBounds_12; int32_t ___verticalOverflow_13; int32_t ___horizontalOverflow_14; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___generationExtents_15; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___pivot_16; int32_t ___generateOutOfBounds_17; }; #endif // TEXTGENERATIONSETTINGS_T37703542535A1638D2A08F41DB629A483616AF68_H #ifndef ACTION_1_T795662E553415ECF2DD0F8EEB9BA170C3670F37C_H #define ACTION_1_T795662E553415ECF2DD0F8EEB9BA170C3670F37C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Action`1<UnityEngine.Font> struct Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ACTION_1_T795662E553415ECF2DD0F8EEB9BA170C3670F37C_H #ifndef ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #define ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AsyncCallback struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #ifndef FONTTEXTUREREBUILDCALLBACK_TD700C63BB1A449E3A0464C81701E981677D3021C_H #define FONTTEXTUREREBUILDCALLBACK_TD700C63BB1A449E3A0464C81701E981677D3021C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Font_FontTextureRebuildCallback struct FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // FONTTEXTUREREBUILDCALLBACK_TD700C63BB1A449E3A0464C81701E981677D3021C_H #ifndef TEXTGENERATOR_TD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_H #define TEXTGENERATOR_TD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.TextGenerator struct TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 : public RuntimeObject { public: // System.IntPtr UnityEngine.TextGenerator::m_Ptr intptr_t ___m_Ptr_0; // System.String UnityEngine.TextGenerator::m_LastString String_t* ___m_LastString_1; // UnityEngine.TextGenerationSettings UnityEngine.TextGenerator::m_LastSettings TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___m_LastSettings_2; // System.Boolean UnityEngine.TextGenerator::m_HasGenerated bool ___m_HasGenerated_3; // UnityEngine.TextGenerationError UnityEngine.TextGenerator::m_LastValid int32_t ___m_LastValid_4; // System.Collections.Generic.List`1<UnityEngine.UIVertex> UnityEngine.TextGenerator::m_Verts List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___m_Verts_5; // System.Collections.Generic.List`1<UnityEngine.UICharInfo> UnityEngine.TextGenerator::m_Characters List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * ___m_Characters_6; // System.Collections.Generic.List`1<UnityEngine.UILineInfo> UnityEngine.TextGenerator::m_Lines List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * ___m_Lines_7; // System.Boolean UnityEngine.TextGenerator::m_CachedVerts bool ___m_CachedVerts_8; // System.Boolean UnityEngine.TextGenerator::m_CachedCharacters bool ___m_CachedCharacters_9; // System.Boolean UnityEngine.TextGenerator::m_CachedLines bool ___m_CachedLines_10; public: inline static int32_t get_offset_of_m_Ptr_0() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_Ptr_0)); } inline intptr_t get_m_Ptr_0() const { return ___m_Ptr_0; } inline intptr_t* get_address_of_m_Ptr_0() { return &___m_Ptr_0; } inline void set_m_Ptr_0(intptr_t value) { ___m_Ptr_0 = value; } inline static int32_t get_offset_of_m_LastString_1() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_LastString_1)); } inline String_t* get_m_LastString_1() const { return ___m_LastString_1; } inline String_t** get_address_of_m_LastString_1() { return &___m_LastString_1; } inline void set_m_LastString_1(String_t* value) { ___m_LastString_1 = value; Il2CppCodeGenWriteBarrier((&___m_LastString_1), value); } inline static int32_t get_offset_of_m_LastSettings_2() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_LastSettings_2)); } inline TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 get_m_LastSettings_2() const { return ___m_LastSettings_2; } inline TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * get_address_of_m_LastSettings_2() { return &___m_LastSettings_2; } inline void set_m_LastSettings_2(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 value) { ___m_LastSettings_2 = value; } inline static int32_t get_offset_of_m_HasGenerated_3() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_HasGenerated_3)); } inline bool get_m_HasGenerated_3() const { return ___m_HasGenerated_3; } inline bool* get_address_of_m_HasGenerated_3() { return &___m_HasGenerated_3; } inline void set_m_HasGenerated_3(bool value) { ___m_HasGenerated_3 = value; } inline static int32_t get_offset_of_m_LastValid_4() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_LastValid_4)); } inline int32_t get_m_LastValid_4() const { return ___m_LastValid_4; } inline int32_t* get_address_of_m_LastValid_4() { return &___m_LastValid_4; } inline void set_m_LastValid_4(int32_t value) { ___m_LastValid_4 = value; } inline static int32_t get_offset_of_m_Verts_5() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_Verts_5)); } inline List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * get_m_Verts_5() const { return ___m_Verts_5; } inline List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 ** get_address_of_m_Verts_5() { return &___m_Verts_5; } inline void set_m_Verts_5(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * value) { ___m_Verts_5 = value; Il2CppCodeGenWriteBarrier((&___m_Verts_5), value); } inline static int32_t get_offset_of_m_Characters_6() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_Characters_6)); } inline List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * get_m_Characters_6() const { return ___m_Characters_6; } inline List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E ** get_address_of_m_Characters_6() { return &___m_Characters_6; } inline void set_m_Characters_6(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * value) { ___m_Characters_6 = value; Il2CppCodeGenWriteBarrier((&___m_Characters_6), value); } inline static int32_t get_offset_of_m_Lines_7() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_Lines_7)); } inline List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * get_m_Lines_7() const { return ___m_Lines_7; } inline List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 ** get_address_of_m_Lines_7() { return &___m_Lines_7; } inline void set_m_Lines_7(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * value) { ___m_Lines_7 = value; Il2CppCodeGenWriteBarrier((&___m_Lines_7), value); } inline static int32_t get_offset_of_m_CachedVerts_8() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_CachedVerts_8)); } inline bool get_m_CachedVerts_8() const { return ___m_CachedVerts_8; } inline bool* get_address_of_m_CachedVerts_8() { return &___m_CachedVerts_8; } inline void set_m_CachedVerts_8(bool value) { ___m_CachedVerts_8 = value; } inline static int32_t get_offset_of_m_CachedCharacters_9() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_CachedCharacters_9)); } inline bool get_m_CachedCharacters_9() const { return ___m_CachedCharacters_9; } inline bool* get_address_of_m_CachedCharacters_9() { return &___m_CachedCharacters_9; } inline void set_m_CachedCharacters_9(bool value) { ___m_CachedCharacters_9 = value; } inline static int32_t get_offset_of_m_CachedLines_10() { return static_cast<int32_t>(offsetof(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8, ___m_CachedLines_10)); } inline bool get_m_CachedLines_10() const { return ___m_CachedLines_10; } inline bool* get_address_of_m_CachedLines_10() { return &___m_CachedLines_10; } inline void set_m_CachedLines_10(bool value) { ___m_CachedLines_10 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of UnityEngine.TextGenerator struct TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_pinvoke { intptr_t ___m_Ptr_0; char* ___m_LastString_1; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke ___m_LastSettings_2; int32_t ___m_HasGenerated_3; int32_t ___m_LastValid_4; List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___m_Verts_5; List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * ___m_Characters_6; List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * ___m_Lines_7; int32_t ___m_CachedVerts_8; int32_t ___m_CachedCharacters_9; int32_t ___m_CachedLines_10; }; // Native definition for COM marshalling of UnityEngine.TextGenerator struct TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_com { intptr_t ___m_Ptr_0; Il2CppChar* ___m_LastString_1; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com ___m_LastSettings_2; int32_t ___m_HasGenerated_3; int32_t ___m_LastValid_4; List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___m_Verts_5; List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * ___m_Characters_6; List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * ___m_Lines_7; int32_t ___m_CachedVerts_8; int32_t ___m_CachedCharacters_9; int32_t ___m_CachedLines_10; }; #endif // TEXTGENERATOR_TD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_H #ifndef TEXTMESH_T327D0DAFEF431170D8C2882083D442AF4D4A0E4A_H #define TEXTMESH_T327D0DAFEF431170D8C2882083D442AF4D4A0E4A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.TextMesh struct TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A : public Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TEXTMESH_T327D0DAFEF431170D8C2882083D442AF4D4A0E4A_H // System.Delegate[] struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86 : public RuntimeArray { public: ALIGN_FIELD (8) Delegate_t * m_Items[1]; public: inline Delegate_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Delegate_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Delegate_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Delegate_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Delegate_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Delegate_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Object[] struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A : public RuntimeArray { public: ALIGN_FIELD (8) RuntimeObject * m_Items[1]; public: inline RuntimeObject * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline RuntimeObject ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, RuntimeObject * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline RuntimeObject * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline RuntimeObject ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, RuntimeObject * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled); extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke_back(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled); extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke_cleanup(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled); extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled); extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com_back(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled); extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com_cleanup(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled); // System.Void System.Action`1<System.Object>::Invoke(!0) extern "C" IL2CPP_METHOD_ATTR void Action_1_Invoke_mB86FC1B303E77C41ED0E94FC3592A9CF8DA571D5_gshared (Action_1_t551A279CEADCF6EEAE8FA2B1E1E757D0D15290D0 * __this, RuntimeObject * p0, const RuntimeMethod* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8_gshared (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * __this, int32_t p0, const RuntimeMethod* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UICharInfo>::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71_gshared (List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * __this, int32_t p0, const RuntimeMethod* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UILineInfo>::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD_gshared (List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * __this, int32_t p0, const RuntimeMethod* method); // System.Delegate System.Delegate::Combine(System.Delegate,System.Delegate) extern "C" IL2CPP_METHOD_ATTR Delegate_t * Delegate_Combine_mC25D2F7DECAFBA6D9A2F9EBA8A77063F0658ECF1 (Delegate_t * p0, Delegate_t * p1, const RuntimeMethod* method); // System.Delegate System.Delegate::Remove(System.Delegate,System.Delegate) extern "C" IL2CPP_METHOD_ATTR Delegate_t * Delegate_Remove_m0B0DB7D1B3AF96B71AFAA72BA0EFE32FBBC2932D (Delegate_t * p0, Delegate_t * p1, const RuntimeMethod* method); // System.Void System.Action`1<UnityEngine.Font>::Invoke(!0) inline void Action_1_Invoke_mC307FDDD4FEA6818EE9A27D962C2C512B835DAEB (Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * __this, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * p0, const RuntimeMethod* method) { (( void (*) (Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *, const RuntimeMethod*))Action_1_Invoke_mB86FC1B303E77C41ED0E94FC3592A9CF8DA571D5_gshared)(__this, p0, method); } // System.Void UnityEngine.Font/FontTextureRebuildCallback::Invoke() extern "C" IL2CPP_METHOD_ATTR void FontTextureRebuildCallback_Invoke_m4E6CFDE11932BA7F129C9A2C4CAE294562B07480 (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Font::HasCharacter(System.Int32) extern "C" IL2CPP_METHOD_ATTR bool Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51 (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, int32_t ___c0, const RuntimeMethod* method); // System.Boolean UnityEngine.Mathf::Approximately(System.Single,System.Single) extern "C" IL2CPP_METHOD_ATTR bool Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E (float p0, float p1, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerationSettings::CompareColors(UnityEngine.Color,UnityEngine.Color) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66 (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___left0, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___right1, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerationSettings::CompareVector2(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___left0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___right1, const RuntimeMethod* method); // System.Boolean UnityEngine.Object::op_Equality(UnityEngine.Object,UnityEngine.Object) extern "C" IL2CPP_METHOD_ATTR bool Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p1, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerationSettings::Equals(UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___other0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void TextGenerator__ctor_m86E01E7BB9DC1B28F04961E482ED4D7065062BCE (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, int32_t ___initialCapacity0, const RuntimeMethod* method); // System.Void System.Object::.ctor() extern "C" IL2CPP_METHOD_ATTR void Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0 (RuntimeObject * __this, const RuntimeMethod* method); // System.IntPtr UnityEngine.TextGenerator::Internal_Create() extern "C" IL2CPP_METHOD_ATTR intptr_t TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994 (const RuntimeMethod* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::.ctor(System.Int32) inline void List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8 (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * __this, int32_t p0, const RuntimeMethod* method) { (( void (*) (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 *, int32_t, const RuntimeMethod*))List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8_gshared)(__this, p0, method); } // System.Void System.Collections.Generic.List`1<UnityEngine.UICharInfo>::.ctor(System.Int32) inline void List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71 (List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * __this, int32_t p0, const RuntimeMethod* method) { (( void (*) (List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E *, int32_t, const RuntimeMethod*))List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71_gshared)(__this, p0, method); } // System.Void System.Collections.Generic.List`1<UnityEngine.UILineInfo>::.ctor(System.Int32) inline void List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD (List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * __this, int32_t p0, const RuntimeMethod* method) { (( void (*) (List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 *, int32_t, const RuntimeMethod*))List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD_gshared)(__this, p0, method); } // System.Void System.Object::Finalize() extern "C" IL2CPP_METHOD_ATTR void Object_Finalize_m4015B7D3A44DE125C5FE34D7276CD4697C06F380 (RuntimeObject * __this, const RuntimeMethod* method); // System.Boolean System.IntPtr::op_Inequality(System.IntPtr,System.IntPtr) extern "C" IL2CPP_METHOD_ATTR bool IntPtr_op_Inequality_mB4886A806009EA825EFCC60CD2A7F6EB8E273A61 (intptr_t p0, intptr_t p1, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::Internal_Destroy(System.IntPtr) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5 (intptr_t ___ptr0, const RuntimeMethod* method); // System.Int32 UnityEngine.TextGenerator::get_characterCount() extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Object::op_Inequality(UnityEngine.Object,UnityEngine.Object) extern "C" IL2CPP_METHOD_ATTR bool Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1 (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p1, const RuntimeMethod* method); // System.Boolean UnityEngine.Font::get_dynamic() extern "C" IL2CPP_METHOD_ATTR bool Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, const RuntimeMethod* method); // System.String UnityEngine.Object::get_name() extern "C" IL2CPP_METHOD_ATTR String_t* Object_get_name_mA2D400141CB3C991C87A2556429781DE961A83CE (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * __this, const RuntimeMethod* method); // System.Void UnityEngine.Debug::LogWarningFormat(UnityEngine.Object,System.String,System.Object[]) extern "C" IL2CPP_METHOD_ATTR void Debug_LogWarningFormat_m4A02CCF91F3A9392F4AA93576DCE2222267E5945 (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, String_t* p1, ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* p2, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetCharactersInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___characters0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetLinesInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___lines0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetVerticesInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___vertices0, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerator::Populate(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_m15553808C8FA017AA1AC23D2818C30DAFD654A04 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method); // UnityEngine.Rect UnityEngine.TextGenerator::get_rectExtents() extern "C" IL2CPP_METHOD_ATTR Rect_t35B976DE901B5423C11705E156938EA27AB402CE TextGenerator_get_rectExtents_m55F6A6727406C54BEFB7628751555B7C58BEC9B1 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method); // System.Single UnityEngine.Rect::get_width() extern "C" IL2CPP_METHOD_ATTR float Rect_get_width_m54FF69FC2C086E2DC349ED091FD0D6576BFB1484 (Rect_t35B976DE901B5423C11705E156938EA27AB402CE * __this, const RuntimeMethod* method); // System.Single UnityEngine.Rect::get_height() extern "C" IL2CPP_METHOD_ATTR float Rect_get_height_m088C36990E0A255C5D7DCE36575DCE23ABB364B5 (Rect_t35B976DE901B5423C11705E156938EA27AB402CE * __this, const RuntimeMethod* method); // UnityEngine.TextGenerationError UnityEngine.TextGenerator::PopulateWithError(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_PopulateWithError_m24D1DA75F0563582E228C6F4982D0913C58E1D7D (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method); // System.Void UnityEngine.Debug::LogErrorFormat(UnityEngine.Object,System.String,System.Object[]) extern "C" IL2CPP_METHOD_ATTR void Debug_LogErrorFormat_m994E4759C25BF0E9DD4179C10E3979558137CCF0 (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, String_t* p1, ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* p2, const RuntimeMethod* method); // System.Boolean System.String::op_Equality(System.String,System.String) extern "C" IL2CPP_METHOD_ATTR bool String_op_Equality_m139F0E4195AE2F856019E63B241F36F016997FCE (String_t* p0, String_t* p1, const RuntimeMethod* method); // UnityEngine.TextGenerationError UnityEngine.TextGenerator::PopulateAlways(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_PopulateAlways_m8DCF389A51877975F29FAB9B6E800DFDC1E0B8DF (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method); // UnityEngine.TextGenerationSettings UnityEngine.TextGenerator::ValidatedSettings(UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 TextGenerator_ValidatedSettings_m167131680BB6CD53B929EF189520F9FCF71FB1D3 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings0, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerator::Populate_Internal(System.String,UnityEngine.Font,UnityEngine.Color,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,UnityEngine.VerticalWrapMode,UnityEngine.HorizontalWrapMode,System.Boolean,UnityEngine.TextAnchor,UnityEngine.Vector2,UnityEngine.Vector2,System.Boolean,System.Boolean,UnityEngine.TextGenerationError&) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_m42F7FED165D62BFD9C006D19A0FCE5B70C1EF92B (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___extents15, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___pivot16, bool ___generateOutOfBounds17, bool ___alignByGeometry18, int32_t* ___error19, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetVertices(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetVertices_m6FA34586541514ED7396990542BDAC536C10A4F2 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___vertices0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetCharacters(System.Collections.Generic.List`1<UnityEngine.UICharInfo>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetCharacters_mBB7980F2FE8BE65A906A39B5559EC54B1CEF4131 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * ___characters0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::GetLines(System.Collections.Generic.List`1<UnityEngine.UILineInfo>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetLines_mC31F7918A9159908EA914D01B2E32644B046E2B5 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * ___lines0, const RuntimeMethod* method); // System.Void UnityEngine.TextGenerator::get_rectExtents_Injected(UnityEngine.Rect&) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___ret0, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerator::Populate_Internal_Injected(System.String,UnityEngine.Font,UnityEngine.Color&,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,UnityEngine.TextAnchor,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.UInt32&) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, float ___extentsX15, float ___extentsY16, float ___pivotX17, float ___pivotY18, bool ___generateOutOfBounds19, bool ___alignByGeometry20, uint32_t* ___error21, const RuntimeMethod* method); // System.Boolean UnityEngine.TextGenerator::Populate_Internal(System.String,UnityEngine.Font,UnityEngine.Color,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,UnityEngine.TextAnchor,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.UInt32&) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_mCA54081A0855AED6EC6345265603409FE330985C (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, float ___extentsX15, float ___extentsY16, float ___pivotX17, float ___pivotY18, bool ___generateOutOfBounds19, bool ___alignByGeometry20, uint32_t* ___error21, const RuntimeMethod* method); // System.Void UnityEngine.TextMesh::set_color_Injected(UnityEngine.Color&) extern "C" IL2CPP_METHOD_ATTR void TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Color32::.ctor(System.Byte,System.Byte,System.Byte,System.Byte) extern "C" IL2CPP_METHOD_ATTR void Color32__ctor_m1AEF46FBBBE4B522E6984D081A3D158198E10AA2 (Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 * __this, uint8_t p0, uint8_t p1, uint8_t p2, uint8_t p3, const RuntimeMethod* method); // System.Void UnityEngine.Vector4::.ctor(System.Single,System.Single,System.Single,System.Single) extern "C" IL2CPP_METHOD_ATTR void Vector4__ctor_m545458525879607A5392A10B175D0C19B2BC715D (Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E * __this, float p0, float p1, float p2, float p3, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Vector3::get_zero() extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Vector3_get_zero_m3CDDCAE94581DF3BB16C4B40A100E28E9C6649C2 (const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Vector3::get_back() extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Vector3_get_back_mE7EF8625637E6F8B9E6B42A6AE140777C51E02F7 (const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.Vector2::get_zero() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8 (const RuntimeMethod* method); #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Font::add_textureRebuilt(System.Action`1<UnityEngine.Font>) extern "C" IL2CPP_METHOD_ATTR void Font_add_textureRebuilt_m031EFCD3B164273920B133A8689C18ED87C9B18F (Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Font_add_textureRebuilt_m031EFCD3B164273920B133A8689C18ED87C9B18F_MetadataUsageId); s_Il2CppMethodInitialized = true; } Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * V_0 = NULL; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * V_1 = NULL; { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_0 = ((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_textureRebuilt_4(); V_0 = L_0; } IL_0006: { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_1 = V_0; V_1 = L_1; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_2 = V_1; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_3 = ___value0; Delegate_t * L_4 = Delegate_Combine_mC25D2F7DECAFBA6D9A2F9EBA8A77063F0658ECF1(L_2, L_3, /*hidden argument*/NULL); Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_5 = V_0; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_6 = InterlockedCompareExchangeImpl<Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *>((Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C **)(((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_address_of_textureRebuilt_4()), ((Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)CastclassSealed((RuntimeObject*)L_4, Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C_il2cpp_TypeInfo_var)), L_5); V_0 = L_6; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_7 = V_0; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_8 = V_1; if ((!(((RuntimeObject*)(Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)L_7) == ((RuntimeObject*)(Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)L_8)))) { goto IL_0006; } } { return; } } // System.Void UnityEngine.Font::remove_textureRebuilt(System.Action`1<UnityEngine.Font>) extern "C" IL2CPP_METHOD_ATTR void Font_remove_textureRebuilt_mBEF163DAE27CA126D400646E850AAEE4AE8DAAB4 (Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Font_remove_textureRebuilt_mBEF163DAE27CA126D400646E850AAEE4AE8DAAB4_MetadataUsageId); s_Il2CppMethodInitialized = true; } Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * V_0 = NULL; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * V_1 = NULL; { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_0 = ((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_textureRebuilt_4(); V_0 = L_0; } IL_0006: { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_1 = V_0; V_1 = L_1; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_2 = V_1; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_3 = ___value0; Delegate_t * L_4 = Delegate_Remove_m0B0DB7D1B3AF96B71AFAA72BA0EFE32FBBC2932D(L_2, L_3, /*hidden argument*/NULL); Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_5 = V_0; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_6 = InterlockedCompareExchangeImpl<Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *>((Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C **)(((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_address_of_textureRebuilt_4()), ((Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)CastclassSealed((RuntimeObject*)L_4, Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C_il2cpp_TypeInfo_var)), L_5); V_0 = L_6; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_7 = V_0; Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_8 = V_1; if ((!(((RuntimeObject*)(Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)L_7) == ((RuntimeObject*)(Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C *)L_8)))) { goto IL_0006; } } { return; } } // UnityEngine.Material UnityEngine.Font::get_material() extern "C" IL2CPP_METHOD_ATTR Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * Font_get_material_m92A995029540A5FACAEA3A2FE792FFDAC294827D (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, const RuntimeMethod* method) { typedef Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * (*Font_get_material_m92A995029540A5FACAEA3A2FE792FFDAC294827D_ftn) (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *); static Font_get_material_m92A995029540A5FACAEA3A2FE792FFDAC294827D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Font_get_material_m92A995029540A5FACAEA3A2FE792FFDAC294827D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Font::get_material()"); Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.Font::get_dynamic() extern "C" IL2CPP_METHOD_ATTR bool Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, const RuntimeMethod* method) { typedef bool (*Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E_ftn) (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *); static Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Font::get_dynamic()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Int32 UnityEngine.Font::get_fontSize() extern "C" IL2CPP_METHOD_ATTR int32_t Font_get_fontSize_m75A71EFC3D6483AD1A8C6F38133648BDFF1618A5 (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, const RuntimeMethod* method) { typedef int32_t (*Font_get_fontSize_m75A71EFC3D6483AD1A8C6F38133648BDFF1618A5_ftn) (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *); static Font_get_fontSize_m75A71EFC3D6483AD1A8C6F38133648BDFF1618A5_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Font_get_fontSize_m75A71EFC3D6483AD1A8C6F38133648BDFF1618A5_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Font::get_fontSize()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Font::InvokeTextureRebuilt_Internal(UnityEngine.Font) extern "C" IL2CPP_METHOD_ATTR void Font_InvokeTextureRebuilt_Internal_m2D4C9D99B6137EF380A19EC72D6EE8CBFF7B4062 (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Font_InvokeTextureRebuilt_Internal_m2D4C9D99B6137EF380A19EC72D6EE8CBFF7B4062_MetadataUsageId); s_Il2CppMethodInitialized = true; } FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * G_B5_0 = NULL; FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * G_B4_0 = NULL; { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_0 = ((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_textureRebuilt_4(); if (L_0) { goto IL_000d; } } { goto IL_0018; } IL_000d: { Action_1_t795662E553415ECF2DD0F8EEB9BA170C3670F37C * L_1 = ((Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_StaticFields*)il2cpp_codegen_static_fields_for(Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26_il2cpp_TypeInfo_var))->get_textureRebuilt_4(); Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_2 = ___font0; NullCheck(L_1); Action_1_Invoke_mC307FDDD4FEA6818EE9A27D962C2C512B835DAEB(L_1, L_2, /*hidden argument*/Action_1_Invoke_mC307FDDD4FEA6818EE9A27D962C2C512B835DAEB_RuntimeMethod_var); } IL_0018: { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_3 = ___font0; NullCheck(L_3); FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * L_4 = L_3->get_m_FontTextureRebuildCallback_5(); FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * L_5 = L_4; G_B4_0 = L_5; if (L_5) { G_B5_0 = L_5; goto IL_0027; } } { goto IL_002c; } IL_0027: { NullCheck(G_B5_0); FontTextureRebuildCallback_Invoke_m4E6CFDE11932BA7F129C9A2C4CAE294562B07480(G_B5_0, /*hidden argument*/NULL); } IL_002c: { return; } } // System.Boolean UnityEngine.Font::HasCharacter(System.Char) extern "C" IL2CPP_METHOD_ATTR bool Font_HasCharacter_m23CC7E1E37BCA115DC130B841CF3207212E2802E (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, Il2CppChar ___c0, const RuntimeMethod* method) { bool V_0 = false; { Il2CppChar L_0 = ___c0; bool L_1 = Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51(__this, L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_000e; } IL_000e: { bool L_2 = V_0; return L_2; } } // System.Boolean UnityEngine.Font::HasCharacter(System.Int32) extern "C" IL2CPP_METHOD_ATTR bool Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51 (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * __this, int32_t ___c0, const RuntimeMethod* method) { typedef bool (*Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51_ftn) (Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *, int32_t); static Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Font_HasCharacter_m59FF574F1E4A2F9807CCF0C5D56C29E68D514D51_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Font::HasCharacter(System.Int32)"); bool retVal = _il2cpp_icall_func(__this, ___c0); return retVal; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif extern "C" void DelegatePInvokeWrapper_FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, const RuntimeMethod* method) { typedef void (DEFAULT_CALL *PInvokeFunc)(); PInvokeFunc il2cppPInvokeFunc = reinterpret_cast<PInvokeFunc>(il2cpp_codegen_get_method_pointer(((RuntimeDelegate*)__this)->method)); // Native function invocation il2cppPInvokeFunc(); } // System.Void UnityEngine.Font_FontTextureRebuildCallback::.ctor(System.Object,System.IntPtr) extern "C" IL2CPP_METHOD_ATTR void FontTextureRebuildCallback__ctor_m83BD4ACFF1FDA3D203ABA140B0CA2B4B0064A3A3 (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method) { __this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1)); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Void UnityEngine.Font_FontTextureRebuildCallback::Invoke() extern "C" IL2CPP_METHOD_ATTR void FontTextureRebuildCallback_Invoke_m4E6CFDE11932BA7F129C9A2C4CAE294562B07480 (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, const RuntimeMethod* method) { DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* delegatesToInvoke = __this->get_delegates_11(); if (delegatesToInvoke != NULL) { il2cpp_array_size_t length = delegatesToInvoke->max_length; for (il2cpp_array_size_t i = 0; i < length; i++) { Delegate_t* currentDelegate = (delegatesToInvoke)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(i)); Il2CppMethodPointer targetMethodPointer = currentDelegate->get_method_ptr_0(); RuntimeMethod* targetMethod = (RuntimeMethod*)(currentDelegate->get_method_3()); RuntimeObject* targetThis = currentDelegate->get_m_target_2(); if (!il2cpp_codegen_method_is_virtual(targetMethod)) { il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod); } bool ___methodIsStatic = MethodIsStatic(targetMethod); int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod); if (___methodIsStatic) { if (___parameterCount == 0) { // open typedef void (*FunctionPointerType) (const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetMethod); } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } else { // closed if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_generic_instance(targetMethod)) { if (il2cpp_codegen_method_is_interface_method(targetMethod)) GenericInterfaceActionInvoker0::Invoke(targetMethod, targetThis); else GenericVirtActionInvoker0::Invoke(targetMethod, targetThis); } else { if (il2cpp_codegen_method_is_interface_method(targetMethod)) InterfaceActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis); else VirtActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis); } } } else { typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } } } else { Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0(); RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3()); RuntimeObject* targetThis = __this->get_m_target_2(); if (!il2cpp_codegen_method_is_virtual(targetMethod)) { il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod); } bool ___methodIsStatic = MethodIsStatic(targetMethod); int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod); if (___methodIsStatic) { if (___parameterCount == 0) { // open typedef void (*FunctionPointerType) (const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetMethod); } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } else { // closed if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_generic_instance(targetMethod)) { if (il2cpp_codegen_method_is_interface_method(targetMethod)) GenericInterfaceActionInvoker0::Invoke(targetMethod, targetThis); else GenericVirtActionInvoker0::Invoke(targetMethod, targetThis); } else { if (il2cpp_codegen_method_is_interface_method(targetMethod)) InterfaceActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis); else VirtActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis); } } } else { typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } } } // System.IAsyncResult UnityEngine.Font_FontTextureRebuildCallback::BeginInvoke(System.AsyncCallback,System.Object) extern "C" IL2CPP_METHOD_ATTR RuntimeObject* FontTextureRebuildCallback_BeginInvoke_m53EF837EFEA71B83AEA6706E2EB8F83062E43880 (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 * ___callback0, RuntimeObject * ___object1, const RuntimeMethod* method) { void *__d_args[1] = {0}; return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback0, (RuntimeObject*)___object1); } // System.Void UnityEngine.Font_FontTextureRebuildCallback::EndInvoke(System.IAsyncResult) extern "C" IL2CPP_METHOD_ATTR void FontTextureRebuildCallback_EndInvoke_m8EEDB9652F6D2358523057E1164740820D2AE93C (FontTextureRebuildCallback_tD700C63BB1A449E3A0464C81701E981677D3021C * __this, RuntimeObject* ___result0, const RuntimeMethod* method) { il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.TextGenerationSettings extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled) { Exception_t* ___font_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'font' of type 'TextGenerationSettings': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___font_0Exception, NULL, NULL); } extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke_back(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled) { Exception_t* ___font_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'font' of type 'TextGenerationSettings': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___font_0Exception, NULL, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.TextGenerationSettings extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_pinvoke_cleanup(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.TextGenerationSettings extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled) { Exception_t* ___font_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'font' of type 'TextGenerationSettings': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___font_0Exception, NULL, NULL); } extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com_back(const TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68& unmarshaled) { Exception_t* ___font_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'font' of type 'TextGenerationSettings': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___font_0Exception, NULL, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.TextGenerationSettings extern "C" void TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshal_com_cleanup(TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68_marshaled_com& marshaled) { } // System.Boolean UnityEngine.TextGenerationSettings::CompareColors(UnityEngine.Color,UnityEngine.Color) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66 (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___left0, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___right1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B5_0 = 0; { float L_0 = (&___left0)->get_r_0(); float L_1 = (&___right1)->get_r_0(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_2 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_005e; } } { float L_3 = (&___left0)->get_g_1(); float L_4 = (&___right1)->get_g_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_5 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_005e; } } { float L_6 = (&___left0)->get_b_2(); float L_7 = (&___right1)->get_b_2(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_8 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_6, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_005e; } } { float L_9 = (&___left0)->get_a_3(); float L_10 = (&___right1)->get_a_3(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_11 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_9, L_10, /*hidden argument*/NULL); G_B5_0 = ((int32_t)(L_11)); goto IL_005f; } IL_005e: { G_B5_0 = 0; } IL_005f: { V_0 = (bool)G_B5_0; goto IL_0065; } IL_0065: { bool L_12 = V_0; return L_12; } } extern "C" bool TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66_AdjustorThunk (RuntimeObject * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___left0, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___right1, const RuntimeMethod* method) { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * _thisAdjusted = reinterpret_cast<TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *>(__this + 1); return TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66(_thisAdjusted, ___left0, ___right1, method); } // System.Boolean UnityEngine.TextGenerationSettings::CompareVector2(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___left0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___right1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B3_0 = 0; { float L_0 = (&___left0)->get_x_0(); float L_1 = (&___right1)->get_x_0(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_2 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_002e; } } { float L_3 = (&___left0)->get_y_1(); float L_4 = (&___right1)->get_y_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_5 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_3, L_4, /*hidden argument*/NULL); G_B3_0 = ((int32_t)(L_5)); goto IL_002f; } IL_002e: { G_B3_0 = 0; } IL_002f: { V_0 = (bool)G_B3_0; goto IL_0035; } IL_0035: { bool L_6 = V_0; return L_6; } } extern "C" bool TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C_AdjustorThunk (RuntimeObject * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___left0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___right1, const RuntimeMethod* method) { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * _thisAdjusted = reinterpret_cast<TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *>(__this + 1); return TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C(_thisAdjusted, ___left0, ___right1, method); } // System.Boolean UnityEngine.TextGenerationSettings::Equals(UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR bool TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D (TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * __this, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B21_0 = 0; { Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 L_0 = __this->get_color_1(); Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 L_1 = (&___other0)->get_color_1(); bool L_2 = TextGenerationSettings_CompareColors_m41313F2A332F5780C5BD6F8134EBB14473CC5C66((TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *)__this, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0187; } } { int32_t L_3 = __this->get_fontSize_2(); int32_t L_4 = (&___other0)->get_fontSize_2(); if ((!(((uint32_t)L_3) == ((uint32_t)L_4)))) { goto IL_0187; } } { float L_5 = __this->get_scaleFactor_5(); float L_6 = (&___other0)->get_scaleFactor_5(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_7 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_5, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_0187; } } { int32_t L_8 = __this->get_resizeTextMinSize_10(); int32_t L_9 = (&___other0)->get_resizeTextMinSize_10(); if ((!(((uint32_t)L_8) == ((uint32_t)L_9)))) { goto IL_0187; } } { int32_t L_10 = __this->get_resizeTextMaxSize_11(); int32_t L_11 = (&___other0)->get_resizeTextMaxSize_11(); if ((!(((uint32_t)L_10) == ((uint32_t)L_11)))) { goto IL_0187; } } { float L_12 = __this->get_lineSpacing_3(); float L_13 = (&___other0)->get_lineSpacing_3(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_tFBDE6467D269BFE410605C7D806FD9991D4A89CB_il2cpp_TypeInfo_var); bool L_14 = Mathf_Approximately_m91AF00403E0D2DEA1AAE68601AD218CFAD70DF7E(L_12, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0187; } } { int32_t L_15 = __this->get_fontStyle_6(); int32_t L_16 = (&___other0)->get_fontStyle_6(); if ((!(((uint32_t)L_15) == ((uint32_t)L_16)))) { goto IL_0187; } } { bool L_17 = __this->get_richText_4(); bool L_18 = (&___other0)->get_richText_4(); if ((!(((uint32_t)L_17) == ((uint32_t)L_18)))) { goto IL_0187; } } { int32_t L_19 = __this->get_textAnchor_7(); int32_t L_20 = (&___other0)->get_textAnchor_7(); if ((!(((uint32_t)L_19) == ((uint32_t)L_20)))) { goto IL_0187; } } { bool L_21 = __this->get_alignByGeometry_8(); bool L_22 = (&___other0)->get_alignByGeometry_8(); if ((!(((uint32_t)L_21) == ((uint32_t)L_22)))) { goto IL_0187; } } { bool L_23 = __this->get_resizeTextForBestFit_9(); bool L_24 = (&___other0)->get_resizeTextForBestFit_9(); if ((!(((uint32_t)L_23) == ((uint32_t)L_24)))) { goto IL_0187; } } { int32_t L_25 = __this->get_resizeTextMinSize_10(); int32_t L_26 = (&___other0)->get_resizeTextMinSize_10(); if ((!(((uint32_t)L_25) == ((uint32_t)L_26)))) { goto IL_0187; } } { int32_t L_27 = __this->get_resizeTextMaxSize_11(); int32_t L_28 = (&___other0)->get_resizeTextMaxSize_11(); if ((!(((uint32_t)L_27) == ((uint32_t)L_28)))) { goto IL_0187; } } { bool L_29 = __this->get_resizeTextForBestFit_9(); bool L_30 = (&___other0)->get_resizeTextForBestFit_9(); if ((!(((uint32_t)L_29) == ((uint32_t)L_30)))) { goto IL_0187; } } { bool L_31 = __this->get_updateBounds_12(); bool L_32 = (&___other0)->get_updateBounds_12(); if ((!(((uint32_t)L_31) == ((uint32_t)L_32)))) { goto IL_0187; } } { int32_t L_33 = __this->get_horizontalOverflow_14(); int32_t L_34 = (&___other0)->get_horizontalOverflow_14(); if ((!(((uint32_t)L_33) == ((uint32_t)L_34)))) { goto IL_0187; } } { int32_t L_35 = __this->get_verticalOverflow_13(); int32_t L_36 = (&___other0)->get_verticalOverflow_13(); if ((!(((uint32_t)L_35) == ((uint32_t)L_36)))) { goto IL_0187; } } { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_37 = __this->get_generationExtents_15(); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_38 = (&___other0)->get_generationExtents_15(); bool L_39 = TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C((TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *)__this, L_37, L_38, /*hidden argument*/NULL); if (!L_39) { goto IL_0187; } } { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_40 = __this->get_pivot_16(); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_41 = (&___other0)->get_pivot_16(); bool L_42 = TextGenerationSettings_CompareVector2_m27AE82F513B8E6D4A529A02B1A3806A85E710F1C((TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *)__this, L_40, L_41, /*hidden argument*/NULL); if (!L_42) { goto IL_0187; } } { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_43 = __this->get_font_0(); Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_44 = (&___other0)->get_font_0(); IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_45 = Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C(L_43, L_44, /*hidden argument*/NULL); G_B21_0 = ((int32_t)(L_45)); goto IL_0188; } IL_0187: { G_B21_0 = 0; } IL_0188: { V_0 = (bool)G_B21_0; goto IL_018e; } IL_018e: { bool L_46 = V_0; return L_46; } } extern "C" bool TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D_AdjustorThunk (RuntimeObject * __this, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___other0, const RuntimeMethod* method) { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 * _thisAdjusted = reinterpret_cast<TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *>(__this + 1); return TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D(_thisAdjusted, ___other0, method); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.TextGenerator extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_pinvoke(const TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8& unmarshaled, TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_pinvoke& marshaled) { Exception_t* ___m_LastSettings_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_LastSettings' of type 'TextGenerator'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_LastSettings_2Exception, NULL, NULL); } extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_pinvoke_back(const TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_pinvoke& marshaled, TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8& unmarshaled) { Exception_t* ___m_LastSettings_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_LastSettings' of type 'TextGenerator'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_LastSettings_2Exception, NULL, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.TextGenerator extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_pinvoke_cleanup(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.TextGenerator extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_com(const TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8& unmarshaled, TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_com& marshaled) { Exception_t* ___m_LastSettings_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_LastSettings' of type 'TextGenerator'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_LastSettings_2Exception, NULL, NULL); } extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_com_back(const TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_com& marshaled, TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8& unmarshaled) { Exception_t* ___m_LastSettings_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_LastSettings' of type 'TextGenerator'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_LastSettings_2Exception, NULL, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.TextGenerator extern "C" void TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshal_com_cleanup(TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8_marshaled_com& marshaled) { } // System.Void UnityEngine.TextGenerator::.ctor() extern "C" IL2CPP_METHOD_ATTR void TextGenerator__ctor_mD3956FF7D10DC470522A6363E7D6EC243415098A (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { { TextGenerator__ctor_m86E01E7BB9DC1B28F04961E482ED4D7065062BCE(__this, ((int32_t)50), /*hidden argument*/NULL); return; } } // System.Void UnityEngine.TextGenerator::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void TextGenerator__ctor_m86E01E7BB9DC1B28F04961E482ED4D7065062BCE (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, int32_t ___initialCapacity0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator__ctor_m86E01E7BB9DC1B28F04961E482ED4D7065062BCE_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL); intptr_t L_0 = TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994(/*hidden argument*/NULL); __this->set_m_Ptr_0((intptr_t)L_0); int32_t L_1 = ___initialCapacity0; List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_2 = (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 *)il2cpp_codegen_object_new(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_il2cpp_TypeInfo_var); List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8(L_2, ((int32_t)il2cpp_codegen_multiply((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)1)), (int32_t)4)), /*hidden argument*/List_1__ctor_m4B9E13C91ADA643CE531D7FE21CBC0BD4B8CFAC8_RuntimeMethod_var); __this->set_m_Verts_5(L_2); int32_t L_3 = ___initialCapacity0; List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * L_4 = (List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E *)il2cpp_codegen_object_new(List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E_il2cpp_TypeInfo_var); List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71(L_4, ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1)), /*hidden argument*/List_1__ctor_m31FA26D4722DE7042587E4FDA499FF5B35A5BE71_RuntimeMethod_var); __this->set_m_Characters_6(L_4); List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * L_5 = (List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 *)il2cpp_codegen_object_new(List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0_il2cpp_TypeInfo_var); List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD(L_5, ((int32_t)20), /*hidden argument*/List_1__ctor_m9616B19521FA2ACBD7DAB484CA3DFA1283D8C9DD_RuntimeMethod_var); __this->set_m_Lines_7(L_5); return; } } // System.Void UnityEngine.TextGenerator::Finalize() extern "C" IL2CPP_METHOD_ATTR void TextGenerator_Finalize_m6E9076F61F7B4DD5E56207F39E8F5FD85F188D8A (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator_Finalize_m6E9076F61F7B4DD5E56207F39E8F5FD85F188D8A_MetadataUsageId); s_Il2CppMethodInitialized = true; } Exception_t * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); void* __leave_targets_storage = alloca(sizeof(int32_t) * 1); il2cpp::utils::LeaveTargetStack __leave_targets(__leave_targets_storage); NO_UNUSED_WARNING (__leave_targets); { } IL_0001: try { // begin try (depth: 1) InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t7218B22548186B208D65EA5B7870503810A2D15A_il2cpp_TypeInfo_var, __this); IL2CPP_LEAVE(0x13, FINALLY_000c); } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __last_unhandled_exception = (Exception_t *)e.ex; goto FINALLY_000c; } FINALLY_000c: { // begin finally (depth: 1) Object_Finalize_m4015B7D3A44DE125C5FE34D7276CD4697C06F380(__this, /*hidden argument*/NULL); IL2CPP_END_FINALLY(12) } // end finally (depth: 1) IL2CPP_CLEANUP(12) { IL2CPP_JUMP_TBL(0x13, IL_0013) IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *) } IL_0013: { return; } } // System.Void UnityEngine.TextGenerator::System.IDisposable.Dispose() extern "C" IL2CPP_METHOD_ATTR void TextGenerator_System_IDisposable_Dispose_m9D3291DC086282AF57A115B39D3C17BD0074FA3D (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator_System_IDisposable_Dispose_m9D3291DC086282AF57A115B39D3C17BD0074FA3D_MetadataUsageId); s_Il2CppMethodInitialized = true; } { intptr_t L_0 = __this->get_m_Ptr_0(); bool L_1 = IntPtr_op_Inequality_mB4886A806009EA825EFCC60CD2A7F6EB8E273A61((intptr_t)L_0, (intptr_t)(0), /*hidden argument*/NULL); if (!L_1) { goto IL_002e; } } { intptr_t L_2 = __this->get_m_Ptr_0(); TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5((intptr_t)L_2, /*hidden argument*/NULL); __this->set_m_Ptr_0((intptr_t)(0)); } IL_002e: { return; } } // System.Int32 UnityEngine.TextGenerator::get_characterCountVisible() extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_get_characterCountVisible_mD0E9AA8120947F5AED58F512C0978C2E82ED1182 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { int32_t V_0 = 0; { int32_t L_0 = TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7(__this, /*hidden argument*/NULL); V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_0, (int32_t)1)); goto IL_000e; } IL_000e: { int32_t L_1 = V_0; return L_1; } } // UnityEngine.TextGenerationSettings UnityEngine.TextGenerator::ValidatedSettings(UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 TextGenerator_ValidatedSettings_m167131680BB6CD53B929EF189520F9FCF71FB1D3 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator_ValidatedSettings_m167131680BB6CD53B929EF189520F9FCF71FB1D3_MetadataUsageId); s_Il2CppMethodInitialized = true; } TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 V_0; memset(&V_0, 0, sizeof(V_0)); { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_0 = (&___settings0)->get_font_0(); IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_002b; } } { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_2 = (&___settings0)->get_font_0(); NullCheck(L_2); bool L_3 = Font_get_dynamic_m14C7E59606E317C5952A69F05CC44BF399CFFE2E(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_002b; } } { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_4 = ___settings0; V_0 = L_4; goto IL_00e2; } IL_002b: { int32_t L_5 = (&___settings0)->get_fontSize_2(); if (L_5) { goto IL_0043; } } { int32_t L_6 = (&___settings0)->get_fontStyle_6(); if (!L_6) { goto IL_008d; } } IL_0043: { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_7 = (&___settings0)->get_font_0(); IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_8 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_7, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_007c; } } { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_9 = (&___settings0)->get_font_0(); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_10 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_11 = L_10; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_12 = (&___settings0)->get_font_0(); NullCheck(L_12); String_t* L_13 = Object_get_name_mA2D400141CB3C991C87A2556429781DE961A83CE(L_12, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_13); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_13); IL2CPP_RUNTIME_CLASS_INIT(Debug_t7B5FCB117E2FD63B6838BC52821B252E2BFB61C4_il2cpp_TypeInfo_var); Debug_LogWarningFormat_m4A02CCF91F3A9392F4AA93576DCE2222267E5945(L_9, _stringLiteral2C79056F1CBD7CDBD214C0C0421FFC46A2BD5CBD, L_11, /*hidden argument*/NULL); } IL_007c: { (&___settings0)->set_fontSize_2(0); (&___settings0)->set_fontStyle_6(0); } IL_008d: { bool L_14 = (&___settings0)->get_resizeTextForBestFit_9(); if (!L_14) { goto IL_00db; } } { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_15 = (&___settings0)->get_font_0(); IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_16 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_15, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_16) { goto IL_00d2; } } { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_17 = (&___settings0)->get_font_0(); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_18 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_19 = L_18; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_20 = (&___settings0)->get_font_0(); NullCheck(L_20); String_t* L_21 = Object_get_name_mA2D400141CB3C991C87A2556429781DE961A83CE(L_20, /*hidden argument*/NULL); NullCheck(L_19); ArrayElementTypeCheck (L_19, L_21); (L_19)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_21); IL2CPP_RUNTIME_CLASS_INIT(Debug_t7B5FCB117E2FD63B6838BC52821B252E2BFB61C4_il2cpp_TypeInfo_var); Debug_LogWarningFormat_m4A02CCF91F3A9392F4AA93576DCE2222267E5945(L_17, _stringLiteral277905A8757DB70EAE0C8B996E4FCF857783BB03, L_19, /*hidden argument*/NULL); } IL_00d2: { (&___settings0)->set_resizeTextForBestFit_9((bool)0); } IL_00db: { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_22 = ___settings0; V_0 = L_22; goto IL_00e2; } IL_00e2: { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_23 = V_0; return L_23; } } // System.Void UnityEngine.TextGenerator::Invalidate() extern "C" IL2CPP_METHOD_ATTR void TextGenerator_Invalidate_m5C360AB470CB728BAA03B34BE33C75CBB55B673E (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { { __this->set_m_HasGenerated_3((bool)0); return; } } // System.Void UnityEngine.TextGenerator::GetCharacters(System.Collections.Generic.List`1<UnityEngine.UICharInfo>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetCharacters_mBB7980F2FE8BE65A906A39B5559EC54B1CEF4131 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * ___characters0, const RuntimeMethod* method) { { List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * L_0 = ___characters0; TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.TextGenerator::GetLines(System.Collections.Generic.List`1<UnityEngine.UILineInfo>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetLines_mC31F7918A9159908EA914D01B2E32644B046E2B5 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * ___lines0, const RuntimeMethod* method) { { List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * L_0 = ___lines0; TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.TextGenerator::GetVertices(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetVertices_m6FA34586541514ED7396990542BDAC536C10A4F2 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___vertices0, const RuntimeMethod* method) { { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_0 = ___vertices0; TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A(__this, L_0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.TextGenerator::GetPreferredWidth(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR float TextGenerator_GetPreferredWidth_mBF228094564195BBB66669F4ECC6EE1B0B05BAAA (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method) { Rect_t35B976DE901B5423C11705E156938EA27AB402CE V_0; memset(&V_0, 0, sizeof(V_0)); float V_1 = 0.0f; { (&___settings1)->set_horizontalOverflow_14(1); (&___settings1)->set_verticalOverflow_13(1); (&___settings1)->set_updateBounds_12((bool)1); String_t* L_0 = ___str0; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_1 = ___settings1; TextGenerator_Populate_m15553808C8FA017AA1AC23D2818C30DAFD654A04(__this, L_0, L_1, /*hidden argument*/NULL); Rect_t35B976DE901B5423C11705E156938EA27AB402CE L_2 = TextGenerator_get_rectExtents_m55F6A6727406C54BEFB7628751555B7C58BEC9B1(__this, /*hidden argument*/NULL); V_0 = L_2; float L_3 = Rect_get_width_m54FF69FC2C086E2DC349ED091FD0D6576BFB1484((Rect_t35B976DE901B5423C11705E156938EA27AB402CE *)(&V_0), /*hidden argument*/NULL); V_1 = L_3; goto IL_0036; } IL_0036: { float L_4 = V_1; return L_4; } } // System.Single UnityEngine.TextGenerator::GetPreferredHeight(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR float TextGenerator_GetPreferredHeight_mC2F191D9E9CF2365545D0A3F1EBD0F105DB27963 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method) { Rect_t35B976DE901B5423C11705E156938EA27AB402CE V_0; memset(&V_0, 0, sizeof(V_0)); float V_1 = 0.0f; { (&___settings1)->set_verticalOverflow_13(1); (&___settings1)->set_updateBounds_12((bool)1); String_t* L_0 = ___str0; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_1 = ___settings1; TextGenerator_Populate_m15553808C8FA017AA1AC23D2818C30DAFD654A04(__this, L_0, L_1, /*hidden argument*/NULL); Rect_t35B976DE901B5423C11705E156938EA27AB402CE L_2 = TextGenerator_get_rectExtents_m55F6A6727406C54BEFB7628751555B7C58BEC9B1(__this, /*hidden argument*/NULL); V_0 = L_2; float L_3 = Rect_get_height_m088C36990E0A255C5D7DCE36575DCE23ABB364B5((Rect_t35B976DE901B5423C11705E156938EA27AB402CE *)(&V_0), /*hidden argument*/NULL); V_1 = L_3; goto IL_002e; } IL_002e: { float L_4 = V_1; return L_4; } } // System.Boolean UnityEngine.TextGenerator::PopulateWithErrors(System.String,UnityEngine.TextGenerationSettings,UnityEngine.GameObject) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_PopulateWithErrors_m1F1851B3C2B2EBEFD81C83DC124FB376C926B933 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, GameObject_tBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F * ___context2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator_PopulateWithErrors_m1F1851B3C2B2EBEFD81C83DC124FB376C926B933_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; bool V_1 = false; { String_t* L_0 = ___str0; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_1 = ___settings1; int32_t L_2 = TextGenerator_PopulateWithError_m24D1DA75F0563582E228C6F4982D0913C58E1D7D(__this, L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; int32_t L_3 = V_0; if (L_3) { goto IL_0017; } } { V_1 = (bool)1; goto IL_0064; } IL_0017: { int32_t L_4 = V_0; if (!((int32_t)((int32_t)L_4&(int32_t)1))) { goto IL_003a; } } { GameObject_tBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F * L_5 = ___context2; ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_6 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_7 = L_6; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_8 = (&___settings1)->get_font_0(); NullCheck(L_7); ArrayElementTypeCheck (L_7, L_8); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_8); IL2CPP_RUNTIME_CLASS_INIT(Debug_t7B5FCB117E2FD63B6838BC52821B252E2BFB61C4_il2cpp_TypeInfo_var); Debug_LogErrorFormat_m994E4759C25BF0E9DD4179C10E3979558137CCF0(L_5, _stringLiteral6F5E75D22C09C82C4D03E8E6E9ADE44476FEE514, L_7, /*hidden argument*/NULL); } IL_003a: { int32_t L_9 = V_0; if (!((int32_t)((int32_t)L_9&(int32_t)2))) { goto IL_005d; } } { GameObject_tBD1244AD56B4E59AAD76E5E7C9282EC5CE434F0F * L_10 = ___context2; ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_11 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_12 = L_11; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_13 = (&___settings1)->get_font_0(); NullCheck(L_12); ArrayElementTypeCheck (L_12, L_13); (L_12)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_13); IL2CPP_RUNTIME_CLASS_INIT(Debug_t7B5FCB117E2FD63B6838BC52821B252E2BFB61C4_il2cpp_TypeInfo_var); Debug_LogErrorFormat_m994E4759C25BF0E9DD4179C10E3979558137CCF0(L_10, _stringLiteral8D03707CEE3275C377839D6BF944BCECDF26A00B, L_12, /*hidden argument*/NULL); } IL_005d: { V_1 = (bool)0; goto IL_0064; } IL_0064: { bool L_14 = V_1; return L_14; } } // System.Boolean UnityEngine.TextGenerator::Populate(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_m15553808C8FA017AA1AC23D2818C30DAFD654A04 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method) { int32_t V_0 = 0; bool V_1 = false; { String_t* L_0 = ___str0; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_1 = ___settings1; int32_t L_2 = TextGenerator_PopulateWithError_m24D1DA75F0563582E228C6F4982D0913C58E1D7D(__this, L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; int32_t L_3 = V_0; V_1 = (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0); goto IL_0014; } IL_0014: { bool L_4 = V_1; return L_4; } } // UnityEngine.TextGenerationError UnityEngine.TextGenerator::PopulateWithError(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_PopulateWithError_m24D1DA75F0563582E228C6F4982D0913C58E1D7D (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method) { int32_t V_0 = 0; { bool L_0 = __this->get_m_HasGenerated_3(); if (!L_0) { goto IL_003b; } } { String_t* L_1 = ___str0; String_t* L_2 = __this->get_m_LastString_1(); bool L_3 = String_op_Equality_m139F0E4195AE2F856019E63B241F36F016997FCE(L_1, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_003b; } } { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_4 = __this->get_m_LastSettings_2(); bool L_5 = TextGenerationSettings_Equals_m39912D195B0384AADC5C274659324EC8720C4F7D((TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 *)(&___settings1), L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_003b; } } { int32_t L_6 = __this->get_m_LastValid_4(); V_0 = L_6; goto IL_0055; } IL_003b: { String_t* L_7 = ___str0; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_8 = ___settings1; int32_t L_9 = TextGenerator_PopulateAlways_m8DCF389A51877975F29FAB9B6E800DFDC1E0B8DF(__this, L_7, L_8, /*hidden argument*/NULL); __this->set_m_LastValid_4(L_9); int32_t L_10 = __this->get_m_LastValid_4(); V_0 = L_10; goto IL_0055; } IL_0055: { int32_t L_11 = V_0; return L_11; } } // UnityEngine.TextGenerationError UnityEngine.TextGenerator::PopulateAlways(System.String,UnityEngine.TextGenerationSettings) extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_PopulateAlways_m8DCF389A51877975F29FAB9B6E800DFDC1E0B8DF (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 ___settings1, const RuntimeMethod* method) { TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t V_1 = 0; int32_t V_2 = 0; { String_t* L_0 = ___str0; __this->set_m_LastString_1(L_0); __this->set_m_HasGenerated_3((bool)1); __this->set_m_CachedVerts_8((bool)0); __this->set_m_CachedCharacters_9((bool)0); __this->set_m_CachedLines_10((bool)0); TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_1 = ___settings1; __this->set_m_LastSettings_2(L_1); TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_2 = ___settings1; TextGenerationSettings_t37703542535A1638D2A08F41DB629A483616AF68 L_3 = TextGenerator_ValidatedSettings_m167131680BB6CD53B929EF189520F9FCF71FB1D3(__this, L_2, /*hidden argument*/NULL); V_0 = L_3; String_t* L_4 = ___str0; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_5 = (&V_0)->get_font_0(); Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 L_6 = (&V_0)->get_color_1(); int32_t L_7 = (&V_0)->get_fontSize_2(); float L_8 = (&V_0)->get_scaleFactor_5(); float L_9 = (&V_0)->get_lineSpacing_3(); int32_t L_10 = (&V_0)->get_fontStyle_6(); bool L_11 = (&V_0)->get_richText_4(); bool L_12 = (&V_0)->get_resizeTextForBestFit_9(); int32_t L_13 = (&V_0)->get_resizeTextMinSize_10(); int32_t L_14 = (&V_0)->get_resizeTextMaxSize_11(); int32_t L_15 = (&V_0)->get_verticalOverflow_13(); int32_t L_16 = (&V_0)->get_horizontalOverflow_14(); bool L_17 = (&V_0)->get_updateBounds_12(); int32_t L_18 = (&V_0)->get_textAnchor_7(); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_19 = (&V_0)->get_generationExtents_15(); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_20 = (&V_0)->get_pivot_16(); bool L_21 = (&V_0)->get_generateOutOfBounds_17(); bool L_22 = (&V_0)->get_alignByGeometry_8(); TextGenerator_Populate_Internal_m42F7FED165D62BFD9C006D19A0FCE5B70C1EF92B(__this, L_4, L_5, L_6, L_7, L_8, L_9, L_10, L_11, L_12, L_13, L_14, L_15, L_16, L_17, L_18, L_19, L_20, L_21, L_22, (int32_t*)(&V_1), /*hidden argument*/NULL); int32_t L_23 = V_1; __this->set_m_LastValid_4(L_23); int32_t L_24 = V_1; V_2 = L_24; goto IL_00c9; } IL_00c9: { int32_t L_25 = V_2; return L_25; } } // System.Collections.Generic.IList`1<UnityEngine.UIVertex> UnityEngine.TextGenerator::get_verts() extern "C" IL2CPP_METHOD_ATTR RuntimeObject* TextGenerator_get_verts_mD0B3D877BE872CDE4BE3791685B8B5EF0AAC6120 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { RuntimeObject* V_0 = NULL; { bool L_0 = __this->get_m_CachedVerts_8(); if (L_0) { goto IL_0021; } } { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_1 = __this->get_m_Verts_5(); TextGenerator_GetVertices_m6FA34586541514ED7396990542BDAC536C10A4F2(__this, L_1, /*hidden argument*/NULL); __this->set_m_CachedVerts_8((bool)1); } IL_0021: { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_2 = __this->get_m_Verts_5(); V_0 = (RuntimeObject*)L_2; goto IL_002d; } IL_002d: { RuntimeObject* L_3 = V_0; return L_3; } } // System.Collections.Generic.IList`1<UnityEngine.UICharInfo> UnityEngine.TextGenerator::get_characters() extern "C" IL2CPP_METHOD_ATTR RuntimeObject* TextGenerator_get_characters_m716FE1EF0738A1E6B3FBF4A1DBC46244B9594C7B (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { RuntimeObject* V_0 = NULL; { bool L_0 = __this->get_m_CachedCharacters_9(); if (L_0) { goto IL_0021; } } { List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * L_1 = __this->get_m_Characters_6(); TextGenerator_GetCharacters_mBB7980F2FE8BE65A906A39B5559EC54B1CEF4131(__this, L_1, /*hidden argument*/NULL); __this->set_m_CachedCharacters_9((bool)1); } IL_0021: { List_1_tD850FBA632A52824016AAA9B3748BA38F51E087E * L_2 = __this->get_m_Characters_6(); V_0 = (RuntimeObject*)L_2; goto IL_002d; } IL_002d: { RuntimeObject* L_3 = V_0; return L_3; } } // System.Collections.Generic.IList`1<UnityEngine.UILineInfo> UnityEngine.TextGenerator::get_lines() extern "C" IL2CPP_METHOD_ATTR RuntimeObject* TextGenerator_get_lines_m40303E6BF9508DD46E04A21B5F5510F0FB9437CD (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { RuntimeObject* V_0 = NULL; { bool L_0 = __this->get_m_CachedLines_10(); if (L_0) { goto IL_0021; } } { List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * L_1 = __this->get_m_Lines_7(); TextGenerator_GetLines_mC31F7918A9159908EA914D01B2E32644B046E2B5(__this, L_1, /*hidden argument*/NULL); __this->set_m_CachedLines_10((bool)1); } IL_0021: { List_1_t7687D8368357F4437252DC75BFCE9DE76F3143A0 * L_2 = __this->get_m_Lines_7(); V_0 = (RuntimeObject*)L_2; goto IL_002d; } IL_002d: { RuntimeObject* L_3 = V_0; return L_3; } } // UnityEngine.Rect UnityEngine.TextGenerator::get_rectExtents() extern "C" IL2CPP_METHOD_ATTR Rect_t35B976DE901B5423C11705E156938EA27AB402CE TextGenerator_get_rectExtents_m55F6A6727406C54BEFB7628751555B7C58BEC9B1 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { Rect_t35B976DE901B5423C11705E156938EA27AB402CE V_0; memset(&V_0, 0, sizeof(V_0)); { TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0(__this, (Rect_t35B976DE901B5423C11705E156938EA27AB402CE *)(&V_0), /*hidden argument*/NULL); Rect_t35B976DE901B5423C11705E156938EA27AB402CE L_0 = V_0; return L_0; } } // System.Int32 UnityEngine.TextGenerator::get_characterCount() extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { typedef int32_t (*TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *); static TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_get_characterCount_m2A8F9764A7BD2AD1287D3721638FB6114D6BDDC7_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::get_characterCount()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Int32 UnityEngine.TextGenerator::get_lineCount() extern "C" IL2CPP_METHOD_ATTR int32_t TextGenerator_get_lineCount_m7A3CC9D67099CDC4723A683716BE5FBC623EE9C4 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, const RuntimeMethod* method) { typedef int32_t (*TextGenerator_get_lineCount_m7A3CC9D67099CDC4723A683716BE5FBC623EE9C4_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *); static TextGenerator_get_lineCount_m7A3CC9D67099CDC4723A683716BE5FBC623EE9C4_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_get_lineCount_m7A3CC9D67099CDC4723A683716BE5FBC623EE9C4_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::get_lineCount()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.IntPtr UnityEngine.TextGenerator::Internal_Create() extern "C" IL2CPP_METHOD_ATTR intptr_t TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994 (const RuntimeMethod* method) { typedef intptr_t (*TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994_ftn) (); static TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_Internal_Create_m127DBEDE47D3028812950FD9184A18C9F3A5E994_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::Internal_Create()"); intptr_t retVal = _il2cpp_icall_func(); return retVal; } // System.Void UnityEngine.TextGenerator::Internal_Destroy(System.IntPtr) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5 (intptr_t ___ptr0, const RuntimeMethod* method) { typedef void (*TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5_ftn) (intptr_t); static TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_Internal_Destroy_mB7FE56C2FAAE16938DE8BC7256EB44643E1845A5_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::Internal_Destroy(System.IntPtr)"); _il2cpp_icall_func(___ptr0); } // System.Boolean UnityEngine.TextGenerator::Populate_Internal(System.String,UnityEngine.Font,UnityEngine.Color,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,UnityEngine.TextAnchor,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.UInt32U26) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_mCA54081A0855AED6EC6345265603409FE330985C (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, float ___extentsX15, float ___extentsY16, float ___pivotX17, float ___pivotY18, bool ___generateOutOfBounds19, bool ___alignByGeometry20, uint32_t* ___error21, const RuntimeMethod* method) { { String_t* L_0 = ___str0; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_1 = ___font1; int32_t L_2 = ___fontSize3; float L_3 = ___scaleFactor4; float L_4 = ___lineSpacing5; int32_t L_5 = ___style6; bool L_6 = ___richText7; bool L_7 = ___resizeTextForBestFit8; int32_t L_8 = ___resizeTextMinSize9; int32_t L_9 = ___resizeTextMaxSize10; int32_t L_10 = ___verticalOverFlow11; int32_t L_11 = ___horizontalOverflow12; bool L_12 = ___updateBounds13; int32_t L_13 = ___anchor14; float L_14 = ___extentsX15; float L_15 = ___extentsY16; float L_16 = ___pivotX17; float L_17 = ___pivotY18; bool L_18 = ___generateOutOfBounds19; bool L_19 = ___alignByGeometry20; uint32_t* L_20 = ___error21; bool L_21 = TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE(__this, L_0, L_1, (Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *)(&___color2), L_2, L_3, L_4, L_5, L_6, L_7, L_8, L_9, L_10, L_11, L_12, L_13, L_14, L_15, L_16, L_17, L_18, L_19, (uint32_t*)L_20, /*hidden argument*/NULL); return L_21; } } // System.Boolean UnityEngine.TextGenerator::Populate_Internal(System.String,UnityEngine.Font,UnityEngine.Color,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,UnityEngine.VerticalWrapMode,UnityEngine.HorizontalWrapMode,System.Boolean,UnityEngine.TextAnchor,UnityEngine.Vector2,UnityEngine.Vector2,System.Boolean,System.Boolean,UnityEngine.TextGenerationErrorU26) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_m42F7FED165D62BFD9C006D19A0FCE5B70C1EF92B (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___extents15, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___pivot16, bool ___generateOutOfBounds17, bool ___alignByGeometry18, int32_t* ___error19, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TextGenerator_Populate_Internal_m42F7FED165D62BFD9C006D19A0FCE5B70C1EF92B_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; uint32_t V_1 = 0; bool V_2 = false; { Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_0 = ___font1; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0019; } } { int32_t* L_2 = ___error19; *((int32_t*)L_2) = (int32_t)4; V_0 = (bool)0; goto IL_006a; } IL_0019: { V_1 = 0; String_t* L_3 = ___str0; Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * L_4 = ___font1; Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 L_5 = ___color2; int32_t L_6 = ___fontSize3; float L_7 = ___scaleFactor4; float L_8 = ___lineSpacing5; int32_t L_9 = ___style6; bool L_10 = ___richText7; bool L_11 = ___resizeTextForBestFit8; int32_t L_12 = ___resizeTextMinSize9; int32_t L_13 = ___resizeTextMaxSize10; int32_t L_14 = ___verticalOverFlow11; int32_t L_15 = ___horizontalOverflow12; bool L_16 = ___updateBounds13; int32_t L_17 = ___anchor14; float L_18 = (&___extents15)->get_x_0(); float L_19 = (&___extents15)->get_y_1(); float L_20 = (&___pivot16)->get_x_0(); float L_21 = (&___pivot16)->get_y_1(); bool L_22 = ___generateOutOfBounds17; bool L_23 = ___alignByGeometry18; bool L_24 = TextGenerator_Populate_Internal_mCA54081A0855AED6EC6345265603409FE330985C(__this, L_3, L_4, L_5, L_6, L_7, L_8, L_9, L_10, L_11, L_12, L_13, L_14, L_15, L_16, L_17, L_18, L_19, L_20, L_21, L_22, L_23, (uint32_t*)(&V_1), /*hidden argument*/NULL); V_2 = L_24; int32_t* L_25 = ___error19; uint32_t L_26 = V_1; *((int32_t*)L_25) = (int32_t)L_26; bool L_27 = V_2; V_0 = L_27; goto IL_006a; } IL_006a: { bool L_28 = V_0; return L_28; } } // System.Void UnityEngine.TextGenerator::GetVerticesInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___vertices0, const RuntimeMethod* method) { typedef void (*TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *, RuntimeObject *); static TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_GetVerticesInternal_mB794B94982BA35D2CDB8F3AA77880B33AEB42B9A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::GetVerticesInternal(System.Object)"); _il2cpp_icall_func(__this, ___vertices0); } // System.Void UnityEngine.TextGenerator::GetCharactersInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___characters0, const RuntimeMethod* method) { typedef void (*TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *, RuntimeObject *); static TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_GetCharactersInternal_m4383B9A162CF10430636BFD248DDBDDB4D64E967_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::GetCharactersInternal(System.Object)"); _il2cpp_icall_func(__this, ___characters0); } // System.Void UnityEngine.TextGenerator::GetLinesInternal(System.Object) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, RuntimeObject * ___lines0, const RuntimeMethod* method) { typedef void (*TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *, RuntimeObject *); static TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_GetLinesInternal_mA54A05D512EE1CED958F73E0024FB913E648EDAD_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::GetLinesInternal(System.Object)"); _il2cpp_icall_func(__this, ___lines0); } // System.Void UnityEngine.TextGenerator::get_rectExtents_Injected(UnityEngine.RectU26) extern "C" IL2CPP_METHOD_ATTR void TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0 (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___ret0, const RuntimeMethod* method) { typedef void (*TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *, Rect_t35B976DE901B5423C11705E156938EA27AB402CE *); static TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_get_rectExtents_Injected_mD8FC9E47642590C7AC78DA83B583E5F4271842D0_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::get_rectExtents_Injected(UnityEngine.Rect&)"); _il2cpp_icall_func(__this, ___ret0); } // System.Boolean UnityEngine.TextGenerator::Populate_Internal_Injected(System.String,UnityEngine.Font,UnityEngine.ColorU26,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,UnityEngine.TextAnchor,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.UInt32U26) extern "C" IL2CPP_METHOD_ATTR bool TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 * __this, String_t* ___str0, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 * ___font1, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___color2, int32_t ___fontSize3, float ___scaleFactor4, float ___lineSpacing5, int32_t ___style6, bool ___richText7, bool ___resizeTextForBestFit8, int32_t ___resizeTextMinSize9, int32_t ___resizeTextMaxSize10, int32_t ___verticalOverFlow11, int32_t ___horizontalOverflow12, bool ___updateBounds13, int32_t ___anchor14, float ___extentsX15, float ___extentsY16, float ___pivotX17, float ___pivotY18, bool ___generateOutOfBounds19, bool ___alignByGeometry20, uint32_t* ___error21, const RuntimeMethod* method) { typedef bool (*TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE_ftn) (TextGenerator_tD455BE18A64C7DDF854F6DB3CCEBF705121C58A8 *, String_t*, Font_t1EDE54AF557272BE314EB4B40EFA50CEB353CA26 *, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *, int32_t, float, float, int32_t, bool, bool, int32_t, int32_t, int32_t, int32_t, bool, int32_t, float, float, float, float, bool, bool, uint32_t*); static TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextGenerator_Populate_Internal_Injected_mC1D6A0A0A9E0BFDB146EA921DA459D83FF33DEDE_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextGenerator::Populate_Internal_Injected(System.String,UnityEngine.Font,UnityEngine.Color&,System.Int32,System.Single,System.Single,UnityEngine.FontStyle,System.Boolean,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,UnityEngine.TextAnchor,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.UInt32&)"); bool retVal = _il2cpp_icall_func(__this, ___str0, ___font1, ___color2, ___fontSize3, ___scaleFactor4, ___lineSpacing5, ___style6, ___richText7, ___resizeTextForBestFit8, ___resizeTextMinSize9, ___resizeTextMaxSize10, ___verticalOverFlow11, ___horizontalOverflow12, ___updateBounds13, ___anchor14, ___extentsX15, ___extentsY16, ___pivotX17, ___pivotY18, ___generateOutOfBounds19, ___alignByGeometry20, ___error21); return retVal; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.TextMesh::set_text(System.String) extern "C" IL2CPP_METHOD_ATTR void TextMesh_set_text_m64242AB987CF285F432E7AED38F24FF855E9B220 (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A * __this, String_t* ___value0, const RuntimeMethod* method) { typedef void (*TextMesh_set_text_m64242AB987CF285F432E7AED38F24FF855E9B220_ftn) (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A *, String_t*); static TextMesh_set_text_m64242AB987CF285F432E7AED38F24FF855E9B220_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextMesh_set_text_m64242AB987CF285F432E7AED38F24FF855E9B220_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextMesh::set_text(System.String)"); _il2cpp_icall_func(__this, ___value0); } // System.Void UnityEngine.TextMesh::set_color(UnityEngine.Color) extern "C" IL2CPP_METHOD_ATTR void TextMesh_set_color_mF86B9E8CD0F9FD387AF7D543337B5C14DFE67AF0 (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___value0, const RuntimeMethod* method) { { TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA(__this, (Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *)(&___value0), /*hidden argument*/NULL); return; } } // System.Void UnityEngine.TextMesh::set_color_Injected(UnityEngine.ColorU26) extern "C" IL2CPP_METHOD_ATTR void TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___value0, const RuntimeMethod* method) { typedef void (*TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA_ftn) (TextMesh_t327D0DAFEF431170D8C2882083D442AF4D4A0E4A *, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *); static TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TextMesh_set_color_Injected_mF49AFC2EAF7A66132B87F41576FFAE0722E179AA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.TextMesh::set_color_Injected(UnityEngine.Color&)"); _il2cpp_icall_func(__this, ___value0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.UIVertex::.cctor() extern "C" IL2CPP_METHOD_ATTR void UIVertex__cctor_m86F60F5BB996D3C59B19B80C4BFB5770802BFB30 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UIVertex__cctor_m86F60F5BB996D3C59B19B80C4BFB5770802BFB30_MetadataUsageId); s_Il2CppMethodInitialized = true; } UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 V_0; memset(&V_0, 0, sizeof(V_0)); { Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 L_0; memset(&L_0, 0, sizeof(L_0)); Color32__ctor_m1AEF46FBBBE4B522E6984D081A3D158198E10AA2((&L_0), (uint8_t)((int32_t)255), (uint8_t)((int32_t)255), (uint8_t)((int32_t)255), (uint8_t)((int32_t)255), /*hidden argument*/NULL); ((UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields*)il2cpp_codegen_static_fields_for(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var))->set_s_DefaultColor_8(L_0); Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E L_1; memset(&L_1, 0, sizeof(L_1)); Vector4__ctor_m545458525879607A5392A10B175D0C19B2BC715D((&L_1), (1.0f), (0.0f), (0.0f), (-1.0f), /*hidden argument*/NULL); ((UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields*)il2cpp_codegen_static_fields_for(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var))->set_s_DefaultTangent_9(L_1); il2cpp_codegen_initobj((&V_0), sizeof(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 )); IL2CPP_RUNTIME_CLASS_INIT(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_2 = Vector3_get_zero_m3CDDCAE94581DF3BB16C4B40A100E28E9C6649C2(/*hidden argument*/NULL); (&V_0)->set_position_0(L_2); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_3 = Vector3_get_back_mE7EF8625637E6F8B9E6B42A6AE140777C51E02F7(/*hidden argument*/NULL); (&V_0)->set_normal_1(L_3); Vector4_tD148D6428C3F8FF6CD998F82090113C2B490B76E L_4 = ((UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields*)il2cpp_codegen_static_fields_for(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var))->get_s_DefaultTangent_9(); (&V_0)->set_tangent_2(L_4); Color32_t23ABC4AE0E0BDFD2E22EE1FA0DA3904FFE5F6E23 L_5 = ((UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields*)il2cpp_codegen_static_fields_for(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var))->get_s_DefaultColor_8(); (&V_0)->set_color_3(L_5); IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_6 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); (&V_0)->set_uv0_4(L_6); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_7 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); (&V_0)->set_uv1_5(L_7); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_8 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); (&V_0)->set_uv2_6(L_8); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_9 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); (&V_0)->set_uv3_7(L_9); UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577 L_10 = V_0; ((UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_StaticFields*)il2cpp_codegen_static_fields_for(UIVertex_t0583C35B730B218B542E80203F5F4BC6F1E9E577_il2cpp_TypeInfo_var))->set_simpleVert_10(L_10); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "tolegen.akhmetov@nu.edu.kz" ]
tolegen.akhmetov@nu.edu.kz
53749e31a54ba593b6bb5ab5cd4e8bf196395242
8ca1e6e17919693b35ab0ba787da0e6c8834cbb3
/Seminar/Seminar 4/OpenMP demo/OpenMP demo.cpp
19c200489383d87c83bcb96b42a90fb81f84ff5d
[]
no_license
haja-fgabriel/ppd
43d46c2a0cc3f0f36b08e4f0c9804e680dd2b64a
da4d473dfd0de6c0d062a7bcaa49699856861430
refs/heads/master
2023-03-19T15:02:29.255755
2021-03-01T19:44:50
2021-03-01T19:44:50
299,298,087
0
0
null
null
null
null
UTF-8
C++
false
false
1,237
cpp
#include <iostream> #include <omp.h> using namespace std; int main() { int i; int a[10] = { 1,2,3,4,5,6,7,8,9,10 }; int b[10] = { 1,2,3,4,5,6,7,8,9,10 }; int result[10]; omp_set_num_threads(4); for (int i = 0; i < 10; i++) { result[i] = a[i] + b[i]; } for (int i = 0; i < 10; i++) { cout << result[i] << ' '; } cout << endl; #pragma omp parallel private(i) num_threads(3) { /*#pragma omp for private(i) schedule(static, 1) for (int i = 0; i < 10; i++) { cout << omp_get_thread_num() << " - " << i << endl; result[i] = a[i] + b[i]; } cout << "end for1 for thread " << omp_get_thread_num() << endl; #pragma omp for nowait for (int i = 0; i < 10; i++) { cout << result[i] << ' '; } cout << endl; cout << "end for2 for thread " << omp_get_thread_num() << endl;*/ #pragma omp sections { #pragma omp section { } #pragma omp section { } #pragma omp section { } } } }
[ "haja.fgabriel@gmail.com" ]
haja.fgabriel@gmail.com
cab86e66268ffb2cb154a899fbed92ea4ef7f4c7
ae09f81e751fa75ba4cb8f1688ecf9ad00c2d82e
/Beginning Programming with C++/ConcateNString/main.cpp
ec31ede5e82bc059526e9fe0cb8d209ea393d4fb
[]
no_license
YChuan1115/cAndC-
c205cf325be73de3ff868c50240fbea1146b7fcc
78d96b3063095406b5dcb200c922620ed67b5f2b
refs/heads/master
2020-05-27T06:03:10.995160
2016-07-06T03:00:12
2016-07-06T03:00:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,100
cpp
// // ConcatenateNString - similar to ConcatenateString // except this version makes sure to not // write beyond the end of the target // array. // #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; // concatenateString - concatenate one string onto the // end of another (don't write beyond // nTargetSize) void concatenateString(char szTarget[], int nTargetSize, const char szSource[]) { // first find the end of the target string int nT; for(nT = 0; szTarget[nT] != '\0'; nT++) { } // now copy the contents of the source string into // the target string, beginning at 'nT' but don't // write beyond the nTargetSize'th element (- 1 to // leave room for the terminating NULL) for(int nS = 0; nT < (nTargetSize - 1) && szSource[nS] != '\0'; nT++, nS++) { szTarget[nT] = szSource[nS]; } // add the terminator to szTarget szTarget[nT] = '\0'; } int main(int nNumberofArgs, char* pszArgs[]) { // Prompt user cout << "This program accepts two strings\n" << "from the keyboard and outputs them\n" << "concatenated together.\n" << endl; // input two strings cout << "Enter first string: "; char szString1[256]; cin.getline(szString1, 256); cout << "Enter the second string: "; char szString2[256]; cin.getline(szString2, 256); // now concatenate one onto the end of the other cout << "Concatentate first string onto the second" << endl; concatenateString(szString1, 256, szString2); // and display the result cout << "Result: <" << szString1 << ">" << endl; // wait until user is ready before terminating program // to allow the user to see the program results cout << "Press Enter to continue..." << endl; cin.ignore(10, '\n'); cin.get(); return 0; }
[ "roberthsu@roberthsude-MacBook.local" ]
roberthsu@roberthsude-MacBook.local
9ff17d686914075a6ab4de203389a19d15a1d29b
dd63f4e78f5c3e27a6172696140ec07b62f3fb0b
/src/xf/core/customevent.cpp
1e944aaa7983524b3231e633471375d197c33694
[]
no_license
MartinMeyer1/RealTimeOscilloscope
20e3e241b73f7a2f1acc3d016b0a968cb6182a94
5e676c6bd7f20c206c043d00de81448876268d99
refs/heads/master
2022-06-11T14:53:40.973831
2020-04-27T15:28:45
2020-04-27T15:28:45
257,309,869
1
0
null
null
null
null
UTF-8
C++
false
false
185
cpp
#include "xf/customevent.h" XFCustomEvent::XFCustomEvent(int id, interface::XFReactive * pBehavior) : XFEvent(XFEvent::Event, id, pBehavior), _bDeleteAfterConsume(true) { }
[ "meyer.mart@outlook.com" ]
meyer.mart@outlook.com
7658065b78fdfac24d7e7111694d72e78a514664
a8d360d967f06c55f48bfafcc115ab81f8524e6b
/2018/src/Commands/DriveRotate.h
f9d74dfd8512555f288562261d44b87e0b3ab967
[]
no_license
TeamKoalafied/public
c4670f8bfc7c549f5e0cf1271b014d2990f3228e
ab4994c6beabb40452c05870b94a34194678bcc9
refs/heads/master
2023-01-08T18:22:17.291505
2023-01-06T01:41:11
2023-01-06T01:41:11
231,504,251
0
0
null
null
null
null
UTF-8
C++
false
false
1,637
h
//============================================================================== // DriveRotate.h //============================================================================== #ifndef DriveRotate_H #define DriveRotate_H #include <Timer.h> #include <Commands/Command.h> // Command for rotating given angle on the spot class DriveRotate : public frc::Command { public: //========================================================================== // Construction // Constructor // // turn_angle_degrees - Angle to turn through in degrees DriveRotate(double turn_angle_degrees); //========================================================================== // Function Overrides from frc::Command void Initialize() override; void Execute() override; bool IsFinished() override; void End() override; void Interrupted() override; //========================================================================== // Set the turn angle // // turn_angle_degrees - Angle to turn through in degrees void SetTurnAngle(double turn_angle_degrees) { m_turn_angle_degrees = turn_angle_degrees; } private: //========================================================================== // Member Variables double m_turn_angle_degrees; // Angle to turn through in degrees double m_target_heading_degrees; // Heading angle to turn to for the current execution in degrees int m_finish_counter; // Counter for detecting if the command is complete int state; // State for controlling rotation frc::Timer m_timer; // Timer for measuring total command duration }; #endif // DriveRotate_H
[ "smithomaster@gmail.com" ]
smithomaster@gmail.com
5bf668f9d67d691d73bd19ffb2cf41bc67c0a076
f792fdb912570862fd04037288bf63d0121b3228
/inheritance/Derived.hpp
111b874d0c5fb983895be39ff45d42eec1cec815
[]
no_license
jbloit/cppCookbook
fcff98cf5b77885c0532d86edf0bafb4beee88e7
52e51cdbc12a1cec2f77368ce6fc49421314a0ab
refs/heads/master
2020-12-05T23:28:23.481974
2020-09-30T13:28:09
2020-09-30T13:28:09
232,276,690
0
0
null
null
null
null
UTF-8
C++
false
false
466
hpp
#ifndef DERIVED_H #define DERIVED_H #include "Base.hpp" class Derived : public Base { public: int y; // default constructor, using the parameterized Base constructor Derived() : Base(777) { cout << "Derived default constructor\n"; } // parameterized constructor Derived(int i) { y = i; cout << "Derived parameterized constructor\n"; } }; #endif
[ "julien.bloit@gmail.com" ]
julien.bloit@gmail.com
fcde2c19a24cb1daada3f1467fa997eb2e80d962
5c2416618597a42f275bf46366fa76a6ffb773b3
/src/share/imem.h
6b72d69ab26c7ea0de4a43a47cfff1d4e5a1c4e9
[]
no_license
cnfntrvlnss/24209
7ea7f277af2c912eccb09957251c81dcf4b632b6
eec707cbfc4c340ecd8f3143323658d86e1c1be4
refs/heads/master
2021-01-20T08:02:50.813475
2017-08-11T11:20:16
2017-08-11T11:20:16
90,090,105
0
0
null
null
null
null
UTF-8
C++
false
false
1,500
h
/*****************************************************************************/ /*M* // THINKIT INTERNATIONAL PROPRIETARY INFORMATION // This software is supplied under the terms of the license agreement // or nondisclosure agreement with Thinkit International and may not be copied // or disclosed except in accordance with the terms of that agreement. // Copyright (c) 2002 ~ 2008 Thinkit International. All Rights Reserved. // VSS: // $Workfile:: imem.h $ // $Author:: Jjwang $ // $Revision:: 1 $ // $Modtime:: 11/09/13 20:39 $ // $NoKeywords: $ // // // Memory Management Head File // M*/ #ifndef aaaiMEMORY_MANAGEMENTaaa #define aaaiMEMORY_MANAGEMENTaaa #include <malloc.h> #include "mem.h" #include "isdtexception.h" static const uint hSize=100*1024; struct Link { Link* next; }; struct aMemId { enum {size=hSize}; aMemId *next; char mem[size]; }; struct IHeap { int size; /* size */ Link* head; aMemId *pHeap; }; /** class ISDTAPI Memory { public: static IHeap *CreateHeap(int sz=0); static void DeleteHeap(IHeap *id); static void *New(IHeap *id, int len, const bool clear=false); static void *New(IHeap *id, const bool clear=false); static void Delete(IHeap *id, void *ptr); }; */ #endif
[ "zhengshurui@live.com" ]
zhengshurui@live.com
5c2f5340c76cc14a3c887d2e7dc3a411b0298d04
fae6d83d66f83dc225784771fcb005272e346d72
/src/main/cpp/http/HttpServer.h
f05e53336abe2cb33944ce7682f9ba561238d607
[]
no_license
Axure/BoostServer
5f4d8028dfbfb182830cd025685b7ce07cc5ecff
1dd605d0b0092469ba65c0c6d3ec0810b51a7846
refs/heads/master
2021-01-22T12:03:05.452236
2015-09-15T00:21:00
2015-09-15T00:21:00
42,462,424
0
0
null
null
null
null
UTF-8
C++
false
false
270
h
// // Created by 郑虎 on 2015-09-15. // #ifndef BOOSTSERVER_HTTPSERVER_H #define BOOSTSERVER_HTTPSERVER_H namespace boost_server { namespace http { class HttpServer { public: HttpServer(); ~HttpServer(); private: }; } } #endif //BOOSTSERVER_HTTPSERVER_H
[ "axurez@vip.qq.com" ]
axurez@vip.qq.com
407acc84fc1e334f2b446914e0e05d09752cd3ae
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/vendor/intel/hardware/PRIVATE/audiocomms/audio-hal/hardware_device/test/StreamMock.hpp
3dc4eda4ba66b8b3dda672f45d16c6c74b4090b1
[]
no_license
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
C++
false
false
5,038
hpp
/* * INTEL CONFIDENTIAL * Copyright (c) 2014 Intel * Corporation All Rights Reserved. * * The source code contained or described herein and all documents related to * the source code ("Material") are owned by Intel Corporation or its suppliers * or licensors. Title to the Material remains with Intel Corporation or its * suppliers and licensors. The Material contains trade secrets and proprietary * and confidential information of Intel or its suppliers and licensors. The * Material is protected by worldwide copyright and trade secret laws and * treaty provisions. No part of the Material may be used, copied, reproduced, * modified, published, uploaded, posted, transmitted, distributed, or * disclosed in any way without Intel's prior express written permission. * * No license under any patent, copyright, trade secret or other intellectual * property right is granted to or conferred upon you by disclosure or delivery * of the Materials, either expressly, by implication, inducement, estoppel or * otherwise. Any license under such intellectual property rights must be * express and approved by Intel in writing. */ #pragma once #include <StreamInterface.hpp> #include <gmock/gmock.h> namespace intel_audio { class StreamOutMock : public StreamOutInterface { public: MOCK_CONST_METHOD0(getSampleRate, uint32_t()); MOCK_METHOD1(setSampleRate, android::status_t(uint32_t rate)); MOCK_CONST_METHOD0(getBufferSize, size_t()); MOCK_CONST_METHOD0(getChannels, audio_channel_mask_t()); MOCK_CONST_METHOD0(getFormat, audio_format_t()); MOCK_METHOD1(setFormat, android::status_t(audio_format_t format)); MOCK_METHOD0(standby, android::status_t()); MOCK_CONST_METHOD1(dump, android::status_t(int fd)); MOCK_CONST_METHOD0(getDevice, audio_devices_t()); MOCK_METHOD1(setDevice, android::status_t(audio_devices_t device)); MOCK_CONST_METHOD1(getParameters, std::string(const std::string &keys)); MOCK_METHOD1(setParameters, android::status_t(const std::string &keyValuePairs)); MOCK_METHOD1(addAudioEffect, android::status_t(effect_handle_t effect)); MOCK_METHOD1(removeAudioEffect, android::status_t(effect_handle_t effect)); MOCK_METHOD0(getLatency, uint32_t()); MOCK_METHOD2(setVolume, android::status_t(float left, float right)); MOCK_METHOD2(write, android::status_t(const void *buffer, size_t &bytes)); MOCK_CONST_METHOD1(getRenderPosition, android::status_t(uint32_t &dspFrames)); MOCK_CONST_METHOD1(getNextWriteTimestamp, android::status_t(int64_t &timestamp)); MOCK_METHOD0(flush, android::status_t()); MOCK_METHOD2(setCallback, android::status_t(stream_callback_t callback, void *cookie)); MOCK_METHOD0(pause, android::status_t()); MOCK_METHOD0(resume, android::status_t()); MOCK_METHOD1(drain, android::status_t(audio_drain_type_t type)); MOCK_CONST_METHOD2(getPresentationPosition, android::status_t(uint64_t &frames, struct timespec &timestamp)); }; class StreamInMock : public StreamInInterface { public: StreamInMock() {} virtual ~StreamInMock() {} MOCK_CONST_METHOD0(getSampleRate, uint32_t()); MOCK_METHOD1(setSampleRate, android::status_t(uint32_t rate)); MOCK_CONST_METHOD0(getBufferSize, size_t()); MOCK_CONST_METHOD0(getChannels, audio_channel_mask_t()); MOCK_CONST_METHOD0(getFormat, audio_format_t()); MOCK_METHOD1(setFormat, android::status_t(audio_format_t format)); MOCK_METHOD0(standby, android::status_t()); MOCK_CONST_METHOD1(dump, android::status_t(int fd)); MOCK_CONST_METHOD0(getDevice, audio_devices_t()); MOCK_METHOD1(setDevice, android::status_t(audio_devices_t device)); MOCK_CONST_METHOD1(getParameters, std::string(const std::string &keys)); MOCK_METHOD1(setParameters, android::status_t(const std::string &keyValuePairs)); MOCK_METHOD1(addAudioEffect, android::status_t(effect_handle_t effect)); MOCK_METHOD1(removeAudioEffect, android::status_t(effect_handle_t effect)); MOCK_METHOD1(setGain, android::status_t(float gain)); MOCK_METHOD2(read, android::status_t(void *buffer, size_t &bytes)); MOCK_CONST_METHOD0(getInputFramesLost, uint32_t()); }; } // namespace intel_audio
[ "mirek190@gmail.com" ]
mirek190@gmail.com
0a73264dca6d7541b38a5ab88e333ec8f87746e2
84f76ce90c2b4a60e8db1bd23c4abe5b33a167bb
/fw/include/test_queue.hpp
239d00f47207d3f7276d5699c1e55fc82958adbb
[ "MIT" ]
permissive
cednik/one-wire_sniffer
1b28a75842e855917e87e5dbf10ca3deb407c58d
bfa8e38e6310c8a20ac48eaa711be53b3454806b
refs/heads/master
2022-12-15T22:11:58.968852
2020-09-15T15:05:29
2020-09-15T15:05:29
287,253,428
0
0
null
null
null
null
UTF-8
C++
false
false
592
hpp
#pragma once #include <cstdint> #include <cstddef> #include <esp_attr.h> #include <FreeRTOS.h> class testQueue { public: static void init(size_t capacity = 128); template<typename... Args> static void send(Args&&... args); template<typename... Args> static void INTR_ATTR sendFromISR(Args&&... args); static void print(); private: uint64_t _status; uint8_t _cpu; testQueue(); ~testQueue(); void _print(); void INTR_ATTR _init(uint8_t cpu, uint64_t status); static QueueHandle_t s_handle; static volatile uint32_t s_index; };
[ "kuba.streit@gmail.com" ]
kuba.streit@gmail.com
065c92d48c1aff9760b1210ef8f6e66f2e95674a
80c18f56f65b60b72b723815654a251dbecd4125
/app/src/main/cpp/MyPlayerStatus.h
ced5da2641a415bd7d13455203c63a8388357339
[]
no_license
tck8888/MyPlayer
4f1e00c63e027ba6919f2b0b59b52dbd65cb8e79
d7f35ed4dce2d74b0ebb354754d65d6c6df4d1be
refs/heads/main
2023-01-20T15:51:30.489560
2020-12-02T11:06:08
2020-12-02T11:06:08
315,661,823
0
0
null
null
null
null
UTF-8
C++
false
false
316
h
// // Created by tck on 2020/11/27. // #ifndef MYMUSICPLAYER_MYPLAYERSTATUS_H #define MYMUSICPLAYER_MYPLAYERSTATUS_H class MyPlayerStatus { public: bool exit= false; bool load= true; bool seek = false; public: MyPlayerStatus(); ~MyPlayerStatus(); }; #endif //MYMUSICPLAYER_MYPLAYERSTATUS_H
[ "tck@dra100.com" ]
tck@dra100.com
02e5bb2b4c498eac68e2cee60ab7aef9b7db0c43
f9ceb2540a6899d401d72ca4db628bf39ada5401
/aten/src/ATen/mps/MPSAllocator.h
72c0024807255e4fa27c628495c882584d3ce7d3
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0", "BSD-2-Clause" ]
permissive
zhuangh/pytorch
4d03fdb822071d4e85f7d2008079aeb834143554
f11cce309bf290151a21b2ac8e79bf2a24dcf2f3
refs/heads/master
2023-03-15T11:42:05.827978
2022-06-25T12:40:52
2022-06-25T12:40:52
507,397,273
0
0
NOASSERTION
2022-06-25T19:13:38
2022-06-25T19:13:37
null
UTF-8
C++
false
false
10,231
h
// Copyright © 2022 Apple Inc. #include <ATen/Tensor.h> #include <ATen/ATen.h> #include <ATen/Utils.h> #include <torch/library.h> #include <c10/util/flat_hash_map.h> #include <ATen/mps/MPSDevice.h> #include <cstdio> #include <mutex> #include <set> #include <utility> #include <mach/vm_page_size.h> #ifdef __OBJC__ #include <Foundation/Foundation.h> #include <Metal/Metal.h> #include <Metal/MTLHeap.h> #include <MetalPerformanceShaders/MetalPerformanceShaders.h> #endif // this implementation is based on CUDACachingAllocator. // It utilizes Metal Heaps to improve the performance with buffer allocation. // TODO: Unify the logic with CUDACachingAllocator and remove redundant code. namespace at { namespace mps { class IMpsAllocatorCallback { public: enum class EventType { ALLOCATED, // buffer got allocated to be used immediately RECYCLED, // buffer pulled from free list to be reused FREED, // buffer put to free list for future recycling RELEASED, // buffer memory released }; virtual ~IMpsAllocatorCallback() = default; virtual void executeMPSAllocatorCallback(void* ptr, EventType event) = 0; }; // MPS allocator will execute every registered callback when a block of memory is freed. C10_DECLARE_REGISTRY(MPSAllocatorCallbacksRegistry, IMpsAllocatorCallback); #define REGISTER_MPS_ALLOCATOR_CALLBACK(name, ...) \ C10_REGISTER_CLASS(MPSAllocatorCallbacksRegistry, name, __VA_ARGS__); namespace HeapAllocator { #define MB(x) round_page(x * 1048576UL) static const size_t kMaxSmallAlloc = MB(1); // largest "small" allocation is 1 MiB static const size_t kMinLargeAlloc = MB(10); // allocations between 1 and 10 MiB may use kLargeHeap static const size_t kSmallHeap = MB(8); // "small" allocations are packed in 8 MiB heaps static const size_t kLargeHeap = MB(32); // "large" allocations may be packed in 32 MiB heaps static const size_t kRoundLarge = MB(2); // round up large allocations to 2 MiB // TODO: check the caching performance of write-combined mode constexpr MTLResourceOptions kCPUCacheMode = MTLResourceOptionCPUCacheModeDefault; constexpr MTLResourceOptions kPrivateResourceOptions = kCPUCacheMode | MTLResourceStorageModePrivate; constexpr MTLResourceOptions kSharedResourceOptions = kCPUCacheMode | MTLResourceStorageModeShared; struct HeapBlock; struct BufferBlock { id<MTLBuffer> buffer; size_t size; bool in_use; HeapBlock* heap; id_t buf_id; BufferBlock(size_t Size, const id<MTLBuffer> Buffer = nullptr, HeapBlock* Heap = nullptr, id_t BufID = 0) : buffer(Buffer), size(Size), in_use(false), heap(Heap), buf_id(BufID) { } static bool Comparator(const BufferBlock* a, const BufferBlock* b) { return (a->size != b->size) ? a->size < b->size : (uintptr_t)a->buffer < (uintptr_t)b->buffer; } static size_t alignUp(size_t Size, size_t Alignment) { assert(((Alignment - 1) & Alignment) == 0); return ((Size + Alignment - 1) & ~(Alignment - 1)); } }; typedef bool (*BufferComparison)(const BufferBlock*, const BufferBlock*); struct BufferPool; struct HeapBlock { id<MTLHeap> heap; struct { size_t total, available; } size; BufferPool* pool; unsigned int n_buffers; HeapBlock(size_t Size, const id<MTLHeap> Heap = nullptr, BufferPool *Pool = nullptr) : heap(Heap), size({.total = Size, .available = Size}), pool(Pool), n_buffers(0) { } static MTLResourceOptions getOptions(bool SharedStorage = false) { return SharedStorage ? kSharedResourceOptions : kPrivateResourceOptions; } static id<MTLHeap> createMTLHeap(id<MTLDevice> device, size_t size, bool is_shared) { id<MTLHeap> heap = nil; MTLHeapDescriptor *d = [MTLHeapDescriptor new]; if (d) { if (size <= kMaxSmallAlloc) { d.size = kSmallHeap; } else if (size < kMinLargeAlloc) { d.size = kLargeHeap; } else { d.size = kRoundLarge * ((size + kRoundLarge - 1) / kRoundLarge); } d.storageMode = is_shared ? MTLStorageModeShared : MTLStorageModePrivate; d.cpuCacheMode = MTLCPUCacheModeDefaultCache; // this automatically handles Metal buffer access synchronizations at the // cost of slightly lower performance. d.hazardTrackingMode = MTLHazardTrackingModeTracked; d.resourceOptions = getOptions(is_shared) | (MTLHazardTrackingModeTracked << MTLResourceHazardTrackingModeShift); d.type = MTLHeapTypeAutomatic; heap = [device newHeapWithDescriptor: d]; if (heap) { [heap setPurgeableState:MTLPurgeableStateNonVolatile]; } [d release]; } return heap; } static bool Comparator(const HeapBlock* a, const HeapBlock* b) { return a->size.available < b->size.available; } static NSUInteger heapAvailableSize(id<MTLHeap> heap, size_t Alignment = vm_page_size) { return [heap maxAvailableSizeWithAlignment:Alignment]; } id<MTLBuffer> newMTLBuffer(size_t length, bool is_shared) { id<MTLBuffer> buf = [heap newBufferWithLength:length options:getOptions(is_shared)]; if (buf) { size.available = heapAvailableSize(heap); n_buffers++; } return buf; } void releaseMTLBuffer(id<MTLBuffer> buffer) { [buffer release]; size.available = heapAvailableSize(heap); n_buffers--; } void releaseMTLHeap() { TORCH_INTERNAL_ASSERT(!n_buffers); // assert if heap isn't empty [heap release]; size.available = 0; } }; typedef bool (*HeapComparison)(const HeapBlock*, const HeapBlock*); struct BufferPool { BufferPool(const id<MTLDevice> Device, bool Small, bool Shared) : device(Device), is_small(Small), is_shared(Shared), heaps(HeapBlock::Comparator), buffers(BufferBlock::Comparator) { } const id<MTLDevice> device; // small heaps have sizes of kSmallHeap, and large ones kLargeHeap const bool is_small; // private pools allocated on device memory; otherwise, shared between host/device const bool is_shared; // list of heaps ordered by their "available" (not total) memory size std::set<HeapBlock*, HeapComparison> heaps; // list of only "available" buffers in the pool (i.e., buffers not in-use) std::set<BufferBlock*, BufferComparison> buffers; }; struct AllocParams { AllocParams(size_t Alloc_Size, size_t Requested_Size, BufferPool* Pool) : search_key(Alloc_Size), pool(Pool), buffer_block(nullptr), requested_size(Requested_Size) {} size_t size() const { return search_key.size; } BufferBlock search_key; BufferPool* pool; BufferBlock* buffer_block; size_t requested_size; }; class MPSHeapAllocatorImpl { public: explicit MPSHeapAllocatorImpl() : m_device(at::mps::MPSDevice::getInstance()->device()), m_large_pool_shared(m_device, false, true), m_large_pool_private(m_device, false, false), m_small_pool_shared(m_device, true , true), m_small_pool_private(m_device, true , false), m_total_allocated_memory(0), m_max_buffer_size([m_device maxBufferLength]), m_set_fraction(false), m_enable_debug_info(false) { } // interface exposed to at::Allocator id<MTLBuffer> Malloc(size_t size, bool sharedStorage); void Free(void* ptr); void EmptyCache(); bool isSharedBuffer(void* ptr); inline id<MTLDevice> Device() const { return m_device; } void enable_debug_info() { m_enable_debug_info = true; } bool debug_info_enabled() const { return m_enable_debug_info; } void set_shared_storage_mode(bool useSharedStorage); private: const id<MTLDevice> m_device; std::mutex m_mutex; // allocated buffers by device pointer ska::flat_hash_map<void*, BufferBlock*> m_allocated_buffers; // unallocated cached buffers larger than 1 MB BufferPool m_large_pool_shared, m_large_pool_private; // unallocated cached buffers 1 MB or smaller BufferPool m_small_pool_shared, m_small_pool_private; // total memory allocated by HeapAllocator size_t m_total_allocated_memory; // max buffer size allowed by Metal size_t m_max_buffer_size; // sets a soft upper bound to limit the total allocations bool m_set_fraction; // use "PYTORCH_DEBUG_MPS_ALLOCATOR" env-var to enable debug info bool m_enable_debug_info; HeapBlock* get_free_heap(AllocParams& p); bool get_free_buffer(AllocParams& p); BufferBlock* get_allocated_buffer_block(void* ptr); bool alloc_buffer(AllocParams& p); void free_buffer(BufferBlock* buffer_block); void release_buffer(BufferBlock* buffer_block, bool remove_empty_heap = true); void release_buffers(BufferPool& pool); bool release_available_cached_buffers(const AllocParams& p); bool release_cached_buffers(); void trigger_memory_callbacks(BufferBlock* buffer_block, IMpsAllocatorCallback::EventType event); BufferPool& get_pool(size_t Size, bool useShared) { return Size <= kMaxSmallAlloc ? (useShared ? m_small_pool_shared : m_small_pool_private) : (useShared ? m_large_pool_shared : m_large_pool_private); } size_t get_allocation_size(size_t Length, bool useShared) { MTLSizeAndAlign sizeAlign = [m_device heapBufferSizeAndAlignWithLength:Length options:HeapBlock::getOptions(useShared)]; return BufferBlock::alignUp(sizeAlign.size, sizeAlign.align); } // TODO: make this configurable static size_t max_split_size() { return std::numeric_limits<size_t>::max(); } // maximum size of device memory available for allocation in current process size_t max_available_size() const { return [m_device recommendedMaxWorkingSetSize] - [m_device currentAllocatedSize]; } // TODO: make a common function to do size unit conversions in PyTorch. static std::string format_size(uint64_t size) { std::ostringstream os; os.precision(2); os << std::fixed; if (size <= 1024UL) { os << size << " bytes"; } else if (size <= 1048576UL) { os << ((float) size / 1024.0) << " KB"; } else if (size <= 1073741824UL) { os << ((float) size / 1048576.0) << " MB"; } else { os << ((float) size / 1073741824.0) << " GB"; } return os.str(); } }; } // namespace HeapAllocator } // namespace mps } // namespace at
[ "pytorchmergebot@users.noreply.github.com" ]
pytorchmergebot@users.noreply.github.com
81ce946814b199cc0140cdb7bc6cff791d4275a4
b1c317e8aeef0ce6ea5b49c590a0d640f0488bf9
/Book/Chapter 7 /Points and Lines: CP 7.1, 7.2.1, 7.2.2/UVa 587 - There's treasure everywhere!.cpp
da0537ef5595f3b1daa68f31fe8deec03b97d4aa
[]
no_license
akramsameer/Problems
e94ee6b49f8333c98f0cc60282a88f475f8a04f6
8df3ca030c9c1381388902759b6f391e25463cdf
refs/heads/master
2021-01-01T15:47:31.497082
2018-06-04T18:38:58
2018-06-04T18:38:58
97,703,981
0
1
null
null
null
null
UTF-8
C++
false
false
1,854
cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long int #define EPS 1e-9 using namespace std; #define clr(v , d) memset(v , d , sizeof v) #define sz(v) ((int)(v).size()) const int VISITED = 1; const int UNVISITED = -1; const long long OO = 1e12; const int OOI = 1e9; const double PI = acos(-1.0); typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int> vi; int xdir[] = { 1, -1, 0, 0 }; int ydir[] = { 0, 0, -1, 1 }; void file() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); #endif } string str; map<string, pair<double, double> > mp; struct point { double x, y; point() { x = y = 0.0; } point(double _x, double _y) : x(_x), y(_y) { } ; }; int tc = 1; double dist(point p1, point p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p2.y - p1.y) * (p2.y - p1.y)); } int main() { file(); mp["N"] = make_pair(0, 1), mp["S"] = make_pair(0, -1), mp["E"] = make_pair( 1, 0), mp["W"] = make_pair(-1, 0); mp["NE"] = make_pair(1 / sqrt(2),1/ sqrt(2)), mp["NW"] = make_pair(-1/sqrt(2), 1/sqrt(2)), mp["SW"] = make_pair(-1/sqrt(2), -1/sqrt(2)), mp["SE"] = make_pair(1/sqrt(2), -1/sqrt(2)); while (getline(cin, str)) { if (str[0] == 'E' && str[1] == 'N' and str[2] == 'D') break; int steps = 0; point s = point(); string key = ""; for (int i = 0; i < sz(str); i++) { if (str[i] == ',' || str[i] == '.') { pair<double, double> cur = mp[key]; s.x += steps * cur.first; s.y += steps * cur.second; key = ""; steps = 0; } else if (isdigit(str[i])) steps = (steps * 10) + (str[i] - '0'); else { key.push_back(str[i]); } } printf("Map #%d\n", tc++); printf("The treasure is located at (%.3lf,%.3lf).\n", s.x, s.y); printf("The distance to the treasure is %.3lf.\n\n", dist(point(), s)); } return 0; }
[ "akram.sameer99@gmail.com" ]
akram.sameer99@gmail.com
fe676462f002bb7ab4176dfc45dcff9483cb0867
41e7251063f265b98df8d612473068bec2465997
/include/framework/log/SMFILogAppender.h
09977a1f583da20aaa3239589a91250085d1ece8
[]
no_license
inbei/smf
fefd47a96559483aa396861fd23aca9e29e49d04
702f6a296d4db28bfeed88718d4da6d2f801023a
refs/heads/main
2023-03-16T06:38:27.542161
2020-12-17T06:09:17
2020-12-17T06:09:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
672
h
#ifndef SMF_ILOG_APPENDER_H #define SMF_ILOG_APPENDER_H #include "SMFLogPrerequisites.h" namespace surveon { namespace mf { namespace log { class IAppender { public: virtual ~IAppender(void) {} //virtual const String& getName(void) const = 0; virtual AppenderContext* getContext(void) = 0; }; class IFileAppender : public IAppender { public: virtual ~IFileAppender(void) {} //virtual const String& getFilename(void) const = 0; }; class IRollingFileAppender : public IFileAppender { public: virtual ~IRollingFileAppender(void) {} }; } // namespace log } // namespace mf } // namespace surveon #endif // SMF_ILOG_APPENDER_H
[ "younianhuang@gmail.com" ]
younianhuang@gmail.com
ca1f4e4598ecc85cbaa6033eef5b50bfaad7525e
63e3790fdea6838baf8451281baa21e47cd5c4e4
/OpenGL4/OpenGL4/Source/System/Timer.cpp
ccd1e1029c340ce18c4b40324ea81ba53a11ca3a
[]
no_license
Velktri/ModernGLFun
eb2356111fab6bd4e1707db4e8267a95c2956dd1
0772b4f4d7a397c04f46862868b476b82e9b6500
refs/heads/master
2021-01-13T16:40:32.310784
2017-12-24T10:35:01
2017-12-24T10:35:01
78,192,959
0
0
null
null
null
null
UTF-8
C++
false
false
734
cpp
#include "Timer.h" Timer::Timer() { bIsClockRunning = false; DeltaTime = 0.0f; LastFrame = 0.0f; } Timer::~Timer() { } void Timer::Start() { if (!bIsClockRunning) { TimeStart = std::chrono::high_resolution_clock::now(); bIsClockRunning = true; } } void Timer::Stop() { if (bIsClockRunning) { bIsClockRunning = false; } DeltaTime = 0; LastFrame = 0; } void Timer::Update() { if (bIsClockRunning) { TimeNow = std::chrono::high_resolution_clock::now(); float time = std::chrono::duration_cast<std::chrono::duration<float>>(TimeNow - TimeStart).count(); DeltaTime = time - LastFrame; LastFrame = time; } } GLfloat Timer::GetDeltaTime() { return DeltaTime; } GLfloat Timer::GetTime() { return LastFrame; }
[ "murrayg2@gmail.com" ]
murrayg2@gmail.com
560786e3b49988ce07ff94e8ebf7b4d4381d9f9f
73602f288599dd105b544b3ea7b4af02cf161623
/deps/lld/COFF/Writer.h
21be1be6e92a5a0018318d5cb5e14909a75e8749
[ "MIT", "NCSA", "LicenseRef-scancode-free-unknown" ]
permissive
mdsteele/zig
530795a84d3495c8d8a5810672049c6379186b53
53b18b079189cce355767ce4fde4fc586f0d3248
refs/heads/master
2020-03-24T19:55:18.174466
2018-08-18T00:15:39
2018-08-18T00:15:39
142,950,461
0
0
MIT
2018-08-04T18:38:52
2018-07-31T02:13:53
C++
UTF-8
C++
false
false
2,401
h
//===- Writer.h -------------------------------------------------*- C++ -*-===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_COFF_WRITER_H #define LLD_COFF_WRITER_H #include "Chunks.h" #include "llvm/ADT/StringRef.h" #include "llvm/Object/COFF.h" #include <cstdint> #include <vector> namespace lld { namespace coff { static const int PageSize = 4096; void writeResult(); // OutputSection represents a section in an output file. It's a // container of chunks. OutputSection and Chunk are 1:N relationship. // Chunks cannot belong to more than one OutputSections. The writer // creates multiple OutputSections and assign them unique, // non-overlapping file offsets and RVAs. class OutputSection { public: OutputSection(llvm::StringRef N) : Name(N), Header({}) {} void setRVA(uint64_t); void setFileOffset(uint64_t); void addChunk(Chunk *C); llvm::StringRef getName() { return Name; } ArrayRef<Chunk *> getChunks() { return Chunks; } void addPermissions(uint32_t C); void setPermissions(uint32_t C); uint32_t getPermissions() { return Header.Characteristics & PermMask; } uint32_t getCharacteristics() { return Header.Characteristics; } uint64_t getRVA() { return Header.VirtualAddress; } uint64_t getFileOff() { return Header.PointerToRawData; } void writeHeaderTo(uint8_t *Buf); // Returns the size of this section in an executable memory image. // This may be smaller than the raw size (the raw size is multiple // of disk sector size, so there may be padding at end), or may be // larger (if that's the case, the loader reserves spaces after end // of raw data). uint64_t getVirtualSize() { return Header.VirtualSize; } // Returns the size of the section in the output file. uint64_t getRawSize() { return Header.SizeOfRawData; } // Set offset into the string table storing this section name. // Used only when the name is longer than 8 bytes. void setStringTableOff(uint32_t V) { StringTableOff = V; } // N.B. The section index is one based. uint32_t SectionIndex = 0; private: llvm::StringRef Name; llvm::object::coff_section Header; uint32_t StringTableOff = 0; std::vector<Chunk *> Chunks; }; } } #endif
[ "superjoe30@gmail.com" ]
superjoe30@gmail.com
912582a2fefcfa1dc34c28211254762f5181679c
cfcdc526fef660f71cdb84e12e20efbeee623584
/src/simulator.cpp
6eb4f12f233e711c7e5e52f8d493dd52702af438
[]
no_license
dragon12/simulator
b770aec8a45d18df7b2488797309249ddca9b0fb
601424ebe6281a6bca02529f3e6d5814b13fe86b
refs/heads/master
2020-05-17T06:49:59.986247
2014-07-23T05:46:23
2014-07-23T05:46:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
447
cpp
//============================================================================ // Name : feedhandler.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! return 0; }
[ "gerard0sweeney@gmail.com" ]
gerard0sweeney@gmail.com
36eff11ed6c7a53aac56fe33051da06fb3fc4c13
70edb4f46d89276f678a994bd009f3ce13de04eb
/thirdparty/JavaScriptCore/JSWeakObjectMapRefPrivate.cpp
d2c537a8a0141b22dd34bf8984a39c630e9ebf46
[ "MIT" ]
permissive
erickzhao/neutralinojs
f31f2b0d931f2cb62c166571a736765871d4a31b
654644f65ff865ef1c9ff41608c02410ac4e9ed2
refs/heads/master
2020-09-16T13:35:18.529180
2019-11-25T01:46:29
2019-11-25T01:46:29
223,785,447
1
0
MIT
2019-11-24T17:50:44
2019-11-24T17:48:33
C++
UTF-8
C++
false
false
3,453
cpp
/* * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include "JSWeakObjectMapRefPrivate.h" #include "APICast.h" #include "JSCJSValue.h" #include "JSCallbackObject.h" #include "JSWeakObjectMapRefInternal.h" #include "JSCInlines.h" #include "Weak.h" #include "WeakGCMapInlines.h" using namespace JSC; #ifdef __cplusplus extern "C" { #endif JSWeakObjectMapRef JSWeakObjectMapCreate(JSContextRef context, void* privateData, JSWeakMapDestroyedCallback callback) { JSGlobalObject* globalObject = toJS(context); VM& vm = globalObject->vm(); JSLockHolder locker(vm); auto map = OpaqueJSWeakObjectMap::create(vm, privateData, callback); globalObject->registerWeakMap(map.ptr()); return map.ptr(); } void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object) { if (!ctx) { ASSERT_NOT_REACHED(); return; } JSGlobalObject* globalObject = toJS(ctx); VM& vm = globalObject->vm(); JSLockHolder locker(vm); JSObject* obj = toJS(object); if (!obj) return; ASSERT(obj->inherits<JSProxy>(vm) || obj->inherits<JSCallbackObject<JSGlobalObject>>(vm) || obj->inherits<JSCallbackObject<JSDestructibleObject>>(vm)); map->map().set(key, obj); } JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key) { if (!ctx) { ASSERT_NOT_REACHED(); return 0; } JSGlobalObject* globalObject = toJS(ctx); JSLockHolder locker(globalObject); return toRef(jsCast<JSObject*>(map->map().get(key))); } void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key) { if (!ctx) { ASSERT_NOT_REACHED(); return; } JSGlobalObject* globalObject = toJS(ctx); JSLockHolder locker(globalObject); map->map().remove(key); } // We need to keep this function in the build to keep the nightlies running. JS_EXPORT bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef); bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef) { return true; } #ifdef __cplusplus } #endif
[ "erick@hotmail.ca" ]
erick@hotmail.ca
a5dccb060c53ef6b32d4d3ed6184278b015424d5
cbd56acc174f049cc1e5278b4c33732dd02cc6d7
/src/miner.cpp
75d06d1163549196acce9dfddff2d4518cf7da08
[ "MIT" ]
permissive
TeleBETteam/TeleBET
859887a03ba3fb450f87e815d1a534e001732c71
208e086b3799fbcb0ccc2dbd9b446737cd51f87a
refs/heads/master
2021-01-17T14:00:35.221880
2015-05-11T09:15:52
2015-05-11T09:15:52
35,366,500
0
0
null
null
null
null
UTF-8
C++
false
false
19,773
cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2013 The NovaCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "txdb.h" #include "miner.h" #include "kernel.h" using namespace std; ////////////////////////////////////////////////////////////////////////////// // // BitcoinMiner // extern unsigned int nMinerSleep; int static FormatHashBlocks(void* pbuffer, unsigned int len) { unsigned char* pdata = (unsigned char*)pbuffer; unsigned int blocks = 1 + ((len + 8) / 64); unsigned char* pend = pdata + 64 * blocks; memset(pdata + len, 0, 64 * blocks - len); pdata[len] = 0x80; unsigned int bits = len * 8; pend[-1] = (bits >> 0) & 0xff; pend[-2] = (bits >> 8) & 0xff; pend[-3] = (bits >> 16) & 0xff; pend[-4] = (bits >> 24) & 0xff; return blocks; } static const unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; void SHA256Transform(void* pstate, void* pinput, const void* pinit) { SHA256_CTX ctx; unsigned char data[64]; SHA256_Init(&ctx); for (int i = 0; i < 16; i++) ((uint32_t*)data)[i] = ByteReverse(((uint32_t*)pinput)[i]); for (int i = 0; i < 8; i++) ctx.h[i] = ((uint32_t*)pinit)[i]; SHA256_Update(&ctx, data, sizeof(data)); for (int i = 0; i < 8; i++) ((uint32_t*)pstate)[i] = ctx.h[i]; } // Some explaining would be appreciated class COrphan { public: CTransaction* ptx; set<uint256> setDependsOn; double dPriority; double dFeePerKb; COrphan(CTransaction* ptxIn) { ptx = ptxIn; dPriority = dFeePerKb = 0; } }; uint64_t nLastBlockTx = 0; uint64_t nLastBlockSize = 0; int64_t nLastCoinStakeSearchInterval = 0; // We want to sort transactions by priority and fee, so: typedef boost::tuple<double, double, CTransaction*> TxPriority; class TxPriorityCompare { bool byFee; public: TxPriorityCompare(bool _byFee) : byFee(_byFee) { } bool operator()(const TxPriority& a, const TxPriority& b) { if (byFee) { if (a.get<1>() == b.get<1>()) return a.get<0>() < b.get<0>(); return a.get<1>() < b.get<1>(); } else { if (a.get<0>() == b.get<0>()) return a.get<1>() < b.get<1>(); return a.get<0>() < b.get<0>(); } } }; // CreateNewBlock: create new block (without proof-of-work/proof-of-stake) CBlock* CreateNewBlock(CReserveKey& reservekey, bool fProofOfStake, int64_t* pFees) { // Create new block auto_ptr<CBlock> pblock(new CBlock()); if (!pblock.get()) return NULL; CBlockIndex* pindexPrev = pindexBest; int nHeight = pindexPrev->nHeight + 1; // Create coinbase tx CTransaction txNew; txNew.vin.resize(1); txNew.vin[0].prevout.SetNull(); txNew.vout.resize(1); if (!fProofOfStake) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; txNew.vout[0].scriptPubKey.SetDestination(pubkey.GetID()); } else { // Height first in coinbase required for block.version=2 txNew.vin[0].scriptSig = (CScript() << nHeight) + COINBASE_FLAGS; assert(txNew.vin[0].scriptSig.size() <= 100); txNew.vout[0].SetEmpty(); } // Add our coinbase tx as first transaction pblock->vtx.push_back(txNew); // Largest block you're willing to create: unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2); // Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity: nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize)); // How much of the block should be dedicated to high-priority transactions, // included regardless of the fees they pay unsigned int nBlockPrioritySize = GetArg("-blockprioritysize", 27000); nBlockPrioritySize = std::min(nBlockMaxSize, nBlockPrioritySize); // Minimum block size you want to create; block will be filled with free transactions // until there are no more or the block reaches this size: unsigned int nBlockMinSize = GetArg("-blockminsize", 0); nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); // Fee-per-kilobyte amount considered the same as "free" // Be careful setting this: if you set it to zero then // a transaction spammer can cheaply fill blocks using // 1-satoshi-fee transactions. It should be set above the real // cost to you of processing a transaction. int64_t nMinTxFee = MIN_TX_FEE; if (mapArgs.count("-mintxfee")) ParseMoney(mapArgs["-mintxfee"], nMinTxFee); pblock->nBits = GetNextTargetRequired(pindexPrev, fProofOfStake); // Collect memory pool transactions into the block int64_t nFees = 0; { LOCK2(cs_main, mempool.cs); CTxDB txdb("r"); // Priority order to process transactions list<COrphan> vOrphan; // list memory doesn't move map<uint256, vector<COrphan*> > mapDependers; // This vector will be sorted into a priority queue: vector<TxPriority> vecPriority; vecPriority.reserve(mempool.mapTx.size()); for (map<uint256, CTransaction>::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi) { CTransaction& tx = (*mi).second; if (tx.IsCoinBase() || tx.IsCoinStake() || !IsFinalTx(tx, nHeight)) continue; COrphan* porphan = NULL; double dPriority = 0; int64_t nTotalIn = 0; bool fMissingInputs = false; BOOST_FOREACH(const CTxIn& txin, tx.vin) { // Read prev transaction CTransaction txPrev; CTxIndex txindex; if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex)) { // This should never happen; all transactions in the memory // pool should connect to either transactions in the chain // or other transactions in the memory pool. if (!mempool.mapTx.count(txin.prevout.hash)) { LogPrintf("ERROR: mempool transaction missing input\n"); if (fDebug) assert("mempool transaction missing input" == 0); fMissingInputs = true; if (porphan) vOrphan.pop_back(); break; } // Has to wait for dependencies if (!porphan) { // Use list for automatic deletion vOrphan.push_back(COrphan(&tx)); porphan = &vOrphan.back(); } mapDependers[txin.prevout.hash].push_back(porphan); porphan->setDependsOn.insert(txin.prevout.hash); nTotalIn += mempool.mapTx[txin.prevout.hash].vout[txin.prevout.n].nValue; continue; } int64_t nValueIn = txPrev.vout[txin.prevout.n].nValue; nTotalIn += nValueIn; int nConf = txindex.GetDepthInMainChain(); dPriority += (double)nValueIn * nConf; } if (fMissingInputs) continue; // Priority is sum(valuein * age) / txsize unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); dPriority /= nTxSize; // This is a more accurate fee-per-kilobyte than is used by the client code, because the // client code rounds up the size to the nearest 1K. That's good, because it gives an // incentive to create smaller transactions. double dFeePerKb = double(nTotalIn-tx.GetValueOut()) / (double(nTxSize)/1000.0); if (porphan) { porphan->dPriority = dPriority; porphan->dFeePerKb = dFeePerKb; } else vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second)); } // Collect transactions into block map<uint256, CTxIndex> mapTestPool; uint64_t nBlockSize = 1000; uint64_t nBlockTx = 0; int nBlockSigOps = 100; bool fSortedByFee = (nBlockPrioritySize <= 0); TxPriorityCompare comparer(fSortedByFee); std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); while (!vecPriority.empty()) { // Take highest priority transaction off the priority queue: double dPriority = vecPriority.front().get<0>(); double dFeePerKb = vecPriority.front().get<1>(); CTransaction& tx = *(vecPriority.front().get<2>()); std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer); vecPriority.pop_back(); // Size limits unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); if (nBlockSize + nTxSize >= nBlockMaxSize) continue; // Legacy limits on sigOps: unsigned int nTxSigOps = GetLegacySigOpCount(tx); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) continue; // Timestamp limit if (tx.nTime > GetAdjustedTime() || (fProofOfStake && tx.nTime > pblock->vtx[0].nTime)) continue; // Transaction fee int64_t nMinFee = GetMinFee(tx, nBlockSize, GMF_BLOCK); // Skip free transactions if we're past the minimum block size: if (fSortedByFee && (dFeePerKb < nMinTxFee) && (nBlockSize + nTxSize >= nBlockMinSize)) continue; // Prioritize by fee once past the priority size or we run out of high-priority // transactions: if (!fSortedByFee && ((nBlockSize + nTxSize >= nBlockPrioritySize) || (dPriority < COIN * 144 / 250))) { fSortedByFee = true; comparer = TxPriorityCompare(fSortedByFee); std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); } // Connecting shouldn't fail due to dependency on other memory pool transactions // because we're already processing them in order of dependency map<uint256, CTxIndex> mapTestPoolTmp(mapTestPool); MapPrevTx mapInputs; bool fInvalid; if (!tx.FetchInputs(txdb, mapTestPoolTmp, false, true, mapInputs, fInvalid)) continue; int64_t nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); if (nTxFees < nMinFee) continue; nTxSigOps += GetP2SHSigOpCount(tx, mapInputs); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) continue; // Note that flags: we don't want to set mempool/IsStandard() // policy here, but we still have to ensure that the block we // create only contains transactions that are valid in new blocks. if (!tx.ConnectInputs(txdb, mapInputs, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, false, true, MANDATORY_SCRIPT_VERIFY_FLAGS)) continue; mapTestPoolTmp[tx.GetHash()] = CTxIndex(CDiskTxPos(1,1,1), tx.vout.size()); swap(mapTestPool, mapTestPoolTmp); // Added pblock->vtx.push_back(tx); nBlockSize += nTxSize; ++nBlockTx; nBlockSigOps += nTxSigOps; nFees += nTxFees; if (fDebug && GetBoolArg("-printpriority", false)) { LogPrintf("priority %.1f feeperkb %.1f txid %s\n", dPriority, dFeePerKb, tx.GetHash().ToString()); } // Add transactions that depend on this one to the priority queue uint256 hash = tx.GetHash(); if (mapDependers.count(hash)) { BOOST_FOREACH(COrphan* porphan, mapDependers[hash]) { if (!porphan->setDependsOn.empty()) { porphan->setDependsOn.erase(hash); if (porphan->setDependsOn.empty()) { vecPriority.push_back(TxPriority(porphan->dPriority, porphan->dFeePerKb, porphan->ptx)); std::push_heap(vecPriority.begin(), vecPriority.end(), comparer); } } } } } nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; if (fDebug && GetBoolArg("-printpriority", false)) LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize); if (!fProofOfStake) pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(nFees); if (pFees) *pFees = nFees; // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash(); pblock->nTime = max(pindexPrev->GetPastTimeLimit()+1, pblock->GetMaxTransactionTime()); if (!fProofOfStake) pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; } return pblock.release(); } void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce) { // Update nExtraNonce static uint256 hashPrevBlock; if (hashPrevBlock != pblock->hashPrevBlock) { nExtraNonce = 0; hashPrevBlock = pblock->hashPrevBlock; } ++nExtraNonce; unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2 pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CBigNum(nExtraNonce)) + COINBASE_FLAGS; assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100); pblock->hashMerkleRoot = pblock->BuildMerkleTree(); } void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1) { // // Pre-build hash buffers // struct { struct unnamed2 { int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; unsigned int nTime; unsigned int nBits; unsigned int nNonce; } block; unsigned char pchPadding0[64]; uint256 hash1; unsigned char pchPadding1[64]; } tmp; memset(&tmp, 0, sizeof(tmp)); tmp.block.nVersion = pblock->nVersion; tmp.block.hashPrevBlock = pblock->hashPrevBlock; tmp.block.hashMerkleRoot = pblock->hashMerkleRoot; tmp.block.nTime = pblock->nTime; tmp.block.nBits = pblock->nBits; tmp.block.nNonce = pblock->nNonce; FormatHashBlocks(&tmp.block, sizeof(tmp.block)); FormatHashBlocks(&tmp.hash1, sizeof(tmp.hash1)); // Byte swap all the input buffer for (unsigned int i = 0; i < sizeof(tmp)/4; i++) ((unsigned int*)&tmp)[i] = ByteReverse(((unsigned int*)&tmp)[i]); // Precalc the first half of the first hash, which stays constant SHA256Transform(pmidstate, &tmp.block, pSHA256InitState); memcpy(pdata, &tmp.block, 128); memcpy(phash1, &tmp.hash1, 64); } bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) { uint256 hashBlock = pblock->GetHash(); uint256 hashProof = pblock->GetPoWHash(); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); if(!pblock->IsProofOfWork()) return error("CheckWork() : %s is not a proof-of-work block", hashBlock.GetHex()); if (hashProof > hashTarget) return error("CheckWork() : proof-of-work not meeting target"); //// debug print LogPrintf("CheckWork() : new proof-of-work block found \n proof hash: %s \ntarget: %s\n", hashProof.GetHex(), hashTarget.GetHex()); LogPrintf("%s\n", pblock->ToString()); LogPrintf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue)); // Found a solution { LOCK(cs_main); if (pblock->hashPrevBlock != hashBestChain) return error("CheckWork() : generated block is stale"); // Remove key from key pool reservekey.KeepKey(); // Track how many getdata requests this block gets { LOCK(wallet.cs_wallet); wallet.mapRequestCount[hashBlock] = 0; } // Process this block the same as if we had received it from another node if (!ProcessBlock(NULL, pblock)) return error("CheckWork() : ProcessBlock, block not accepted"); } return true; } bool CheckStake(CBlock* pblock, CWallet& wallet) { uint256 proofHash = 0, hashTarget = 0; uint256 hashBlock = pblock->GetHash(); if(!pblock->IsProofOfStake()) return error("CheckStake() : %s is not a proof-of-stake block", hashBlock.GetHex()); // verify hash target and signature of coinstake tx if (!CheckProofOfStake(mapBlockIndex[pblock->hashPrevBlock], pblock->vtx[1], pblock->nBits, proofHash, hashTarget)) return error("CheckStake() : proof-of-stake checking failed"); //// debug print LogPrintf("CheckStake() : new proof-of-stake block found \n hash: %s \nproofhash: %s \ntarget: %s\n", hashBlock.GetHex(), proofHash.GetHex(), hashTarget.GetHex()); LogPrintf("%s\n", pblock->ToString()); LogPrintf("out %s\n", FormatMoney(pblock->vtx[1].GetValueOut())); // Found a solution { LOCK(cs_main); if (pblock->hashPrevBlock != hashBestChain) return error("CheckStake() : generated block is stale"); // Track how many getdata requests this block gets { LOCK(wallet.cs_wallet); wallet.mapRequestCount[hashBlock] = 0; } // Process this block the same as if we had received it from another node if (!ProcessBlock(NULL, pblock)) return error("CheckStake() : ProcessBlock, block not accepted"); } return true; } void ThreadStakeMiner(CWallet *pwallet) { SetThreadPriority(THREAD_PRIORITY_LOWEST); // Make this thread recognisable as the mining thread RenameThread("telebet-miner"); CReserveKey reservekey(pwallet); bool fTryToSync = true; while (true) { while (pwallet->IsLocked()) { nLastCoinStakeSearchInterval = 0; MilliSleep(1000); } while (vNodes.empty() || IsInitialBlockDownload()) { nLastCoinStakeSearchInterval = 0; fTryToSync = true; MilliSleep(1000); } if (fTryToSync) { fTryToSync = false; if (vNodes.size() < 3 || pindexBest->GetBlockTime() < GetTime() - 10 * 60) { MilliSleep(60000); continue; } } // // Create new block // int64_t nFees; auto_ptr<CBlock> pblock(CreateNewBlock(reservekey, true, &nFees)); if (!pblock.get()) return; // Trying to sign a block if (pblock->SignBlock(*pwallet, nFees)) { SetThreadPriority(THREAD_PRIORITY_NORMAL); CheckStake(pblock.get(), *pwallet); SetThreadPriority(THREAD_PRIORITY_LOWEST); MilliSleep(500); } else MilliSleep(nMinerSleep); } }
[ "telebetteam@gmail.com" ]
telebetteam@gmail.com
2d58e519f37def3d866a61f6c910fdc407dec79b
22da562485e22d0daf62a61610fe529535d4ef87
/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_3d_auto.hpp
08d6b225d865ef8432272901cf81379bffd045dc
[]
no_license
Ginayxy/SmogHero1
bcb2592453bb6275f6f78dd91bccfbda91cc4f1a
ef53751b7e9b2082dd6c1484961dc02958faa602
refs/heads/master
2021-01-10T19:14:03.402357
2015-05-17T00:36:11
2015-05-17T00:36:11
34,706,068
1
1
null
null
null
null
UTF-8
C++
false
false
11,478
hpp
#ifndef __cocos2dx_3d_h__ #define __cocos2dx_3d_h__ #include "jsapi.h" #include "jsfriendapi.h" extern JSClass *jsb_cocos2d_Skeleton3D_class; extern JSObject *jsb_cocos2d_Skeleton3D_prototype; bool js_cocos2dx_3d_Skeleton3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Skeleton3D_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Skeleton3D(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Skeleton3D_removeAllBones(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_addBone(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getBoneByName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getRootBone(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_updateBoneMatrix(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getBoneByIndex(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getRootCount(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_getBoneCount(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skeleton3D_Skeleton3D(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Sprite3D_class; extern JSObject *jsb_cocos2d_Sprite3D_prototype; bool js_cocos2dx_3d_Sprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Sprite3D_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getLightMask(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_loadFromFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_setCullFace(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_addMesh(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_genGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getMesh(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getMeshCount(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_onAABBDirty(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getMeshByIndex(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_createNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_isForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_removeAttachNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_setLightMask(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_afterAsyncLoad(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_loadFromCache(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_initFrom(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getAttachNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getSkeleton(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_setForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_getMeshByName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3D_Sprite3D(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Sprite3DCache_class; extern JSObject *jsb_cocos2d_Sprite3DCache_prototype; bool js_cocos2dx_3d_Sprite3DCache_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Sprite3DCache_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Sprite3DCache(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Sprite3DCache_removeSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3DCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Mesh_class; extern JSObject *jsb_cocos2d_Mesh_prototype; bool js_cocos2dx_3d_Mesh_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Mesh_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getSkin(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getIndexFormat(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getVertexBuffer(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_calculateAABB(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_hasVertexAttrib(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_bindMeshCommand(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getPrimitiveType(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_getIndexBuffer(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_setVisible(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Mesh_Mesh(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Animation3D_class; extern JSObject *jsb_cocos2d_Animation3D_prototype; bool js_cocos2dx_3d_Animation3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Animation3D_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Animation3D(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Animation3D_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animation3D_init(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animation3D_getBoneCurveByName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animation3D_getDuration(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animation3D_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animation3D_Animation3D(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Animate3D_class; extern JSObject *jsb_cocos2d_Animate3D_prototype; bool js_cocos2dx_3d_Animate3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_Animate3D_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Animate3D(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Animate3D_getSpeed(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_removeFromMap(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_setWeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_initWithFrames(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_getOriginInterval(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_setSpeed(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_init(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_setOriginInterval(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_getWeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_getTransitionTime(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_setTransitionTime(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_Animate3D(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_AttachNode_class; extern JSObject *jsb_cocos2d_AttachNode_prototype; bool js_cocos2dx_3d_AttachNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_AttachNode_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_AttachNode(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_AttachNode_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_AttachNode_AttachNode(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_BillBoard_class; extern JSObject *jsb_cocos2d_BillBoard_prototype; bool js_cocos2dx_3d_BillBoard_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_3d_BillBoard_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_BillBoard(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_BillBoard_getMode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_setMode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_BillBoard(JSContext *cx, uint32_t argc, jsval *vp); #endif
[ "ginayxy@163.com" ]
ginayxy@163.com
f2062253dd1418f83c9f95962fdc3e95570ed582
187ce9d4df99208c3db0e44f3db6a3df4ce34717
/C++/209.minimum-size-subarray-sum.cpp
e89bfdef6ac55d5062ead2115068f34cc184a1c7
[]
no_license
zhoujf620/LeetCode-Practice
5098359fbebe07ffa0d13fe40236cecf80c12507
8babc83cefc6722b9845f61ef5d15edc99648cb6
refs/heads/master
2022-09-26T21:49:59.248276
2022-09-21T14:33:03
2022-09-21T14:33:03
222,195,315
0
0
null
null
null
null
UTF-8
C++
false
false
2,130
cpp
/* * @lc app=leetcode id=209 lang=cpp * * [209] Minimum Size Subarray Sum * * https://leetcode.com/problems/minimum-size-subarray-sum/description/ * * algorithms * Medium (36.50%) * Likes: 1656 * Dislikes: 91 * Total Accepted: 222.6K * Total Submissions: 609.5K * Testcase Example: '7\n[2,3,1,2,4,3]' * * Given an array of n positive integers and a positive integer s, find the * minimal length of a contiguous subarray of which the sum ≥ s. If there isn't * one, return 0 instead. * * Example:  * * * Input: s = 7, nums = [2,3,1,2,4,3] * Output: 2 * Explanation: the subarray [4,3] has the minimal length under the problem * constraint. * * Follow up: * * If you have figured out the O(n) solution, try coding another solution of * which the time complexity is O(n log n).  * */ #include<vector> #include<numeric> using namespace std; // @lc code=start class Solution { public: // int minSubArrayLen(int s, vector<int>& nums) { // int left=0, right=nums.size(); // while (left<right) { // int mid = left + (right-left)/2; // if (!isLarge(nums, s, mid)) // left = mid+1; // else // right = mid; // } // if (left==nums.size() && accumulate(nums.begin(), nums.end(), 0)<s) // return 0; // return left; // } // bool isLarge(vector<int>& nums, int s, int k) { // int sum = 0; // for (int i=0; i<k; ++i) // sum += nums[i]; // int ans = sum; // for (int i=k; i<nums.size(); ++i) { // sum += nums[i] - nums[i-k]; // ans = max(ans ,sum); // } // return ans >= s; // } int minSubArrayLen(int s, vector<int>& nums) { int sum=0, len=INT_MAX; int left=0, right=0; while (right < nums.size()) { sum += nums[right++]; while (sum>=s) { len = min(len, right-left); sum -= nums[left++]; } } return len == INT_MAX ? 0 : len; } }; // @lc code=end
[ "zhoujf620@zju.edu.cn" ]
zhoujf620@zju.edu.cn
f65e22a9a1c2b3165afa00eb3259903e16d55dff
2bc835b044f306fca1affd1c61b8650b06751756
/winhttp/v5/inc/makefile.inc
b362cbd85edac63959cba2eadb45324b2d5672e8
[]
no_license
KernelPanic-OpenSource/Win2K3_NT_inetcore
bbb2354d95a51a75ce2dfd67b18cfb6b21c94939
75f614d008bfce1ea71e4a727205f46b0de8e1c3
refs/heads/master
2023-04-04T02:55:25.139618
2021-04-14T05:25:01
2021-04-14T05:25:01
357,780,123
1
0
null
null
null
null
UTF-8
C++
false
false
63
inc
winhttp.h: winhttp.w hsplit -o winhttp.h internal.h winhttp.w
[ "polarisdp@gmail.com" ]
polarisdp@gmail.com
2cb9f7bf3b9aa7686ed6e88ade3f08cc762398e2
575731c1155e321e7b22d8373ad5876b292b0b2f
/examples/native/ios/Pods/boost-for-react-native/boost/units/base_units/metric/fermi.hpp
b2e30a0cb4c18f9ebc49b01268f4161cbc0c4222
[ "BSL-1.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Nozbe/zacs
802a84ffd47413a1687a573edda519156ca317c7
c3d455426bc7dfb83e09fdf20781c2632a205c04
refs/heads/master
2023-06-12T20:53:31.482746
2023-06-07T07:06:49
2023-06-07T07:06:49
201,777,469
432
10
MIT
2023-01-24T13:29:34
2019-08-11T14:47:50
JavaScript
UTF-8
C++
false
false
1,090
hpp
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2007-2008 Steven Watanabe // // 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) #ifndef BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED #define BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED #include <boost/units/scaled_base_unit.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/scale.hpp> #include <boost/units/base_units/si/meter.hpp> namespace boost { namespace units { namespace metric { typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<10, static_rational<-15> > > fermi_base_unit; } template<> struct base_unit_info<metric::fermi_base_unit> { static const char* name() { return("fermi"); } static const char* symbol() { return("fm"); } }; } } #endif // BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED
[ "radexpl@gmail.com" ]
radexpl@gmail.com
affe5b2eca865f658da8ea6d9a0097648e054a19
73ebcf788041071a87add04bec5b08675573b78f
/final/phylobase/src/ncl/nxsdefs.h
8117c7a0c2c59a0f7be99bd49aa31c292156b036
[]
no_license
rachan5/ECS158HW2
3c721b23f0dcf6830531ca57b75d71ef32b56919
443e21edcb3a3622a2f6ed913ee86d7bf5fdcbe3
refs/heads/master
2020-04-10T00:08:04.302301
2015-03-21T06:51:37
2015-03-21T06:51:37
30,328,120
0
0
null
null
null
null
UTF-8
C++
false
false
3,913
h
// Copyright (C) 1999-2003 Paul O. Lewis // // This file is part of NCL (Nexus Class Library) version 2.0. // // NCL is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // NCL 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 NCL; if not, write to the Free Software Foundation, Inc., // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #ifndef NCL_NXSDEFS_H #define NCL_NXSDEFS_H #include <iostream> #include <vector> #include <map> #include <set> #include <list> #include <utility> #define NCL_MAJOR_VERSION 2 #define NCL_MINOR_VERSION 1 #define NCL_NAME_AND_VERSION "NCL version 2.1.10" #define NCL_COPYRIGHT "Copyright (c) 1999-2010 by Paul O. Lewis" #define NCL_HOMEPAGEURL "http://sourceforge.net/projects/ncl" // NCL_COULD_BE_CONST is a mechanism for declaring some old (v < 2.1) functions // to be const without breaking old client code. // If you would like your code to be more const-correct, then define NCL_CONST_FUNCS // when you compile NCL and your code. This will cause several functions that // should have been declared as const to be declared that way in your code. // By default NCL_CONST_FUNCS will not be defined and these functions will not // be defined as const member functions. #if defined(NCL_CONST_FUNCS) && NCL_CONST_FUNCS # define NCL_COULD_BE_CONST const int onlyDefinedInCouldBeConst(); #else # define NCL_COULD_BE_CONST #endif #if defined(IGNORE_NXS_ASSERT) || defined(NDEBUG) # define NCL_ASSERT(expr) #else void ncl_assertion_failed(char const * expr, char const * function, char const * file, long line); # define NCL_ASSERT(expr) if (!(expr)) ncl_assertion_failed((const char *)#expr, (const char *)__FUNCTION__, __FILE__, __LINE__) #endif // Maximum number of states that can be stored; the only limitation is that this // number be less than the maximum size of an int (not likely to be a problem). // A good number for this is 76, which is 96 (the number of distinct symbols // able to be input from a standard keyboard) less 20 (the number of symbols // symbols disallowed by the NEXUS standard for use as state symbols) // #define NCL_MAX_STATES 76 typedef std::streampos file_pos; #define SUPPORT_OLD_NCL_NAMES class NxsString; typedef std::vector<bool> NxsBoolVector; typedef std::vector<char> NxsCharVector; typedef std::vector<int> NxsIntVector; typedef std::vector<unsigned> NxsUnsignedVector; typedef std::vector<NxsString> NxsStringVector; typedef std::vector<NxsStringVector> NxsAllelesVector; typedef std::set<unsigned> NxsUnsignedSet; typedef std::map< unsigned, NxsStringVector> NxsStringVectorMap; typedef std::map< NxsString, NxsString> NxsStringMap; typedef std::map< NxsString, NxsUnsignedSet> NxsUnsignedSetMap; typedef std::pair<std::string, NxsUnsignedSet> NxsPartitionGroup; typedef std::list<NxsPartitionGroup> NxsPartition; typedef std::map<std::string, NxsPartition> NxsPartitionsByName; // The following typedefs are simply for maintaining compatibility with existing code. // The names on the right are deprecated and should not be used. // typedef NxsBoolVector BoolVect; typedef NxsUnsignedSet IntSet; typedef NxsUnsignedSetMap IntSetMap; typedef NxsAllelesVector AllelesVect; typedef NxsStringVector LabelList; typedef NxsStringVector StrVec; typedef NxsStringVector vecStr; typedef NxsStringVectorMap LabelListBag; typedef NxsStringMap AssocList; class ProcessedNxsToken; typedef std::vector<ProcessedNxsToken> ProcessedNxsCommand; #endif
[ "raschan@ucdavis.edu" ]
raschan@ucdavis.edu
94f32afff9c382c498cf8399dbcdd824655b60ab
b4b6c04c65cff97e42999f7cfd2305b5c3f51cdd
/tensorpipe/channel/cuda_gdr/channel_impl.h
d6319857fbf29b8fa01e0cb5002c5179c3737fd8
[ "BSD-3-Clause" ]
permissive
Pandinosaurus/tensorpipe
84409f890083393acda38eeb38eebc82c8187cf6
6042f1a4cbce8eef997f11ed0012de137b317361
refs/heads/master
2023-07-14T22:06:26.443000
2021-08-31T10:10:51
2021-08-31T10:11:56
350,055,306
0
0
NOASSERTION
2021-08-31T14:16:07
2021-03-21T16:31:43
C++
UTF-8
C++
false
false
8,808
h
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <list> #include <memory> #include <string> #include <utility> #include <vector> #include <nop/serializer.h> #include <nop/structure.h> #include <tensorpipe/channel/channel_impl_boilerplate.h> #include <tensorpipe/common/cuda.h> #include <tensorpipe/common/cuda_buffer.h> #include <tensorpipe/common/ibv.h> #include <tensorpipe/common/state_machine.h> #include <tensorpipe/transport/context.h> namespace tensorpipe { namespace channel { namespace cuda_gdr { class ContextImpl; // Ideally we would use NOP_EXTERNAL_STRUCTURE instead of defining the following // two structs, but we tried so in D26460332 and failed because a bug in GCC 5.5 // (and probably other versions) requires every nop structure used inside a // std::vector to have an explicit non-defaulted default constructor, which is // something we cannot do with NOP_EXTERNAL_STRUCTURE and forces us to re-define // separate structs. // Replicate the IbvLib::gid struct so we can serialize it with libnop. struct NopIbvGid { uint64_t subnetPrefix; uint64_t interfaceId; NOP_STRUCTURE(NopIbvGid, subnetPrefix, interfaceId); void fromIbvGid(const IbvLib::gid& globalIdentifier) { subnetPrefix = globalIdentifier.global.subnet_prefix; interfaceId = globalIdentifier.global.interface_id; } IbvLib::gid toIbvGid() const { IbvLib::gid globalIdentifier; globalIdentifier.global.subnet_prefix = subnetPrefix; globalIdentifier.global.interface_id = interfaceId; return globalIdentifier; } }; // Replicate the IbvSetupInformation struct so we can serialize it with libnop. struct NopIbvSetupInformation { // This pointless constructor is needed to work around a bug in GCC 5.5 (and // possibly other versions). It appears to be needed in the nop types that // are used inside std::vectors. NopIbvSetupInformation() {} uint32_t localIdentifier; NopIbvGid globalIdentifier; uint32_t queuePairNumber; IbvLib::mtu maximumTransmissionUnit; uint32_t maximumMessageSize; NOP_STRUCTURE( NopIbvSetupInformation, localIdentifier, globalIdentifier, queuePairNumber, maximumTransmissionUnit, maximumMessageSize); void fromIbvSetupInformation(const IbvSetupInformation& setupInfo) { localIdentifier = setupInfo.localIdentifier; globalIdentifier.fromIbvGid(setupInfo.globalIdentifier); queuePairNumber = setupInfo.queuePairNumber; maximumTransmissionUnit = setupInfo.maximumTransmissionUnit; maximumMessageSize = setupInfo.maximumMessageSize; } IbvSetupInformation toIbvSetupInformation() const { IbvSetupInformation setupInfo; setupInfo.localIdentifier = localIdentifier; setupInfo.globalIdentifier = globalIdentifier.toIbvGid(); setupInfo.queuePairNumber = queuePairNumber; setupInfo.maximumTransmissionUnit = maximumTransmissionUnit; setupInfo.maximumMessageSize = maximumMessageSize; return setupInfo; } }; struct SendOperation { enum State { UNINITIALIZED, READING_READY_TO_RECEIVE, WAITING_FOR_CUDA_EVENT, SENDING_OVER_IB, FINISHED }; // Fields used by the state machine uint64_t sequenceNumber{0}; State state{UNINITIALIZED}; // Progress flags bool doneReadingReadyToReceive{false}; bool doneWaitingForCudaEvent{false}; uint64_t numChunksBeingSent{0}; // Arguments at creation const CudaBuffer buffer; const size_t length; const size_t localNicIdx; TSendCallback callback; // Other stuff CudaEvent event; size_t remoteNicIdx; SendOperation( CudaBuffer buffer, size_t length, TSendCallback callback, size_t localGpuIdx, size_t localNicIdx) : buffer(buffer), length(length), localNicIdx(localNicIdx), callback(std::move(callback)), event(localGpuIdx) {} }; struct RecvOperation { enum State { UNINITIALIZED, READING_DESCRIPTOR, WAITING_FOR_CUDA_EVENT, RECEIVING_OVER_IB, FINISHED }; // Fields used by the state machine uint64_t sequenceNumber{0}; State state{UNINITIALIZED}; // Progress flags bool doneReadingDescriptor{false}; bool doneWaitingForCudaEvent{false}; uint64_t numChunksBeingReceived{0}; // Arguments at creation const CudaBuffer buffer; const size_t length; const size_t localNicIdx; TSendCallback callback; // Other stuff size_t remoteNicIdx; CudaEvent event; RecvOperation( CudaBuffer buffer, size_t length, TSendCallback callback, size_t deviceIdx, size_t localNicIdx) : buffer(buffer), length(length), localNicIdx(localNicIdx), callback(std::move(callback)), event(deviceIdx) {} }; // First "round" of handshake. struct HandshakeNumNics { size_t numNics; NOP_STRUCTURE(HandshakeNumNics, numNics); }; // Second "round" of handshake. struct HandshakeSetupInfo { std::vector<std::vector<NopIbvSetupInformation>> setupInfo; NOP_STRUCTURE(HandshakeSetupInfo, setupInfo); }; // From sender to receiver (through pipe). struct Descriptor { size_t originNicIdx; NOP_STRUCTURE(Descriptor, originNicIdx); }; // From receiver to sender (through channel's connection). struct ReadyToReceive { size_t destinationNicIdx; NOP_STRUCTURE(ReadyToReceive, destinationNicIdx); }; class ChannelImpl final : public ChannelImplBoilerplate<ContextImpl, ChannelImpl> { public: ChannelImpl( ConstructorToken token, std::shared_ptr<ContextImpl> context, std::string id, std::shared_ptr<transport::Connection> descriptorConnection, std::shared_ptr<transport::Connection> readyToReceiveConnection); protected: // Implement the entry points called by ChannelImplBoilerplate. void initImplFromLoop() override; void sendImplFromLoop( uint64_t sequenceNumber, Buffer buffer, size_t length, TSendCallback callback) override; void recvImplFromLoop( uint64_t sequenceNumber, Buffer buffer, size_t length, TRecvCallback callback) override; void handleErrorImpl() override; private: const std::shared_ptr<transport::Connection> descriptorConnection_; const std::shared_ptr<transport::Connection> readyToReceiveConnection_; enum State { INITIALIZING = 1, WAITING_FOR_HANDSHAKE_NUM_NICS, WAITING_FOR_HANDSHAKE_SETUP_INFO, ESTABLISHED, }; State state_{INITIALIZING}; std::vector<size_t> localGpuToNic_; size_t numLocalNics_{0}; size_t numRemoteNics_{0}; // This struct is used to bundle the queue pair with some additional metadata. struct QueuePair { IbvQueuePair queuePair; // The CUDA GDR channel could be asked to transmit arbitrarily large tensors // and in principle it could directly forward them to the NIC as they are. // However IB NICs have limits on the size of each message. Hence we // determine these sizes, one per queue pair (as the minimum of the local // and remote sizes) and then split our tensors in chunks of that size. uint32_t maximumMessageSize; }; std::vector<std::vector<QueuePair>> queuePairs_; OpsStateMachine<ChannelImpl, SendOperation> sendOps_{ *this, &ChannelImpl::advanceSendOperation}; using SendOpIter = decltype(sendOps_)::Iter; OpsStateMachine<ChannelImpl, RecvOperation> recvOps_{ *this, &ChannelImpl::advanceRecvOperation}; using RecvOpIter = decltype(recvOps_)::Iter; uint32_t numSendsInFlight_{0}; uint32_t numRecvsInFlight_{0}; // Callbacks for the initial handshake phase. void onReadHandshakeNumNics(const HandshakeNumNics& nopHandshakeNumNics); void onReadHandshakeSetupInfo( const HandshakeSetupInfo& nopHandshakeSetupInfo); // Cleanup methods for teardown. void tryCleanup(); void cleanup(); // State machines for send and recv ops. void advanceSendOperation( SendOpIter opIter, SendOperation::State prevOpState); void advanceRecvOperation( RecvOpIter opIter, RecvOperation::State prevOpState); // Actions (i.e., methods that begin a state transition). // For send operations: void writeDescriptor(SendOpIter opIter); void readReadyToReceive(SendOpIter opIter); void waitForSendCudaEvent(SendOpIter opIter); void sendOverIb(SendOpIter opIter); void callSendCallback(SendOpIter opIter); // For recv operations: void readDescriptor(RecvOpIter opIter); void waitForRecvCudaEvent(RecvOpIter opIter); void recvOverIbAndWriteReadyToRecive(RecvOpIter opIter); void callRecvCallback(RecvOpIter opIter); }; } // namespace cuda_gdr } // namespace channel } // namespace tensorpipe
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
c01874d56e76a69099e83620d581147877072e87
d9cdadc24bbd62fa0ac36e2ccd07975254a71e5a
/39.Combination Sum.cpp
f30ff97dcd5224990d72669543d91fa3957b6a08
[]
no_license
GaoLF/LeetCode_THD
d2097881bd0dc41c7f1fe0fc2aca5de9f6c27f2f
ba464bc507342c483031c5bc79486fd18b5f78a9
refs/heads/master
2016-09-11T06:57:35.030031
2015-09-13T03:13:40
2015-09-13T03:13:40
42,153,341
0
0
null
null
null
null
UTF-8
C++
false
false
1,277
cpp
#include<iostream> #include<algorithm> #include<string> #include<unordered_set> #include<unordered_map> #include<math.h> #include<stack> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: vector<vector<int> > combinationSum(vector<int>& candidates, int target) { vector<vector<int> > res; vector<int> temp; sort(candidates.begin(),candidates.end()); sumHelper(candidates,target,temp,res,0); return res; } void sumHelper(vector<int>& can,int tar,vector<int> &temp,vector<vector<int> >&res,int i){ if(i >= can.size()) return; if(can[i] == tar){ temp.push_back(tar); res.push_back(temp); temp.erase(temp.end()-1); } else if(can[i] < tar){ sumHelper(can,tar,temp,res,i+1); int size = temp.size(); temp.push_back(can[i]); sumHelper(can,tar-can[i],temp,res,i); temp.erase(temp.begin()+size); } } void test(){ int A[] = {8,7,4,3}; vector<int> B(A,A+4); vector<vector<int> > res = combinationSum(B,11); for(int i = 0;i < res.size();i ++){ for(int j = 0;j < res[i].size();j ++) cout<<res[i][j]<<" "; cout<<endl; } } }; int main(){ Solution A; A.test(); system("pause"); }
[ "gaolongfei@pku.edu.cn" ]
gaolongfei@pku.edu.cn
2a49a823fb8072a49bed2c65c60b79d307e6f21b
3c65a5f203f2d4b02ff9c1bdd999c9e3b18007e7
/rpc/msgcli.cpp
a39de843cc571be7e6b0f7722ae2f7ed680db2b2
[ "BSL-1.0" ]
permissive
cristivlas/zerobugs
07c81ceec27fd1191716e52b29825087baad39e4
5f080c8645b123d7887fd8a64f60e8d226e3b1d5
refs/heads/master
2020-03-19T17:20:35.491229
2018-06-09T20:17:55
2018-06-09T20:17:55
136,754,214
0
0
null
null
null
null
UTF-8
C++
false
false
1,815
cpp
// -*- tab-width: 4; indent-tabs-mode: nil; -*- // vim: tabstop=4:softtabstop=4:expandtab:shiftwidth=4 // // $Id$ // // ------------------------------------------------------------------------- // This file is part of ZeroBugs, Copyright (c) 2010 Cristian L. Vlasceanu // // 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) // ------------------------------------------------------------------------- #include <iostream> #include <stdexcept> #include "zdk/zero.h" #include "dharma/syscall_wrap.h" #include "msg.h" using namespace std; RPC::Error::Error(const exception& e) { value<RPC::err_what>(*this) = e.what(); } RPC::Error::Error(const SystemError& e) { value<RPC::err_what>(*this) = e.what(); value<RPC::err_errno>(*this) = e.error(); } bool RPC::Error::dispatch(InputStream&, OutputStream&) { if (word_t e = value<RPC::err_errno>(*this)) { throw SystemError(e, value<RPC::err_what>(*this), false); } else { throw runtime_error(value<RPC::err_what>(*this)); } return false; } RPC::Exec::Exec(const ExecArg& args, bool, const char* const* /* env */) { value<exec_cmd>(*this) = args.command_line(); } RPC::Ptrace::Ptrace(__ptrace_request req, word_t pid, word_t addr, word_t data) { value<RPC::ptrace_req>(*this) = req; value<RPC::ptrace_pid>(*this) = pid; value<RPC::ptrace_addr>(*this) = addr; value<RPC::ptrace_data>(*this) = data; } RPC::Waitpid::Waitpid(pid_t pid, int opt) { value<wait_pid>(*this) = pid; value<wait_opt>(*this) = opt; } RPC::RemoteIO::RemoteIO(IOCommand op, const uint8_t* data, size_t size) { value<rio_op>(*this) = op; value<rio_data>(*this).assign(data, data + size); }
[ "cvlasceanu@tableau.com" ]
cvlasceanu@tableau.com
696530ecb61aec701a00bf6f1a5532a8f90835e4
1c8856bd66702198a6748e19f61671e43c3d5076
/src/Models/SortedAddressBookModel.h
8647f931380bd7e46e22b8220f1496b58f360db8
[]
no_license
Camellia73/Xcoin-GUI-wallet-dev
bd68f571c945f782379eafb77a63ab11b8b60f70
a13d57f0f89fab92cfc368162e07080a6d1cd7ab
refs/heads/master
2022-02-10T03:06:55.463672
2022-01-31T15:59:39
2022-01-31T15:59:39
195,107,451
1
0
null
null
null
null
UTF-8
C++
false
false
1,143
h
// Copyright (c) 2015-2017, The Bytecoin developers // // This file is part of Bytecoin. // // Xcoin is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Xcoin is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with Xcoin. If not, see <http://www.gnu.org/licenses/>. #pragma once #include <QSortFilterProxyModel> namespace WalletGui { class SortedAddressBookModel : public QSortFilterProxyModel { Q_OBJECT Q_DISABLE_COPY(SortedAddressBookModel) public: SortedAddressBookModel(QAbstractItemModel* _sourceModel, QObject* _parent); ~SortedAddressBookModel(); protected: bool lessThan(const QModelIndex& _left, const QModelIndex& _right) const override; }; }
[ "blackrosecoin@tutanota.com" ]
blackrosecoin@tutanota.com
41798191c23095938c016cd371066ffb7f023820
2452e0375b99a3226f01814c3138c8edf7b3dbd1
/光线跟踪/engine/Object.cpp
7358b98c3ea7c3cccf4e36468d7f2771c70623f8
[]
no_license
hello-choulvlv/hello-world
ac00931ab6b2e7e921e68875b1b8a918476351a7
29cdc82c847a4ecf5d6051a6bb084260cded5cc7
refs/heads/master
2021-12-29T09:40:58.368942
2021-12-15T04:45:47
2021-12-15T04:45:47
209,924,279
2
3
null
null
null
null
GB18030
C++
false
false
510
cpp
/* *@aim:引用计数实现 *&2016-4-23 */ #include "Object.h" #include<assert.h> Object::Object() { _referenceCount = 1; } Object::~Object() { assert(!_referenceCount); } // void Object::retain() { ++_referenceCount; } //ref count int Object::getReferenceCount()const { return _referenceCount; } // void Object::release() { assert(_referenceCount > 0); --_referenceCount; if (!_referenceCount) delete this; }
[ "xiaoxiong@gmail.com" ]
xiaoxiong@gmail.com
6b515bfd2ea0a072624a5f636de9735e30580483
79853ae21729ba9e4cfe11f9ab74b7947bf02c45
/Tests.cpp
4d32fa626a1b6139389e11a19288b6caa9d027b9
[]
no_license
al3ks1002/AdoptAPet
56fee9a6aa22f0c1805bff057e3b5005f275ca41
4ac0042dd332a640737832bf7e72b67e585fa246
refs/heads/master
2021-01-21T14:44:26.252156
2016-06-20T16:49:01
2016-06-20T16:49:01
58,822,387
0
0
null
null
null
null
UTF-8
C++
false
false
2,609
cpp
// // Created by alex on 20.03.2016. // #include <cassert> #include <iostream> #include "Tests.h" #include "Vector.h" #include "RepositoryAdmin.h" #include "ControllerAdmin.h" #include "RepositoryUser.h" #include "CustomException.h" void Tests::run_tests() { test_vector(); test_repository(); test_controller(); } void Tests::test_vector() { Vector<int> v(1); for (int i = 0; i < 10; i++) v.add(i); assert(v.size() == 10); for (int i = 0; i < 10; i++) assert(v[i] == i); for (int i = 0; i < 10; i++) assert(v.find(i) == i); Vector<int> w(v); assert(w.size() == 10); for (int i = 0; i < 10; i++) assert(w[i] == i); v.remove(5); assert(v.size() == 9); assert(v[5] == 6); assert(v[8] == 9); } void Tests::test_repository() { RepositoryAdmin v; Dog d1{1, "Pitbull", "Rex", "link1"}; Dog d2{2, "Husky", "Max", "link2"}; Dog d3{2, "Doge", "Hachi", "link3"}; Dog d4{1, "Shepard", "Derek", "link4"}; Dog d5{3, "Husky", "Min", "link5"}; v.add(d1); v.add(d2); v.add(d3); v.add(d4); v.add(d5); assert(v.get_dogs().size() == 5); try { v.add(d1); assert(false); } catch (OperationException& e) { } v.remove(d1); try { v.remove(d1); assert(false); } catch (OperationException& e) { } v.remove(d2); try { v.update(d1, d3); assert(false); } catch (OperationException& e) { } try { v.update(d3, d4); assert(false); } catch (OperationException& e) { } v.update(d3, d1); /* RepositoryUser w; w.set_list(v.get_dogs()); assert(w.get_size_list() == 3); w.add_adoption(d3); std::vector<Dog> z = w.get_adopted(); assert(z.size() == 1); assert(z[0].get_name() == "Hachi"); assert(w.get_current().get_name() == "Rex"); w.go_next(); assert(w.get_current().get_name() == "Derek"); */ } void Tests::test_controller() { RepositoryAdmin v; ControllerAdmin c{v}; c.add(1, "Pitbull", "Rex", "link1"); try { c.add(1, "Pitbull", "Rex", "link1"); assert(false); } catch (OperationException& e) { } c.remove(1, "Pitbull", "Rex"); try { c.remove(1, "Pitbull", "Rex"); assert(false); } catch (OperationException& e) { } c.add(1, "Pitbull", "Rex", "link1"); c.update(1, "Pitbull", "Rex", 2, "Husky", "Max", "link2"); try { c.update(1, "Pitbull", "Rex", 2, "Husky", "Max", "link2"); assert(false); } catch (OperationException& e) { } }
[ "al3ks1002@gmail.com" ]
al3ks1002@gmail.com
4fe633a28011c0f85188728f4b83ed10085e1b2e
e3ec7d68f544e82c6016409ce2a59a5680f19b1e
/C++/kniha/kody/kap17/17.14 peeker.cpp
197176b7172ba2a1c38fd536902e7fdef85d63a9
[]
no_license
branislavblazek/notes
429a9c3ceb142de9cfb460a0a8c1389f2313454e
e88072ff01ecba6e96d70decb5b5597755b8e925
refs/heads/master
2021-10-23T13:33:59.211385
2021-10-13T19:41:03
2021-10-13T19:41:03
239,040,112
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
787
cpp
// peeker.cpp -- některé metody z istream #include <iostream> int main() { using std::cout; using std::cin; using std::endl; // čte a zobrazuje vstup až do znaku # char ch; while(cin.get(ch)) // skončí při EOF { if (ch != '#') cout << ch; else { cin.putback(ch); // vloží znak zpět break; } } if (!cin.eof()) { cin.get(ch); cout << endl << "Dalsim vstupnim znakem je " << ch << ".\n"; } else { cout << "Konec souboru.\n"; std::exit(0); } while(cin.peek() != '#') // předem kontroluje vstupní znaky { cin.get(ch); cout << ch; } if (!cin.eof()) { cin.get(ch); cout << endl << "Dalsim vstupnim znakem je " << ch << ".\n"; } else cout << "Konec souboru.\n"; return 0; }
[ "branislav.blazek.bb@gmail.com" ]
branislav.blazek.bb@gmail.com
69ece003cdaae23756a722bee4933555cfbe2a68
a9e308c81c27a80c53c899ce806d6d7b4a9bbbf3
/engine/xray/render/core/sources/xs_descriptor.cpp
6453bac322410381d4c7bc2b1049a6e30bfcb0f8
[]
no_license
NikitaNikson/xray-2_0
00d8e78112d7b3d5ec1cb790c90f614dc732f633
82b049d2d177aac15e1317cbe281e8c167b8f8d1
refs/heads/master
2023-06-25T16:51:26.243019
2020-09-29T15:49:23
2020-09-29T15:49:23
390,966,305
1
0
null
null
null
null
UTF-8
C++
false
false
1,974
cpp
//////////////////////////////////////////////////////////////////////////// // Created : 13.04.2010 // Author : Armen Abroyan // Copyright (C) GSC Game World - 2010 //////////////////////////////////////////////////////////////////////////// #include "pch.h" #include <xray/render/core/xs_descriptor.h> namespace xray { namespace render_dx10 { template <typename shader_data> xs_descriptor <shader_data>::xs_descriptor() { } template <typename shader_data> void xs_descriptor <shader_data>::reset( res_xs_hw<shader_data> * xs_hw ) { m_hw_shader = xs_hw; if( m_hw_shader) m_shader_data = xs_hw->data(); } template<typename shader_data> bool xs_descriptor<shader_data>::set_sampler ( char const * name, res_sampler_state * state) { for( int i = 0; i< D3D_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i) { if( m_shader_data.samplers[i].name != name) continue; m_shader_data.samplers[i].state = state; return true; } return false; } template<typename shader_data> bool xs_descriptor<shader_data>::set_texture ( char const * name, res_texture * texture) { for( int i = 0; i< D3D_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++i) { if( m_shader_data.textures[i].name != name) continue; m_shader_data.textures[i].texture = texture; return true; } return false; } template<typename shader_data> bool xs_descriptor<shader_data>::use_texture ( char const * name) { for( int i = 0; i< D3D_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++i) if( m_shader_data.textures[i].name == name) return true; return false; } template<typename shader_data> bool xs_descriptor<shader_data>::use_sampler ( char const * name) { for( int i = 0; i< D3D_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i) if( m_shader_data.samplers[i].name == name) return true; return false; } // Specialization definitions template class xs_descriptor<vs_data>; template class xs_descriptor<gs_data>; template class xs_descriptor<ps_data>; } // namespace render } // namespace xray
[ "loxotron@bk.ru" ]
loxotron@bk.ru
39401419c41656a788a5c0603cb3a23819647172
8d448af63bcbc1869c5eeb01152a16a53201ef1d
/src/qq_mem/src/trie_bench.cc
2a397a225a463f0ab13024a01b693c6ead8df40a
[]
no_license
junhe/wiser
671b51d3fbf7eb8c4c96a3ed80226e5d35bedf6e
1f7a01dc96ca5bcf4594ddc8fa6360bba30a6465
refs/heads/master
2022-09-11T07:44:02.531744
2020-02-20T04:51:47
2020-02-20T04:51:47
106,583,941
10
5
null
2022-08-29T22:42:49
2017-10-11T17:03:02
Java
UTF-8
C++
false
false
2,060
cc
#include <algorithm> #include <iostream> #include <string> #include <memory> #include <thread> #include <vector> #include <climits> #include <random> #include <gperftools/profiler.h> #include <glog/logging.h> #include <gflags/gflags.h> #include "vacuum_engine.h" DEFINE_string(term_path, "", "path of the file with term and count"); class DocCountReader { public: DocCountReader(const std::string &path) :in_(path) { if (in_.good() == false) { throw std::runtime_error("File may not exist"); } } bool NextEntry(std::string &entry) { std::string line; auto &ret = std::getline(in_, line); utils::trim(line); // std::cout << "line:" << line << std::endl; if (ret) { if (line == "") { entry == ""; } else { std::vector<std::string> items = utils::explode(line, ' '); entry = items[0]; } return true; } else { return false; } } private: std::ifstream in_; }; void LoadTrie(TermTrieIndex *index, const std::string path) { DocCountReader reader(path); int cnt = 0; std::string term; while (reader.NextEntry(term)) { if (term == "") std::cout << "Skipped one empty term" << std::endl; // std::cout << "Adding '" << term << "'" << std::endl; index->Add(term, rand()); cnt++; if (cnt % 1000000 == 0) { std::cout << "Finished " << cnt << std::endl; // break; } } std::cout << "size: " << index->NumTerms() << std::endl; } int main(int argc, char **argv) { google::InitGoogleLogging(argv[0]); FLAGS_logtostderr = 1; // print to stderr instead of file FLAGS_minloglevel = 3; gflags::ParseCommandLineFlags(&argc, &argv, true); TermTrieIndex index; std::cout << "flag:" << FLAGS_term_path << std::endl; std::vector<std::string> paths = utils::explode(FLAGS_term_path, ':'); for (auto &path : paths) { std::cout << path << std::endl; LoadTrie(&index, path); } std::cout << "Final size: " << index.NumTerms() << std::endl; utils::sleep(1000); }
[ "jhe@cs.wisc.edu" ]
jhe@cs.wisc.edu
792b50054801c5519e0ead4a5347e4dae89c06ce
c1758d8320617d2358ef389412de09bc21ffd143
/demo/cocos2dx/support/zip_support/ioapi.h
98e0b2cfb33dd5aea98b178b888b78164db4b79f
[]
no_license
haxpor/ObjectAL-CppWrapper
22b925bd62a205bd9037baaec0adb969286932f6
668db061f28897f78448105328bd9d4b3d5e78e6
refs/heads/master
2021-01-10T11:36:30.074583
2015-10-30T02:26:33
2015-10-30T02:26:33
45,214,418
0
0
null
null
null
null
UTF-8
C++
false
false
6,877
h
/* ioapi.h -- IO base function header for compress/uncompress .zip part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt Changes Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. More if/def section may be needed to support other platforms Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. (but you should use iowin32.c for windows instead) */ #ifndef _ZLIBIOAPI64_H #define _ZLIBIOAPI64_H #include "platform/CCPlatformConfig.h" #if (!defined(_WIN32)) && (!defined(WIN32)) // Linux needs this to support file operation on files larger then 4+GB // But might need better if/def to select just the platforms that needs them. #ifndef __USE_FILE_OFFSET64 #define __USE_FILE_OFFSET64 #endif #ifndef __USE_LARGEFILE64 #define __USE_LARGEFILE64 #endif #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #ifndef _FILE_OFFSET_BIT #define _FILE_OFFSET_BIT 64 #endif #endif #include <stdio.h> #include <stdlib.h> #include "zconf.h" #include "zlib.h" namespace cocos2d { #if defined(USE_FILE32API) #define fopen64 fopen #define ftello64 ftell #define fseeko64 fseek #else #ifdef _MSC_VER #define fopen64 fopen #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) #define ftello64 _ftelli64 #define fseeko64 _fseeki64 #else // old MSC #define ftello64 ftell #define fseeko64 fseek #endif #endif #endif /* #ifndef ZPOS64_T #ifdef _WIN32 #define ZPOS64_T fpos_t #else #include <stdint.h> #define ZPOS64_T uint64_t #endif #endif */ #ifdef HAVE_MINIZIP64_CONF_H #include "mz64conf.h" #endif /* a type chosen by DEFINE */ #ifdef HAVE_64BIT_INT_CUSTOM typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; #else #ifdef HAS_STDINT_H #include "stdint.h" typedef uint64_t ZPOS64_T; #else #if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 ZPOS64_T; #else typedef unsigned long long int ZPOS64_T; #endif #endif #endif #define ZLIB_FILEFUNC_SEEK_CUR (1) #define ZLIB_FILEFUNC_SEEK_END (2) #define ZLIB_FILEFUNC_SEEK_SET (0) #define ZLIB_FILEFUNC_MODE_READ (1) #define ZLIB_FILEFUNC_MODE_WRITE (2) #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) #define ZLIB_FILEFUNC_MODE_EXISTING (4) #define ZLIB_FILEFUNC_MODE_CREATE (8) #ifndef ZCALLBACK #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) #define ZCALLBACK CALLBACK #else #define ZCALLBACK #endif #endif typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); /* here is the "old" 32 bits structure structure */ typedef struct zlib_filefunc_def_s { open_file_func zopen_file; read_file_func zread_file; write_file_func zwrite_file; tell_file_func ztell_file; seek_file_func zseek_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc_def; typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); typedef struct zlib_filefunc64_def_s { open64_file_func zopen64_file; read_file_func zread_file; write_file_func zwrite_file; tell64_file_func ztell64_file; seek64_file_func zseek64_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc64_def; void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); /* now internal definition, only for zip.c and unzip.h */ typedef struct zlib_filefunc64_32_def_s { zlib_filefunc64_def zfile_func64; open_file_func zopen32_file; tell_file_func ztell32_file; seek_file_func zseek32_file; } zlib_filefunc64_32_def; #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) //#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) //#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); #define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) #define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) #define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) } // end of namespace cocos2d #endif
[ "haxpor@gmail.com" ]
haxpor@gmail.com
f728dc1d105b0298e2096e600e0a4f6ff1868776
c6ecad18dd41ea69c22baf78dfeb95cf9ba547d0
/src/boost_1_42_0/libs/math/test/compile_test/sf_binomial_incl_test.cpp
ebdbdfa212ebb01a09b1da69b84fb0a817f93f43
[ "BSL-1.0" ]
permissive
neuschaefer/qnap-gpl
b1418d504ebe17d7a31a504d315edac309430fcf
7bb76f6cfe7abef08777451a75924f667cca335b
refs/heads/master
2022-08-16T17:47:37.015870
2020-05-24T18:56:05
2020-05-24T18:56:05
266,605,194
3
2
null
null
null
null
UTF-8
C++
false
false
853
cpp
// Copyright John Maddock 2006. // Use, modification and distribution are subject to 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) // // Basic sanity check that header <boost/math/special_functions/binomial.hpp> // #includes all the files that it needs to. // #include <boost/math/special_functions/binomial.hpp> // // Note this header includes no other headers, this is // important if this test is to be meaningful: // #include "test_compile_result.hpp" void check() { check_result<float>(boost::math::binomial_coefficient<float>(u, u)); check_result<double>(boost::math::binomial_coefficient<double>(u, u)); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result<long double>(boost::math::binomial_coefficient<long double>(u, u)); #endif }
[ "j.neuschaefer@gmx.net" ]
j.neuschaefer@gmx.net
f0ee302dfdbe59f3d625f341a021bda2c862e3db
30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a
/Codes/AC/3099.cpp
cf021c544e3c1f771a369a6a3533f474936bd1f3
[]
no_license
thegamer1907/Code_Analysis
0a2bb97a9fb5faf01d983c223d9715eb419b7519
48079e399321b585efc8a2c6a84c25e2e7a22a61
refs/heads/master
2020-05-27T01:20:55.921937
2019-11-20T11:15:11
2019-11-20T11:15:11
188,403,594
2
1
null
null
null
null
UTF-8
C++
false
false
428
cpp
#include<bits/stdc++.h> #define int long long int //#define endl '\n' using namespace std; int a[100007]; main() { ios::sync_with_stdio(0);cin.tie(0); int n;cin>>n; for(int i=1;i<=n;i++)cin>>a[i]; for(int i=1;i<=n;i++){ a[i]++; int t=i%n; a[i]+=(t-a[i]%n+n)%n; } int mn=2147483647,k; for(int i=1;i<=n;i++){ if(a[i]<mn){ mn=a[i]; k=i; } } cout<<k<<endl; }
[ "harshitagar1907@gmail.com" ]
harshitagar1907@gmail.com
2ea6d8d2d3abee1bda0c911fbebe44d48cb84bee
260e5dec446d12a7dd3f32e331c1fde8157e5cea
/Indi/SDK/Indi_INX2_T_10_RachelMeyer_parameters.hpp
a1dd434997286d0195a36a64d52734c649afab74
[]
no_license
jfmherokiller/TheOuterWorldsSdkDump
6e140fde4fcd1cade94ce0d7ea69f8a3f769e1c0
18a8c6b1f5d87bb1ad4334be4a9f22c52897f640
refs/heads/main
2023-08-30T09:27:17.723265
2021-09-17T00:24:52
2021-09-17T00:24:52
407,437,218
0
0
null
null
null
null
UTF-8
C++
false
false
368
hpp
#pragma once // TheOuterWorlds SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "Indi_INX2_T_10_RachelMeyer_classes.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "peterpan0413@live.com" ]
peterpan0413@live.com
af54eb26b6523028ed92864409ebb40cb24d9946
08ad85c3482baebf2918c232d58812a84da4c829
/TinyVectorExpressionInline.cxx
d12f5cc1e2729310d0b64745c7b797bc84f2c25d
[]
no_license
jafarpenot/ter
6fab7eb80a3e06b53026fa9135ad2805694dc2b8
8b43ca2e8768f83ff8108dd9fbc671e0df4e347e
refs/heads/master
2021-01-10T10:29:09.682155
2016-03-31T11:27:46
2016-03-31T11:27:46
55,145,179
0
0
null
null
null
null
UTF-8
C++
false
false
15,150
cxx
#ifndef LINALG_FILE_TINY_VECTOR_EXPRESSION_INLINE_CXX namespace linalg { //! returns the element i of expression template<class T, int m, class E> inline const T TinyVectorExpression<T, m, E>::operator()(int i) const { return static_cast<const E&>(*this)(i); } //! Constructor u-v with two expressions u and v template<class T, int m, class E1, class E2> template<class T1, class T2> inline TinyVectorDifference<T, m, E1, E2>:: TinyVectorDifference(const TinyVectorExpression<T1, m, E1>& u, const TinyVectorExpression<T2, m, E2>& v) : u_(u), v_(v) { } //! returns the i-th element of the difference template<class T, int m, class E1, class E2> inline const T TinyVectorDifference<T, m, E1, E2>::operator()(int i) const { return u_(i) - v_(i); } //! Constructor u+v with two expressions u and v template<class T, int m, class E1, class E2> template<class T1, class T2> inline TinyVectorSum<T, m, E1, E2> ::TinyVectorSum(const TinyVectorExpression<T1, m, E1>& u, const TinyVectorExpression<T2, m, E2>& v) : u_(u), v_(v) { } //! returns the i-th element of the sum template<class T, int m, class E1, class E2> inline const T TinyVectorSum<T, m, E1, E2>::operator()(int i) const { return u_(i) + v_(i); } //! Constructor u*v with two expressions u and v template<class T, int m, class E1, class E2> template<class T1, class T2> inline TinyVectorProduct<T, m, E1, E2> ::TinyVectorProduct(const TinyVectorExpression<T1, m, E1>& u, const TinyVectorExpression<T2, m, E2>& v) : u_(u), v_(v) { } //! returns the i-th element of the element-wise product template<class T, int m, class E1, class E2> inline const T TinyVectorProduct<T, m, E1, E2>::operator()(int i) const { return u_(i) * v_(i); } //! Constructor u / v with two expressions u and v template<class T, int m, class E1, class E2> template<class T1, class T2> inline TinyVectorDivision<T, m, E1, E2> ::TinyVectorDivision(const TinyVectorExpression<T1, m, E1>& u, const TinyVectorExpression<T2, m, E2>& v) : u_(u), v_(v) { } //! returns the i-th element of the element-wise division template<class T, int m, class E1, class E2> inline const T TinyVectorDivision<T, m, E1, E2>::operator()(int i) const { return u_(i) / v_(i); } //! Constructor alpha * u with a scalar alpha and an expression u template<class T, int m, class T0, class E> template<class T1> inline TinyVectorScaled<T, m, T0, E>::TinyVectorScaled(const T0& alpha, const TinyVectorExpression<T1, m, E>& u) : alpha_(alpha), u_(u) { } //! returns the i-th element of alpha*u template<class T, int m, class T0, class E> inline const T TinyVectorScaled<T, m, T0, E>::operator()(int i) const { return alpha_*u_(i); } //! Constructor alpha / u with a scalar alpha and an expression u template<class T, int m, class T0, class E> template<class T1> inline TinyVectorScalDiv<T, m, T0, E>::TinyVectorScalDiv(const T0& alpha, const TinyVectorExpression<T1, m, E>& u) : alpha_(alpha), u_(u) { } //! returns the i-th element of alpha / u template<class T, int m, class T0, class E> inline const T TinyVectorScalDiv<T, m, T0, E>::operator()(int i) const { return alpha_ / u_(i); } //! Constructor alpha + u with a scalar alpha and an expression u template<class T, int m, class T0, class E> template<class T1> inline TinyVectorScalSum<T, m, T0, E>::TinyVectorScalSum(const T0& alpha, const TinyVectorExpression<T1, m, E>& u) : alpha_(alpha), u_(u) { } //! returns the i-th element of alpha + u template<class T, int m, class T0, class E> inline const T TinyVectorScalSum<T, m, T0, E>::operator()(int i) const { return alpha_ + u_(i); } //! Constructor alpha - u with a scalar alpha and an expression u template<class T, int m, class T0, class E> template<class T1> inline TinyVectorScalDiff<T, m, T0, E>::TinyVectorScalDiff(const T0& alpha, const TinyVectorExpression<T1, m, E>& u) : alpha_(alpha), u_(u) { } //! returns the i-th element of alpha - u template<class T, int m, class T0, class E> inline const T TinyVectorScalDiff<T, m, T0, E>::operator()(int i) const { return alpha_ - u_(i); } //! Constructor -u with an expression u template<class T, int m, class E> inline TinyVectorOpposite<T, m, E>::TinyVectorOpposite(const TinyVectorExpression<T, m, E>& u) : u_(u) { } //! returns the i-th element of -u template<class T, int m, class E> inline const T TinyVectorOpposite<T, m, E>::operator()(int i) const { return -u_(i); } /************* * Operators * *************/ //! returns u+v template<class T, int m, class E1, class E2> inline const TinyVectorSum<T, m, E1, E2> operator +(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorSum<T, m, E1, E2>(u, v); } //! returns u+v template<class T, int m, class E1, class E2> inline const TinyVectorSum<complex<T>, m, E1, E2> operator +(const TinyVectorExpression<complex<T>, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorSum<complex<T>, m, E1, E2>(u, v); } //! returns u+v template<class T, int m, class E1, class E2> inline const TinyVectorSum<complex<T>, m, E1, E2> operator +(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<complex<T>, m, E2>& v) { return TinyVectorSum<complex<T>, m, E1, E2>(u, v); } //! returns u-v template<class T, int m, class E1, class E2> inline const TinyVectorDifference<T, m, E1, E2> operator -(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorDifference<T, m, E1, E2>(u, v); } //! returns u-v template<class T, int m, class E1, class E2> inline const TinyVectorDifference<complex<T>, m, E1, E2> operator -(const TinyVectorExpression<complex<T>, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorDifference<complex<T>, m, E1, E2>(u, v); } //! returns u-v template<class T, int m, class E1, class E2> inline const TinyVectorDifference<complex<T>, m, E1, E2> operator -(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<complex<T>, m, E2>& v) { return TinyVectorDifference<complex<T>, m, E1, E2>(u, v); } //! returns u*v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorProduct<T, m, E1, E2> operator *(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorProduct<T, m, E1, E2>(u, v); } //! returns u*v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorProduct<complex<T>, m, E1, E2> operator *(const TinyVectorExpression<complex<T>, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorProduct<complex<T>, m, E1, E2>(u, v); } //! returns u*v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorProduct<complex<T>, m, E1, E2> operator *(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<complex<T>, m, E2>& v) { return TinyVectorProduct<complex<T>, m, E1, E2>(u, v); } //! returns u/v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorDivision<T, m, E1, E2> operator /(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorDivision<T, m, E1, E2>(u, v); } //! returns u/v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorDivision<complex<T>, m, E1, E2> operator /(const TinyVectorExpression<complex<T>, m, E1>& u, const TinyVectorExpression<T, m, E2>& v) { return TinyVectorDivision<complex<T>, m, E1, E2>(u, v); } //! returns u/v element-wise template<class T, int m, class E1, class E2> inline const TinyVectorDivision<complex<T>, m, E1, E2> operator /(const TinyVectorExpression<T, m, E1>& u, const TinyVectorExpression<complex<T>, m, E2>& v) { return TinyVectorDivision<complex<T>, m, E1, E2>(u, v); } //! returns alpha*u template<class T, int m, class E> inline const TinyVectorScaled<T, m, T, E> operator *(const T& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScaled<T, m, T, E>(alpha, u); } //! returns alpha*u template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, complex<T>, E> operator *(const complex<T>& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScaled<complex<T>, m, complex<T>, E>(alpha, u); } //! returns alpha*u template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, T, E> operator *(const T& alpha, const TinyVectorExpression<complex<T>, m, E>& u) { return TinyVectorScaled<complex<T>, m, T, E>(alpha, u); } //! returns u*alpha template<class T, int m, class E> inline const TinyVectorScaled<T, m, T, E> operator *(const TinyVectorExpression<T, m, E>& u, const T& alpha) { return TinyVectorScaled<T, m, T, E>(alpha, u); } //! returns u*alpha template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, complex<T>, E> operator *(const TinyVectorExpression<T, m, E>& u, const complex<T>& alpha) { return TinyVectorScaled<complex<T>, m, complex<T>, E>(alpha, u); } //! returns u*alpha template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, T, E> operator *(const TinyVectorExpression<complex<T>, m, E>& u, const T& alpha) { return TinyVectorScaled<complex<T>, m, T, E>(alpha, u); } //! returns alpha / u template<class T, int m, class E> inline const TinyVectorScalDiv<T, m, T, E> operator /(const T& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalDiv<T, m, T, E>(alpha, u); } //! returns alpha / u template<class T, int m, class E> inline const TinyVectorScalDiv<complex<T>, m, complex<T>, E> operator /(const complex<T>& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalDiv<complex<T>, m, complex<T>, E>(alpha, u); } //! returns alpha / u template<class T, int m, class E> inline const TinyVectorScalDiv<complex<T>, m, T, E> operator /(const T& alpha, const TinyVectorExpression<complex<T>, m, E>& u) { return TinyVectorScalDiv<complex<T>, m, T, E>(alpha, u); } //! returns u / alpha template<class T, int m, class E> inline const TinyVectorScaled<T, m, T, E> operator /(const TinyVectorExpression<T, m, E>& u, const T& alpha) { T one(1); return TinyVectorScaled<T, m, T, E>(one/alpha, u); } //! returns u / alpha template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, complex<T>, E> operator /(const TinyVectorExpression<T, m, E>& u, const complex<T>& alpha) { T one(1); return TinyVectorScaled<complex<T>, m, complex<T>, E>(one/alpha, u); } //! returns u / alpha template<class T, int m, class E> inline const TinyVectorScaled<complex<T>, m, T, E> operator /(const TinyVectorExpression<complex<T>, m, E>& u, const T& alpha) { T one(1); return TinyVectorScaled<complex<T>, m, T, E>(one/alpha, u); } //! returns alpha + u template<class T, int m, class E> inline const TinyVectorScalSum<T, m, T, E> operator +(const T& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalSum<T, m, T, E>(alpha, u); } //! returns alpha + u template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, complex<T>, E> operator +(const complex<T>& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalSum<complex<T>, m, complex<T>, E>(alpha, u); } //! returns alpha + u template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, T, E> operator +(const T& alpha, const TinyVectorExpression<complex<T>, m, E>& u) { return TinyVectorScalSum<complex<T>, m, T, E>(alpha, u); } //! returns u + alpha template<class T, int m, class E> inline const TinyVectorScalSum<T, m, T, E> operator +(const TinyVectorExpression<T, m, E>& u, const T& alpha) { return TinyVectorScalSum<T, m, T, E>(alpha, u); } //! returns u + alpha template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, complex<T>, E> operator +(const TinyVectorExpression<T, m, E>& u, const complex<T>& alpha) { return TinyVectorScalSum<complex<T>, m, complex<T>, E>(alpha, u); } //! returns u + alpha template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, T, E> operator +(const TinyVectorExpression<complex<T>, m, E>& u, const T& alpha) { return TinyVectorScalSum<complex<T>, m, T, E>(alpha, u); } //! returns u - alpha template<class T, int m, class E> inline const TinyVectorScalSum<T, m, T, E> operator -(const TinyVectorExpression<T, m, E>& u, const T& alpha) { return TinyVectorScalSum<T, m, T, E>(-alpha, u); } //! returns u - alpha template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, complex<T>, E> operator -(const TinyVectorExpression<T, m, E>& u, const complex<T>& alpha) { return TinyVectorScalSum<complex<T>, m, complex<T>, E>(-alpha, u); } //! returns u - alpha template<class T, int m, class E> inline const TinyVectorScalSum<complex<T>, m, T, E> operator -(const TinyVectorExpression<complex<T>, m, E>& u, const T& alpha) { return TinyVectorScalSum<complex<T>, m, T, E>(-alpha, u); } //! returns alpha - u template<class T, int m, class E> inline const TinyVectorScalDiff<T, m, T, E> operator -(const T& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalDiff<T, m, T, E>(alpha, u); } //! returns alpha - u template<class T, int m, class E> inline const TinyVectorScalDiff<complex<T>, m, complex<T>, E> operator -(const complex<T>& alpha, const TinyVectorExpression<T, m, E>& u) { return TinyVectorScalDiff<complex<T>, m, complex<T>, E>(alpha, u); } //! returns alpha - u template<class T, int m, class E> inline const TinyVectorScalDiff<complex<T>, m, T, E> operator -(const T& alpha, const TinyVectorExpression<complex<T>, m, E>& u) { return TinyVectorScalDiff<complex<T>, m, T, E>(alpha, u); } //! returns -u template<class T, int m, class E> inline const TinyVectorOpposite<T, m, E> operator-(const TinyVectorExpression<T, m, E>& u) { return TinyVectorOpposite<T, m, E>(u); } } #define LINALG_FILE_TINY_VECTOR_EXPRESSION_INLINE_CXX #endif
[ "jafar.penot@gmail.com" ]
jafar.penot@gmail.com
bd39a720913f7e2ec76af352a71082153fadbb5a
7c396d8dfc29dd1815728b5b4a679c6353919c6a
/principal.h
555b26b3851dc8769e8b5d92e80dfeb5fb7a8a44
[]
no_license
joelcorrales25/Salario
ecc84d39df6a92283f1ba0d6de0ac925676ed047
71b76e3b69906baed186ee1f1fd14134134d99c9
refs/heads/main
2023-06-13T23:42:18.448608
2021-07-03T23:39:59
2021-07-03T23:39:59
382,727,068
0
0
null
null
null
null
UTF-8
C++
false
false
882
h
#ifndef PRINCIPAL_H #define PRINCIPAL_H #include "calculosalario.h" #include "acerca.h" #include <QMainWindow> #include <QDir> #include <QFileDialog> #include <QFile> #include <QTextStream> #define VERSION "1.1.0" QT_BEGIN_NAMESPACE namespace Ui { class Principal; } QT_END_NAMESPACE class Principal : public QMainWindow { Q_OBJECT public: Principal(QWidget *parent = nullptr); ~Principal(); private slots: void on_actionSalir_triggered(); void on_cmdCalc_clicked(); void on_actionCalcular_triggered(); void on_actionNuevo_triggered(); void on_actionAcerca_de_triggered(); void on_actionGuardar_triggered(); void on_actionAbrir_triggered(); private: Ui::Principal *ui; void calcular(); void borrar(); void nuevo(); void guardarArchivo(); void abrirArchivo(); CalculoSalario control; }; #endif // PRINCIPAL_H
[ "jcorralesg@est.ups.edu.ec" ]
jcorralesg@est.ups.edu.ec
61cac4417e695f8315ae90df0654a139c0d90a33
172c67be0050eebfbf6bac65d7e35093796826c9
/简单数学/反序数.cpp
d4c4d682df74010a7c2840b4eb6fcd1a35836c3e
[]
no_license
chenyur0ng/codeup
bf7015caa64fcaa59ba4726322f2fa650a7a9cdd
b323c25e0e40d1149e55b86781b9f87d913db5c3
refs/heads/master
2021-04-09T10:41:16.541321
2018-03-06T14:28:41
2018-03-06T14:28:41
125,391,208
1
0
null
2018-03-15T15:52:42
2018-03-15T15:52:41
null
UTF-8
C++
false
false
289
cpp
#include<cstdio> int main() { int a,b,c,d,n,i; for(i = 1000;i <= 1111;i++){ a = i % 10; b = (i / 10) % 10; c = (i / 100) % 10; d = i / 1000; n = a * 1000 + b * 100 + c * 10 + d; if(9 * i == n)printf("%d\n",i); } return 0; }
[ "1091261998@qq.com" ]
1091261998@qq.com
2f26cea3b22de8ca32f5eeff662c0e67396dd63c
ab9703d14c27e4a5d0d0b183ff48b98fe4d2f605
/library1/bar1.hpp
b025f279e99c0903aa19a5074afe102810ed4b32
[]
no_license
Palmik/Boost-Build-Sample-Project
c2c3cba0b26643d9689cc19b59d7e9e6856d3500
fd0cff36d7c86f562e1f1f42bca18bd4caa2243d
refs/heads/master
2020-06-11T20:45:11.621089
2011-11-28T20:50:14
2011-11-28T20:50:14
2,869,688
0
0
null
null
null
null
UTF-8
C++
false
false
97
hpp
#ifndef BAR_1_HPP #define BAR_1_HPP inline int bar1(int a, int b) { return a + b; } #endif
[ "email@palmik.net" ]
email@palmik.net
badb99a546539e5e3dce7f4bda56d14fa0a9b33a
f8e2b0c22e897eb208f84878ff7074dcc171b245
/android/audio_test/samples/parselib/src/main/cpp/wav/WavStreamReader.cpp
d1576f9560d8078d7bc2443980c7a407a9ebdf04
[]
no_license
slambang/shakey-shoes
2091a9217ed794f8a9a514e8c601b8c01d8b1965
d2d9135531d142c5e3ceef1b5ec9be1261c3c406
refs/heads/master
2022-12-19T13:31:04.684800
2020-09-16T16:15:42
2020-09-16T16:15:42
285,641,247
1
0
null
2020-09-16T16:15:43
2020-08-06T18:19:11
C++
UTF-8
C++
false
false
4,739
cpp
/* * Copyright 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <algorithm> #include <string.h> #include <android/log.h> #include "stream/InputStream.h" #include "AudioEncoding.h" #include "WavRIFFChunkHeader.h" #include "WavFmtChunkHeader.h" #include "WavChunkHeader.h" #include "WavStreamReader.h" static const char *TAG = "WavStreamReader"; namespace parselib { WavStreamReader::WavStreamReader(InputStream *stream) { mStream = stream; mWavChunk = 0; mFmtChunk = 0; mDataChunk = 0; mAudioDataStartPos = -1; mChunkMap = new std::map<RiffID, WavChunkHeader *>(); } int WavStreamReader::getSampleEncoding() { if (mFmtChunk->mEncodingId == WavFmtChunkHeader::ENCODING_PCM) { switch (mFmtChunk->mSampleSize) { case 8: return AudioEncoding::PCM_8; case 16: return AudioEncoding::PCM_16; case 24: // TODO - Support 24-bit WAV data return AudioEncoding::INVALID; // for now default: return AudioEncoding::INVALID; } } else if (mFmtChunk->mEncodingId == WavFmtChunkHeader::ENCODING_IEEE_FLOAT) { return AudioEncoding::PCM_IEEEFLOAT; } return AudioEncoding::INVALID; } void WavStreamReader::parse() { RiffID tag; while (true) { int numRead = mStream->peek(&tag, sizeof(tag)); if (numRead <= 0) { break; // done } // char *tagStr = (char *) &tag; // __android_log_print(ANDROID_LOG_INFO, TAG, "[%c%c%c%c]", // tagStr[0], tagStr[1], tagStr[2], tagStr[3]); WavChunkHeader *chunk = 0; if (tag == WavRIFFChunkHeader::RIFFID_RIFF) { chunk = mWavChunk = new WavRIFFChunkHeader(tag); mWavChunk->read(mStream); } else if (tag == WavFmtChunkHeader::RIFFID_FMT) { chunk = mFmtChunk = new WavFmtChunkHeader(tag); mFmtChunk->read(mStream); } else if (tag == WavChunkHeader::RIFFID_DATA) { chunk = mDataChunk = new WavChunkHeader(tag); mDataChunk->read(mStream); // We are now positioned at the start of the audio data. mAudioDataStartPos = mStream->getPos(); mStream->advance(mDataChunk->mChunkSize); } else { chunk = new WavChunkHeader(tag); chunk->read(mStream); mStream->advance(mDataChunk->mChunkSize); // skip the body } (*mChunkMap)[tag] = chunk; } if (mDataChunk != 0) { mStream->setPos(mAudioDataStartPos); } } // Data access void WavStreamReader::positionToAudio() { if (mDataChunk != 0) { mStream->setPos(mAudioDataStartPos); } } int WavStreamReader::getDataFloat(float *buff, int numFrames) { // __android_log_print(ANDROID_LOG_INFO, TAG, "getData(%d)", numFrames); if (mDataChunk == 0 || mFmtChunk == 0) { return 0; } int totalFramesRead = 0; int numChans = mFmtChunk->mNumChannels; int buffOffset = 0; // TODO - Manage other input formats if (mFmtChunk->mSampleSize == 16) { short *readBuff = new short[128 * numChans]; int framesLeft = numFrames; while (framesLeft > 0) { int framesThisRead = std::min(framesLeft, 128); //__android_log_print(ANDROID_LOG_INFO, TAG, "read(%d)", framesThisRead); int numFramesRead = mStream->read(readBuff, framesThisRead * sizeof(short) * numChans) / (sizeof(short) * numChans); totalFramesRead += numFramesRead; // convert for (int offset = 0; offset < numFramesRead * numChans; offset++) { buff[buffOffset++] = (float) readBuff[offset] / (float) 0x7FFF; } if (numFramesRead < framesThisRead) { break; // none left } framesLeft -= framesThisRead; } delete[] readBuff; // __android_log_print(ANDROID_LOG_INFO, TAG, " returns:%d", totalFramesRead); return totalFramesRead; } return 0; } } // namespace parselib
[ "sjmillard86@gmail.com" ]
sjmillard86@gmail.com
25b3e9f7598f58f99357750e522ed6a776f49949
87aba51b1f708b47d78b5c4180baf731d752e26d
/Replication/DataFileSystem/PRODUCT_SOURCE_CODE/itk/Modules/ThirdParty/VNL/src/vxl/vcl/emulation/vcl_list.h
2001061c0e2666d29d52881926358f480d9dcca0
[]
no_license
jstavr/Architecture-Relation-Evaluator
12c225941e9a4942e83eb6d78f778c3cf5275363
c63c056ee6737a3d90fac628f2bc50b85c6bd0dc
refs/heads/master
2020-12-31T05:10:08.774893
2016-05-14T16:09:40
2016-05-14T16:09:40
58,766,508
0
0
null
null
null
null
UTF-8
C++
false
false
20,911
h
/* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * Exception Handling: * Copyright (c) 1997 * Mark of the Unicorn, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Mark of the Unicorn makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * Adaptation: * Copyright (c) 1997 * Moscow Center for SPARC Technology * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Moscow Center for SPARC Technology makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * */ #ifndef vcl_emulation_list_h #define vcl_emulation_list_h #include <vcl_new.h> #include <vcl_cstddef.h> #include "vcl_algobase.h" #include "vcl_iterator.h" #include "vcl_alloc.h" # if defined ( __STL_USE_ABBREVS ) # define __list_iterator LIt # define __list_const_iterator LcIt # endif template <class T> struct __list_iterator; template <class T> struct __list_const_iterator; template <class T> struct __list_node { typedef void* void_pointer; void_pointer next; void_pointer prev; T data; }; template<class T> struct __list_iterator { typedef __list_iterator<T> iterator; typedef __list_const_iterator<T> const_iterator; typedef T value_type; typedef value_type* pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef vcl_size_t size_type; typedef vcl_ptrdiff_t difference_type; typedef __list_node<T>* link_type; link_type node; __list_iterator(link_type x) : node(x) {} __list_iterator() {} bool operator==(const iterator& x) const { __stl_debug_check(__check_same_owner(*this,x)); return node == x.node; } bool operator!=(const iterator& x) const { __stl_debug_check(__check_same_owner(*this,x)); return node != x.node; } reference operator*() const { __stl_verbose_assert(node!=owner(), __STL_MSG_NOT_DEREFERENCEABLE); return (*node).data; } iterator& operator++() { __stl_verbose_assert(node!=owner(), __STL_MSG_INVALID_ADVANCE); node = (link_type)((*node).next); return *this; } iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; } iterator& operator--() { node = (link_type)((*node).prev); __stl_verbose_assert(node!=owner(), __STL_MSG_INVALID_ADVANCE); return *this; } iterator operator--(int) { iterator tmp = *this; --*this; return tmp; } }; template<class T> struct __list_const_iterator { typedef __list_iterator<T> iterator; typedef __list_const_iterator<T> const_iterator; typedef T value_type; typedef value_type* pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef vcl_size_t size_type; typedef vcl_ptrdiff_t difference_type; typedef __list_node<T>* link_type; link_type node; __list_const_iterator(link_type x) : node(x) {} __list_const_iterator(const iterator& x) : node(x.node) {} __list_const_iterator() {} bool operator==(const const_iterator& x) const { __stl_debug_check(__check_same_owner(*this,x)); return node == x.node; } bool operator!=(const const_iterator& x) const { __stl_debug_check(__check_same_owner(*this,x)); return node != x.node; } const_reference operator*() const { __stl_verbose_assert(node!=owner(), __STL_MSG_NOT_DEREFERENCEABLE); return (*node).data; } const_iterator& operator++() { __stl_verbose_assert(node!=owner(), __STL_MSG_INVALID_ADVANCE); node = (link_type)((*node).next); return *this; } const_iterator operator++(int) { const_iterator tmp = *this; ++*this; return tmp; } const_iterator& operator--() { node = (link_type)((*node).prev); __stl_verbose_assert(node!=owner(), __STL_MSG_INVALID_ADVANCE); return *this; } const_iterator operator--(int) { const_iterator tmp = *this; --*this; return tmp; } }; template <class T> inline vcl_bidirectional_iterator_tag iterator_category(const __list_iterator<T>&) { return vcl_bidirectional_iterator_tag(); } template <class T> inline T* value_type(const __list_iterator<T>&) { return (T*) 0; } template <class T> inline vcl_ptrdiff_t* distance_type(const __list_iterator<T>&) { return (vcl_ptrdiff_t*) 0; } template <class T> inline vcl_bidirectional_iterator_tag iterator_category(const __list_const_iterator<T>&) { return vcl_bidirectional_iterator_tag(); } template <class T> inline T* value_type(const __list_const_iterator<T>&) { return (T*) 0; } template <class T> inline vcl_ptrdiff_t* distance_type(const __list_const_iterator<T>&) { return (vcl_ptrdiff_t*) 0; } template <class T, class Alloc> class __list_base { typedef __list_base<T,Alloc> self; typedef T value_type; typedef vcl_size_t size_type; typedef __list_node<T> list_node; typedef list_node* link_type; protected: typedef vcl_simple_alloc<list_node, Alloc> list_node_allocator; link_type node; size_type length; public: __list_base() { node = get_node(); (*node).next = node; (*node).prev = node; length=0; __stl_debug_do(iter_list.safe_init(node)); } ~__list_base() { clear(); put_node(node); __stl_debug_do(iter_list.invalidate()); } protected: link_type get_node() { return list_node_allocator::allocate(); } void put_node(link_type p) { list_node_allocator::deallocate(p); } inline void clear(); }; template <class T, class Alloc> void __list_base<T, Alloc>::clear() { link_type cur = (link_type) node->next; while (cur != node) { link_type tmp = cur; cur = (link_type) cur->next; vcl_destroy(&(tmp->data)); put_node(tmp); } __stl_debug_do(invalidate_all()); } __BEGIN_STL_FULL_NAMESPACE # define list __WORKAROUND_RENAME(list) template <class T, VCL_DFL_TYPE_PARAM_STLDECL(Alloc,vcl_alloc) > class vcl_list : protected __list_base<T, Alloc> { typedef __list_base<T, Alloc> super; typedef vcl_list<T, Alloc> self; protected: typedef void* void_pointer; public: typedef T value_type; typedef value_type* pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef __list_node<T> list_node; typedef list_node* link_type; typedef vcl_size_t size_type; typedef vcl_ptrdiff_t difference_type; typedef __list_iterator<T> iterator; typedef __list_const_iterator<T> const_iterator; typedef vcl_reverse_bidirectional_iterator<const_iterator, value_type, const_reference, difference_type> const_reverse_iterator; typedef vcl_reverse_bidirectional_iterator<iterator, value_type, reference, difference_type> reverse_iterator; protected: link_type make_node(const T& x) { link_type tmp = get_node(); IUEg__TRY { vcl_construct(&((*tmp).data), x); } # if defined ( __STL_USE_EXCEPTIONS ) catch(...) { put_node(tmp); throw; } # endif return tmp; } public: vcl_list() {} iterator begin() { return (link_type)((*node).next); } const_iterator begin() const { return (link_type)((*node).next); } iterator end() { return node; } const_iterator end() const { return node; } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } bool empty() const { return length == 0; } size_type size() const { return length; } size_type max_size() const { return size_type(-1); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(--end()); } const_reference back() const { return *(--end()); } void swap(vcl_list<T, Alloc>& x) { __stl_debug_do(iter_list.swap_owners(x.iter_list)); vcl_swap(node, x.node); vcl_swap(length, x.length); } iterator insert(iterator position, const T& x) { __stl_debug_check(__check_if_owner(node,position)); link_type tmp = make_node(x); (*tmp).next = position.node; (*tmp).prev = (*position.node).prev; (*(link_type((*position.node).prev))).next = tmp; (*position.node).prev = tmp; ++length; return tmp; } iterator insert(iterator position) { return insert(position, T()); } inline void insert(iterator position, const T* first, const T* last); inline void insert(iterator position, const_iterator first, const_iterator last); inline void insert(iterator position, size_type n, const T& x); void push_front(const T& x) { insert(begin(), x); } void push_back(const T& x) { insert(end(), x); } void erase(iterator position) { __stl_debug_check(__check_if_owner(node,position)); __stl_verbose_assert(position.node!=node, __STL_MSG_ERASE_PAST_THE_END); (*(link_type((*position.node).prev))).next = (*position.node).next; (*(link_type((*position.node).next))).prev = (*position.node).prev; vcl_destroy(&(*position.node).data); put_node(position.node); --length; __stl_debug_do(invalidate_iterator(position)); } inline void erase(iterator first, iterator last); inline void resize(size_type new_size, const T& x); void resize(size_type new_size) { resize(new_size, T()); } inline void clear(); void pop_front() { erase(begin()); } void pop_back() { iterator tmp = end(); erase(--tmp); } explicit vcl_list(size_type n, const T& value) { insert(begin(), n, value); } explicit vcl_list(size_type n) { insert(begin(), n, T()); } vcl_list(const T* first, const T* last) { insert(begin(), first, last); } vcl_list(const_iterator first, const_iterator last) { insert(begin(), first, last); } vcl_list(const self& x) { insert(begin(), x.begin(), x.end()); } ~vcl_list() {} inline self& operator=(const self& x); protected: void transfer(iterator position, iterator first, iterator last) { if (position.node != last.node) { (*(link_type((*last.node).prev))).next = position.node; (*(link_type((*first.node).prev))).next = last.node; (*(link_type((*position.node).prev))).next = first.node; link_type tmp = link_type((*position.node).prev); (*position.node).prev = (*last.node).prev; (*last.node).prev = (*first.node).prev; (*first.node).prev = tmp; } } public: void splice(iterator position, vcl_list<T, Alloc>& x) { __stl_verbose_assert(&x!=this, __STL_MSG_INVALID_ARGUMENT); __stl_debug_check(__check_if_owner(node,position)); if (!x.empty()) { transfer(position, x.begin(), x.end()); length += x.length; x.length = 0; __stl_debug_do(x.invalidate_all()); } } void splice(iterator position, vcl_list<T, Alloc>& x, iterator i) { __stl_debug_check(__check_if_owner(node,position) && __check_if_owner(x.node ,i)); __stl_verbose_assert(i.node!=i.owner(), __STL_MSG_NOT_DEREFERENCEABLE); iterator j = i; if (position == i || position == ++j) return; transfer(position, i, j); ++length; --x.length; __stl_debug_do(x.invalidate_iterator(i)); } void splice(iterator position, vcl_list<T, Alloc>& x, iterator first, iterator last) { __stl_debug_check(__check_if_owner(node, position)); __stl_verbose_assert(first.owner()==x.node && last.owner()==x.node, __STL_MSG_NOT_OWNER); if (first != last) { if (&x != this) { difference_type n = 0; vcl_distance(first, last, n); x.length -= n; length += n; } transfer(position, first, last); __stl_debug_do(x.invalidate_all()); } } inline void remove(const T& value); inline void unique(); inline void merge(vcl_list<T, Alloc>& x); inline void reverse(); inline void sort(); }; # if defined (__STL_NESTED_TYPE_PARAM_BUG) # define iterator __list_iterator<T> # define const_iterator __list_const_iterator<T> # define size_type vcl_size_t # endif template <class T, class Alloc> INLINE_LOOP void vcl_list<T, Alloc>::insert(iterator position, const T* first, const T* last) { for (; first != last; ++first) insert(position, *first); } template <class T, class Alloc> INLINE_LOOP void vcl_list<T, Alloc>::insert(iterator position, const_iterator first, const_iterator last) { for (; first != last; ++first) insert(position, *first); } template <class T, class Alloc> INLINE_LOOP void vcl_list<T, Alloc>::insert(iterator position, size_type n, const T& x) { while (n--) insert(position, x); } template <class T, class Alloc> INLINE_LOOP void vcl_list<T, Alloc>::erase(iterator first, iterator last) { while (first != last) erase(first++); } template <class T, class Alloc> void vcl_list<T, Alloc>::resize(size_type new_size, const T& x) { if (new_size < size()) { iterator f; if (new_size < size() / 2) { f = begin(); vcl_advance(f, new_size); } else { f = end(); vcl_advance(f, difference_type(size()) - difference_type(new_size)); } erase(f, end()); } else insert(end(), new_size - size(), x); } template <class T, class Alloc> void vcl_list<T, Alloc>::clear() { super::clear(); node->next = node; node->prev = node; length = 0; } template <class T, class Alloc> #ifdef __SUNPRO_CC inline #endif vcl_list<T, Alloc>& vcl_list<T, Alloc>::operator=(const vcl_list<T, Alloc>& x) { if (this != &x) { iterator first1 = begin(); iterator last1 = end(); const_iterator first2 = x.begin(); const_iterator last2 = x.end(); while (first1 != last1 && first2 != last2) *first1++ = *first2++; if (first2 == last2) erase(first1, last1); else insert(last1, first2, last2); __stl_debug_do(invalidate_all()); } return *this; } template <class T, class Alloc> void vcl_list<T, Alloc>::remove(const T& value) { iterator first = begin(); iterator last = end(); while (first != last) { iterator next = first; ++next; if (*first == value) erase(first); first = next; } } template <class T, class Alloc> void vcl_list<T, Alloc>::unique() { iterator first = begin(); iterator last = end(); if (first == last) return; iterator next = first; while (++next != last) { if (*first == *next) erase(next); else first = next; next = first; } } template <class T, class Alloc> void vcl_list<T, Alloc>::merge(vcl_list<T, Alloc>& x) { iterator first1 = begin(); iterator last1 = end(); iterator first2 = x.begin(); iterator last2 = x.end(); while (first1 != last1 && first2 != last2) if (*first2 < *first1) { iterator next = first2; transfer(first1, first2, ++next); first2 = next; } else ++first1; if (first2 != last2) transfer(last1, first2, last2); length += x.length; x.length= 0; __stl_debug_do(x.invalidate_all()); } template <class T, class Alloc> void vcl_list<T, Alloc>::reverse() { if (size() < 2) return; iterator first(begin()); for (++first; first != end();) { iterator old = first++; transfer(begin(), old, first); } __stl_debug_do(invalidate_all()); } template <class T, class Alloc> void vcl_list<T, Alloc>::sort() { if (size() < 2) return; vcl_list<T, Alloc> carry; vcl_list<T, Alloc> counter[64]; int fill = 0; while (!empty()) { carry.splice(carry.begin(), *this, begin()); int i = 0; while (i < fill && !counter[i].empty()) { counter[i].merge(carry); carry.swap(counter[i++]); } carry.swap(counter[i]); if (i == fill) ++fill; } for (int i = 1; i < fill; ++i) counter[i].merge(counter[i-1]); swap(counter[fill-1]); __stl_debug_do(invalidate_all()); } # if defined ( __STL_NESTED_TYPE_PARAM_BUG ) # undef iterator # undef const_iterator # undef size_type # endif // do a cleanup # undef vcl_list # define __list__ __FULL_NAME(vcl_list) __END_STL_FULL_NAMESPACE #if !defined ( __STL_DEFAULT_TYPE_PARAM ) // provide a "default" vcl_list adaptor template <class T> class vcl_list : public __list__<T,vcl_alloc> { typedef vcl_list<T> self; public: typedef __list__<T,vcl_alloc> super; __CONTAINER_SUPER_TYPEDEFS __IMPORT_SUPER_COPY_ASSIGNMENT(vcl_list) typedef super::link_type link_type; vcl_list() { } explicit vcl_list(size_type n, const T& value) : super(n, value) { } explicit vcl_list(size_type n) : super(n) { } vcl_list(const T* first, const T* last) : super(first, last) { } vcl_list(const_iterator first, const_iterator last) : super(first, last) { } }; # if defined (__STL_BASE_MATCH_BUG) template <class T> inline bool operator==(const vcl_list<T>& x, const vcl_list<T>& y) { typedef typename vcl_list<T>::super super; return operator == ((const super&)x,(const super&)y); } template <class T> inline bool operator<(const vcl_list<T>& x, const vcl_list<T>& y) { typedef typename vcl_list<T>::super super; return operator < ((const super&)x,(const super&)y); } # endif # endif /* __STL_DEFAULT_TYPE_PARAM */ template <class T, class Alloc> inline bool operator==(const __list__<T, Alloc>& x, const __list__<T, Alloc>& y) { return x.size() == y.size() && vcl_equal(x.begin(), x.end(), y.begin()); } template <class T, class Alloc> inline bool operator<(const __list__<T, Alloc>& x, const __list__<T, Alloc>& y) { return lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } # if defined (__STL_CLASS_PARTIAL_SPECIALIZATION ) template <class T, class Alloc> inline void vcl_swap(__list__<T,Alloc>& a, __list__<T,Alloc>& b) { a.swap(b); } # endif #endif // vcl_emulation_list_h
[ "jstavr2@gmail.com" ]
jstavr2@gmail.com
7b3891f2fdefb64f06bc449177324de0ea14dade
a3ed36263839b2c50f39773f6c8c0b8780b0ee30
/690. Employee Importance.cpp
83a721e04570400b95f9697a45db869ee0167794
[]
no_license
ysyncby/Leetcode
52c0556f509a4dc157527c160c595d4cb72899ce
775836d0d91eb08d376220796b09b401199bbcd6
refs/heads/master
2021-05-27T02:40:05.682917
2019-10-31T03:02:05
2019-10-31T03:02:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
914
cpp
/* // Employee info class Employee { public: // It's the unique ID of each node. // unique id of this employee int id; // the importance value of this employee int importance; // the id of direct subordinates vector<int> subordinates; }; */ class Solution { public: int getImportance(vector<Employee*> employees, int id) { unordered_set<int> s; unordered_map<int, int> m1; unordered_map<int, vector<int>> m2; int res = 0; queue<int> q; q.push(id); for(auto e:employees){ m1[e->id] = e->importance; m2[e->id] = e->subordinates; } while(!q.empty()){ int n = q.front(); q.pop(); res += m1[n]; auto list = m2[n]; for(int i=0;i<list.size();++i){ q.push(list[i]); } } return res; } };
[ "879090429@qq.com" ]
879090429@qq.com
1a9be1da32463432d419d0124ca537fa300b8ed9
46f53e9a564192eed2f40dc927af6448f8608d13
/components/update_client/test/url_request_post_interceptor.h
d261160f611db1b5f76437cdb9a3190714b99e34
[ "BSD-3-Clause" ]
permissive
sgraham/nope
deb2d106a090d71ae882ac1e32e7c371f42eaca9
f974e0c234388a330aab71a3e5bbf33c4dcfc33c
refs/heads/master
2022-12-21T01:44:15.776329
2015-03-23T17:25:47
2015-03-23T17:25:47
32,344,868
2
2
null
null
null
null
UTF-8
C++
false
false
5,529
h
// 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. #ifndef COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_ #define COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_ #include <stdint.h> #include <map> #include <queue> #include <string> #include <utility> #include <vector> #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" #include "url/gurl.h" namespace base { class FilePath; class SequencedTaskRunner; } namespace net { class URLRequest; } namespace update_client { // Intercepts requests to a file path, counts them, and captures the body of // the requests. Optionally, for each request, it can return a canned response // from a given file. The class maintains a queue of expectations, and returns // one and only one response for each request that matches and it is // intercepted. class URLRequestPostInterceptor { public: // Allows a generic string maching interface when setting up expectations. class RequestMatcher { public: virtual bool Match(const std::string& actual) const = 0; virtual ~RequestMatcher() {} }; // Returns the url that is intercepted. GURL GetUrl() const; // Sets an expection for the body of the POST request and optionally, // provides a canned response identified by a |file_path| to be returned when // the expectation is met. If no |file_path| is provided, then an empty // response body is served. If |response_code| is provided, then an empty // response body with that response code is returned. // Returns |true| if the expectation was set. This class takes ownership of // the |request_matcher| object. bool ExpectRequest(class RequestMatcher* request_matcher); bool ExpectRequest(class RequestMatcher* request_matcher, int response_code); bool ExpectRequest(class RequestMatcher* request_matcher, const base::FilePath& filepath); // Returns how many requests have been intercepted and matched by // an expectation. One expectation can only be matched by one request. int GetHitCount() const; // Returns how many requests in total have been captured by the interceptor. int GetCount() const; // Returns all requests that have been intercepted, matched or not. std::vector<std::string> GetRequests() const; // Returns all requests as a string for debugging purposes. std::string GetRequestsAsString() const; // Resets the state of the interceptor so that new expectations can be set. void Reset(); class Delegate; private: friend class URLRequestPostInterceptorFactory; static const int kResponseCode200 = 200; struct ExpectationResponse { ExpectationResponse(int code, const std::string& body) : response_code(code), response_body(body) {} const int response_code; const std::string response_body; }; typedef std::pair<const RequestMatcher*, ExpectationResponse> Expectation; URLRequestPostInterceptor( const GURL& url, const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); ~URLRequestPostInterceptor(); void ClearExpectations(); const GURL url_; scoped_refptr<base::SequencedTaskRunner> io_task_runner_; mutable base::Lock interceptor_lock_; mutable int hit_count_; mutable std::vector<std::string> requests_; mutable std::queue<Expectation> expectations_; DISALLOW_COPY_AND_ASSIGN(URLRequestPostInterceptor); }; class URLRequestPostInterceptorFactory { public: URLRequestPostInterceptorFactory( const std::string& scheme, const std::string& hostname, const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); ~URLRequestPostInterceptorFactory(); // Creates an interceptor object for the specified url path. Returns NULL // in case of errors or a valid interceptor object otherwise. The caller // does not own the returned object. URLRequestPostInterceptor* CreateInterceptor(const base::FilePath& filepath); private: const std::string scheme_; const std::string hostname_; scoped_refptr<base::SequencedTaskRunner> io_task_runner_; // After creation, |delegate_| lives on the IO thread and it is owned by // a URLRequestFilter after registration. A task to unregister it and // implicitly destroy it is posted from ~URLRequestPostInterceptorFactory(). URLRequestPostInterceptor::Delegate* delegate_; DISALLOW_COPY_AND_ASSIGN(URLRequestPostInterceptorFactory); }; // Intercepts HTTP POST requests sent to "localhost2". class InterceptorFactory : public URLRequestPostInterceptorFactory { public: explicit InterceptorFactory( const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); ~InterceptorFactory(); // Creates an interceptor for the url path defined by POST_INTERCEPT_PATH. URLRequestPostInterceptor* CreateInterceptor(); // Creates an interceptor for the given url path. URLRequestPostInterceptor* CreateInterceptorForPath(const char* url_path); private: DISALLOW_COPY_AND_ASSIGN(InterceptorFactory); }; class PartialMatch : public URLRequestPostInterceptor::RequestMatcher { public: explicit PartialMatch(const std::string& expected) : expected_(expected) {} bool Match(const std::string& actual) const override; private: const std::string expected_; DISALLOW_COPY_AND_ASSIGN(PartialMatch); }; } // namespace update_client #endif // COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_
[ "scottmg@chromium.org" ]
scottmg@chromium.org
33cf6ba0f68deb1fea417d00320b49d0c2521a89
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/c++/TileDB/2016/4/c_api.cc
b5bcd8d8cfc6937c36b7aa76117e29e07e5bc655
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
C++
false
false
35,844
cc
/** * @file c_api.cc * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2016 MIT and Intel Corp. * * 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. * * @section DESCRIPTION * * This file defines the C API of TileDB. */ #include "c_api.h" #include "array_schema_c.h" #include "storage_manager.h" #include <cassert> #include <cstring> #include <iostream> /* ****************************** */ /* MACROS */ /* ****************************** */ #if VERBOSE == 1 # define PRINT_ERROR(x) std::cerr << "[TileDB] Error: " << x << ".\n" #elif VERBOSE == 2 # define PRINT_ERROR(x) std::cerr << "[TileDB::c_api] Error: " << x << ".\n" #else # define PRINT_ERROR(x) do { } while(0) #endif /* ****************************** */ /* CONTEXT */ /* ****************************** */ typedef struct TileDB_CTX { StorageManager* storage_manager_; } TileDB_CTX; int tiledb_ctx_init(TileDB_CTX** tiledb_ctx, const char* config_filename) { // Check config filename length if(config_filename != NULL) { if(strlen(config_filename) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid filename length"); return TILEDB_ERR; } } // Initialize context *tiledb_ctx = (TileDB_CTX*) malloc(sizeof(struct TileDB_CTX)); if(*tiledb_ctx == NULL) { PRINT_ERROR("Cannot initialize TileDB context; Failed to allocate memory " "space for the context"); return TILEDB_ERR; } // Create storage manager (*tiledb_ctx)->storage_manager_ = new StorageManager(); if((*tiledb_ctx)->storage_manager_->init(config_filename) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_ctx_finalize(TileDB_CTX* tiledb_ctx) { // Trivial case if(tiledb_ctx == NULL) return TILEDB_OK; // Finalize storage manager int rc = TILEDB_OK; if(tiledb_ctx->storage_manager_ != NULL) rc = tiledb_ctx->storage_manager_->finalize(); // Clean up delete tiledb_ctx->storage_manager_; free(tiledb_ctx); // Return if(rc == TILEDB_SM_OK) return TILEDB_OK; else return TILEDB_ERR; } /* ****************************** */ /* SANITY CHECKS */ /* ****************************** */ bool sanity_check(const TileDB_CTX* tiledb_ctx) { if(tiledb_ctx == NULL || tiledb_ctx->storage_manager_ == NULL) { PRINT_ERROR("Invalid TileDB context"); return false; } else { return true; } } bool sanity_check(const TileDB_Array* tiledb_array) { if(tiledb_array == NULL) { PRINT_ERROR("Invalid TileDB array"); return false; } else { return true; } } bool sanity_check(const TileDB_ArrayIterator* tiledb_array_it) { if(tiledb_array_it == NULL) { PRINT_ERROR("Invalid TileDB array iterator"); return false; } else { return true; } } bool sanity_check(const TileDB_Metadata* tiledb_metadata) { if(tiledb_metadata == NULL) { PRINT_ERROR("Invalid TileDB metadata"); return false; } else { return true; } } bool sanity_check(const TileDB_MetadataIterator* tiledb_metadata_it) { if(tiledb_metadata_it == NULL) { PRINT_ERROR("Invalid TileDB metadata iterator"); return false; } else { return true; } } /* ****************************** */ /* WORKSPACE */ /* ****************************** */ int tiledb_workspace_create( const TileDB_CTX* tiledb_ctx, const char* workspace) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check workspace name length if(workspace == NULL || strlen(workspace) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid workspace name length"); return TILEDB_ERR; } // Create the workspace if(tiledb_ctx->storage_manager_->workspace_create(workspace) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } /* ****************************** */ /* GROUP */ /* ****************************** */ int tiledb_group_create( const TileDB_CTX* tiledb_ctx, const char* group) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check group name length if(group == NULL || strlen(group) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid group name length"); return TILEDB_ERR; } // Create the group if(tiledb_ctx->storage_manager_->group_create(group) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } /* ****************************** */ /* ARRAY */ /* ****************************** */ typedef struct TileDB_Array { Array* array_; const TileDB_CTX* tiledb_ctx_; } TileDB_Array; int tiledb_array_set_schema( TileDB_ArraySchema* tiledb_array_schema, const char* array_name, const char** attributes, int attribute_num, int64_t capacity, int cell_order, const int* cell_val_num, const int* compression, int dense, const char** dimensions, int dim_num, const void* domain, size_t domain_len, const void* tile_extents, size_t tile_extents_len, int tile_order, const int* types) { // Sanity check if(tiledb_array_schema == NULL) { PRINT_ERROR("Invalid array schema pointer"); return TILEDB_ERR; } // Set array name size_t array_name_len = strlen(array_name); if(array_name == NULL || array_name_len > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid array name length"); return TILEDB_ERR; } tiledb_array_schema->array_name_ = (char*) malloc(array_name_len+1); strcpy(tiledb_array_schema->array_name_, array_name); // Set attributes and number of attributes tiledb_array_schema->attribute_num_ = attribute_num; tiledb_array_schema->attributes_ = (char**) malloc(attribute_num*sizeof(char*)); for(int i=0; i<attribute_num; ++i) { size_t attribute_len = strlen(attributes[i]); if(attributes[i] == NULL || attribute_len > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid attribute name length"); return TILEDB_ERR; } tiledb_array_schema->attributes_[i] = (char*) malloc(attribute_len+1); strcpy(tiledb_array_schema->attributes_[i], attributes[i]); } // Set dimensions tiledb_array_schema->dim_num_ = dim_num; tiledb_array_schema->dimensions_ = (char**) malloc(dim_num*sizeof(char*)); for(int i=0; i<dim_num; ++i) { size_t dimension_len = strlen(dimensions[i]); if(dimensions[i] == NULL || dimension_len > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid attribute name length"); return TILEDB_ERR; } tiledb_array_schema->dimensions_[i] = (char*) malloc(dimension_len+1); strcpy(tiledb_array_schema->dimensions_[i], dimensions[i]); } // Set dense tiledb_array_schema->dense_ = dense; // Set domain tiledb_array_schema->domain_ = malloc(domain_len); memcpy(tiledb_array_schema->domain_, domain, domain_len); // Set tile extents if(tile_extents == NULL) { tiledb_array_schema->tile_extents_ = NULL; } else { tiledb_array_schema->tile_extents_ = malloc(tile_extents_len); memcpy(tiledb_array_schema->tile_extents_, tile_extents, tile_extents_len); } // Set types tiledb_array_schema->types_ = (int*) malloc((attribute_num+1)*sizeof(int)); for(int i=0; i<attribute_num+1; ++i) tiledb_array_schema->types_[i] = types[i]; // Set cell val num if(cell_val_num == NULL) { tiledb_array_schema->cell_val_num_ = NULL; } else { tiledb_array_schema->cell_val_num_ = (int*) malloc((attribute_num)*sizeof(int)); for(int i=0; i<attribute_num; ++i) { tiledb_array_schema->cell_val_num_[i] = cell_val_num[i]; } } // Set cell and tile order tiledb_array_schema->cell_order_ = cell_order; tiledb_array_schema->tile_order_ = tile_order; // Set capacity tiledb_array_schema->capacity_ = capacity; // Set compression if(compression == NULL) { tiledb_array_schema->compression_ = NULL; } else { tiledb_array_schema->compression_ = (int*) malloc((attribute_num+1)*sizeof(int)); for(int i=0; i<attribute_num+1; ++i) tiledb_array_schema->compression_[i] = compression[i]; } // Success return TILEDB_OK; } int tiledb_array_create( const TileDB_CTX* tiledb_ctx, const TileDB_ArraySchema* array_schema) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Copy array schema to a C struct ArraySchemaC array_schema_c; array_schema_c.array_name_ = array_schema->array_name_; array_schema_c.attributes_ = array_schema->attributes_; array_schema_c.attribute_num_ = array_schema->attribute_num_; array_schema_c.capacity_ = array_schema->capacity_; array_schema_c.cell_order_ = array_schema->cell_order_; array_schema_c.cell_val_num_ = array_schema->cell_val_num_; array_schema_c.compression_ = array_schema->compression_; array_schema_c.dense_ = array_schema->dense_; array_schema_c.dimensions_ = array_schema->dimensions_; array_schema_c.dim_num_ = array_schema->dim_num_; array_schema_c.domain_ = array_schema->domain_; array_schema_c.tile_extents_ = array_schema->tile_extents_; array_schema_c.tile_order_ = array_schema->tile_order_; array_schema_c.types_ = array_schema->types_; // Create the array if(tiledb_ctx->storage_manager_->array_create(&array_schema_c) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_init( const TileDB_CTX* tiledb_ctx, TileDB_Array** tiledb_array, const char* array, int mode, const void* subarray, const char** attributes, int attribute_num) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check array name length if(array == NULL || strlen(array) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid array name length"); return TILEDB_ERR; } // Allocate memory for the array struct *tiledb_array = (TileDB_Array*) malloc(sizeof(struct TileDB_Array)); // Set TileDB context (*tiledb_array)->tiledb_ctx_ = tiledb_ctx; // Init the array int rc = tiledb_ctx->storage_manager_->array_init( (*tiledb_array)->array_, array, mode, subarray, attributes, attribute_num); // Return if(rc != TILEDB_SM_OK) { free(*tiledb_array); return TILEDB_ERR; } else { return TILEDB_OK; } } int tiledb_array_reset_subarray( const TileDB_Array* tiledb_array, const void* subarray) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Reset subarray if(tiledb_array->array_->reset_subarray(subarray) != TILEDB_AR_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_reset_attributes( const TileDB_Array* tiledb_array, const char** attributes, int attribute_num) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Re-Init the array if(tiledb_array->array_->reset_attributes(attributes, attribute_num) != TILEDB_AR_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_get_schema( const TileDB_Array* tiledb_array, TileDB_ArraySchema* tiledb_array_schema) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Get the array schema ArraySchemaC array_schema_c; tiledb_array->array_->array_schema()->array_schema_export(&array_schema_c); // Copy the array schema C struct to the output tiledb_array_schema->array_name_ = array_schema_c.array_name_; tiledb_array_schema->attributes_ = array_schema_c.attributes_; tiledb_array_schema->attribute_num_ = array_schema_c.attribute_num_; tiledb_array_schema->capacity_ = array_schema_c.capacity_; tiledb_array_schema->cell_order_ = array_schema_c.cell_order_; tiledb_array_schema->cell_val_num_ = array_schema_c.cell_val_num_; tiledb_array_schema->compression_ = array_schema_c.compression_; tiledb_array_schema->dense_ = array_schema_c.dense_; tiledb_array_schema->dimensions_ = array_schema_c.dimensions_; tiledb_array_schema->dim_num_ = array_schema_c.dim_num_; tiledb_array_schema->domain_ = array_schema_c.domain_; tiledb_array_schema->tile_extents_ = array_schema_c.tile_extents_; tiledb_array_schema->tile_order_ = array_schema_c.tile_order_; tiledb_array_schema->types_ = array_schema_c.types_; // Success return TILEDB_OK; } int tiledb_array_load_schema( const TileDB_CTX* tiledb_ctx, const char* array, TileDB_ArraySchema* tiledb_array_schema) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check array name length if(array == NULL || strlen(array) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid array name length"); return TILEDB_ERR; } // Get the array schema ArraySchema* array_schema; if(tiledb_ctx->storage_manager_->array_load_schema(array, array_schema) != TILEDB_SM_OK) return TILEDB_ERR; ArraySchemaC array_schema_c; array_schema->array_schema_export(&array_schema_c); // Copy the array schema C struct to the output tiledb_array_schema->array_name_ = array_schema_c.array_name_; tiledb_array_schema->attributes_ = array_schema_c.attributes_; tiledb_array_schema->attribute_num_ = array_schema_c.attribute_num_; tiledb_array_schema->capacity_ = array_schema_c.capacity_; tiledb_array_schema->cell_order_ = array_schema_c.cell_order_; tiledb_array_schema->cell_val_num_ = array_schema_c.cell_val_num_; tiledb_array_schema->compression_ = array_schema_c.compression_; tiledb_array_schema->dense_ = array_schema_c.dense_; tiledb_array_schema->dimensions_ = array_schema_c.dimensions_; tiledb_array_schema->dim_num_ = array_schema_c.dim_num_; tiledb_array_schema->domain_ = array_schema_c.domain_; tiledb_array_schema->tile_extents_ = array_schema_c.tile_extents_; tiledb_array_schema->tile_order_ = array_schema_c.tile_order_; tiledb_array_schema->types_ = array_schema_c.types_; // Clean up delete array_schema; // Success return TILEDB_OK; } int tiledb_array_free_schema( TileDB_ArraySchema* tiledb_array_schema) { // Trivial case if(tiledb_array_schema == NULL) return TILEDB_OK; // Free array name if(tiledb_array_schema->array_name_ != NULL) free(tiledb_array_schema->array_name_); // Free attributes if(tiledb_array_schema->attributes_ != NULL) { for(int i=0; i<tiledb_array_schema->attribute_num_; ++i) if(tiledb_array_schema->attributes_[i] != NULL) free(tiledb_array_schema->attributes_[i]); free(tiledb_array_schema->attributes_); } // Free dimensions if(tiledb_array_schema->dimensions_ != NULL) { for(int i=0; i<tiledb_array_schema->dim_num_; ++i) if(tiledb_array_schema->dimensions_[i] != NULL) free(tiledb_array_schema->dimensions_[i]); free(tiledb_array_schema->dimensions_); } // Free domain if(tiledb_array_schema->domain_ != NULL) free(tiledb_array_schema->domain_); // Free tile extents if(tiledb_array_schema->tile_extents_ != NULL) free(tiledb_array_schema->tile_extents_); // Free types if(tiledb_array_schema->types_ != NULL) free(tiledb_array_schema->types_); // Free compression if(tiledb_array_schema->compression_ != NULL) free(tiledb_array_schema->compression_); // Free cell val num if(tiledb_array_schema->cell_val_num_ != NULL); free(tiledb_array_schema->cell_val_num_); // Success return TILEDB_OK; } int tiledb_array_write( const TileDB_Array* tiledb_array, const void** buffers, const size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Write if(tiledb_array->array_->write(buffers, buffer_sizes) != TILEDB_AR_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_read( const TileDB_Array* tiledb_array, void** buffers, size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Read if(tiledb_array->array_->read(buffers, buffer_sizes) != TILEDB_AR_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_overflow( const TileDB_Array* tiledb_array, int attribute_id) { // Sanity check if(!sanity_check(tiledb_array)) return TILEDB_ERR; // Check overflow return (int) tiledb_array->array_->overflow(attribute_id); } int tiledb_array_consolidate( const TileDB_CTX* tiledb_ctx, const char* array) { // Check array name length if(array == NULL || strlen(array) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid array name length"); return TILEDB_ERR; } // Consolidate if(tiledb_ctx->storage_manager_->array_consolidate(array) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_finalize(TileDB_Array* tiledb_array) { // Sanity check if(!sanity_check(tiledb_array) || !sanity_check(tiledb_array->tiledb_ctx_)) return TILEDB_ERR; // Finalize array int rc = tiledb_array->tiledb_ctx_->storage_manager_->array_finalize( tiledb_array->array_); free(tiledb_array); // Return if(rc == TILEDB_SM_OK) return TILEDB_OK; else return TILEDB_ERR; } typedef struct TileDB_ArrayIterator { ArrayIterator* array_it_; const TileDB_CTX* tiledb_ctx_; } TileDB_ArrayIterator; int tiledb_array_iterator_init( const TileDB_CTX* tiledb_ctx, TileDB_ArrayIterator** tiledb_array_it, const char* array, const void* subarray, const char** attributes, int attribute_num, void** buffers, size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Allocate memory for the array iterator struct *tiledb_array_it = (TileDB_ArrayIterator*) malloc(sizeof(struct TileDB_ArrayIterator)); // Set TileDB context (*tiledb_array_it)->tiledb_ctx_ = tiledb_ctx; // Initialize the array iterator int rc = tiledb_ctx->storage_manager_->array_iterator_init( (*tiledb_array_it)->array_it_, array, subarray, attributes, attribute_num, buffers, buffer_sizes); // Return if(rc == TILEDB_SM_OK) { return TILEDB_OK; } else { free(*tiledb_array_it); return TILEDB_ERR; } } int tiledb_array_iterator_get_value( TileDB_ArrayIterator* tiledb_array_it, int attribute_id, const void** value, size_t* value_size) { // Sanity check if(!sanity_check(tiledb_array_it)) return TILEDB_ERR; // Get value if(tiledb_array_it->array_it_->get_value( attribute_id, value, value_size) != TILEDB_AIT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_iterator_next( TileDB_ArrayIterator* tiledb_array_it) { // Sanity check if(!sanity_check(tiledb_array_it)) return TILEDB_ERR; // Advance iterator if(tiledb_array_it->array_it_->next() != TILEDB_AIT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_array_iterator_end( TileDB_ArrayIterator* tiledb_array_it) { // Sanity check if(!sanity_check(tiledb_array_it)) return TILEDB_ERR; // Check if the iterator reached the end return (int) tiledb_array_it->array_it_->end(); } int tiledb_array_iterator_finalize( TileDB_ArrayIterator* tiledb_array_it) { // Sanity check if(!sanity_check(tiledb_array_it)) return TILEDB_ERR; // Finalize array int rc = tiledb_array_it->tiledb_ctx_-> storage_manager_->array_iterator_finalize( tiledb_array_it->array_it_); free(tiledb_array_it); // Return if(rc == TILEDB_SM_OK) return TILEDB_OK; else return TILEDB_ERR; } /* ****************************** */ /* METADATA */ /* ****************************** */ typedef struct TileDB_Metadata { Metadata* metadata_; const TileDB_CTX* tiledb_ctx_; } TileDB_Metadata; int tiledb_metadata_set_schema( TileDB_MetadataSchema* tiledb_metadata_schema, const char* metadata_name, const char** attributes, int attribute_num, int64_t capacity, const int* cell_val_num, const int* compression, const int* types) { // Sanity check if(tiledb_metadata_schema == NULL) { PRINT_ERROR("Invalid metadata schema pointer"); return TILEDB_ERR; } // Set metadata name size_t metadata_name_len = strlen(metadata_name); if(metadata_name == NULL || metadata_name_len > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid metadata name length"); return TILEDB_ERR; } tiledb_metadata_schema->metadata_name_ = (char*) malloc(metadata_name_len+1); strcpy(tiledb_metadata_schema->metadata_name_, metadata_name); /* Set attributes and number of attributes. */ tiledb_metadata_schema->attribute_num_ = attribute_num; tiledb_metadata_schema->attributes_ = (char**) malloc(attribute_num*sizeof(char*)); for(int i=0; i<attribute_num; ++i) { size_t attribute_len = strlen(attributes[i]); if(attributes[i] == NULL || attribute_len > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid attribute name length"); return TILEDB_ERR; } tiledb_metadata_schema->attributes_[i] = (char*) malloc(attribute_len+1); strcpy(tiledb_metadata_schema->attributes_[i], attributes[i]); } // Set types tiledb_metadata_schema->types_ = (int*) malloc((attribute_num+1)*sizeof(int)); for(int i=0; i<attribute_num+1; ++i) tiledb_metadata_schema->types_[i] = types[i]; // Set cell val num if(cell_val_num == NULL) { tiledb_metadata_schema->cell_val_num_ = NULL; } else { tiledb_metadata_schema->cell_val_num_ = (int*) malloc((attribute_num)*sizeof(int)); for(int i=0; i<attribute_num; ++i) { tiledb_metadata_schema->cell_val_num_[i] = cell_val_num[i]; } } // Set capacity tiledb_metadata_schema->capacity_ = capacity; // Set compression if(compression == NULL) { tiledb_metadata_schema->compression_ = NULL; } else { tiledb_metadata_schema->compression_ = (int*) malloc((attribute_num+1)*sizeof(int)); for(int i=0; i<attribute_num+1; ++i) tiledb_metadata_schema->compression_[i] = compression[i]; } // Return return TILEDB_OK; } int tiledb_metadata_create( const TileDB_CTX* tiledb_ctx, const TileDB_MetadataSchema* metadata_schema) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Copy metadata schema to the proper struct MetadataSchemaC metadata_schema_c; metadata_schema_c.metadata_name_ = metadata_schema->metadata_name_; metadata_schema_c.attributes_ = metadata_schema->attributes_; metadata_schema_c.attribute_num_ = metadata_schema->attribute_num_; metadata_schema_c.capacity_ = metadata_schema->capacity_; metadata_schema_c.cell_val_num_ = metadata_schema->cell_val_num_; metadata_schema_c.compression_ = metadata_schema->compression_; metadata_schema_c.types_ = metadata_schema->types_; // Create the metadata if(tiledb_ctx->storage_manager_->metadata_create(&metadata_schema_c) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_init( const TileDB_CTX* tiledb_ctx, TileDB_Metadata** tiledb_metadata, const char* metadata, int mode, const char** attributes, int attribute_num) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Allocate memory for the array struct *tiledb_metadata = (TileDB_Metadata*) malloc(sizeof(struct TileDB_Metadata)); // Set TileDB context (*tiledb_metadata)->tiledb_ctx_ = tiledb_ctx; // Init the metadata if(tiledb_ctx->storage_manager_->metadata_init( (*tiledb_metadata)->metadata_, metadata, mode, attributes, attribute_num) != TILEDB_SM_OK) { free(*tiledb_metadata); return TILEDB_ERR; } else { return TILEDB_OK; } } int tiledb_metadata_reset_attributes( const TileDB_Metadata* tiledb_metadata, const char** attributes, int attribute_num) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; // Reset attributes if(tiledb_metadata->metadata_->reset_attributes( attributes, attribute_num) != TILEDB_MT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_get_schema( const TileDB_Metadata* tiledb_metadata, TileDB_MetadataSchema* tiledb_metadata_schema) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; // Get the metadata schema MetadataSchemaC metadata_schema_c; tiledb_metadata->metadata_->array_schema()->array_schema_export( &metadata_schema_c); // Copy the metadata schema C struct to the output tiledb_metadata_schema->metadata_name_ = metadata_schema_c.metadata_name_; tiledb_metadata_schema->attributes_ = metadata_schema_c.attributes_; tiledb_metadata_schema->attribute_num_ = metadata_schema_c.attribute_num_; tiledb_metadata_schema->capacity_ = metadata_schema_c.capacity_; tiledb_metadata_schema->cell_val_num_ = metadata_schema_c.cell_val_num_; tiledb_metadata_schema->compression_ = metadata_schema_c.compression_; tiledb_metadata_schema->types_ = metadata_schema_c.types_; // Success return TILEDB_OK; } int tiledb_metadata_load_schema( const TileDB_CTX* tiledb_ctx, const char* metadata, TileDB_MetadataSchema* tiledb_metadata_schema) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check metadata name length if(metadata == NULL || strlen(metadata) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid metadata name length"); return TILEDB_ERR; } // Get the array schema ArraySchema* array_schema; if(tiledb_ctx->storage_manager_->metadata_load_schema( metadata, array_schema) != TILEDB_SM_OK) return TILEDB_ERR; MetadataSchemaC metadata_schema_c; array_schema->array_schema_export(&metadata_schema_c); // Copy the metadata schema C struct to the output tiledb_metadata_schema->metadata_name_ = metadata_schema_c.metadata_name_; tiledb_metadata_schema->attributes_ = metadata_schema_c.attributes_; tiledb_metadata_schema->attribute_num_ = metadata_schema_c.attribute_num_; tiledb_metadata_schema->capacity_ = metadata_schema_c.capacity_; tiledb_metadata_schema->cell_val_num_ = metadata_schema_c.cell_val_num_; tiledb_metadata_schema->compression_ = metadata_schema_c.compression_; tiledb_metadata_schema->types_ = metadata_schema_c.types_; // Clean up delete array_schema; // Success return TILEDB_OK; } int tiledb_metadata_free_schema( TileDB_MetadataSchema* tiledb_metadata_schema) { // Trivial case if(tiledb_metadata_schema == NULL) return TILEDB_OK; // Free name if(tiledb_metadata_schema->metadata_name_ != NULL) free(tiledb_metadata_schema->metadata_name_); // Free attributes if(tiledb_metadata_schema->attributes_ != NULL) { for(int i=0; i<tiledb_metadata_schema->attribute_num_; ++i) if(tiledb_metadata_schema->attributes_[i] != NULL) free(tiledb_metadata_schema->attributes_[i]); free(tiledb_metadata_schema->attributes_); } // Free types if(tiledb_metadata_schema->types_ != NULL) free(tiledb_metadata_schema->types_); // Free compression if(tiledb_metadata_schema->compression_ != NULL) free(tiledb_metadata_schema->compression_); // Free cell val num if(tiledb_metadata_schema->cell_val_num_ != NULL) free(tiledb_metadata_schema->cell_val_num_); // Success return TILEDB_OK; } int tiledb_metadata_write( const TileDB_Metadata* tiledb_metadata, const char* keys, size_t keys_size, const void** buffers, const size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; // Write if(tiledb_metadata->metadata_->write( keys, keys_size, buffers, buffer_sizes) != TILEDB_MT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_read( const TileDB_Metadata* tiledb_metadata, const char* key, void** buffers, size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; // Read if(tiledb_metadata->metadata_->read( key, buffers, buffer_sizes) != TILEDB_MT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_overflow( const TileDB_Metadata* tiledb_metadata, int attribute_id) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; return (int) tiledb_metadata->metadata_->overflow(attribute_id); } int tiledb_metadata_consolidate( const TileDB_CTX* tiledb_ctx, const char* metadata) { // Check metadata name length if(metadata == NULL || strlen(metadata) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid metadata name length"); return TILEDB_ERR; } // Consolidate if(tiledb_ctx->storage_manager_->metadata_consolidate(metadata) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_finalize(TileDB_Metadata* tiledb_metadata) { // Sanity check if(!sanity_check(tiledb_metadata)) return TILEDB_ERR; // Finalize metadata int rc = tiledb_metadata->tiledb_ctx_->storage_manager_->metadata_finalize( tiledb_metadata->metadata_); free(tiledb_metadata); // Return if(rc == TILEDB_SM_OK) return TILEDB_OK; else return TILEDB_ERR; } typedef struct TileDB_MetadataIterator { MetadataIterator* metadata_it_; const TileDB_CTX* tiledb_ctx_; } TileDB_MetadataIterator; int tiledb_metadata_iterator_init( const TileDB_CTX* tiledb_ctx, TileDB_MetadataIterator** tiledb_metadata_it, const char* metadata, const char** attributes, int attribute_num, void** buffers, size_t* buffer_sizes) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Allocate memory for the metadata struct *tiledb_metadata_it = (TileDB_MetadataIterator*) malloc(sizeof(struct TileDB_MetadataIterator)); // Set TileDB context (*tiledb_metadata_it)->tiledb_ctx_ = tiledb_ctx; // Initialize the metadata iterator if(tiledb_ctx->storage_manager_->metadata_iterator_init( (*tiledb_metadata_it)->metadata_it_, metadata, attributes, attribute_num, buffers, buffer_sizes) != TILEDB_SM_OK) { free(*tiledb_metadata_it); return TILEDB_ERR; } else { return TILEDB_OK; } } int tiledb_metadata_iterator_get_value( TileDB_MetadataIterator* tiledb_metadata_it, int attribute_id, const void** value, size_t* value_size) { // Sanity check if(!sanity_check(tiledb_metadata_it)) return TILEDB_ERR; // Get value if(tiledb_metadata_it->metadata_it_->get_value( attribute_id, value, value_size) != TILEDB_MIT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_iterator_next( TileDB_MetadataIterator* tiledb_metadata_it) { // Sanity check if(!sanity_check(tiledb_metadata_it)) return TILEDB_ERR; // Advance metadata iterator if(tiledb_metadata_it->metadata_it_->next() != TILEDB_MIT_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_metadata_iterator_end( TileDB_MetadataIterator* tiledb_metadata_it) { // Sanity check if(!sanity_check(tiledb_metadata_it)) return TILEDB_ERR; // Check if the metadata iterator reached its end return (int) tiledb_metadata_it->metadata_it_->end(); } int tiledb_metadata_iterator_finalize( TileDB_MetadataIterator* tiledb_metadata_it) { // Sanity check if(!sanity_check(tiledb_metadata_it)) return TILEDB_ERR; // Finalize metadata iterator int rc = tiledb_metadata_it->tiledb_ctx_-> storage_manager_->metadata_iterator_finalize( tiledb_metadata_it->metadata_it_); free(tiledb_metadata_it); // Return if(rc == TILEDB_SM_OK) return TILEDB_OK; else return TILEDB_ERR; } /* ****************************** */ /* DIRECTORY MANAGEMENT */ /* ****************************** */ int tiledb_clear( const TileDB_CTX* tiledb_ctx, const char* dir) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check directory name length if(dir == NULL || strlen(dir) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid directory name length"); return TILEDB_ERR; } // Clear if(tiledb_ctx->storage_manager_->clear(dir) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_delete( const TileDB_CTX* tiledb_ctx, const char* dir) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check directory name length if(dir == NULL || strlen(dir) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid directory name length"); return TILEDB_ERR; } // Delete if(tiledb_ctx->storage_manager_->delete_entire(dir) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_move( const TileDB_CTX* tiledb_ctx, const char* old_dir, const char* new_dir) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check old directory name length if(old_dir == NULL || strlen(old_dir) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid old directory name length"); return TILEDB_ERR; } // Check new directory name length if(new_dir == NULL || strlen(new_dir) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid new directory name length"); return TILEDB_ERR; } // Move if(tiledb_ctx->storage_manager_->move(old_dir, new_dir) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_ls_workspaces( const TileDB_CTX* tiledb_ctx, char** workspaces, int* workspace_num) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // List workspaces if(tiledb_ctx->storage_manager_->ls_workspaces( workspaces, *workspace_num) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; } int tiledb_ls( const TileDB_CTX* tiledb_ctx, const char* parent_dir, char** dirs, int* dir_types, int* dir_num) { // Sanity check if(!sanity_check(tiledb_ctx)) return TILEDB_ERR; // Check parent directory name length if(parent_dir == NULL || strlen(parent_dir) > TILEDB_NAME_MAX_LEN) { PRINT_ERROR("Invalid parent directory name length"); return TILEDB_ERR; } // List TileDB objects if(tiledb_ctx->storage_manager_->ls( parent_dir, dirs, dir_types, *dir_num) != TILEDB_SM_OK) return TILEDB_ERR; else return TILEDB_OK; }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
a684614615f81495c3fd39c853c8e5572d8c8033
b67fa0df1fbb1fdbae55764ebead075ce1a6a12c
/C++/new/on thi/Untitled1.cpp
ca63287fc4ede3d733f46a0f8225dc3b3a39a1a3
[]
no_license
dphuoc432000/DuyTan_1st
056e39f6b2013da4f1da38ca92fb5edb8ac66b89
7c50359b771724b6e31cd867fe00a66af63ba290
refs/heads/master
2023-05-30T04:25:18.161308
2021-06-24T03:37:14
2021-06-24T03:37:14
379,792,321
0
0
null
null
null
null
UTF-8
C++
false
false
1,015
cpp
#include <iostream> #include <cmath> using namespace std; void nhap(int A[], int &n) { for(int i = 0; i < n; i++) { cin >> A[i]; } } void xuat(int A[], int n) { for(int i = 0; i < n; i++) { cout << A[i] << " "; } } void tong(int A[], int n) { int tong = 0; for (int i =0; i < n; i++) { if(A[i] % 2 !=0) { tong= tong + A[i]; } } cout << tong; } int nt(int n)//checknt { if(n < 2) { return false; } for(int i = 2 ; i < n; i++ ) { if(n % i == 0) { return false; } } return true; } void innt(int A[], int n)// in ra so nt { for (int i =0; i < n; i++) { if (nt(A[i]) == true) cout << A[i] << " "; } } void inknt (int A[], int n) // in ra khong phai so nguyen to { for (int i =0; i < n; i++) { if (nt(A[i]) == false) cout << A[i] << " "; } } void sapXep(int A[], int n) { inknt(A,n); innt(A,n); } main() { int A[255], n; cin >> n; nhap(A,n); cout << endl; xuat(A,n); cout << endl; tong(A,n); cout << endl; innt(A,n); cout << endl; sapXep(A,n); }
[ "dphuoc432000@gmail.com" ]
dphuoc432000@gmail.com
464a1d4899afd498845abe6c543d60b32a71d502
7336bcbc0344996592a0580ccf75685f5bfcd90b
/C++项目——磁盘文件管理工具/C++项目——磁盘文件管理工具/fileutil.cpp
2828a01309931a096b73c3e07d28ee6856ce81fa
[]
no_license
Jamesuhao/C-
18c82319c8df5c2894a17edbe4aa1dccd8e769d1
30e1434f4d477c25361cbcfd6086c83acc5542e5
refs/heads/master
2020-08-25T08:51:08.155105
2020-04-16T05:11:53
2020-04-16T05:11:53
205,066,942
0
0
null
null
null
null
GB18030
C++
false
false
969
cpp
#include"fileManage.h" #include"fileutil.h" #include"MD5.h" void searchDir(const std::string& path, std::unordered_set<std::string>& subFiles) { std::string matchFile = path + "\\" + "*.*"; _finddata_t fileAttr; long handle = _findfirst(matchFile.c_str(), &fileAttr); if (handle == -1) { perror("search failed!"); std::cout << matchFile << std::endl; return; } do { //当前为目录,继续搜索 if (fileAttr.attrib & _A_SUBDIR) { if (strcmp(fileAttr.name, ".") != 0 && strcmp(fileAttr.name, "..") != 0) { searchDir(path + "\\" + fileAttr.name, subFiles); } } //当前不是目录,保存文件名 else { subFiles.insert(path + "\\" + fileAttr.name); } } while (_findnext(handle, &fileAttr) == 0); _findclose(handle); } void deleteFile(const char* filename) { if (remove(filename) == 0) { std::cout << "delete file:" << filename << ":success。" << std::endl; } else { perror("delete file failed!"); } }
[ "1766727840@qq.com" ]
1766727840@qq.com
50f8a66aaa64d99d7bc8b73d3400412170a895f4
4be608aee12039835a0d844c8f300c332d3df2d0
/Arduino Intro/Project-02-LEDFlash/Project-02.ino
d93ba6a321f8c98297067900ce3a17677be3e82e
[]
no_license
track02/Arduino
96f230a4c20873b735d31180c3adeed8aab1c6de
1e5c2b69701fa22f19e60c344831db60d6f3c00f
refs/heads/master
2021-01-10T01:56:22.113211
2020-10-22T14:00:58
2020-10-22T14:00:58
44,553,193
0
0
null
null
null
null
UTF-8
C++
false
false
807
ino
int switchstate = 0; void setup() { //Specify inputs/outputs on each pin pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(2, INPUT); } void loop() { //Read input from pin 2 switchstate = digitalRead(2); //Digitalwrite sends a voltage over specified pin //LOW = 0v //HIGH = 5v if(switchstate == LOW){ //Turn on LED at pin 3 digitalWrite(3, HIGH); //Turn off LEDs at pins 4/5 digitalWrite(4, LOW); digitalWrite(5, LOW); } else{ //Turn off LEDs 3/4 digitalWrite(3, LOW); digitalWrite(4, LOW); //Turn on LED 5 digitalWrite(5, HIGH); //Sleep 1/4s delay(250); //Turn on LED 4 / Turn off LED 5 [Flashing] digitalWrite(4, HIGH); digitalWrite(5, LOW); //Sleep 1/4s delay(250); } }
[ "track02@homebox.home" ]
track02@homebox.home
022cc47d76b364d886a4e7fcbc4eeee5d8873562
9c8357e69b4257477187d679cecc907502cabb59
/gao/test/test--1.cpp
59ff2b7578f451391726f9d1b9877dca07d05b76
[]
no_license
david2du/david_training
20807bc0fd9d9c528cfaf36ade2f168fa8da6395
a569e6eb13c4d83b6645f4c892355527570220a0
refs/heads/master
2022-12-13T13:55:45.397271
2022-12-03T00:17:49
2022-12-03T00:17:49
233,592,317
0
0
null
null
null
null
UTF-8
C++
false
false
123
cpp
#include<iostream> #include <map> using namespace std; int main(int argc, char const *argv[]) { return 0; }
[ "david2du@163.com" ]
david2du@163.com
b535a82d7685cffee486b790a5fd7e99e8063d0f
1f0e52daa702a442db609766a56f99f833368a6b
/分类/动态规划复习+网络流/hdu6290(最短路).cpp
12e674f802c120be3502f9e58cdd12b8709840f1
[]
no_license
TouwaErioH/Algorithm
e0495b053e6f33353a4e526955cd269d2acc0027
a5851529168a68147ab548678c16251f6dfa017d
refs/heads/master
2022-12-07T03:46:50.674787
2020-08-20T08:45:49
2020-08-20T08:45:49
null
0
0
null
null
null
null
GB18030
C++
false
false
1,963
cpp
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <queue> #include <vector> using namespace std; const int maxn = 1000050; const long long INF = 1ll<<61; //这里一开始用了0x3f3f3f3f...sb了 struct qnode { int v; long long c; qnode(int v=0,long long c=0):v(v),c(c){} bool operator <(const qnode &r)const { return c>r.c; } }; struct Edge { int to; int w,MIN; Edge(int to,int w,int MIN):to(to),w(w),MIN(MIN){} }; vector<Edge>E[maxn]; bool vis[maxn]; long long dis[maxn]; void Dijstra(int n,int start) { memset(vis,false,sizeof(vis)); //nima,一开始赋值成-1了.... for(int i=1;i<=n;i++) dis[i] = INF; priority_queue<qnode> que; while(!que.empty()) que.pop(); dis[start] = true; que.push(qnode(start,1)); qnode tmp; while(!que.empty()) { tmp = que.top(); que.pop(); int u = tmp.v; if(vis[u]) continue; vis[u] = 1; for(int i=0;i<E[u].size();i++) { int v = E[u][i].to; int a = E[u][i].w; if(log2((dis[u]+a*1.0) / dis[u]*1.0)<E[u][i].MIN) //if((a/dis[u])<E[u][i].MIN) //这里不乘1.0也可以 continue; if(!vis[v]&&dis[v]>dis[u]+a) //这里的!VIS重要 { dis[v] = dis[u] + a; que.push(qnode(v,dis[v])); } } } if(dis[n]==INF) printf("-1\n"); else printf("%d\n",(int)log2(dis[n]*1.0)); } int main() { int t,m,u,v,n; int a,b; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) E[i].clear(); for(int i=0;i<m;i++) { scanf("%d%d%d%d",&u,&v,&a,&b); //b=(1ll<<b)-1; E[u].push_back(Edge(v,a,b)); } Dijstra(n,1); } return 0; }
[ "1301004462@qq.com" ]
1301004462@qq.com
b6a6c4a0a957261314a61724bf6ea7d7a8f16f05
70ea64c522d12dad3d50443854ce869e019d2ca2
/Game/Item/WallBlock.cpp
e450434d7a0aff25940ed2d8a843b8284b1c1c1b
[]
no_license
clxhtm456/DirectX2D
ea88afabaecc81600addd8cd14924b0630327b60
4c7027cb061008e962ed8ddd3c38c1216cf72de7
refs/heads/master
2022-11-05T05:28:44.377906
2020-07-01T15:32:03
2020-07-01T15:32:03
276,414,762
0
0
null
null
null
null
UTF-8
C++
false
false
2,931
cpp
#include "stdafx.h" #include "WallBlock.h" WallBlock * WallBlock::Create() { WallBlock* pRet = new WallBlock(); if (pRet && pRet->Init()) { pRet->autorelease(); } else { delete pRet; pRet = nullptr; } return pRet; } bool WallBlock::Init() { if (!__super::Init()) return false; topcol = true; bottomcol = true; rightcol = true; leftcol = true; recentPos = D3DXVECTOR2(0, 0); return true; } WallBlock::~WallBlock() { for (auto col : collisionList) { //ExitCollisionAll(col); ExitPhysicsCollision(col); } } void WallBlock::Update() { D3DXVECTOR2 delta = NormalizedPosition() - recentPos; recentPos = NormalizedPosition(); for (auto iter = directionList.begin(); iter != directionList.end(); iter++) { if ((*iter).first->GetKinematic() == true) continue; switch ((*iter).second) { case UP: { auto position = (*iter).first->Position(); (*iter).first->Position(position+delta); } break; case RIGHT: { if (delta.x > 0) { auto position = (*iter).first->Position(); (*iter).first->Position(position.x + delta.x,position.y); } } break; case LEFT: { if (delta.x < 0) { auto position = (*iter).first->Position(); (*iter).first->Position(position.x + delta.x, position.y); } } break; } } PhysicsObject::Update(); } void WallBlock::EnterPhysicsCollision(PhysicsObject * b, ColDirection direction) { /*b->ObjBottomCollision(false); b->ObjTopCollision(false); b->ObjLeftCollision(false); b->ObjRightCollision(false);*/ switch (direction) { case UP: if(topcol) b->ObjBottomCollision(true); break; case DOWN: if(bottomcol) b->ObjTopCollision(true); break; case RIGHT: if(rightcol) b->ObjLeftCollision(true); break; case LEFT: if(leftcol) b->ObjRightCollision(true); break; default: break; } directionList.push_back(pair<PhysicsObject *, ColDirection>(b, direction)); } void WallBlock::ExitPhysicsCollision(PhysicsObject * b) { for (auto iter = directionList.begin(); iter != directionList.end(); iter++) { if ((*iter).first == b) { switch ((*iter).second) { case UP: b->ObjBottomCollision(false); break; case DOWN: b->ObjTopCollision(false); break; case RIGHT: b->ObjLeftCollision(false); break; case LEFT: b->ObjRightCollision(false); break; } iter = directionList.erase(iter); break; } } } void WallBlock::OnPhysicsCollision(PhysicsObject* b, ColDirection direction) { /*b->ObjBottomCollision(false); b->ObjTopCollision(false); b->ObjLeftCollision(false); b->ObjRightCollision(false); switch (direction) { case UP: if (topcol) b->ObjBottomCollision(true); break; case DOWN: if (bottomcol) b->ObjTopCollision(true); break; case RIGHT: if (rightcol) b->ObjLeftCollision(true); break; case LEFT: if (leftcol) b->ObjRightCollision(true); break; default: break; }*/ }
[ "gunwoo11@naver.com" ]
gunwoo11@naver.com
0d20934563561d1b278bd46d665a3526acaaca09
f80b83c3c9a6742e3aa0ffc440e874e91dcc3b05
/CopyControl_2/src/function.cpp
79f902e87b00379936e29f62acf143a7daf182be
[]
no_license
JustinKin/CPrimer
37ca2841e8775da34ced273fd620b3eb13236148
7c956dbb2e53975edb39d02293f6a215eb6c09d6
refs/heads/master
2022-12-27T09:07:20.100740
2020-10-14T06:36:10
2020-10-14T06:36:10
301,260,461
0
0
null
null
null
null
UTF-8
C++
false
false
3,128
cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <list> #include <forward_list> #include <algorithm> #include <functional> #include <iterator> #include <map> #include <set> #include <utility> #include <memory> #include "STRVEC.H" #include "MYSTRVEC.H" using namespace std; void StrVec::push_back(const std::string& s) { chk_n_alloc(); alloc.construct(first_free++, s); } std::pair<std::string*, std::string*> StrVec::alloc_n_copy(const std::string* b, const std::string* e) { auto data = alloc.allocate( e - b ); return { data, uninitialized_copy(b, e, data) }; } void StrVec::free() { if(elements) { for(auto p = first_free; p != elements; ) { alloc.destroy(--p); } alloc.deallocate(elements,cap - elements); } } StrVec::StrVec(const StrVec& s) { auto newdata =alloc_n_copy(s.begin(),s.end()); elements = newdata.first; first_free = cap = newdata.second; } StrVec::~StrVec() { free(); } StrVec &StrVec::operator=(const StrVec& rhs) { auto data = alloc_n_copy(rhs.begin(),rhs.end()); free(); elements = data.first; first_free = cap = data.second; return *this; } void StrVec::reallocate() { auto newcapacity = size() ? 2*size() : 1; auto newdata = alloc.allocate(newcapacity); auto dest = newdata; auto elem = elements; for(size_t i=0; i!=size(); ++i) alloc.construct(dest++,std::move(*elem++)); free(); elements = newdata; first_free =dest; cap = elements + newcapacity; } void MyStrVec::mpush_back(const std::string& s_ ) { mchk_n_alloc(); malloc.construct(mtail_freehead++,s_); } std::pair<std::string*, std::string*> MyStrVec::malloc_n_copy(const std::string* b_, const std::string* e_) { auto data = malloc.allocate(e_ - b_); auto end_ = uninitialized_copy(b_,e_,data); return { data, end_ }; } void MyStrVec::mfree() { if(mhead) { for(auto p = mtail_freehead; p != mhead;) { malloc.destroy(--p); } malloc.deallocate(mhead,mcap- mhead); } /* if(mhead) { for_each(mhead,mtail_freehead,[this](string& p){ malloc.destroy(&p);}); malloc.deallocate(mhead,mcap - mhead); } */} MyStrVec::MyStrVec(const MyStrVec& msv) { auto newdata = malloc_n_copy(msv.mbegin(),msv.mend()); mhead = newdata.first; mtail_freehead = newdata.second; mcap = newdata.second; } MyStrVec &MyStrVec::operator=(const MyStrVec& msv) { auto data = malloc_n_copy(msv.mbegin(),msv.mend()); mfree(); mhead = data.first; mtail_freehead = data.second; mcap = data.second; return *this; } MyStrVec::~MyStrVec() { mfree(); } void MyStrVec::mreallocate() { auto newcapacity = msize()? 2*msize(): 1; auto newdata = malloc.allocate(newcapacity); auto dest = newdata; auto elem = mhead; for(size_t i = 0; i != msize(); ++i) malloc.construct(dest++,std::move(*elem++)); mfree(); mhead = newdata; mtail_freehead = dest; mcap = mhead + newcapacity; }
[ "justinkin2020@outlook.com" ]
justinkin2020@outlook.com
bc76333fbcc9edeb8bdb3176e301eb0aa42caa8e
5e5bc15f26ded4dccef9ee36d0e4ef1a5007c755
/bachelor/year2/graphical/MUL_arcade_2021/include/Data.hpp
29dc798892e22ea955f5315726d4b821cd29b9f5
[]
no_license
raphaelemquies/EpitechBachelor
3b5edd7857d75c73d9389a079343dcb4bd0c63b7
2630f4603cb7d5e8d52ef00bce08aa247a27be1e
refs/heads/main
2023-04-12T06:39:45.687422
2021-05-09T13:26:56
2021-05-09T13:26:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,322
hpp
/* ** EPITECH PROJECT, 2021 ** arcade ** File description: ** data */ #ifndef DATA_HPP #define DATA_HPP #include <string> #include <iostream> #include <map> #include <vector> #include <string> class Data { public: Data(); virtual ~Data(); // const std::map<std::string, ISymbole> &getSymbole() const; const int &getInstance() const; void setInstance(int inst); const std::vector<std::string> &getMap() const; const std::vector<std::string> &getNibblerMap() const; void setMap(std::vector<std::string> _new); void setNibblerMap(std::vector<std::string> _new); const std::map<std::string, std::pair<std::size_t, std::size_t>> &getText() const; const std::map<std::string, std::pair<std::size_t, std::size_t>> &getNibblerText() const; const std::vector<std::string> initMap(); const std::vector<std::string> initNibblerMap(); const std::map<std::string, std::pair<std::size_t, std::size_t>> initText(); const std::map<std::string, std::pair<std::size_t, std::size_t>> initNibblerText(); void setgameSelected(std::string game); const std::map<int, int> &getScore() const; const int &getPacmanScore() const; const int &getNibblerScore() const; const std::string &getPlayerName() const; void setScore(int pacman, int nibbler); void setPlayerName(std::string name); void setPlayerNameC(char character); void removeLplayerName(); void resetScore(int pacman, int nibbler); void removeInstance(int inst); int index; int openW; int openS; bool firstTime; bool secondTime; bool isGameLaunched; std::string gameSelected; bool isNcurse; int rand; protected: private: int _instance; int pacmanScore; int nibblerScore; std::map<int, int> _score; std::string _playerName; std::vector<std::string> _map; std::vector<std::string> _nibblerMap; std::map<std::string, std::pair<std::size_t, std::size_t>> _text; std::map<std::string, std::pair<std::size_t, std::size_t>> _textNibbler; }; #endif /* !DATA_HPP */
[ "noe.campo@epitech.eu" ]
noe.campo@epitech.eu
e7e0e792f71d82a202859dc7bf07ca8c4cdca96a
9a09d8be7393906a73e35bb404ba99c121c48470
/Chapter09/chapter9/cm/cm-lib/build/windows/gcc/x86/debug/.moc/moc_master-controller.cpp
adf5677c426d731afccb1cc2bcaeb56bf253a926
[ "MIT" ]
permissive
PacktPublishing/Learn-Qt-5
d3260f34473d5970f17584656044fcb68a1bdc1a
ec768c3f6503eee1c77c62319cbb130e978380ec
refs/heads/master
2023-02-10T02:30:06.844485
2023-01-30T09:16:48
2023-01-30T09:16:48
119,801,529
81
42
null
null
null
null
UTF-8
C++
false
false
9,683
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'master-controller.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../../../../../source/controllers/master-controller.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'master-controller.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.10.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_cm__controllers__MasterController_t { QByteArrayData data[21]; char stringdata0[418]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_cm__controllers__MasterController_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_cm__controllers__MasterController_t qt_meta_stringdata_cm__controllers__MasterController = { { QT_MOC_LITERAL(0, 0, 33), // "cm::controllers::MasterContro..." QT_MOC_LITERAL(1, 34, 17), // "rssChannelChanged" QT_MOC_LITERAL(2, 52, 0), // "" QT_MOC_LITERAL(3, 53, 12), // "selectClient" QT_MOC_LITERAL(4, 66, 19), // "cm::models::Client*" QT_MOC_LITERAL(5, 86, 6), // "client" QT_MOC_LITERAL(6, 93, 18), // "onRssReplyReceived" QT_MOC_LITERAL(7, 112, 10), // "statusCode" QT_MOC_LITERAL(8, 123, 4), // "body" QT_MOC_LITERAL(9, 128, 17), // "ui_welcomeMessage" QT_MOC_LITERAL(10, 146, 23), // "ui_navigationController" QT_MOC_LITERAL(11, 170, 39), // "cm::controllers::INavigationC..." QT_MOC_LITERAL(12, 210, 20), // "ui_commandController" QT_MOC_LITERAL(13, 231, 36), // "cm::controllers::ICommandCont..." QT_MOC_LITERAL(14, 268, 21), // "ui_databaseController" QT_MOC_LITERAL(15, 290, 37), // "cm::controllers::IDatabaseCon..." QT_MOC_LITERAL(16, 328, 12), // "ui_newClient" QT_MOC_LITERAL(17, 341, 15), // "ui_clientSearch" QT_MOC_LITERAL(18, 357, 25), // "cm::models::ClientSearch*" QT_MOC_LITERAL(19, 383, 13), // "ui_rssChannel" QT_MOC_LITERAL(20, 397, 20) // "cm::rss::RssChannel*" }, "cm::controllers::MasterController\0" "rssChannelChanged\0\0selectClient\0" "cm::models::Client*\0client\0" "onRssReplyReceived\0statusCode\0body\0" "ui_welcomeMessage\0ui_navigationController\0" "cm::controllers::INavigationController*\0" "ui_commandController\0" "cm::controllers::ICommandController*\0" "ui_databaseController\0" "cm::controllers::IDatabaseController*\0" "ui_newClient\0ui_clientSearch\0" "cm::models::ClientSearch*\0ui_rssChannel\0" "cm::rss::RssChannel*" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_cm__controllers__MasterController[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 3, 14, // methods 7, 38, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 1, // signalCount // signals: name, argc, parameters, tag, flags 1, 0, 29, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags 3, 1, 30, 2, 0x0a /* Public */, 6, 2, 33, 2, 0x0a /* Public */, // signals: parameters QMetaType::Void, // slots: parameters QMetaType::Void, 0x80000000 | 4, 5, QMetaType::Void, QMetaType::Int, QMetaType::QByteArray, 7, 8, // properties: name, type, flags 9, QMetaType::QString, 0x00095401, 10, 0x80000000 | 11, 0x00095409, 12, 0x80000000 | 13, 0x00095409, 14, 0x80000000 | 15, 0x00095409, 16, 0x80000000 | 4, 0x00095409, 17, 0x80000000 | 18, 0x00095409, 19, 0x80000000 | 20, 0x00495009, // properties: notify_signal_id 0, 0, 0, 0, 0, 0, 0, 0 // eod }; void cm::controllers::MasterController::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { MasterController *_t = static_cast<MasterController *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->rssChannelChanged(); break; case 1: _t->selectClient((*reinterpret_cast< cm::models::Client*(*)>(_a[1]))); break; case 2: _t->onRssReplyReceived((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QByteArray(*)>(_a[2]))); break; default: ; } } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { switch (_id) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 1: switch (*reinterpret_cast<int*>(_a[1])) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 0: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::models::Client* >(); break; } break; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); { typedef void (MasterController::*_t)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MasterController::rssChannelChanged)) { *result = 0; return; } } } else if (_c == QMetaObject::RegisterPropertyMetaType) { switch (_id) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 2: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::controllers::ICommandController* >(); break; case 3: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::controllers::IDatabaseController* >(); break; case 1: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::controllers::INavigationController* >(); break; case 4: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::models::Client* >(); break; case 5: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::models::ClientSearch* >(); break; case 6: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< cm::rss::RssChannel* >(); break; } } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { MasterController *_t = static_cast<MasterController *>(_o); Q_UNUSED(_t) void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = _t->welcomeMessage(); break; case 1: *reinterpret_cast< cm::controllers::INavigationController**>(_v) = _t->navigationController(); break; case 2: *reinterpret_cast< cm::controllers::ICommandController**>(_v) = _t->commandController(); break; case 3: *reinterpret_cast< cm::controllers::IDatabaseController**>(_v) = _t->databaseController(); break; case 4: *reinterpret_cast< cm::models::Client**>(_v) = _t->newClient(); break; case 5: *reinterpret_cast< cm::models::ClientSearch**>(_v) = _t->clientSearch(); break; case 6: *reinterpret_cast< cm::rss::RssChannel**>(_v) = _t->rssChannel(); break; default: break; } } else if (_c == QMetaObject::WriteProperty) { } else if (_c == QMetaObject::ResetProperty) { } #endif // QT_NO_PROPERTIES } const QMetaObject cm::controllers::MasterController::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_cm__controllers__MasterController.data, qt_meta_data_cm__controllers__MasterController, qt_static_metacall, nullptr, nullptr} }; const QMetaObject *cm::controllers::MasterController::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *cm::controllers::MasterController::qt_metacast(const char *_clname) { if (!_clname) return nullptr; if (!strcmp(_clname, qt_meta_stringdata_cm__controllers__MasterController.stringdata0)) return static_cast<void*>(this); return QObject::qt_metacast(_clname); } int cm::controllers::MasterController::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 3) qt_static_metacall(this, _c, _id, _a); _id -= 3; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 3) qt_static_metacall(this, _c, _id, _a); _id -= 3; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty || _c == QMetaObject::ResetProperty || _c == QMetaObject::RegisterPropertyMetaType) { qt_static_metacall(this, _c, _id, _a); _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } #endif // QT_NO_PROPERTIES return _id; } // SIGNAL 0 void cm::controllers::MasterController::rssChannelChanged() { QMetaObject::activate(this, &staticMetaObject, 0, nullptr); } QT_WARNING_POP QT_END_MOC_NAMESPACE
[ "akhiln@packtpub.com" ]
akhiln@packtpub.com
4a2aba11a1b7374b4d7fdb09dfa903287259a4cc
ba845ff3a728fe80653f947ac59fd086dc0097ab
/ACM/[USACO]Twofive_记忆化搜索.cpp
b8861001a6b281328a091b333df4caad0761d8b4
[]
no_license
Legend94rz/OJCodes
0d4e81adc4e18403cdbdc5461bac2e1cb246b92c
840825c32ffec8d1043a7fb3a3319edca00c1ab8
refs/heads/master
2021-06-28T02:19:37.684824
2019-06-29T02:15:57
2019-06-29T02:15:57
153,983,815
0
0
null
null
null
null
UTF-8
C++
false
false
1,498
cpp
/* ID: rz109291 PROG: twofive LANG: C++ */ #include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <memory.h> using namespace std; char cr; int N; int f[6][6][6][6][6]; string W; char ans[26]; bool ok(int p, char c) { return (ans[p] == 0 || ans[p] == c); } int dfs(int a, int b, int c, int d, int e, char now) { if (now == 'Z')return 1; if (f[a][b][c][d][e] > 0) return f[a][b][c][d][e]; int res = f[a][b][c][d][e]; if (a < 5 && ok(a, now)) res += dfs(a + 1, b, c, d, e, now + 1); if (b < a && ok(b + 5, now)) res += dfs(a, b + 1, c, d, e, now + 1); if (c < b && ok(c + 10, now)) res += dfs(a, b, c + 1, d, e, now + 1); if (d < c && ok(d + 15, now)) res += dfs(a, b, c, d + 1, e, now + 1); if (e < d && ok(e + 20, now)) res += dfs(a, b, c, d, e + 1, now + 1); f[a][b][c][d][e] = res; return res; } int main() { freopen("twofive.in", "r", stdin); freopen("twofive.out", "w", stdout); cin >> cr; int tmp=0; if (cr == 'N') { cin >> N; //map int -> string for (int i = 0; i < 25; i++) { for (ans[i] = 'A'; ; ans[i]++) { memset(f, 0, sizeof(f)); if ((tmp = dfs(0, 0, 0, 0, 0, 'A')) < N) N -= tmp; else break; } } printf("%s\n", ans); } else { cin >> W; //map string -> int for (int i = 0; i < W.length(); i++) { for (ans[i] = 'A'; ans[i]<W[i]; ans[i]++) { memset(f, 0, sizeof(f)); tmp += dfs(0, 0, 0, 0, 0, 'A'); } } cout << tmp+1 << endl; } fclose(stdin); fclose(stdout); }
[ "Legend94rz@gmail.com" ]
Legend94rz@gmail.com
493daa3ada96ef890c2a5206869f3b89c68cfe04
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/rtorrent/gumtree/rtorrent_repos_function_364.cpp
b9b75c0ab311027248f530ad960a8f019df2ad20
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
145
cpp
void ElementPeerList::update_itr() { m_windowList->mark_dirty(); m_elementInfo->set_object(m_listItr != m_list.end() ? &*m_listItr : NULL); }
[ "993273596@qq.com" ]
993273596@qq.com
382c84071b2c786753ac8ea5c54acc8b499732a2
70167bb550f89cb49faebc11328efd8bcda73078
/cpp/src/example_source.cpp
c91418b2a6d2ec6e19a006cf7fa96de1c67a5fe0
[]
no_license
ocean1211/deep-slam
a8ad8092646fa45e493bfd12bc6f5c2b8bd12ae7
33864e09d88003dbdfa3bb43599f47388671f440
refs/heads/master
2021-08-20T02:41:54.235251
2017-11-28T01:56:28
2017-11-28T01:56:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
37
cpp
#include <deep_slam/example_header.h>
[ "slonegg@gmail.com" ]
slonegg@gmail.com
8061456fc7a4751eee325f7f05d6a2d0f6a282b3
d0854e5c576abc3798fd7b869d256ae026cd49de
/src/yawiel/prereqs.hpp
ed58a48ccb0e490cd9c0fdc97c95a7f69a3963ab
[ "Apache-2.0" ]
permissive
yawiel/yawiel
f7891472fda8430a231d3c7f70a008d2cc5025c4
7da5900b3ae5bb92cd2b56fd1b0f13dae205897c
refs/heads/master
2020-04-27T19:45:25.378091
2019-04-11T17:55:09
2019-04-11T17:55:09
174,632,356
0
0
null
null
null
null
UTF-8
C++
false
false
125
hpp
#ifndef YAWIEL_PREREQS_HPP #define YAWIEL_PREREQS_HPP // Add standard libraries. #include <string> #include <cmath> #endif
[ "robertohueso96@gmail.com" ]
robertohueso96@gmail.com
5e01e1ba182938d15258e465bcd08eab0e55099a
e1071cd8065ed01b8bc42f5f47f964837ec723b8
/src/ripple/protocol/impl/STInteger.cpp
adcdfefe4ddd1298f2053c11f8ab55bd38ae6758
[ "MIT-Wu", "MIT", "ISC", "BSL-1.0" ]
permissive
SAN-CHAIN/sand
07355acf0ba4607a5cb1408a1d86d87f03e3a317
1c51a7d1b215a7a2e1e06bd3b87a7e1da7239664
refs/heads/master
2020-06-22T01:27:21.168067
2016-10-15T11:22:18
2016-10-15T11:22:18
94,208,495
0
3
null
null
null
null
UTF-8
C++
false
false
4,857
cpp
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ //============================================================================== #include <BeastConfig.h> #include <ripple/basics/Log.h> #include <ripple/basics/StringUtilities.h> #include <ripple/protocol/LedgerFormats.h> #include <ripple/protocol/STInteger.h> #include <ripple/protocol/TxFormats.h> #include <ripple/protocol/TER.h> #include <beast/module/core/text/LexicalCast.h> namespace ripple { template<> STInteger<unsigned char>::STInteger(SerialIter& sit, SField const& name) : STInteger(name, sit.get8()) { } template <> SerializedTypeID STUInt8::getSType () const { return STI_UINT8; } template <> std::string STUInt8::getText () const { if (getFName () == sfTransactionResult) { std::string token, human; if (transResultInfo (static_cast<TER> (value_), token, human)) return human; } return beast::lexicalCastThrow <std::string> (value_); } template <> Json::Value STUInt8::getJson (int) const { if (getFName () == sfTransactionResult) { std::string token, human; if (transResultInfo (static_cast<TER> (value_), token, human)) return token; else WriteLog (lsWARNING, STBase) << "Unknown result code in metadata: " << value_; } return value_; } //------------------------------------------------------------------------------ template<> STInteger<std::uint16_t>::STInteger(SerialIter& sit, SField const& name) : STInteger(name, sit.get16()) { } template <> SerializedTypeID STUInt16::getSType () const { return STI_UINT16; } template <> std::string STUInt16::getText () const { if (getFName () == sfLedgerEntryType) { auto item = LedgerFormats::getInstance ().findByType ( static_cast <LedgerEntryType> (value_)); if (item != nullptr) return item->getName (); } if (getFName () == sfTransactionType) { auto item =TxFormats::getInstance().findByType ( static_cast <TxType> (value_)); if (item != nullptr) return item->getName (); } return beast::lexicalCastThrow <std::string> (value_); } template <> Json::Value STUInt16::getJson (int) const { if (getFName () == sfLedgerEntryType) { auto item = LedgerFormats::getInstance ().findByType ( static_cast <LedgerEntryType> (value_)); if (item != nullptr) return item->getName (); } if (getFName () == sfTransactionType) { auto item = TxFormats::getInstance().findByType ( static_cast <TxType> (value_)); if (item != nullptr) return item->getName (); } return value_; } //------------------------------------------------------------------------------ template<> STInteger<std::uint32_t>::STInteger(SerialIter& sit, SField const& name) : STInteger(name, sit.get32()) { } template <> SerializedTypeID STUInt32::getSType () const { return STI_UINT32; } template <> std::string STUInt32::getText () const { return beast::lexicalCastThrow <std::string> (value_); } template <> Json::Value STUInt32::getJson (int) const { return value_; } //------------------------------------------------------------------------------ template<> STInteger<std::uint64_t>::STInteger(SerialIter& sit, SField const& name) : STInteger(name, sit.get64()) { } template <> SerializedTypeID STUInt64::getSType () const { return STI_UINT64; } template <> std::string STUInt64::getText () const { return beast::lexicalCastThrow <std::string> (value_); } template <> Json::Value STUInt64::getJson (int) const { return strHex (value_); } } // ripple
[ "nemox1024@hotmail.com" ]
nemox1024@hotmail.com
d60307402e191c1d97ed6ba892adc33de43a8342
e17546794b54bb4e7f65320fda8a046ce28c7915
/tools/UsbTest/ParamParser.cpp
054cd66e2ca38cfd98306e9ead17d973f47bebed
[ "BSD-3-Clause", "OpenSSL", "MIT", "LicenseRef-scancode-openssl", "LicenseRef-scancode-ssleay-windows", "Apache-2.0" ]
permissive
smaillet-ms/netmf-interpreter
693e5dc8c9463ff0824c515e9240270c948c706f
53574a439396cc98e37b82f296920c7e83a567bf
refs/heads/dev
2021-01-17T22:21:36.617467
2016-09-05T06:29:07
2016-09-05T06:29:07
32,760,598
2
1
null
2016-04-26T02:49:52
2015-03-23T21:44:01
C#
UTF-8
C++
false
false
5,431
cpp
#include "stdafx.h" #define DOUBLE_QUOTES TEXT('"') void ParamParser::PreParseAll() { try { // we need to have a delimiter . It cannot be null if (!m_delimiter || !m_separator) throw InvalidParameterException(); size_t beg = 0; while( m_strToParse.length() > (beg = ParseNextParam(beg))); } catch(std::exception&) { throw InvalidParameterException(); } } size_t ParamParser::ParseNextParam( size_t beg) { if ( beg >= m_strToParse.length()) return m_strToParse.length(); size_t idx = beg; // exclude leading spaces if any while ( idx < m_strToParse.length() && m_strToParse.at(idx) == TEXT(' ')) idx++; if (m_strToParse.at(idx) != m_delimiter) { throw InvalidParameterException(); } // find the next occurrence of the delimiter. if we don't find any, this is the last param // first skip any escaped delimiters size_t endpos = m_strToParse.find(m_delimiter, ++idx); while( (endpos != StrType::npos) && (endpos < m_strToParse.length()-1) && (m_strToParse[endpos+1] == m_delimiter)) { endpos = m_strToParse.find(m_delimiter, endpos+2); } if (endpos == StrType::npos) { endpos = m_strToParse.length(); } StrType thisParam = m_strToParse.substr(idx, endpos - idx); // find the next occurrence of the separator size_t valPos = thisParam.find(m_separator); if (valPos == StrType::npos) { valPos = thisParam.length(); } StrType param = RightTrim(thisParam.substr(0, valPos)); StrType value; if ( valPos < thisParam.length()) { value = thisParam.substr(++valPos, thisParam.length() -valPos); } // remove escape chars //============== TCHAR escapeDelim[3] = {m_delimiter, m_delimiter, 0}; size_t escapePos = value.find(escapeDelim); while(escapePos != StrType::npos) { value.erase(escapePos, 1); escapePos = value.find(escapeDelim); } // handle switch type params if ((value = RightTrim(value)).empty()) { value = toString<BOOL>(TRUE); } if (param.empty()) { throw InvalidParameterException(); } if ( m_params.find(param) != m_params.end()) { throw InvalidParameterException(); } else { m_params.insert(std::make_pair(param,value)); } return endpos; } ParamParser::ParamParser( const TCHAR* pCmdLine, TCHAR delimiter, TCHAR separator) : m_delimiter(delimiter), m_separator(separator) { if (NULL == pCmdLine || MAX_LENGTH < _tcslen(pCmdLine)) { throw InvalidParameterException(); }; m_strToParse = pCmdLine; PreParseAll(); } size_t ParamParser::countParams() { return m_params.size(); } ParamParser::ParamParser( int count, const TCHAR* args[], TCHAR delimiter, TCHAR separator) : m_delimiter(delimiter), m_separator(separator) { if (NULL == args) { throw InvalidParameterException(); } m_strToParse = TEXT(""); for ( int i = 1; i < count; i++) { m_strToParse += StrType(args[i]) + TEXT(' '); } if(MAX_LENGTH < m_strToParse.length()) { throw InvalidParameterException(); } PreParseAll(); } StrType ParamParser::GetString(LPCTSTR name, LPCTSTR defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); if ( pos == m_params.end()) { return defaultVal; } else { return pos->second; } } double ParamParser::GetDouble(LPCTSTR name, double defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); // lookup the param name if (pos != m_params.end()) { // if data parsing fails this function will return deafult value ON_ERROR_CONTINUE( InvalidParameterException, return ParseData<double>(pos->second.c_str())); } return defaultVal; } DWORD ParamParser::GetDWORD(LPCTSTR name, DWORD defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); // lookup the param name if (pos != m_params.end()) { // if data parsing fails this function will return the default value ON_ERROR_CONTINUE( InvalidParameterException, return ParseData<DWORD>(pos->second.c_str())); } return defaultVal; } BOOL ParamParser::GetFlag(LPCTSTR name, BOOL defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); if (pos != m_params.end()) { // if data parsing fails just return the default value ON_ERROR_CONTINUE( InvalidParameterException, return ParseData<BOOL>(pos->second.c_str())); } return defaultVal; } int ParamParser::GetInteger(LPCTSTR name, int defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); if (pos != m_params.end()) { // if data parsing fails just return the default value ON_ERROR_CONTINUE( InvalidParameterException, return ParseData<int>(pos->second.c_str())); } return defaultVal; } __int64 ParamParser::GetInt64(LPCTSTR name, __int64 defaultVal) { // look for the param name std::map<StrType, StrType>::iterator pos = m_params.find(name); if (pos != m_params.end()) { // if data parsing fails just return the default value ON_ERROR_CONTINUE( InvalidParameterException, return ParseData<__int64>(pos->second.c_str())); } return defaultVal; }
[ "morteza.ghandehari@microsoft.com" ]
morteza.ghandehari@microsoft.com
3f452735db2b42652ed15a4a067a59c67cd5d0d1
4979915833a11a0306b66a25a91fadd009e7d863
/src/media/audio/lib/clock/utils.cc
30baf78c8eee596c2eb04747fd32951682a032db
[ "BSD-2-Clause" ]
permissive
dreamboy9/fuchsia
1f39918fb8fe71d785b43b90e0b3128d440bd33f
4ec0c406a28f193fe6e7376ee7696cca0532d4ba
refs/heads/master
2023-05-08T02:11:06.045588
2021-06-03T01:59:17
2021-06-03T01:59:17
373,352,924
0
0
NOASSERTION
2021-06-03T01:59:18
2021-06-03T01:58:57
null
UTF-8
C++
false
false
8,533
cc
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/media/audio/lib/clock/utils.h" #include <lib/syslog/cpp/macros.h> #include <zircon/syscalls.h> #include <cmath> namespace media::audio::clock { zx_status_t GetAndDisplayClockDetails(const zx::clock& ref_clock) { auto result = GetClockDetails(ref_clock); if (result.is_error()) { return result.error(); } DisplayClockDetails(result.take_value()); return ZX_OK; } fit::result<zx_clock_details_v1_t, zx_status_t> GetClockDetails(const zx::clock& ref_clock) { if (!ref_clock.is_valid()) { FX_LOGS(INFO) << "Clock is invalid"; return fit::error(ZX_ERR_INVALID_ARGS); } zx_clock_details_v1_t clock_details; zx_status_t status = ref_clock.get_details(&clock_details); if (status != ZX_OK) { FX_PLOGS(ERROR, status) << "Error calling zx::clock::get_details"; return fit::error(status); } return fit::ok(clock_details); } // Only called by custom code when debugging, so can remain at INFO severity. void DisplayClockDetails(const zx_clock_details_v1_t& clock_details) { FX_LOGS(INFO) << "******************************************"; FX_LOGS(INFO) << "Clock details -"; FX_LOGS(INFO) << " options:\t\t\t\t0x" << std::hex << clock_details.options; FX_LOGS(INFO) << " backstop_time:\t\t\t" << clock_details.backstop_time; FX_LOGS(INFO) << " query_ticks:\t\t\t" << clock_details.query_ticks; FX_LOGS(INFO) << " last_value_update_ticks:\t\t" << clock_details.last_value_update_ticks; FX_LOGS(INFO) << " last_rate_adjust_update_ticks:\t" << clock_details.last_rate_adjust_update_ticks; FX_LOGS(INFO) << " generation_counter:\t\t" << clock_details.generation_counter; FX_LOGS(INFO) << " mono_to_synthetic -"; FX_LOGS(INFO) << " reference_offset:\t\t" << clock_details.mono_to_synthetic.reference_offset; FX_LOGS(INFO) << " synthetic_offset:\t\t" << clock_details.mono_to_synthetic.synthetic_offset; FX_LOGS(INFO) << " rate -"; FX_LOGS(INFO) << " synthetic_ticks:\t\t" << clock_details.mono_to_synthetic.rate.synthetic_ticks; FX_LOGS(INFO) << " reference_ticks:\t\t" << clock_details.mono_to_synthetic.rate.reference_ticks; FX_LOGS(INFO) << "******************************************"; } // Only called by custom code when debugging, so can remain at INFO severity. std::string TimelineRateToString(const TimelineRate& rate, std::string tag) { return tag + ": sub_delta " + std::to_string(rate.subject_delta()) + ", ref_delta " + std::to_string(rate.reference_delta()); } // Only called by custom code when debugging, so can remain at INFO severity. std::string TimelineFunctionToString(const TimelineFunction& func, std::string tag) { return tag + ": sub_off " + std::to_string(func.subject_time()) + ", ref_off " + std::to_string(func.reference_time()) + ", sub_delta " + std::to_string(func.subject_delta()) + ", ref_delta " + std::to_string(func.reference_delta()); } zx_koid_t GetKoid(const zx::clock& clock) { zx_info_handle_basic_t basic_info; // size_t actual, avail; auto status = clock.get_info(ZX_INFO_HANDLE_BASIC, &basic_info, sizeof(basic_info), nullptr, nullptr); if (status != ZX_OK) { return ZX_HANDLE_INVALID; } return basic_info.koid; } fit::result<zx::clock, zx_status_t> DuplicateClock(const zx::clock& original_clock) { constexpr auto rights = ZX_RIGHT_DUPLICATE | ZX_RIGHT_TRANSFER | ZX_RIGHT_READ; zx::clock dupe_clock; auto status = original_clock.duplicate(rights, &dupe_clock); if (status != ZX_OK) { return fit::error(status); } return fit::ok(std::move(dupe_clock)); } fit::result<ClockSnapshot, zx_status_t> SnapshotClock(const zx::clock& ref_clock) { ClockSnapshot snapshot; zx_clock_details_v1_t clock_details; zx_status_t status = ref_clock.get_details(&clock_details); if (status != ZX_OK) { return fit::error(status); } // The inverse of the clock_details.mono_to_synthetic affine transform. snapshot.reference_to_monotonic = TimelineFunction(clock_details.mono_to_synthetic.reference_offset, clock_details.mono_to_synthetic.synthetic_offset, clock_details.mono_to_synthetic.rate.reference_ticks, clock_details.mono_to_synthetic.rate.synthetic_ticks); snapshot.generation = clock_details.generation_counter; return fit::ok(snapshot); } // Naming is confusing here. zx::clock transforms/structs call the underlying baseline clock (ticks // or monotonic: we use monotonic) their "reference" clock. Unfortunately, in media terminology a // "reference clock" could be any continuous monotonically increasing clock -- including not only // the local system monotonic, but also custom clocks maintained outside the kernel (which zx::clock // calls "synthetic" clocks). // // Thus in these util functions that convert between clocks, a conversion that we usually call "from // monotonic to reference" is (in zx::clock terms) a conversion "from reference to synthetic", where // the baseline reference here is the monotonic clock. fit::result<zx::time, zx_status_t> ReferenceTimeFromMonotonicTime(const zx::clock& ref_clock, zx::time mono_time) { zx_clock_details_v1_t clock_details; zx_status_t status = ref_clock.get_details(&clock_details); if (status != ZX_OK) { return fit::error(status); } return fit::ok(zx::time( affine::Transform::Apply(clock_details.mono_to_synthetic.reference_offset, clock_details.mono_to_synthetic.synthetic_offset, affine::Ratio(clock_details.mono_to_synthetic.rate.synthetic_ticks, clock_details.mono_to_synthetic.rate.reference_ticks), mono_time.get()))); } fit::result<zx::time, zx_status_t> MonotonicTimeFromReferenceTime(const zx::clock& ref_clock, zx::time ref_time) { zx_clock_details_v1_t clock_details; zx_status_t status = ref_clock.get_details(&clock_details); if (status != ZX_OK) { return fit::error(status); } return fit::ok(zx::time(affine::Transform::ApplyInverse( clock_details.mono_to_synthetic.reference_offset, clock_details.mono_to_synthetic.synthetic_offset, affine::Ratio(clock_details.mono_to_synthetic.rate.synthetic_ticks, clock_details.mono_to_synthetic.rate.reference_ticks), ref_time.get()))); } fit::result<zx::time, zx_status_t> ReferenceTimeFromReferenceTime(const zx::clock& ref_clock_a, zx::time ref_time_a, const zx::clock& ref_clock_b) { zx_clock_details_v1_t clock_details_a, clock_details_b; auto status = ref_clock_a.get_details(&clock_details_a); if (status == ZX_OK) { status = ref_clock_b.get_details(&clock_details_b); } if (status != ZX_OK) { return fit::error(status); } auto mono_to_ref_a = clock_details_a.mono_to_synthetic; auto mono_to_ref_b = clock_details_b.mono_to_synthetic; auto mono_time = affine::Transform::ApplyInverse( mono_to_ref_a.reference_offset, mono_to_ref_a.synthetic_offset, affine::Ratio(mono_to_ref_a.rate.synthetic_ticks, mono_to_ref_a.rate.reference_ticks), ref_time_a.get()); auto ref_time_b = affine::Transform::Apply( mono_to_ref_b.reference_offset, mono_to_ref_b.synthetic_offset, affine::Ratio(mono_to_ref_b.rate.synthetic_ticks, mono_to_ref_b.rate.reference_ticks), mono_time); return fit::ok(zx::time(ref_time_b)); } affine::Transform ToAffineTransform(TimelineFunction& tl_function) { return affine::Transform(tl_function.reference_time(), tl_function.subject_time(), affine::Ratio(static_cast<uint32_t>(tl_function.subject_delta()), static_cast<uint32_t>(tl_function.reference_delta()))); } TimelineFunction ToTimelineFunction(affine::Transform affine_trans) { return TimelineFunction(affine_trans.b_offset(), affine_trans.a_offset(), affine_trans.numerator(), affine_trans.denominator()); } } // namespace media::audio::clock
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
85dce39d6185ce568c7ec4426f576feac790316f
7495e64fdc16caa575e8b2822ea42df59b664e5a
/branch/1.0.2/lib/mongo/src/mongo/bson/util/builder.h
b8027e561a206589f2e3804302c0d7afcdc570de
[ "Apache-2.0" ]
permissive
patrickpclee/codfs
dda6a8668c4e157118c7f7773676d88a2d4b0ffe
f3765f148adaecc1c45b132d2453cc74f7a2712f
refs/heads/master
2021-01-01T20:06:15.538155
2015-03-31T09:45:55
2015-03-31T09:45:55
26,440,466
11
4
null
null
null
null
UTF-8
C++
false
false
11,719
h
/* builder.h */ /* Copyright 2009 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <cfloat> #include <iostream> #include <sstream> #include <stdio.h> #include <string> #include <string.h> #include "mongo/bson/inline_decls.h" #include "mongo/bson/stringdata.h" namespace mongo { /* Accessing unaligned doubles on ARM generates an alignment trap and aborts with SIGBUS on Linux. Wrapping the double in a packed struct forces gcc to generate code that works with unaligned values too. The generated code for other architectures (which already allow unaligned accesses) is the same as if there was a direct pointer access. */ struct PackedDouble { double d; } PACKED_DECL; /* Note the limit here is rather arbitrary and is simply a standard. generally the code works with any object that fits in ram. Also note that the server has some basic checks to enforce this limit but those checks are not exhaustive for example need to check for size too big after update $push (append) operation various db.eval() type operations */ const int BSONObjMaxUserSize = 16 * 1024 * 1024; /* Sometimes we need objects slightly larger - an object in the replication local.oplog is slightly larger than a user object for example. */ const int BSONObjMaxInternalSize = BSONObjMaxUserSize + ( 16 * 1024 ); const int BufferMaxSize = 64 * 1024 * 1024; void msgasserted(int msgid, const char *msg); template <typename Allocator> class StringBuilderImpl; class TrivialAllocator { public: void* Malloc(size_t sz) { return malloc(sz); } void* Realloc(void *p, size_t sz) { return realloc(p, sz); } void Free(void *p) { free(p); } }; class StackAllocator { public: enum { SZ = 512 }; void* Malloc(size_t sz) { if( sz <= SZ ) return buf; return malloc(sz); } void* Realloc(void *p, size_t sz) { if( p == buf ) { if( sz <= SZ ) return buf; void *d = malloc(sz); if ( d == 0 ) msgasserted( 15912 , "out of memory StackAllocator::Realloc" ); memcpy(d, p, SZ); return d; } return realloc(p, sz); } void Free(void *p) { if( p != buf ) free(p); } private: char buf[SZ]; }; template< class Allocator > class _BufBuilder { // non-copyable, non-assignable _BufBuilder( const _BufBuilder& ); _BufBuilder& operator=( const _BufBuilder& ); Allocator al; public: _BufBuilder(int initsize = 512) : size(initsize) { if ( size > 0 ) { data = (char *) al.Malloc(size); if( data == 0 ) msgasserted(10000, "out of memory BufBuilder"); } else { data = 0; } l = 0; } ~_BufBuilder() { kill(); } void kill() { if ( data ) { al.Free(data); data = 0; } } void reset() { l = 0; } void reset( int maxSize ) { l = 0; if ( maxSize && size > maxSize ) { al.Free(data); data = (char*)al.Malloc(maxSize); if ( data == 0 ) msgasserted( 15913 , "out of memory BufBuilder::reset" ); size = maxSize; } } /** leave room for some stuff later @return point to region that was skipped. pointer may change later (on realloc), so for immediate use only */ char* skip(int n) { return grow(n); } /* note this may be deallocated (realloced) if you keep writing. */ char* buf() { return data; } const char* buf() const { return data; } /* assume ownership of the buffer - you must then free() it */ void decouple() { data = 0; } void appendUChar(unsigned char j) { *((unsigned char*)grow(sizeof(unsigned char))) = j; } void appendChar(char j) { *((char*)grow(sizeof(char))) = j; } void appendNum(char j) { *((char*)grow(sizeof(char))) = j; } void appendNum(short j) { *((short*)grow(sizeof(short))) = j; } void appendNum(int j) { *((int*)grow(sizeof(int))) = j; } void appendNum(unsigned j) { *((unsigned*)grow(sizeof(unsigned))) = j; } void appendNum(bool j) { *((bool*)grow(sizeof(bool))) = j; } void appendNum(double j) { (reinterpret_cast< PackedDouble* >(grow(sizeof(double))))->d = j; } void appendNum(long long j) { *((long long*)grow(sizeof(long long))) = j; } void appendNum(unsigned long long j) { *((unsigned long long*)grow(sizeof(unsigned long long))) = j; } void appendBuf(const void *src, size_t len) { memcpy(grow((int) len), src, len); } template<class T> void appendStruct(const T& s) { appendBuf(&s, sizeof(T)); } void appendStr(const StringData &str , bool includeEndingNull = true ) { const int len = str.size() + ( includeEndingNull ? 1 : 0 ); memcpy(grow(len), str.data(), len); } /** @return length of current string */ int len() const { return l; } void setlen( int newLen ) { l = newLen; } /** @return size of the buffer */ int getSize() const { return size; } /* returns the pre-grow write position */ inline char* grow(int by) { int oldlen = l; l += by; if ( l > size ) { grow_reallocate(); } return data + oldlen; } private: /* "slow" portion of 'grow()' */ void NOINLINE_DECL grow_reallocate() { int a = 64; while( a < l ) a = a * 2; if ( a > BufferMaxSize ) { std::stringstream ss; ss << "BufBuilder attempted to grow() to " << a << " bytes, past the 64MB limit."; msgasserted(13548, ss.str().c_str()); } data = (char *) al.Realloc(data, a); if ( data == NULL ) msgasserted( 16070 , "out of memory BufBuilder::grow_reallocate" ); size = a; } char *data; int l; int size; friend class StringBuilderImpl<Allocator>; }; typedef _BufBuilder<TrivialAllocator> BufBuilder; /** The StackBufBuilder builds smaller datasets on the stack instead of using malloc. this can be significantly faster for small bufs. However, you can not decouple() the buffer with StackBufBuilder. While designed to be a variable on the stack, if you were to dynamically allocate one, nothing bad would happen. In fact in some circumstances this might make sense, say, embedded in some other object. */ class StackBufBuilder : public _BufBuilder<StackAllocator> { public: StackBufBuilder() : _BufBuilder<StackAllocator>(StackAllocator::SZ) { } void decouple(); // not allowed. not implemented. }; namespace { #if defined(_WIN32) int (*mongo_snprintf)(char *str, size_t size, const char *format, ...) = &sprintf_s; #else int (*mongo_snprintf)(char *str, size_t size, const char *format, ...) = &snprintf; #endif } /** stringstream deals with locale so this is a lot faster than std::stringstream for UTF8 */ template <typename Allocator> class StringBuilderImpl { public: static const size_t MONGO_DBL_SIZE = 3 + DBL_MANT_DIG - DBL_MIN_EXP; static const size_t MONGO_S32_SIZE = 12; static const size_t MONGO_U32_SIZE = 11; static const size_t MONGO_S64_SIZE = 23; static const size_t MONGO_U64_SIZE = 22; static const size_t MONGO_S16_SIZE = 7; StringBuilderImpl() { } StringBuilderImpl& operator<<( double x ) { return SBNUM( x , MONGO_DBL_SIZE , "%g" ); } StringBuilderImpl& operator<<( int x ) { return SBNUM( x , MONGO_S32_SIZE , "%d" ); } StringBuilderImpl& operator<<( unsigned x ) { return SBNUM( x , MONGO_U32_SIZE , "%u" ); } StringBuilderImpl& operator<<( long x ) { return SBNUM( x , MONGO_S64_SIZE , "%ld" ); } StringBuilderImpl& operator<<( unsigned long x ) { return SBNUM( x , MONGO_U64_SIZE , "%lu" ); } StringBuilderImpl& operator<<( long long x ) { return SBNUM( x , MONGO_S64_SIZE , "%lld" ); } StringBuilderImpl& operator<<( unsigned long long x ) { return SBNUM( x , MONGO_U64_SIZE , "%llu" ); } StringBuilderImpl& operator<<( short x ) { return SBNUM( x , MONGO_S16_SIZE , "%hd" ); } StringBuilderImpl& operator<<( char c ) { _buf.grow( 1 )[0] = c; return *this; } void appendDoubleNice( double x ) { const int prev = _buf.l; const int maxSize = 32; char * start = _buf.grow( maxSize ); int z = mongo_snprintf( start , maxSize , "%.16g" , x ); verify( z >= 0 ); verify( z < maxSize ); _buf.l = prev + z; if( strchr(start, '.') == 0 && strchr(start, 'E') == 0 && strchr(start, 'N') == 0 ) { write( ".0" , 2 ); } } void write( const char* buf, int len) { memcpy( _buf.grow( len ) , buf , len ); } void append( const StringData& str ) { memcpy( _buf.grow( str.size() ) , str.data() , str.size() ); } StringBuilderImpl& operator<<( const StringData& str ) { append( str ); return *this; } void reset( int maxSize = 0 ) { _buf.reset( maxSize ); } std::string str() const { return std::string(_buf.data, _buf.l); } int len() const { return _buf.l; } private: _BufBuilder<Allocator> _buf; // non-copyable, non-assignable StringBuilderImpl( const StringBuilderImpl& ); StringBuilderImpl& operator=( const StringBuilderImpl& ); template <typename T> StringBuilderImpl& SBNUM(T val,int maxSize,const char *macro) { int prev = _buf.l; int z = mongo_snprintf( _buf.grow(maxSize) , maxSize , macro , (val) ); verify( z >= 0 ); verify( z < maxSize ); _buf.l = prev + z; return *this; } }; typedef StringBuilderImpl<TrivialAllocator> StringBuilder; typedef StringBuilderImpl<StackAllocator> StackStringBuilder; } // namespace mongo
[ "windkithk@gmail.com" ]
windkithk@gmail.com
28837e5112515ae7209907f729b100b887b36842
e31123784ff0ed6f37972017d3b4729c7ac83a12
/その他/AtCoder Petrozavodsk Contest 001/B - Two Arrays.cpp
37a6a41bbfacefcf9d55e03b288617fe4a4e90ca
[]
no_license
ampm2020/atcoder
a91248953febeba5ef6d74620efed3164a60763c
0f3bb841f34b5994f2be3e77e1022adf42fbe69b
refs/heads/master
2022-11-05T08:04:06.531266
2020-06-19T11:51:38
2020-06-19T11:51:38
259,792,970
0
0
null
null
null
null
UTF-8
C++
false
false
882
cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<long long, long long>; constexpr char ln = '\n'; constexpr long long MOD = 1000000007LL; constexpr long long INF = 1000000009LL; #define all(x) (x).begin(),(x).end() #define rep(i,n) for(int i=0;i<(n);i++) template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int main(){ int n; cin >> n; vector<ll> A(n), B(n); rep(i, n) cin >> A[i]; rep(i, n) cin >> B[i]; ll mana = 0, cost = 0; rep(i, n){ ll a = A[i], b = B[i]; if(a < b) mana += (b-a)/2; else if(a > b) cost += a-b; } if(mana >= cost) cout << "Yes" << ln; else cout << "No" << ln; }
[ "daigoro-chucchu2004@ezweb.ne.jp" ]
daigoro-chucchu2004@ezweb.ne.jp
1e86ccab29904bbced6c7f076c1ed4d73f2b214f
37a8f6d531b85ba2a96007d00bee202cb5bb483e
/src/slam-dataset-generation/lib/libsimulator/obstacle/ObstacleEdge.cpp
e349c8d528b05c857d38b44aeb329865161308ee
[]
no_license
OSLL/slam-dataset-generation
0e8aa799cbeb06e49384bee541717a34a2bcbda7
46de9784553ed514cee4299c95719be1ad48db52
refs/heads/master
2020-03-19T09:42:41.139721
2018-09-13T09:01:54
2018-09-13T09:01:54
136,311,821
0
0
null
null
null
null
UTF-8
C++
false
false
2,555
cpp
#include "obstacle/ObstacleEdge.h" using std::ostream; using std::cout; using std::endl; using std::set; ObstacleEdge::ObstacleEdge(const Vec & start_point, const Vec & end_point) : start(start_point), end(end_point) { } static double closest_distance(const Vec & p, const set<Vec> & s) { if (!s.empty()) { // Obtain iterator to set (guaranteed to have at least one element) set<Vec>::iterator i = s.begin(); // Start by assuming closest distance is the first element of the set and advance iterator double result = (*i - p).mag(); i++; // Loop over rest of set (if it exists) to determine actual closest distance for (; i != s.end(); i++) { // Get distance between p and this particular intersection point double distance = (*i - p).mag(); if (distance < result) { result = distance; } } return result; } else { return -1.0; } } double ObstacleEdge::distance(const Vec & edge_offset, const ObservationPath & op) const { set<Vec> path_intersection_points = intersection_points(edge_offset, op); return closest_distance(op.start, path_intersection_points); } std::set<Vec> ObstacleEdge::intersection_points(const Vec & edge_offset, const ObservationPath & op) const { // Obtain set of intersection points as though op was a Line set<Vec> line_intersection_points = linear_intersection_points(edge_offset, op); // If op has a filtering function, then perform filtering on the set if (op.on_path != nullptr) { for (auto itr = line_intersection_points.cbegin(); itr != line_intersection_points.cend();) { if (!op.on_path(*itr, op)) { //cout << "Point " << *itr << " is not on path " << op << ". Filtering out..." << endl; itr = line_intersection_points.erase(itr); } else { itr++; } } } return line_intersection_points; } // For some edge types, the only way to find the number of intersections // is to analytically find all intersection points and count them // // If there is a faster way for a particular edge type to accomplish this, // these are virtual and can be defined in a subclass int ObstacleEdge::number_of_intersections(const Vec & edge_offset, const ObservationPath & op) const { return intersection_points(edge_offset, op).size(); } void ObstacleEdge::print(ostream & o, int tabs) const { // Print out the correct number of tabs for (int i = 0; i < tabs; i++) { cout << '\t'; } // Print edge information o << "ObstacleEdge: " << start << " -> " << end; } ostream & operator<<(ostream & o, const ObstacleEdge & e) { e.print(o); return o; }
[ "jwhitton@mit.edu" ]
jwhitton@mit.edu
99e2b7646834c24885bde0158ea898681a992715
2d396ff108c97978b15c1a691755d6987ab640ee
/calculadora/Project1/Project1/MyForm.cpp
df2990b7dd4a418d208de59bd3afdad710be7dde
[ "MIT" ]
permissive
amauris59/Calculadora
2d4656b7dc521f207ca1713c6f9408c1bf7370b3
f7280b08245b6eb136561425ff49c7a369f5c943
refs/heads/master
2021-08-30T00:45:40.137656
2017-12-15T12:10:54
2017-12-15T12:10:54
114,364,698
0
0
null
null
null
null
UTF-8
C++
false
false
274
cpp
#include "MyForm.h" using namespace System; using namespace System::Windows::Forms; [STAThread] void main(array<String^>^ arg) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Project1::MyForm form; Application::Run(%form); }
[ "amauris59@gmail.com" ]
amauris59@gmail.com
da5f5b488ce0038e022309a376366199396377dc
39df227f8be5d00555bdd59167b529373e4f702a
/otus_task_5/Figures.h
d035f716f945b5c49465b4a142ec533e74e1d2ae
[]
no_license
vvz-otus/diff_tasks
e309d2df5752e87cea3f40883c760243dc390f16
621fa514dd17eaac804e119234f87f3f6261d94d
refs/heads/master
2020-03-17T12:17:58.020948
2018-05-15T15:57:29
2018-05-15T15:57:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
755
h
/* File contains classes for graphical primitives. */ #pragma once #include <vector> #include <utility> enum class Switcher{ FirstClick, SecondClick }; class IFigure{ public: IFigure() {} virtual ~IFigure(){} void HandClick( int x, int y ); virtual std::vector< std::pair<int, int> > GetAllPoints() = 0; private: Switcher switcher = Switcher::FirstClick; void SetCenter( int x, int y ) {} void SetTarget( int x, int y ) {} int CenterX, CenterY, TargetX, TargetY; }; class Line final : public IFigure { public: std::vector< std::pair<int, int> > GetAllPoints() override {} }; class Circle final : public IFigure { public: std::vector< std::pair<int, int> > GetAllPoints() override {} };
[ "dmitry.syr@gmail.com" ]
dmitry.syr@gmail.com
469c6bd4f5a323e4315b3666ca15016abc70f0a7
aceaf048853cba0c0392ad089bea22f9e3528098
/_tutorials/code/connect-wifi-arduino-esp32s3/connect-wifi-arduino-esp32s3.ino
004b0a0ebee6d40800dab7b48ebea8734008f363
[ "MIT" ]
permissive
hutscape/hutscape.github.io
c5b640bbfda21b9bc7260b5d2f6164c60ff9158a
27c5d8a79d48025d3270fea704df7a5e5cb43f5d
refs/heads/master
2023-02-13T04:05:12.235290
2023-02-01T05:37:53
2023-02-01T05:37:53
176,517,102
40
38
MIT
2021-07-15T07:02:01
2019-03-19T13:23:46
C++
UTF-8
C++
false
false
802
ino
#include <WiFi.h> #include "Secret.h" // Secret.h // char ssid[] = "secret"; // char pass[] = "secret"; void setup() { Serial.begin(115200); while (!Serial) { } Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); WiFi.useStaticBuffers(true); WiFi.mode(WIFI_STA); WiFi.begin(ssid, pass); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("Connected to WiFi"); printWifiStatus(); } void loop() {} void printWifiStatus() { Serial.print("SSID: "); Serial.println(WiFi.SSID()); IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.print(rssi); Serial.println(" dBm"); }
[ "sayanee@gmail.com" ]
sayanee@gmail.com
145a85b7aa409a2838944d2c37aa4b514169d1bb
1f20917fea6c541060e59d36883225910fcf76ba
/src/vmiids/rpc/RpcClient.h
601cf5d01636b47b8913f881079f58deb856bcb1
[]
no_license
chenglongzheng/vmiids
2975603edfe95ac7cab30a5926bfb4e0270b7c76
2410fee71220678de7c16af21c4270d7f52006a7
refs/heads/master
2021-01-18T06:25:14.340355
2010-10-14T19:15:20
2010-10-14T19:15:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,900
h
/* * VmiIDS_rpcClient.h * * Created on: Jul 8, 2010 * Author: kittel */ #ifndef VMIIDSRPCCLIENT_H_ #define VMIIDSRPCCLIENT_H_ #include "vmiids/rpc/RpcCommon.h" #include <string> #include <list> namespace vmi { /** * @class RpcClient RpcClient.h "vmiids/rpc/RpcClient.h" * * This class provides rpc client functionality. * * Every function is mapped to the appropriate rpc request. * Currently this function only supports queries on localhost. */ class RpcClient { private: CLIENT *clnt; //!< RPC internal data structure. static RpcClient *instance; //!< Instance of the RpcClient class (Singleton) /** * Internal function to start the rpc connection. */ void startConnection(void); /** * Internal function to quit the rpc connection. */ void stopConnection(void); /** * Constructor */ RpcClient(); public: /** * Destructor */ virtual ~RpcClient(); /** * Get the RpcClient instance. */ static RpcClient *getInstance(); /** * Enqueue DetectionModule to a list of DetectionModules scheduled all timeInSeconds seconds. * * Function calls vmi::VmiIDS::enqueueDetectionModule(). * Note: The DetectionModule must be loaded in advance. Use the loadSharedObject() method to load a module. * * @param detectionModuleName Name of the DetectionModule. * @param timeInSeconds Time between two runs of the module. * @return True, if the DetectionModule was successfully enqueued. */ bool enqueueDetectionModule(std::string detectionModuleName, uint32_t timeInSeconds = 0); /** * Dequeue DetectionModule from a list of DetectionModules scheduled all timeInSeconds seconds. * * Function calls vmi::VmiIDS::dequeueDetectionModule(). * Note: The DetectionModule must be enqueued in advance. * * @param detectionModuleName Name of the DetectionModule. * @param timeInSeconds Time between two runs of the module. * @return True, if the DetectionModule was successfully dequeued. */ bool dequeueDetectionModule(std::string detectionModuleName, uint32_t timeInSeconds = 0); /** * Run single DetectionModule. * * @param module Name of the DetectionModule to run. * @return Output the DetectionModule produced while running. */ std::string runSingleDetectionModule(std::string module); /** * Stop the entire framework. It is not able to restart the framework with rpc. * @param signum Signal to stop the framework with. * @return True, if framework was stopped. */ bool stopIDS(int signum = 0); /** * Load a module from an object file (*.so). * @param path Path of the module to load. * @return True, if the object file was found, and loadable. */ bool loadSharedObject(std::string path); /** * Query a list of loaded DetectionModules. * @return List of loaded DetectionModules. */ std::list<std::string> getListOfDetectionModules(void); }; } #endif /* VMIIDSRPCCLIENT_H_ */
[ "kittel@in.tum.de" ]
kittel@in.tum.de
6f0857c6a15243f43ad5f7ab17bd0f3c8a409def
3fc543e2fe00b5632771cc8ec6326c68f1d41191
/stencil_benchmarks/tools/parallel.cpp
9398a7d37ab7780e7a7a767f005b6286a18a0393
[ "BSD-3-Clause" ]
permissive
gronerl/stencil_benchmarks
fd6f4530b96f9f80eb0eb1857bcbbfad95d23bcb
876725124f8ac253c009abad5ec71661d3e169d7
refs/heads/master
2022-12-24T05:45:38.415794
2020-09-18T15:54:58
2020-09-18T15:55:14
296,005,487
0
0
NOASSERTION
2020-09-16T10:56:04
2020-09-16T10:56:03
null
UTF-8
C++
false
false
3,302
cpp
// Stencil Benchmarks // // Copyright (c) 2017-2020, ETH Zurich and MeteoSwiss // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors // may be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // SPDX-License-Identifier: BSD-3-Clause #include <algorithm> #include <functional> #include <random> #include <thread> #include <vector> #include <pybind11/pybind11.h> namespace py = pybind11; namespace { template <class T> void random_fill(T *first, T *last) { py::gil_scoped_release release; std::vector<std::thread> threads; std::size_t nthreads = std::thread::hardware_concurrency(); for (std::size_t i = 0; i < nthreads; ++i) { threads.emplace_back([=]() { std::random_device seed; auto rand = std::bind(std::uniform_real_distribution<T>(), std::minstd_rand(seed())); std::size_t n = std::distance(first, last); T *thread_first = first + i * n / nthreads; T *thread_last = first + (i + 1) * n / nthreads; std::generate(thread_first, thread_last, rand); }); } for (auto &thread : threads) thread.join(); } } // namespace PYBIND11_MODULE(parallel, m) { m.def("random_fill", [](py::buffer b) { py::buffer_info info = b.request(); char *first = reinterpret_cast<char *>(info.ptr); char *last = first + info.itemsize; for (int dim = 0; dim < info.ndim; ++dim) last += (info.shape[dim] - 1) * info.strides[dim]; if (info.format == py::format_descriptor<float>::format()) { random_fill<float>(reinterpret_cast<float *>(first), reinterpret_cast<float *>(last)); } else if (info.format == py::format_descriptor<double>::format()) { random_fill<double>(reinterpret_cast<double *>(first), reinterpret_cast<double *>(last)); } else { throw std::runtime_error("data type not supported"); } }); }
[ "thaler@cscs.ch" ]
thaler@cscs.ch
2c540c9893d0a0a9169f90d4d89a6ef82febd31f
7599301731d0c6a6e9da4c4d656616125d6f52ac
/ExcelConverter/ExcelConverter/rules_yingdaqiweizhi.cpp
1b5c8b204ca80da3218d34fffee1f88076e05604
[]
no_license
zhang433/ATP
ddc43175370e3732647554ab12e688ed5db91a50
67d4eefcd491d0be1ac1e3c65d53c3b2cb90881a
refs/heads/master
2020-09-26T08:32:04.917444
2020-02-27T02:25:58
2020-02-27T02:25:58
226,217,361
0
0
null
2019-12-06T01:01:28
2019-12-06T01:01:27
null
UTF-8
C++
false
false
5,391
cpp
#include "rules_yingdaqiweizhi.h" #include <functional> #include <QDebug> #include <qalgorithms.h> Rules_YINGDAQIWEIZHI::Rules_YINGDAQIWEIZHI() { } bool Rules_YINGDAQIWEIZHI::convert(QList<QPair<FileInfo, ExcelFile>> &excelFiles, QList<QPair<QString, Sheet>>& All_ConvertSheet) { std::function<bool(QPair<FileInfo, ExcelFile>&)> rule[8]; rule[0] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { //检查 for (auto& sheet : sheetfile.second) { for (auto& items : sheet.second) { if(!RuleCommon::check_Order(items[0])) { w->printerr("序号无法有效转换", RuleCommon::get_rowContent(items)); return false; } } } return true; }; rule[1] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { return true; }; rule[2] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { //检查 for (auto& sheet : sheetfile.second) { for (auto& items : sheet.second) { if (!RuleCommon::check_balishID(items[2])) { w->printerr("应答器编号无效", RuleCommon::get_rowContent(items), "示例:075-5-14-001-1"); return false; } } } return true; }; rule[3] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { //检查 for (auto& sheet : sheetfile.second) { for (auto& items : sheet.second) { if (!RuleCommon::check_Km(items[3])) { w->printerr("里程标识不合法,无法转换为数字", RuleCommon::get_rowContent(items)); return false; } } } return true; }; rule[4] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { //检查 for (auto& sheet : sheetfile.second) { for (auto& items : sheet.second) { if (items[4]!="有源"&&items[4]!="无源") { w->printerr("设备类型不合法", RuleCommon::get_rowContent(items), "只能为有源或者无源"); return false; } } } return true; }; rule[5] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { static QSet<QString> s = { "CZ","DW","FCZ","FDW","FJZ","FQ","JZ","Q","ZJ1","ZJ2" }; //检查 for (auto& sheet : sheetfile.second) { for (auto& items : sheet.second) { if (items[4] != "有源"&&items[4] != "无源") { w->printerr("用途不合法", RuleCommon::get_rowContent(items), "用途为以下字段之一:CZ,DW,FCZ,FDW,FJZ,FQ,JZ,Q,ZJ1,ZJ2"); return false; } } } return true; }; rule[6] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { return true; }; rule[7] = [](QPair<FileInfo, ExcelFile>& sheetfile)->bool { return true; }; QList<QPair<FileInfo, ExcelFile>> files; auto iter = excelFiles.begin(); //筛选文件 while (iter != excelFiles.end()) { if (iter->first.fileType == FileType::YINGDAQIWEIZHI) { files.push_back(qMove(*iter)); iter = excelFiles.erase(iter); } else iter++; } if(files.isEmpty()) w->printinfo("未检测到符合命名规范的应答器位置表"); //掐头去尾 for (auto& file : files) { w->printinfo("正在检查文件:" + file.first.fileName); if (file.second.size() != 2) { w->printerr("子表个数必须严格为2"); return false; } if (!RuleCommon::check_column(file, sizeof(rule) / sizeof(rule[0]))) { w->printerr("请检查每一张子表的列数是否严格为"+QString::number(sizeof(rule) / sizeof(rule[0]))+"(包括隐藏列)"); return false; } for (unsigned int i = 0; i < sizeof(rule) / sizeof(rule[0]); ++i) { if (!(rule[i])(file)) return false; } } for(auto& file : files) { for(auto& sheet: file.second) { for(auto& line: sheet.second) { BalisePosition baliseLocation; baliseLocation.ID = line[0]; baliseLocation.baliseName = line[1]; baliseLocation.baliseID = line[2]; baliseLocation.baliseKm = line[3]; baliseLocation.baliseType = line[4]; baliseLocation.baliseUse = line[5]; baliseLocation.remark_1 = line[6]; baliseLocation.remark_2 = line[7]; switch(sheet.first) { case SheetType::UP: DesignData::baliseLocationUpMap.insert(baliseLocation.baliseID, baliseLocation); if (DesignData::balishUseMap.find(baliseLocation.baliseID.mid(0, 12)) == DesignData::balishUseMap.end()) DesignData::balishUseMap.insert(baliseLocation.baliseID.mid(0, 12), baliseLocation.baliseUse); break; case SheetType::DOWN: DesignData::baliseLocationDownMap.insert(baliseLocation.baliseID,baliseLocation); if(DesignData::balishUseMap.find(baliseLocation.baliseID.mid(0, 12))== DesignData::balishUseMap.end()) DesignData::balishUseMap.insert(baliseLocation.baliseID.mid(0,12), baliseLocation.baliseUse); break; default: w->printerr(file.first.fileName+"子表名称不符合规范(须包含上下行信息)"); return false; } } } } return true; }
[ "546976189@qq.com" ]
546976189@qq.com
43a1ba5dfeb4c137f954d27a3498b585e61a50a6
97478e6083db1b7ec79680cfcfd78ed6f5895c7d
/chromeos/components/tether/ble_scanner_impl.cc
10b31645dbfeeb25ccdf93bf98cc04f1e9a99c84
[ "BSD-3-Clause" ]
permissive
zeph1912/milkomeda_chromium
94e81510e1490d504b631a29af2f1fef76110733
7b29a87147c40376bcdd1742f687534bcd0e4c78
refs/heads/master
2023-03-15T11:05:27.924423
2018-12-19T07:58:08
2018-12-19T07:58:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,505
cc
// Copyright 2017 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 "chromeos/components/tether/ble_scanner_impl.h" #include "base/bind.h" #include "base/memory/ptr_util.h" #include "base/strings/string_util.h" #include "base/threading/thread_task_runner_handle.h" #include "chromeos/components/tether/ble_constants.h" #include "chromeos/components/tether/ble_synchronizer.h" #include "components/cryptauth/proto/cryptauth_api.pb.h" #include "components/cryptauth/remote_device.h" #include "components/proximity_auth/logging/logging.h" #include "device/bluetooth/bluetooth_device.h" #include "device/bluetooth/bluetooth_discovery_session.h" #include "device/bluetooth/bluetooth_uuid.h" namespace chromeos { namespace tether { namespace { // Valid service data must include at least 4 bytes: 2 bytes associated with the // scanning device (used as a scan filter) and 2 bytes which identify the // advertising device to the scanning device. const size_t kMinNumBytesInServiceData = 4; } // namespace // static BleScannerImpl::Factory* BleScannerImpl::Factory::factory_instance_ = nullptr; // static std::unique_ptr<BleScanner> BleScannerImpl::Factory::NewInstance( scoped_refptr<device::BluetoothAdapter> adapter, cryptauth::LocalDeviceDataProvider* local_device_data_provider, BleSynchronizerBase* ble_synchronizer) { if (!factory_instance_) factory_instance_ = new Factory(); return factory_instance_->BuildInstance(adapter, local_device_data_provider, ble_synchronizer); } // static void BleScannerImpl::Factory::SetInstanceForTesting(Factory* factory) { factory_instance_ = factory; } std::unique_ptr<BleScanner> BleScannerImpl::Factory::BuildInstance( scoped_refptr<device::BluetoothAdapter> adapter, cryptauth::LocalDeviceDataProvider* local_device_data_provider, BleSynchronizerBase* ble_synchronizer) { return base::MakeUnique<BleScannerImpl>(adapter, local_device_data_provider, ble_synchronizer); } BleScannerImpl::ServiceDataProviderImpl::ServiceDataProviderImpl() = default; BleScannerImpl::ServiceDataProviderImpl::~ServiceDataProviderImpl() = default; const std::vector<uint8_t>* BleScannerImpl::ServiceDataProviderImpl::GetServiceDataForUUID( device::BluetoothDevice* bluetooth_device) { return bluetooth_device->GetServiceDataForUUID( device::BluetoothUUID(kAdvertisingServiceUuid)); } BleScannerImpl::BleScannerImpl( scoped_refptr<device::BluetoothAdapter> adapter, cryptauth::LocalDeviceDataProvider* local_device_data_provider, BleSynchronizerBase* ble_synchronizer) : adapter_(adapter), local_device_data_provider_(local_device_data_provider), ble_synchronizer_(ble_synchronizer), service_data_provider_(base::MakeUnique<ServiceDataProviderImpl>()), eid_generator_(base::MakeUnique<cryptauth::ForegroundEidGenerator>()), task_runner_(base::ThreadTaskRunnerHandle::Get()), weak_ptr_factory_(this) { adapter_->AddObserver(this); } BleScannerImpl::~BleScannerImpl() { adapter_->RemoveObserver(this); } bool BleScannerImpl::RegisterScanFilterForDevice( const cryptauth::RemoteDevice& remote_device) { if (registered_remote_devices_.size() >= kMaxConcurrentAdvertisements) { // Each scan filter corresponds to an advertisement. Thus, the number of // concurrent advertisements cannot exceed the maximum number of concurrent // advertisements. PA_LOG(WARNING) << "Attempted to start a scan for a new device when the " << "maximum number of devices have already been " << "registered."; return false; } std::vector<cryptauth::BeaconSeed> local_device_beacon_seeds; if (!local_device_data_provider_->GetLocalDeviceData( nullptr, &local_device_beacon_seeds)) { PA_LOG(WARNING) << "Error fetching the local device's beacon seeds. Cannot " << "generate scan without beacon seeds."; return false; } std::unique_ptr<cryptauth::ForegroundEidGenerator::EidData> scan_filters = eid_generator_->GenerateBackgroundScanFilter(local_device_beacon_seeds); if (!scan_filters) { PA_LOG(WARNING) << "Error generating background scan filters. Cannot scan"; return false; } registered_remote_devices_.push_back(remote_device); UpdateDiscoveryStatus(); return true; } bool BleScannerImpl::UnregisterScanFilterForDevice( const cryptauth::RemoteDevice& remote_device) { for (auto it = registered_remote_devices_.begin(); it != registered_remote_devices_.end(); ++it) { if (it->GetDeviceId() == remote_device.GetDeviceId()) { registered_remote_devices_.erase(it); UpdateDiscoveryStatus(); return true; } } return false; } bool BleScannerImpl::ShouldDiscoverySessionBeActive() { return !registered_remote_devices_.empty(); } bool BleScannerImpl::IsDiscoverySessionActive() { ResetDiscoverySessionIfNotActive(); if (discovery_session_) { // Once the session is stopped, the pointer is cleared. DCHECK(discovery_session_->IsActive()); return true; } return false; } void BleScannerImpl::SetTestDoubles( std::unique_ptr<ServiceDataProvider> service_data_provider, std::unique_ptr<cryptauth::ForegroundEidGenerator> eid_generator, scoped_refptr<base::TaskRunner> test_task_runner) { service_data_provider_ = std::move(service_data_provider); eid_generator_ = std::move(eid_generator); task_runner_ = test_task_runner; } bool BleScannerImpl::IsDeviceRegistered(const std::string& device_id) { for (auto it = registered_remote_devices_.begin(); it != registered_remote_devices_.end(); ++it) { if (it->GetDeviceId() == device_id) { return true; } } return false; } void BleScannerImpl::DeviceAdded(device::BluetoothAdapter* adapter, device::BluetoothDevice* bluetooth_device) { DCHECK_EQ(adapter_.get(), adapter); HandleDeviceUpdated(bluetooth_device); } void BleScannerImpl::DeviceChanged(device::BluetoothAdapter* adapter, device::BluetoothDevice* bluetooth_device) { DCHECK_EQ(adapter_.get(), adapter); HandleDeviceUpdated(bluetooth_device); } void BleScannerImpl::ResetDiscoverySessionIfNotActive() { if (!discovery_session_ || discovery_session_->IsActive()) return; PA_LOG(ERROR) << "BluetoothDiscoverySession became out of sync. Session is " << "no longer active, but it was never stopped successfully. " << "Resetting session."; // |discovery_session_| should be deleted whenever the session is no longer // active. However, due to Bluetooth bugs, this does not always occur // properly. When we detect that this situation has occurred, delete the // pointer and reset discovery state. discovery_session_.reset(); discovery_session_weak_ptr_factory_.reset(); is_initializing_discovery_session_ = false; is_stopping_discovery_session_ = false; weak_ptr_factory_.InvalidateWeakPtrs(); ScheduleStatusChangeNotification(false /* discovery_session_active */); } void BleScannerImpl::UpdateDiscoveryStatus() { if (ShouldDiscoverySessionBeActive()) EnsureDiscoverySessionActive(); else EnsureDiscoverySessionNotActive(); } void BleScannerImpl::EnsureDiscoverySessionActive() { // If the session is active or is in the process of becoming active, there is // nothing to do. if (IsDiscoverySessionActive() || is_initializing_discovery_session_) return; is_initializing_discovery_session_ = true; ble_synchronizer_->StartDiscoverySession( base::Bind(&BleScannerImpl::OnDiscoverySessionStarted, weak_ptr_factory_.GetWeakPtr()), base::Bind(&BleScannerImpl::OnStartDiscoverySessionError, weak_ptr_factory_.GetWeakPtr())); } void BleScannerImpl::OnDiscoverySessionStarted( std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) { is_initializing_discovery_session_ = false; PA_LOG(INFO) << "Started discovery session successfully."; discovery_session_ = std::move(discovery_session); discovery_session_weak_ptr_factory_ = base::MakeUnique<base::WeakPtrFactory<device::BluetoothDiscoverySession>>( discovery_session_.get()); ScheduleStatusChangeNotification(true /* discovery_session_active */); UpdateDiscoveryStatus(); } void BleScannerImpl::OnStartDiscoverySessionError() { PA_LOG(ERROR) << "Error starting discovery session. Initialization failed."; is_initializing_discovery_session_ = false; UpdateDiscoveryStatus(); } void BleScannerImpl::EnsureDiscoverySessionNotActive() { // If there is no session, there is nothing to do. if (!IsDiscoverySessionActive() || is_stopping_discovery_session_) return; is_stopping_discovery_session_ = true; ble_synchronizer_->StopDiscoverySession( discovery_session_weak_ptr_factory_->GetWeakPtr(), base::Bind(&BleScannerImpl::OnDiscoverySessionStopped, weak_ptr_factory_.GetWeakPtr()), base::Bind(&BleScannerImpl::OnStopDiscoverySessionError, weak_ptr_factory_.GetWeakPtr())); } void BleScannerImpl::OnDiscoverySessionStopped() { is_stopping_discovery_session_ = false; PA_LOG(INFO) << "Stopped discovery session successfully."; discovery_session_.reset(); discovery_session_weak_ptr_factory_.reset(); ScheduleStatusChangeNotification(false /* discovery_session_active */); UpdateDiscoveryStatus(); } void BleScannerImpl::OnStopDiscoverySessionError() { PA_LOG(ERROR) << "Error stopping discovery session."; is_stopping_discovery_session_ = false; UpdateDiscoveryStatus(); } void BleScannerImpl::HandleDeviceUpdated( device::BluetoothDevice* bluetooth_device) { DCHECK(bluetooth_device); const std::vector<uint8_t>* service_data = service_data_provider_->GetServiceDataForUUID(bluetooth_device); if (!service_data || service_data->size() < kMinNumBytesInServiceData) { // If there is no service data or the service data is of insufficient // length, there is not enough information to create a connection. return; } // Convert the service data from a std::vector<uint8_t> to a std::string. std::string service_data_str; char* string_contents_ptr = base::WriteInto(&service_data_str, service_data->size() + 1); memcpy(string_contents_ptr, service_data->data(), service_data->size()); CheckForMatchingScanFilters(bluetooth_device, service_data_str); } void BleScannerImpl::CheckForMatchingScanFilters( device::BluetoothDevice* bluetooth_device, std::string& service_data) { std::vector<cryptauth::BeaconSeed> beacon_seeds; if (!local_device_data_provider_->GetLocalDeviceData(nullptr, &beacon_seeds)) { // If no beacon seeds are available, the scan cannot be checked for a match. return; } const cryptauth::RemoteDevice* identified_device = eid_generator_->IdentifyRemoteDeviceByAdvertisement( service_data, registered_remote_devices_, beacon_seeds); // If the service data does not correspond to an advertisement from a device // on this account, ignore it. if (!identified_device) return; // Make a copy before notifying observers. Since |identified_device| refers // to an instance variable, it is possible that an observer could unregister // that device, which would change the value of that pointer. const cryptauth::RemoteDevice copy = *identified_device; NotifyReceivedAdvertisementFromDevice(copy, bluetooth_device); } void BleScannerImpl::ScheduleStatusChangeNotification( bool discovery_session_active) { // Schedule the task to run after the current task has completed. This is // necessary because the completion of a Bluetooth task may cause the Tether // component to be shut down; if that occurs, then we cannot reference // instance variables in this class after the object has been deleted. // Completing the current command as part of the next task ensures that this // cannot occur. See crbug.com/776241. task_runner_->PostTask( FROM_HERE, base::Bind(&BleScannerImpl::NotifyDiscoverySessionStateChanged, weak_ptr_factory_.GetWeakPtr(), discovery_session_active)); } } // namespace tether } // namespace chromeos
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
4dedc92218b3a27d53a3fa43cab2e419fde6e798
31f671e589e58f7a34ddf383d6701bc04f74bfd4
/ps/week13/task2/neradovskiy/task2.cpp
158cb614863e64a54ecf6bf67421a8313e89a518
[]
no_license
Boklazhenko/itstephomework
450fbdd43c56fadb9f53573573197f2c880e832a
368f951936620332ca68d14eb444084db9bb33a4
refs/heads/master
2020-09-08T16:54:19.988831
2020-08-08T13:22:35
2020-08-08T13:22:35
221,188,173
5
10
null
2020-08-15T07:00:35
2019-11-12T10:13:14
C++
WINDOWS-1251
C++
false
false
1,016
cpp
#include <iostream> #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define SQR(num) (pow(num, 2)) #define EXP(num, exponentiation) (pow(num, exponentiation)) #define CHECK_PARITY(num) ((num) % (2) == 0 ? true : false) #define CHECK_NOT_PARITY(num) ((num) % (2) != 0 ? true : false) //поидее эта функция реализована в прежидущей но сделал т.к. есть задание int main() { int a = 5; int b = 8; int num = 441; int exponent = 3; std::cout << "a: " << a << " b: " << b << " MIN: " << (MIN(a, b)) << std::endl; std::cout << "a: " << a << " b: " << b << " MAX: " << (MAX(a, b)) << std::endl; std::cout << "SQR: " << (SQR(a)) << std::endl; std::cout << "num: " << a << " exponentiation: " << exponent << " EXP: " << (EXP(a, exponent)) << std::endl; std::cout << "Check parity: " << num << " " << CHECK_PARITY(num) << std::endl; std::cout << "Check not parity: " << num << " " << CHECK_NOT_PARITY(num) << std::endl; }
[ "bopoh143@gmail.com" ]
bopoh143@gmail.com
d5144633d25b1de79ef4d953ffc0a6e75886aa5d
a65c77b44164b2c69dfe4bfa2772d18ae8e0cce2
/codeforces/863D.cpp
d120fa69ed8ca653f19838f47f193de75730b6ba
[]
no_license
dl8sd11/online-judge
553422b55080e49e6bd9b38834ccf1076fb95395
5ef8e3c5390e54381683f62f88d03629e1355d1d
refs/heads/master
2021-12-22T15:13:34.279988
2021-12-13T06:45:49
2021-12-13T06:45:49
111,268,306
1
6
null
null
null
null
UTF-8
C++
false
false
2,232
cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pii; typedef pair<double,double> pdd; #define MEM(a, b) memset(a, (b), sizeof(a)) #define SZ(i) ll(i.size()) #define FOR(i, j, k, in) for (ll i=j ; i<k ; i+=in) #define RFOR(i, j, k, in) for (ll i=j ; i>=k ; i-=in) #define REP(i, j) FOR(i, 0, j, 1) #define REP1(i,j) FOR(i, 1, j+1, 1) #define RREP(i, j) RFOR(i, j, 0, 1) #define ALL(_a) _a.begin(),_a.end() #define mp make_pair #define pb push_back #define eb emplace_back #define X first #define Y second #ifdef tmd #define debug(...) do{\ fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\ _do(__VA_ARGS__);\ }while(0) template<typename T>void _do(T &&_x){cerr<<_x<<endl;} template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);} template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";} template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb) { _s<<"{"; for(It _it=_ita;_it!=_itb;_it++) { _s<<(_it==_ita?"":",")<<*_it; } _s<<"}"; return _s; } template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));} template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));} template<typename _a> ostream &operator << (ostream &_s,deque<_a> &_c){return _OUTC(_s,ALL(_c));} template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));} template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;} #define IOS() #else #define debug(...) #define pary(...) #define endl '\n' #define IOS() ios_base::sync_with_stdio(0);cin.tie(0) #endif const ll MOD = 1000000007; const ll INF = 0x3f3f3f3f3f3f3f3f; // const ll MAXN = ll n,q,m; struct Node { Node *lc,*rc; ll val,pri; bool tag; void push() { if (tag) { if (lc) { lc->tag ^= 1; } if (rc) { rc->tag ^= 1; } swap(lc,rc); } } }; /********** Good Luck :) **********/ int main() { IOS(); return 0; }
[ "tmd910607@gmail.com" ]
tmd910607@gmail.com
0a6abf700e63dd49d3771a42cad6e2eff12b8e30
ca04a2ea63e047d29c3c55e3086a9a67dadfbff3
/Source/servers/GameServer/DataRsyncTools.cpp
2d4dbf7782ded57f1af570ce8c4145043ef1de82
[]
no_license
brucelevis/HMX-Server
0eebb7d248c578d6c930c15670927acaf4f13c3d
7b9e21c0771ee42db2842bb17d85d219c8e668d7
refs/heads/master
2020-08-03T17:37:44.209223
2016-06-13T08:49:39
2016-06-13T08:49:39
null
0
0
null
null
null
null
UTF-8
C++
false
false
485
cpp
#include "GameServer_PCH.h" #include "DataRsyncTools.h" DataRsyncTools::DataRsyncTools(ServerSession* pDbServer):m_pDbServer(pDbServer) { } void DataRsyncTools::SavaMixItemNumber(EMixItemNumberType eType,int64 nValue) { } void DataRsyncTools::SaveMixItemBinary(EMixItemBinaryType eType,const char* data,int32 nLen) { } int64 DataRsyncTools::GetMixNumber(EMixItemNumberType eType) { return 0; } void DataRsyncTools::GetMixNumber(EMixItemBinaryType eType,char* o_data) { }
[ "huangzuduan@qq.com" ]
huangzuduan@qq.com
60a943e4171a04d13f2ed297731fcbb6047dbafc
6264ccde72c90774ab05d7d6acc8668429ddbc49
/Engine/gkGameObjectInstance.cpp
65b7143b9e991addf6acde738d4644a796e19b46
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
blendkit/gamekit-playground-src
184eb933d9580ff49200d889a85e5648a04cd661
457f872fd69ebd12ed3c6125ee291a61a1725f00
refs/heads/master
2021-07-12T07:52:41.744125
2017-10-08T17:24:47
2017-10-08T17:24:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,239
cpp
/* ------------------------------------------------------------------------------- This file is part of OgreKit. http://gamekit.googlecode.com/ Copyright (c) 2006-2010 Charlie C. Contributor(s): Thomas Trocha (dertom) ------------------------------------------------------------------------------- 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 "gkGameObjectInstance.h" #include "gkGameObjectGroup.h" #include "gkGameObject.h" #include "gkGameObjectManager.h" #include "gkScene.h" #include "gkUtils.h" #include "gkLogger.h" #include "gkValue.h" #include "gkSkeleton.h" #include "gkEntity.h" #include "gkBone.h" #include "gkSkeletonResource.h" #include "gkGroupManager.h" gkGameObjectInstance::gkGameObjectInstance(gkInstancedManager* creator, const gkResourceName& name, const gkResourceHandle& handle) : gkInstancedObject(creator, name, handle), m_parent(0), m_scene(0), m_owner(0), m_uidName(gkString("/UID{" + gkToString((int)handle) + "}")), m_layer(0xFFFFFFFF) { } gkGameObjectInstance::~gkGameObjectInstance() { m_owner->removeEventListener(this); if (m_owner != 0) gkGameObjectManager::getSingleton().destroy(m_owner->getResourceHandle()); m_owner = 0; Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* gobj = iter.getNext().second; m_objInitialTransformstates.remove(gobj); GK_ASSERT(!gobj->isInstanced()); delete gobj; } m_objects.clear(); } void gkGameObjectInstance::_setExternalRoot(gkGameObjectGroup* group, gkGameObject* root) { GK_ASSERT(!m_parent); if (!m_parent) { m_parent = group; m_owner = root; if (root != 0) root->addEventListener(this); } } void gkGameObjectInstance::_updateFromGroup(gkGameObjectGroup* group) { GK_ASSERT(!m_parent); if (!m_parent) { m_parent = group; // create the root object m_owner = gkGameObjectManager::getSingleton().createObject(m_name); if (m_owner != 0) m_owner->addEventListener(this); } } void gkGameObjectInstance::addObject(gkGameObject* gobj) { if (!gobj) return; const gkResourceNameString& name = gobj->getName() + m_uidName; if (m_objects.find(name) != UT_NPOS) { gkLogMessage("GameObjectInstance: Duplicate object " << name.str() << "."); return; } gkGameObject* ngobj = gobj->cloneToScene(name.str(),m_owner->getOwner()); // store the inital-transformstates gkTransformState initalTransformState = ngobj->getTransformState(); m_objInitialTransformstates.insert(ngobj,initalTransformState); // modify the parent (if there is one) to fit the group's uid gkString propParent = ngobj->getProperties().m_parent; if (!propParent.empty()) { ngobj->getProperties().m_parent = propParent + m_uidName; } // store the new object using the original name and not the uid-name // making it easier to lookup an object by name m_objects.insert(gobj->getName(), ngobj); ngobj->_setOriginalName(gobj->getName()); // Lightly attach ngobj->_makeGroupInstance(this); gkScene* instanceScene = getRoot()->getOwner(); ngobj->setActiveLayer((instanceScene->getLayer() & m_layer) != 0); ngobj->setLayer(m_layer); } void gkGameObjectInstance::addGroupInstance(const gkGameObjectGroup::GroupInstance* grpDesc) { if (!grpDesc) return; gkGroupManager* mgr = gkGroupManager::getSingletonPtr(); if (mgr->exists(grpDesc->m_groupName)) { gkGameObjectGroup* ggobj = (gkGameObjectGroup*)mgr->getByName(grpDesc->m_groupName); gkScene* toScene = m_owner->getOwner(); // clone the root with all of its properties and logicbricks gkGameObject* rootClone = grpDesc->m_root->cloneToScene(gkUtils::getUniqueName(grpDesc->m_root->getName()),toScene); gkGameObjectInstance* inst = ggobj->createGroupInstance(toScene, gkResourceName(gkUtils::getUniqueName("gi"+grpDesc->m_root->getName()), ""), rootClone, toScene->getLayer()); gkGameObject* instRoot = inst->getRoot(); // store the inital-transformstates gkTransformState initalTransformState = instRoot->getTransformState(); m_objInitialTransformstates.insert(instRoot,initalTransformState); m_groupInstances.insert(grpDesc->m_root->getName(), inst); // modify the parent (if there is one) to fit the group's uid gkString propParent = instRoot->getProperties().m_parent; if (!propParent.empty()) { instRoot->getProperties().m_parent = propParent + m_uidName; } } } gkGameObject* gkGameObjectInstance::getObject(const gkHashedString& name) { UTsize pos; if ((pos = m_objects.find(name)) == UT_NPOS) { gkLogMessage("GameObjectInstance: Missing object " << name.str() << "."); return 0; } return m_objects.at(pos); } void gkGameObjectInstance::destroyObject(gkGameObject* gobj) { if (!gobj) return; if (gobj->getGroupInstance() != this) { gkLogMessage("GameObjectInstance: Attempting to remove an object that does not belong to this instance!"); return; } const gkHashedString name = gobj->getName(); UTsize pos; if ((pos = m_objects.find(name)) == UT_NPOS) { gkLogMessage("GameObjectInstance: Missing object " << name.str() << "."); return; } m_objects.remove(name); delete gobj; } void gkGameObjectInstance::destroyObject(const gkHashedString& name) { UTsize pos; if ((pos = m_objects.find(name)) == UT_NPOS) { gkLogMessage("GameObjectInstance: Missing object " << name.str() << "."); return; } gkGameObject* gobj = m_objects.at(pos); gobj->destroyInstance(); m_objects.remove(name); delete gobj; } bool gkGameObjectInstance::hasObject(const gkHashedString& name) { return m_objects.find(name) != UT_NPOS; } void gkGameObjectInstance::applyTransform(const gkTransformState& trans) { // if (!isInstanced()) // return; const gkMatrix4 plocal = trans.toMatrix(); Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* obj = iter.getNext().second; if (obj->hasParent()) { continue; } gkTransformState* initalTransformState = m_objInitialTransformstates.get(obj); if (initalTransformState){ // Update transform relative to owner gkMatrix4 clocal; initalTransformState->toMatrix(clocal); obj->setTransform(plocal * clocal); } } GroupInstances::Iterator grpInstIter = m_groupInstances.iterator(); while (grpInstIter.hasMoreElements()) { gkGameObjectInstance* ginst = grpInstIter.getNext().second; gkGameObject* obj = ginst->getRoot(); if (obj->hasParent()) { continue; } gkTransformState* initalTransformState = m_objInitialTransformstates.get(obj); // Update transform relative to owner gkMatrix4 clocal; initalTransformState->toMatrix(clocal); obj->setTransform(plocal * clocal); } } bool gkGameObjectInstance::hasObject(gkGameObject* gobj) { return gobj && m_objects.find(gobj->getName()) && gobj->getGroupInstance() == this; } void gkGameObjectInstance::cloneObjects(gkScene* scene, const gkTransformState& from, int time, const gkVector3& linearVelocity, bool tsLinLocal, const gkVector3& angularVelocity, bool tsAngLocal) { if (!isInstanced()) return; GK_ASSERT(scene); const gkMatrix4 plocal = from.toMatrix(); Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* oobj = iter.getNext().second; gkGameObject* nobj = scene->cloneObject(oobj, time); // be sure this info was not cloned! GK_ASSERT(!nobj->isGroupInstance()); // Update transform relative to owner gkGameObjectProperties& props = nobj->getProperties(); gkMatrix4 clocal; props.m_transform.toMatrix(clocal); // merge back to transform state props.m_transform = gkTransformState(plocal * clocal); nobj->createInstance(); if (props.isRigidOrDynamic() || props.isGhost()) { if (!linearVelocity.isZeroLength()) nobj->setLinearVelocity(linearVelocity, tsLinLocal ? TRANSFORM_LOCAL : TRANSFORM_PARENT); } if (props.isRigid()) { if (!angularVelocity.isZeroLength()) nobj->setAngularVelocity(angularVelocity, tsAngLocal ? TRANSFORM_LOCAL : TRANSFORM_PARENT); } } } void gkGameObjectInstance::createInstanceImpl(void) { if (!m_owner || !m_owner->getOwner()) { m_instanceState = ST_ERROR; m_instanceError = "Root object is not in any scene!"; return; } gkScene* scene = m_owner->getOwner(); m_owner->createInstance(); gkGameObjectSet parentingPhysicsObjs; // first check for entities that are parented to a skeleton { Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* gobj = iter.getNext().second; if (gobj->getType() == GK_ENTITY) { gkString parentName = gobj->getProperties().m_parent; gkGameObject* parent = NULL; Objects::Iterator iter2 = m_objects.iterator(); while (iter2.hasMoreElements()) { gkGameObject* pobj = iter2.getNext().second; if (pobj->getName()==parentName) { parent = pobj; break; } } if (parent && parent->getType()==GK_SKELETON){ gkSkeleton* skel; skel = static_cast<gkSkeleton*>(parent); gkEntity* ent; ent = static_cast<gkEntity*>(gobj); if (!gobj->getProperties().hasBoneParent()) { ent->setSkeleton(skel); gkSkeletonResource* skelRes = skel->getInternalSkeleton(); gkBone::BoneList::Iterator roots = skelRes->getRootBoneList().iterator(); } } } } } // now instantiate the group-instance-objects { Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* gobj = iter.getNext().second; gobj->setOwner(scene); gobj->createInstance(); parentingPhysicsObjs.insert(gobj); } } // instantiate nested group-instances { GroupInstances::Iterator iter = m_groupInstances.iterator(); while (iter.hasMoreElements()){ gkGameObjectInstance* inst = iter.getNext().second; inst->createInstance(); // add the group-instances root to be checked for parenting purposes parentingPhysicsObjs.insert(inst->getRoot()); } } scene->_applyBuiltinParents(parentingPhysicsObjs); applyTransform(m_owner->getTransformState()); scene->_applyBuiltinPhysics(parentingPhysicsObjs); } void gkGameObjectInstance::postCreateInstanceImpl(void) { } void gkGameObjectInstance::destroyInstanceImpl(void) { if (!m_owner || !m_owner->getOwner()) { m_instanceState = ST_ERROR; m_instanceError = "Root object is not in any scene!"; return; } Objects::Iterator iter = m_objects.iterator(); while (iter.hasMoreElements()) { gkGameObject* gobj = iter.getNext().second; gobj->destroyInstance(); gobj->setOwner(0); gobj->setParent(0); } GroupInstances::Iterator grpInstIter = m_groupInstances.iterator(); while (grpInstIter.hasMoreElements()) { gkGameObjectInstance* gobj = grpInstIter.getNext().second; gobj->destroyInstance(); } m_owner->destroyInstance(); } void gkGameObjectInstance::postDestroyInstanceImpl() { m_owner->getOwner()->notifyGroupInstanceDestroyed(this); } void gkGameObjectInstance::notifyGameObjectEvent(gkGameObject* gobj, const gkGameObject::Notifier::Event& id) { GK_ASSERT(gobj == m_owner); if (id == gkGameObject::Notifier::UPDATED) applyTransform(gobj->getWorldTransformState()); else if (id == gkGameObject::Notifier::INSTANCE_DESTROYED) destroyInstance(); }
[ "thomas.trocha@gmail.com" ]
thomas.trocha@gmail.com
7de4eba875d5fc5ea7bdbb0c30211f217467688a
2476e036866ebf861e834eb0ddb2a8cd49104285
/leetcode/leetcode56/merge_intervals.cpp
1e975a659c036d9fc31bfed5fa2708d11e51c466
[]
no_license
xchmwang/algorithm
7deaedecb58e3925cc23239020553ffed8cc3f04
55345160b6d8ef02bc89e01247b4dbd1bc094d5e
refs/heads/master
2021-09-17T23:54:40.785962
2018-07-07T06:40:27
2018-07-07T06:40:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,314
cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Interval { int start; int end; Interval() : start(0), end(0) {} Interval(int s, int e) : start(s), end(e) {} }; bool cmp(const Interval &i1, const Interval &i2) { if (i1.start != i2.start) return i1.start < i2.start; return i1.end > i2.end; } class Solution { public: vector<Interval> merge(vector<Interval>& intervals) { vector<Interval> ans; if (intervals.size() < 1) return ans; sort(intervals.begin(), intervals.end(), cmp); Interval interval; interval = intervals[0]; for (int i = 1; i < intervals.size(); ++i) { if (intervals[i].end<=interval.end || intervals[i].start==intervals[i-1].start) continue; if (intervals[i].start <= interval.end) interval.end = max(interval.end, intervals[i].end); else { ans.push_back(interval); interval = intervals[i]; } } ans.push_back(interval); return ans; } }; int main() { Interval a[] = {{2, 3}, {5, 5}, {2, 2}, {3, 4}, {3, 4}}; vector<Interval> v(a, a+sizeof(a)/sizeof(a[0])); Solution sol; vector<Interval> ans = sol.merge(v); for (int i = 0; i < ans.size(); ++i) cout << ans[i].start << ", " << ans[i].end << endl; return 0; }
[ "chmwang@zju.edu.cn" ]
chmwang@zju.edu.cn
3fb2fe6d85df75f456b2abfe50fcc7a270506881
0f941560b5740f790398a9862b4e4e7629aef9b7
/RunTime Polymorphism/memAccess.cpp
7cf01df3e7909700e1a5872acecc4ddbee474c45
[]
no_license
AniruddhaSadhukhan/C-Plus-Plus-Programs
0fde3ebb99e876fda20dae340ec3df7f279c808e
d7674178ba9fb93a7f583071cef60803093bae91
refs/heads/master
2021-10-24T23:14:01.670777
2019-01-02T06:30:41
2019-01-02T06:30:41
178,436,490
0
0
null
null
null
null
UTF-8
C++
false
false
492
cpp
#include<iostream> using namespace std; /*Write a C++ program to access members of base and derived classes using the pointer to objects of both the classes.*/ // by Aniruddha class Base { public: int x; Base() {} Base(int a) : x(a) {} }; class Child:public Base { public: int y; Child() {} Child(int a) : y(a) {} }; int main() { Base b(5); Child c(10); Base *bptr = &b; Child *cptr =&c; cout<<bptr->x<<endl; cout<<cptr->y<<endl; return 0; } /*Sample Output 5 10 */
[ "anisadhukhan1@gmail.com" ]
anisadhukhan1@gmail.com
d94e63336aef24bf14f8002ba409b3b8517d1ee8
54825a61aebae4f1bc978c74d893dfc09fcff53a
/Code/Algorithms/Dynamic Programming/Longest Path In Matrix/main.cpp
7519eab6937478fb5ffb12e4bac561a508f69c46
[]
no_license
tudor199/C-CPP
520a2e5135db51138514e3153c34120811005667
1dd2f3e914f73bdd4f5726e592fccf35f089fca9
refs/heads/master
2021-07-23T13:36:12.064200
2020-05-23T04:52:02
2020-05-23T04:52:02
172,348,824
0
0
null
null
null
null
UTF-8
C++
false
false
1,543
cpp
#include <iostream> #include <fstream> #define nMax 103 using namespace std; ifstream fin("file.in"); int v[nMax][nMax], dp[nMax][nMax] = {}; int n, m; inline max(int d[4], int dn){ int max_d = d[0]; for(int i = 1; i < dn; i ++){ if(max_d < d[i]){ max_d = d[i]; } } return (1 + max_d); } int longestpath(int i, int j){ if(dp[i][j]){ return dp[i][j]; } int d[4] = {},dn = 0; if(i > 1 && v[i - 1][j] > v[i][j]){ d[dn ++] = longestpath(i - 1, j); } if(i < n && v[i + 1][j] > v[i][j]){ d[dn ++] = longestpath(i + 1, j); } if(j > 1 && v[i][j - 1] > v[i][j]){ d[dn ++] = longestpath(i, j - 1); } if(j < m && v[i][j + 1] > v[i][j]){ d[dn ++] = longestpath(i, j + 1); } if(!dn){ dp[i][j] = 1; } else{ dp[i][j] = max(d, dn); } return dp[i][j]; } int main(){ int rez = 1; fin>>n>>m; for(int i = 1; i <= n; i ++){ for(int j = 1; j <= m; j ++){ fin>>v[i][j]; } } for(int i = 1; i <= n; i ++){ for(int j = 1; j <= m; j ++){ if(dp[i][j]){ continue; } dp[i][j] = longestpath(i, j); rez = max(rez, dp[i][j]); } } for(int i = 1; i <= n; i ++){ for(int j = 1; j <= m; j ++){ cout<<dp[i][j]<<" "; } cout<<"\n"; } cout<<rez; return 0; }
[ "tuddor144@gmail.com" ]
tuddor144@gmail.com
2e808339b4e70e58a24ed64469542d596f80a0e9
11a246743073e9d2cb550f9144f59b95afebf195
/kattis/cakeymccakeface.cpp
9ca7656564939fa49419225630fce56015c04ced
[]
no_license
ankitpriyarup/online-judge
b5b779c26439369cedc05c045af5511cbc3c980f
8a00ec141142c129bfa13a68dbf704091eae9588
refs/heads/master
2020-09-05T02:46:56.377213
2019-10-27T20:12:25
2019-10-27T20:12:25
219,959,932
0
1
null
2019-11-06T09:30:58
2019-11-06T09:30:57
null
UTF-8
C++
false
false
1,326
cpp
#include <iostream> #include <iomanip> #include <string> #include <sstream> #include <fstream> #include <cassert> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <numeric> #include <utility> #include <vector> #include <queue> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <bitset> #include <complex> using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; constexpr int MAXN = 2505; int n, m; ll a[MAXN], b[MAXN]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); scanf(" %d %d", &n, &m); for (int i = 0; i < n; ++i) { scanf(" %lld", a + i); } for (int i = 0; i < m; ++i) { scanf(" %lld", b + i); } ll ans = 0; ll score = 0; map<ll, ll> freq; for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { ll v = b[j] - a[i]; ++freq[v]; } } for (auto it : freq) { // printf("%lld %lld\n", it.first, it.second); if (it.first < 0) continue; if (it.second > score or (it.second == score and it.first < ans)) { ans = it.first; score = it.second; } } printf("%lld\n", ans); return 0; }
[ "arnavsastry@gmail.com" ]
arnavsastry@gmail.com
2e89f75fa54965856a1808e331ebf1622e51386f
a06515f4697a3dbcbae4e3c05de2f8632f8d5f46
/corpus/taken_from_cppcheck_tests/stolen_14167.cpp
8d3c0546324c8f5a5234e7cd4618022ee3808509
[]
no_license
pauldreik/fuzzcppcheck
12d9c11bcc182cc1f1bb4893e0925dc05fcaf711
794ba352af45971ff1f76d665b52adeb42dcab5f
refs/heads/master
2020-05-01T01:55:04.280076
2019-03-22T21:05:28
2019-03-22T21:05:28
177,206,313
0
0
null
null
null
null
UTF-8
C++
false
false
36
cpp
bool foo(bool x) { return x << 31; }
[ "github@pauldreik.se" ]
github@pauldreik.se
8a9ca27a37141b694611cc01ceccaf954208824a
92494691d9de19d64254d4a5e8c59c184773906f
/src/qt/optionsmodel.h
c4d73c5a8695b1387f2da8e1e1ce5057b0c684e1
[ "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
xagau/Placeholders-X16R
ffaad0c6b0cb24872932c6663c2d7ee4cc6c3c97
5f96720e1d7f5bd6d5b574d9f3c12485c265ef33
refs/heads/master
2022-01-24T03:58:04.558002
2022-01-13T22:21:18
2022-01-13T22:21:18
162,598,084
23
10
MIT
2021-04-23T03:09:01
2018-12-20T15:31:28
C++
UTF-8
C++
false
false
3,729
h
// Copyright (c) 2011-2016 The Bitcoin Core developers // Copyright (c) 2017 The Placeholder Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef PLACEH_QT_OPTIONSMODEL_H #define PLACEH_QT_OPTIONSMODEL_H #include "amount.h" #include <QAbstractListModel> QT_BEGIN_NAMESPACE class QNetworkProxy; QT_END_NAMESPACE /** Interface from Qt to configuration data structure for Placeh client. To Qt, the options are presented as a list with the different options laid out vertically. This can be changed to a tree once the settings become sufficiently complex. */ class OptionsModel : public QAbstractListModel { Q_OBJECT public: explicit OptionsModel(QObject *parent = 0, bool resetSettings = false); enum OptionID { StartAtStartup, // bool HideTrayIcon, // bool MinimizeToTray, // bool MapPortUPnP, // bool MinimizeOnClose, // bool ProxyUse, // bool ProxyIP, // QString ProxyPort, // int ProxyUseTor, // bool ProxyIPTor, // QString ProxyPortTor, // int DisplayUnit, // PlacehUnits::Unit ThirdPartyTxUrls, // QString Language, // QString CoinControlFeatures, // bool ThreadsScriptVerif, // int DatabaseCache, // int SpendZeroConfChange, // bool Listen, // bool CustomFeeFeatures, // bool OptionIDRowCount, }; void Init(bool resetSettings = false); void Reset(); int rowCount(const QModelIndex & parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole); /** Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal */ void setDisplayUnit(const QVariant &value); /* Explicit getters */ bool getHideTrayIcon() const { return fHideTrayIcon; } bool getMinimizeToTray() const { return fMinimizeToTray; } bool getMinimizeOnClose() const { return fMinimizeOnClose; } int getDisplayUnit() const { return nDisplayUnit; } QString getThirdPartyTxUrls() const { return strThirdPartyTxUrls; } bool getProxySettings(QNetworkProxy& proxy) const; bool getCoinControlFeatures() const { return fCoinControlFeatures; } bool getCustomFeeFeatures() const { return fCustomFeeFeatures; } const QString& getOverriddenByCommandLine() { return strOverriddenByCommandLine; } /* Restart flag helper */ void setRestartRequired(bool fRequired); bool isRestartRequired() const; private: /* Qt-only settings */ bool fHideTrayIcon; bool fMinimizeToTray; bool fMinimizeOnClose; QString language; int nDisplayUnit; QString strThirdPartyTxUrls; bool fCoinControlFeatures; /** PHL START*/ bool fCustomFeeFeatures; /** PHL END*/ /* settings that were overridden by command-line */ QString strOverriddenByCommandLine; // Add option to list of GUI options overridden through command line/config file void addOverriddenOption(const std::string &option); // Check settings version and upgrade default values if required void checkAndMigrate(); Q_SIGNALS: void displayUnitChanged(int unit); void coinControlFeaturesChanged(bool); void customFeeFeaturesChanged(bool); void hideTrayIconChanged(bool); }; #endif // PLACEH_QT_OPTIONSMODEL_H
[ "seanbeecroft@gmail.com" ]
seanbeecroft@gmail.com
9345b47966c2794067a02fe92f73a4165e7ceefe
161a19ad4b156a8cdf7304cc14c2fddafb66dbee
/Headers.h
b3ad725a1dfcf9fbb136fd4e4af3f4f72f50a413
[]
no_license
mattcrowley/Oh-No-Its-the-5-0-
6a2a24942d13943e2878235a4d6871cbb2738c36
f3639fce8d3578a7c5bc54c2d7c1a78ded579e55
refs/heads/master
2020-03-18T07:59:15.237469
2018-05-27T19:47:13
2018-05-27T19:47:13
134,482,258
0
0
null
null
null
null
UTF-8
C++
false
false
105
h
#include <iostream> #include <sstream> #include <SFML/Graphics.hpp> using std::cout; using std::string;
[ "mattcrowley123@hotmail.com" ]
mattcrowley123@hotmail.com
8336af704b84459dbe91e823e3dcb8673a7c0f24
3f3095dbf94522e37fe897381d9c76ceb67c8e4f
/Current/BP_Phys_GreatEggHunt_PaintedEgg.hpp
ea7f06f7dc46e439a1f93ef3b1dbc8c83ecfc68e
[]
no_license
DRG-Modding/Header-Dumps
763c7195b9fb24a108d7d933193838d736f9f494
84932dc1491811e9872b1de4f92759616f9fa565
refs/heads/main
2023-06-25T11:11:10.298500
2023-06-20T13:52:18
2023-06-20T13:52:18
399,652,576
8
7
null
null
null
null
UTF-8
C++
false
false
1,494
hpp
#ifndef UE4SS_SDK_BP_Phys_GreatEggHunt_PaintedEgg_HPP #define UE4SS_SDK_BP_Phys_GreatEggHunt_PaintedEgg_HPP class ABP_Phys_GreatEggHunt_PaintedEgg_C : public AActor { FPointerToUberGraphFrame UberGraphFrame; class UNiagaraComponent* Niagara; class UStaticMeshComponent* Mesh; class UCapsuleComponent* UseCapsule; class UGravityChangedComponent* GravityChanged; class UInstantUsable* InstantUsable; bool CanTriggerSound; FVector KickSoundLocation; class APlayerCharacter* KickedBy; int32 RandomPresentSound; TArray<class UTexture*> Textures_Eggs; int32 NumberOfImpacts; bool IsBroken; TArray<class UMaterialInterface*> Mats_Wrapper; class UMaterialInterface* UsedMaterial; class USoundCue* UsedSound; void OnRep_UsedMaterial(); void OnRep_RandomSeed(); void OnRep_NumberOfImpacts(); void OnRep_IsBroken(); void OnRep_KickSoundLocation(); void BndEvt__StaticMeshComponent0_K2Node_ComponentBoundEvent_0_ComponentHitSignature__DelegateSignature(class UPrimitiveComponent* HitComponent, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit); void BndEvt__InstantUsable_K2Node_ComponentBoundEvent_1_UsedBySignature__DelegateSignature(class APlayerCharacter* User, EInputKeys Key); void ReceiveBeginPlay(); void Play_Kick(class APlayerCharacter* Kicker); void ExecuteUbergraph_BP_Phys_GreatEggHunt_PaintedEgg(int32 EntryPoint); }; #endif
[ "bobby45900@gmail.com" ]
bobby45900@gmail.com
9dc2e64a8fdc7707ebd0cafbfdeb2cc40cf6a0d3
db97e3e6643f6d674032e6d6ae3cc03b8ceedb8d
/support/macOS/xerces-c/src/xercesc/validators/schema/XSDErrorReporter.hpp
fef8f45337a8f56349aebf2550f2e5e7f95b94b8
[ "Apache-2.0", "MIT" ]
permissive
audio-dsp/Max-Live-Environment
ddb302a1c945da7cea2cc62a17e0c5c2c7935a07
e0622c899c55ac9a73bcfce5aecdf99cc2618ed0
refs/heads/master
2020-06-12T08:32:06.458685
2019-06-07T02:15:17
2019-06-07T02:15:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,348
hpp
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * $Id$ */ #if !defined(XERCESC_INCLUDE_GUARD_XSDERRORREPORTER_HPP) #define XERCESC_INCLUDE_GUARD_XSDERRORREPORTER_HPP #include <xercesc/util/XMemory.hpp> XERCES_CPP_NAMESPACE_BEGIN class Locator; class XMLErrorReporter; /** * This class reports schema errors */ class VALIDATORS_EXPORT XSDErrorReporter : public XMemory { public: // ----------------------------------------------------------------------- // Constructors are hidden, only the virtual destructor is exposed // ----------------------------------------------------------------------- XSDErrorReporter(XMLErrorReporter* const errorReporter = 0); virtual ~XSDErrorReporter() { } // ----------------------------------------------------------------------- // Getter methods // ----------------------------------------------------------------------- bool getExitOnFirstFatal() const; // ----------------------------------------------------------------------- // Setter methods // ----------------------------------------------------------------------- void setErrorReporter(XMLErrorReporter* const errorReporter); void setExitOnFirstFatal(const bool newValue); // ----------------------------------------------------------------------- // Report error methods // ----------------------------------------------------------------------- void emitError(const unsigned int toEmit, const XMLCh* const msgDomain, const Locator* const aLocator); void emitError(const unsigned int toEmit, const XMLCh* const msgDomain, const Locator* const aLocator, const XMLCh* const text1, const XMLCh* const text2 = 0, const XMLCh* const text3 = 0, const XMLCh* const text4 = 0, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager ); void emitError(const XMLException& except, const Locator* const aLocator); private: // ----------------------------------------------------------------------- // Unimplemented constructors and destructor // ----------------------------------------------------------------------- XSDErrorReporter(const XSDErrorReporter&); XSDErrorReporter& operator=(const XSDErrorReporter&); // ----------------------------------------------------------------------- // Private data members // ----------------------------------------------------------------------- bool fExitOnFirstFatal; XMLErrorReporter* fErrorReporter; }; // --------------------------------------------------------------------------- // XSDErrorReporter: Getter methods // --------------------------------------------------------------------------- inline bool XSDErrorReporter::getExitOnFirstFatal() const { return fExitOnFirstFatal; } // --------------------------------------------------------------------------- // XSDErrorReporter: Setter methods // --------------------------------------------------------------------------- inline void XSDErrorReporter::setExitOnFirstFatal(const bool newValue) { fExitOnFirstFatal = newValue; } inline void XSDErrorReporter::setErrorReporter(XMLErrorReporter* const errorReporter) { fErrorReporter = errorReporter; } XERCES_CPP_NAMESPACE_END #endif
[ "jdm7dv@gmail.com" ]
jdm7dv@gmail.com
42985d96d281e8a780887df96f0376c0b9edd219
5d83739af703fb400857cecc69aadaf02e07f8d1
/Archive/1db66dd008810649b92688cc63b333c5/main.cpp
391dfac539b6856ccaf639a76cf8ac0c0c2fbfea
[]
no_license
WhiZTiM/coliru
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
2c72c048846c082f943e6c7f9fa8d94aee76979f
refs/heads/master
2021-01-01T05:10:33.812560
2015-08-24T19:09:22
2015-08-24T19:09:22
56,789,706
3
0
null
null
null
null
UTF-8
C++
false
false
288
cpp
#include <iostream> template<typename ...Arg> auto apply(Arg && ...arg) -> decltype(arg...) { std::cout << __PRETTY_FUNCTION__ << std::endl; return arg; } template<typename ...Args> void foo(Args && ...args) { apply<Args>(args)... ; } int main() { foo(1, false, 'c'); }
[ "francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df" ]
francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df
fa13cd0e444c65c0583223974053fe89e3665e7d
54989a1fdafea0b1bfbc83dd80a236c3a08b934d
/src/dataPump/widget.h
eb2864e4774bfc27a5aeca55c5e2ca1b3920456d
[]
no_license
linbin823/Qt.711.2016.JJSH
cd0b16df9c910e045787b6e30fae482a2ed80ca8
f8e311cb50029747bd08aeee010f913e06f5e148
refs/heads/master
2020-06-13T14:09:36.628460
2017-05-08T03:05:32
2017-05-08T03:05:32
75,369,273
3
0
null
null
null
null
UTF-8
C++
false
false
759
h
#ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include <QThread> #include <QTimer> #include <QList> #include <QHostAddress> #include <QNetworkInterface> #include <QFileDialog> #include "odbccomm.h" #include "modbustcpcomm.h" namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT public: explicit Widget(QWidget *parent = 0); ~Widget(); public slots: virtual void paintEvent(QPaintEvent * e); void stateUpdate(bool state); private slots: void on_exit_clicked(); void update(); void on_save_clicked(); void on_about_clicked(); private: Ui::Widget *ui; ModbusTCPComm* comm; odbcComm *db; QThread* dbThread; QTimer* timer; qint32 rollInterv; }; #endif // WIDGET_H
[ "13918814219@163.com" ]
13918814219@163.com
c2823d762e20d9d422f8d35168646d47795afd08
383da4b7cc0e8772a227d2f20f8a6e42339af558
/MatrizLedAFO.cpp
abe175e5f2b9cfb2afb3b63b86bde1a57fc71f8e
[]
no_license
elafosoy/MarcadorPadelArduino
1d836b082b7b7be61b751662f91abd5851ada283
48713464da15196ab782fbf413e1df64a263cdb6
refs/heads/main
2023-03-27T11:54:22.189344
2021-04-01T08:41:25
2021-04-01T08:41:25
341,131,832
1
0
null
null
null
null
UTF-8
C++
false
false
10,168
cpp
/* * Basado en https://github.com/wayoda/LedControl * A library for controling Leds with a MAX7219/MAX7221 * Copyright (c) 2007 Eberhard Fahle * * 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: * * This permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include "MatrizLedAFO.h" //the opcodes for the MAX7221 and MAX7219 #define OP_NOOP 0 #define OP_DIGIT0 1 #define OP_DIGIT1 2 #define OP_DIGIT2 3 #define OP_DIGIT3 4 #define OP_DIGIT4 5 #define OP_DIGIT5 6 #define OP_DIGIT6 7 #define OP_DIGIT7 8 #define OP_DECODEMODE 9 #define OP_INTENSITY 10 #define OP_SCANLIMIT 11 #define OP_SHUTDOWN 12 #define OP_DISPLAYTEST 15 MatrizLed::MatrizLed() { } void MatrizLed::begin(int dataPin, int clkPin, int csPin, int numDevices){ SPI_MOSI=dataPin; SPI_CLK=clkPin; SPI_CS=csPin; rotate = false; if(numDevices<=0 || numDevices>8 ) numDevices=8; maxDevices=numDevices; pinMode(SPI_MOSI,OUTPUT); pinMode(SPI_CLK,OUTPUT); pinMode(SPI_CS,OUTPUT); digitalWrite(SPI_CS,HIGH); SPI_MOSI=dataPin; for(int i=0;i<64;i++) status[i]=0x00; for(int i=0;i<maxDevices;i++) { spiTransfer(i,OP_DISPLAYTEST,0); //scanlimit is set to max on startup setScanLimit(i,7); //decode is done in source spiTransfer(i,OP_DECODEMODE,0); clearDisplay(i); //we go into shutdown-mode on startup shutdown(i,true); } //we have to init all devices in a loop for(int address=0; address<getDeviceCount(); address++) { /*The MAX72XX is in power-saving mode on startup*/ shutdown(address,false); /* Set the brightness to a medium values */ setIntensity(address,8); /* and clear the display */ clearDisplay(address); } } void MatrizLed::rotar(bool r){ rotate = r; } void MatrizLed::rotar_caracter(uint8_t original[8]){ uint8_t temporal[8] = {0,0,0,0,0,0,0,0}; for (int i=0; i<8; i++){ bitWrite(temporal[7], i, bitRead(original[i], 0)); bitWrite(temporal[6], i, bitRead(original[i], 1)); bitWrite(temporal[5], i, bitRead(original[i], 2)); bitWrite(temporal[4], i, bitRead(original[i], 3)); bitWrite(temporal[3], i, bitRead(original[i], 4)); bitWrite(temporal[2], i, bitRead(original[i], 5)); bitWrite(temporal[1], i, bitRead(original[i], 6)); bitWrite(temporal[0], i, bitRead(original[i], 7)); } memcpy(original, temporal, sizeof(temporal[0])*8); } int MatrizLed::getDeviceCount() { return maxDevices; } void MatrizLed::shutdown(int addr, bool b) { if(addr<0 || addr>=maxDevices) return; if(b) spiTransfer(addr, OP_SHUTDOWN,0); else spiTransfer(addr, OP_SHUTDOWN,1); } void MatrizLed::setScanLimit(int addr, int limit) { if(addr<0 || addr>=maxDevices) return; if(limit>=0 && limit<8) spiTransfer(addr, OP_SCANLIMIT,limit); } void MatrizLed::setIntensity(int addr, int intensity) { if(addr<0 || addr>=maxDevices) return; if(intensity>=0 && intensity<16) spiTransfer(addr, OP_INTENSITY,intensity); } void MatrizLed::clearDisplay(int addr) { int offset; if(addr<0 || addr>=maxDevices) return; offset=addr*8; for(int i=0;i<8;i++) { status[offset+i]=0; spiTransfer(addr, i+1,status[offset+i]); } } void MatrizLed::setLed(int addr, int row, int column, boolean state) { int offset; byte val=0x00; if(addr<0 || addr>=maxDevices) return; if(row<0 || row>7 || column<0 || column>7) return; offset=addr*8; val=B10000000 >> column; if(state) status[offset+row]=status[offset+row]|val; else { val=~val; status[offset+row]=status[offset+row]&val; } spiTransfer(addr, row+1,status[offset+row]); } void MatrizLed::setRow(int addr, int row, byte value) { int offset; if(addr<0 || addr>=maxDevices) return; if(row<0 || row>7) return; offset=addr*8; status[offset+row]=value; spiTransfer(addr, row+1,status[offset+row]); } void MatrizLed::setColumn(int addr, int col, byte value) { byte val; if(addr<0 || addr>=maxDevices) return; if(col<0 || col>7) return; for(int row=0;row<8;row++) { val=value >> (7-row); val=val & 0x01; setLed(addr,row,col,val); } } void MatrizLed::spiTransfer(int addr, volatile byte opcode, volatile byte data) { //Create an array with the data to shift out int offset=addr*2; int maxbytes=maxDevices*2; for(int i=0;i<maxbytes;i++) spidata[i]=(byte)0; //put our device data into the array spidata[offset+1]=opcode; spidata[offset]=data; //enable the line digitalWrite(SPI_CS,LOW); //Now shift out the data for(int i=maxbytes;i>0;i--) shiftOut(SPI_MOSI,SPI_CLK,MSBFIRST,spidata[i-1]); //latch the data onto the display digitalWrite(SPI_CS,HIGH); } void MatrizLed::borrar(){ for(int address=0;address<getDeviceCount();address++) { clearDisplay(address); } } void MatrizLed::escribirCaracter(char caracter, int posicion, bool mini) { int posicion_caracter; // por defecto un asterisco uint8_t codigocaracter[]= {B00000000, B00001000, B00101010, B00011100, B01110111, B00011100, B00101010, B00001000}; if (caracter >= 'A' && caracter <= 'Z'){ posicion_caracter = ((int)caracter - 'A') * 8; for(int i=0; i<8; i++){ //codigocaracter[i]=pgm_read_byte_near(tablaCaracteresMayuscula+i+posicion_caracter); codigocaracter[i]=pgm_read_byte_near(LETRAS+i+posicion_caracter); } }else if (caracter >= 'a' && caracter <= 'z'){ posicion_caracter = ((int)caracter - 'a') * 8; for(int i=0; i<8; i++){ //codigocaracter[i]=pgm_read_byte_near(tablaCaracteresMinuscula+i+posicion_caracter); codigocaracter[i]=pgm_read_byte_near(LETRAS+i+posicion_caracter); } }else if ((mini)&&(caracter >= '0' && caracter <= '9')){ posicion_caracter = ((int)caracter - '0') * 8; for(int i=0; i<8; i++){ //codigocaracter[i]=pgm_read_byte_near(tablaNumeros+i+posicion_caracter); codigocaracter[i]=pgm_read_byte_near(MINI_NUMS+i+posicion_caracter); } }else if (caracter >= '0' && caracter <= '9'){ posicion_caracter = ((int)caracter - '0') * 8; for(int i=0; i<8; i++){ //codigocaracter[i]=pgm_read_byte_near(tablaNumeros+i+posicion_caracter); codigocaracter[i]=pgm_read_byte_near(NUMS+i+posicion_caracter); } }else if (caracter == ' '){ for(int i=0; i<8; i++){ codigocaracter[i]=0; } } // if (rotate) // rotar_caracter(codigocaracter); if (!rotate){ for(int i=0; i<8; i++){ int address = 0; int posendisplay = posicion + i; while (posendisplay > 7){ address++; posendisplay -= 8; } if (address > getDeviceCount() -1 ) return; setRow(address, posendisplay, codigocaracter[i]); } } else{ posicion = ((getDeviceCount()-1)*8)-posicion-1; for(int i=7; i>=0; i--){ int address = getDeviceCount()-1; int posendisplay = posicion - i; while (posendisplay < 0){ address--; posendisplay += 8; } if (address < -1) return; setColumn(address, posendisplay, codigocaracter[i]); } } } void MatrizLed::escribirFrase(const char* frase){ escribirFrase(frase, 0); } void MatrizLed::escribirFrase(const char* frase, int posicion, bool mini){ for (size_t i=0; i < strlen(frase); i++){ escribirCaracter(frase[i], (i*8)+posicion,mini); } } void MatrizLed::escribirCifra(int cifra, int posicion){ char formateado[getDeviceCount()+1]; // Array donde se almacenará el valor formateado (un caracter por pantalla caracteres mas fin de linea) // sprintf con longitud dinamica no funciona en arduino :( // sprintf(formateado, "%.*d", getDeviceCount(), cifra); // guardamos el valor del contador, formateado con dos espacios, como cadena de texto dtostrf(cifra, getDeviceCount(), 0, formateado); escribirFrase(formateado, posicion); } void MatrizLed::escribirCifra(int cifra){ escribirCifra(cifra, 0); } void MatrizLed::escribirFraseScroll(const char* frase, unsigned long pausa){ int inicio = getDeviceCount() * 8; int npasos = strlen(frase) * 8; for(int i = inicio; i > -npasos; i--){ escribirFrase(frase, i); delay(pausa); } } void MatrizLed::setIntensidad(int intensidad){ for(int address=0; address<getDeviceCount(); address++) { setIntensity(address, intensidad); } } void MatrizLed::apagar(){ for(int address=0; address<getDeviceCount(); address++) { shutdown(address, true); } } void MatrizLed::encender(){ for(int address=0; address<getDeviceCount(); address++) { shutdown(address, false); } }
[ "alberto.fernandez@berton.es" ]
alberto.fernandez@berton.es
ab5fba54eea1701287edc3b122a9ec38883a7cc3
8f0df78da804589a779a8dd5590f41012a5932dc
/src/main.cpp
bf846bfb0183c7ae882e4633d65288779254fb14
[]
no_license
Light-Wizzard/CMlyst
d7fc89ec3c4f64a9cc0821d297b54b43a193be2d
c37ea76ab0f6342f27f8e9ac57cb41f3a6624173
refs/heads/master
2023-04-06T13:43:23.113771
2021-04-22T18:14:22
2021-04-22T18:14:22
151,146,914
0
0
null
2018-10-01T19:31:40
2018-10-01T19:31:39
null
UTF-8
C++
false
false
1,523
cpp
/* * Copyright (C) 2021 Daniel Nicoletti <dantti12@gmail.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <QCoreApplication> #include <Cutelyst/WSGI/wsgi.h> #include "cmlyst.h" int main(int argc, char *argv[]) { QCoreApplication::setOrganizationName(QStringLiteral("Cutelyst")); QCoreApplication::setOrganizationDomain(QStringLiteral("cutelyst.org")); QCoreApplication::setApplicationName(QStringLiteral("cutelyst-wsgi")); QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0")); CWSGI::WSGI server; server.setStaticMap({ QStringLiteral("/static=root/static") }); server.setChdir2(QStringLiteral(CMLYST_ROOT)); QCoreApplication app(argc, argv); server.parseCommandLine(app.arguments()); return server.exec(new CMlyst{}); }
[ "dantti12@gmail.com" ]
dantti12@gmail.com
861e70b2e380950bfd65de407432a793f0830b4b
8f8c7f4d1a2aea6a8d6ef569b54fafd62b507386
/esp32/serialed/com.ino
03e05b7cefd52f16af83901f631cee304cc24e7f
[]
no_license
chevalvert/serialed
46b71ddbc4bd6e6bf284157eff53d2aca9cf02a8
3d1f1b1b7e6ff91f522e2a267cfcef1d46770d00
refs/heads/master
2020-04-18T14:24:59.609021
2019-01-25T17:44:57
2019-01-25T17:44:57
167,588,033
0
0
null
2019-01-25T17:42:02
2019-01-25T17:41:56
C++
UTF-8
C++
false
false
1,319
ino
#define BYTE_START_FRAME 253 #define BYTE_STOP_FRAME 254 #define BYTE_MSG_END 255 int readSize = 0; unsigned long lastPing = 0; void com_init() { Serial.begin(BAUDRATE); Serial.print("\n"); Serial.print("READY\n"); } bool com_loop() { // PING if ((millis() - lastPing) > 1000) { Serial.print("WAIT\n"); lastPing = millis(); } // RECEIVE readSize = Serial.readBytesUntil(BYTE_MSG_END, framebuffer, BUFFERSIZE); if (readSize == 0) { Serial.print("WAIT\n"); return false; } lastPing = millis(); // ECHO // Serial.print("GOT "+String(readSize)+" bytes: "); // for (int k=0; k<(readSize); k+=1) { // Serial.print(data[k]); // Serial.print(" "); // } // Serial.print("\n"); // CONFIRM INTEGRITY // Byte 0 = BYTE_START_FRAME // Byte N = BYTE_STOP_FRAME if (framebuffer[0] == BYTE_START_FRAME) { if (framebuffer[readSize-1] == BYTE_STOP_FRAME) { if (readSize-2 == FRAMESIZE) { // DRAW Serial.print("DRAW "+String(newFrame)+"\n"); return true; } else Serial.print("ERROR wrong frame length, expected "+String(FRAMESIZE)+" received "+String(readSize-2)+"\n"); } else Serial.print("ERROR frame incomplete\n"); } else Serial.print("ERROR first byte is invalid\n"); return false; }
[ "thomas.bohl@gmail.com" ]
thomas.bohl@gmail.com
c53376d930af24ebf0d24a5e0e7b014c61a1f642
cb796fe6cdd2b58782cd5bbd6b7bd29d4ea6a298
/f1000/doc/fwsdk/IQA_LIB_uBlaze_rev1_5/include/hxx/ADC1_CH7.hxx
5e506eccb3f6b17e8b807df2f68c407c92bca895
[]
no_license
IQAnalog/iqa_external
b0098d5102d8d7b462993fce081544bd2db00e52
13e2c782699f962fb19de9987933cbef66b47ce1
refs/heads/master
2023-03-23T13:46:16.550707
2021-03-24T18:03:22
2021-03-24T18:03:22
350,906,829
0
1
null
null
null
null
UTF-8
C++
false
false
2,818
hxx
//******************************************************************************* // __ __ * // / \/ \ * // \ \ * // I Q - A N A L O G * // \ \ IQ-Analog Corp * // \__/\__/ www.iqanalog.com * // * //------------------------------------------------------------------------------* // * // Copyright (C) 2018-2019 IQ-Analog Corp. All rights reserved. * // * //------------------------------------------------------------------------------* // IQ-Analog CONFIDENTIAL * //------------------------------------------------------------------------------* // * // This file is released with "Government Purpose Rights" as defined * // in DFARS SUBPART 227.71, clause 252.227-7013. * // * //******************************************************************************* // Generated by RMM 3.3 // IQ-Analog Corp. 2013-2018. #ifndef __ADC1_CH7_HXX__ #define __ADC1_CH7_HXX__ #define ADC1_CH7_TDC_LUT00 (REG_ADC1_CH7+0x0) #define ADC1_CH7_TDC_LUT01 (REG_ADC1_CH7+0x4) #define ADC1_CH7_TDC_LUT02 (REG_ADC1_CH7+0x8) #define ADC1_CH7_TDC_LUT03 (REG_ADC1_CH7+0xc) #define ADC1_CH7_TDC_LUT04 (REG_ADC1_CH7+0x10) #define ADC1_CH7_TDC_LUT05 (REG_ADC1_CH7+0x14) #define ADC1_CH7_TDC_LUT06 (REG_ADC1_CH7+0x18) #define ADC1_CH7_TDC_LUT07 (REG_ADC1_CH7+0x1c) #define ADC1_CH7_TDC_LUT08 (REG_ADC1_CH7+0x20) #define ADC1_CH7_TDC_BUS_ACCESS (REG_ADC1_CH7+0x24) #define ADC1_CH7_TDC_OFFSET_AND_GAIN (REG_ADC1_CH7+0x28) #define ADC1_CH7_TDC_TI_CAL (REG_ADC1_CH7+0x2c) #define ADC1_CH7_TDC_MISC (REG_ADC1_CH7+0x30) #define ADC1_CH7_TDC_CAL (REG_ADC1_CH7+0x34) #define ADC1_CH7_TDC_DITHER (REG_ADC1_CH7+0x38) #define ADC1_CH7_TDC_BIT_WEIGHTS0 (REG_ADC1_CH7+0x3c) #define ADC1_CH7_TDC_BIT_WEIGHTS1 (REG_ADC1_CH7+0x40) #define ADC1_CH7_TDC_STATUS (REG_ADC1_CH7+0x44) #endif /* __ADC1_CH7_HXX__ */
[ "rudyl@iqanalog.com" ]
rudyl@iqanalog.com
d0e20b8ff4943efb63ed60bfa0b7b6a6e68c3f8f
789b29015b3365e6271ff9a575494f008b11b80d
/moses/TranslationModel/UG/mm/ug_im_bitext.cc
9f26a181b06a89fa87156910792aa7771fa6d21c
[]
no_license
unhammer/mosesdecoder
0bf59d835c3a3713a787fea78723e62830902705
324b1a9b56471277992dfe729807946c7c7f8689
refs/heads/master
2020-12-11T05:38:13.318619
2015-04-29T19:20:54
2015-04-29T19:20:54
34,814,200
0
0
null
2015-04-29T19:35:48
2015-04-29T19:35:48
null
UTF-8
C++
false
false
2,257
cc
#include "ug_im_bitext.h" namespace Moses { namespace bitext { template<> sptr<imBitext<L2R_Token<SimpleWordId> > > imBitext<L2R_Token<SimpleWordId> >:: add(vector<string> const& s1, vector<string> const& s2, vector<string> const& aln) const { typedef L2R_Token<SimpleWordId> TKN; assert(s1.size() == s2.size() && s1.size() == aln.size()); #ifndef NDEBUG size_t first_new_snt = this->T1 ? this->T1->size() : 0; #endif sptr<imBitext<TKN> > ret; { boost::unique_lock<boost::shared_mutex> guard(m_lock); ret.reset(new imBitext<TKN>(*this)); } // we add the sentences in separate threads (so it's faster) boost::thread thread1(snt_adder<TKN>(s1,*ret->V1,ret->myT1,ret->myI1)); // thread1.join(); // for debugging boost::thread thread2(snt_adder<TKN>(s2,*ret->V2,ret->myT2,ret->myI2)); BOOST_FOREACH(string const& a, aln) { istringstream ibuf(a); ostringstream obuf; uint32_t row,col; char c; while (ibuf >> row >> c >> col) { UTIL_THROW_IF2(c != '-', "[" << HERE << "] " << "Error in alignment information:\n" << a); binwrite(obuf,row); binwrite(obuf,col); } // important: DO NOT replace the two lines below this comment by // char const* x = obuf.str().c_str(), as the memory x is pointing // to is freed immediately upon deconstruction of the string object. string foo = obuf.str(); char const* x = foo.c_str(); vector<char> v(x,x+foo.size()); ret->myTx = append(ret->myTx, v); } thread1.join(); thread2.join(); ret->Tx = ret->myTx; ret->T1 = ret->myT1; ret->T2 = ret->myT2; ret->I1 = ret->myI1; ret->I2 = ret->myI2; #ifndef NDEBUG // sanity check for (size_t i = first_new_snt; i < ret->T1->size(); ++i) { size_t slen1 = ret->T1->sntLen(i); size_t slen2 = ret->T2->sntLen(i); char const* p = ret->Tx->sntStart(i); char const* q = ret->Tx->sntEnd(i); size_t k; while (p < q) { p = binread(p,k); assert(p); assert(p < q); assert(k < slen1); p = binread(p,k); assert(p); assert(k < slen2); } } #endif return ret; } } }
[ "Ulrich.Germann@gmail.com" ]
Ulrich.Germann@gmail.com
7b28c17e11eb0f7bd0b529030613125e0969932e
0641d87fac176bab11c613e64050330246569e5c
/branches/eric/lodrop/source/i18n/gregocal.cpp
9d92cfd525801eb33fbeee63e1735c4b2ad4bf4a
[ "ICU", "LicenseRef-scancode-unicode" ]
permissive
svn2github/libicu_full
ecf883cedfe024efa5aeda4c8527f227a9dbf100
f1246dcb7fec5a23ebd6d36ff3515ff0395aeb29
refs/heads/master
2021-01-01T17:00:58.555108
2015-01-27T16:59:40
2015-01-27T16:59:40
9,308,333
0
2
null
null
null
null
UTF-8
C++
false
false
50,892
cpp
/* ******************************************************************************* * Copyright (C) 1997-2006, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* * * File GREGOCAL.CPP * * Modification History: * * Date Name Description * 02/05/97 clhuang Creation. * 03/28/97 aliu Made highly questionable fix to computeFields to * handle DST correctly. * 04/22/97 aliu Cleaned up code drastically. Added monthLength(). * Finished unimplemented parts of computeTime() for * week-based date determination. Removed quetionable * fix and wrote correct fix for computeFields() and * daylight time handling. Rewrote inDaylightTime() * and computeFields() to handle sensitive Daylight to * Standard time transitions correctly. * 05/08/97 aliu Added code review changes. Fixed isLeapYear() to * not cutover. * 08/12/97 aliu Added equivalentTo. Misc other fixes. Updated * add() from Java source. * 07/28/98 stephen Sync up with JDK 1.2 * 09/14/98 stephen Changed type of kOneDay, kOneWeek to double. * Fixed bug in roll() * 10/15/99 aliu Fixed j31, incorrect WEEK_OF_YEAR computation. * 10/15/99 aliu Fixed j32, cannot set date to Feb 29 2000 AD. * {JDK bug 4210209 4209272} * 11/15/99 weiv Added YEAR_WOY and DOW_LOCAL computation * to timeToFields method, updated kMinValues, kMaxValues & kLeastMaxValues * 12/09/99 aliu Fixed j81, calculation errors and roll bugs * in year of cutover. * 01/24/2000 aliu Revised computeJulianDay for YEAR YEAR_WOY WOY. ******************************************************************************** */ #include "unicode/utypes.h" #include <float.h> #if !UCONFIG_NO_FORMATTING #include "unicode/gregocal.h" #include "gregoimp.h" #include "umutex.h" #include "uassert.h" // ***************************************************************************** // class GregorianCalendar // ***************************************************************************** /** * Note that the Julian date used here is not a true Julian date, since * it is measured from midnight, not noon. This value is the Julian * day number of January 1, 1970 (Gregorian calendar) at noon UTC. [LIU] */ static const int32_t kNumDays[] = {0,31,59,90,120,151,181,212,243,273,304,334}; // 0-based, for day-in-year static const int32_t kLeapNumDays[] = {0,31,60,91,121,152,182,213,244,274,305,335}; // 0-based, for day-in-year static const int32_t kMonthLength[] = {31,28,31,30,31,30,31,31,30,31,30,31}; // 0-based static const int32_t kLeapMonthLength[] = {31,29,31,30,31,30,31,31,30,31,30,31}; // 0-based // setTimeInMillis() limits the Julian day range to +/-7F000000. // This would seem to limit the year range to: // ms=+183882168921600000 jd=7f000000 December 20, 5828963 AD // ms=-184303902528000000 jd=81000000 September 20, 5838270 BC // HOWEVER, CalendarRegressionTest/Test4167060 shows that the actual // range limit on the year field is smaller (~ +/-140000). [alan 3.0] static const int32_t kGregorianCalendarLimits[UCAL_FIELD_COUNT][4] = { // Minimum Greatest Least Maximum // Minimum Maximum { 0, 0, 1, 1 }, // ERA { 1, 1, 140742, 144683 }, // YEAR { 0, 0, 11, 11 }, // MONTH { 1, 1, 52, 53 }, // WEEK_OF_YEAR { 0, 0, 4, 6 }, // WEEK_OF_MONTH { 1, 1, 28, 31 }, // DAY_OF_MONTH { 1, 1, 365, 366 }, // DAY_OF_YEAR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// DAY_OF_WEEK { -1, -1, 4, 6 }, // DAY_OF_WEEK_IN_MONTH {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// AM_PM {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// HOUR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// HOUR_OF_DAY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// MINUTE {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// SECOND {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// MILLISECOND {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// ZONE_OFFSET {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// DST_OFFSET { -140742, -140742, 140742, 144683 }, // YEAR_WOY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// DOW_LOCAL { -140742, -140742, 140742, 144683 }, // EXTENDED_YEAR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// JULIAN_DAY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1} // MILLISECONDS_IN_DAY }; /* * <pre> * Greatest Least * Field name Minimum Minimum Maximum Maximum * ---------- ------- ------- ------- ------- * ERA 0 0 1 1 * YEAR 1 1 140742 144683 * MONTH 0 0 11 11 * WEEK_OF_YEAR 1 1 52 53 * WEEK_OF_MONTH 0 0 4 6 * DAY_OF_MONTH 1 1 28 31 * DAY_OF_YEAR 1 1 365 366 * DAY_OF_WEEK 1 1 7 7 * DAY_OF_WEEK_IN_MONTH -1 -1 4 6 * AM_PM 0 0 1 1 * HOUR 0 0 11 11 * HOUR_OF_DAY 0 0 23 23 * MINUTE 0 0 59 59 * SECOND 0 0 59 59 * MILLISECOND 0 0 999 999 * ZONE_OFFSET -12* -12* 12* 12* * DST_OFFSET 0 0 1* 1* * YEAR_WOY 1 1 140742 144683 * DOW_LOCAL 1 1 7 7 * </pre> * (*) In units of one-hour */ #if defined( U_DEBUG_CALSVC ) || defined (U_DEBUG_CAL) #include <stdio.h> #endif U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GregorianCalendar) // 00:00:00 UTC, October 15, 1582, expressed in ms from the epoch. // Note that only Italy and other Catholic countries actually // observed this cutover. Most other countries followed in // the next few centuries, some as late as 1928. [LIU] // in Java, -12219292800000L //const UDate GregorianCalendar::kPapalCutover = -12219292800000L; static const uint32_t kCutoverJulianDay = 2299161; static const UDate kPapalCutover = (2299161.0 - kEpochStartAsJulianDay) * U_MILLIS_PER_DAY; //static const UDate kPapalCutoverJulian = (2299161.0 - kEpochStartAsJulianDay); // ------------------------------------- GregorianCalendar::GregorianCalendar(UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(TimeZone* zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const TimeZone& zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const Locale& aLocale, UErrorCode& status) : Calendar(TimeZone::createDefault(), aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(TimeZone* zone, const Locale& aLocale, UErrorCode& status) : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& status) : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); set(UCAL_HOUR_OF_DAY, hour); set(UCAL_MINUTE, minute); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); set(UCAL_HOUR_OF_DAY, hour); set(UCAL_MINUTE, minute); set(UCAL_SECOND, second); } // ------------------------------------- GregorianCalendar::~GregorianCalendar() { } // ------------------------------------- GregorianCalendar::GregorianCalendar(const GregorianCalendar &source) : Calendar(source), fGregorianCutover(source.fGregorianCutover), fCutoverJulianDay(source.fCutoverJulianDay), fNormalizedGregorianCutover(source.fNormalizedGregorianCutover), fGregorianCutoverYear(source.fGregorianCutoverYear), fIsGregorian(source.fIsGregorian), fInvertGregorian(source.fInvertGregorian) { } // ------------------------------------- Calendar* GregorianCalendar::clone() const { return new GregorianCalendar(*this); } // ------------------------------------- GregorianCalendar & GregorianCalendar::operator=(const GregorianCalendar &right) { if (this != &right) { Calendar::operator=(right); fGregorianCutover = right.fGregorianCutover; fNormalizedGregorianCutover = right.fNormalizedGregorianCutover; fGregorianCutoverYear = right.fGregorianCutoverYear; fCutoverJulianDay = right.fCutoverJulianDay; } return *this; } // ------------------------------------- UBool GregorianCalendar::isEquivalentTo(const Calendar& other) const { // Calendar override. return Calendar::isEquivalentTo(other) && fGregorianCutover == ((GregorianCalendar*)&other)->fGregorianCutover; } // ------------------------------------- void GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status) { if (U_FAILURE(status)) return; fGregorianCutover = date; // Precompute two internal variables which we use to do the actual // cutover computations. These are the normalized cutover, which is the // midnight at or before the cutover, and the cutover year. The // normalized cutover is in pure date milliseconds; it contains no time // of day or timezone component, and it used to compare against other // pure date values. int32_t cutoverDay = (int32_t)Math::floorDivide(fGregorianCutover, (double)kOneDay); fNormalizedGregorianCutover = cutoverDay * kOneDay; // Handle the rare case of numeric overflow. If the user specifies a // change of UDate(Long.MIN_VALUE), in order to get a pure Gregorian // calendar, then the epoch day is -106751991168, which when multiplied // by ONE_DAY gives 9223372036794351616 -- the negative value is too // large for 64 bits, and overflows into a positive value. We correct // this by using the next day, which for all intents is semantically // equivalent. if (cutoverDay < 0 && fNormalizedGregorianCutover > 0) { fNormalizedGregorianCutover = (cutoverDay + 1) * kOneDay; } // Normalize the year so BC values are represented as 0 and negative // values. GregorianCalendar *cal = new GregorianCalendar(getTimeZone(), status); /* test for NULL */ if (cal == 0) { status = U_MEMORY_ALLOCATION_ERROR; return; } if(U_FAILURE(status)) return; cal->setTime(date, status); fGregorianCutoverYear = cal->get(UCAL_YEAR, status); if (cal->get(UCAL_ERA, status) == BC) fGregorianCutoverYear = 1 - fGregorianCutoverYear; fCutoverJulianDay = cutoverDay; delete cal; } void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, dayOfMonth, dayOfYear; if(U_FAILURE(status)) { return; } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd%d- (greg's %d)- [cut=%d]\n", __FILE__, __LINE__, julianDay, getGregorianDayOfYear(), fCutoverJulianDay); #endif if (julianDay >= fCutoverJulianDay) { month = getGregorianMonth(); dayOfMonth = getGregorianDayOfMonth(); dayOfYear = getGregorianDayOfYear(); eyear = getGregorianYear(); } else { // The Julian epoch day (not the same as Julian Day) // is zero on Saturday December 30, 0 (Gregorian). int32_t julianEpochDay = julianDay - (kJan1_1JulianDay - 2); eyear = (int32_t) Math::floorDivide(4*julianEpochDay + 1464, 1461); // Compute the Julian calendar day number for January 1, eyear int32_t january1 = 365*(eyear-1) + Math::floorDivide(eyear-1, (int32_t)4); dayOfYear = (julianEpochDay - january1); // 0-based // Julian leap years occurred historically every 4 years starting // with 8 AD. Before 8 AD the spacing is irregular; every 3 years // from 45 BC to 9 BC, and then none until 8 AD. However, we don't // implement this historical detail; instead, we implement the // computatinally cleaner proleptic calendar, which assumes // consistent 4-year cycles throughout time. UBool isLeap = ((eyear&0x3) == 0); // equiv. to (eyear%4 == 0) // Common Julian/Gregorian calculation int32_t correction = 0; int32_t march1 = isLeap ? 60 : 59; // zero-based DOY for March 1 if (dayOfYear >= march1) { correction = isLeap ? 1 : 2; } month = (12 * (dayOfYear + correction) + 6) / 367; // zero-based month dayOfMonth = dayOfYear - (isLeap?kLeapNumDays[month]:kNumDays[month]) + 1; // one-based DOM ++dayOfYear; #if defined (U_DEBUG_CAL) // fprintf(stderr, "%d - %d[%d] + 1\n", dayOfYear, isLeap?kLeapNumDays[month]:kNumDays[month], month ); // fprintf(stderr, "%s:%d: greg's HCF %d -> %d/%d/%d not %d/%d/%d\n", // __FILE__, __LINE__,julianDay, // eyear,month,dayOfMonth, // getGregorianYear(), getGregorianMonth(), getGregorianDayOfMonth() ); fprintf(stderr, "%s:%d: doy %d (greg's %d)- [cut=%d]\n", __FILE__, __LINE__, dayOfYear, getGregorianDayOfYear(), fCutoverJulianDay); #endif } // [j81] if we are after the cutover in its year, shift the day of the year if((eyear == fGregorianCutoverYear) && (julianDay >= fCutoverJulianDay)) { //from handleComputeMonthStart int32_t gregShift = Grego::gregorianShift(eyear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: gregorian shift %d ::: doy%d => %d [cut=%d]\n", __FILE__, __LINE__,gregShift, dayOfYear, dayOfYear+gregShift, fCutoverJulianDay); #endif dayOfYear += gregShift; } internalSet(UCAL_MONTH, month); internalSet(UCAL_DAY_OF_MONTH, dayOfMonth); internalSet(UCAL_DAY_OF_YEAR, dayOfYear); internalSet(UCAL_EXTENDED_YEAR, eyear); int32_t era = AD; if (eyear < 1) { era = BC; eyear = 1 - eyear; } internalSet(UCAL_ERA, era); internalSet(UCAL_YEAR, eyear); } // ------------------------------------- UDate GregorianCalendar::getGregorianChange() const { return fGregorianCutover; } // ------------------------------------- UBool GregorianCalendar::isLeapYear(int32_t year) const { // MSVC complains bitterly if we try to use Grego::isLeapYear here // NOTE: year&0x3 == year%4 return (year >= fGregorianCutoverYear ? (((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0))) : // Gregorian ((year&0x3) == 0)); // Julian } // ------------------------------------- int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) { fInvertGregorian = FALSE; int32_t jd = Calendar::handleComputeJulianDay(bestField); if((bestField == UCAL_WEEK_OF_YEAR) && // if we are doing WOY calculations, we are counting relative to Jan 1 *julian* (internalGet(UCAL_EXTENDED_YEAR)==fGregorianCutoverYear) && jd >= fCutoverJulianDay) { fInvertGregorian = TRUE; // So that the Julian Jan 1 will be used in handleComputeMonthStart return Calendar::handleComputeJulianDay(bestField); } // The following check handles portions of the cutover year BEFORE the // cutover itself happens. //if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd [invert] %d\n", __FILE__, __LINE__, jd); #endif fInvertGregorian = TRUE; jd = Calendar::handleComputeJulianDay(bestField); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: fIsGregorian %s, fInvertGregorian %s - ", __FILE__, __LINE__,fIsGregorian?"T":"F", fInvertGregorian?"T":"F"); fprintf(stderr, " jd NOW %d\n", jd); #endif } else { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd [==] %d - %sfIsGregorian %sfInvertGregorian, %d\n", __FILE__, __LINE__, jd, fIsGregorian?"T":"F", fInvertGregorian?"T":"F", bestField); #endif } if(fIsGregorian && (internalGet(UCAL_EXTENDED_YEAR) == fGregorianCutoverYear)) { int32_t gregShift = Grego::gregorianShift(internalGet(UCAL_EXTENDED_YEAR)); if (bestField == UCAL_DAY_OF_YEAR) { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: [DOY%d] gregorian shift of JD %d += %d\n", __FILE__, __LINE__, fFields[bestField],jd, gregShift); #endif jd -= gregShift; } else if ( bestField == UCAL_WEEK_OF_MONTH ) { int32_t weekShift = 14; #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: [WOY/WOM] gregorian week shift of %d += %d\n", __FILE__, __LINE__, jd, weekShift); #endif jd += weekShift; // shift by weeks for week based fields. } } return jd; } int32_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const { GregorianCalendar *nonConstThis = (GregorianCalendar*)this; // cast away const // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { eyear += Math::floorDivide(month, 12, month); } UBool isLeap = eyear%4 == 0; int32_t y = eyear-1; int32_t julianDay = 365*y + Math::floorDivide(y, 4) + (kJan1_1JulianDay - 3); nonConstThis->fIsGregorian = (eyear >= fGregorianCutoverYear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: (hcms%d/%d) fIsGregorian %s, fInvertGregorian %s\n", __FILE__, __LINE__, eyear,month, fIsGregorian?"T":"F", fInvertGregorian?"T":"F"); #endif if (fInvertGregorian) { nonConstThis->fIsGregorian = !fIsGregorian; } if (fIsGregorian) { isLeap = isLeap && ((eyear%100 != 0) || (eyear%400 == 0)); // Add 2 because Gregorian calendar starts 2 days after // Julian calendar int32_t gregShift = Grego::gregorianShift(eyear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: (hcms%d/%d) gregorian shift of %d += %d\n", __FILE__, __LINE__, eyear, month, julianDay, gregShift); #endif julianDay += gregShift; } // At this point julianDay indicates the day BEFORE the first // day of January 1, <eyear> of either the Julian or Gregorian // calendar. if (month != 0) { julianDay += isLeap?kLeapNumDays[month]:kNumDays[month]; } return julianDay; } int32_t GregorianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { return isLeapYear(extendedYear) ? kLeapMonthLength[month] : kMonthLength[month]; } int32_t GregorianCalendar::handleGetYearLength(int32_t eyear) const { return isLeapYear(eyear) ? 366 : 365; } int32_t GregorianCalendar::monthLength(int32_t month) const { int32_t year = internalGet(UCAL_EXTENDED_YEAR); return handleGetMonthLength(year, month); } // ------------------------------------- int32_t GregorianCalendar::monthLength(int32_t month, int32_t year) const { return isLeapYear(year) ? kLeapMonthLength[month] : kMonthLength[month]; } // ------------------------------------- int32_t GregorianCalendar::yearLength(int32_t year) const { return isLeapYear(year) ? 366 : 365; } // ------------------------------------- int32_t GregorianCalendar::yearLength() const { return isLeapYear(internalGet(UCAL_YEAR)) ? 366 : 365; } // ------------------------------------- /** * After adjustments such as add(MONTH), add(YEAR), we don't want the * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar * 3, we want it to go to Feb 28. Adjustments which might run into this * problem call this method to retain the proper month. */ void GregorianCalendar::pinDayOfMonth() { int32_t monthLen = monthLength(internalGet(UCAL_MONTH)); int32_t dom = internalGet(UCAL_DATE); if(dom > monthLen) set(UCAL_DATE, monthLen); } // ------------------------------------- UBool GregorianCalendar::validateFields() const { for (int32_t field = 0; field < UCAL_FIELD_COUNT; field++) { // Ignore DATE and DAY_OF_YEAR which are handled below if (field != UCAL_DATE && field != UCAL_DAY_OF_YEAR && isSet((UCalendarDateFields)field) && ! boundsCheck(internalGet((UCalendarDateFields)field), (UCalendarDateFields)field)) return FALSE; } // Values differ in Least-Maximum and Maximum should be handled // specially. if (isSet(UCAL_DATE)) { int32_t date = internalGet(UCAL_DATE); if (date < getMinimum(UCAL_DATE) || date > monthLength(internalGet(UCAL_MONTH))) { return FALSE; } } if (isSet(UCAL_DAY_OF_YEAR)) { int32_t days = internalGet(UCAL_DAY_OF_YEAR); if (days < 1 || days > yearLength()) { return FALSE; } } // Handle DAY_OF_WEEK_IN_MONTH, which must not have the value zero. // We've checked against minimum and maximum above already. if (isSet(UCAL_DAY_OF_WEEK_IN_MONTH) && 0 == internalGet(UCAL_DAY_OF_WEEK_IN_MONTH)) { return FALSE; } return TRUE; } // ------------------------------------- UBool GregorianCalendar::boundsCheck(int32_t value, UCalendarDateFields field) const { return value >= getMinimum(field) && value <= getMaximum(field); } // ------------------------------------- UDate GregorianCalendar::getEpochDay(UErrorCode& status) { complete(status); // Divide by 1000 (convert to seconds) in order to prevent overflow when // dealing with UDate(Long.MIN_VALUE) and UDate(Long.MAX_VALUE). double wallSec = internalGetTime()/1000 + (internalGet(UCAL_ZONE_OFFSET) + internalGet(UCAL_DST_OFFSET))/1000; return Math::floorDivide(wallSec, kOneDay/1000.0); } // ------------------------------------- // ------------------------------------- /** * Compute the julian day number of the day BEFORE the first day of * January 1, year 1 of the given calendar. If julianDay == 0, it * specifies (Jan. 1, 1) - 1, in whatever calendar we are using (Julian * or Gregorian). */ double GregorianCalendar::computeJulianDayOfYear(UBool isGregorian, int32_t year, UBool& isLeap) { isLeap = year%4 == 0; int32_t y = year - 1; double julianDay = 365.0*y + Math::floorDivide(y, 4) + (kJan1_1JulianDay - 3); if (isGregorian) { isLeap = isLeap && ((year%100 != 0) || (year%400 == 0)); // Add 2 because Gregorian calendar starts 2 days after Julian calendar julianDay += Grego::gregorianShift(year); } return julianDay; } // /** // * Compute the day of week, relative to the first day of week, from // * 0..6, of the current DOW_LOCAL or DAY_OF_WEEK fields. This is // * equivalent to get(DOW_LOCAL) - 1. // */ // int32_t GregorianCalendar::computeRelativeDOW() const { // int32_t relDow = 0; // if (fStamp[UCAL_DOW_LOCAL] > fStamp[UCAL_DAY_OF_WEEK]) { // relDow = internalGet(UCAL_DOW_LOCAL) - 1; // 1-based // } else if (fStamp[UCAL_DAY_OF_WEEK] != kUnset) { // relDow = internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek(); // if (relDow < 0) relDow += 7; // } // return relDow; // } // /** // * Compute the day of week, relative to the first day of week, // * from 0..6 of the given julian day. // */ // int32_t GregorianCalendar::computeRelativeDOW(double julianDay) const { // int32_t relDow = julianDayToDayOfWeek(julianDay) - getFirstDayOfWeek(); // if (relDow < 0) { // relDow += 7; // } // return relDow; // } // /** // * Compute the DOY using the WEEK_OF_YEAR field and the julian day // * of the day BEFORE January 1 of a year (a return value from // * computeJulianDayOfYear). // */ // int32_t GregorianCalendar::computeDOYfromWOY(double julianDayOfYear) const { // // Compute DOY from day of week plus week of year // // Find the day of the week for the first of this year. This // // is zero-based, with 0 being the locale-specific first day of // // the week. Add 1 to get first day of year. // int32_t fdy = computeRelativeDOW(julianDayOfYear + 1); // return // // Compute doy of first (relative) DOW of WOY 1 // (((7 - fdy) < getMinimalDaysInFirstWeek()) // ? (8 - fdy) : (1 - fdy)) // // Adjust for the week number. // + (7 * (internalGet(UCAL_WEEK_OF_YEAR) - 1)) // // Adjust for the DOW // + computeRelativeDOW(); // } // ------------------------------------- double GregorianCalendar::millisToJulianDay(UDate millis) { return (double)kEpochStartAsJulianDay + Math::floorDivide(millis, (double)kOneDay); } // ------------------------------------- UDate GregorianCalendar::julianDayToMillis(double julian) { return (UDate) ((julian - kEpochStartAsJulianDay) * (double) kOneDay); } // ------------------------------------- int32_t GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) { return (((stamp_a != kUnset && stamp_b != kUnset) ? uprv_max(stamp_a, stamp_b) : (int32_t)kUnset)); } // ------------------------------------- /** * Roll a field by a signed amount. * Note: This will be made public later. [LIU] */ void GregorianCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { roll((UCalendarDateFields) field, amount, status); } void GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) { if((amount == 0) || U_FAILURE(status)) { return; } // J81 processing. (gregorian cutover) UBool inCutoverMonth = FALSE; int32_t cMonthLen=0; // 'c' for cutover; in days int32_t cDayOfMonth=0; // no discontinuity: [0, cMonthLen) double cMonthStart=0.0; // in ms // Common code - see if we're in the cutover month of the cutover year if(get(UCAL_EXTENDED_YEAR, status) == fGregorianCutoverYear) { switch (field) { case UCAL_DAY_OF_MONTH: case UCAL_WEEK_OF_MONTH: { int32_t max = monthLength(internalGet(UCAL_MONTH)); UDate t = internalGetTime(); // We subtract 1 from the DAY_OF_MONTH to make it zero-based, and an // additional 10 if we are after the cutover. Thus the monthStart // value will be correct iff we actually are in the cutover month. cDayOfMonth = internalGet(UCAL_DAY_OF_MONTH) - ((t >= fGregorianCutover) ? 10 : 0); cMonthStart = t - ((cDayOfMonth - 1) * kOneDay); // A month containing the cutover is 10 days shorter. if ((cMonthStart < fGregorianCutover) && (cMonthStart + (cMonthLen=(max-10))*kOneDay >= fGregorianCutover)) { inCutoverMonth = TRUE; } } default: ; } } switch (field) { case UCAL_WEEK_OF_YEAR: { // Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the // week. Also, rolling the week of the year can have seemingly // strange effects simply because the year of the week of year // may be different from the calendar year. For example, the // date Dec 28, 1997 is the first day of week 1 of 1998 (if // weeks start on Sunday and the minimal days in first week is // <= 3). int32_t woy = get(UCAL_WEEK_OF_YEAR, status); // Get the ISO year, which matches the week of year. This // may be one year before or after the calendar year. int32_t isoYear = get(UCAL_YEAR_WOY, status); int32_t isoDoy = internalGet(UCAL_DAY_OF_YEAR); if (internalGet(UCAL_MONTH) == UCAL_JANUARY) { if (woy >= 52) { isoDoy += handleGetYearLength(isoYear); } } else { if (woy == 1) { isoDoy -= handleGetYearLength(isoYear - 1); } } woy += amount; // Do fast checks to avoid unnecessary computation: if (woy < 1 || woy > 52) { // Determine the last week of the ISO year. // We do this using the standard formula we use // everywhere in this file. If we can see that the // days at the end of the year are going to fall into // week 1 of the next year, we drop the last week by // subtracting 7 from the last day of the year. int32_t lastDoy = handleGetYearLength(isoYear); int32_t lastRelDow = (lastDoy - isoDoy + internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek()) % 7; if (lastRelDow < 0) lastRelDow += 7; if ((6 - lastRelDow) >= getMinimalDaysInFirstWeek()) lastDoy -= 7; int32_t lastWoy = weekNumber(lastDoy, lastRelDow + 1); woy = ((woy + lastWoy - 1) % lastWoy) + 1; } set(UCAL_WEEK_OF_YEAR, woy); set(UCAL_YEAR_WOY,isoYear); return; } case UCAL_DAY_OF_MONTH: if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; } else { // [j81] 1582 special case for DOM // The default computation works except when the current month // contains the Gregorian cutover. We handle this special case // here. [j81 - aliu] double monthLen = cMonthLen * kOneDay; double msIntoMonth = uprv_fmod(internalGetTime() - cMonthStart + amount * kOneDay, monthLen); if (msIntoMonth < 0) { msIntoMonth += monthLen; } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: roll DOM %d -> %.0lf ms \n", __FILE__, __LINE__,amount, cMonthLen, cMonthStart+msIntoMonth); #endif setTimeInMillis(cMonthStart + msIntoMonth, status); return; } case UCAL_WEEK_OF_MONTH: if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; } else { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: roll WOM %d ??????????????????? \n", __FILE__, __LINE__,amount); #endif // NOTE: following copied from the old // GregorianCalendar::roll( WEEK_OF_MONTH ) code // This is tricky, because during the roll we may have to shift // to a different day of the week. For example: // s m t w r f s // 1 2 3 4 5 // 6 7 8 9 10 11 12 // When rolling from the 6th or 7th back one week, we go to the // 1st (assuming that the first partial week counts). The same // thing happens at the end of the month. // The other tricky thing is that we have to figure out whether // the first partial week actually counts or not, based on the // minimal first days in the week. And we have to use the // correct first day of the week to delineate the week // boundaries. // Here's our algorithm. First, we find the real boundaries of // the month. Then we discard the first partial week if it // doesn't count in this locale. Then we fill in the ends with // phantom days, so that the first partial week and the last // partial week are full weeks. We then have a nice square // block of weeks. We do the usual rolling within this block, // as is done elsewhere in this method. If we wind up on one of // the phantom days that we added, we recognize this and pin to // the first or the last day of the month. Easy, eh? // Another wrinkle: To fix jitterbug 81, we have to make all this // work in the oddball month containing the Gregorian cutover. // This month is 10 days shorter than usual, and also contains // a discontinuity in the days; e.g., the default cutover month // is Oct 1582, and goes from day of month 4 to day of month 15. // Normalize the DAY_OF_WEEK so that 0 is the first day of the week // in this locale. We have dow in 0..6. int32_t dow = internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek(); if (dow < 0) dow += 7; // Find the day of month, compensating for cutover discontinuity. int32_t dom = cDayOfMonth; // Find the day of the week (normalized for locale) for the first // of the month. int32_t fdm = (dow - dom + 1) % 7; if (fdm < 0) fdm += 7; // Get the first day of the first full week of the month, // including phantom days, if any. Figure out if the first week // counts or not; if it counts, then fill in phantom days. If // not, advance to the first real full week (skip the partial week). int32_t start; if ((7 - fdm) < getMinimalDaysInFirstWeek()) start = 8 - fdm; // Skip the first partial week else start = 1 - fdm; // This may be zero or negative // Get the day of the week (normalized for locale) for the last // day of the month. int32_t monthLen = cMonthLen; int32_t ldm = (monthLen - dom + dow) % 7; // We know monthLen >= DAY_OF_MONTH so we skip the += 7 step here. // Get the limit day for the blocked-off rectangular month; that // is, the day which is one past the last day of the month, // after the month has already been filled in with phantom days // to fill out the last week. This day has a normalized DOW of 0. int32_t limit = monthLen + 7 - ldm; // Now roll between start and (limit - 1). int32_t gap = limit - start; int32_t newDom = (dom + amount*7 - start) % gap; if (newDom < 0) newDom += gap; newDom += start; // Finally, pin to the real start and end of the month. if (newDom < 1) newDom = 1; if (newDom > monthLen) newDom = monthLen; // Set the DAY_OF_MONTH. We rely on the fact that this field // takes precedence over everything else (since all other fields // are also set at this point). If this fact changes (if the // disambiguation algorithm changes) then we will have to unset // the appropriate fields here so that DAY_OF_MONTH is attended // to. // If we are in the cutover month, manipulate ms directly. Don't do // this in general because it doesn't work across DST boundaries // (details, details). This takes care of the discontinuity. setTimeInMillis(cMonthStart + (newDom-1)*kOneDay, status); return; } default: Calendar::roll(field, amount, status); return; } } // ------------------------------------- /** * Return the minimum value that this field could have, given the current date. * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). * @param field the time field. * @return the minimum value that this field could have, given the current date. * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. */ int32_t GregorianCalendar::getActualMinimum(EDateFields field) const { return getMinimum((UCalendarDateFields)field); } int32_t GregorianCalendar::getActualMinimum(EDateFields field, UErrorCode& /* status */) const { return getMinimum((UCalendarDateFields)field); } /** * Return the minimum value that this field could have, given the current date. * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). * @param field the time field. * @return the minimum value that this field could have, given the current date. * @draft ICU 2.6. */ int32_t GregorianCalendar::getActualMinimum(UCalendarDateFields field, UErrorCode& /* status */) const { return getMinimum(field); } // ------------------------------------ /** * Old year limits were least max 292269054, max 292278994. */ /** * @stable ICU 2.0 */ int32_t GregorianCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) const { return kGregorianCalendarLimits[field][limitType]; } /** * Return the maximum value that this field could have, given the current date. * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, * for some years the actual maximum for MONTH is 12, and for others 13. * @stable ICU 2.0 */ int32_t GregorianCalendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const { /* It is a known limitation that the code here (and in getActualMinimum) * won't behave properly at the extreme limits of GregorianCalendar's * representable range (except for the code that handles the YEAR * field). That's because the ends of the representable range are at * odd spots in the year. For calendars with the default Gregorian * cutover, these limits are Sun Dec 02 16:47:04 GMT 292269055 BC to Sun * Aug 17 07:12:55 GMT 292278994 AD, somewhat different for non-GMT * zones. As a result, if the calendar is set to Aug 1 292278994 AD, * the actual maximum of DAY_OF_MONTH is 17, not 30. If the date is Mar * 31 in that year, the actual maximum month might be Jul, whereas is * the date is Mar 15, the actual maximum might be Aug -- depending on * the precise semantics that are desired. Similar considerations * affect all fields. Nonetheless, this effect is sufficiently arcane * that we permit it, rather than complicating the code to handle such * intricacies. - liu 8/20/98 * UPDATE: No longer true, since we have pulled in the limit values on * the year. - Liu 11/6/00 */ switch (field) { case UCAL_YEAR: /* The year computation is no different, in principle, from the * others, however, the range of possible maxima is large. In * addition, the way we know we've exceeded the range is different. * For these reasons, we use the special case code below to handle * this field. * * The actual maxima for YEAR depend on the type of calendar: * * Gregorian = May 17, 292275056 BC - Aug 17, 292278994 AD * Julian = Dec 2, 292269055 BC - Jan 3, 292272993 AD * Hybrid = Dec 2, 292269055 BC - Aug 17, 292278994 AD * * We know we've exceeded the maximum when either the month, date, * time, or era changes in response to setting the year. We don't * check for month, date, and time here because the year and era are * sufficient to detect an invalid year setting. NOTE: If code is * added to check the month and date in the future for some reason, * Feb 29 must be allowed to shift to Mar 1 when setting the year. */ { if(U_FAILURE(status)) return 0; Calendar *cal = clone(); if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } cal->setLenient(TRUE); int32_t era = cal->get(UCAL_ERA, status); UDate d = cal->getTime(status); /* Perform a binary search, with the invariant that lowGood is a * valid year, and highBad is an out of range year. */ int32_t lowGood = kGregorianCalendarLimits[UCAL_YEAR][1]; int32_t highBad = kGregorianCalendarLimits[UCAL_YEAR][2]+1; while ((lowGood + 1) < highBad) { int32_t y = (lowGood + highBad) / 2; cal->set(UCAL_YEAR, y); if (cal->get(UCAL_YEAR, status) == y && cal->get(UCAL_ERA, status) == era) { lowGood = y; } else { highBad = y; cal->setTime(d, status); // Restore original fields } } delete cal; return lowGood; } default: return Calendar::getActualMaximum(field,status); } } int32_t GregorianCalendar::handleGetExtendedYear() { int32_t year = kEpochYear; switch(resolveFields(kYearPrecedence)) { case UCAL_EXTENDED_YEAR: year = internalGet(UCAL_EXTENDED_YEAR, kEpochYear); break; case UCAL_YEAR: { // The year defaults to the epoch start, the era to AD int32_t era = internalGet(UCAL_ERA, AD); if (era == BC) { year = 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year } else { year = internalGet(UCAL_YEAR, kEpochYear); } } break; case UCAL_YEAR_WOY: year = handleGetExtendedYearFromWeekFields(internalGet(UCAL_YEAR_WOY), internalGet(UCAL_WEEK_OF_YEAR)); #if defined (U_DEBUG_CAL) // if(internalGet(UCAL_YEAR_WOY) != year) { fprintf(stderr, "%s:%d: hGEYFWF[%d,%d] -> %d\n", __FILE__, __LINE__,internalGet(UCAL_YEAR_WOY),internalGet(UCAL_WEEK_OF_YEAR),year); //} #endif break; default: year = kEpochYear; } return year; } int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) { // convert year to extended form int32_t era = internalGet(UCAL_ERA, AD); if(era == BC) { yearWoy = 1 - yearWoy; } return Calendar::handleGetExtendedYearFromWeekFields(yearWoy, woy); } // ------------------------------------- UBool GregorianCalendar::inDaylightTime(UErrorCode& status) const { if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) return FALSE; // Force an update of the state of the Calendar. ((GregorianCalendar*)this)->complete(status); // cast away const return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); } // ------------------------------------- /** * Return the ERA. We need a special method for this because the * default ERA is AD, but a zero (unset) ERA is BC. */ int32_t GregorianCalendar::internalGetEra() const { return isSet(UCAL_ERA) ? internalGet(UCAL_ERA) : (int32_t)AD; } const char * GregorianCalendar::getType() const { //static const char kGregorianType = "gregorian"; return "gregorian"; } const UDate GregorianCalendar::fgSystemDefaultCentury = DBL_MIN; const int32_t GregorianCalendar::fgSystemDefaultCenturyYear = -1; UDate GregorianCalendar::fgSystemDefaultCenturyStart = DBL_MIN; int32_t GregorianCalendar::fgSystemDefaultCenturyStartYear = -1; UBool GregorianCalendar::haveDefaultCentury() const { return TRUE; } UDate GregorianCalendar::defaultCenturyStart() const { return internalGetDefaultCenturyStart(); } int32_t GregorianCalendar::defaultCenturyStartYear() const { return internalGetDefaultCenturyStartYear(); } UDate GregorianCalendar::internalGetDefaultCenturyStart() const { // lazy-evaluate systemDefaultCenturyStart UBool needsUpdate; UMTX_CHECK(NULL, (fgSystemDefaultCenturyStart == fgSystemDefaultCentury), needsUpdate); if (needsUpdate) { initializeSystemDefaultCentury(); } // use defaultCenturyStart unless it's the flag value; // then use systemDefaultCenturyStart return fgSystemDefaultCenturyStart; } int32_t GregorianCalendar::internalGetDefaultCenturyStartYear() const { // lazy-evaluate systemDefaultCenturyStartYear UBool needsUpdate; UMTX_CHECK(NULL, (fgSystemDefaultCenturyStart == fgSystemDefaultCentury), needsUpdate); if (needsUpdate) { initializeSystemDefaultCentury(); } // use defaultCenturyStart unless it's the flag value; // then use systemDefaultCenturyStartYear return fgSystemDefaultCenturyStartYear; } void GregorianCalendar::initializeSystemDefaultCentury() { // initialize systemDefaultCentury and systemDefaultCenturyYear based // on the current time. They'll be set to 80 years before // the current time. // No point in locking as it should be idempotent. if (fgSystemDefaultCenturyStart == fgSystemDefaultCentury) { UErrorCode status = U_ZERO_ERROR; Calendar *calendar = new GregorianCalendar(status); if (calendar != NULL && U_SUCCESS(status)) { calendar->setTime(Calendar::getNow(), status); calendar->add(UCAL_YEAR, -80, status); UDate newStart = calendar->getTime(status); int32_t newYear = calendar->get(UCAL_YEAR, status); { umtx_lock(NULL); fgSystemDefaultCenturyStart = newStart; fgSystemDefaultCenturyStartYear = newYear; umtx_unlock(NULL); } delete calendar; } // We have no recourse upon failure unless we want to propagate the failure // out. } } U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ //eof
[ "emader@251d0590-4201-4cf1-90de-194747b24ca1" ]
emader@251d0590-4201-4cf1-90de-194747b24ca1