blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
355c4a85969424291229dd57fbc6070c7c183143
d802e3f09910aea6db7df58cc71955472f81b056
/src/TMS_Event.h
de41efb31dfe238adb8205c4a2ef70cdbc080f84
[]
no_license
gavinsdavies/dune-ssri
9314c09c5dcb19e76435f50c9d3e6f1f0f6b7097
d4e03a471249c61bcdfecc74d8ab6c361564f50e
refs/heads/master
2023-04-28T02:38:54.264446
2021-05-19T20:42:30
2021-05-19T20:42:30
269,169,979
1
0
null
null
null
null
UTF-8
C++
false
false
1,363
h
TMS_Event.h
#ifndef _TMS_EVENT_H_SEEN_ #define _TMS_EVENT_H_SEEN_ #include <string> #include <iostream> // Include the constants #include "TMS_Constants.h" #include "TMS_Hit.h" #include "TMS_TrueParticle.h" #include "TMS_Geom.h" //#include "TMS_Tracks.h" // The edep-sim event class #include "EDepSim/TG4Event.h" // The general event class class TMS_Event { public: TMS_Event(TG4Event &event); //~TMS_Event(); // The getters once the class is completed const std::vector<TMS_Hit> &GetHits() const {return TMS_Hits;}; // Reconstructed tracks //std::vector<TMS_Track> GetTracks() {return TMS_Tracks;}; // The true particles const std::vector<TMS_TrueParticle> &GetParticles() const { return TMS_TrueParticles; }; void Print(); // Does event contain any TMS hits? (Can be skipped for TMS reco) bool IsEmpty() { return (TMS_Hits.size() == 0 ? true : false); } int GetEventNumber() { return EventNumber; }; // Include some truth metadata, like process, energy, lepton momentum? private: // Hits std::vector<TMS_Hit> TMS_Hits; // True particles std::vector<TMS_TrueParticle> TMS_TrueParticles; // Reconstructed tracks //std::vector<TMS_Track> TMS_Tracks; // Spill number (can have many events in a spill)? //int SpillNumber; static int EventNumber; }; #endif
28c9ee0b38e3fc0e3f0486042ef0fb3a2163146c
a2ab7f211fa04992c2f970575dcb6280865b30a5
/learning/recursion/gen_permutation.cpp
8bbec6e40d6e7fb80b846c7c88ea54b9adbf7069
[]
no_license
sahul343/coding
5b6eb1854b39657e7c9d2720a89f6f518905288d
e19df72dd7bf51b4f424a51ab060135210991c86
refs/heads/master
2021-07-10T12:12:53.198902
2020-12-22T05:31:53
2020-12-22T05:31:53
227,541,725
1
0
null
null
null
null
UTF-8
C++
false
false
915
cpp
gen_permutation.cpp
#include<bits/stdc++.h> using namespace std; #define mp make_pair typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; #define F first #define S second #define PB push_back #define MP make_pair; #define REP(i, a, b) for(int i = a; i <= b; i++) int m = 1e9 + 7; vector<bool>chosen; vector<int>permutation; void gen_permutation(int n){ if(permutation.size() == n){ REP(i, 0, n-1){ cout << permutation[i] << " "; } cout << "\n"; } else{ for(int i = 1; i <= n; i++){ if(chosen[i]) continue; chosen[i] = true; permutation.push_back(i); gen_permutation(n); chosen[i] = false; permutation.pop_back(); } } } int main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; chosen.assign(n, false); gen_permutation(n); return 0; }
8fe2462bd9dead78276c414a0ce53c4c9cdf2a73
07e7958bb57d6caa25225c6bc6db2194daea671c
/spree-master/project2/XProcess/XWindow_TradeConfirm.h
f3c26471e7dda9c3b7137c74f3ce5d158b1152e8
[]
no_license
pedromela/9d
34eb86d1acc863586c8e7338fc5f5c6ccaaacaa9
c65024fba16eca04b4eec897d312eb295ce60cfa
refs/heads/master
2021-07-21T07:34:18.570081
2017-10-30T17:58:45
2017-10-30T17:58:45
108,886,922
0
1
null
null
null
null
UHC
C++
false
false
2,673
h
XWindow_TradeConfirm.h
// XWindow_TradeConfirm.h: interface for the _XWindow_TradeConfirm class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_XWINDOW_TRADECONFIRM_H__8CD96B77_63C7_4E40_9666_B18620B1771D__INCLUDED_) #define AFX_XWINDOW_TRADECONFIRM_H__8CD96B77_63C7_4E40_9666_B18620B1771D__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "XKernel.h" /** * \brief 수량 입력 창 * 해당 모드에 따른 수량 입력 * */ /// 수량 입력 모드 typedef enum _XTrade_Mode { _XTRADE_NONE = 0, _XDROP_MONEY, ///< 돈 버리기 _XWAREHOUSE_TOWAREHOUSE_MONEY, ///< 인벤 -> 창고 _XWAREHOUSE_FROMWAREHOUSE_MONEY, ///< 창고 -> 인벤 _XPCTRADE_TOTRADE_MONEY, ///< 인벤 -> 거래창 _XPCTRADE_FROMTRADE_MONEY, ///< 거래 -> 인벤 _XNPCTRADE_BUY, ///< 상인 -> 인벤 _XPCTRADE_FROMTRADE_ITEM, ///< 거래 -> 인벤 _XWAREHOUSE_FROMWAREHOUSE_ITEM, ///< 창고 -> 인벤 _XCONTRIBUTION_FROMCONTRI_ITEM, _XNPCTRADE_SELL = 11, ///< 인벤 -> 상인 _XPCTRADE_TOTRADE_ITEM, ///< 인벤 -> 거래 _XPERSONALSTORE_TOTRADE_ITEM, ///< 인벤 -> 개인 상점 _XWAREHOUSE_TOWAREHOUSE_ITEM, ///< 인벤 -> 창고 _XCONTRIBUTION_TOCONTRI_ITEM, _XDROP_ITEM, ///< 아이템 버리기 _XCONTRIBUTION_TOCONTRIBUTION_MONEY, ///< 인벤 -> 기여 _XCONTRIBUTION_TOCONTRIBUTION_ITEM, ///< 인벤 -> 기여 _XDROP_WASTEBASKET_ITEM, ///< 휴지통 버리기 - 머지 아이템 }_XTRADE_MODE; class _XWindow_TradeConfirm : public _XWindow { public : _XButton* m_AllButton;// 2004.05.17->oneway48 insert _XButton* m_OKButton; _XButton* m_CancelButton; _XIMEContainer m_IMEControl; ///< 입력창 DWORD m_Price; ///< 가격 DWORD m_TradeCount; ///< 수량 char m_SelectedCategory1; short m_SelectedItemID; int m_InventoryNumber; TCHAR m_CountString[64]; _XTRADE_MODE m_TradeMode; /// PC간 거래에서 사용 int m_PCTradeSlotIndex; /// 개인상점에서 사용 int m_PersonalStoreSlotIndex; public: _XWindow_TradeConfirm(); virtual ~_XWindow_TradeConfirm(); BOOL Initialize(void); void DestroyWindow(void); void Draw(_XGUIObject*& pfocusobject = g_CurrentFocusedObject); BOOL Process(_XGUIObject*& pfocusobject = g_CurrentFocusedObject); BOOL CheckIMEBoxArea(void); void MoveWindow(int X, int Y); void ShowWindow(BOOL show); void GenerateItemPrice(void); ///< 가격 결정 int PriceCalc(); /// 판매 가격 결정 Author : 양희왕 void Reset(void); }; #endif // !defined(AFX_XWINDOW_TRADECONFIRM_H__8CD96B77_63C7_4E40_9666_B18620B1771D__INCLUDED_)
f4e36986d66a938a5b8e7b9dede9816e49b7d334
f22f1c9b9f0265295be7cb83433fcba66b620776
/core/rmi/src/main/include/jcpp/rmi/server/connection/JIServerProxy.h
7d7dbb30985cecb535cb804340d5a11f5dfb6b70
[]
no_license
egelor/jcpp-1
63c72c3257b52b37a952344a62fa43882247ba6e
9b5a180b00890d375d2e8a13b74ab5039ac4388c
refs/heads/master
2021-05-09T03:46:22.585245
2015-08-07T16:04:20
2015-08-07T16:04:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,181
h
JIServerProxy.h
#ifndef JCPP_RMI_SERVER_CONNECTION_JISERVERPROXY_H #define JCPP_RMI_SERVER_CONNECTION_JISERVERPROXY_H #include "jcpp/lang/JObject.h" #include "jcpp/lang/JClass.h" #include "jcpp/rmi/server/transport/JEndPoint.h" #include "jcpp/rmi/server/connection/JIServer.h" #include "jcpp/lang/reflect/JProxy.h" #include "jcpp/util/JList.h" using namespace jcpp::util; using namespace jcpp::lang::reflect; using namespace jcpp::rmi::server::transport; namespace jcpp{ namespace rmi{ namespace server{ namespace connection{ // @Class(canonicalName="jcpp.rmi.server.connection.IServerProxy", simpleName="IServerProxy"); class JCPP_EXPORT JIServerProxy : public JProxy, public JIServer{ public: JIServerProxy(); static JClass* getClazz(); virtual JObject* lookup(JEndPoint* endPoint, JClass* clazz); virtual JIRegistry* getIRegistry(); virtual JIGC* getGC(); virtual JIGCClient* getGCClient(); virtual ~JIServerProxy(); }; } } } } #endif
b4d62bd3831a8ba6b5811cbd0786f0d5c5e48379
5530b317b94d5287ce56c12f8b053608f6ffe1b6
/src/client/TrayIcon.h
8f8b8d37a7f8b07043d03522a8e0cb2ce678c692
[]
no_license
DUNE/kx509
5ae64d70a420a0828d935f6374137cb3fdabd127
f8d9147634c2efb216d5b447e756dbe62342612d
refs/heads/master
2016-09-10T03:37:12.612786
2014-12-18T20:00:21
2014-12-18T20:00:21
28,155,701
2
1
null
null
null
null
UTF-8
C++
false
false
2,076
h
TrayIcon.h
/* * Copyright © 2007 * The Regents of the University of Michigan * ALL RIGHTS RESERVED * * permission is granted to use, copy, create derivative works * and redistribute this software and such derivative works * for any purpose, so long as the name of the university of * michigan is not used in any advertising or publicity * pertaining to the use or distribution of this software * without specific, written prior authorization. if the * above copyright notice or any other identification of the * university of michigan is included in any copy of any * portion of this software, then the disclaimer below must * also be included. * * this software is provided as is, without representation * from the university of michigan as to its fitness for any * purpose, and without warranty by the university of * michigan of any kind, either express or implied, including * without limitation the implied warranties of * merchantability and fitness for a particular purpose. the * regents of the university of michigan shall not be liable * for any damages, including special, indirect, incidental, or * consequential damages, with respect to any claim arising * out of or in connection with the use of the software, even * if it has been or is hereafter advised of the possibility of * such damages. */ // TrayIcon.h - ////////////////////////////////////////////////////////////////////// #if !defined(AFX_TRAYICON_H__F6C48003_ADD4_11D1_834D_00A0244CD849__INCLUDED_) #define AFX_TRAYICON_H__F6C48003_ADD4_11D1_834D_00A0244CD849__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 class TrayIcon { public: BOOL DelSysTrayIcon(); BOOL SetSysTrayCallback(UINT uCBID); BOOL ChangeSysTrayTip(PTSTR pszTip); BOOL ChangeSysTrayIcon(UINT uID, PTSTR pszTip); BOOL ChangeSysTrayIcon(UINT uID); BOOL AddSysTrayIcon(CWnd* pcwnd, UINT uID); TrayIcon(); virtual ~TrayIcon(); private: NOTIFYICONDATA m_nid; }; #endif // !defined(AFX_TRAYICON_H__F6C48003_ADD4_11D1_834D_00A0244CD849__INCLUDED_)
4728893ce94486cecc834bb8467f3912457a89bc
db499c7109898bfa3cfb5b8542a5c4ca2bd0cbcd
/job.cpp
236b740cd78a62e0ad7edb10e439855fa2ea7137
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
HappyCerberus/Deadline-Schedule-Evaluator
def12fafefef9a4b29f20d39b534c831806f272d
ef62f200c18c84ae9c5525b0c2eedf0f17b925e6
refs/heads/master
2021-01-16T21:19:58.861080
2013-10-29T22:47:49
2013-10-29T22:47:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,001
cpp
job.cpp
#include "job.h" #include <iostream> #include <stdexcept> #include <sstream> using namespace std; bool job::read_jobid(istream& s) { s >> p_jobid; return s.good(); } bool job::read_arrival(std::istream& s) { s >> p_arrival_time; return s.good(); } bool job::read_waittime(std::istream& s) { double waittime; s >> waittime; if (s.good()) p_wait_time = static_cast<int>(waittime); return s.good(); } bool job::read_runtime(std::istream& s) { double runtime; s >> runtime; if (s.good()) { p_run_time = static_cast<int>(runtime); if (p_run_time == 0) p_run_time = 1; } return s.good(); } bool job::read_cpureq(std::istream& s) { s >> p_cpu_req; if (p_cpu_req == 0) p_cpu_req = 1; return s.good(); } bool job::read_ramreq(std::istream& s) { s >> p_ram_req; p_ram_req /= 1024; if (p_ram_req == 0) p_ram_req = 400; return s.good(); } bool job::read_userid(std::istream& s) { s >> p_userid; return s.good(); } bool job::read_queue(std::istream& s) { s >> p_queue; return s.good(); } ostream& operator << (ostream &s, const job& j) { s << j.p_jobid << "\t" << j.p_arrival_time << "\t" << j.p_wait_time << "\t" << j.p_run_time << "\t" << j.p_cpu_req << "\t" << j.p_ram_req << "\t" << j.p_userid << endl; return s; } job::job(istream &s, const string& format) { // JOBID ARRIVAL WAITTIME RUNTIME CPUREQ RAMREQ USERID QUEUE bool jobid = false, arrival = false, waittime = false, runtime = false, cpureq = false, ramreq = false, userid = false, queue = false; stringstream parser(format); string token; // PARSE INPUT ACCORDING TO FORMAT STRING while (parser >> token) { if (token == "JOBID") { if (read_jobid(s)) jobid = true; else throw runtime_error("Couldn't parse jobid."); } if (token == "ARRIVAL") { if (read_arrival(s)) arrival = true; else throw runtime_error("Couldn't parse arrival."); } if (token == "WAITTIME") { if (read_waittime(s)) waittime = true; else throw runtime_error("Couldn't parse waittime."); } if (token == "RUNTIME") { if (read_runtime(s)) runtime = true; else throw runtime_error("Couldn't parse runtime."); } if (token == "CPUREQ") { if (read_cpureq(s)) cpureq = true; else throw runtime_error("Couldn't parse cpu req."); } if (token == "RAMREQ") { if (read_ramreq(s)) ramreq = true; else throw runtime_error("Couldn't parse ram req."); } if (token == "USERID") { if (read_userid(s)) userid = true; else throw runtime_error("Couldn't parse user id."); } if (token == "QUEUE") { if (read_queue(s)) queue = true; else throw runtime_error("Couldn't parse queue."); } } // check missing values / setup defaults if (!jobid) throw runtime_error("JobID missing."); if (!arrival) throw runtime_error("Job arrival missing."); if (!waittime) throw runtime_error("Job wait time missing."); if (!runtime) throw runtime_error("Job runtime missing."); if (!cpureq) p_cpu_req = 1; if (!ramreq) p_ram_req = 409600; if (!userid) p_userid = 1; if (!queue) p_queue = "default"; if (!s.good()) throw runtime_error("Couldn't parse job line."); } void job::set_owner(shared_ptr<user> owner) { p_owner = owner; } shared_ptr<user> job::get_owner() const { return p_owner.lock(); } std::string job::get_userid() const { return p_userid; } std::string job::get_jobid() const { return p_jobid; } void job::set_deadline(BigResc deadline) { p_deadline = deadline; } bool job::deadline_satisfied() const { return p_deadline >= p_arrival_time + p_wait_time + p_run_time; } BigResc job::deadline_diff() const { return p_arrival_time + p_wait_time + p_run_time - p_deadline; } bool job::operator < (const job& j) const { return p_arrival_time < j.p_arrival_time; } BigResc job::get_cpu_req() const { return p_cpu_req; } BigResc job::get_ram_req() const { return p_ram_req; } BigResc job::get_arrival() const { return p_arrival_time; } BigResc job::get_waittime() const { return p_wait_time; } BigResc job::get_runtime() const { return p_run_time; } BigResc job::get_start() const { return p_arrival_time + p_wait_time; } BigResc job::get_finish() const { return this->get_start() + p_run_time; }
d00bccc50d46fdcf35e6bc986f371786954c5378
f7df6576f641633ffa1290969e7b6da48ee3c26d
/src/UserSpaceInstrumentation/ExecuteInProcessTest.cpp
a39a806751be0f2ba64f2b15d25ddb7076d130f7
[ "BSD-2-Clause", "LicenseRef-scancode-free-unknown" ]
permissive
beckerhe/orbitprofiler
96fa8466dac647618e42ff45319d70aceb4505cc
56541e1e53726f9f824e8216fdcbd4e7b1178965
refs/heads/main
2023-06-06T01:08:10.490090
2021-12-10T13:31:51
2021-12-10T13:31:51
235,291,165
2
0
BSD-2-Clause
2021-12-10T13:31:51
2020-01-21T08:32:27
C++
UTF-8
C++
false
false
2,768
cpp
ExecuteInProcessTest.cpp
// Copyright (c) 2021 The Orbit 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 <dlfcn.h> #include <gtest/gtest.h> #include <sys/prctl.h> #include <sys/wait.h> #include <csignal> #include <filesystem> #include <string> #include "GetTestLibLibraryPath.h" #include "OrbitBase/ExecutablePath.h" #include "OrbitBase/Logging.h" #include "OrbitBase/Result.h" #include "TestUtils/TestUtils.h" #include "UserSpaceInstrumentation/Attach.h" #include "UserSpaceInstrumentation/ExecuteInProcess.h" #include "UserSpaceInstrumentation/InjectLibraryInTracee.h" namespace orbit_user_space_instrumentation { using orbit_test_utils::HasNoError; using orbit_test_utils::HasValue; TEST(ExecuteInProcessTest, ExecuteInProcess) { pid_t pid = fork(); CHECK(pid != -1); if (pid == 0) { prctl(PR_SET_PDEATHSIG, SIGTERM); volatile uint64_t counter = 0; while (true) { // Endless loops without side effects are UB and recent versions of clang optimize it away. ++counter; } } CHECK(!AttachAndStopProcess(pid).has_error()); auto library_path_or_error = GetTestLibLibraryPath(); ASSERT_THAT(library_path_or_error, HasNoError()); std::filesystem::path library_path = std::move(library_path_or_error.value()); // Load dynamic lib into tracee. auto library_handle_or_error = DlopenInTracee(pid, library_path, RTLD_NOW); CHECK(library_handle_or_error.has_value()); void* library_handle = library_handle_or_error.value(); auto result_or_error = ExecuteInProcess(pid, library_handle, "TrivialFunction"); ASSERT_THAT(result_or_error, HasNoError()); EXPECT_EQ(42, result_or_error.value()); result_or_error = ExecuteInProcess(pid, library_handle, "TrivialSum", 2, 4, 6, 8, 10, 12); ASSERT_THAT(result_or_error, HasNoError()); EXPECT_EQ(42, result_or_error.value()); auto function_address_or_error = DlsymInTracee(pid, library_handle, "TrivialFunction"); ASSERT_THAT(result_or_error, HasValue()); result_or_error = ExecuteInProcess(pid, function_address_or_error.value()); ASSERT_THAT(result_or_error, HasValue()); EXPECT_EQ(42, result_or_error.value()); function_address_or_error = DlsymInTracee(pid, library_handle, "TrivialSum"); ASSERT_TRUE(function_address_or_error.has_value()); result_or_error = ExecuteInProcess(pid, function_address_or_error.value(), 2, 4, 6, 8, 10, 12); ASSERT_THAT(result_or_error, HasValue()); EXPECT_EQ(42, result_or_error.value()); // Cleanup, detach and end child. CHECK(!DlcloseInTracee(pid, library_handle).has_error()); CHECK(!DetachAndContinueProcess(pid).has_error()); kill(pid, SIGKILL); waitpid(pid, nullptr, 0); } } // namespace orbit_user_space_instrumentation
98365a4927123829567aa21b90be3c8fa30b39ce
4be300736effa9fc6abbfbd2650e63d68c0863f9
/lab_work/lab work/datatype programs(1-18)/15.cpp
ba6bc84c62493926f8a664af65555ff0e67409a0
[]
no_license
20WH1A1282SAIMANASA/PPS-PROGRAMS
1b5f9886f0e186374fc66f2e16be6e0c71c5c99c
a17a7f944bb62354ec8c90bbda1deb9a600f51fa
refs/heads/main
2023-06-24T01:35:59.689689
2021-07-25T14:07:23
2021-07-25T14:07:23
387,746,172
0
0
null
null
null
null
UTF-8
C++
false
false
969
cpp
15.cpp
/*15.Write a C program that read 5 numbers and counts the number of positive numbers and negative numbers.*/ #include<stdio.h> int main() { int num1,num2,num3,num4,num5,count = 0; printf("enter 5 numbers\n"); scanf("%d%d%d%d%d",&num1,&num2,&num3,&num4,&num5); if (num1>0) { printf("positive number\n"); count = count+1; } else printf("negative number\n"); if (num2>0) { printf("positive number\n"); count = count+1; } else printf("negative number\n"); if(num3>0){ printf("positive number\n"); count = count+1; } else printf("negative number\n"); if (num4>0){ printf("positive number\n"); count = count+1; } else printf("negative number\n"); if (num5>0) { printf("positive number\n"); count = count+1; } else printf("negative number\n"); printf("no.of positive numbers = %d\n",count); printf("no.of negative numbers = %d\n",5-count); return 0; }
d80f9e1f330c6dcadf51caeb8cb7c658470a502d
a1fff2eb093de227871ca0133e8c031e13cb8547
/qtbrowserplugin/qtbrowserplugin_p.h
bc74b1ad9d168f1bf084e8b1f2c092bd209f378f
[]
no_license
afrimberger/okularplugin
7cf683b4d65dd6caf706d30cf730470d0dbbc1dd
82ffacabdc2c796d7e4eae7118ad3dbb88cc23a5
refs/heads/master
2020-04-06T06:54:33.369833
2013-05-19T07:54:50
2013-05-19T07:54:50
2,916,433
1
0
null
2013-05-06T20:09:58
2011-12-05T12:55:02
C++
UTF-8
C++
false
false
2,978
h
qtbrowserplugin_p.h
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of a Qt Solutions component. ** ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor ** the names of its contributors may be used to endorse or promote ** products derived from this software without specific prior written ** permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ****************************************************************************/ #include <QtCore/QVariant> #include <QtCore/QMutexLocker> #include <QtGui/QWidget> #ifdef Q_WS_X11 # include <X11/Xlib.h> class QtNPStream; class QtNPBindable; #endif struct QtNPInstance { NPP npp; short fMode; #ifdef Q_WS_WIN typedef HWND Widget; #endif #ifdef Q_WS_X11 typedef Window Widget; Display *display; #endif #ifdef Q_WS_MAC typedef NPPort* Widget; QWidget *rootWidget; #endif Widget window; QRect geometry; QString mimetype; QByteArray htmlID; union { QObject* object; QWidget* widget; } qt; QtNPStream *pendingStream; QtNPBindable* bindable; QObject *filter; QMap<QByteArray, QVariant> parameters; qint32 notificationSeqNum; QMutex seqNumMutex; qint32 getNotificationSeqNum() { QMutexLocker locker(&seqNumMutex); if (++notificationSeqNum < 0) notificationSeqNum = 1; return notificationSeqNum; } };
f29ebf6950fde9575d08c2d09ddc680e39077bda
b90172316e5c6133c22e8ea3acf53383cbd66f0a
/Gui/Home.cpp
ae131b930d8ac7bfeb463346a374be4aaf0b9e00
[]
no_license
ekersale/Babel
77f0030e79031819f59737749aa127c585267847
5ecf27f8a84aba2696442bd7ecc5e6ef513f806d
refs/heads/master
2021-01-20T18:54:37.139371
2014-11-12T19:16:21
2014-11-12T19:16:21
62,562,353
0
0
null
null
null
null
UTF-8
C++
false
false
25,643
cpp
Home.cpp
#include "../Includes/Home.hh" #include "ui_Home.h" #include <iostream> Home::Home(QWidget *parent) : QMainWindow(parent), ui(new Ui::Home) { init(); _pushtmp = NULL; _myid = 0; _links.push_back(new Network(AF_INET, SOCK_DGRAM, "UDP", 65000)); _links.push_back(new Network(AF_INET, SOCK_DGRAM, "UDP", 65000)); _links.push_back(new Network(AF_INET, SOCK_DGRAM, "UDP", 65000)); } Home::~Home() { delete ui; } void Home::init() { setFixedSize(1080, 929); this->_status = ONLINE; this->_isOncall = false; //False pour dire qu'on a pas de conversation load(); } void Home::load() { ui->setupUi(this); ui->_line_addContact->hide(); _video = new OpenCV(); timer = new QTimer(this); QLabel::connect(_video, SIGNAL(processedImage(QImage, int)), this, SLOT(updatePlayerUI(QImage, int))); //QLabel::connect(_video, SIGNAL(sendFrame(std::vector<unsigned char*> *)), //this, SLOT(sendFrameTo(std::vector<unsigned char *> *))); //QLabel::connect(_video, SIGNAL(sendFrame(std::vector<unsigned char*> *)), this, //SLOT(sendFrameTo(std::vector<unsigned char *> *))); QLabel::connect(_video, SIGNAL(sendFrame(std::vector<unsigned char*> *)), this, SLOT(sendFrameTo(std::vector<unsigned char *> *))); QObject::connect(ui->_btnClose, SIGNAL(clicked()), this, SLOT(close())); QObject::connect(ui->_btn_Online, SIGNAL(clicked()), this, SLOT(changeOnline())); QObject::connect(ui->_btn_Away, SIGNAL(clicked()), this, SLOT(changeAway())); QObject::connect(ui->_btn_Busy, SIGNAL(clicked()), this, SLOT(changeBusy())); QObject::connect(ui->_btnAddContact, SIGNAL(clicked()), this, SLOT(showNewField())); // QObject::connect(ui->_btnInviteContact, SIGNAL(clicked()), this, SLOT(invitContact())); QObject::connect(ui->_btnMicro, SIGNAL(clicked()), this, SLOT(callContact())); QObject::connect(ui->_btnCam, SIGNAL(clicked()), this, SLOT(videoCallContact())); QObject::connect(ui->_btnHangUp, SIGNAL(clicked()), this, SLOT(hangHup())); QObject::connect(ui->_line_addContact, SIGNAL(returnPressed()), this, SLOT(sendAddContact())); QObject::connect(ui->_lineContactName, SIGNAL(returnPressed()), this, SLOT(sendNewName())); QObject::connect(ui->_lineSurnameEdit, SIGNAL(returnPressed()), this, SLOT(sendNewSurname())); QObject::connect(ui->_lineBirthday, SIGNAL(returnPressed()), this, SLOT(sendNewBirthday())); QObject::connect(ui->_lineLocalisation, SIGNAL(returnPressed()), this, SLOT(sendNewLocalisation())); QObject::connect(ui->_linePhoneNumber, SIGNAL(returnPressed()), this, SLOT(sendNewPhone())); defineStatus(this->_status); } bool Home::sendData(QString value, int nbCmd) { //Value => params ( nom / location ) etc.. IPacketInfo *packet_info; Packet *packet; std::stringbuf serialize; char *params; packet_info = new PacketInfo(); // _parser = new Parser(); params = strdup(value.toStdString().c_str()); packet_info->setCmd(nbCmd); packet_info->getChars().push_back(params); packet = (Packet *)((ThreadCom *)_com)->getParser()->encode(packet_info); serialize >> packet; if (((ThreadCom *)_com)->getNetwork()->sendSocket(1, (void *)serialize.str().c_str(), 65) == false) { std::cout << "Error Send" << std::endl; return false; } // free(params); // delete(packet); // delete(packet_info); return true; } void Home::sendNewPhone() { QString newvalue; newvalue = ui->_linePhoneNumber->text(); _musers[_activeUser]->set_phone(newvalue.toStdString()); if ((sendData(newvalue, 11) == false)) { QMessageBox::information(this, "Information", "L'update du téléphone n'a pas été send"); return; } } void Home::sendNewLocalisation() { QString newvalue; newvalue = ui->_lineLocalisation->text(); _musers[_activeUser]->set_adress(newvalue.toStdString()); if ((sendData(newvalue, 10) == false)) { QMessageBox::information(this, "Information", "L'update de la location n'a pas été send"); return; } } void Home::sendNewBirthday() { QString newvalue; newvalue = ui->_lineBirthday->text(); _musers[_activeUser]->set_birth(newvalue.toStdString()); if ((sendData(newvalue, 7) == false)) { QMessageBox::information(this, "Information", "L'update du téléphone n'a pas été send"); return; } } void Home::sendNewSurname() { QString newvalue; newvalue = ui->_lineSurnameEdit->text(); _musers[_activeUser]->set_surname(newvalue.toStdString()); if ((sendData(newvalue, 8) == false)) { QMessageBox::information(this, "Information", "L'update du téléphone n'a pas été send"); return; } } void Home::sendNewName() { QString newvalue; newvalue = ui->_lineContactName->text(); //send to serv the newvalue contactname } void Home::updatePlayerUI(QImage img, int value) { if (!img.isNull()) { if (value == 1) { ui->_label_Video->setAlignment(Qt::AlignCenter); ui->_label_Video->setPixmap(QPixmap::fromImage(img)); ui->_label_Video->show(); } if (value == 0) { ui->_label_VideoPerso->setAlignment(Qt::AlignCenter); ui->_label_VideoPerso->setPixmap(QPixmap::fromImage(img)); ui->_label_VideoPerso->setScaledContents(true); ui->_label_VideoPerso->show(); } } } void Home::destroy() { } void Home::showNewField() { if (!(ui->_line_addContact->text().isEmpty())) ui->_line_addContact->clear(); ui->_line_addContact->show(); } void Home::sendAddContact() { QString contactname; ui->_line_addContact->hide(); contactname = ui->_line_addContact->text(); ui->_line_addContact->clear(); if ((sendData(contactname, 20) == false)) { QMessageBox::information(this, "Information", "L'update du téléphone n'a pas été send"); return; } } void Home::addContact(UserInfo *added) { QListWidgetItem *item; QFont font; QPushButton *but; QString name; QPixmap *pixmap = NULL; QPalette palette; t_contact *ptr = new t_contact; std::string tmp; int state; state = added->get_status(); if (state < 1 && state > 4) state = 4; item = new QListWidgetItem(); tmp = added->get_name() + " " + added->get_surname(); name = tmp.c_str(); item->setText(name); item->setTextAlignment(21); item->setBackgroundColor(QColor(255, 255, 255)); font.setPointSize(12); font.setFamily("calibri"); item->setFont(font); font.setPointSize(8); ui->_listContact->addItem(item); but = new QPushButton(added->get_nickname().c_str()); but->setFlat(true); switch (state) { case 2: pixmap = new QPixmap("./Images/BabelHD_0001s_0005s_0002_status.png"); break; case 3: pixmap = new QPixmap("./Images/BabelHD_0001s_0003s_0000_status.png"); break; case 4: pixmap = new QPixmap("./Images/BabelHD_0001s_0000s_0000_status.png"); break; case 1: pixmap = new QPixmap("./Images/BabelHD_0001s_0002s_0000_status.png"); break; default: break; } if (pixmap != NULL) palette.setBrush(but->backgroundRole(), QBrush(*pixmap)); but->setFlat(true); but->setAutoFillBackground(true); but->setPalette(palette); but->setFont(font); but->setMinimumSize(250, 42); but->setMaximumSize(250, 42); std::stringstream ss; ss << added->get_id(); ss >> tmp; but->setObjectName(tmp.c_str()); but->setStyleSheet("text-align: middle"); connect(but, SIGNAL(clicked()), this, SLOT(contactClick())); QHBoxLayout *layout = new QHBoxLayout(); layout->addWidget(but); layout->alignment(); ptr->but = but; ptr->item = item; _bcontact[added->get_id()] = ptr; QWidget *widget = new QWidget(); widget->setLayout(layout); item->setSizeHint(widget->sizeHint()); ui->_listContact->setItemWidget(item, widget); } void Home::contactClick() { QObject *senderObj = sender(); QString senderObjName = senderObj->objectName(); QPushButton *tmp = (QPushButton *)senderObj; if (_pushtmp != NULL) { _pushtmp->setEnabled(true); //_pushtmp->setStyleSheet("QPushButton{color: rgb(0, 0, 0);}"); } tmp->setEnabled(false); _pushtmp = tmp; _activeUser = senderObjName.toInt(); if (_activeUser == _myid) { ui->_lineContactName->setReadOnly(false); ui->_lineSurnameEdit->setReadOnly(false); ui->_lineBirthday->setReadOnly(false); ui->_lineLocalisation->setReadOnly(false); ui->_linePhoneNumber->setReadOnly(false); } else { ui->_lineContactName->setReadOnly(true); ui->_lineSurnameEdit->setReadOnly(true); ui->_lineBirthday->setReadOnly(true); ui->_lineLocalisation->setReadOnly(true); ui->_linePhoneNumber->setReadOnly(true); } ui->_lineContactName->setText(_musers[_activeUser]->get_name().c_str()); ui->_lineSurnameEdit->setText(_musers[_activeUser]->get_surname().c_str()); ui->_lineBirthday->setText(_musers[_activeUser]->get_birth().c_str()); ui->_lineLocalisation->setText(_musers[_activeUser]->get_address().c_str()); ui->_linePhoneNumber->setText(_musers[_activeUser]->get_phone().c_str()); } void Home::callContact() { if (_activeUser == _myid) return; IPacketInfo *packet_info = new PacketInfo(); char *module = new char[1]; module[0] = 1; packet_info->setCmd(24); packet_info->getChars().push_back(module); packet_info->getInts().push_back(_activeUser); char *nbrid = new char[2]; nbrid[0] = 1; packet_info->getChars().push_back(nbrid); packet_info->getInts().push_back(_myid); Packet *enpacked = (Packet *)((ThreadCom *)_com)->getParser()->encode(packet_info); std::stringbuf sz; sz >> enpacked; if ((((ThreadCom *)_com)->getNetwork()->sendSocket(1, (void *)sz.str().c_str(), 65) == false)) std::cout << "Error Send\n"; delete[] module; delete[] nbrid; delete(enpacked); } void Home::videoCallContact() { if (_activeUser == _myid) return; IPacketInfo *packet_info = new PacketInfo(); char *module = new char[1]; module[0] = 2; packet_info->setCmd(24); packet_info->getChars().push_back(module); packet_info->getInts().push_back(_activeUser); char *nbrid = new char[2]; nbrid[0] = 1; packet_info->getChars().push_back(nbrid); packet_info->getInts().push_back(_myid); Packet *enpacked = (Packet *)((ThreadCom *)_com)->getParser()->encode(packet_info); std::stringbuf sz; sz >> enpacked; if ((((ThreadCom *)_com)->getNetwork()->sendSocket(1, (void *)sz.str().c_str(), 65) == false)) std::cout << "Error Send\n"; delete[] module; delete[] nbrid; delete(enpacked); } void Home::hangHup() { timer->stop(); if (this->_isOncall == false) { QMessageBox::critical(this, "Error", "Vous ne pouvez pas raccrocher si vous n'avez pas d'appels"); _links[0]->sflush(); return; } else _links[1]->sflush(); } void Home::setStatus(e_type newStatus) { this->_status = newStatus; defineStatus(this->_status); } e_type Home::getStatus() const { return (this->_status); } void Home::defineStatus(e_type status) { if (status == ONLINE) { QSize hide(0, 0); QSize printable(32, 32); ui->_btn_Online->setIconSize(printable); ui->_btn_Busy->setIconSize(hide); ui->_btn_Away->setIconSize(hide); ui->_label_StatusInfos->setText("En ligne"); return; } if (status == AWAY) { QSize hide(0, 0); QSize printable(32, 32); ui->_btn_Away->setIconSize(printable); ui->_btn_Busy->setIconSize(hide); ui->_btn_Online->setIconSize(hide); ui->_label_StatusInfos->setText("Absent"); return; } if (status == BUSY) { QSize hide(0, 0); QSize printable(32, 32); ui->_btn_Busy->setIconSize(printable); ui->_btn_Online->setIconSize(hide); ui->_btn_Away->setIconSize(hide); ui->_label_StatusInfos->setText("Occupé"); return; } } void Home::changeOnline() { e_type newStatus; newStatus = ONLINE; this->setStatus(newStatus); defineStatus(newStatus); } void Home::changeAway() { e_type newStatus; newStatus = AWAY; this->setStatus(newStatus); defineStatus(newStatus); } void Home::changeBusy() { e_type newStatus; newStatus = BUSY; defineStatus(newStatus); } bool Home::isOncall() { return (this->_isOncall); } void Home::setOncall(bool available) { this->_isOncall = available; } void Home::setThread(void *ptr) { _com = (ThreadCom *)ptr; connect((ThreadCom *)ptr, SIGNAL(s_changeNick(void *, void *)), this, SLOT(setNick(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changeStatus(void *, void *)), this, SLOT(setStatus(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changeBirth(void *, void *)), this, SLOT(setBirth(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_contactModule(void *, void *)), this, SLOT(setModule(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changeSurname(void *, void *)), this, SLOT(setSurname(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changeName(void *, void *)), this, SLOT(setName(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changeAddress(void *, void *)), this, SLOT(setAdress(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_changePhone(void *, void *)), this, SLOT(setPhone(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_addAnswer(void *, void *)), this, SLOT(setAddAnswer(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_removeRequest(void *, void *)), this, SLOT(setRemoveRequest(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_removeAnswer(void *, void *)), this, SLOT(setRemoveAnswer(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_requestCall(void *, void *)), this, SLOT(setCallRequest(void *, void *))); connect((ThreadCom *)ptr, SIGNAL(s_callAnswer(void *, void *)), this, SLOT(setCallAnswer(void *, void *))); } void Home::setRemoveRequest(void *cmdptr, void *idptr) { // std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; // std::vector<int> *id = (std::vector<int> *)idptr; static_cast<void>(idptr); static_cast<void>(cmdptr); } void Home::setRemoveAnswer(void *cmdptr, void *idptr) { static_cast<void>(cmdptr); static_cast<void>(idptr); } void Home::setCallRequest(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; IPacketInfo *packet_info = new PacketInfo(); int i = (*id)[0]; std::cout << i << std::endl; UserInfo *pkt = _musers[id[0][0]]; std::string tmp; QMessageBox msgBox; std::string ip = value[0][1]; char *answer_user = new char[1]; if ((int)(*value)[0][0] == 1) tmp = pkt->get_name() + " audio call you"; if ((int)(*value)[0][0] == 2) tmp = pkt->get_name() + " video call you"; msgBox.setText(tmp.c_str()); msgBox.setInformativeText("Do you want to receve that call ?"); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Ignore); msgBox.setDefaultButton(QMessageBox::Yes); int res = msgBox.exec(); packet_info->setCmd(26); packet_info->getInts().push_back(pkt->get_id()); if (res == QMessageBox::Yes) answer_user[0] = 0; // OK else answer_user[0] = 9; // OK // #PA #bind int modules = -1; int port = 2000; std::stringstream ss; bool retbind = false; while (retbind == false) { ss.flush(); ss << port; std::string sport; ss >> sport; retbind = _links[(*value)[0][0] - 1]->bindSocket(sport.c_str()); ++port; if (port >= 65535) answer_user[0] = 9; } // 3* PORT ||| P1 : audio P2 : video P3 : text ss >> port; packet_info->getChars().push_back(answer_user); if ((int)(*value)[0][0] == 1) packet_info->getInts().push_back(port); // P1 else packet_info->getInts().push_back(0); if ((int)(*value)[0][0] == 2) packet_info->getInts().push_back(port); // P1 else packet_info->getInts().push_back(0); packet_info->getInts().push_back(0); // P3 Parser *parse; parse = ((ThreadCom *)_com)->getParser(); Packet *enpacked; enpacked = (Packet *)parse->encode(packet_info); std::stringbuf sz; sz >> enpacked; if ((((ThreadCom *)_com)->getNetwork()->sendSocket(1, (void *)sz.str().c_str(), 65) == false)) std::cout << "Error Send\n"; delete(enpacked); //LANCER LA RECEPTION UDP if ((int)(*value)[0][0] == 1) { timer = new QTimer; _sockudp[0] = _links[0]->recvFromSocket(); if (!sound.initializePA()) std::cerr << "Error on InitPa()" << std::endl; if (!(sound.initializeInput())) std::cerr << "Error on initParams()" << std::endl; if (!(sound.initializeOutput())) std::cerr << "Error on initParams()" << std::endl; sound.openStream(); sound.startStream(); encode.opusEncoderCreate(); encode.opusDecoderCreate(); connect(timer, SIGNAL(timeout()), this, SLOT(threadCall())); timer->start(); } if ((int)(*value)[0][0] == 2) { _sockudp[1] = _links[1]->recvFromSocket(); timer = new QTimer; connect(timer, SIGNAL(timeout()), this, SLOT(recvFrameFrom())); timer->start(); } } void Home::threadCall() { float *buffer; unsigned char *tmp; static bool isOk = false; if (isOk == false) { sound.startStream(); isOk = true; } sound.writeStream(encode.decodeFrame((unsigned char *)_links[0]->get_buffer(), 480), encode.getBytesDecode()); if (!(sound.readStream())) std::cerr << "Error on writeStream()" << std::endl; buffer = sound.getRecordedSamples(); tmp = encode.encodeFrame(buffer, 480); _links[0]->sendToSocket(_sockudp[0], tmp, encode.getEncodedDataSize()); // revoir à id1 _links[0]->recvFromSocket(); (void)buffer; (void)tmp; } void Home::sendFrameTo(std::vector<unsigned char *> *frame) { if (frame->size() != 8) return; for (size_t it = 0; it < frame->size(); it++) { if (_links[1]->sendToSocket(_sockudp[1], (*frame)[it], strlen((char *)((*frame)[it]))) == false) std::cerr << "Failed to send frame" << std::endl; } } void Home::recvFrameFrom(void) { std::vector<unsigned char *> frame; int packets = 0; unsigned char *part; while (packets < 8) { if (_links[1]->recvFromSocket() == false) return; int i = _links[1]->get_connected(0)->get_filled(); std::cout << "" << std::endl; if (packets > 0) _links[1]->get_buffer()[i] = 0; part = new unsigned char[strlen((char *)_links[1]->get_buffer())]; strcpy((char *)part, _links[1]->get_buffer()); frame.push_back(part); ++packets; } _video->displayFrames(frame); } void Home::playVideo() { if (_video->isStopped()) _video->play(); else _video->stop(); } void Home::setCallAnswer(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::stringstream ss; if ((int)(*value)[0][0] == 0) // OK { std::string ip; ip = value[0][1]; int PA = id[0][0]; int PV = id[0][1]; int PT = id[0][2]; int modules = -1; while (++modules < 3) { ss.flush(); if (id[0][modules] != 0) { ss << id[0][modules]; int socktmp; _sockudp[modules - 1] = _links[modules]->connectSocket(ip, ss.str()); } if (id[0][modules] == 1) { if (!sound.initializePA()) std::cerr << "Error on InitPa()" << std::endl; if (!(sound.initializeInput())) std::cerr << "Error on initParams()" << std::endl; if (!(sound.initializeOutput())) std::cerr << "Error on initParams()" << std::endl; sound.openStream(); sound.startStream(); encode.opusEncoderCreate(); encode.opusDecoderCreate(); connect(timer, SIGNAL(timeout()), this, SLOT(threadCall())); timer->start(); } else { connect(timer, SIGNAL(timeout), this, SLOT(recvFrameFrom())); playVideo(); timer->start(); } } } else { QMessageBox msgBox; msgBox.setText("Contact not available"); msgBox.setInformativeText("Try later !"); msgBox.setStandardButtons(QMessageBox::Yes); msgBox.setDefaultButton(QMessageBox::Yes); msgBox.exec(); } } void Home::setNick(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; static int tmp = 0; std::map<int, UserInfo *>::iterator it; if ((it = _musers.find(id[0][0])) == _musers.end()) { if (tmp == 0) _myid = id[0][0]; tmp++; UserInfo *info = new UserInfo; info->set_id(id[0][0]); info->set_nickname(value[0][0]); _musers[id[0][0]] = info; addContact(_musers[id[0][0]]); } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_nickname(value[0][0]); std::string stmp; stmp = tmp->get_nickname(); std::map<int, t_contact *>::iterator it; if ((it = _bcontact.find(id[0][0])) == _bcontact.end()) return; _bcontact[id[0][0]]->but->setText(stmp.c_str()); } } void Home::setStatus(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); info->set_status((*value)[0][0]); _musers[id[0][0]] = info; addContact(_musers[id[0][0]]); } else { UserInfo *tmp = _musers[id[0][0]]; QPixmap *pixmap = NULL; QPalette palette; tmp->set_status((*value)[0][0]); int itmp = (*value)[0][0]; switch (itmp) { case 2: pixmap = new QPixmap("./Images/BabelHD_0001s_0005s_0002_status.png"); break; case 3: pixmap = new QPixmap("./Images/BabelHD_0001s_0003s_0000_status.png"); break; case 4: pixmap = new QPixmap("./Images/BabelHD_0001s_0000s_0000_status.png"); break; case 1: pixmap = new QPixmap("./Images/BabelHD_0001s_0002s_0000_status.png"); break; default: break; } if (pixmap != NULL) palette.setBrush(_bcontact[id[0][0]]->but->backgroundRole(), QBrush(*pixmap)); _bcontact[id[0][0]]->but->setPalette(palette); } } void Home::setBirth(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); info->set_birth((*value)[0]); _musers[id[0][0]] = info; } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_birth((*value)[0]); } } void Home::setModule(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { if (tmp == 0) _myid = id[0][0]; tmp++; UserInfo *info = new UserInfo; info->set_id(id[0][0]); info->set_module((*value)[0][0]); _musers[id[0][0]] = info; } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_module((*value)[0][0]); } } void Home::setSurname(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); std::cout << info->get_id() << std::endl; info->set_surname((*value)[0]); _musers[id[0][0]] = info; addContact(_musers[id[0][0]]); } else { UserInfo *tmp = _musers[id[0][0]]; std::string stmp; tmp->set_surname((*value)[0]); stmp = tmp->get_name() + " " + tmp->get_surname(); std::map<int, t_contact *>::iterator it; if ((it = _bcontact.find(id[0][0])) == _bcontact.end()) return; _bcontact[id[0][0]]->item->setText(stmp.c_str()); } } void Home::setName(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); info->set_name((*value)[0]); _musers[id[0][0]] = info; addContact(_musers[id[0][0]]); } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_name((*value)[0]); std::string stmp; stmp = tmp->get_name() + " " + tmp->get_surname(); std::map<int, t_contact *>::iterator it; if ((it = _bcontact.find(id[0][0])) == _bcontact.end()) return; _bcontact[id[0][0]]->item->setText(stmp.c_str()); } } void Home::setAdress(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); info->set_adress((*value)[0]); _musers[id[0][0]] = info; } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_adress((*value)[0]); } } void Home::setPhone(void *cmdptr, void *idptr) { std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; std::vector<int> *id = (std::vector<int> *)idptr; std::map<int, UserInfo *>::iterator it; static int tmp = 0; if ((it = _musers.find(id[0][0])) == _musers.end()) { UserInfo *info = new UserInfo; if (tmp == 0) _myid = id[0][0]; tmp++; info->set_id(id[0][0]); info->set_phone((*value)[0]); _musers[id[0][0]] = info; } else { UserInfo *tmp = _musers[id[0][0]]; tmp->set_phone((*value)[0]); } } void Home::setAddAnswer(void *cmdptr, void *idptr) { // std::vector<const char *> *value = (std::vector<const char *> *)cmdptr; // std::vector<int> *id = (std::vector<int> *)idptr; static_cast<void>(cmdptr); static_cast<void>(idptr); }
158bf7a48b525aeddef82ca010464811711431eb
25e4a532e8ddf4147e28b04eb23881e40edafb7d
/Resoluções/Collection.cpp
d811b8f37acb9daadf3b491d33628e49ca144eaa
[]
no_license
VTorres09/CompetitiveProgramming
8674fdc5a95dfefd71487edc1424f1b2d69b1239
a67e09c836dbb9423497332f21faf23dd600a6be
refs/heads/main
2023-04-11T15:35:47.358511
2021-05-08T23:26:35
2021-05-08T23:26:35
365,629,622
0
0
null
null
null
null
UTF-8
C++
false
false
419
cpp
Collection.cpp
#include <iostream> #include <set> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); set<int> conjunto; int tam, num, count = 0; cin>>tam; for(int i=0; i<tam; i++){ cin>>num; if(conjunto.count(num)==0){ conjunto.insert(num); } else { count++; } } cout<<count<<endl; return 0; }
b2ec3841cb2a482e963467a34ce562db192260d8
a28160172ac62e1cc4618fc717ca5d6999aeef23
/Temp/il2cppOutput/il2cppOutput/Il2CppCompilerCalculateTypeValues_9Table.cpp
50bdb069fbea47715dcd3e95a882df58730ab575
[]
no_license
HomoColossus/HomoCollosusVuforia
842b8cfb6bf788d474d27c133a4842f026d565be
78abc9ebb5acc0873e6ca0720b9f01a5c52e9b48
refs/heads/master
2021-05-06T19:51:59.424116
2017-11-29T10:17:22
2017-11-29T10:17:22
112,193,877
0
0
null
2017-12-03T15:06:08
2017-11-27T12:31:20
C++
UTF-8
C++
false
false
328,601
cpp
Il2CppCompilerCalculateTypeValues_9Table.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 "class-internals.h" #include "codegen/il2cpp-codegen.h" #include "object-internals.h" // System.Threading.ManualResetEvent struct ManualResetEvent_t1253388680; // System.IO.Stream struct Stream_t669916290; // Mono.Security.Protocol.Tls.Context struct Context_t4280724427; // System.Byte[] struct ByteU5BU5D_t3983351780; // System.AsyncCallback struct AsyncCallback_t3856731007; // System.Exception struct Exception_t2993544719; // System.String struct String_t; // Mono.Security.X509.X509Store struct X509Store_t3771926429; // System.Collections.ArrayList struct ArrayList_t2987363682; // Mono.Security.X509.X509Stores struct X509Stores_t1247242059; // System.Security.Cryptography.X509Certificates.X509CertificateCollection struct X509CertificateCollection_t142679051; // System.Security.Cryptography.X509Certificates.X509Certificate struct X509Certificate_t1118457860; // Mono.Security.Cryptography.RSAManaged struct RSAManaged_t3657898182; // Mono.Security.ASN1 struct ASN1_t2411596682; // Mono.Security.X509.X509CertificateCollection struct X509CertificateCollection_t669936613; // System.Security.Cryptography.RandomNumberGenerator struct RandomNumberGenerator_t2386858178; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> struct Dictionary_2_t603883569; // System.Collections.IEnumerator struct IEnumerator_t382491479; // Mono.Security.Protocol.Tls.CipherSuite struct CipherSuite_t4022274145; // System.Collections.Hashtable struct Hashtable_t1336544484; // Mono.Security.PKCS7/ContentInfo struct ContentInfo_t2274152496; // System.Security.Cryptography.KeySizes[] struct KeySizesU5BU5D_t213991305; // System.IntPtr[] struct IntPtrU5BU5D_t1279659245; // System.Collections.IDictionary struct IDictionary_t560001927; // System.UInt32[] struct UInt32U5BU5D_t2511474702; // Mono.Security.Protocol.Tls.Handshake.HandshakeMessage struct HandshakeMessage_t432326738; // Mono.Math.BigInteger struct BigInteger_t1332966298; // System.Security.Cryptography.RSA struct RSA_t1848366421; // System.Security.Cryptography.HashAlgorithm struct HashAlgorithm_t3103134881; // Mono.Security.Protocol.Tls.Alert struct Alert_t4252074283; // System.Char[] struct CharU5BU5D_t1342097413; // Mono.Security.X509.Extensions.GeneralNames struct GeneralNames_t2881647084; // System.Void struct Void_t2464324455; // Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler struct KeyGeneratedEventHandler_t1006745161; // System.IO.MemoryStream struct MemoryStream_t3639578493; // Mono.Security.Protocol.Tls.RecordProtocol struct RecordProtocol_t164207684; // System.Reflection.MethodInfo struct MethodInfo_t; // System.DelegateData struct DelegateData_t1882957669; // System.String[] struct StringU5BU5D_t3026901547; // System.Int32[] struct Int32U5BU5D_t654359361; // Mono.Security.X509.X509Certificate struct X509Certificate_t3614464293; // Mono.Security.Protocol.Tls.CertificateValidationCallback struct CertificateValidationCallback_t4268601155; // Mono.Security.Protocol.Tls.CertificateSelectionCallback struct CertificateSelectionCallback_t2372005106; // Mono.Security.Protocol.Tls.PrivateKeySelectionCallback struct PrivateKeySelectionCallback_t2707405579; // Mono.Security.Protocol.Tls.CertificateValidationCallback2 struct CertificateValidationCallback2_t3925647316; // Mono.Security.Protocol.Tls.TlsServerSettings struct TlsServerSettings_t3936914880; // Mono.Security.Protocol.Tls.TlsClientSettings struct TlsClientSettings_t97405758; // Mono.Security.Protocol.Tls.SecurityParameters struct SecurityParameters_t3249263566; // Mono.Security.Protocol.Tls.CipherSuiteCollection struct CipherSuiteCollection_t2392215148; // Mono.Security.Protocol.Tls.TlsStream struct TlsStream_t1307068231; // System.Security.Cryptography.SymmetricAlgorithm struct SymmetricAlgorithm_t3323307289; // System.Security.Cryptography.ICryptoTransform struct ICryptoTransform_t479575587; // System.Security.Cryptography.KeyedHashAlgorithm struct KeyedHashAlgorithm_t3693065389; // Mono.Security.Protocol.Tls.SslClientStream struct SslClientStream_t4073644265; // System.Net.HttpWebRequest struct HttpWebRequest_t1320998880; // Mono.Security.X509.X509ExtensionCollection struct X509ExtensionCollection_t1845307619; // System.EventArgs struct EventArgs_t1231669867; // System.IAsyncResult struct IAsyncResult_t3133028236; // System.Security.Cryptography.DSA struct DSA_t1103361111; #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 #ifndef U3CMODULEU3E_T203241527_H #define U3CMODULEU3E_T203241527_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_t203241527 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U3CMODULEU3E_T203241527_H #ifndef RECORDPROTOCOL_T164207684_H #define RECORDPROTOCOL_T164207684_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.RecordProtocol struct RecordProtocol_t164207684 : public RuntimeObject { public: // System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol::innerStream Stream_t669916290 * ___innerStream_1; // Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.RecordProtocol::context Context_t4280724427 * ___context_2; public: inline static int32_t get_offset_of_innerStream_1() { return static_cast<int32_t>(offsetof(RecordProtocol_t164207684, ___innerStream_1)); } inline Stream_t669916290 * get_innerStream_1() const { return ___innerStream_1; } inline Stream_t669916290 ** get_address_of_innerStream_1() { return &___innerStream_1; } inline void set_innerStream_1(Stream_t669916290 * value) { ___innerStream_1 = value; Il2CppCodeGenWriteBarrier((&___innerStream_1), value); } inline static int32_t get_offset_of_context_2() { return static_cast<int32_t>(offsetof(RecordProtocol_t164207684, ___context_2)); } inline Context_t4280724427 * get_context_2() const { return ___context_2; } inline Context_t4280724427 ** get_address_of_context_2() { return &___context_2; } inline void set_context_2(Context_t4280724427 * value) { ___context_2 = value; Il2CppCodeGenWriteBarrier((&___context_2), value); } }; struct RecordProtocol_t164207684_StaticFields { public: // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol::record_processing ManualResetEvent_t1253388680 * ___record_processing_0; public: inline static int32_t get_offset_of_record_processing_0() { return static_cast<int32_t>(offsetof(RecordProtocol_t164207684_StaticFields, ___record_processing_0)); } inline ManualResetEvent_t1253388680 * get_record_processing_0() const { return ___record_processing_0; } inline ManualResetEvent_t1253388680 ** get_address_of_record_processing_0() { return &___record_processing_0; } inline void set_record_processing_0(ManualResetEvent_t1253388680 * value) { ___record_processing_0 = value; Il2CppCodeGenWriteBarrier((&___record_processing_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECORDPROTOCOL_T164207684_H #ifndef HASHALGORITHM_T3103134881_H #define HASHALGORITHM_T3103134881_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.HashAlgorithm struct HashAlgorithm_t3103134881 : public RuntimeObject { public: // System.Byte[] System.Security.Cryptography.HashAlgorithm::HashValue ByteU5BU5D_t3983351780* ___HashValue_0; // System.Int32 System.Security.Cryptography.HashAlgorithm::HashSizeValue int32_t ___HashSizeValue_1; // System.Int32 System.Security.Cryptography.HashAlgorithm::State int32_t ___State_2; // System.Boolean System.Security.Cryptography.HashAlgorithm::disposed bool ___disposed_3; public: inline static int32_t get_offset_of_HashValue_0() { return static_cast<int32_t>(offsetof(HashAlgorithm_t3103134881, ___HashValue_0)); } inline ByteU5BU5D_t3983351780* get_HashValue_0() const { return ___HashValue_0; } inline ByteU5BU5D_t3983351780** get_address_of_HashValue_0() { return &___HashValue_0; } inline void set_HashValue_0(ByteU5BU5D_t3983351780* value) { ___HashValue_0 = value; Il2CppCodeGenWriteBarrier((&___HashValue_0), value); } inline static int32_t get_offset_of_HashSizeValue_1() { return static_cast<int32_t>(offsetof(HashAlgorithm_t3103134881, ___HashSizeValue_1)); } inline int32_t get_HashSizeValue_1() const { return ___HashSizeValue_1; } inline int32_t* get_address_of_HashSizeValue_1() { return &___HashSizeValue_1; } inline void set_HashSizeValue_1(int32_t value) { ___HashSizeValue_1 = value; } inline static int32_t get_offset_of_State_2() { return static_cast<int32_t>(offsetof(HashAlgorithm_t3103134881, ___State_2)); } inline int32_t get_State_2() const { return ___State_2; } inline int32_t* get_address_of_State_2() { return &___State_2; } inline void set_State_2(int32_t value) { ___State_2 = value; } inline static int32_t get_offset_of_disposed_3() { return static_cast<int32_t>(offsetof(HashAlgorithm_t3103134881, ___disposed_3)); } inline bool get_disposed_3() const { return ___disposed_3; } inline bool* get_address_of_disposed_3() { return &___disposed_3; } inline void set_disposed_3(bool value) { ___disposed_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HASHALGORITHM_T3103134881_H #ifndef RECEIVERECORDASYNCRESULT_T4167858354_H #define RECEIVERECORDASYNCRESULT_T4167858354_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult struct ReceiveRecordAsyncResult_t4167858354 : public RuntimeObject { public: // System.Object Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::locker RuntimeObject * ___locker_0; // System.AsyncCallback Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_userCallback AsyncCallback_t3856731007 * ____userCallback_1; // System.Object Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_userState RuntimeObject * ____userState_2; // System.Exception Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_asyncException Exception_t2993544719 * ____asyncException_3; // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::handle ManualResetEvent_t1253388680 * ___handle_4; // System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_resultingBuffer ByteU5BU5D_t3983351780* ____resultingBuffer_5; // System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_record Stream_t669916290 * ____record_6; // System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::completed bool ___completed_7; // System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_initialBuffer ByteU5BU5D_t3983351780* ____initialBuffer_8; public: inline static int32_t get_offset_of_locker_0() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ___locker_0)); } inline RuntimeObject * get_locker_0() const { return ___locker_0; } inline RuntimeObject ** get_address_of_locker_0() { return &___locker_0; } inline void set_locker_0(RuntimeObject * value) { ___locker_0 = value; Il2CppCodeGenWriteBarrier((&___locker_0), value); } inline static int32_t get_offset_of__userCallback_1() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____userCallback_1)); } inline AsyncCallback_t3856731007 * get__userCallback_1() const { return ____userCallback_1; } inline AsyncCallback_t3856731007 ** get_address_of__userCallback_1() { return &____userCallback_1; } inline void set__userCallback_1(AsyncCallback_t3856731007 * value) { ____userCallback_1 = value; Il2CppCodeGenWriteBarrier((&____userCallback_1), value); } inline static int32_t get_offset_of__userState_2() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____userState_2)); } inline RuntimeObject * get__userState_2() const { return ____userState_2; } inline RuntimeObject ** get_address_of__userState_2() { return &____userState_2; } inline void set__userState_2(RuntimeObject * value) { ____userState_2 = value; Il2CppCodeGenWriteBarrier((&____userState_2), value); } inline static int32_t get_offset_of__asyncException_3() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____asyncException_3)); } inline Exception_t2993544719 * get__asyncException_3() const { return ____asyncException_3; } inline Exception_t2993544719 ** get_address_of__asyncException_3() { return &____asyncException_3; } inline void set__asyncException_3(Exception_t2993544719 * value) { ____asyncException_3 = value; Il2CppCodeGenWriteBarrier((&____asyncException_3), value); } inline static int32_t get_offset_of_handle_4() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ___handle_4)); } inline ManualResetEvent_t1253388680 * get_handle_4() const { return ___handle_4; } inline ManualResetEvent_t1253388680 ** get_address_of_handle_4() { return &___handle_4; } inline void set_handle_4(ManualResetEvent_t1253388680 * value) { ___handle_4 = value; Il2CppCodeGenWriteBarrier((&___handle_4), value); } inline static int32_t get_offset_of__resultingBuffer_5() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____resultingBuffer_5)); } inline ByteU5BU5D_t3983351780* get__resultingBuffer_5() const { return ____resultingBuffer_5; } inline ByteU5BU5D_t3983351780** get_address_of__resultingBuffer_5() { return &____resultingBuffer_5; } inline void set__resultingBuffer_5(ByteU5BU5D_t3983351780* value) { ____resultingBuffer_5 = value; Il2CppCodeGenWriteBarrier((&____resultingBuffer_5), value); } inline static int32_t get_offset_of__record_6() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____record_6)); } inline Stream_t669916290 * get__record_6() const { return ____record_6; } inline Stream_t669916290 ** get_address_of__record_6() { return &____record_6; } inline void set__record_6(Stream_t669916290 * value) { ____record_6 = value; Il2CppCodeGenWriteBarrier((&____record_6), value); } inline static int32_t get_offset_of_completed_7() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ___completed_7)); } inline bool get_completed_7() const { return ___completed_7; } inline bool* get_address_of_completed_7() { return &___completed_7; } inline void set_completed_7(bool value) { ___completed_7 = value; } inline static int32_t get_offset_of__initialBuffer_8() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t4167858354, ____initialBuffer_8)); } inline ByteU5BU5D_t3983351780* get__initialBuffer_8() const { return ____initialBuffer_8; } inline ByteU5BU5D_t3983351780** get_address_of__initialBuffer_8() { return &____initialBuffer_8; } inline void set__initialBuffer_8(ByteU5BU5D_t3983351780* value) { ____initialBuffer_8 = value; Il2CppCodeGenWriteBarrier((&____initialBuffer_8), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECEIVERECORDASYNCRESULT_T4167858354_H #ifndef X509STORES_T1247242059_H #define X509STORES_T1247242059_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Stores struct X509Stores_t1247242059 : public RuntimeObject { public: // System.String Mono.Security.X509.X509Stores::_storePath String_t* ____storePath_0; // Mono.Security.X509.X509Store Mono.Security.X509.X509Stores::_trusted X509Store_t3771926429 * ____trusted_1; public: inline static int32_t get_offset_of__storePath_0() { return static_cast<int32_t>(offsetof(X509Stores_t1247242059, ____storePath_0)); } inline String_t* get__storePath_0() const { return ____storePath_0; } inline String_t** get_address_of__storePath_0() { return &____storePath_0; } inline void set__storePath_0(String_t* value) { ____storePath_0 = value; Il2CppCodeGenWriteBarrier((&____storePath_0), value); } inline static int32_t get_offset_of__trusted_1() { return static_cast<int32_t>(offsetof(X509Stores_t1247242059, ____trusted_1)); } inline X509Store_t3771926429 * get__trusted_1() const { return ____trusted_1; } inline X509Store_t3771926429 ** get_address_of__trusted_1() { return &____trusted_1; } inline void set__trusted_1(X509Store_t3771926429 * value) { ____trusted_1 = value; Il2CppCodeGenWriteBarrier((&____trusted_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509STORES_T1247242059_H #ifndef PKCS1_T358232502_H #define PKCS1_T358232502_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.PKCS1 struct PKCS1_t358232502 : public RuntimeObject { public: public: }; struct PKCS1_t358232502_StaticFields { public: // System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA1 ByteU5BU5D_t3983351780* ___emptySHA1_0; // System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA256 ByteU5BU5D_t3983351780* ___emptySHA256_1; // System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA384 ByteU5BU5D_t3983351780* ___emptySHA384_2; // System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA512 ByteU5BU5D_t3983351780* ___emptySHA512_3; public: inline static int32_t get_offset_of_emptySHA1_0() { return static_cast<int32_t>(offsetof(PKCS1_t358232502_StaticFields, ___emptySHA1_0)); } inline ByteU5BU5D_t3983351780* get_emptySHA1_0() const { return ___emptySHA1_0; } inline ByteU5BU5D_t3983351780** get_address_of_emptySHA1_0() { return &___emptySHA1_0; } inline void set_emptySHA1_0(ByteU5BU5D_t3983351780* value) { ___emptySHA1_0 = value; Il2CppCodeGenWriteBarrier((&___emptySHA1_0), value); } inline static int32_t get_offset_of_emptySHA256_1() { return static_cast<int32_t>(offsetof(PKCS1_t358232502_StaticFields, ___emptySHA256_1)); } inline ByteU5BU5D_t3983351780* get_emptySHA256_1() const { return ___emptySHA256_1; } inline ByteU5BU5D_t3983351780** get_address_of_emptySHA256_1() { return &___emptySHA256_1; } inline void set_emptySHA256_1(ByteU5BU5D_t3983351780* value) { ___emptySHA256_1 = value; Il2CppCodeGenWriteBarrier((&___emptySHA256_1), value); } inline static int32_t get_offset_of_emptySHA384_2() { return static_cast<int32_t>(offsetof(PKCS1_t358232502_StaticFields, ___emptySHA384_2)); } inline ByteU5BU5D_t3983351780* get_emptySHA384_2() const { return ___emptySHA384_2; } inline ByteU5BU5D_t3983351780** get_address_of_emptySHA384_2() { return &___emptySHA384_2; } inline void set_emptySHA384_2(ByteU5BU5D_t3983351780* value) { ___emptySHA384_2 = value; Il2CppCodeGenWriteBarrier((&___emptySHA384_2), value); } inline static int32_t get_offset_of_emptySHA512_3() { return static_cast<int32_t>(offsetof(PKCS1_t358232502_StaticFields, ___emptySHA512_3)); } inline ByteU5BU5D_t3983351780* get_emptySHA512_3() const { return ___emptySHA512_3; } inline ByteU5BU5D_t3983351780** get_address_of_emptySHA512_3() { return &___emptySHA512_3; } inline void set_emptySHA512_3(ByteU5BU5D_t3983351780* value) { ___emptySHA512_3 = value; Il2CppCodeGenWriteBarrier((&___emptySHA512_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PKCS1_T358232502_H #ifndef PKCS8_T2522820112_H #define PKCS8_T2522820112_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.PKCS8 struct PKCS8_t2522820112 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PKCS8_T2522820112_H #ifndef PRIVATEKEYINFO_T294917684_H #define PRIVATEKEYINFO_T294917684_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.PKCS8/PrivateKeyInfo struct PrivateKeyInfo_t294917684 : public RuntimeObject { public: // System.Int32 Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_version int32_t ____version_0; // System.String Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_algorithm String_t* ____algorithm_1; // System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_key ByteU5BU5D_t3983351780* ____key_2; // System.Collections.ArrayList Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_list ArrayList_t2987363682 * ____list_3; public: inline static int32_t get_offset_of__version_0() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t294917684, ____version_0)); } inline int32_t get__version_0() const { return ____version_0; } inline int32_t* get_address_of__version_0() { return &____version_0; } inline void set__version_0(int32_t value) { ____version_0 = value; } inline static int32_t get_offset_of__algorithm_1() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t294917684, ____algorithm_1)); } inline String_t* get__algorithm_1() const { return ____algorithm_1; } inline String_t** get_address_of__algorithm_1() { return &____algorithm_1; } inline void set__algorithm_1(String_t* value) { ____algorithm_1 = value; Il2CppCodeGenWriteBarrier((&____algorithm_1), value); } inline static int32_t get_offset_of__key_2() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t294917684, ____key_2)); } inline ByteU5BU5D_t3983351780* get__key_2() const { return ____key_2; } inline ByteU5BU5D_t3983351780** get_address_of__key_2() { return &____key_2; } inline void set__key_2(ByteU5BU5D_t3983351780* value) { ____key_2 = value; Il2CppCodeGenWriteBarrier((&____key_2), value); } inline static int32_t get_offset_of__list_3() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t294917684, ____list_3)); } inline ArrayList_t2987363682 * get__list_3() const { return ____list_3; } inline ArrayList_t2987363682 ** get_address_of__list_3() { return &____list_3; } inline void set__list_3(ArrayList_t2987363682 * value) { ____list_3 = value; Il2CppCodeGenWriteBarrier((&____list_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PRIVATEKEYINFO_T294917684_H #ifndef ENCRYPTEDPRIVATEKEYINFO_T1479378890_H #define ENCRYPTEDPRIVATEKEYINFO_T1479378890_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo struct EncryptedPrivateKeyInfo_t1479378890 : public RuntimeObject { public: // System.String Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_algorithm String_t* ____algorithm_0; // System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_salt ByteU5BU5D_t3983351780* ____salt_1; // System.Int32 Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_iterations int32_t ____iterations_2; // System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_data ByteU5BU5D_t3983351780* ____data_3; public: inline static int32_t get_offset_of__algorithm_0() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t1479378890, ____algorithm_0)); } inline String_t* get__algorithm_0() const { return ____algorithm_0; } inline String_t** get_address_of__algorithm_0() { return &____algorithm_0; } inline void set__algorithm_0(String_t* value) { ____algorithm_0 = value; Il2CppCodeGenWriteBarrier((&____algorithm_0), value); } inline static int32_t get_offset_of__salt_1() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t1479378890, ____salt_1)); } inline ByteU5BU5D_t3983351780* get__salt_1() const { return ____salt_1; } inline ByteU5BU5D_t3983351780** get_address_of__salt_1() { return &____salt_1; } inline void set__salt_1(ByteU5BU5D_t3983351780* value) { ____salt_1 = value; Il2CppCodeGenWriteBarrier((&____salt_1), value); } inline static int32_t get_offset_of__iterations_2() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t1479378890, ____iterations_2)); } inline int32_t get__iterations_2() const { return ____iterations_2; } inline int32_t* get_address_of__iterations_2() { return &____iterations_2; } inline void set__iterations_2(int32_t value) { ____iterations_2 = value; } inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t1479378890, ____data_3)); } inline ByteU5BU5D_t3983351780* get__data_3() const { return ____data_3; } inline ByteU5BU5D_t3983351780** get_address_of__data_3() { return &____data_3; } inline void set__data_3(ByteU5BU5D_t3983351780* value) { ____data_3 = value; Il2CppCodeGenWriteBarrier((&____data_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENCRYPTEDPRIVATEKEYINFO_T1479378890_H #ifndef VALUETYPE_T1592695253_H #define VALUETYPE_T1592695253_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ValueType struct ValueType_t1592695253 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_t1592695253_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_t1592695253_marshaled_com { }; #endif // VALUETYPE_T1592695253_H #ifndef X509STOREMANAGER_T3447247894_H #define X509STOREMANAGER_T3447247894_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509StoreManager struct X509StoreManager_t3447247894 : public RuntimeObject { public: public: }; struct X509StoreManager_t3447247894_StaticFields { public: // Mono.Security.X509.X509Stores Mono.Security.X509.X509StoreManager::_userStore X509Stores_t1247242059 * ____userStore_0; // Mono.Security.X509.X509Stores Mono.Security.X509.X509StoreManager::_machineStore X509Stores_t1247242059 * ____machineStore_1; public: inline static int32_t get_offset_of__userStore_0() { return static_cast<int32_t>(offsetof(X509StoreManager_t3447247894_StaticFields, ____userStore_0)); } inline X509Stores_t1247242059 * get__userStore_0() const { return ____userStore_0; } inline X509Stores_t1247242059 ** get_address_of__userStore_0() { return &____userStore_0; } inline void set__userStore_0(X509Stores_t1247242059 * value) { ____userStore_0 = value; Il2CppCodeGenWriteBarrier((&____userStore_0), value); } inline static int32_t get_offset_of__machineStore_1() { return static_cast<int32_t>(offsetof(X509StoreManager_t3447247894_StaticFields, ____machineStore_1)); } inline X509Stores_t1247242059 * get__machineStore_1() const { return ____machineStore_1; } inline X509Stores_t1247242059 ** get_address_of__machineStore_1() { return &____machineStore_1; } inline void set__machineStore_1(X509Stores_t1247242059 * value) { ____machineStore_1 = value; Il2CppCodeGenWriteBarrier((&____machineStore_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509STOREMANAGER_T3447247894_H #ifndef TLSCLIENTSETTINGS_T97405758_H #define TLSCLIENTSETTINGS_T97405758_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.TlsClientSettings struct TlsClientSettings_t97405758 : public RuntimeObject { public: // System.String Mono.Security.Protocol.Tls.TlsClientSettings::targetHost String_t* ___targetHost_0; // System.Security.Cryptography.X509Certificates.X509CertificateCollection Mono.Security.Protocol.Tls.TlsClientSettings::certificates X509CertificateCollection_t142679051 * ___certificates_1; // System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.TlsClientSettings::clientCertificate X509Certificate_t1118457860 * ___clientCertificate_2; // Mono.Security.Cryptography.RSAManaged Mono.Security.Protocol.Tls.TlsClientSettings::certificateRSA RSAManaged_t3657898182 * ___certificateRSA_3; public: inline static int32_t get_offset_of_targetHost_0() { return static_cast<int32_t>(offsetof(TlsClientSettings_t97405758, ___targetHost_0)); } inline String_t* get_targetHost_0() const { return ___targetHost_0; } inline String_t** get_address_of_targetHost_0() { return &___targetHost_0; } inline void set_targetHost_0(String_t* value) { ___targetHost_0 = value; Il2CppCodeGenWriteBarrier((&___targetHost_0), value); } inline static int32_t get_offset_of_certificates_1() { return static_cast<int32_t>(offsetof(TlsClientSettings_t97405758, ___certificates_1)); } inline X509CertificateCollection_t142679051 * get_certificates_1() const { return ___certificates_1; } inline X509CertificateCollection_t142679051 ** get_address_of_certificates_1() { return &___certificates_1; } inline void set_certificates_1(X509CertificateCollection_t142679051 * value) { ___certificates_1 = value; Il2CppCodeGenWriteBarrier((&___certificates_1), value); } inline static int32_t get_offset_of_clientCertificate_2() { return static_cast<int32_t>(offsetof(TlsClientSettings_t97405758, ___clientCertificate_2)); } inline X509Certificate_t1118457860 * get_clientCertificate_2() const { return ___clientCertificate_2; } inline X509Certificate_t1118457860 ** get_address_of_clientCertificate_2() { return &___clientCertificate_2; } inline void set_clientCertificate_2(X509Certificate_t1118457860 * value) { ___clientCertificate_2 = value; Il2CppCodeGenWriteBarrier((&___clientCertificate_2), value); } inline static int32_t get_offset_of_certificateRSA_3() { return static_cast<int32_t>(offsetof(TlsClientSettings_t97405758, ___certificateRSA_3)); } inline RSAManaged_t3657898182 * get_certificateRSA_3() const { return ___certificateRSA_3; } inline RSAManaged_t3657898182 ** get_address_of_certificateRSA_3() { return &___certificateRSA_3; } inline void set_certificateRSA_3(RSAManaged_t3657898182 * value) { ___certificateRSA_3 = value; Il2CppCodeGenWriteBarrier((&___certificateRSA_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TLSCLIENTSETTINGS_T97405758_H #ifndef SAFEBAG_T920411420_H #define SAFEBAG_T920411420_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.SafeBag struct SafeBag_t920411420 : public RuntimeObject { public: // System.String Mono.Security.X509.SafeBag::_bagOID String_t* ____bagOID_0; // Mono.Security.ASN1 Mono.Security.X509.SafeBag::_asn1 ASN1_t2411596682 * ____asn1_1; public: inline static int32_t get_offset_of__bagOID_0() { return static_cast<int32_t>(offsetof(SafeBag_t920411420, ____bagOID_0)); } inline String_t* get__bagOID_0() const { return ____bagOID_0; } inline String_t** get_address_of__bagOID_0() { return &____bagOID_0; } inline void set__bagOID_0(String_t* value) { ____bagOID_0 = value; Il2CppCodeGenWriteBarrier((&____bagOID_0), value); } inline static int32_t get_offset_of__asn1_1() { return static_cast<int32_t>(offsetof(SafeBag_t920411420, ____asn1_1)); } inline ASN1_t2411596682 * get__asn1_1() const { return ____asn1_1; } inline ASN1_t2411596682 ** get_address_of__asn1_1() { return &____asn1_1; } inline void set__asn1_1(ASN1_t2411596682 * value) { ____asn1_1 = value; Il2CppCodeGenWriteBarrier((&____asn1_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SAFEBAG_T920411420_H #ifndef PKCS12_T1290927474_H #define PKCS12_T1290927474_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.PKCS12 struct PKCS12_t1290927474 : public RuntimeObject { public: // System.Byte[] Mono.Security.X509.PKCS12::_password ByteU5BU5D_t3983351780* ____password_1; // System.Collections.ArrayList Mono.Security.X509.PKCS12::_keyBags ArrayList_t2987363682 * ____keyBags_2; // System.Collections.ArrayList Mono.Security.X509.PKCS12::_secretBags ArrayList_t2987363682 * ____secretBags_3; // Mono.Security.X509.X509CertificateCollection Mono.Security.X509.PKCS12::_certs X509CertificateCollection_t669936613 * ____certs_4; // System.Boolean Mono.Security.X509.PKCS12::_keyBagsChanged bool ____keyBagsChanged_5; // System.Boolean Mono.Security.X509.PKCS12::_secretBagsChanged bool ____secretBagsChanged_6; // System.Boolean Mono.Security.X509.PKCS12::_certsChanged bool ____certsChanged_7; // System.Int32 Mono.Security.X509.PKCS12::_iterations int32_t ____iterations_8; // System.Collections.ArrayList Mono.Security.X509.PKCS12::_safeBags ArrayList_t2987363682 * ____safeBags_9; // System.Security.Cryptography.RandomNumberGenerator Mono.Security.X509.PKCS12::_rng RandomNumberGenerator_t2386858178 * ____rng_10; public: inline static int32_t get_offset_of__password_1() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____password_1)); } inline ByteU5BU5D_t3983351780* get__password_1() const { return ____password_1; } inline ByteU5BU5D_t3983351780** get_address_of__password_1() { return &____password_1; } inline void set__password_1(ByteU5BU5D_t3983351780* value) { ____password_1 = value; Il2CppCodeGenWriteBarrier((&____password_1), value); } inline static int32_t get_offset_of__keyBags_2() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____keyBags_2)); } inline ArrayList_t2987363682 * get__keyBags_2() const { return ____keyBags_2; } inline ArrayList_t2987363682 ** get_address_of__keyBags_2() { return &____keyBags_2; } inline void set__keyBags_2(ArrayList_t2987363682 * value) { ____keyBags_2 = value; Il2CppCodeGenWriteBarrier((&____keyBags_2), value); } inline static int32_t get_offset_of__secretBags_3() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____secretBags_3)); } inline ArrayList_t2987363682 * get__secretBags_3() const { return ____secretBags_3; } inline ArrayList_t2987363682 ** get_address_of__secretBags_3() { return &____secretBags_3; } inline void set__secretBags_3(ArrayList_t2987363682 * value) { ____secretBags_3 = value; Il2CppCodeGenWriteBarrier((&____secretBags_3), value); } inline static int32_t get_offset_of__certs_4() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____certs_4)); } inline X509CertificateCollection_t669936613 * get__certs_4() const { return ____certs_4; } inline X509CertificateCollection_t669936613 ** get_address_of__certs_4() { return &____certs_4; } inline void set__certs_4(X509CertificateCollection_t669936613 * value) { ____certs_4 = value; Il2CppCodeGenWriteBarrier((&____certs_4), value); } inline static int32_t get_offset_of__keyBagsChanged_5() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____keyBagsChanged_5)); } inline bool get__keyBagsChanged_5() const { return ____keyBagsChanged_5; } inline bool* get_address_of__keyBagsChanged_5() { return &____keyBagsChanged_5; } inline void set__keyBagsChanged_5(bool value) { ____keyBagsChanged_5 = value; } inline static int32_t get_offset_of__secretBagsChanged_6() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____secretBagsChanged_6)); } inline bool get__secretBagsChanged_6() const { return ____secretBagsChanged_6; } inline bool* get_address_of__secretBagsChanged_6() { return &____secretBagsChanged_6; } inline void set__secretBagsChanged_6(bool value) { ____secretBagsChanged_6 = value; } inline static int32_t get_offset_of__certsChanged_7() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____certsChanged_7)); } inline bool get__certsChanged_7() const { return ____certsChanged_7; } inline bool* get_address_of__certsChanged_7() { return &____certsChanged_7; } inline void set__certsChanged_7(bool value) { ____certsChanged_7 = value; } inline static int32_t get_offset_of__iterations_8() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____iterations_8)); } inline int32_t get__iterations_8() const { return ____iterations_8; } inline int32_t* get_address_of__iterations_8() { return &____iterations_8; } inline void set__iterations_8(int32_t value) { ____iterations_8 = value; } inline static int32_t get_offset_of__safeBags_9() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____safeBags_9)); } inline ArrayList_t2987363682 * get__safeBags_9() const { return ____safeBags_9; } inline ArrayList_t2987363682 ** get_address_of__safeBags_9() { return &____safeBags_9; } inline void set__safeBags_9(ArrayList_t2987363682 * value) { ____safeBags_9 = value; Il2CppCodeGenWriteBarrier((&____safeBags_9), value); } inline static int32_t get_offset_of__rng_10() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474, ____rng_10)); } inline RandomNumberGenerator_t2386858178 * get__rng_10() const { return ____rng_10; } inline RandomNumberGenerator_t2386858178 ** get_address_of__rng_10() { return &____rng_10; } inline void set__rng_10(RandomNumberGenerator_t2386858178 * value) { ____rng_10 = value; Il2CppCodeGenWriteBarrier((&____rng_10), value); } }; struct PKCS12_t1290927474_StaticFields { public: // System.Int32 Mono.Security.X509.PKCS12::recommendedIterationCount int32_t ___recommendedIterationCount_0; // System.Int32 Mono.Security.X509.PKCS12::password_max_length int32_t ___password_max_length_11; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.PKCS12::<>f__switch$map5 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map5_12; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.PKCS12::<>f__switch$map6 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map6_13; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.PKCS12::<>f__switch$map7 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map7_14; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.PKCS12::<>f__switch$map8 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map8_15; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.PKCS12::<>f__switch$mapC Dictionary_2_t603883569 * ___U3CU3Ef__switchU24mapC_16; public: inline static int32_t get_offset_of_recommendedIterationCount_0() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___recommendedIterationCount_0)); } inline int32_t get_recommendedIterationCount_0() const { return ___recommendedIterationCount_0; } inline int32_t* get_address_of_recommendedIterationCount_0() { return &___recommendedIterationCount_0; } inline void set_recommendedIterationCount_0(int32_t value) { ___recommendedIterationCount_0 = value; } inline static int32_t get_offset_of_password_max_length_11() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___password_max_length_11)); } inline int32_t get_password_max_length_11() const { return ___password_max_length_11; } inline int32_t* get_address_of_password_max_length_11() { return &___password_max_length_11; } inline void set_password_max_length_11(int32_t value) { ___password_max_length_11 = value; } inline static int32_t get_offset_of_U3CU3Ef__switchU24map5_12() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___U3CU3Ef__switchU24map5_12)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map5_12() const { return ___U3CU3Ef__switchU24map5_12; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map5_12() { return &___U3CU3Ef__switchU24map5_12; } inline void set_U3CU3Ef__switchU24map5_12(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map5_12 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map5_12), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24map6_13() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___U3CU3Ef__switchU24map6_13)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map6_13() const { return ___U3CU3Ef__switchU24map6_13; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map6_13() { return &___U3CU3Ef__switchU24map6_13; } inline void set_U3CU3Ef__switchU24map6_13(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map6_13 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map6_13), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24map7_14() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___U3CU3Ef__switchU24map7_14)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map7_14() const { return ___U3CU3Ef__switchU24map7_14; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map7_14() { return &___U3CU3Ef__switchU24map7_14; } inline void set_U3CU3Ef__switchU24map7_14(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map7_14 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map7_14), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24map8_15() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___U3CU3Ef__switchU24map8_15)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map8_15() const { return ___U3CU3Ef__switchU24map8_15; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map8_15() { return &___U3CU3Ef__switchU24map8_15; } inline void set_U3CU3Ef__switchU24map8_15(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map8_15 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map8_15), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24mapC_16() { return static_cast<int32_t>(offsetof(PKCS12_t1290927474_StaticFields, ___U3CU3Ef__switchU24mapC_16)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24mapC_16() const { return ___U3CU3Ef__switchU24mapC_16; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24mapC_16() { return &___U3CU3Ef__switchU24mapC_16; } inline void set_U3CU3Ef__switchU24mapC_16(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24mapC_16 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapC_16), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PKCS12_T1290927474_H #ifndef DERIVEBYTES_T1678242693_H #define DERIVEBYTES_T1678242693_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.PKCS12/DeriveBytes struct DeriveBytes_t1678242693 : public RuntimeObject { public: // System.String Mono.Security.X509.PKCS12/DeriveBytes::_hashName String_t* ____hashName_3; // System.Int32 Mono.Security.X509.PKCS12/DeriveBytes::_iterations int32_t ____iterations_4; // System.Byte[] Mono.Security.X509.PKCS12/DeriveBytes::_password ByteU5BU5D_t3983351780* ____password_5; // System.Byte[] Mono.Security.X509.PKCS12/DeriveBytes::_salt ByteU5BU5D_t3983351780* ____salt_6; public: inline static int32_t get_offset_of__hashName_3() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693, ____hashName_3)); } inline String_t* get__hashName_3() const { return ____hashName_3; } inline String_t** get_address_of__hashName_3() { return &____hashName_3; } inline void set__hashName_3(String_t* value) { ____hashName_3 = value; Il2CppCodeGenWriteBarrier((&____hashName_3), value); } inline static int32_t get_offset_of__iterations_4() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693, ____iterations_4)); } inline int32_t get__iterations_4() const { return ____iterations_4; } inline int32_t* get_address_of__iterations_4() { return &____iterations_4; } inline void set__iterations_4(int32_t value) { ____iterations_4 = value; } inline static int32_t get_offset_of__password_5() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693, ____password_5)); } inline ByteU5BU5D_t3983351780* get__password_5() const { return ____password_5; } inline ByteU5BU5D_t3983351780** get_address_of__password_5() { return &____password_5; } inline void set__password_5(ByteU5BU5D_t3983351780* value) { ____password_5 = value; Il2CppCodeGenWriteBarrier((&____password_5), value); } inline static int32_t get_offset_of__salt_6() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693, ____salt_6)); } inline ByteU5BU5D_t3983351780* get__salt_6() const { return ____salt_6; } inline ByteU5BU5D_t3983351780** get_address_of__salt_6() { return &____salt_6; } inline void set__salt_6(ByteU5BU5D_t3983351780* value) { ____salt_6 = value; Il2CppCodeGenWriteBarrier((&____salt_6), value); } }; struct DeriveBytes_t1678242693_StaticFields { public: // System.Byte[] Mono.Security.X509.PKCS12/DeriveBytes::keyDiversifier ByteU5BU5D_t3983351780* ___keyDiversifier_0; // System.Byte[] Mono.Security.X509.PKCS12/DeriveBytes::ivDiversifier ByteU5BU5D_t3983351780* ___ivDiversifier_1; // System.Byte[] Mono.Security.X509.PKCS12/DeriveBytes::macDiversifier ByteU5BU5D_t3983351780* ___macDiversifier_2; public: inline static int32_t get_offset_of_keyDiversifier_0() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693_StaticFields, ___keyDiversifier_0)); } inline ByteU5BU5D_t3983351780* get_keyDiversifier_0() const { return ___keyDiversifier_0; } inline ByteU5BU5D_t3983351780** get_address_of_keyDiversifier_0() { return &___keyDiversifier_0; } inline void set_keyDiversifier_0(ByteU5BU5D_t3983351780* value) { ___keyDiversifier_0 = value; Il2CppCodeGenWriteBarrier((&___keyDiversifier_0), value); } inline static int32_t get_offset_of_ivDiversifier_1() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693_StaticFields, ___ivDiversifier_1)); } inline ByteU5BU5D_t3983351780* get_ivDiversifier_1() const { return ___ivDiversifier_1; } inline ByteU5BU5D_t3983351780** get_address_of_ivDiversifier_1() { return &___ivDiversifier_1; } inline void set_ivDiversifier_1(ByteU5BU5D_t3983351780* value) { ___ivDiversifier_1 = value; Il2CppCodeGenWriteBarrier((&___ivDiversifier_1), value); } inline static int32_t get_offset_of_macDiversifier_2() { return static_cast<int32_t>(offsetof(DeriveBytes_t1678242693_StaticFields, ___macDiversifier_2)); } inline ByteU5BU5D_t3983351780* get_macDiversifier_2() const { return ___macDiversifier_2; } inline ByteU5BU5D_t3983351780** get_address_of_macDiversifier_2() { return &___macDiversifier_2; } inline void set_macDiversifier_2(ByteU5BU5D_t3983351780* value) { ___macDiversifier_2 = value; Il2CppCodeGenWriteBarrier((&___macDiversifier_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DERIVEBYTES_T1678242693_H #ifndef X501_T1114902004_H #define X501_T1114902004_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X501 struct X501_t1114902004 : public RuntimeObject { public: public: }; struct X501_t1114902004_StaticFields { public: // System.Byte[] Mono.Security.X509.X501::countryName ByteU5BU5D_t3983351780* ___countryName_0; // System.Byte[] Mono.Security.X509.X501::organizationName ByteU5BU5D_t3983351780* ___organizationName_1; // System.Byte[] Mono.Security.X509.X501::organizationalUnitName ByteU5BU5D_t3983351780* ___organizationalUnitName_2; // System.Byte[] Mono.Security.X509.X501::commonName ByteU5BU5D_t3983351780* ___commonName_3; // System.Byte[] Mono.Security.X509.X501::localityName ByteU5BU5D_t3983351780* ___localityName_4; // System.Byte[] Mono.Security.X509.X501::stateOrProvinceName ByteU5BU5D_t3983351780* ___stateOrProvinceName_5; // System.Byte[] Mono.Security.X509.X501::streetAddress ByteU5BU5D_t3983351780* ___streetAddress_6; // System.Byte[] Mono.Security.X509.X501::domainComponent ByteU5BU5D_t3983351780* ___domainComponent_7; // System.Byte[] Mono.Security.X509.X501::userid ByteU5BU5D_t3983351780* ___userid_8; // System.Byte[] Mono.Security.X509.X501::email ByteU5BU5D_t3983351780* ___email_9; // System.Byte[] Mono.Security.X509.X501::dnQualifier ByteU5BU5D_t3983351780* ___dnQualifier_10; // System.Byte[] Mono.Security.X509.X501::title ByteU5BU5D_t3983351780* ___title_11; // System.Byte[] Mono.Security.X509.X501::surname ByteU5BU5D_t3983351780* ___surname_12; // System.Byte[] Mono.Security.X509.X501::givenName ByteU5BU5D_t3983351780* ___givenName_13; // System.Byte[] Mono.Security.X509.X501::initial ByteU5BU5D_t3983351780* ___initial_14; public: inline static int32_t get_offset_of_countryName_0() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___countryName_0)); } inline ByteU5BU5D_t3983351780* get_countryName_0() const { return ___countryName_0; } inline ByteU5BU5D_t3983351780** get_address_of_countryName_0() { return &___countryName_0; } inline void set_countryName_0(ByteU5BU5D_t3983351780* value) { ___countryName_0 = value; Il2CppCodeGenWriteBarrier((&___countryName_0), value); } inline static int32_t get_offset_of_organizationName_1() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___organizationName_1)); } inline ByteU5BU5D_t3983351780* get_organizationName_1() const { return ___organizationName_1; } inline ByteU5BU5D_t3983351780** get_address_of_organizationName_1() { return &___organizationName_1; } inline void set_organizationName_1(ByteU5BU5D_t3983351780* value) { ___organizationName_1 = value; Il2CppCodeGenWriteBarrier((&___organizationName_1), value); } inline static int32_t get_offset_of_organizationalUnitName_2() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___organizationalUnitName_2)); } inline ByteU5BU5D_t3983351780* get_organizationalUnitName_2() const { return ___organizationalUnitName_2; } inline ByteU5BU5D_t3983351780** get_address_of_organizationalUnitName_2() { return &___organizationalUnitName_2; } inline void set_organizationalUnitName_2(ByteU5BU5D_t3983351780* value) { ___organizationalUnitName_2 = value; Il2CppCodeGenWriteBarrier((&___organizationalUnitName_2), value); } inline static int32_t get_offset_of_commonName_3() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___commonName_3)); } inline ByteU5BU5D_t3983351780* get_commonName_3() const { return ___commonName_3; } inline ByteU5BU5D_t3983351780** get_address_of_commonName_3() { return &___commonName_3; } inline void set_commonName_3(ByteU5BU5D_t3983351780* value) { ___commonName_3 = value; Il2CppCodeGenWriteBarrier((&___commonName_3), value); } inline static int32_t get_offset_of_localityName_4() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___localityName_4)); } inline ByteU5BU5D_t3983351780* get_localityName_4() const { return ___localityName_4; } inline ByteU5BU5D_t3983351780** get_address_of_localityName_4() { return &___localityName_4; } inline void set_localityName_4(ByteU5BU5D_t3983351780* value) { ___localityName_4 = value; Il2CppCodeGenWriteBarrier((&___localityName_4), value); } inline static int32_t get_offset_of_stateOrProvinceName_5() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___stateOrProvinceName_5)); } inline ByteU5BU5D_t3983351780* get_stateOrProvinceName_5() const { return ___stateOrProvinceName_5; } inline ByteU5BU5D_t3983351780** get_address_of_stateOrProvinceName_5() { return &___stateOrProvinceName_5; } inline void set_stateOrProvinceName_5(ByteU5BU5D_t3983351780* value) { ___stateOrProvinceName_5 = value; Il2CppCodeGenWriteBarrier((&___stateOrProvinceName_5), value); } inline static int32_t get_offset_of_streetAddress_6() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___streetAddress_6)); } inline ByteU5BU5D_t3983351780* get_streetAddress_6() const { return ___streetAddress_6; } inline ByteU5BU5D_t3983351780** get_address_of_streetAddress_6() { return &___streetAddress_6; } inline void set_streetAddress_6(ByteU5BU5D_t3983351780* value) { ___streetAddress_6 = value; Il2CppCodeGenWriteBarrier((&___streetAddress_6), value); } inline static int32_t get_offset_of_domainComponent_7() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___domainComponent_7)); } inline ByteU5BU5D_t3983351780* get_domainComponent_7() const { return ___domainComponent_7; } inline ByteU5BU5D_t3983351780** get_address_of_domainComponent_7() { return &___domainComponent_7; } inline void set_domainComponent_7(ByteU5BU5D_t3983351780* value) { ___domainComponent_7 = value; Il2CppCodeGenWriteBarrier((&___domainComponent_7), value); } inline static int32_t get_offset_of_userid_8() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___userid_8)); } inline ByteU5BU5D_t3983351780* get_userid_8() const { return ___userid_8; } inline ByteU5BU5D_t3983351780** get_address_of_userid_8() { return &___userid_8; } inline void set_userid_8(ByteU5BU5D_t3983351780* value) { ___userid_8 = value; Il2CppCodeGenWriteBarrier((&___userid_8), value); } inline static int32_t get_offset_of_email_9() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___email_9)); } inline ByteU5BU5D_t3983351780* get_email_9() const { return ___email_9; } inline ByteU5BU5D_t3983351780** get_address_of_email_9() { return &___email_9; } inline void set_email_9(ByteU5BU5D_t3983351780* value) { ___email_9 = value; Il2CppCodeGenWriteBarrier((&___email_9), value); } inline static int32_t get_offset_of_dnQualifier_10() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___dnQualifier_10)); } inline ByteU5BU5D_t3983351780* get_dnQualifier_10() const { return ___dnQualifier_10; } inline ByteU5BU5D_t3983351780** get_address_of_dnQualifier_10() { return &___dnQualifier_10; } inline void set_dnQualifier_10(ByteU5BU5D_t3983351780* value) { ___dnQualifier_10 = value; Il2CppCodeGenWriteBarrier((&___dnQualifier_10), value); } inline static int32_t get_offset_of_title_11() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___title_11)); } inline ByteU5BU5D_t3983351780* get_title_11() const { return ___title_11; } inline ByteU5BU5D_t3983351780** get_address_of_title_11() { return &___title_11; } inline void set_title_11(ByteU5BU5D_t3983351780* value) { ___title_11 = value; Il2CppCodeGenWriteBarrier((&___title_11), value); } inline static int32_t get_offset_of_surname_12() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___surname_12)); } inline ByteU5BU5D_t3983351780* get_surname_12() const { return ___surname_12; } inline ByteU5BU5D_t3983351780** get_address_of_surname_12() { return &___surname_12; } inline void set_surname_12(ByteU5BU5D_t3983351780* value) { ___surname_12 = value; Il2CppCodeGenWriteBarrier((&___surname_12), value); } inline static int32_t get_offset_of_givenName_13() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___givenName_13)); } inline ByteU5BU5D_t3983351780* get_givenName_13() const { return ___givenName_13; } inline ByteU5BU5D_t3983351780** get_address_of_givenName_13() { return &___givenName_13; } inline void set_givenName_13(ByteU5BU5D_t3983351780* value) { ___givenName_13 = value; Il2CppCodeGenWriteBarrier((&___givenName_13), value); } inline static int32_t get_offset_of_initial_14() { return static_cast<int32_t>(offsetof(X501_t1114902004_StaticFields, ___initial_14)); } inline ByteU5BU5D_t3983351780* get_initial_14() const { return ___initial_14; } inline ByteU5BU5D_t3983351780** get_address_of_initial_14() { return &___initial_14; } inline void set_initial_14(ByteU5BU5D_t3983351780* value) { ___initial_14 = value; Il2CppCodeGenWriteBarrier((&___initial_14), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X501_T1114902004_H #ifndef INTERNALASYNCRESULT_T3512432811_H #define INTERNALASYNCRESULT_T3512432811_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult struct InternalAsyncResult_t3512432811 : public RuntimeObject { public: // System.Object Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::locker RuntimeObject * ___locker_0; // System.AsyncCallback Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_userCallback AsyncCallback_t3856731007 * ____userCallback_1; // System.Object Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_userState RuntimeObject * ____userState_2; // System.Exception Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_asyncException Exception_t2993544719 * ____asyncException_3; // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::handle ManualResetEvent_t1253388680 * ___handle_4; // System.Boolean Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::completed bool ___completed_5; // System.Int32 Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_bytesRead int32_t ____bytesRead_6; // System.Boolean Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_fromWrite bool ____fromWrite_7; // System.Boolean Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_proceedAfterHandshake bool ____proceedAfterHandshake_8; // System.Byte[] Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_buffer ByteU5BU5D_t3983351780* ____buffer_9; // System.Int32 Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_offset int32_t ____offset_10; // System.Int32 Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult::_count int32_t ____count_11; public: inline static int32_t get_offset_of_locker_0() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ___locker_0)); } inline RuntimeObject * get_locker_0() const { return ___locker_0; } inline RuntimeObject ** get_address_of_locker_0() { return &___locker_0; } inline void set_locker_0(RuntimeObject * value) { ___locker_0 = value; Il2CppCodeGenWriteBarrier((&___locker_0), value); } inline static int32_t get_offset_of__userCallback_1() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____userCallback_1)); } inline AsyncCallback_t3856731007 * get__userCallback_1() const { return ____userCallback_1; } inline AsyncCallback_t3856731007 ** get_address_of__userCallback_1() { return &____userCallback_1; } inline void set__userCallback_1(AsyncCallback_t3856731007 * value) { ____userCallback_1 = value; Il2CppCodeGenWriteBarrier((&____userCallback_1), value); } inline static int32_t get_offset_of__userState_2() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____userState_2)); } inline RuntimeObject * get__userState_2() const { return ____userState_2; } inline RuntimeObject ** get_address_of__userState_2() { return &____userState_2; } inline void set__userState_2(RuntimeObject * value) { ____userState_2 = value; Il2CppCodeGenWriteBarrier((&____userState_2), value); } inline static int32_t get_offset_of__asyncException_3() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____asyncException_3)); } inline Exception_t2993544719 * get__asyncException_3() const { return ____asyncException_3; } inline Exception_t2993544719 ** get_address_of__asyncException_3() { return &____asyncException_3; } inline void set__asyncException_3(Exception_t2993544719 * value) { ____asyncException_3 = value; Il2CppCodeGenWriteBarrier((&____asyncException_3), value); } inline static int32_t get_offset_of_handle_4() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ___handle_4)); } inline ManualResetEvent_t1253388680 * get_handle_4() const { return ___handle_4; } inline ManualResetEvent_t1253388680 ** get_address_of_handle_4() { return &___handle_4; } inline void set_handle_4(ManualResetEvent_t1253388680 * value) { ___handle_4 = value; Il2CppCodeGenWriteBarrier((&___handle_4), value); } inline static int32_t get_offset_of_completed_5() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ___completed_5)); } inline bool get_completed_5() const { return ___completed_5; } inline bool* get_address_of_completed_5() { return &___completed_5; } inline void set_completed_5(bool value) { ___completed_5 = value; } inline static int32_t get_offset_of__bytesRead_6() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____bytesRead_6)); } inline int32_t get__bytesRead_6() const { return ____bytesRead_6; } inline int32_t* get_address_of__bytesRead_6() { return &____bytesRead_6; } inline void set__bytesRead_6(int32_t value) { ____bytesRead_6 = value; } inline static int32_t get_offset_of__fromWrite_7() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____fromWrite_7)); } inline bool get__fromWrite_7() const { return ____fromWrite_7; } inline bool* get_address_of__fromWrite_7() { return &____fromWrite_7; } inline void set__fromWrite_7(bool value) { ____fromWrite_7 = value; } inline static int32_t get_offset_of__proceedAfterHandshake_8() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____proceedAfterHandshake_8)); } inline bool get__proceedAfterHandshake_8() const { return ____proceedAfterHandshake_8; } inline bool* get_address_of__proceedAfterHandshake_8() { return &____proceedAfterHandshake_8; } inline void set__proceedAfterHandshake_8(bool value) { ____proceedAfterHandshake_8 = value; } inline static int32_t get_offset_of__buffer_9() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____buffer_9)); } inline ByteU5BU5D_t3983351780* get__buffer_9() const { return ____buffer_9; } inline ByteU5BU5D_t3983351780** get_address_of__buffer_9() { return &____buffer_9; } inline void set__buffer_9(ByteU5BU5D_t3983351780* value) { ____buffer_9 = value; Il2CppCodeGenWriteBarrier((&____buffer_9), value); } inline static int32_t get_offset_of__offset_10() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____offset_10)); } inline int32_t get__offset_10() const { return ____offset_10; } inline int32_t* get_address_of__offset_10() { return &____offset_10; } inline void set__offset_10(int32_t value) { ____offset_10 = value; } inline static int32_t get_offset_of__count_11() { return static_cast<int32_t>(offsetof(InternalAsyncResult_t3512432811, ____count_11)); } inline int32_t get__count_11() const { return ____count_11; } inline int32_t* get_address_of__count_11() { return &____count_11; } inline void set__count_11(int32_t value) { ____count_11 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTERNALASYNCRESULT_T3512432811_H #ifndef X509STORE_T3771926429_H #define X509STORE_T3771926429_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Store struct X509Store_t3771926429 : public RuntimeObject { public: // System.String Mono.Security.X509.X509Store::_storePath String_t* ____storePath_0; // Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Store::_certificates X509CertificateCollection_t669936613 * ____certificates_1; // System.Collections.ArrayList Mono.Security.X509.X509Store::_crls ArrayList_t2987363682 * ____crls_2; // System.Boolean Mono.Security.X509.X509Store::_crl bool ____crl_3; public: inline static int32_t get_offset_of__storePath_0() { return static_cast<int32_t>(offsetof(X509Store_t3771926429, ____storePath_0)); } inline String_t* get__storePath_0() const { return ____storePath_0; } inline String_t** get_address_of__storePath_0() { return &____storePath_0; } inline void set__storePath_0(String_t* value) { ____storePath_0 = value; Il2CppCodeGenWriteBarrier((&____storePath_0), value); } inline static int32_t get_offset_of__certificates_1() { return static_cast<int32_t>(offsetof(X509Store_t3771926429, ____certificates_1)); } inline X509CertificateCollection_t669936613 * get__certificates_1() const { return ____certificates_1; } inline X509CertificateCollection_t669936613 ** get_address_of__certificates_1() { return &____certificates_1; } inline void set__certificates_1(X509CertificateCollection_t669936613 * value) { ____certificates_1 = value; Il2CppCodeGenWriteBarrier((&____certificates_1), value); } inline static int32_t get_offset_of__crls_2() { return static_cast<int32_t>(offsetof(X509Store_t3771926429, ____crls_2)); } inline ArrayList_t2987363682 * get__crls_2() const { return ____crls_2; } inline ArrayList_t2987363682 ** get_address_of__crls_2() { return &____crls_2; } inline void set__crls_2(ArrayList_t2987363682 * value) { ____crls_2 = value; Il2CppCodeGenWriteBarrier((&____crls_2), value); } inline static int32_t get_offset_of__crl_3() { return static_cast<int32_t>(offsetof(X509Store_t3771926429, ____crl_3)); } inline bool get__crl_3() const { return ____crl_3; } inline bool* get_address_of__crl_3() { return &____crl_3; } inline void set__crl_3(bool value) { ____crl_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509STORE_T3771926429_H #ifndef X509CERTIFICATEENUMERATOR_T2159044171_H #define X509CERTIFICATEENUMERATOR_T2159044171_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509CertificateCollection/X509CertificateEnumerator struct X509CertificateEnumerator_t2159044171 : public RuntimeObject { public: // System.Collections.IEnumerator Mono.Security.X509.X509CertificateCollection/X509CertificateEnumerator::enumerator RuntimeObject* ___enumerator_0; public: inline static int32_t get_offset_of_enumerator_0() { return static_cast<int32_t>(offsetof(X509CertificateEnumerator_t2159044171, ___enumerator_0)); } inline RuntimeObject* get_enumerator_0() const { return ___enumerator_0; } inline RuntimeObject** get_address_of_enumerator_0() { return &___enumerator_0; } inline void set_enumerator_0(RuntimeObject* value) { ___enumerator_0 = value; Il2CppCodeGenWriteBarrier((&___enumerator_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CERTIFICATEENUMERATOR_T2159044171_H #ifndef VALIDATIONRESULT_T24465603_H #define VALIDATIONRESULT_T24465603_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ValidationResult struct ValidationResult_t24465603 : public RuntimeObject { public: // System.Boolean Mono.Security.Protocol.Tls.ValidationResult::trusted bool ___trusted_0; // System.Int32 Mono.Security.Protocol.Tls.ValidationResult::error_code int32_t ___error_code_1; public: inline static int32_t get_offset_of_trusted_0() { return static_cast<int32_t>(offsetof(ValidationResult_t24465603, ___trusted_0)); } inline bool get_trusted_0() const { return ___trusted_0; } inline bool* get_address_of_trusted_0() { return &___trusted_0; } inline void set_trusted_0(bool value) { ___trusted_0 = value; } inline static int32_t get_offset_of_error_code_1() { return static_cast<int32_t>(offsetof(ValidationResult_t24465603, ___error_code_1)); } inline int32_t get_error_code_1() const { return ___error_code_1; } inline int32_t* get_address_of_error_code_1() { return &___error_code_1; } inline void set_error_code_1(int32_t value) { ___error_code_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VALIDATIONRESULT_T24465603_H #ifndef SECURITYPARAMETERS_T3249263566_H #define SECURITYPARAMETERS_T3249263566_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SecurityParameters struct SecurityParameters_t3249263566 : public RuntimeObject { public: // Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.SecurityParameters::cipher CipherSuite_t4022274145 * ___cipher_0; // System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::clientWriteMAC ByteU5BU5D_t3983351780* ___clientWriteMAC_1; // System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::serverWriteMAC ByteU5BU5D_t3983351780* ___serverWriteMAC_2; public: inline static int32_t get_offset_of_cipher_0() { return static_cast<int32_t>(offsetof(SecurityParameters_t3249263566, ___cipher_0)); } inline CipherSuite_t4022274145 * get_cipher_0() const { return ___cipher_0; } inline CipherSuite_t4022274145 ** get_address_of_cipher_0() { return &___cipher_0; } inline void set_cipher_0(CipherSuite_t4022274145 * value) { ___cipher_0 = value; Il2CppCodeGenWriteBarrier((&___cipher_0), value); } inline static int32_t get_offset_of_clientWriteMAC_1() { return static_cast<int32_t>(offsetof(SecurityParameters_t3249263566, ___clientWriteMAC_1)); } inline ByteU5BU5D_t3983351780* get_clientWriteMAC_1() const { return ___clientWriteMAC_1; } inline ByteU5BU5D_t3983351780** get_address_of_clientWriteMAC_1() { return &___clientWriteMAC_1; } inline void set_clientWriteMAC_1(ByteU5BU5D_t3983351780* value) { ___clientWriteMAC_1 = value; Il2CppCodeGenWriteBarrier((&___clientWriteMAC_1), value); } inline static int32_t get_offset_of_serverWriteMAC_2() { return static_cast<int32_t>(offsetof(SecurityParameters_t3249263566, ___serverWriteMAC_2)); } inline ByteU5BU5D_t3983351780* get_serverWriteMAC_2() const { return ___serverWriteMAC_2; } inline ByteU5BU5D_t3983351780** get_address_of_serverWriteMAC_2() { return &___serverWriteMAC_2; } inline void set_serverWriteMAC_2(ByteU5BU5D_t3983351780* value) { ___serverWriteMAC_2 = value; Il2CppCodeGenWriteBarrier((&___serverWriteMAC_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SECURITYPARAMETERS_T3249263566_H #ifndef KEYBUILDER_T2993022270_H #define KEYBUILDER_T2993022270_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.KeyBuilder struct KeyBuilder_t2993022270 : public RuntimeObject { public: public: }; struct KeyBuilder_t2993022270_StaticFields { public: // System.Security.Cryptography.RandomNumberGenerator Mono.Security.Cryptography.KeyBuilder::rng RandomNumberGenerator_t2386858178 * ___rng_0; public: inline static int32_t get_offset_of_rng_0() { return static_cast<int32_t>(offsetof(KeyBuilder_t2993022270_StaticFields, ___rng_0)); } inline RandomNumberGenerator_t2386858178 * get_rng_0() const { return ___rng_0; } inline RandomNumberGenerator_t2386858178 ** get_address_of_rng_0() { return &___rng_0; } inline void set_rng_0(RandomNumberGenerator_t2386858178 * value) { ___rng_0 = value; Il2CppCodeGenWriteBarrier((&___rng_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KEYBUILDER_T2993022270_H #ifndef CRYPTOCONVERT_T536819640_H #define CRYPTOCONVERT_T536819640_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.CryptoConvert struct CryptoConvert_t536819640 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CRYPTOCONVERT_T536819640_H #ifndef CLIENTSESSIONCACHE_T4290476319_H #define CLIENTSESSIONCACHE_T4290476319_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ClientSessionCache struct ClientSessionCache_t4290476319 : public RuntimeObject { public: public: }; struct ClientSessionCache_t4290476319_StaticFields { public: // System.Collections.Hashtable Mono.Security.Protocol.Tls.ClientSessionCache::cache Hashtable_t1336544484 * ___cache_0; // System.Object Mono.Security.Protocol.Tls.ClientSessionCache::locker RuntimeObject * ___locker_1; public: inline static int32_t get_offset_of_cache_0() { return static_cast<int32_t>(offsetof(ClientSessionCache_t4290476319_StaticFields, ___cache_0)); } inline Hashtable_t1336544484 * get_cache_0() const { return ___cache_0; } inline Hashtable_t1336544484 ** get_address_of_cache_0() { return &___cache_0; } inline void set_cache_0(Hashtable_t1336544484 * value) { ___cache_0 = value; Il2CppCodeGenWriteBarrier((&___cache_0), value); } inline static int32_t get_offset_of_locker_1() { return static_cast<int32_t>(offsetof(ClientSessionCache_t4290476319_StaticFields, ___locker_1)); } inline RuntimeObject * get_locker_1() const { return ___locker_1; } inline RuntimeObject ** get_address_of_locker_1() { return &___locker_1; } inline void set_locker_1(RuntimeObject * value) { ___locker_1 = value; Il2CppCodeGenWriteBarrier((&___locker_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CLIENTSESSIONCACHE_T4290476319_H #ifndef ENCRYPTEDDATA_T109997108_H #define ENCRYPTEDDATA_T109997108_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.PKCS7/EncryptedData struct EncryptedData_t109997108 : public RuntimeObject { public: // System.Byte Mono.Security.PKCS7/EncryptedData::_version uint8_t ____version_0; // Mono.Security.PKCS7/ContentInfo Mono.Security.PKCS7/EncryptedData::_content ContentInfo_t2274152496 * ____content_1; // Mono.Security.PKCS7/ContentInfo Mono.Security.PKCS7/EncryptedData::_encryptionAlgorithm ContentInfo_t2274152496 * ____encryptionAlgorithm_2; // System.Byte[] Mono.Security.PKCS7/EncryptedData::_encrypted ByteU5BU5D_t3983351780* ____encrypted_3; public: inline static int32_t get_offset_of__version_0() { return static_cast<int32_t>(offsetof(EncryptedData_t109997108, ____version_0)); } inline uint8_t get__version_0() const { return ____version_0; } inline uint8_t* get_address_of__version_0() { return &____version_0; } inline void set__version_0(uint8_t value) { ____version_0 = value; } inline static int32_t get_offset_of__content_1() { return static_cast<int32_t>(offsetof(EncryptedData_t109997108, ____content_1)); } inline ContentInfo_t2274152496 * get__content_1() const { return ____content_1; } inline ContentInfo_t2274152496 ** get_address_of__content_1() { return &____content_1; } inline void set__content_1(ContentInfo_t2274152496 * value) { ____content_1 = value; Il2CppCodeGenWriteBarrier((&____content_1), value); } inline static int32_t get_offset_of__encryptionAlgorithm_2() { return static_cast<int32_t>(offsetof(EncryptedData_t109997108, ____encryptionAlgorithm_2)); } inline ContentInfo_t2274152496 * get__encryptionAlgorithm_2() const { return ____encryptionAlgorithm_2; } inline ContentInfo_t2274152496 ** get_address_of__encryptionAlgorithm_2() { return &____encryptionAlgorithm_2; } inline void set__encryptionAlgorithm_2(ContentInfo_t2274152496 * value) { ____encryptionAlgorithm_2 = value; Il2CppCodeGenWriteBarrier((&____encryptionAlgorithm_2), value); } inline static int32_t get_offset_of__encrypted_3() { return static_cast<int32_t>(offsetof(EncryptedData_t109997108, ____encrypted_3)); } inline ByteU5BU5D_t3983351780* get__encrypted_3() const { return ____encrypted_3; } inline ByteU5BU5D_t3983351780** get_address_of__encrypted_3() { return &____encrypted_3; } inline void set__encrypted_3(ByteU5BU5D_t3983351780* value) { ____encrypted_3 = value; Il2CppCodeGenWriteBarrier((&____encrypted_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENCRYPTEDDATA_T109997108_H #ifndef CIPHERSUITEFACTORY_T2457108133_H #define CIPHERSUITEFACTORY_T2457108133_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.CipherSuiteFactory struct CipherSuiteFactory_t2457108133 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CIPHERSUITEFACTORY_T2457108133_H #ifndef ASYMMETRICALGORITHM_T634832402_H #define ASYMMETRICALGORITHM_T634832402_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.AsymmetricAlgorithm struct AsymmetricAlgorithm_t634832402 : public RuntimeObject { public: // System.Int32 System.Security.Cryptography.AsymmetricAlgorithm::KeySizeValue int32_t ___KeySizeValue_0; // System.Security.Cryptography.KeySizes[] System.Security.Cryptography.AsymmetricAlgorithm::LegalKeySizesValue KeySizesU5BU5D_t213991305* ___LegalKeySizesValue_1; public: inline static int32_t get_offset_of_KeySizeValue_0() { return static_cast<int32_t>(offsetof(AsymmetricAlgorithm_t634832402, ___KeySizeValue_0)); } inline int32_t get_KeySizeValue_0() const { return ___KeySizeValue_0; } inline int32_t* get_address_of_KeySizeValue_0() { return &___KeySizeValue_0; } inline void set_KeySizeValue_0(int32_t value) { ___KeySizeValue_0 = value; } inline static int32_t get_offset_of_LegalKeySizesValue_1() { return static_cast<int32_t>(offsetof(AsymmetricAlgorithm_t634832402, ___LegalKeySizesValue_1)); } inline KeySizesU5BU5D_t213991305* get_LegalKeySizesValue_1() const { return ___LegalKeySizesValue_1; } inline KeySizesU5BU5D_t213991305** get_address_of_LegalKeySizesValue_1() { return &___LegalKeySizesValue_1; } inline void set_LegalKeySizesValue_1(KeySizesU5BU5D_t213991305* value) { ___LegalKeySizesValue_1 = value; Il2CppCodeGenWriteBarrier((&___LegalKeySizesValue_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASYMMETRICALGORITHM_T634832402_H #ifndef EXCEPTION_T2993544719_H #define EXCEPTION_T2993544719_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Exception struct Exception_t2993544719 : public RuntimeObject { public: // System.IntPtr[] System.Exception::trace_ips IntPtrU5BU5D_t1279659245* ___trace_ips_0; // System.Exception System.Exception::inner_exception Exception_t2993544719 * ___inner_exception_1; // System.String System.Exception::message String_t* ___message_2; // System.String System.Exception::help_link String_t* ___help_link_3; // System.String System.Exception::class_name String_t* ___class_name_4; // System.String System.Exception::stack_trace String_t* ___stack_trace_5; // System.String System.Exception::_remoteStackTraceString String_t* ____remoteStackTraceString_6; // System.Int32 System.Exception::remote_stack_index int32_t ___remote_stack_index_7; // System.Int32 System.Exception::hresult int32_t ___hresult_8; // System.String System.Exception::source String_t* ___source_9; // System.Collections.IDictionary System.Exception::_data RuntimeObject* ____data_10; public: inline static int32_t get_offset_of_trace_ips_0() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___trace_ips_0)); } inline IntPtrU5BU5D_t1279659245* get_trace_ips_0() const { return ___trace_ips_0; } inline IntPtrU5BU5D_t1279659245** get_address_of_trace_ips_0() { return &___trace_ips_0; } inline void set_trace_ips_0(IntPtrU5BU5D_t1279659245* value) { ___trace_ips_0 = value; Il2CppCodeGenWriteBarrier((&___trace_ips_0), value); } inline static int32_t get_offset_of_inner_exception_1() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___inner_exception_1)); } inline Exception_t2993544719 * get_inner_exception_1() const { return ___inner_exception_1; } inline Exception_t2993544719 ** get_address_of_inner_exception_1() { return &___inner_exception_1; } inline void set_inner_exception_1(Exception_t2993544719 * value) { ___inner_exception_1 = value; Il2CppCodeGenWriteBarrier((&___inner_exception_1), value); } inline static int32_t get_offset_of_message_2() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___message_2)); } inline String_t* get_message_2() const { return ___message_2; } inline String_t** get_address_of_message_2() { return &___message_2; } inline void set_message_2(String_t* value) { ___message_2 = value; Il2CppCodeGenWriteBarrier((&___message_2), value); } inline static int32_t get_offset_of_help_link_3() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___help_link_3)); } inline String_t* get_help_link_3() const { return ___help_link_3; } inline String_t** get_address_of_help_link_3() { return &___help_link_3; } inline void set_help_link_3(String_t* value) { ___help_link_3 = value; Il2CppCodeGenWriteBarrier((&___help_link_3), value); } inline static int32_t get_offset_of_class_name_4() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___class_name_4)); } inline String_t* get_class_name_4() const { return ___class_name_4; } inline String_t** get_address_of_class_name_4() { return &___class_name_4; } inline void set_class_name_4(String_t* value) { ___class_name_4 = value; Il2CppCodeGenWriteBarrier((&___class_name_4), value); } inline static int32_t get_offset_of_stack_trace_5() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___stack_trace_5)); } inline String_t* get_stack_trace_5() const { return ___stack_trace_5; } inline String_t** get_address_of_stack_trace_5() { return &___stack_trace_5; } inline void set_stack_trace_5(String_t* value) { ___stack_trace_5 = value; Il2CppCodeGenWriteBarrier((&___stack_trace_5), value); } inline static int32_t get_offset_of__remoteStackTraceString_6() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ____remoteStackTraceString_6)); } inline String_t* get__remoteStackTraceString_6() const { return ____remoteStackTraceString_6; } inline String_t** get_address_of__remoteStackTraceString_6() { return &____remoteStackTraceString_6; } inline void set__remoteStackTraceString_6(String_t* value) { ____remoteStackTraceString_6 = value; Il2CppCodeGenWriteBarrier((&____remoteStackTraceString_6), value); } inline static int32_t get_offset_of_remote_stack_index_7() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___remote_stack_index_7)); } inline int32_t get_remote_stack_index_7() const { return ___remote_stack_index_7; } inline int32_t* get_address_of_remote_stack_index_7() { return &___remote_stack_index_7; } inline void set_remote_stack_index_7(int32_t value) { ___remote_stack_index_7 = value; } inline static int32_t get_offset_of_hresult_8() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___hresult_8)); } inline int32_t get_hresult_8() const { return ___hresult_8; } inline int32_t* get_address_of_hresult_8() { return &___hresult_8; } inline void set_hresult_8(int32_t value) { ___hresult_8 = value; } inline static int32_t get_offset_of_source_9() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ___source_9)); } inline String_t* get_source_9() const { return ___source_9; } inline String_t** get_address_of_source_9() { return &___source_9; } inline void set_source_9(String_t* value) { ___source_9 = value; Il2CppCodeGenWriteBarrier((&___source_9), value); } inline static int32_t get_offset_of__data_10() { return static_cast<int32_t>(offsetof(Exception_t2993544719, ____data_10)); } inline RuntimeObject* get__data_10() const { return ____data_10; } inline RuntimeObject** get_address_of__data_10() { return &____data_10; } inline void set__data_10(RuntimeObject* value) { ____data_10 = value; Il2CppCodeGenWriteBarrier((&____data_10), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // EXCEPTION_T2993544719_H #ifndef STREAM_T669916290_H #define STREAM_T669916290_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.IO.Stream struct Stream_t669916290 : public RuntimeObject { public: public: }; struct Stream_t669916290_StaticFields { public: // System.IO.Stream System.IO.Stream::Null Stream_t669916290 * ___Null_0; public: inline static int32_t get_offset_of_Null_0() { return static_cast<int32_t>(offsetof(Stream_t669916290_StaticFields, ___Null_0)); } inline Stream_t669916290 * get_Null_0() const { return ___Null_0; } inline Stream_t669916290 ** get_address_of_Null_0() { return &___Null_0; } inline void set_Null_0(Stream_t669916290 * value) { ___Null_0 = value; Il2CppCodeGenWriteBarrier((&___Null_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // STREAM_T669916290_H #ifndef IL2CPPCOMOBJECT_H #define IL2CPPCOMOBJECT_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.__Il2CppComObject #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // IL2CPPCOMOBJECT_H #ifndef ASYMMETRICSIGNATUREFORMATTER_T2355533261_H #define ASYMMETRICSIGNATUREFORMATTER_T2355533261_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.AsymmetricSignatureFormatter struct AsymmetricSignatureFormatter_t2355533261 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASYMMETRICSIGNATUREFORMATTER_T2355533261_H #ifndef LOCALE_T211907278_H #define LOCALE_T211907278_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Locale struct Locale_t211907278 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LOCALE_T211907278_H #ifndef BIGINTEGER_T1332966298_H #define BIGINTEGER_T1332966298_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.BigInteger struct BigInteger_t1332966298 : public RuntimeObject { public: // System.UInt32 Mono.Math.BigInteger::length uint32_t ___length_0; // System.UInt32[] Mono.Math.BigInteger::data UInt32U5BU5D_t2511474702* ___data_1; public: inline static int32_t get_offset_of_length_0() { return static_cast<int32_t>(offsetof(BigInteger_t1332966298, ___length_0)); } inline uint32_t get_length_0() const { return ___length_0; } inline uint32_t* get_address_of_length_0() { return &___length_0; } inline void set_length_0(uint32_t value) { ___length_0 = value; } inline static int32_t get_offset_of_data_1() { return static_cast<int32_t>(offsetof(BigInteger_t1332966298, ___data_1)); } inline UInt32U5BU5D_t2511474702* get_data_1() const { return ___data_1; } inline UInt32U5BU5D_t2511474702** get_address_of_data_1() { return &___data_1; } inline void set_data_1(UInt32U5BU5D_t2511474702* value) { ___data_1 = value; Il2CppCodeGenWriteBarrier((&___data_1), value); } }; struct BigInteger_t1332966298_StaticFields { public: // System.UInt32[] Mono.Math.BigInteger::smallPrimes UInt32U5BU5D_t2511474702* ___smallPrimes_2; // System.Security.Cryptography.RandomNumberGenerator Mono.Math.BigInteger::rng RandomNumberGenerator_t2386858178 * ___rng_3; public: inline static int32_t get_offset_of_smallPrimes_2() { return static_cast<int32_t>(offsetof(BigInteger_t1332966298_StaticFields, ___smallPrimes_2)); } inline UInt32U5BU5D_t2511474702* get_smallPrimes_2() const { return ___smallPrimes_2; } inline UInt32U5BU5D_t2511474702** get_address_of_smallPrimes_2() { return &___smallPrimes_2; } inline void set_smallPrimes_2(UInt32U5BU5D_t2511474702* value) { ___smallPrimes_2 = value; Il2CppCodeGenWriteBarrier((&___smallPrimes_2), value); } inline static int32_t get_offset_of_rng_3() { return static_cast<int32_t>(offsetof(BigInteger_t1332966298_StaticFields, ___rng_3)); } inline RandomNumberGenerator_t2386858178 * get_rng_3() const { return ___rng_3; } inline RandomNumberGenerator_t2386858178 ** get_address_of_rng_3() { return &___rng_3; } inline void set_rng_3(RandomNumberGenerator_t2386858178 * value) { ___rng_3 = value; Il2CppCodeGenWriteBarrier((&___rng_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BIGINTEGER_T1332966298_H #ifndef ASYMMETRICSIGNATUREDEFORMATTER_T3500514064_H #define ASYMMETRICSIGNATUREDEFORMATTER_T3500514064_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.AsymmetricSignatureDeformatter struct AsymmetricSignatureDeformatter_t3500514064 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASYMMETRICSIGNATUREDEFORMATTER_T3500514064_H #ifndef SENDRECORDASYNCRESULT_T2703092914_H #define SENDRECORDASYNCRESULT_T2703092914_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult struct SendRecordAsyncResult_t2703092914 : public RuntimeObject { public: // System.Object Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::locker RuntimeObject * ___locker_0; // System.AsyncCallback Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_userCallback AsyncCallback_t3856731007 * ____userCallback_1; // System.Object Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_userState RuntimeObject * ____userState_2; // System.Exception Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_asyncException Exception_t2993544719 * ____asyncException_3; // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::handle ManualResetEvent_t1253388680 * ___handle_4; // Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_message HandshakeMessage_t432326738 * ____message_5; // System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::completed bool ___completed_6; public: inline static int32_t get_offset_of_locker_0() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ___locker_0)); } inline RuntimeObject * get_locker_0() const { return ___locker_0; } inline RuntimeObject ** get_address_of_locker_0() { return &___locker_0; } inline void set_locker_0(RuntimeObject * value) { ___locker_0 = value; Il2CppCodeGenWriteBarrier((&___locker_0), value); } inline static int32_t get_offset_of__userCallback_1() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ____userCallback_1)); } inline AsyncCallback_t3856731007 * get__userCallback_1() const { return ____userCallback_1; } inline AsyncCallback_t3856731007 ** get_address_of__userCallback_1() { return &____userCallback_1; } inline void set__userCallback_1(AsyncCallback_t3856731007 * value) { ____userCallback_1 = value; Il2CppCodeGenWriteBarrier((&____userCallback_1), value); } inline static int32_t get_offset_of__userState_2() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ____userState_2)); } inline RuntimeObject * get__userState_2() const { return ____userState_2; } inline RuntimeObject ** get_address_of__userState_2() { return &____userState_2; } inline void set__userState_2(RuntimeObject * value) { ____userState_2 = value; Il2CppCodeGenWriteBarrier((&____userState_2), value); } inline static int32_t get_offset_of__asyncException_3() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ____asyncException_3)); } inline Exception_t2993544719 * get__asyncException_3() const { return ____asyncException_3; } inline Exception_t2993544719 ** get_address_of__asyncException_3() { return &____asyncException_3; } inline void set__asyncException_3(Exception_t2993544719 * value) { ____asyncException_3 = value; Il2CppCodeGenWriteBarrier((&____asyncException_3), value); } inline static int32_t get_offset_of_handle_4() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ___handle_4)); } inline ManualResetEvent_t1253388680 * get_handle_4() const { return ___handle_4; } inline ManualResetEvent_t1253388680 ** get_address_of_handle_4() { return &___handle_4; } inline void set_handle_4(ManualResetEvent_t1253388680 * value) { ___handle_4 = value; Il2CppCodeGenWriteBarrier((&___handle_4), value); } inline static int32_t get_offset_of__message_5() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ____message_5)); } inline HandshakeMessage_t432326738 * get__message_5() const { return ____message_5; } inline HandshakeMessage_t432326738 ** get_address_of__message_5() { return &____message_5; } inline void set__message_5(HandshakeMessage_t432326738 * value) { ____message_5 = value; Il2CppCodeGenWriteBarrier((&____message_5), value); } inline static int32_t get_offset_of_completed_6() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t2703092914, ___completed_6)); } inline bool get_completed_6() const { return ___completed_6; } inline bool* get_address_of_completed_6() { return &___completed_6; } inline void set_completed_6(bool value) { ___completed_6 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SENDRECORDASYNCRESULT_T2703092914_H #ifndef MODULUSRING_T2165045869_H #define MODULUSRING_T2165045869_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.BigInteger/ModulusRing struct ModulusRing_t2165045869 : public RuntimeObject { public: // Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::mod BigInteger_t1332966298 * ___mod_0; // Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::constant BigInteger_t1332966298 * ___constant_1; public: inline static int32_t get_offset_of_mod_0() { return static_cast<int32_t>(offsetof(ModulusRing_t2165045869, ___mod_0)); } inline BigInteger_t1332966298 * get_mod_0() const { return ___mod_0; } inline BigInteger_t1332966298 ** get_address_of_mod_0() { return &___mod_0; } inline void set_mod_0(BigInteger_t1332966298 * value) { ___mod_0 = value; Il2CppCodeGenWriteBarrier((&___mod_0), value); } inline static int32_t get_offset_of_constant_1() { return static_cast<int32_t>(offsetof(ModulusRing_t2165045869, ___constant_1)); } inline BigInteger_t1332966298 * get_constant_1() const { return ___constant_1; } inline BigInteger_t1332966298 ** get_address_of_constant_1() { return &___constant_1; } inline void set_constant_1(BigInteger_t1332966298 * value) { ___constant_1 = value; Il2CppCodeGenWriteBarrier((&___constant_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MODULUSRING_T2165045869_H #ifndef GENERALNAMES_T2881647084_H #define GENERALNAMES_T2881647084_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.GeneralNames struct GeneralNames_t2881647084 : public RuntimeObject { public: // System.Collections.ArrayList Mono.Security.X509.Extensions.GeneralNames::rfc822Name ArrayList_t2987363682 * ___rfc822Name_0; // System.Collections.ArrayList Mono.Security.X509.Extensions.GeneralNames::dnsName ArrayList_t2987363682 * ___dnsName_1; // System.Collections.ArrayList Mono.Security.X509.Extensions.GeneralNames::directoryNames ArrayList_t2987363682 * ___directoryNames_2; // System.Collections.ArrayList Mono.Security.X509.Extensions.GeneralNames::uris ArrayList_t2987363682 * ___uris_3; // System.Collections.ArrayList Mono.Security.X509.Extensions.GeneralNames::ipAddr ArrayList_t2987363682 * ___ipAddr_4; public: inline static int32_t get_offset_of_rfc822Name_0() { return static_cast<int32_t>(offsetof(GeneralNames_t2881647084, ___rfc822Name_0)); } inline ArrayList_t2987363682 * get_rfc822Name_0() const { return ___rfc822Name_0; } inline ArrayList_t2987363682 ** get_address_of_rfc822Name_0() { return &___rfc822Name_0; } inline void set_rfc822Name_0(ArrayList_t2987363682 * value) { ___rfc822Name_0 = value; Il2CppCodeGenWriteBarrier((&___rfc822Name_0), value); } inline static int32_t get_offset_of_dnsName_1() { return static_cast<int32_t>(offsetof(GeneralNames_t2881647084, ___dnsName_1)); } inline ArrayList_t2987363682 * get_dnsName_1() const { return ___dnsName_1; } inline ArrayList_t2987363682 ** get_address_of_dnsName_1() { return &___dnsName_1; } inline void set_dnsName_1(ArrayList_t2987363682 * value) { ___dnsName_1 = value; Il2CppCodeGenWriteBarrier((&___dnsName_1), value); } inline static int32_t get_offset_of_directoryNames_2() { return static_cast<int32_t>(offsetof(GeneralNames_t2881647084, ___directoryNames_2)); } inline ArrayList_t2987363682 * get_directoryNames_2() const { return ___directoryNames_2; } inline ArrayList_t2987363682 ** get_address_of_directoryNames_2() { return &___directoryNames_2; } inline void set_directoryNames_2(ArrayList_t2987363682 * value) { ___directoryNames_2 = value; Il2CppCodeGenWriteBarrier((&___directoryNames_2), value); } inline static int32_t get_offset_of_uris_3() { return static_cast<int32_t>(offsetof(GeneralNames_t2881647084, ___uris_3)); } inline ArrayList_t2987363682 * get_uris_3() const { return ___uris_3; } inline ArrayList_t2987363682 ** get_address_of_uris_3() { return &___uris_3; } inline void set_uris_3(ArrayList_t2987363682 * value) { ___uris_3 = value; Il2CppCodeGenWriteBarrier((&___uris_3), value); } inline static int32_t get_offset_of_ipAddr_4() { return static_cast<int32_t>(offsetof(GeneralNames_t2881647084, ___ipAddr_4)); } inline ArrayList_t2987363682 * get_ipAddr_4() const { return ___ipAddr_4; } inline ArrayList_t2987363682 ** get_address_of_ipAddr_4() { return &___ipAddr_4; } inline void set_ipAddr_4(ArrayList_t2987363682 * value) { ___ipAddr_4 = value; Il2CppCodeGenWriteBarrier((&___ipAddr_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // GENERALNAMES_T2881647084_H #ifndef PRIMALITYTESTS_T4140779267_H #define PRIMALITYTESTS_T4140779267_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.Prime.PrimalityTests struct PrimalityTests_t4140779267 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PRIMALITYTESTS_T4140779267_H #ifndef PRIMEGENERATORBASE_T1522174298_H #define PRIMEGENERATORBASE_T1522174298_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.Prime.Generator.PrimeGeneratorBase struct PrimeGeneratorBase_t1522174298 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PRIMEGENERATORBASE_T1522174298_H #ifndef COLLECTIONBASE_T1380370726_H #define COLLECTIONBASE_T1380370726_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.CollectionBase struct CollectionBase_t1380370726 : public RuntimeObject { public: // System.Collections.ArrayList System.Collections.CollectionBase::list ArrayList_t2987363682 * ___list_0; public: inline static int32_t get_offset_of_list_0() { return static_cast<int32_t>(offsetof(CollectionBase_t1380370726, ___list_0)); } inline ArrayList_t2987363682 * get_list_0() const { return ___list_0; } inline ArrayList_t2987363682 ** get_address_of_list_0() { return &___list_0; } inline void set_list_0(ArrayList_t2987363682 * value) { ___list_0 = value; Il2CppCodeGenWriteBarrier((&___list_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COLLECTIONBASE_T1380370726_H #ifndef ASN1_T2411596682_H #define ASN1_T2411596682_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.ASN1 struct ASN1_t2411596682 : public RuntimeObject { public: // System.Byte Mono.Security.ASN1::m_nTag uint8_t ___m_nTag_0; // System.Byte[] Mono.Security.ASN1::m_aValue ByteU5BU5D_t3983351780* ___m_aValue_1; // System.Collections.ArrayList Mono.Security.ASN1::elist ArrayList_t2987363682 * ___elist_2; public: inline static int32_t get_offset_of_m_nTag_0() { return static_cast<int32_t>(offsetof(ASN1_t2411596682, ___m_nTag_0)); } inline uint8_t get_m_nTag_0() const { return ___m_nTag_0; } inline uint8_t* get_address_of_m_nTag_0() { return &___m_nTag_0; } inline void set_m_nTag_0(uint8_t value) { ___m_nTag_0 = value; } inline static int32_t get_offset_of_m_aValue_1() { return static_cast<int32_t>(offsetof(ASN1_t2411596682, ___m_aValue_1)); } inline ByteU5BU5D_t3983351780* get_m_aValue_1() const { return ___m_aValue_1; } inline ByteU5BU5D_t3983351780** get_address_of_m_aValue_1() { return &___m_aValue_1; } inline void set_m_aValue_1(ByteU5BU5D_t3983351780* value) { ___m_aValue_1 = value; Il2CppCodeGenWriteBarrier((&___m_aValue_1), value); } inline static int32_t get_offset_of_elist_2() { return static_cast<int32_t>(offsetof(ASN1_t2411596682, ___elist_2)); } inline ArrayList_t2987363682 * get_elist_2() const { return ___elist_2; } inline ArrayList_t2987363682 ** get_address_of_elist_2() { return &___elist_2; } inline void set_elist_2(ArrayList_t2987363682 * value) { ___elist_2 = value; Il2CppCodeGenWriteBarrier((&___elist_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASN1_T2411596682_H #ifndef ASN1CONVERT_T1164338662_H #define ASN1CONVERT_T1164338662_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.ASN1Convert struct ASN1Convert_t1164338662 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASN1CONVERT_T1164338662_H #ifndef BITCONVERTERLE_T3229726040_H #define BITCONVERTERLE_T3229726040_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.BitConverterLE struct BitConverterLE_t3229726040 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BITCONVERTERLE_T3229726040_H #ifndef PKCS7_T3150455721_H #define PKCS7_T3150455721_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.PKCS7 struct PKCS7_t3150455721 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PKCS7_T3150455721_H #ifndef CONTENTINFO_T2274152496_H #define CONTENTINFO_T2274152496_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.PKCS7/ContentInfo struct ContentInfo_t2274152496 : public RuntimeObject { public: // System.String Mono.Security.PKCS7/ContentInfo::contentType String_t* ___contentType_0; // Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::content ASN1_t2411596682 * ___content_1; public: inline static int32_t get_offset_of_contentType_0() { return static_cast<int32_t>(offsetof(ContentInfo_t2274152496, ___contentType_0)); } inline String_t* get_contentType_0() const { return ___contentType_0; } inline String_t** get_address_of_contentType_0() { return &___contentType_0; } inline void set_contentType_0(String_t* value) { ___contentType_0 = value; Il2CppCodeGenWriteBarrier((&___contentType_0), value); } inline static int32_t get_offset_of_content_1() { return static_cast<int32_t>(offsetof(ContentInfo_t2274152496, ___content_1)); } inline ASN1_t2411596682 * get_content_1() const { return ___content_1; } inline ASN1_t2411596682 ** get_address_of_content_1() { return &___content_1; } inline void set_content_1(ASN1_t2411596682 * value) { ___content_1 = value; Il2CppCodeGenWriteBarrier((&___content_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONTENTINFO_T2274152496_H #ifndef KERNEL_T3094601883_H #define KERNEL_T3094601883_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.BigInteger/Kernel struct Kernel_t3094601883 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KERNEL_T3094601883_H #ifndef X509EXTENSION_T433104161_H #define X509EXTENSION_T433104161_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Extension struct X509Extension_t433104161 : public RuntimeObject { public: // System.String Mono.Security.X509.X509Extension::extnOid String_t* ___extnOid_0; // System.Boolean Mono.Security.X509.X509Extension::extnCritical bool ___extnCritical_1; // Mono.Security.ASN1 Mono.Security.X509.X509Extension::extnValue ASN1_t2411596682 * ___extnValue_2; public: inline static int32_t get_offset_of_extnOid_0() { return static_cast<int32_t>(offsetof(X509Extension_t433104161, ___extnOid_0)); } inline String_t* get_extnOid_0() const { return ___extnOid_0; } inline String_t** get_address_of_extnOid_0() { return &___extnOid_0; } inline void set_extnOid_0(String_t* value) { ___extnOid_0 = value; Il2CppCodeGenWriteBarrier((&___extnOid_0), value); } inline static int32_t get_offset_of_extnCritical_1() { return static_cast<int32_t>(offsetof(X509Extension_t433104161, ___extnCritical_1)); } inline bool get_extnCritical_1() const { return ___extnCritical_1; } inline bool* get_address_of_extnCritical_1() { return &___extnCritical_1; } inline void set_extnCritical_1(bool value) { ___extnCritical_1 = value; } inline static int32_t get_offset_of_extnValue_2() { return static_cast<int32_t>(offsetof(X509Extension_t433104161, ___extnValue_2)); } inline ASN1_t2411596682 * get_extnValue_2() const { return ___extnValue_2; } inline ASN1_t2411596682 ** get_address_of_extnValue_2() { return &___extnValue_2; } inline void set_extnValue_2(ASN1_t2411596682 * value) { ___extnValue_2 = value; Il2CppCodeGenWriteBarrier((&___extnValue_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509EXTENSION_T433104161_H #ifndef CLIENTRECORDPROTOCOL_T369192006_H #define CLIENTRECORDPROTOCOL_T369192006_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ClientRecordProtocol struct ClientRecordProtocol_t369192006 : public RecordProtocol_t164207684 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CLIENTRECORDPROTOCOL_T369192006_H #ifndef U24ARRAYTYPEU242048_T847137458_H #define U24ARRAYTYPEU242048_T847137458_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$2048 struct U24ArrayTypeU242048_t847137458 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU242048_t847137458__padding[2048]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU242048_T847137458_H #ifndef RSASSLSIGNATUREFORMATTER_T1473151827_H #define RSASSLSIGNATUREFORMATTER_T1473151827_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.RSASslSignatureFormatter struct RSASslSignatureFormatter_t1473151827 : public AsymmetricSignatureFormatter_t2355533261 { public: // System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.RSASslSignatureFormatter::key RSA_t1848366421 * ___key_0; // System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.RSASslSignatureFormatter::hash HashAlgorithm_t3103134881 * ___hash_1; public: inline static int32_t get_offset_of_key_0() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t1473151827, ___key_0)); } inline RSA_t1848366421 * get_key_0() const { return ___key_0; } inline RSA_t1848366421 ** get_address_of_key_0() { return &___key_0; } inline void set_key_0(RSA_t1848366421 * value) { ___key_0 = value; Il2CppCodeGenWriteBarrier((&___key_0), value); } inline static int32_t get_offset_of_hash_1() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t1473151827, ___hash_1)); } inline HashAlgorithm_t3103134881 * get_hash_1() const { return ___hash_1; } inline HashAlgorithm_t3103134881 ** get_address_of_hash_1() { return &___hash_1; } inline void set_hash_1(HashAlgorithm_t3103134881 * value) { ___hash_1 = value; Il2CppCodeGenWriteBarrier((&___hash_1), value); } }; struct RSASslSignatureFormatter_t1473151827_StaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.Protocol.Tls.RSASslSignatureFormatter::<>f__switch$map16 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map16_2; public: inline static int32_t get_offset_of_U3CU3Ef__switchU24map16_2() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t1473151827_StaticFields, ___U3CU3Ef__switchU24map16_2)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map16_2() const { return ___U3CU3Ef__switchU24map16_2; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map16_2() { return &___U3CU3Ef__switchU24map16_2; } inline void set_U3CU3Ef__switchU24map16_2(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map16_2 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map16_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RSASSLSIGNATUREFORMATTER_T1473151827_H #ifndef SSLHANDSHAKEHASH_T998393304_H #define SSLHANDSHAKEHASH_T998393304_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SslHandshakeHash struct SslHandshakeHash_t998393304 : public HashAlgorithm_t3103134881 { public: // System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.SslHandshakeHash::md5 HashAlgorithm_t3103134881 * ___md5_4; // System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.SslHandshakeHash::sha HashAlgorithm_t3103134881 * ___sha_5; // System.Boolean Mono.Security.Protocol.Tls.SslHandshakeHash::hashing bool ___hashing_6; // System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::secret ByteU5BU5D_t3983351780* ___secret_7; // System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::innerPadMD5 ByteU5BU5D_t3983351780* ___innerPadMD5_8; // System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::outerPadMD5 ByteU5BU5D_t3983351780* ___outerPadMD5_9; // System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::innerPadSHA ByteU5BU5D_t3983351780* ___innerPadSHA_10; // System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::outerPadSHA ByteU5BU5D_t3983351780* ___outerPadSHA_11; public: inline static int32_t get_offset_of_md5_4() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___md5_4)); } inline HashAlgorithm_t3103134881 * get_md5_4() const { return ___md5_4; } inline HashAlgorithm_t3103134881 ** get_address_of_md5_4() { return &___md5_4; } inline void set_md5_4(HashAlgorithm_t3103134881 * value) { ___md5_4 = value; Il2CppCodeGenWriteBarrier((&___md5_4), value); } inline static int32_t get_offset_of_sha_5() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___sha_5)); } inline HashAlgorithm_t3103134881 * get_sha_5() const { return ___sha_5; } inline HashAlgorithm_t3103134881 ** get_address_of_sha_5() { return &___sha_5; } inline void set_sha_5(HashAlgorithm_t3103134881 * value) { ___sha_5 = value; Il2CppCodeGenWriteBarrier((&___sha_5), value); } inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___hashing_6)); } inline bool get_hashing_6() const { return ___hashing_6; } inline bool* get_address_of_hashing_6() { return &___hashing_6; } inline void set_hashing_6(bool value) { ___hashing_6 = value; } inline static int32_t get_offset_of_secret_7() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___secret_7)); } inline ByteU5BU5D_t3983351780* get_secret_7() const { return ___secret_7; } inline ByteU5BU5D_t3983351780** get_address_of_secret_7() { return &___secret_7; } inline void set_secret_7(ByteU5BU5D_t3983351780* value) { ___secret_7 = value; Il2CppCodeGenWriteBarrier((&___secret_7), value); } inline static int32_t get_offset_of_innerPadMD5_8() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___innerPadMD5_8)); } inline ByteU5BU5D_t3983351780* get_innerPadMD5_8() const { return ___innerPadMD5_8; } inline ByteU5BU5D_t3983351780** get_address_of_innerPadMD5_8() { return &___innerPadMD5_8; } inline void set_innerPadMD5_8(ByteU5BU5D_t3983351780* value) { ___innerPadMD5_8 = value; Il2CppCodeGenWriteBarrier((&___innerPadMD5_8), value); } inline static int32_t get_offset_of_outerPadMD5_9() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___outerPadMD5_9)); } inline ByteU5BU5D_t3983351780* get_outerPadMD5_9() const { return ___outerPadMD5_9; } inline ByteU5BU5D_t3983351780** get_address_of_outerPadMD5_9() { return &___outerPadMD5_9; } inline void set_outerPadMD5_9(ByteU5BU5D_t3983351780* value) { ___outerPadMD5_9 = value; Il2CppCodeGenWriteBarrier((&___outerPadMD5_9), value); } inline static int32_t get_offset_of_innerPadSHA_10() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___innerPadSHA_10)); } inline ByteU5BU5D_t3983351780* get_innerPadSHA_10() const { return ___innerPadSHA_10; } inline ByteU5BU5D_t3983351780** get_address_of_innerPadSHA_10() { return &___innerPadSHA_10; } inline void set_innerPadSHA_10(ByteU5BU5D_t3983351780* value) { ___innerPadSHA_10 = value; Il2CppCodeGenWriteBarrier((&___innerPadSHA_10), value); } inline static int32_t get_offset_of_outerPadSHA_11() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t998393304, ___outerPadSHA_11)); } inline ByteU5BU5D_t3983351780* get_outerPadSHA_11() const { return ___outerPadSHA_11; } inline ByteU5BU5D_t3983351780** get_address_of_outerPadSHA_11() { return &___outerPadSHA_11; } inline void set_outerPadSHA_11(ByteU5BU5D_t3983351780* value) { ___outerPadSHA_11 = value; Il2CppCodeGenWriteBarrier((&___outerPadSHA_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SSLHANDSHAKEHASH_T998393304_H #ifndef TLSEXCEPTION_T2107218173_H #define TLSEXCEPTION_T2107218173_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.TlsException struct TlsException_t2107218173 : public Exception_t2993544719 { public: // Mono.Security.Protocol.Tls.Alert Mono.Security.Protocol.Tls.TlsException::alert Alert_t4252074283 * ___alert_11; public: inline static int32_t get_offset_of_alert_11() { return static_cast<int32_t>(offsetof(TlsException_t2107218173, ___alert_11)); } inline Alert_t4252074283 * get_alert_11() const { return ___alert_11; } inline Alert_t4252074283 ** get_address_of_alert_11() { return &___alert_11; } inline void set_alert_11(Alert_t4252074283 * value) { ___alert_11 = value; Il2CppCodeGenWriteBarrier((&___alert_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TLSEXCEPTION_T2107218173_H #ifndef MD5SHA1_T1637223380_H #define MD5SHA1_T1637223380_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.MD5SHA1 struct MD5SHA1_t1637223380 : public HashAlgorithm_t3103134881 { public: // System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.MD5SHA1::md5 HashAlgorithm_t3103134881 * ___md5_4; // System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.MD5SHA1::sha HashAlgorithm_t3103134881 * ___sha_5; // System.Boolean Mono.Security.Cryptography.MD5SHA1::hashing bool ___hashing_6; public: inline static int32_t get_offset_of_md5_4() { return static_cast<int32_t>(offsetof(MD5SHA1_t1637223380, ___md5_4)); } inline HashAlgorithm_t3103134881 * get_md5_4() const { return ___md5_4; } inline HashAlgorithm_t3103134881 ** get_address_of_md5_4() { return &___md5_4; } inline void set_md5_4(HashAlgorithm_t3103134881 * value) { ___md5_4 = value; Il2CppCodeGenWriteBarrier((&___md5_4), value); } inline static int32_t get_offset_of_sha_5() { return static_cast<int32_t>(offsetof(MD5SHA1_t1637223380, ___sha_5)); } inline HashAlgorithm_t3103134881 * get_sha_5() const { return ___sha_5; } inline HashAlgorithm_t3103134881 ** get_address_of_sha_5() { return &___sha_5; } inline void set_sha_5(HashAlgorithm_t3103134881 * value) { ___sha_5 = value; Il2CppCodeGenWriteBarrier((&___sha_5), value); } inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(MD5SHA1_t1637223380, ___hashing_6)); } inline bool get_hashing_6() const { return ___hashing_6; } inline bool* get_address_of_hashing_6() { return &___hashing_6; } inline void set_hashing_6(bool value) { ___hashing_6 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MD5SHA1_T1637223380_H #ifndef ENUM_T490949623_H #define ENUM_T490949623_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Enum struct Enum_t490949623 : public ValueType_t1592695253 { public: public: }; struct Enum_t490949623_StaticFields { public: // System.Char[] System.Enum::split_char CharU5BU5D_t1342097413* ___split_char_0; public: inline static int32_t get_offset_of_split_char_0() { return static_cast<int32_t>(offsetof(Enum_t490949623_StaticFields, ___split_char_0)); } inline CharU5BU5D_t1342097413* get_split_char_0() const { return ___split_char_0; } inline CharU5BU5D_t1342097413** get_address_of_split_char_0() { return &___split_char_0; } inline void set_split_char_0(CharU5BU5D_t1342097413* value) { ___split_char_0 = value; Il2CppCodeGenWriteBarrier((&___split_char_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Enum struct Enum_t490949623_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t490949623_marshaled_com { }; #endif // ENUM_T490949623_H #ifndef RSA_T1848366421_H #define RSA_T1848366421_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.RSA struct RSA_t1848366421 : public AsymmetricAlgorithm_t634832402 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RSA_T1848366421_H #ifndef VOID_T2464324455_H #define VOID_T2464324455_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void struct Void_t2464324455 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VOID_T2464324455_H #ifndef KEYEDHASHALGORITHM_T3693065389_H #define KEYEDHASHALGORITHM_T3693065389_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.KeyedHashAlgorithm struct KeyedHashAlgorithm_t3693065389 : public HashAlgorithm_t3103134881 { public: // System.Byte[] System.Security.Cryptography.KeyedHashAlgorithm::KeyValue ByteU5BU5D_t3983351780* ___KeyValue_4; public: inline static int32_t get_offset_of_KeyValue_4() { return static_cast<int32_t>(offsetof(KeyedHashAlgorithm_t3693065389, ___KeyValue_4)); } inline ByteU5BU5D_t3983351780* get_KeyValue_4() const { return ___KeyValue_4; } inline ByteU5BU5D_t3983351780** get_address_of_KeyValue_4() { return &___KeyValue_4; } inline void set_KeyValue_4(ByteU5BU5D_t3983351780* value) { ___KeyValue_4 = value; Il2CppCodeGenWriteBarrier((&___KeyValue_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KEYEDHASHALGORITHM_T3693065389_H #ifndef BOOLEAN_T1934257121_H #define BOOLEAN_T1934257121_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Boolean struct Boolean_t1934257121 { public: // System.Boolean System.Boolean::m_value bool ___m_value_2; public: inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Boolean_t1934257121, ___m_value_2)); } inline bool get_m_value_2() const { return ___m_value_2; } inline bool* get_address_of_m_value_2() { return &___m_value_2; } inline void set_m_value_2(bool value) { ___m_value_2 = value; } }; struct Boolean_t1934257121_StaticFields { public: // System.String System.Boolean::FalseString String_t* ___FalseString_0; // System.String System.Boolean::TrueString String_t* ___TrueString_1; public: inline static int32_t get_offset_of_FalseString_0() { return static_cast<int32_t>(offsetof(Boolean_t1934257121_StaticFields, ___FalseString_0)); } inline String_t* get_FalseString_0() const { return ___FalseString_0; } inline String_t** get_address_of_FalseString_0() { return &___FalseString_0; } inline void set_FalseString_0(String_t* value) { ___FalseString_0 = value; Il2CppCodeGenWriteBarrier((&___FalseString_0), value); } inline static int32_t get_offset_of_TrueString_1() { return static_cast<int32_t>(offsetof(Boolean_t1934257121_StaticFields, ___TrueString_1)); } inline String_t* get_TrueString_1() const { return ___TrueString_1; } inline String_t** get_address_of_TrueString_1() { return &___TrueString_1; } inline void set_TrueString_1(String_t* value) { ___TrueString_1 = value; Il2CppCodeGenWriteBarrier((&___TrueString_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BOOLEAN_T1934257121_H #ifndef TIMESPAN_T887193648_H #define TIMESPAN_T887193648_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TimeSpan struct TimeSpan_t887193648 { public: // System.Int64 System.TimeSpan::_ticks int64_t ____ticks_3; public: inline static int32_t get_offset_of__ticks_3() { return static_cast<int32_t>(offsetof(TimeSpan_t887193648, ____ticks_3)); } inline int64_t get__ticks_3() const { return ____ticks_3; } inline int64_t* get_address_of__ticks_3() { return &____ticks_3; } inline void set__ticks_3(int64_t value) { ____ticks_3 = value; } }; struct TimeSpan_t887193648_StaticFields { public: // System.TimeSpan System.TimeSpan::MaxValue TimeSpan_t887193648 ___MaxValue_0; // System.TimeSpan System.TimeSpan::MinValue TimeSpan_t887193648 ___MinValue_1; // System.TimeSpan System.TimeSpan::Zero TimeSpan_t887193648 ___Zero_2; public: inline static int32_t get_offset_of_MaxValue_0() { return static_cast<int32_t>(offsetof(TimeSpan_t887193648_StaticFields, ___MaxValue_0)); } inline TimeSpan_t887193648 get_MaxValue_0() const { return ___MaxValue_0; } inline TimeSpan_t887193648 * get_address_of_MaxValue_0() { return &___MaxValue_0; } inline void set_MaxValue_0(TimeSpan_t887193648 value) { ___MaxValue_0 = value; } inline static int32_t get_offset_of_MinValue_1() { return static_cast<int32_t>(offsetof(TimeSpan_t887193648_StaticFields, ___MinValue_1)); } inline TimeSpan_t887193648 get_MinValue_1() const { return ___MinValue_1; } inline TimeSpan_t887193648 * get_address_of_MinValue_1() { return &___MinValue_1; } inline void set_MinValue_1(TimeSpan_t887193648 value) { ___MinValue_1 = value; } inline static int32_t get_offset_of_Zero_2() { return static_cast<int32_t>(offsetof(TimeSpan_t887193648_StaticFields, ___Zero_2)); } inline TimeSpan_t887193648 get_Zero_2() const { return ___Zero_2; } inline TimeSpan_t887193648 * get_address_of_Zero_2() { return &___Zero_2; } inline void set_Zero_2(TimeSpan_t887193648 value) { ___Zero_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TIMESPAN_T887193648_H #ifndef RSASSLSIGNATUREDEFORMATTER_T3761984734_H #define RSASSLSIGNATUREDEFORMATTER_T3761984734_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.RSASslSignatureDeformatter struct RSASslSignatureDeformatter_t3761984734 : public AsymmetricSignatureDeformatter_t3500514064 { public: // System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::key RSA_t1848366421 * ___key_0; // System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::hash HashAlgorithm_t3103134881 * ___hash_1; public: inline static int32_t get_offset_of_key_0() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3761984734, ___key_0)); } inline RSA_t1848366421 * get_key_0() const { return ___key_0; } inline RSA_t1848366421 ** get_address_of_key_0() { return &___key_0; } inline void set_key_0(RSA_t1848366421 * value) { ___key_0 = value; Il2CppCodeGenWriteBarrier((&___key_0), value); } inline static int32_t get_offset_of_hash_1() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3761984734, ___hash_1)); } inline HashAlgorithm_t3103134881 * get_hash_1() const { return ___hash_1; } inline HashAlgorithm_t3103134881 ** get_address_of_hash_1() { return &___hash_1; } inline void set_hash_1(HashAlgorithm_t3103134881 * value) { ___hash_1 = value; Il2CppCodeGenWriteBarrier((&___hash_1), value); } }; struct RSASslSignatureDeformatter_t3761984734_StaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::<>f__switch$map15 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map15_2; public: inline static int32_t get_offset_of_U3CU3Ef__switchU24map15_2() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3761984734_StaticFields, ___U3CU3Ef__switchU24map15_2)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map15_2() const { return ___U3CU3Ef__switchU24map15_2; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map15_2() { return &___U3CU3Ef__switchU24map15_2; } inline void set_U3CU3Ef__switchU24map15_2(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map15_2 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map15_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RSASSLSIGNATUREDEFORMATTER_T3761984734_H #ifndef SUBJECTALTNAMEEXTENSION_T167540439_H #define SUBJECTALTNAMEEXTENSION_T167540439_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.SubjectAltNameExtension struct SubjectAltNameExtension_t167540439 : public X509Extension_t433104161 { public: // Mono.Security.X509.Extensions.GeneralNames Mono.Security.X509.Extensions.SubjectAltNameExtension::_names GeneralNames_t2881647084 * ____names_3; public: inline static int32_t get_offset_of__names_3() { return static_cast<int32_t>(offsetof(SubjectAltNameExtension_t167540439, ____names_3)); } inline GeneralNames_t2881647084 * get__names_3() const { return ____names_3; } inline GeneralNames_t2881647084 ** get_address_of__names_3() { return &____names_3; } inline void set__names_3(GeneralNames_t2881647084 * value) { ____names_3 = value; Il2CppCodeGenWriteBarrier((&____names_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SUBJECTALTNAMEEXTENSION_T167540439_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 U24ARRAYTYPEU2452_T1131239061_H #define U24ARRAYTYPEU2452_T1131239061_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$52 struct U24ArrayTypeU2452_t1131239061 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU2452_t1131239061__padding[52]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU2452_T1131239061_H #ifndef MD2_T3580661162_H #define MD2_T3580661162_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.MD2 struct MD2_t3580661162 : public HashAlgorithm_t3103134881 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MD2_T3580661162_H #ifndef SEQUENTIALSEARCHPRIMEGENERATORBASE_T4242388961_H #define SEQUENTIALSEARCHPRIMEGENERATORBASE_T4242388961_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase struct SequentialSearchPrimeGeneratorBase_t4242388961 : public PrimeGeneratorBase_t1522174298 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SEQUENTIALSEARCHPRIMEGENERATORBASE_T4242388961_H #ifndef X509EXTENSIONCOLLECTION_T1845307619_H #define X509EXTENSIONCOLLECTION_T1845307619_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509ExtensionCollection struct X509ExtensionCollection_t1845307619 : public CollectionBase_t1380370726 { public: // System.Boolean Mono.Security.X509.X509ExtensionCollection::readOnly bool ___readOnly_1; public: inline static int32_t get_offset_of_readOnly_1() { return static_cast<int32_t>(offsetof(X509ExtensionCollection_t1845307619, ___readOnly_1)); } inline bool get_readOnly_1() const { return ___readOnly_1; } inline bool* get_address_of_readOnly_1() { return &___readOnly_1; } inline void set_readOnly_1(bool value) { ___readOnly_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509EXTENSIONCOLLECTION_T1845307619_H #ifndef MD4_T3793402044_H #define MD4_T3793402044_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.MD4 struct MD4_t3793402044 : public HashAlgorithm_t3103134881 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MD4_T3793402044_H #ifndef X509CERTIFICATECOLLECTION_T669936613_H #define X509CERTIFICATECOLLECTION_T669936613_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509CertificateCollection struct X509CertificateCollection_t669936613 : public CollectionBase_t1380370726 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CERTIFICATECOLLECTION_T669936613_H #ifndef EXTENDEDKEYUSAGEEXTENSION_T2682024810_H #define EXTENDEDKEYUSAGEEXTENSION_T2682024810_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.ExtendedKeyUsageExtension struct ExtendedKeyUsageExtension_t2682024810 : public X509Extension_t433104161 { public: // System.Collections.ArrayList Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::keyPurpose ArrayList_t2987363682 * ___keyPurpose_3; public: inline static int32_t get_offset_of_keyPurpose_3() { return static_cast<int32_t>(offsetof(ExtendedKeyUsageExtension_t2682024810, ___keyPurpose_3)); } inline ArrayList_t2987363682 * get_keyPurpose_3() const { return ___keyPurpose_3; } inline ArrayList_t2987363682 ** get_address_of_keyPurpose_3() { return &___keyPurpose_3; } inline void set_keyPurpose_3(ArrayList_t2987363682 * value) { ___keyPurpose_3 = value; Il2CppCodeGenWriteBarrier((&___keyPurpose_3), value); } }; struct ExtendedKeyUsageExtension_t2682024810_StaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::<>f__switch$map14 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map14_4; public: inline static int32_t get_offset_of_U3CU3Ef__switchU24map14_4() { return static_cast<int32_t>(offsetof(ExtendedKeyUsageExtension_t2682024810_StaticFields, ___U3CU3Ef__switchU24map14_4)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map14_4() const { return ___U3CU3Ef__switchU24map14_4; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map14_4() { return &___U3CU3Ef__switchU24map14_4; } inline void set_U3CU3Ef__switchU24map14_4(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map14_4 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map14_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // EXTENDEDKEYUSAGEEXTENSION_T2682024810_H #ifndef __IL2CPPCOMDELEGATE_T3886986368_H #define __IL2CPPCOMDELEGATE_T3886986368_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.__Il2CppComDelegate struct __Il2CppComDelegate_t3886986368 : public Il2CppComObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // __IL2CPPCOMDELEGATE_T3886986368_H #ifndef AUTHORITYKEYIDENTIFIEREXTENSION_T2208413012_H #define AUTHORITYKEYIDENTIFIEREXTENSION_T2208413012_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.AuthorityKeyIdentifierExtension struct AuthorityKeyIdentifierExtension_t2208413012 : public X509Extension_t433104161 { public: // System.Byte[] Mono.Security.X509.Extensions.AuthorityKeyIdentifierExtension::aki ByteU5BU5D_t3983351780* ___aki_3; public: inline static int32_t get_offset_of_aki_3() { return static_cast<int32_t>(offsetof(AuthorityKeyIdentifierExtension_t2208413012, ___aki_3)); } inline ByteU5BU5D_t3983351780* get_aki_3() const { return ___aki_3; } inline ByteU5BU5D_t3983351780** get_address_of_aki_3() { return &___aki_3; } inline void set_aki_3(ByteU5BU5D_t3983351780* value) { ___aki_3 = value; Il2CppCodeGenWriteBarrier((&___aki_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // AUTHORITYKEYIDENTIFIEREXTENSION_T2208413012_H #ifndef BASICCONSTRAINTSEXTENSION_T762066143_H #define BASICCONSTRAINTSEXTENSION_T762066143_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.BasicConstraintsExtension struct BasicConstraintsExtension_t762066143 : public X509Extension_t433104161 { public: // System.Boolean Mono.Security.X509.Extensions.BasicConstraintsExtension::cA bool ___cA_3; // System.Int32 Mono.Security.X509.Extensions.BasicConstraintsExtension::pathLenConstraint int32_t ___pathLenConstraint_4; public: inline static int32_t get_offset_of_cA_3() { return static_cast<int32_t>(offsetof(BasicConstraintsExtension_t762066143, ___cA_3)); } inline bool get_cA_3() const { return ___cA_3; } inline bool* get_address_of_cA_3() { return &___cA_3; } inline void set_cA_3(bool value) { ___cA_3 = value; } inline static int32_t get_offset_of_pathLenConstraint_4() { return static_cast<int32_t>(offsetof(BasicConstraintsExtension_t762066143, ___pathLenConstraint_4)); } inline int32_t get_pathLenConstraint_4() const { return ___pathLenConstraint_4; } inline int32_t* get_address_of_pathLenConstraint_4() { return &___pathLenConstraint_4; } inline void set_pathLenConstraint_4(int32_t value) { ___pathLenConstraint_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BASICCONSTRAINTSEXTENSION_T762066143_H #ifndef U24ARRAYTYPEU24128_T1965195622_H #define U24ARRAYTYPEU24128_T1965195622_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$128 struct U24ArrayTypeU24128_t1965195622 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU24128_t1965195622__padding[128]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU24128_T1965195622_H #ifndef U24ARRAYTYPEU24640_T3420096276_H #define U24ARRAYTYPEU24640_T3420096276_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$640 struct U24ArrayTypeU24640_t3420096276 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU24640_t3420096276__padding[640]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU24640_T3420096276_H #ifndef U24ARRAYTYPEU241024_T660597622_H #define U24ARRAYTYPEU241024_T660597622_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$1024 struct U24ArrayTypeU241024_t660597622 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU241024_t660597622__padding[1024]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU241024_T660597622_H #ifndef U24ARRAYTYPEU24256_T3294398382_H #define U24ARRAYTYPEU24256_T3294398382_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>/$ArrayType$256 struct U24ArrayTypeU24256_t3294398382 { public: union { struct { union { }; }; uint8_t U24ArrayTypeU24256_t3294398382__padding[256]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U24ARRAYTYPEU24256_T3294398382_H #ifndef NETSCAPECERTTYPEEXTENSION_T3101450098_H #define NETSCAPECERTTYPEEXTENSION_T3101450098_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.NetscapeCertTypeExtension struct NetscapeCertTypeExtension_t3101450098 : public X509Extension_t433104161 { public: // System.Int32 Mono.Security.X509.Extensions.NetscapeCertTypeExtension::ctbits int32_t ___ctbits_3; public: inline static int32_t get_offset_of_ctbits_3() { return static_cast<int32_t>(offsetof(NetscapeCertTypeExtension_t3101450098, ___ctbits_3)); } inline int32_t get_ctbits_3() const { return ___ctbits_3; } inline int32_t* get_address_of_ctbits_3() { return &___ctbits_3; } inline void set_ctbits_3(int32_t value) { ___ctbits_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // NETSCAPECERTTYPEEXTENSION_T3101450098_H #ifndef KEYUSAGEEXTENSION_T882853614_H #define KEYUSAGEEXTENSION_T882853614_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.KeyUsageExtension struct KeyUsageExtension_t882853614 : public X509Extension_t433104161 { public: // System.Int32 Mono.Security.X509.Extensions.KeyUsageExtension::kubits int32_t ___kubits_3; public: inline static int32_t get_offset_of_kubits_3() { return static_cast<int32_t>(offsetof(KeyUsageExtension_t882853614, ___kubits_3)); } inline int32_t get_kubits_3() const { return ___kubits_3; } inline int32_t* get_address_of_kubits_3() { return &___kubits_3; } inline void set_kubits_3(int32_t value) { ___kubits_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KEYUSAGEEXTENSION_T882853614_H #ifndef MD4MANAGED_T3759342352_H #define MD4MANAGED_T3759342352_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.MD4Managed struct MD4Managed_t3759342352 : public MD4_t3793402044 { public: // System.UInt32[] Mono.Security.Cryptography.MD4Managed::state UInt32U5BU5D_t2511474702* ___state_4; // System.Byte[] Mono.Security.Cryptography.MD4Managed::buffer ByteU5BU5D_t3983351780* ___buffer_5; // System.UInt32[] Mono.Security.Cryptography.MD4Managed::count UInt32U5BU5D_t2511474702* ___count_6; // System.UInt32[] Mono.Security.Cryptography.MD4Managed::x UInt32U5BU5D_t2511474702* ___x_7; // System.Byte[] Mono.Security.Cryptography.MD4Managed::digest ByteU5BU5D_t3983351780* ___digest_8; public: inline static int32_t get_offset_of_state_4() { return static_cast<int32_t>(offsetof(MD4Managed_t3759342352, ___state_4)); } inline UInt32U5BU5D_t2511474702* get_state_4() const { return ___state_4; } inline UInt32U5BU5D_t2511474702** get_address_of_state_4() { return &___state_4; } inline void set_state_4(UInt32U5BU5D_t2511474702* value) { ___state_4 = value; Il2CppCodeGenWriteBarrier((&___state_4), value); } inline static int32_t get_offset_of_buffer_5() { return static_cast<int32_t>(offsetof(MD4Managed_t3759342352, ___buffer_5)); } inline ByteU5BU5D_t3983351780* get_buffer_5() const { return ___buffer_5; } inline ByteU5BU5D_t3983351780** get_address_of_buffer_5() { return &___buffer_5; } inline void set_buffer_5(ByteU5BU5D_t3983351780* value) { ___buffer_5 = value; Il2CppCodeGenWriteBarrier((&___buffer_5), value); } inline static int32_t get_offset_of_count_6() { return static_cast<int32_t>(offsetof(MD4Managed_t3759342352, ___count_6)); } inline UInt32U5BU5D_t2511474702* get_count_6() const { return ___count_6; } inline UInt32U5BU5D_t2511474702** get_address_of_count_6() { return &___count_6; } inline void set_count_6(UInt32U5BU5D_t2511474702* value) { ___count_6 = value; Il2CppCodeGenWriteBarrier((&___count_6), value); } inline static int32_t get_offset_of_x_7() { return static_cast<int32_t>(offsetof(MD4Managed_t3759342352, ___x_7)); } inline UInt32U5BU5D_t2511474702* get_x_7() const { return ___x_7; } inline UInt32U5BU5D_t2511474702** get_address_of_x_7() { return &___x_7; } inline void set_x_7(UInt32U5BU5D_t2511474702* value) { ___x_7 = value; Il2CppCodeGenWriteBarrier((&___x_7), value); } inline static int32_t get_offset_of_digest_8() { return static_cast<int32_t>(offsetof(MD4Managed_t3759342352, ___digest_8)); } inline ByteU5BU5D_t3983351780* get_digest_8() const { return ___digest_8; } inline ByteU5BU5D_t3983351780** get_address_of_digest_8() { return &___digest_8; } inline void set_digest_8(ByteU5BU5D_t3983351780* value) { ___digest_8 = value; Il2CppCodeGenWriteBarrier((&___digest_8), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MD4MANAGED_T3759342352_H #ifndef RSAMANAGED_T3657898182_H #define RSAMANAGED_T3657898182_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.RSAManaged struct RSAManaged_t3657898182 : public RSA_t1848366421 { public: // System.Boolean Mono.Security.Cryptography.RSAManaged::isCRTpossible bool ___isCRTpossible_2; // System.Boolean Mono.Security.Cryptography.RSAManaged::keyBlinding bool ___keyBlinding_3; // System.Boolean Mono.Security.Cryptography.RSAManaged::keypairGenerated bool ___keypairGenerated_4; // System.Boolean Mono.Security.Cryptography.RSAManaged::m_disposed bool ___m_disposed_5; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::d BigInteger_t1332966298 * ___d_6; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::p BigInteger_t1332966298 * ___p_7; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::q BigInteger_t1332966298 * ___q_8; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::dp BigInteger_t1332966298 * ___dp_9; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::dq BigInteger_t1332966298 * ___dq_10; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::qInv BigInteger_t1332966298 * ___qInv_11; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::n BigInteger_t1332966298 * ___n_12; // Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::e BigInteger_t1332966298 * ___e_13; // Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler Mono.Security.Cryptography.RSAManaged::KeyGenerated KeyGeneratedEventHandler_t1006745161 * ___KeyGenerated_14; public: inline static int32_t get_offset_of_isCRTpossible_2() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___isCRTpossible_2)); } inline bool get_isCRTpossible_2() const { return ___isCRTpossible_2; } inline bool* get_address_of_isCRTpossible_2() { return &___isCRTpossible_2; } inline void set_isCRTpossible_2(bool value) { ___isCRTpossible_2 = value; } inline static int32_t get_offset_of_keyBlinding_3() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___keyBlinding_3)); } inline bool get_keyBlinding_3() const { return ___keyBlinding_3; } inline bool* get_address_of_keyBlinding_3() { return &___keyBlinding_3; } inline void set_keyBlinding_3(bool value) { ___keyBlinding_3 = value; } inline static int32_t get_offset_of_keypairGenerated_4() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___keypairGenerated_4)); } inline bool get_keypairGenerated_4() const { return ___keypairGenerated_4; } inline bool* get_address_of_keypairGenerated_4() { return &___keypairGenerated_4; } inline void set_keypairGenerated_4(bool value) { ___keypairGenerated_4 = value; } inline static int32_t get_offset_of_m_disposed_5() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___m_disposed_5)); } inline bool get_m_disposed_5() const { return ___m_disposed_5; } inline bool* get_address_of_m_disposed_5() { return &___m_disposed_5; } inline void set_m_disposed_5(bool value) { ___m_disposed_5 = value; } inline static int32_t get_offset_of_d_6() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___d_6)); } inline BigInteger_t1332966298 * get_d_6() const { return ___d_6; } inline BigInteger_t1332966298 ** get_address_of_d_6() { return &___d_6; } inline void set_d_6(BigInteger_t1332966298 * value) { ___d_6 = value; Il2CppCodeGenWriteBarrier((&___d_6), value); } inline static int32_t get_offset_of_p_7() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___p_7)); } inline BigInteger_t1332966298 * get_p_7() const { return ___p_7; } inline BigInteger_t1332966298 ** get_address_of_p_7() { return &___p_7; } inline void set_p_7(BigInteger_t1332966298 * value) { ___p_7 = value; Il2CppCodeGenWriteBarrier((&___p_7), value); } inline static int32_t get_offset_of_q_8() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___q_8)); } inline BigInteger_t1332966298 * get_q_8() const { return ___q_8; } inline BigInteger_t1332966298 ** get_address_of_q_8() { return &___q_8; } inline void set_q_8(BigInteger_t1332966298 * value) { ___q_8 = value; Il2CppCodeGenWriteBarrier((&___q_8), value); } inline static int32_t get_offset_of_dp_9() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___dp_9)); } inline BigInteger_t1332966298 * get_dp_9() const { return ___dp_9; } inline BigInteger_t1332966298 ** get_address_of_dp_9() { return &___dp_9; } inline void set_dp_9(BigInteger_t1332966298 * value) { ___dp_9 = value; Il2CppCodeGenWriteBarrier((&___dp_9), value); } inline static int32_t get_offset_of_dq_10() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___dq_10)); } inline BigInteger_t1332966298 * get_dq_10() const { return ___dq_10; } inline BigInteger_t1332966298 ** get_address_of_dq_10() { return &___dq_10; } inline void set_dq_10(BigInteger_t1332966298 * value) { ___dq_10 = value; Il2CppCodeGenWriteBarrier((&___dq_10), value); } inline static int32_t get_offset_of_qInv_11() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___qInv_11)); } inline BigInteger_t1332966298 * get_qInv_11() const { return ___qInv_11; } inline BigInteger_t1332966298 ** get_address_of_qInv_11() { return &___qInv_11; } inline void set_qInv_11(BigInteger_t1332966298 * value) { ___qInv_11 = value; Il2CppCodeGenWriteBarrier((&___qInv_11), value); } inline static int32_t get_offset_of_n_12() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___n_12)); } inline BigInteger_t1332966298 * get_n_12() const { return ___n_12; } inline BigInteger_t1332966298 ** get_address_of_n_12() { return &___n_12; } inline void set_n_12(BigInteger_t1332966298 * value) { ___n_12 = value; Il2CppCodeGenWriteBarrier((&___n_12), value); } inline static int32_t get_offset_of_e_13() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___e_13)); } inline BigInteger_t1332966298 * get_e_13() const { return ___e_13; } inline BigInteger_t1332966298 ** get_address_of_e_13() { return &___e_13; } inline void set_e_13(BigInteger_t1332966298 * value) { ___e_13 = value; Il2CppCodeGenWriteBarrier((&___e_13), value); } inline static int32_t get_offset_of_KeyGenerated_14() { return static_cast<int32_t>(offsetof(RSAManaged_t3657898182, ___KeyGenerated_14)); } inline KeyGeneratedEventHandler_t1006745161 * get_KeyGenerated_14() const { return ___KeyGenerated_14; } inline KeyGeneratedEventHandler_t1006745161 ** get_address_of_KeyGenerated_14() { return &___KeyGenerated_14; } inline void set_KeyGenerated_14(KeyGeneratedEventHandler_t1006745161 * value) { ___KeyGenerated_14 = value; Il2CppCodeGenWriteBarrier((&___KeyGenerated_14), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RSAMANAGED_T3657898182_H #ifndef SSLSTREAMBASE_T2013173809_H #define SSLSTREAMBASE_T2013173809_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SslStreamBase struct SslStreamBase_t2013173809 : public Stream_t669916290 { public: // System.IO.Stream Mono.Security.Protocol.Tls.SslStreamBase::innerStream Stream_t669916290 * ___innerStream_3; // System.IO.MemoryStream Mono.Security.Protocol.Tls.SslStreamBase::inputBuffer MemoryStream_t3639578493 * ___inputBuffer_4; // Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.SslStreamBase::context Context_t4280724427 * ___context_5; // Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.SslStreamBase::protocol RecordProtocol_t164207684 * ___protocol_6; // System.Boolean Mono.Security.Protocol.Tls.SslStreamBase::ownsStream bool ___ownsStream_7; // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) Mono.Security.Protocol.Tls.SslStreamBase::disposed bool ___disposed_8; // System.Boolean Mono.Security.Protocol.Tls.SslStreamBase::checkCertRevocationStatus bool ___checkCertRevocationStatus_9; // System.Object Mono.Security.Protocol.Tls.SslStreamBase::negotiate RuntimeObject * ___negotiate_10; // System.Object Mono.Security.Protocol.Tls.SslStreamBase::read RuntimeObject * ___read_11; // System.Object Mono.Security.Protocol.Tls.SslStreamBase::write RuntimeObject * ___write_12; // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.SslStreamBase::negotiationComplete ManualResetEvent_t1253388680 * ___negotiationComplete_13; // System.Byte[] Mono.Security.Protocol.Tls.SslStreamBase::recbuf ByteU5BU5D_t3983351780* ___recbuf_14; // System.IO.MemoryStream Mono.Security.Protocol.Tls.SslStreamBase::recordStream MemoryStream_t3639578493 * ___recordStream_15; public: inline static int32_t get_offset_of_innerStream_3() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___innerStream_3)); } inline Stream_t669916290 * get_innerStream_3() const { return ___innerStream_3; } inline Stream_t669916290 ** get_address_of_innerStream_3() { return &___innerStream_3; } inline void set_innerStream_3(Stream_t669916290 * value) { ___innerStream_3 = value; Il2CppCodeGenWriteBarrier((&___innerStream_3), value); } inline static int32_t get_offset_of_inputBuffer_4() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___inputBuffer_4)); } inline MemoryStream_t3639578493 * get_inputBuffer_4() const { return ___inputBuffer_4; } inline MemoryStream_t3639578493 ** get_address_of_inputBuffer_4() { return &___inputBuffer_4; } inline void set_inputBuffer_4(MemoryStream_t3639578493 * value) { ___inputBuffer_4 = value; Il2CppCodeGenWriteBarrier((&___inputBuffer_4), value); } inline static int32_t get_offset_of_context_5() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___context_5)); } inline Context_t4280724427 * get_context_5() const { return ___context_5; } inline Context_t4280724427 ** get_address_of_context_5() { return &___context_5; } inline void set_context_5(Context_t4280724427 * value) { ___context_5 = value; Il2CppCodeGenWriteBarrier((&___context_5), value); } inline static int32_t get_offset_of_protocol_6() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___protocol_6)); } inline RecordProtocol_t164207684 * get_protocol_6() const { return ___protocol_6; } inline RecordProtocol_t164207684 ** get_address_of_protocol_6() { return &___protocol_6; } inline void set_protocol_6(RecordProtocol_t164207684 * value) { ___protocol_6 = value; Il2CppCodeGenWriteBarrier((&___protocol_6), value); } inline static int32_t get_offset_of_ownsStream_7() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___ownsStream_7)); } inline bool get_ownsStream_7() const { return ___ownsStream_7; } inline bool* get_address_of_ownsStream_7() { return &___ownsStream_7; } inline void set_ownsStream_7(bool value) { ___ownsStream_7 = value; } inline static int32_t get_offset_of_disposed_8() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___disposed_8)); } inline bool get_disposed_8() const { return ___disposed_8; } inline bool* get_address_of_disposed_8() { return &___disposed_8; } inline void set_disposed_8(bool value) { ___disposed_8 = value; } inline static int32_t get_offset_of_checkCertRevocationStatus_9() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___checkCertRevocationStatus_9)); } inline bool get_checkCertRevocationStatus_9() const { return ___checkCertRevocationStatus_9; } inline bool* get_address_of_checkCertRevocationStatus_9() { return &___checkCertRevocationStatus_9; } inline void set_checkCertRevocationStatus_9(bool value) { ___checkCertRevocationStatus_9 = value; } inline static int32_t get_offset_of_negotiate_10() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___negotiate_10)); } inline RuntimeObject * get_negotiate_10() const { return ___negotiate_10; } inline RuntimeObject ** get_address_of_negotiate_10() { return &___negotiate_10; } inline void set_negotiate_10(RuntimeObject * value) { ___negotiate_10 = value; Il2CppCodeGenWriteBarrier((&___negotiate_10), value); } inline static int32_t get_offset_of_read_11() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___read_11)); } inline RuntimeObject * get_read_11() const { return ___read_11; } inline RuntimeObject ** get_address_of_read_11() { return &___read_11; } inline void set_read_11(RuntimeObject * value) { ___read_11 = value; Il2CppCodeGenWriteBarrier((&___read_11), value); } inline static int32_t get_offset_of_write_12() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___write_12)); } inline RuntimeObject * get_write_12() const { return ___write_12; } inline RuntimeObject ** get_address_of_write_12() { return &___write_12; } inline void set_write_12(RuntimeObject * value) { ___write_12 = value; Il2CppCodeGenWriteBarrier((&___write_12), value); } inline static int32_t get_offset_of_negotiationComplete_13() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___negotiationComplete_13)); } inline ManualResetEvent_t1253388680 * get_negotiationComplete_13() const { return ___negotiationComplete_13; } inline ManualResetEvent_t1253388680 ** get_address_of_negotiationComplete_13() { return &___negotiationComplete_13; } inline void set_negotiationComplete_13(ManualResetEvent_t1253388680 * value) { ___negotiationComplete_13 = value; Il2CppCodeGenWriteBarrier((&___negotiationComplete_13), value); } inline static int32_t get_offset_of_recbuf_14() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___recbuf_14)); } inline ByteU5BU5D_t3983351780* get_recbuf_14() const { return ___recbuf_14; } inline ByteU5BU5D_t3983351780** get_address_of_recbuf_14() { return &___recbuf_14; } inline void set_recbuf_14(ByteU5BU5D_t3983351780* value) { ___recbuf_14 = value; Il2CppCodeGenWriteBarrier((&___recbuf_14), value); } inline static int32_t get_offset_of_recordStream_15() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809, ___recordStream_15)); } inline MemoryStream_t3639578493 * get_recordStream_15() const { return ___recordStream_15; } inline MemoryStream_t3639578493 ** get_address_of_recordStream_15() { return &___recordStream_15; } inline void set_recordStream_15(MemoryStream_t3639578493 * value) { ___recordStream_15 = value; Il2CppCodeGenWriteBarrier((&___recordStream_15), value); } }; struct SslStreamBase_t2013173809_StaticFields { public: // System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.SslStreamBase::record_processing ManualResetEvent_t1253388680 * ___record_processing_2; public: inline static int32_t get_offset_of_record_processing_2() { return static_cast<int32_t>(offsetof(SslStreamBase_t2013173809_StaticFields, ___record_processing_2)); } inline ManualResetEvent_t1253388680 * get_record_processing_2() const { return ___record_processing_2; } inline ManualResetEvent_t1253388680 ** get_address_of_record_processing_2() { return &___record_processing_2; } inline void set_record_processing_2(ManualResetEvent_t1253388680 * value) { ___record_processing_2 = value; Il2CppCodeGenWriteBarrier((&___record_processing_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SSLSTREAMBASE_T2013173809_H #ifndef HMAC_T1446275806_H #define HMAC_T1446275806_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.HMAC struct HMAC_t1446275806 : public KeyedHashAlgorithm_t3693065389 { public: // System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.HMAC::hash HashAlgorithm_t3103134881 * ___hash_5; // System.Boolean Mono.Security.Cryptography.HMAC::hashing bool ___hashing_6; // System.Byte[] Mono.Security.Cryptography.HMAC::innerPad ByteU5BU5D_t3983351780* ___innerPad_7; // System.Byte[] Mono.Security.Cryptography.HMAC::outerPad ByteU5BU5D_t3983351780* ___outerPad_8; public: inline static int32_t get_offset_of_hash_5() { return static_cast<int32_t>(offsetof(HMAC_t1446275806, ___hash_5)); } inline HashAlgorithm_t3103134881 * get_hash_5() const { return ___hash_5; } inline HashAlgorithm_t3103134881 ** get_address_of_hash_5() { return &___hash_5; } inline void set_hash_5(HashAlgorithm_t3103134881 * value) { ___hash_5 = value; Il2CppCodeGenWriteBarrier((&___hash_5), value); } inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(HMAC_t1446275806, ___hashing_6)); } inline bool get_hashing_6() const { return ___hashing_6; } inline bool* get_address_of_hashing_6() { return &___hashing_6; } inline void set_hashing_6(bool value) { ___hashing_6 = value; } inline static int32_t get_offset_of_innerPad_7() { return static_cast<int32_t>(offsetof(HMAC_t1446275806, ___innerPad_7)); } inline ByteU5BU5D_t3983351780* get_innerPad_7() const { return ___innerPad_7; } inline ByteU5BU5D_t3983351780** get_address_of_innerPad_7() { return &___innerPad_7; } inline void set_innerPad_7(ByteU5BU5D_t3983351780* value) { ___innerPad_7 = value; Il2CppCodeGenWriteBarrier((&___innerPad_7), value); } inline static int32_t get_offset_of_outerPad_8() { return static_cast<int32_t>(offsetof(HMAC_t1446275806, ___outerPad_8)); } inline ByteU5BU5D_t3983351780* get_outerPad_8() const { return ___outerPad_8; } inline ByteU5BU5D_t3983351780** get_address_of_outerPad_8() { return &___outerPad_8; } inline void set_outerPad_8(ByteU5BU5D_t3983351780* value) { ___outerPad_8 = value; Il2CppCodeGenWriteBarrier((&___outerPad_8), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HMAC_T1446275806_H #ifndef HANDSHAKETYPE_T1734220969_H #define HANDSHAKETYPE_T1734220969_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.Handshake.HandshakeType struct HandshakeType_t1734220969 { public: // System.Byte Mono.Security.Protocol.Tls.Handshake.HandshakeType::value__ uint8_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HandshakeType_t1734220969, ___value___1)); } inline uint8_t get_value___1() const { return ___value___1; } inline uint8_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(uint8_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HANDSHAKETYPE_T1734220969_H #ifndef CONFIDENCEFACTOR_T2991353669_H #define CONFIDENCEFACTOR_T2991353669_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.Prime.ConfidenceFactor struct ConfidenceFactor_t2991353669 { public: // System.Int32 Mono.Math.Prime.ConfidenceFactor::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ConfidenceFactor_t2991353669, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONFIDENCEFACTOR_T2991353669_H #ifndef CIPHERMODE_T3109007896_H #define CIPHERMODE_T3109007896_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.CipherMode struct CipherMode_t3109007896 { public: // System.Int32 System.Security.Cryptography.CipherMode::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CipherMode_t3109007896, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CIPHERMODE_T3109007896_H #ifndef SIGN_T3671729870_H #define SIGN_T3671729870_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Math.BigInteger/Sign struct Sign_t3671729870 { public: // System.Int32 Mono.Math.BigInteger/Sign::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Sign_t3671729870, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SIGN_T3671729870_H #ifndef PADDINGMODE_T95441647_H #define PADDINGMODE_T95441647_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.PaddingMode struct PaddingMode_t95441647 { public: // System.Int32 System.Security.Cryptography.PaddingMode::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(PaddingMode_t95441647, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PADDINGMODE_T95441647_H #ifndef DELEGATE_T2018546828_H #define DELEGATE_T2018546828_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Delegate struct Delegate_t2018546828 : 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::method_code intptr_t ___method_code_5; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_6; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_7; // System.DelegateData System.Delegate::data DelegateData_t1882957669 * ___data_8; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t2018546828, ___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_t2018546828, ___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_t2018546828, ___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_t2018546828, ___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_t2018546828, ___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_method_code_5() { return static_cast<int32_t>(offsetof(Delegate_t2018546828, ___method_code_5)); } inline intptr_t get_method_code_5() const { return ___method_code_5; } inline intptr_t* get_address_of_method_code_5() { return &___method_code_5; } inline void set_method_code_5(intptr_t value) { ___method_code_5 = value; } inline static int32_t get_offset_of_method_info_6() { return static_cast<int32_t>(offsetof(Delegate_t2018546828, ___method_info_6)); } inline MethodInfo_t * get_method_info_6() const { return ___method_info_6; } inline MethodInfo_t ** get_address_of_method_info_6() { return &___method_info_6; } inline void set_method_info_6(MethodInfo_t * value) { ___method_info_6 = value; Il2CppCodeGenWriteBarrier((&___method_info_6), value); } inline static int32_t get_offset_of_original_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t2018546828, ___original_method_info_7)); } inline MethodInfo_t * get_original_method_info_7() const { return ___original_method_info_7; } inline MethodInfo_t ** get_address_of_original_method_info_7() { return &___original_method_info_7; } inline void set_original_method_info_7(MethodInfo_t * value) { ___original_method_info_7 = value; Il2CppCodeGenWriteBarrier((&___original_method_info_7), value); } inline static int32_t get_offset_of_data_8() { return static_cast<int32_t>(offsetof(Delegate_t2018546828, ___data_8)); } inline DelegateData_t1882957669 * get_data_8() const { return ___data_8; } inline DelegateData_t1882957669 ** get_address_of_data_8() { return &___data_8; } inline void set_data_8(DelegateData_t1882957669 * value) { ___data_8 = value; Il2CppCodeGenWriteBarrier((&___data_8), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DELEGATE_T2018546828_H #ifndef MD2MANAGED_T3582214154_H #define MD2MANAGED_T3582214154_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.MD2Managed struct MD2Managed_t3582214154 : public MD2_t3580661162 { public: // System.Byte[] Mono.Security.Cryptography.MD2Managed::state ByteU5BU5D_t3983351780* ___state_4; // System.Byte[] Mono.Security.Cryptography.MD2Managed::checksum ByteU5BU5D_t3983351780* ___checksum_5; // System.Byte[] Mono.Security.Cryptography.MD2Managed::buffer ByteU5BU5D_t3983351780* ___buffer_6; // System.Int32 Mono.Security.Cryptography.MD2Managed::count int32_t ___count_7; // System.Byte[] Mono.Security.Cryptography.MD2Managed::x ByteU5BU5D_t3983351780* ___x_8; public: inline static int32_t get_offset_of_state_4() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154, ___state_4)); } inline ByteU5BU5D_t3983351780* get_state_4() const { return ___state_4; } inline ByteU5BU5D_t3983351780** get_address_of_state_4() { return &___state_4; } inline void set_state_4(ByteU5BU5D_t3983351780* value) { ___state_4 = value; Il2CppCodeGenWriteBarrier((&___state_4), value); } inline static int32_t get_offset_of_checksum_5() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154, ___checksum_5)); } inline ByteU5BU5D_t3983351780* get_checksum_5() const { return ___checksum_5; } inline ByteU5BU5D_t3983351780** get_address_of_checksum_5() { return &___checksum_5; } inline void set_checksum_5(ByteU5BU5D_t3983351780* value) { ___checksum_5 = value; Il2CppCodeGenWriteBarrier((&___checksum_5), value); } inline static int32_t get_offset_of_buffer_6() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154, ___buffer_6)); } inline ByteU5BU5D_t3983351780* get_buffer_6() const { return ___buffer_6; } inline ByteU5BU5D_t3983351780** get_address_of_buffer_6() { return &___buffer_6; } inline void set_buffer_6(ByteU5BU5D_t3983351780* value) { ___buffer_6 = value; Il2CppCodeGenWriteBarrier((&___buffer_6), value); } inline static int32_t get_offset_of_count_7() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154, ___count_7)); } inline int32_t get_count_7() const { return ___count_7; } inline int32_t* get_address_of_count_7() { return &___count_7; } inline void set_count_7(int32_t value) { ___count_7 = value; } inline static int32_t get_offset_of_x_8() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154, ___x_8)); } inline ByteU5BU5D_t3983351780* get_x_8() const { return ___x_8; } inline ByteU5BU5D_t3983351780** get_address_of_x_8() { return &___x_8; } inline void set_x_8(ByteU5BU5D_t3983351780* value) { ___x_8 = value; Il2CppCodeGenWriteBarrier((&___x_8), value); } }; struct MD2Managed_t3582214154_StaticFields { public: // System.Byte[] Mono.Security.Cryptography.MD2Managed::PI_SUBST ByteU5BU5D_t3983351780* ___PI_SUBST_9; public: inline static int32_t get_offset_of_PI_SUBST_9() { return static_cast<int32_t>(offsetof(MD2Managed_t3582214154_StaticFields, ___PI_SUBST_9)); } inline ByteU5BU5D_t3983351780* get_PI_SUBST_9() const { return ___PI_SUBST_9; } inline ByteU5BU5D_t3983351780** get_address_of_PI_SUBST_9() { return &___PI_SUBST_9; } inline void set_PI_SUBST_9(ByteU5BU5D_t3983351780* value) { ___PI_SUBST_9 = value; Il2CppCodeGenWriteBarrier((&___PI_SUBST_9), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MD2MANAGED_T3582214154_H #ifndef DATETIMEKIND_T3164852795_H #define DATETIMEKIND_T3164852795_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.DateTimeKind struct DateTimeKind_t3164852795 { public: // System.Int32 System.DateTimeKind::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(DateTimeKind_t3164852795, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DATETIMEKIND_T3164852795_H #ifndef CERTTYPES_T1628209562_H #define CERTTYPES_T1628209562_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.NetscapeCertTypeExtension/CertTypes struct CertTypes_t1628209562 { public: // System.Int32 Mono.Security.X509.Extensions.NetscapeCertTypeExtension/CertTypes::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CertTypes_t1628209562, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CERTTYPES_T1628209562_H #ifndef CONTENTTYPE_T2986289475_H #define CONTENTTYPE_T2986289475_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ContentType struct ContentType_t2986289475 { public: // System.Byte Mono.Security.Protocol.Tls.ContentType::value__ uint8_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ContentType_t2986289475, ___value___1)); } inline uint8_t get_value___1() const { return ___value___1; } inline uint8_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(uint8_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONTENTTYPE_T2986289475_H #ifndef ALERTLEVEL_T58903571_H #define ALERTLEVEL_T58903571_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.AlertLevel struct AlertLevel_t58903571 { public: // System.Byte Mono.Security.Protocol.Tls.AlertLevel::value__ uint8_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AlertLevel_t58903571, ___value___1)); } inline uint8_t get_value___1() const { return ___value___1; } inline uint8_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(uint8_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ALERTLEVEL_T58903571_H #ifndef SECURITYPROTOCOLTYPE_T2830707411_H #define SECURITYPROTOCOLTYPE_T2830707411_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SecurityProtocolType struct SecurityProtocolType_t2830707411 { public: // System.Int32 Mono.Security.Protocol.Tls.SecurityProtocolType::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SecurityProtocolType_t2830707411, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SECURITYPROTOCOLTYPE_T2830707411_H #ifndef X509CHAINSTATUSFLAGS_T932214918_H #define X509CHAINSTATUSFLAGS_T932214918_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509ChainStatusFlags struct X509ChainStatusFlags_t932214918 { public: // System.Int32 Mono.Security.X509.X509ChainStatusFlags::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(X509ChainStatusFlags_t932214918, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CHAINSTATUSFLAGS_T932214918_H #ifndef ALERTDESCRIPTION_T400044940_H #define ALERTDESCRIPTION_T400044940_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.AlertDescription struct AlertDescription_t400044940 { public: // System.Byte Mono.Security.Protocol.Tls.AlertDescription::value__ uint8_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AlertDescription_t400044940, ___value___1)); } inline uint8_t get_value___1() const { return ___value___1; } inline uint8_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(uint8_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ALERTDESCRIPTION_T400044940_H #ifndef EXCHANGEALGORITHMTYPE_T1399338423_H #define EXCHANGEALGORITHMTYPE_T1399338423_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ExchangeAlgorithmType struct ExchangeAlgorithmType_t1399338423 { public: // System.Int32 Mono.Security.Protocol.Tls.ExchangeAlgorithmType::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ExchangeAlgorithmType_t1399338423, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // EXCHANGEALGORITHMTYPE_T1399338423_H #ifndef CIPHERALGORITHMTYPE_T3080725697_H #define CIPHERALGORITHMTYPE_T3080725697_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.CipherAlgorithmType struct CipherAlgorithmType_t3080725697 { public: // System.Int32 Mono.Security.Protocol.Tls.CipherAlgorithmType::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CipherAlgorithmType_t3080725697, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CIPHERALGORITHMTYPE_T3080725697_H #ifndef SECURITYCOMPRESSIONTYPE_T3955755332_H #define SECURITYCOMPRESSIONTYPE_T3955755332_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SecurityCompressionType struct SecurityCompressionType_t3955755332 { public: // System.Int32 Mono.Security.Protocol.Tls.SecurityCompressionType::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SecurityCompressionType_t3955755332, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SECURITYCOMPRESSIONTYPE_T3955755332_H #ifndef HANDSHAKESTATE_T549057581_H #define HANDSHAKESTATE_T549057581_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.HandshakeState struct HandshakeState_t549057581 { public: // System.Int32 Mono.Security.Protocol.Tls.HandshakeState::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HandshakeState_t549057581, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HANDSHAKESTATE_T549057581_H #ifndef KEYUSAGES_T3862338839_H #define KEYUSAGES_T3862338839_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.Extensions.KeyUsages struct KeyUsages_t3862338839 { public: // System.Int32 Mono.Security.X509.Extensions.KeyUsages::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(KeyUsages_t3862338839, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KEYUSAGES_T3862338839_H #ifndef HASHALGORITHMTYPE_T143221662_H #define HASHALGORITHMTYPE_T143221662_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.HashAlgorithmType struct HashAlgorithmType_t143221662 { public: // System.Int32 Mono.Security.Protocol.Tls.HashAlgorithmType::value__ int32_t ___value___1; public: inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HashAlgorithmType_t143221662, ___value___1)); } inline int32_t get_value___1() const { return ___value___1; } inline int32_t* get_address_of_value___1() { return &___value___1; } inline void set_value___1(int32_t value) { ___value___1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HASHALGORITHMTYPE_T143221662_H #ifndef DATETIME_T1864329490_H #define DATETIME_T1864329490_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.DateTime struct DateTime_t1864329490 { public: // System.TimeSpan System.DateTime::ticks TimeSpan_t887193648 ___ticks_0; // System.DateTimeKind System.DateTime::kind int32_t ___kind_1; public: inline static int32_t get_offset_of_ticks_0() { return static_cast<int32_t>(offsetof(DateTime_t1864329490, ___ticks_0)); } inline TimeSpan_t887193648 get_ticks_0() const { return ___ticks_0; } inline TimeSpan_t887193648 * get_address_of_ticks_0() { return &___ticks_0; } inline void set_ticks_0(TimeSpan_t887193648 value) { ___ticks_0 = value; } inline static int32_t get_offset_of_kind_1() { return static_cast<int32_t>(offsetof(DateTime_t1864329490, ___kind_1)); } inline int32_t get_kind_1() const { return ___kind_1; } inline int32_t* get_address_of_kind_1() { return &___kind_1; } inline void set_kind_1(int32_t value) { ___kind_1 = value; } }; struct DateTime_t1864329490_StaticFields { public: // System.DateTime System.DateTime::MaxValue DateTime_t1864329490 ___MaxValue_2; // System.DateTime System.DateTime::MinValue DateTime_t1864329490 ___MinValue_3; // System.String[] System.DateTime::ParseTimeFormats StringU5BU5D_t3026901547* ___ParseTimeFormats_4; // System.String[] System.DateTime::ParseYearDayMonthFormats StringU5BU5D_t3026901547* ___ParseYearDayMonthFormats_5; // System.String[] System.DateTime::ParseYearMonthDayFormats StringU5BU5D_t3026901547* ___ParseYearMonthDayFormats_6; // System.String[] System.DateTime::ParseDayMonthYearFormats StringU5BU5D_t3026901547* ___ParseDayMonthYearFormats_7; // System.String[] System.DateTime::ParseMonthDayYearFormats StringU5BU5D_t3026901547* ___ParseMonthDayYearFormats_8; // System.String[] System.DateTime::MonthDayShortFormats StringU5BU5D_t3026901547* ___MonthDayShortFormats_9; // System.String[] System.DateTime::DayMonthShortFormats StringU5BU5D_t3026901547* ___DayMonthShortFormats_10; // System.Int32[] System.DateTime::daysmonth Int32U5BU5D_t654359361* ___daysmonth_11; // System.Int32[] System.DateTime::daysmonthleap Int32U5BU5D_t654359361* ___daysmonthleap_12; // System.Object System.DateTime::to_local_time_span_object RuntimeObject * ___to_local_time_span_object_13; // System.Int64 System.DateTime::last_now int64_t ___last_now_14; public: inline static int32_t get_offset_of_MaxValue_2() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___MaxValue_2)); } inline DateTime_t1864329490 get_MaxValue_2() const { return ___MaxValue_2; } inline DateTime_t1864329490 * get_address_of_MaxValue_2() { return &___MaxValue_2; } inline void set_MaxValue_2(DateTime_t1864329490 value) { ___MaxValue_2 = value; } inline static int32_t get_offset_of_MinValue_3() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___MinValue_3)); } inline DateTime_t1864329490 get_MinValue_3() const { return ___MinValue_3; } inline DateTime_t1864329490 * get_address_of_MinValue_3() { return &___MinValue_3; } inline void set_MinValue_3(DateTime_t1864329490 value) { ___MinValue_3 = value; } inline static int32_t get_offset_of_ParseTimeFormats_4() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___ParseTimeFormats_4)); } inline StringU5BU5D_t3026901547* get_ParseTimeFormats_4() const { return ___ParseTimeFormats_4; } inline StringU5BU5D_t3026901547** get_address_of_ParseTimeFormats_4() { return &___ParseTimeFormats_4; } inline void set_ParseTimeFormats_4(StringU5BU5D_t3026901547* value) { ___ParseTimeFormats_4 = value; Il2CppCodeGenWriteBarrier((&___ParseTimeFormats_4), value); } inline static int32_t get_offset_of_ParseYearDayMonthFormats_5() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___ParseYearDayMonthFormats_5)); } inline StringU5BU5D_t3026901547* get_ParseYearDayMonthFormats_5() const { return ___ParseYearDayMonthFormats_5; } inline StringU5BU5D_t3026901547** get_address_of_ParseYearDayMonthFormats_5() { return &___ParseYearDayMonthFormats_5; } inline void set_ParseYearDayMonthFormats_5(StringU5BU5D_t3026901547* value) { ___ParseYearDayMonthFormats_5 = value; Il2CppCodeGenWriteBarrier((&___ParseYearDayMonthFormats_5), value); } inline static int32_t get_offset_of_ParseYearMonthDayFormats_6() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___ParseYearMonthDayFormats_6)); } inline StringU5BU5D_t3026901547* get_ParseYearMonthDayFormats_6() const { return ___ParseYearMonthDayFormats_6; } inline StringU5BU5D_t3026901547** get_address_of_ParseYearMonthDayFormats_6() { return &___ParseYearMonthDayFormats_6; } inline void set_ParseYearMonthDayFormats_6(StringU5BU5D_t3026901547* value) { ___ParseYearMonthDayFormats_6 = value; Il2CppCodeGenWriteBarrier((&___ParseYearMonthDayFormats_6), value); } inline static int32_t get_offset_of_ParseDayMonthYearFormats_7() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___ParseDayMonthYearFormats_7)); } inline StringU5BU5D_t3026901547* get_ParseDayMonthYearFormats_7() const { return ___ParseDayMonthYearFormats_7; } inline StringU5BU5D_t3026901547** get_address_of_ParseDayMonthYearFormats_7() { return &___ParseDayMonthYearFormats_7; } inline void set_ParseDayMonthYearFormats_7(StringU5BU5D_t3026901547* value) { ___ParseDayMonthYearFormats_7 = value; Il2CppCodeGenWriteBarrier((&___ParseDayMonthYearFormats_7), value); } inline static int32_t get_offset_of_ParseMonthDayYearFormats_8() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___ParseMonthDayYearFormats_8)); } inline StringU5BU5D_t3026901547* get_ParseMonthDayYearFormats_8() const { return ___ParseMonthDayYearFormats_8; } inline StringU5BU5D_t3026901547** get_address_of_ParseMonthDayYearFormats_8() { return &___ParseMonthDayYearFormats_8; } inline void set_ParseMonthDayYearFormats_8(StringU5BU5D_t3026901547* value) { ___ParseMonthDayYearFormats_8 = value; Il2CppCodeGenWriteBarrier((&___ParseMonthDayYearFormats_8), value); } inline static int32_t get_offset_of_MonthDayShortFormats_9() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___MonthDayShortFormats_9)); } inline StringU5BU5D_t3026901547* get_MonthDayShortFormats_9() const { return ___MonthDayShortFormats_9; } inline StringU5BU5D_t3026901547** get_address_of_MonthDayShortFormats_9() { return &___MonthDayShortFormats_9; } inline void set_MonthDayShortFormats_9(StringU5BU5D_t3026901547* value) { ___MonthDayShortFormats_9 = value; Il2CppCodeGenWriteBarrier((&___MonthDayShortFormats_9), value); } inline static int32_t get_offset_of_DayMonthShortFormats_10() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___DayMonthShortFormats_10)); } inline StringU5BU5D_t3026901547* get_DayMonthShortFormats_10() const { return ___DayMonthShortFormats_10; } inline StringU5BU5D_t3026901547** get_address_of_DayMonthShortFormats_10() { return &___DayMonthShortFormats_10; } inline void set_DayMonthShortFormats_10(StringU5BU5D_t3026901547* value) { ___DayMonthShortFormats_10 = value; Il2CppCodeGenWriteBarrier((&___DayMonthShortFormats_10), value); } inline static int32_t get_offset_of_daysmonth_11() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___daysmonth_11)); } inline Int32U5BU5D_t654359361* get_daysmonth_11() const { return ___daysmonth_11; } inline Int32U5BU5D_t654359361** get_address_of_daysmonth_11() { return &___daysmonth_11; } inline void set_daysmonth_11(Int32U5BU5D_t654359361* value) { ___daysmonth_11 = value; Il2CppCodeGenWriteBarrier((&___daysmonth_11), value); } inline static int32_t get_offset_of_daysmonthleap_12() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___daysmonthleap_12)); } inline Int32U5BU5D_t654359361* get_daysmonthleap_12() const { return ___daysmonthleap_12; } inline Int32U5BU5D_t654359361** get_address_of_daysmonthleap_12() { return &___daysmonthleap_12; } inline void set_daysmonthleap_12(Int32U5BU5D_t654359361* value) { ___daysmonthleap_12 = value; Il2CppCodeGenWriteBarrier((&___daysmonthleap_12), value); } inline static int32_t get_offset_of_to_local_time_span_object_13() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___to_local_time_span_object_13)); } inline RuntimeObject * get_to_local_time_span_object_13() const { return ___to_local_time_span_object_13; } inline RuntimeObject ** get_address_of_to_local_time_span_object_13() { return &___to_local_time_span_object_13; } inline void set_to_local_time_span_object_13(RuntimeObject * value) { ___to_local_time_span_object_13 = value; Il2CppCodeGenWriteBarrier((&___to_local_time_span_object_13), value); } inline static int32_t get_offset_of_last_now_14() { return static_cast<int32_t>(offsetof(DateTime_t1864329490_StaticFields, ___last_now_14)); } inline int64_t get_last_now_14() const { return ___last_now_14; } inline int64_t* get_address_of_last_now_14() { return &___last_now_14; } inline void set_last_now_14(int64_t value) { ___last_now_14 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DATETIME_T1864329490_H #ifndef X509CHAIN_T917150473_H #define X509CHAIN_T917150473_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Chain struct X509Chain_t917150473 : public RuntimeObject { public: // Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::roots X509CertificateCollection_t669936613 * ___roots_0; // Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::certs X509CertificateCollection_t669936613 * ___certs_1; // Mono.Security.X509.X509Certificate Mono.Security.X509.X509Chain::_root X509Certificate_t3614464293 * ____root_2; // Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::_chain X509CertificateCollection_t669936613 * ____chain_3; // Mono.Security.X509.X509ChainStatusFlags Mono.Security.X509.X509Chain::_status int32_t ____status_4; public: inline static int32_t get_offset_of_roots_0() { return static_cast<int32_t>(offsetof(X509Chain_t917150473, ___roots_0)); } inline X509CertificateCollection_t669936613 * get_roots_0() const { return ___roots_0; } inline X509CertificateCollection_t669936613 ** get_address_of_roots_0() { return &___roots_0; } inline void set_roots_0(X509CertificateCollection_t669936613 * value) { ___roots_0 = value; Il2CppCodeGenWriteBarrier((&___roots_0), value); } inline static int32_t get_offset_of_certs_1() { return static_cast<int32_t>(offsetof(X509Chain_t917150473, ___certs_1)); } inline X509CertificateCollection_t669936613 * get_certs_1() const { return ___certs_1; } inline X509CertificateCollection_t669936613 ** get_address_of_certs_1() { return &___certs_1; } inline void set_certs_1(X509CertificateCollection_t669936613 * value) { ___certs_1 = value; Il2CppCodeGenWriteBarrier((&___certs_1), value); } inline static int32_t get_offset_of__root_2() { return static_cast<int32_t>(offsetof(X509Chain_t917150473, ____root_2)); } inline X509Certificate_t3614464293 * get__root_2() const { return ____root_2; } inline X509Certificate_t3614464293 ** get_address_of__root_2() { return &____root_2; } inline void set__root_2(X509Certificate_t3614464293 * value) { ____root_2 = value; Il2CppCodeGenWriteBarrier((&____root_2), value); } inline static int32_t get_offset_of__chain_3() { return static_cast<int32_t>(offsetof(X509Chain_t917150473, ____chain_3)); } inline X509CertificateCollection_t669936613 * get__chain_3() const { return ____chain_3; } inline X509CertificateCollection_t669936613 ** get_address_of__chain_3() { return &____chain_3; } inline void set__chain_3(X509CertificateCollection_t669936613 * value) { ____chain_3 = value; Il2CppCodeGenWriteBarrier((&____chain_3), value); } inline static int32_t get_offset_of__status_4() { return static_cast<int32_t>(offsetof(X509Chain_t917150473, ____status_4)); } inline int32_t get__status_4() const { return ____status_4; } inline int32_t* get_address_of__status_4() { return &____status_4; } inline void set__status_4(int32_t value) { ____status_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CHAIN_T917150473_H #ifndef MULTICASTDELEGATE_T2540754097_H #define MULTICASTDELEGATE_T2540754097_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MulticastDelegate struct MulticastDelegate_t2540754097 : public Delegate_t2018546828 { public: // System.MulticastDelegate System.MulticastDelegate::prev MulticastDelegate_t2540754097 * ___prev_9; // System.MulticastDelegate System.MulticastDelegate::kpm_next MulticastDelegate_t2540754097 * ___kpm_next_10; public: inline static int32_t get_offset_of_prev_9() { return static_cast<int32_t>(offsetof(MulticastDelegate_t2540754097, ___prev_9)); } inline MulticastDelegate_t2540754097 * get_prev_9() const { return ___prev_9; } inline MulticastDelegate_t2540754097 ** get_address_of_prev_9() { return &___prev_9; } inline void set_prev_9(MulticastDelegate_t2540754097 * value) { ___prev_9 = value; Il2CppCodeGenWriteBarrier((&___prev_9), value); } inline static int32_t get_offset_of_kpm_next_10() { return static_cast<int32_t>(offsetof(MulticastDelegate_t2540754097, ___kpm_next_10)); } inline MulticastDelegate_t2540754097 * get_kpm_next_10() const { return ___kpm_next_10; } inline MulticastDelegate_t2540754097 ** get_address_of_kpm_next_10() { return &___kpm_next_10; } inline void set_kpm_next_10(MulticastDelegate_t2540754097 * value) { ___kpm_next_10 = value; Il2CppCodeGenWriteBarrier((&___kpm_next_10), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MULTICASTDELEGATE_T2540754097_H #ifndef SSLCLIENTSTREAM_T4073644265_H #define SSLCLIENTSTREAM_T4073644265_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SslClientStream struct SslClientStream_t4073644265 : public SslStreamBase_t2013173809 { public: // Mono.Security.Protocol.Tls.CertificateValidationCallback Mono.Security.Protocol.Tls.SslClientStream::ServerCertValidation CertificateValidationCallback_t4268601155 * ___ServerCertValidation_16; // Mono.Security.Protocol.Tls.CertificateSelectionCallback Mono.Security.Protocol.Tls.SslClientStream::ClientCertSelection CertificateSelectionCallback_t2372005106 * ___ClientCertSelection_17; // Mono.Security.Protocol.Tls.PrivateKeySelectionCallback Mono.Security.Protocol.Tls.SslClientStream::PrivateKeySelection PrivateKeySelectionCallback_t2707405579 * ___PrivateKeySelection_18; // Mono.Security.Protocol.Tls.CertificateValidationCallback2 Mono.Security.Protocol.Tls.SslClientStream::ServerCertValidation2 CertificateValidationCallback2_t3925647316 * ___ServerCertValidation2_19; public: inline static int32_t get_offset_of_ServerCertValidation_16() { return static_cast<int32_t>(offsetof(SslClientStream_t4073644265, ___ServerCertValidation_16)); } inline CertificateValidationCallback_t4268601155 * get_ServerCertValidation_16() const { return ___ServerCertValidation_16; } inline CertificateValidationCallback_t4268601155 ** get_address_of_ServerCertValidation_16() { return &___ServerCertValidation_16; } inline void set_ServerCertValidation_16(CertificateValidationCallback_t4268601155 * value) { ___ServerCertValidation_16 = value; Il2CppCodeGenWriteBarrier((&___ServerCertValidation_16), value); } inline static int32_t get_offset_of_ClientCertSelection_17() { return static_cast<int32_t>(offsetof(SslClientStream_t4073644265, ___ClientCertSelection_17)); } inline CertificateSelectionCallback_t2372005106 * get_ClientCertSelection_17() const { return ___ClientCertSelection_17; } inline CertificateSelectionCallback_t2372005106 ** get_address_of_ClientCertSelection_17() { return &___ClientCertSelection_17; } inline void set_ClientCertSelection_17(CertificateSelectionCallback_t2372005106 * value) { ___ClientCertSelection_17 = value; Il2CppCodeGenWriteBarrier((&___ClientCertSelection_17), value); } inline static int32_t get_offset_of_PrivateKeySelection_18() { return static_cast<int32_t>(offsetof(SslClientStream_t4073644265, ___PrivateKeySelection_18)); } inline PrivateKeySelectionCallback_t2707405579 * get_PrivateKeySelection_18() const { return ___PrivateKeySelection_18; } inline PrivateKeySelectionCallback_t2707405579 ** get_address_of_PrivateKeySelection_18() { return &___PrivateKeySelection_18; } inline void set_PrivateKeySelection_18(PrivateKeySelectionCallback_t2707405579 * value) { ___PrivateKeySelection_18 = value; Il2CppCodeGenWriteBarrier((&___PrivateKeySelection_18), value); } inline static int32_t get_offset_of_ServerCertValidation2_19() { return static_cast<int32_t>(offsetof(SslClientStream_t4073644265, ___ServerCertValidation2_19)); } inline CertificateValidationCallback2_t3925647316 * get_ServerCertValidation2_19() const { return ___ServerCertValidation2_19; } inline CertificateValidationCallback2_t3925647316 ** get_address_of_ServerCertValidation2_19() { return &___ServerCertValidation2_19; } inline void set_ServerCertValidation2_19(CertificateValidationCallback2_t3925647316 * value) { ___ServerCertValidation2_19 = value; Il2CppCodeGenWriteBarrier((&___ServerCertValidation2_19), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SSLCLIENTSTREAM_T4073644265_H #ifndef CONTEXT_T4280724427_H #define CONTEXT_T4280724427_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.Context struct Context_t4280724427 : public RuntimeObject { public: // Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::securityProtocol int32_t ___securityProtocol_0; // System.Byte[] Mono.Security.Protocol.Tls.Context::sessionId ByteU5BU5D_t3983351780* ___sessionId_1; // Mono.Security.Protocol.Tls.SecurityCompressionType Mono.Security.Protocol.Tls.Context::compressionMethod int32_t ___compressionMethod_2; // Mono.Security.Protocol.Tls.TlsServerSettings Mono.Security.Protocol.Tls.Context::serverSettings TlsServerSettings_t3936914880 * ___serverSettings_3; // Mono.Security.Protocol.Tls.TlsClientSettings Mono.Security.Protocol.Tls.Context::clientSettings TlsClientSettings_t97405758 * ___clientSettings_4; // Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::current SecurityParameters_t3249263566 * ___current_5; // Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::negotiating SecurityParameters_t3249263566 * ___negotiating_6; // Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::read SecurityParameters_t3249263566 * ___read_7; // Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::write SecurityParameters_t3249263566 * ___write_8; // Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.Context::supportedCiphers CipherSuiteCollection_t2392215148 * ___supportedCiphers_9; // Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Context::lastHandshakeMsg uint8_t ___lastHandshakeMsg_10; // Mono.Security.Protocol.Tls.HandshakeState Mono.Security.Protocol.Tls.Context::handshakeState int32_t ___handshakeState_11; // System.Boolean Mono.Security.Protocol.Tls.Context::abbreviatedHandshake bool ___abbreviatedHandshake_12; // System.Boolean Mono.Security.Protocol.Tls.Context::receivedConnectionEnd bool ___receivedConnectionEnd_13; // System.Boolean Mono.Security.Protocol.Tls.Context::sentConnectionEnd bool ___sentConnectionEnd_14; // System.Boolean Mono.Security.Protocol.Tls.Context::protocolNegotiated bool ___protocolNegotiated_15; // System.UInt64 Mono.Security.Protocol.Tls.Context::writeSequenceNumber uint64_t ___writeSequenceNumber_16; // System.UInt64 Mono.Security.Protocol.Tls.Context::readSequenceNumber uint64_t ___readSequenceNumber_17; // System.Byte[] Mono.Security.Protocol.Tls.Context::clientRandom ByteU5BU5D_t3983351780* ___clientRandom_18; // System.Byte[] Mono.Security.Protocol.Tls.Context::serverRandom ByteU5BU5D_t3983351780* ___serverRandom_19; // System.Byte[] Mono.Security.Protocol.Tls.Context::randomCS ByteU5BU5D_t3983351780* ___randomCS_20; // System.Byte[] Mono.Security.Protocol.Tls.Context::randomSC ByteU5BU5D_t3983351780* ___randomSC_21; // System.Byte[] Mono.Security.Protocol.Tls.Context::masterSecret ByteU5BU5D_t3983351780* ___masterSecret_22; // System.Byte[] Mono.Security.Protocol.Tls.Context::clientWriteKey ByteU5BU5D_t3983351780* ___clientWriteKey_23; // System.Byte[] Mono.Security.Protocol.Tls.Context::serverWriteKey ByteU5BU5D_t3983351780* ___serverWriteKey_24; // System.Byte[] Mono.Security.Protocol.Tls.Context::clientWriteIV ByteU5BU5D_t3983351780* ___clientWriteIV_25; // System.Byte[] Mono.Security.Protocol.Tls.Context::serverWriteIV ByteU5BU5D_t3983351780* ___serverWriteIV_26; // Mono.Security.Protocol.Tls.TlsStream Mono.Security.Protocol.Tls.Context::handshakeMessages TlsStream_t1307068231 * ___handshakeMessages_27; // System.Security.Cryptography.RandomNumberGenerator Mono.Security.Protocol.Tls.Context::random RandomNumberGenerator_t2386858178 * ___random_28; // Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.Context::recordProtocol RecordProtocol_t164207684 * ___recordProtocol_29; public: inline static int32_t get_offset_of_securityProtocol_0() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___securityProtocol_0)); } inline int32_t get_securityProtocol_0() const { return ___securityProtocol_0; } inline int32_t* get_address_of_securityProtocol_0() { return &___securityProtocol_0; } inline void set_securityProtocol_0(int32_t value) { ___securityProtocol_0 = value; } inline static int32_t get_offset_of_sessionId_1() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___sessionId_1)); } inline ByteU5BU5D_t3983351780* get_sessionId_1() const { return ___sessionId_1; } inline ByteU5BU5D_t3983351780** get_address_of_sessionId_1() { return &___sessionId_1; } inline void set_sessionId_1(ByteU5BU5D_t3983351780* value) { ___sessionId_1 = value; Il2CppCodeGenWriteBarrier((&___sessionId_1), value); } inline static int32_t get_offset_of_compressionMethod_2() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___compressionMethod_2)); } inline int32_t get_compressionMethod_2() const { return ___compressionMethod_2; } inline int32_t* get_address_of_compressionMethod_2() { return &___compressionMethod_2; } inline void set_compressionMethod_2(int32_t value) { ___compressionMethod_2 = value; } inline static int32_t get_offset_of_serverSettings_3() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___serverSettings_3)); } inline TlsServerSettings_t3936914880 * get_serverSettings_3() const { return ___serverSettings_3; } inline TlsServerSettings_t3936914880 ** get_address_of_serverSettings_3() { return &___serverSettings_3; } inline void set_serverSettings_3(TlsServerSettings_t3936914880 * value) { ___serverSettings_3 = value; Il2CppCodeGenWriteBarrier((&___serverSettings_3), value); } inline static int32_t get_offset_of_clientSettings_4() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___clientSettings_4)); } inline TlsClientSettings_t97405758 * get_clientSettings_4() const { return ___clientSettings_4; } inline TlsClientSettings_t97405758 ** get_address_of_clientSettings_4() { return &___clientSettings_4; } inline void set_clientSettings_4(TlsClientSettings_t97405758 * value) { ___clientSettings_4 = value; Il2CppCodeGenWriteBarrier((&___clientSettings_4), value); } inline static int32_t get_offset_of_current_5() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___current_5)); } inline SecurityParameters_t3249263566 * get_current_5() const { return ___current_5; } inline SecurityParameters_t3249263566 ** get_address_of_current_5() { return &___current_5; } inline void set_current_5(SecurityParameters_t3249263566 * value) { ___current_5 = value; Il2CppCodeGenWriteBarrier((&___current_5), value); } inline static int32_t get_offset_of_negotiating_6() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___negotiating_6)); } inline SecurityParameters_t3249263566 * get_negotiating_6() const { return ___negotiating_6; } inline SecurityParameters_t3249263566 ** get_address_of_negotiating_6() { return &___negotiating_6; } inline void set_negotiating_6(SecurityParameters_t3249263566 * value) { ___negotiating_6 = value; Il2CppCodeGenWriteBarrier((&___negotiating_6), value); } inline static int32_t get_offset_of_read_7() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___read_7)); } inline SecurityParameters_t3249263566 * get_read_7() const { return ___read_7; } inline SecurityParameters_t3249263566 ** get_address_of_read_7() { return &___read_7; } inline void set_read_7(SecurityParameters_t3249263566 * value) { ___read_7 = value; Il2CppCodeGenWriteBarrier((&___read_7), value); } inline static int32_t get_offset_of_write_8() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___write_8)); } inline SecurityParameters_t3249263566 * get_write_8() const { return ___write_8; } inline SecurityParameters_t3249263566 ** get_address_of_write_8() { return &___write_8; } inline void set_write_8(SecurityParameters_t3249263566 * value) { ___write_8 = value; Il2CppCodeGenWriteBarrier((&___write_8), value); } inline static int32_t get_offset_of_supportedCiphers_9() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___supportedCiphers_9)); } inline CipherSuiteCollection_t2392215148 * get_supportedCiphers_9() const { return ___supportedCiphers_9; } inline CipherSuiteCollection_t2392215148 ** get_address_of_supportedCiphers_9() { return &___supportedCiphers_9; } inline void set_supportedCiphers_9(CipherSuiteCollection_t2392215148 * value) { ___supportedCiphers_9 = value; Il2CppCodeGenWriteBarrier((&___supportedCiphers_9), value); } inline static int32_t get_offset_of_lastHandshakeMsg_10() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___lastHandshakeMsg_10)); } inline uint8_t get_lastHandshakeMsg_10() const { return ___lastHandshakeMsg_10; } inline uint8_t* get_address_of_lastHandshakeMsg_10() { return &___lastHandshakeMsg_10; } inline void set_lastHandshakeMsg_10(uint8_t value) { ___lastHandshakeMsg_10 = value; } inline static int32_t get_offset_of_handshakeState_11() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___handshakeState_11)); } inline int32_t get_handshakeState_11() const { return ___handshakeState_11; } inline int32_t* get_address_of_handshakeState_11() { return &___handshakeState_11; } inline void set_handshakeState_11(int32_t value) { ___handshakeState_11 = value; } inline static int32_t get_offset_of_abbreviatedHandshake_12() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___abbreviatedHandshake_12)); } inline bool get_abbreviatedHandshake_12() const { return ___abbreviatedHandshake_12; } inline bool* get_address_of_abbreviatedHandshake_12() { return &___abbreviatedHandshake_12; } inline void set_abbreviatedHandshake_12(bool value) { ___abbreviatedHandshake_12 = value; } inline static int32_t get_offset_of_receivedConnectionEnd_13() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___receivedConnectionEnd_13)); } inline bool get_receivedConnectionEnd_13() const { return ___receivedConnectionEnd_13; } inline bool* get_address_of_receivedConnectionEnd_13() { return &___receivedConnectionEnd_13; } inline void set_receivedConnectionEnd_13(bool value) { ___receivedConnectionEnd_13 = value; } inline static int32_t get_offset_of_sentConnectionEnd_14() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___sentConnectionEnd_14)); } inline bool get_sentConnectionEnd_14() const { return ___sentConnectionEnd_14; } inline bool* get_address_of_sentConnectionEnd_14() { return &___sentConnectionEnd_14; } inline void set_sentConnectionEnd_14(bool value) { ___sentConnectionEnd_14 = value; } inline static int32_t get_offset_of_protocolNegotiated_15() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___protocolNegotiated_15)); } inline bool get_protocolNegotiated_15() const { return ___protocolNegotiated_15; } inline bool* get_address_of_protocolNegotiated_15() { return &___protocolNegotiated_15; } inline void set_protocolNegotiated_15(bool value) { ___protocolNegotiated_15 = value; } inline static int32_t get_offset_of_writeSequenceNumber_16() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___writeSequenceNumber_16)); } inline uint64_t get_writeSequenceNumber_16() const { return ___writeSequenceNumber_16; } inline uint64_t* get_address_of_writeSequenceNumber_16() { return &___writeSequenceNumber_16; } inline void set_writeSequenceNumber_16(uint64_t value) { ___writeSequenceNumber_16 = value; } inline static int32_t get_offset_of_readSequenceNumber_17() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___readSequenceNumber_17)); } inline uint64_t get_readSequenceNumber_17() const { return ___readSequenceNumber_17; } inline uint64_t* get_address_of_readSequenceNumber_17() { return &___readSequenceNumber_17; } inline void set_readSequenceNumber_17(uint64_t value) { ___readSequenceNumber_17 = value; } inline static int32_t get_offset_of_clientRandom_18() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___clientRandom_18)); } inline ByteU5BU5D_t3983351780* get_clientRandom_18() const { return ___clientRandom_18; } inline ByteU5BU5D_t3983351780** get_address_of_clientRandom_18() { return &___clientRandom_18; } inline void set_clientRandom_18(ByteU5BU5D_t3983351780* value) { ___clientRandom_18 = value; Il2CppCodeGenWriteBarrier((&___clientRandom_18), value); } inline static int32_t get_offset_of_serverRandom_19() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___serverRandom_19)); } inline ByteU5BU5D_t3983351780* get_serverRandom_19() const { return ___serverRandom_19; } inline ByteU5BU5D_t3983351780** get_address_of_serverRandom_19() { return &___serverRandom_19; } inline void set_serverRandom_19(ByteU5BU5D_t3983351780* value) { ___serverRandom_19 = value; Il2CppCodeGenWriteBarrier((&___serverRandom_19), value); } inline static int32_t get_offset_of_randomCS_20() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___randomCS_20)); } inline ByteU5BU5D_t3983351780* get_randomCS_20() const { return ___randomCS_20; } inline ByteU5BU5D_t3983351780** get_address_of_randomCS_20() { return &___randomCS_20; } inline void set_randomCS_20(ByteU5BU5D_t3983351780* value) { ___randomCS_20 = value; Il2CppCodeGenWriteBarrier((&___randomCS_20), value); } inline static int32_t get_offset_of_randomSC_21() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___randomSC_21)); } inline ByteU5BU5D_t3983351780* get_randomSC_21() const { return ___randomSC_21; } inline ByteU5BU5D_t3983351780** get_address_of_randomSC_21() { return &___randomSC_21; } inline void set_randomSC_21(ByteU5BU5D_t3983351780* value) { ___randomSC_21 = value; Il2CppCodeGenWriteBarrier((&___randomSC_21), value); } inline static int32_t get_offset_of_masterSecret_22() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___masterSecret_22)); } inline ByteU5BU5D_t3983351780* get_masterSecret_22() const { return ___masterSecret_22; } inline ByteU5BU5D_t3983351780** get_address_of_masterSecret_22() { return &___masterSecret_22; } inline void set_masterSecret_22(ByteU5BU5D_t3983351780* value) { ___masterSecret_22 = value; Il2CppCodeGenWriteBarrier((&___masterSecret_22), value); } inline static int32_t get_offset_of_clientWriteKey_23() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___clientWriteKey_23)); } inline ByteU5BU5D_t3983351780* get_clientWriteKey_23() const { return ___clientWriteKey_23; } inline ByteU5BU5D_t3983351780** get_address_of_clientWriteKey_23() { return &___clientWriteKey_23; } inline void set_clientWriteKey_23(ByteU5BU5D_t3983351780* value) { ___clientWriteKey_23 = value; Il2CppCodeGenWriteBarrier((&___clientWriteKey_23), value); } inline static int32_t get_offset_of_serverWriteKey_24() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___serverWriteKey_24)); } inline ByteU5BU5D_t3983351780* get_serverWriteKey_24() const { return ___serverWriteKey_24; } inline ByteU5BU5D_t3983351780** get_address_of_serverWriteKey_24() { return &___serverWriteKey_24; } inline void set_serverWriteKey_24(ByteU5BU5D_t3983351780* value) { ___serverWriteKey_24 = value; Il2CppCodeGenWriteBarrier((&___serverWriteKey_24), value); } inline static int32_t get_offset_of_clientWriteIV_25() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___clientWriteIV_25)); } inline ByteU5BU5D_t3983351780* get_clientWriteIV_25() const { return ___clientWriteIV_25; } inline ByteU5BU5D_t3983351780** get_address_of_clientWriteIV_25() { return &___clientWriteIV_25; } inline void set_clientWriteIV_25(ByteU5BU5D_t3983351780* value) { ___clientWriteIV_25 = value; Il2CppCodeGenWriteBarrier((&___clientWriteIV_25), value); } inline static int32_t get_offset_of_serverWriteIV_26() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___serverWriteIV_26)); } inline ByteU5BU5D_t3983351780* get_serverWriteIV_26() const { return ___serverWriteIV_26; } inline ByteU5BU5D_t3983351780** get_address_of_serverWriteIV_26() { return &___serverWriteIV_26; } inline void set_serverWriteIV_26(ByteU5BU5D_t3983351780* value) { ___serverWriteIV_26 = value; Il2CppCodeGenWriteBarrier((&___serverWriteIV_26), value); } inline static int32_t get_offset_of_handshakeMessages_27() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___handshakeMessages_27)); } inline TlsStream_t1307068231 * get_handshakeMessages_27() const { return ___handshakeMessages_27; } inline TlsStream_t1307068231 ** get_address_of_handshakeMessages_27() { return &___handshakeMessages_27; } inline void set_handshakeMessages_27(TlsStream_t1307068231 * value) { ___handshakeMessages_27 = value; Il2CppCodeGenWriteBarrier((&___handshakeMessages_27), value); } inline static int32_t get_offset_of_random_28() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___random_28)); } inline RandomNumberGenerator_t2386858178 * get_random_28() const { return ___random_28; } inline RandomNumberGenerator_t2386858178 ** get_address_of_random_28() { return &___random_28; } inline void set_random_28(RandomNumberGenerator_t2386858178 * value) { ___random_28 = value; Il2CppCodeGenWriteBarrier((&___random_28), value); } inline static int32_t get_offset_of_recordProtocol_29() { return static_cast<int32_t>(offsetof(Context_t4280724427, ___recordProtocol_29)); } inline RecordProtocol_t164207684 * get_recordProtocol_29() const { return ___recordProtocol_29; } inline RecordProtocol_t164207684 ** get_address_of_recordProtocol_29() { return &___recordProtocol_29; } inline void set_recordProtocol_29(RecordProtocol_t164207684 * value) { ___recordProtocol_29 = value; Il2CppCodeGenWriteBarrier((&___recordProtocol_29), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONTEXT_T4280724427_H #ifndef CIPHERSUITECOLLECTION_T2392215148_H #define CIPHERSUITECOLLECTION_T2392215148_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.CipherSuiteCollection struct CipherSuiteCollection_t2392215148 : public RuntimeObject { public: // System.Collections.ArrayList Mono.Security.Protocol.Tls.CipherSuiteCollection::cipherSuites ArrayList_t2987363682 * ___cipherSuites_0; // Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.CipherSuiteCollection::protocol int32_t ___protocol_1; public: inline static int32_t get_offset_of_cipherSuites_0() { return static_cast<int32_t>(offsetof(CipherSuiteCollection_t2392215148, ___cipherSuites_0)); } inline ArrayList_t2987363682 * get_cipherSuites_0() const { return ___cipherSuites_0; } inline ArrayList_t2987363682 ** get_address_of_cipherSuites_0() { return &___cipherSuites_0; } inline void set_cipherSuites_0(ArrayList_t2987363682 * value) { ___cipherSuites_0 = value; Il2CppCodeGenWriteBarrier((&___cipherSuites_0), value); } inline static int32_t get_offset_of_protocol_1() { return static_cast<int32_t>(offsetof(CipherSuiteCollection_t2392215148, ___protocol_1)); } inline int32_t get_protocol_1() const { return ___protocol_1; } inline int32_t* get_address_of_protocol_1() { return &___protocol_1; } inline void set_protocol_1(int32_t value) { ___protocol_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CIPHERSUITECOLLECTION_T2392215148_H #ifndef CIPHERSUITE_T4022274145_H #define CIPHERSUITE_T4022274145_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.CipherSuite struct CipherSuite_t4022274145 : public RuntimeObject { public: // System.Int16 Mono.Security.Protocol.Tls.CipherSuite::code int16_t ___code_1; // System.String Mono.Security.Protocol.Tls.CipherSuite::name String_t* ___name_2; // Mono.Security.Protocol.Tls.CipherAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::cipherAlgorithmType int32_t ___cipherAlgorithmType_3; // Mono.Security.Protocol.Tls.HashAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::hashAlgorithmType int32_t ___hashAlgorithmType_4; // Mono.Security.Protocol.Tls.ExchangeAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::exchangeAlgorithmType int32_t ___exchangeAlgorithmType_5; // System.Boolean Mono.Security.Protocol.Tls.CipherSuite::isExportable bool ___isExportable_6; // System.Security.Cryptography.CipherMode Mono.Security.Protocol.Tls.CipherSuite::cipherMode int32_t ___cipherMode_7; // System.Byte Mono.Security.Protocol.Tls.CipherSuite::keyMaterialSize uint8_t ___keyMaterialSize_8; // System.Int32 Mono.Security.Protocol.Tls.CipherSuite::keyBlockSize int32_t ___keyBlockSize_9; // System.Byte Mono.Security.Protocol.Tls.CipherSuite::expandedKeyMaterialSize uint8_t ___expandedKeyMaterialSize_10; // System.Int16 Mono.Security.Protocol.Tls.CipherSuite::effectiveKeyBits int16_t ___effectiveKeyBits_11; // System.Byte Mono.Security.Protocol.Tls.CipherSuite::ivSize uint8_t ___ivSize_12; // System.Byte Mono.Security.Protocol.Tls.CipherSuite::blockSize uint8_t ___blockSize_13; // Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.CipherSuite::context Context_t4280724427 * ___context_14; // System.Security.Cryptography.SymmetricAlgorithm Mono.Security.Protocol.Tls.CipherSuite::encryptionAlgorithm SymmetricAlgorithm_t3323307289 * ___encryptionAlgorithm_15; // System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::encryptionCipher RuntimeObject* ___encryptionCipher_16; // System.Security.Cryptography.SymmetricAlgorithm Mono.Security.Protocol.Tls.CipherSuite::decryptionAlgorithm SymmetricAlgorithm_t3323307289 * ___decryptionAlgorithm_17; // System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::decryptionCipher RuntimeObject* ___decryptionCipher_18; // System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::clientHMAC KeyedHashAlgorithm_t3693065389 * ___clientHMAC_19; // System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::serverHMAC KeyedHashAlgorithm_t3693065389 * ___serverHMAC_20; public: inline static int32_t get_offset_of_code_1() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___code_1)); } inline int16_t get_code_1() const { return ___code_1; } inline int16_t* get_address_of_code_1() { return &___code_1; } inline void set_code_1(int16_t value) { ___code_1 = value; } inline static int32_t get_offset_of_name_2() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___name_2)); } inline String_t* get_name_2() const { return ___name_2; } inline String_t** get_address_of_name_2() { return &___name_2; } inline void set_name_2(String_t* value) { ___name_2 = value; Il2CppCodeGenWriteBarrier((&___name_2), value); } inline static int32_t get_offset_of_cipherAlgorithmType_3() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___cipherAlgorithmType_3)); } inline int32_t get_cipherAlgorithmType_3() const { return ___cipherAlgorithmType_3; } inline int32_t* get_address_of_cipherAlgorithmType_3() { return &___cipherAlgorithmType_3; } inline void set_cipherAlgorithmType_3(int32_t value) { ___cipherAlgorithmType_3 = value; } inline static int32_t get_offset_of_hashAlgorithmType_4() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___hashAlgorithmType_4)); } inline int32_t get_hashAlgorithmType_4() const { return ___hashAlgorithmType_4; } inline int32_t* get_address_of_hashAlgorithmType_4() { return &___hashAlgorithmType_4; } inline void set_hashAlgorithmType_4(int32_t value) { ___hashAlgorithmType_4 = value; } inline static int32_t get_offset_of_exchangeAlgorithmType_5() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___exchangeAlgorithmType_5)); } inline int32_t get_exchangeAlgorithmType_5() const { return ___exchangeAlgorithmType_5; } inline int32_t* get_address_of_exchangeAlgorithmType_5() { return &___exchangeAlgorithmType_5; } inline void set_exchangeAlgorithmType_5(int32_t value) { ___exchangeAlgorithmType_5 = value; } inline static int32_t get_offset_of_isExportable_6() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___isExportable_6)); } inline bool get_isExportable_6() const { return ___isExportable_6; } inline bool* get_address_of_isExportable_6() { return &___isExportable_6; } inline void set_isExportable_6(bool value) { ___isExportable_6 = value; } inline static int32_t get_offset_of_cipherMode_7() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___cipherMode_7)); } inline int32_t get_cipherMode_7() const { return ___cipherMode_7; } inline int32_t* get_address_of_cipherMode_7() { return &___cipherMode_7; } inline void set_cipherMode_7(int32_t value) { ___cipherMode_7 = value; } inline static int32_t get_offset_of_keyMaterialSize_8() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___keyMaterialSize_8)); } inline uint8_t get_keyMaterialSize_8() const { return ___keyMaterialSize_8; } inline uint8_t* get_address_of_keyMaterialSize_8() { return &___keyMaterialSize_8; } inline void set_keyMaterialSize_8(uint8_t value) { ___keyMaterialSize_8 = value; } inline static int32_t get_offset_of_keyBlockSize_9() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___keyBlockSize_9)); } inline int32_t get_keyBlockSize_9() const { return ___keyBlockSize_9; } inline int32_t* get_address_of_keyBlockSize_9() { return &___keyBlockSize_9; } inline void set_keyBlockSize_9(int32_t value) { ___keyBlockSize_9 = value; } inline static int32_t get_offset_of_expandedKeyMaterialSize_10() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___expandedKeyMaterialSize_10)); } inline uint8_t get_expandedKeyMaterialSize_10() const { return ___expandedKeyMaterialSize_10; } inline uint8_t* get_address_of_expandedKeyMaterialSize_10() { return &___expandedKeyMaterialSize_10; } inline void set_expandedKeyMaterialSize_10(uint8_t value) { ___expandedKeyMaterialSize_10 = value; } inline static int32_t get_offset_of_effectiveKeyBits_11() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___effectiveKeyBits_11)); } inline int16_t get_effectiveKeyBits_11() const { return ___effectiveKeyBits_11; } inline int16_t* get_address_of_effectiveKeyBits_11() { return &___effectiveKeyBits_11; } inline void set_effectiveKeyBits_11(int16_t value) { ___effectiveKeyBits_11 = value; } inline static int32_t get_offset_of_ivSize_12() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___ivSize_12)); } inline uint8_t get_ivSize_12() const { return ___ivSize_12; } inline uint8_t* get_address_of_ivSize_12() { return &___ivSize_12; } inline void set_ivSize_12(uint8_t value) { ___ivSize_12 = value; } inline static int32_t get_offset_of_blockSize_13() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___blockSize_13)); } inline uint8_t get_blockSize_13() const { return ___blockSize_13; } inline uint8_t* get_address_of_blockSize_13() { return &___blockSize_13; } inline void set_blockSize_13(uint8_t value) { ___blockSize_13 = value; } inline static int32_t get_offset_of_context_14() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___context_14)); } inline Context_t4280724427 * get_context_14() const { return ___context_14; } inline Context_t4280724427 ** get_address_of_context_14() { return &___context_14; } inline void set_context_14(Context_t4280724427 * value) { ___context_14 = value; Il2CppCodeGenWriteBarrier((&___context_14), value); } inline static int32_t get_offset_of_encryptionAlgorithm_15() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___encryptionAlgorithm_15)); } inline SymmetricAlgorithm_t3323307289 * get_encryptionAlgorithm_15() const { return ___encryptionAlgorithm_15; } inline SymmetricAlgorithm_t3323307289 ** get_address_of_encryptionAlgorithm_15() { return &___encryptionAlgorithm_15; } inline void set_encryptionAlgorithm_15(SymmetricAlgorithm_t3323307289 * value) { ___encryptionAlgorithm_15 = value; Il2CppCodeGenWriteBarrier((&___encryptionAlgorithm_15), value); } inline static int32_t get_offset_of_encryptionCipher_16() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___encryptionCipher_16)); } inline RuntimeObject* get_encryptionCipher_16() const { return ___encryptionCipher_16; } inline RuntimeObject** get_address_of_encryptionCipher_16() { return &___encryptionCipher_16; } inline void set_encryptionCipher_16(RuntimeObject* value) { ___encryptionCipher_16 = value; Il2CppCodeGenWriteBarrier((&___encryptionCipher_16), value); } inline static int32_t get_offset_of_decryptionAlgorithm_17() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___decryptionAlgorithm_17)); } inline SymmetricAlgorithm_t3323307289 * get_decryptionAlgorithm_17() const { return ___decryptionAlgorithm_17; } inline SymmetricAlgorithm_t3323307289 ** get_address_of_decryptionAlgorithm_17() { return &___decryptionAlgorithm_17; } inline void set_decryptionAlgorithm_17(SymmetricAlgorithm_t3323307289 * value) { ___decryptionAlgorithm_17 = value; Il2CppCodeGenWriteBarrier((&___decryptionAlgorithm_17), value); } inline static int32_t get_offset_of_decryptionCipher_18() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___decryptionCipher_18)); } inline RuntimeObject* get_decryptionCipher_18() const { return ___decryptionCipher_18; } inline RuntimeObject** get_address_of_decryptionCipher_18() { return &___decryptionCipher_18; } inline void set_decryptionCipher_18(RuntimeObject* value) { ___decryptionCipher_18 = value; Il2CppCodeGenWriteBarrier((&___decryptionCipher_18), value); } inline static int32_t get_offset_of_clientHMAC_19() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___clientHMAC_19)); } inline KeyedHashAlgorithm_t3693065389 * get_clientHMAC_19() const { return ___clientHMAC_19; } inline KeyedHashAlgorithm_t3693065389 ** get_address_of_clientHMAC_19() { return &___clientHMAC_19; } inline void set_clientHMAC_19(KeyedHashAlgorithm_t3693065389 * value) { ___clientHMAC_19 = value; Il2CppCodeGenWriteBarrier((&___clientHMAC_19), value); } inline static int32_t get_offset_of_serverHMAC_20() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145, ___serverHMAC_20)); } inline KeyedHashAlgorithm_t3693065389 * get_serverHMAC_20() const { return ___serverHMAC_20; } inline KeyedHashAlgorithm_t3693065389 ** get_address_of_serverHMAC_20() { return &___serverHMAC_20; } inline void set_serverHMAC_20(KeyedHashAlgorithm_t3693065389 * value) { ___serverHMAC_20 = value; Il2CppCodeGenWriteBarrier((&___serverHMAC_20), value); } }; struct CipherSuite_t4022274145_StaticFields { public: // System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::EmptyArray ByteU5BU5D_t3983351780* ___EmptyArray_0; public: inline static int32_t get_offset_of_EmptyArray_0() { return static_cast<int32_t>(offsetof(CipherSuite_t4022274145_StaticFields, ___EmptyArray_0)); } inline ByteU5BU5D_t3983351780* get_EmptyArray_0() const { return ___EmptyArray_0; } inline ByteU5BU5D_t3983351780** get_address_of_EmptyArray_0() { return &___EmptyArray_0; } inline void set_EmptyArray_0(ByteU5BU5D_t3983351780* value) { ___EmptyArray_0 = value; Il2CppCodeGenWriteBarrier((&___EmptyArray_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CIPHERSUITE_T4022274145_H #ifndef ALERT_T4252074283_H #define ALERT_T4252074283_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.Alert struct Alert_t4252074283 : public RuntimeObject { public: // Mono.Security.Protocol.Tls.AlertLevel Mono.Security.Protocol.Tls.Alert::level uint8_t ___level_0; // Mono.Security.Protocol.Tls.AlertDescription Mono.Security.Protocol.Tls.Alert::description uint8_t ___description_1; public: inline static int32_t get_offset_of_level_0() { return static_cast<int32_t>(offsetof(Alert_t4252074283, ___level_0)); } inline uint8_t get_level_0() const { return ___level_0; } inline uint8_t* get_address_of_level_0() { return &___level_0; } inline void set_level_0(uint8_t value) { ___level_0 = value; } inline static int32_t get_offset_of_description_1() { return static_cast<int32_t>(offsetof(Alert_t4252074283, ___description_1)); } inline uint8_t get_description_1() const { return ___description_1; } inline uint8_t* get_address_of_description_1() { return &___description_1; } inline void set_description_1(uint8_t value) { ___description_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ALERT_T4252074283_H #ifndef SYMMETRICALGORITHM_T3323307289_H #define SYMMETRICALGORITHM_T3323307289_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Security.Cryptography.SymmetricAlgorithm struct SymmetricAlgorithm_t3323307289 : public RuntimeObject { public: // System.Int32 System.Security.Cryptography.SymmetricAlgorithm::BlockSizeValue int32_t ___BlockSizeValue_0; // System.Byte[] System.Security.Cryptography.SymmetricAlgorithm::IVValue ByteU5BU5D_t3983351780* ___IVValue_1; // System.Int32 System.Security.Cryptography.SymmetricAlgorithm::KeySizeValue int32_t ___KeySizeValue_2; // System.Byte[] System.Security.Cryptography.SymmetricAlgorithm::KeyValue ByteU5BU5D_t3983351780* ___KeyValue_3; // System.Security.Cryptography.KeySizes[] System.Security.Cryptography.SymmetricAlgorithm::LegalBlockSizesValue KeySizesU5BU5D_t213991305* ___LegalBlockSizesValue_4; // System.Security.Cryptography.KeySizes[] System.Security.Cryptography.SymmetricAlgorithm::LegalKeySizesValue KeySizesU5BU5D_t213991305* ___LegalKeySizesValue_5; // System.Int32 System.Security.Cryptography.SymmetricAlgorithm::FeedbackSizeValue int32_t ___FeedbackSizeValue_6; // System.Security.Cryptography.CipherMode System.Security.Cryptography.SymmetricAlgorithm::ModeValue int32_t ___ModeValue_7; // System.Security.Cryptography.PaddingMode System.Security.Cryptography.SymmetricAlgorithm::PaddingValue int32_t ___PaddingValue_8; // System.Boolean System.Security.Cryptography.SymmetricAlgorithm::m_disposed bool ___m_disposed_9; public: inline static int32_t get_offset_of_BlockSizeValue_0() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___BlockSizeValue_0)); } inline int32_t get_BlockSizeValue_0() const { return ___BlockSizeValue_0; } inline int32_t* get_address_of_BlockSizeValue_0() { return &___BlockSizeValue_0; } inline void set_BlockSizeValue_0(int32_t value) { ___BlockSizeValue_0 = value; } inline static int32_t get_offset_of_IVValue_1() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___IVValue_1)); } inline ByteU5BU5D_t3983351780* get_IVValue_1() const { return ___IVValue_1; } inline ByteU5BU5D_t3983351780** get_address_of_IVValue_1() { return &___IVValue_1; } inline void set_IVValue_1(ByteU5BU5D_t3983351780* value) { ___IVValue_1 = value; Il2CppCodeGenWriteBarrier((&___IVValue_1), value); } inline static int32_t get_offset_of_KeySizeValue_2() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___KeySizeValue_2)); } inline int32_t get_KeySizeValue_2() const { return ___KeySizeValue_2; } inline int32_t* get_address_of_KeySizeValue_2() { return &___KeySizeValue_2; } inline void set_KeySizeValue_2(int32_t value) { ___KeySizeValue_2 = value; } inline static int32_t get_offset_of_KeyValue_3() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___KeyValue_3)); } inline ByteU5BU5D_t3983351780* get_KeyValue_3() const { return ___KeyValue_3; } inline ByteU5BU5D_t3983351780** get_address_of_KeyValue_3() { return &___KeyValue_3; } inline void set_KeyValue_3(ByteU5BU5D_t3983351780* value) { ___KeyValue_3 = value; Il2CppCodeGenWriteBarrier((&___KeyValue_3), value); } inline static int32_t get_offset_of_LegalBlockSizesValue_4() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___LegalBlockSizesValue_4)); } inline KeySizesU5BU5D_t213991305* get_LegalBlockSizesValue_4() const { return ___LegalBlockSizesValue_4; } inline KeySizesU5BU5D_t213991305** get_address_of_LegalBlockSizesValue_4() { return &___LegalBlockSizesValue_4; } inline void set_LegalBlockSizesValue_4(KeySizesU5BU5D_t213991305* value) { ___LegalBlockSizesValue_4 = value; Il2CppCodeGenWriteBarrier((&___LegalBlockSizesValue_4), value); } inline static int32_t get_offset_of_LegalKeySizesValue_5() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___LegalKeySizesValue_5)); } inline KeySizesU5BU5D_t213991305* get_LegalKeySizesValue_5() const { return ___LegalKeySizesValue_5; } inline KeySizesU5BU5D_t213991305** get_address_of_LegalKeySizesValue_5() { return &___LegalKeySizesValue_5; } inline void set_LegalKeySizesValue_5(KeySizesU5BU5D_t213991305* value) { ___LegalKeySizesValue_5 = value; Il2CppCodeGenWriteBarrier((&___LegalKeySizesValue_5), value); } inline static int32_t get_offset_of_FeedbackSizeValue_6() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___FeedbackSizeValue_6)); } inline int32_t get_FeedbackSizeValue_6() const { return ___FeedbackSizeValue_6; } inline int32_t* get_address_of_FeedbackSizeValue_6() { return &___FeedbackSizeValue_6; } inline void set_FeedbackSizeValue_6(int32_t value) { ___FeedbackSizeValue_6 = value; } inline static int32_t get_offset_of_ModeValue_7() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___ModeValue_7)); } inline int32_t get_ModeValue_7() const { return ___ModeValue_7; } inline int32_t* get_address_of_ModeValue_7() { return &___ModeValue_7; } inline void set_ModeValue_7(int32_t value) { ___ModeValue_7 = value; } inline static int32_t get_offset_of_PaddingValue_8() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___PaddingValue_8)); } inline int32_t get_PaddingValue_8() const { return ___PaddingValue_8; } inline int32_t* get_address_of_PaddingValue_8() { return &___PaddingValue_8; } inline void set_PaddingValue_8(int32_t value) { ___PaddingValue_8 = value; } inline static int32_t get_offset_of_m_disposed_9() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t3323307289, ___m_disposed_9)); } inline bool get_m_disposed_9() const { return ___m_disposed_9; } inline bool* get_address_of_m_disposed_9() { return &___m_disposed_9; } inline void set_m_disposed_9(bool value) { ___m_disposed_9 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SYMMETRICALGORITHM_T3323307289_H #ifndef CLIENTCONTEXT_T1958133647_H #define CLIENTCONTEXT_T1958133647_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ClientContext struct ClientContext_t1958133647 : public Context_t4280724427 { public: // Mono.Security.Protocol.Tls.SslClientStream Mono.Security.Protocol.Tls.ClientContext::sslStream SslClientStream_t4073644265 * ___sslStream_30; // System.Int16 Mono.Security.Protocol.Tls.ClientContext::clientHelloProtocol int16_t ___clientHelloProtocol_31; public: inline static int32_t get_offset_of_sslStream_30() { return static_cast<int32_t>(offsetof(ClientContext_t1958133647, ___sslStream_30)); } inline SslClientStream_t4073644265 * get_sslStream_30() const { return ___sslStream_30; } inline SslClientStream_t4073644265 ** get_address_of_sslStream_30() { return &___sslStream_30; } inline void set_sslStream_30(SslClientStream_t4073644265 * value) { ___sslStream_30 = value; Il2CppCodeGenWriteBarrier((&___sslStream_30), value); } inline static int32_t get_offset_of_clientHelloProtocol_31() { return static_cast<int32_t>(offsetof(ClientContext_t1958133647, ___clientHelloProtocol_31)); } inline int16_t get_clientHelloProtocol_31() const { return ___clientHelloProtocol_31; } inline int16_t* get_address_of_clientHelloProtocol_31() { return &___clientHelloProtocol_31; } inline void set_clientHelloProtocol_31(int16_t value) { ___clientHelloProtocol_31 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CLIENTCONTEXT_T1958133647_H #ifndef SSLCIPHERSUITE_T2568515028_H #define SSLCIPHERSUITE_T2568515028_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.SslCipherSuite struct SslCipherSuite_t2568515028 : public CipherSuite_t4022274145 { public: // System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::pad1 ByteU5BU5D_t3983351780* ___pad1_21; // System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::pad2 ByteU5BU5D_t3983351780* ___pad2_22; // System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::header ByteU5BU5D_t3983351780* ___header_23; public: inline static int32_t get_offset_of_pad1_21() { return static_cast<int32_t>(offsetof(SslCipherSuite_t2568515028, ___pad1_21)); } inline ByteU5BU5D_t3983351780* get_pad1_21() const { return ___pad1_21; } inline ByteU5BU5D_t3983351780** get_address_of_pad1_21() { return &___pad1_21; } inline void set_pad1_21(ByteU5BU5D_t3983351780* value) { ___pad1_21 = value; Il2CppCodeGenWriteBarrier((&___pad1_21), value); } inline static int32_t get_offset_of_pad2_22() { return static_cast<int32_t>(offsetof(SslCipherSuite_t2568515028, ___pad2_22)); } inline ByteU5BU5D_t3983351780* get_pad2_22() const { return ___pad2_22; } inline ByteU5BU5D_t3983351780** get_address_of_pad2_22() { return &___pad2_22; } inline void set_pad2_22(ByteU5BU5D_t3983351780* value) { ___pad2_22 = value; Il2CppCodeGenWriteBarrier((&___pad2_22), value); } inline static int32_t get_offset_of_header_23() { return static_cast<int32_t>(offsetof(SslCipherSuite_t2568515028, ___header_23)); } inline ByteU5BU5D_t3983351780* get_header_23() const { return ___header_23; } inline ByteU5BU5D_t3983351780** get_address_of_header_23() { return &___header_23; } inline void set_header_23(ByteU5BU5D_t3983351780* value) { ___header_23 = value; Il2CppCodeGenWriteBarrier((&___header_23), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SSLCIPHERSUITE_T2568515028_H #ifndef HTTPSCLIENTSTREAM_T3409005790_H #define HTTPSCLIENTSTREAM_T3409005790_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.HttpsClientStream struct HttpsClientStream_t3409005790 : public SslClientStream_t4073644265 { public: // System.Net.HttpWebRequest Mono.Security.Protocol.Tls.HttpsClientStream::_request HttpWebRequest_t1320998880 * ____request_20; // System.Int32 Mono.Security.Protocol.Tls.HttpsClientStream::_status int32_t ____status_21; public: inline static int32_t get_offset_of__request_20() { return static_cast<int32_t>(offsetof(HttpsClientStream_t3409005790, ____request_20)); } inline HttpWebRequest_t1320998880 * get__request_20() const { return ____request_20; } inline HttpWebRequest_t1320998880 ** get_address_of__request_20() { return &____request_20; } inline void set__request_20(HttpWebRequest_t1320998880 * value) { ____request_20 = value; Il2CppCodeGenWriteBarrier((&____request_20), value); } inline static int32_t get_offset_of__status_21() { return static_cast<int32_t>(offsetof(HttpsClientStream_t3409005790, ____status_21)); } inline int32_t get__status_21() const { return ____status_21; } inline int32_t* get_address_of__status_21() { return &____status_21; } inline void set__status_21(int32_t value) { ____status_21 = value; } }; struct HttpsClientStream_t3409005790_StaticFields { public: // Mono.Security.Protocol.Tls.CertificateSelectionCallback Mono.Security.Protocol.Tls.HttpsClientStream::<>f__am$cache2 CertificateSelectionCallback_t2372005106 * ___U3CU3Ef__amU24cache2_22; // Mono.Security.Protocol.Tls.PrivateKeySelectionCallback Mono.Security.Protocol.Tls.HttpsClientStream::<>f__am$cache3 PrivateKeySelectionCallback_t2707405579 * ___U3CU3Ef__amU24cache3_23; public: inline static int32_t get_offset_of_U3CU3Ef__amU24cache2_22() { return static_cast<int32_t>(offsetof(HttpsClientStream_t3409005790_StaticFields, ___U3CU3Ef__amU24cache2_22)); } inline CertificateSelectionCallback_t2372005106 * get_U3CU3Ef__amU24cache2_22() const { return ___U3CU3Ef__amU24cache2_22; } inline CertificateSelectionCallback_t2372005106 ** get_address_of_U3CU3Ef__amU24cache2_22() { return &___U3CU3Ef__amU24cache2_22; } inline void set_U3CU3Ef__amU24cache2_22(CertificateSelectionCallback_t2372005106 * value) { ___U3CU3Ef__amU24cache2_22 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cache2_22), value); } inline static int32_t get_offset_of_U3CU3Ef__amU24cache3_23() { return static_cast<int32_t>(offsetof(HttpsClientStream_t3409005790_StaticFields, ___U3CU3Ef__amU24cache3_23)); } inline PrivateKeySelectionCallback_t2707405579 * get_U3CU3Ef__amU24cache3_23() const { return ___U3CU3Ef__amU24cache3_23; } inline PrivateKeySelectionCallback_t2707405579 ** get_address_of_U3CU3Ef__amU24cache3_23() { return &___U3CU3Ef__amU24cache3_23; } inline void set_U3CU3Ef__amU24cache3_23(PrivateKeySelectionCallback_t2707405579 * value) { ___U3CU3Ef__amU24cache3_23 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cache3_23), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // HTTPSCLIENTSTREAM_T3409005790_H #ifndef X509CRLENTRY_T461759901_H #define X509CRLENTRY_T461759901_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Crl/X509CrlEntry struct X509CrlEntry_t461759901 : public RuntimeObject { public: // System.Byte[] Mono.Security.X509.X509Crl/X509CrlEntry::sn ByteU5BU5D_t3983351780* ___sn_0; // System.DateTime Mono.Security.X509.X509Crl/X509CrlEntry::revocationDate DateTime_t1864329490 ___revocationDate_1; // Mono.Security.X509.X509ExtensionCollection Mono.Security.X509.X509Crl/X509CrlEntry::extensions X509ExtensionCollection_t1845307619 * ___extensions_2; public: inline static int32_t get_offset_of_sn_0() { return static_cast<int32_t>(offsetof(X509CrlEntry_t461759901, ___sn_0)); } inline ByteU5BU5D_t3983351780* get_sn_0() const { return ___sn_0; } inline ByteU5BU5D_t3983351780** get_address_of_sn_0() { return &___sn_0; } inline void set_sn_0(ByteU5BU5D_t3983351780* value) { ___sn_0 = value; Il2CppCodeGenWriteBarrier((&___sn_0), value); } inline static int32_t get_offset_of_revocationDate_1() { return static_cast<int32_t>(offsetof(X509CrlEntry_t461759901, ___revocationDate_1)); } inline DateTime_t1864329490 get_revocationDate_1() const { return ___revocationDate_1; } inline DateTime_t1864329490 * get_address_of_revocationDate_1() { return &___revocationDate_1; } inline void set_revocationDate_1(DateTime_t1864329490 value) { ___revocationDate_1 = value; } inline static int32_t get_offset_of_extensions_2() { return static_cast<int32_t>(offsetof(X509CrlEntry_t461759901, ___extensions_2)); } inline X509ExtensionCollection_t1845307619 * get_extensions_2() const { return ___extensions_2; } inline X509ExtensionCollection_t1845307619 ** get_address_of_extensions_2() { return &___extensions_2; } inline void set_extensions_2(X509ExtensionCollection_t1845307619 * value) { ___extensions_2 = value; Il2CppCodeGenWriteBarrier((&___extensions_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CRLENTRY_T461759901_H #ifndef X509CRL_T1235374381_H #define X509CRL_T1235374381_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Crl struct X509Crl_t1235374381 : public RuntimeObject { public: // System.String Mono.Security.X509.X509Crl::issuer String_t* ___issuer_0; // System.Byte Mono.Security.X509.X509Crl::version uint8_t ___version_1; // System.DateTime Mono.Security.X509.X509Crl::thisUpdate DateTime_t1864329490 ___thisUpdate_2; // System.DateTime Mono.Security.X509.X509Crl::nextUpdate DateTime_t1864329490 ___nextUpdate_3; // System.Collections.ArrayList Mono.Security.X509.X509Crl::entries ArrayList_t2987363682 * ___entries_4; // System.String Mono.Security.X509.X509Crl::signatureOID String_t* ___signatureOID_5; // System.Byte[] Mono.Security.X509.X509Crl::signature ByteU5BU5D_t3983351780* ___signature_6; // Mono.Security.X509.X509ExtensionCollection Mono.Security.X509.X509Crl::extensions X509ExtensionCollection_t1845307619 * ___extensions_7; // System.Byte[] Mono.Security.X509.X509Crl::encoded ByteU5BU5D_t3983351780* ___encoded_8; // System.Byte[] Mono.Security.X509.X509Crl::hash_value ByteU5BU5D_t3983351780* ___hash_value_9; public: inline static int32_t get_offset_of_issuer_0() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___issuer_0)); } inline String_t* get_issuer_0() const { return ___issuer_0; } inline String_t** get_address_of_issuer_0() { return &___issuer_0; } inline void set_issuer_0(String_t* value) { ___issuer_0 = value; Il2CppCodeGenWriteBarrier((&___issuer_0), value); } inline static int32_t get_offset_of_version_1() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___version_1)); } inline uint8_t get_version_1() const { return ___version_1; } inline uint8_t* get_address_of_version_1() { return &___version_1; } inline void set_version_1(uint8_t value) { ___version_1 = value; } inline static int32_t get_offset_of_thisUpdate_2() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___thisUpdate_2)); } inline DateTime_t1864329490 get_thisUpdate_2() const { return ___thisUpdate_2; } inline DateTime_t1864329490 * get_address_of_thisUpdate_2() { return &___thisUpdate_2; } inline void set_thisUpdate_2(DateTime_t1864329490 value) { ___thisUpdate_2 = value; } inline static int32_t get_offset_of_nextUpdate_3() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___nextUpdate_3)); } inline DateTime_t1864329490 get_nextUpdate_3() const { return ___nextUpdate_3; } inline DateTime_t1864329490 * get_address_of_nextUpdate_3() { return &___nextUpdate_3; } inline void set_nextUpdate_3(DateTime_t1864329490 value) { ___nextUpdate_3 = value; } inline static int32_t get_offset_of_entries_4() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___entries_4)); } inline ArrayList_t2987363682 * get_entries_4() const { return ___entries_4; } inline ArrayList_t2987363682 ** get_address_of_entries_4() { return &___entries_4; } inline void set_entries_4(ArrayList_t2987363682 * value) { ___entries_4 = value; Il2CppCodeGenWriteBarrier((&___entries_4), value); } inline static int32_t get_offset_of_signatureOID_5() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___signatureOID_5)); } inline String_t* get_signatureOID_5() const { return ___signatureOID_5; } inline String_t** get_address_of_signatureOID_5() { return &___signatureOID_5; } inline void set_signatureOID_5(String_t* value) { ___signatureOID_5 = value; Il2CppCodeGenWriteBarrier((&___signatureOID_5), value); } inline static int32_t get_offset_of_signature_6() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___signature_6)); } inline ByteU5BU5D_t3983351780* get_signature_6() const { return ___signature_6; } inline ByteU5BU5D_t3983351780** get_address_of_signature_6() { return &___signature_6; } inline void set_signature_6(ByteU5BU5D_t3983351780* value) { ___signature_6 = value; Il2CppCodeGenWriteBarrier((&___signature_6), value); } inline static int32_t get_offset_of_extensions_7() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___extensions_7)); } inline X509ExtensionCollection_t1845307619 * get_extensions_7() const { return ___extensions_7; } inline X509ExtensionCollection_t1845307619 ** get_address_of_extensions_7() { return &___extensions_7; } inline void set_extensions_7(X509ExtensionCollection_t1845307619 * value) { ___extensions_7 = value; Il2CppCodeGenWriteBarrier((&___extensions_7), value); } inline static int32_t get_offset_of_encoded_8() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___encoded_8)); } inline ByteU5BU5D_t3983351780* get_encoded_8() const { return ___encoded_8; } inline ByteU5BU5D_t3983351780** get_address_of_encoded_8() { return &___encoded_8; } inline void set_encoded_8(ByteU5BU5D_t3983351780* value) { ___encoded_8 = value; Il2CppCodeGenWriteBarrier((&___encoded_8), value); } inline static int32_t get_offset_of_hash_value_9() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381, ___hash_value_9)); } inline ByteU5BU5D_t3983351780* get_hash_value_9() const { return ___hash_value_9; } inline ByteU5BU5D_t3983351780** get_address_of_hash_value_9() { return &___hash_value_9; } inline void set_hash_value_9(ByteU5BU5D_t3983351780* value) { ___hash_value_9 = value; Il2CppCodeGenWriteBarrier((&___hash_value_9), value); } }; struct X509Crl_t1235374381_StaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Crl::<>f__switch$map13 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map13_10; public: inline static int32_t get_offset_of_U3CU3Ef__switchU24map13_10() { return static_cast<int32_t>(offsetof(X509Crl_t1235374381_StaticFields, ___U3CU3Ef__switchU24map13_10)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map13_10() const { return ___U3CU3Ef__switchU24map13_10; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map13_10() { return &___U3CU3Ef__switchU24map13_10; } inline void set_U3CU3Ef__switchU24map13_10(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map13_10 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map13_10), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CRL_T1235374381_H #ifndef RC4_T1148792191_H #define RC4_T1148792191_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.RC4 struct RC4_t1148792191 : public SymmetricAlgorithm_t3323307289 { public: public: }; struct RC4_t1148792191_StaticFields { public: // System.Security.Cryptography.KeySizes[] Mono.Security.Cryptography.RC4::s_legalBlockSizes KeySizesU5BU5D_t213991305* ___s_legalBlockSizes_10; // System.Security.Cryptography.KeySizes[] Mono.Security.Cryptography.RC4::s_legalKeySizes KeySizesU5BU5D_t213991305* ___s_legalKeySizes_11; public: inline static int32_t get_offset_of_s_legalBlockSizes_10() { return static_cast<int32_t>(offsetof(RC4_t1148792191_StaticFields, ___s_legalBlockSizes_10)); } inline KeySizesU5BU5D_t213991305* get_s_legalBlockSizes_10() const { return ___s_legalBlockSizes_10; } inline KeySizesU5BU5D_t213991305** get_address_of_s_legalBlockSizes_10() { return &___s_legalBlockSizes_10; } inline void set_s_legalBlockSizes_10(KeySizesU5BU5D_t213991305* value) { ___s_legalBlockSizes_10 = value; Il2CppCodeGenWriteBarrier((&___s_legalBlockSizes_10), value); } inline static int32_t get_offset_of_s_legalKeySizes_11() { return static_cast<int32_t>(offsetof(RC4_t1148792191_StaticFields, ___s_legalKeySizes_11)); } inline KeySizesU5BU5D_t213991305* get_s_legalKeySizes_11() const { return ___s_legalKeySizes_11; } inline KeySizesU5BU5D_t213991305** get_address_of_s_legalKeySizes_11() { return &___s_legalKeySizes_11; } inline void set_s_legalKeySizes_11(KeySizesU5BU5D_t213991305* value) { ___s_legalKeySizes_11 = value; Il2CppCodeGenWriteBarrier((&___s_legalKeySizes_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RC4_T1148792191_H #ifndef KEYGENERATEDEVENTHANDLER_T1006745161_H #define KEYGENERATEDEVENTHANDLER_T1006745161_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler struct KeyGeneratedEventHandler_t1006745161 : public MulticastDelegate_t2540754097 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KEYGENERATEDEVENTHANDLER_T1006745161_H #ifndef TLSCIPHERSUITE_T2890608342_H #define TLSCIPHERSUITE_T2890608342_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.TlsCipherSuite struct TlsCipherSuite_t2890608342 : public CipherSuite_t4022274145 { public: // System.Byte[] Mono.Security.Protocol.Tls.TlsCipherSuite::header ByteU5BU5D_t3983351780* ___header_21; // System.Object Mono.Security.Protocol.Tls.TlsCipherSuite::headerLock RuntimeObject * ___headerLock_22; public: inline static int32_t get_offset_of_header_21() { return static_cast<int32_t>(offsetof(TlsCipherSuite_t2890608342, ___header_21)); } inline ByteU5BU5D_t3983351780* get_header_21() const { return ___header_21; } inline ByteU5BU5D_t3983351780** get_address_of_header_21() { return &___header_21; } inline void set_header_21(ByteU5BU5D_t3983351780* value) { ___header_21 = value; Il2CppCodeGenWriteBarrier((&___header_21), value); } inline static int32_t get_offset_of_headerLock_22() { return static_cast<int32_t>(offsetof(TlsCipherSuite_t2890608342, ___headerLock_22)); } inline RuntimeObject * get_headerLock_22() const { return ___headerLock_22; } inline RuntimeObject ** get_address_of_headerLock_22() { return &___headerLock_22; } inline void set_headerLock_22(RuntimeObject * value) { ___headerLock_22 = value; Il2CppCodeGenWriteBarrier((&___headerLock_22), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TLSCIPHERSUITE_T2890608342_H #ifndef X509CERTIFICATE_T3614464293_H #define X509CERTIFICATE_T3614464293_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.X509.X509Certificate struct X509Certificate_t3614464293 : public RuntimeObject { public: // Mono.Security.ASN1 Mono.Security.X509.X509Certificate::decoder ASN1_t2411596682 * ___decoder_0; // System.Byte[] Mono.Security.X509.X509Certificate::m_encodedcert ByteU5BU5D_t3983351780* ___m_encodedcert_1; // System.DateTime Mono.Security.X509.X509Certificate::m_from DateTime_t1864329490 ___m_from_2; // System.DateTime Mono.Security.X509.X509Certificate::m_until DateTime_t1864329490 ___m_until_3; // Mono.Security.ASN1 Mono.Security.X509.X509Certificate::issuer ASN1_t2411596682 * ___issuer_4; // System.String Mono.Security.X509.X509Certificate::m_issuername String_t* ___m_issuername_5; // System.String Mono.Security.X509.X509Certificate::m_keyalgo String_t* ___m_keyalgo_6; // System.Byte[] Mono.Security.X509.X509Certificate::m_keyalgoparams ByteU5BU5D_t3983351780* ___m_keyalgoparams_7; // Mono.Security.ASN1 Mono.Security.X509.X509Certificate::subject ASN1_t2411596682 * ___subject_8; // System.String Mono.Security.X509.X509Certificate::m_subject String_t* ___m_subject_9; // System.Byte[] Mono.Security.X509.X509Certificate::m_publickey ByteU5BU5D_t3983351780* ___m_publickey_10; // System.Byte[] Mono.Security.X509.X509Certificate::signature ByteU5BU5D_t3983351780* ___signature_11; // System.String Mono.Security.X509.X509Certificate::m_signaturealgo String_t* ___m_signaturealgo_12; // System.Byte[] Mono.Security.X509.X509Certificate::m_signaturealgoparams ByteU5BU5D_t3983351780* ___m_signaturealgoparams_13; // System.Byte[] Mono.Security.X509.X509Certificate::certhash ByteU5BU5D_t3983351780* ___certhash_14; // System.Security.Cryptography.RSA Mono.Security.X509.X509Certificate::_rsa RSA_t1848366421 * ____rsa_15; // System.Security.Cryptography.DSA Mono.Security.X509.X509Certificate::_dsa DSA_t1103361111 * ____dsa_16; // System.Int32 Mono.Security.X509.X509Certificate::version int32_t ___version_17; // System.Byte[] Mono.Security.X509.X509Certificate::serialnumber ByteU5BU5D_t3983351780* ___serialnumber_18; // System.Byte[] Mono.Security.X509.X509Certificate::issuerUniqueID ByteU5BU5D_t3983351780* ___issuerUniqueID_19; // System.Byte[] Mono.Security.X509.X509Certificate::subjectUniqueID ByteU5BU5D_t3983351780* ___subjectUniqueID_20; // Mono.Security.X509.X509ExtensionCollection Mono.Security.X509.X509Certificate::extensions X509ExtensionCollection_t1845307619 * ___extensions_21; public: inline static int32_t get_offset_of_decoder_0() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___decoder_0)); } inline ASN1_t2411596682 * get_decoder_0() const { return ___decoder_0; } inline ASN1_t2411596682 ** get_address_of_decoder_0() { return &___decoder_0; } inline void set_decoder_0(ASN1_t2411596682 * value) { ___decoder_0 = value; Il2CppCodeGenWriteBarrier((&___decoder_0), value); } inline static int32_t get_offset_of_m_encodedcert_1() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_encodedcert_1)); } inline ByteU5BU5D_t3983351780* get_m_encodedcert_1() const { return ___m_encodedcert_1; } inline ByteU5BU5D_t3983351780** get_address_of_m_encodedcert_1() { return &___m_encodedcert_1; } inline void set_m_encodedcert_1(ByteU5BU5D_t3983351780* value) { ___m_encodedcert_1 = value; Il2CppCodeGenWriteBarrier((&___m_encodedcert_1), value); } inline static int32_t get_offset_of_m_from_2() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_from_2)); } inline DateTime_t1864329490 get_m_from_2() const { return ___m_from_2; } inline DateTime_t1864329490 * get_address_of_m_from_2() { return &___m_from_2; } inline void set_m_from_2(DateTime_t1864329490 value) { ___m_from_2 = value; } inline static int32_t get_offset_of_m_until_3() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_until_3)); } inline DateTime_t1864329490 get_m_until_3() const { return ___m_until_3; } inline DateTime_t1864329490 * get_address_of_m_until_3() { return &___m_until_3; } inline void set_m_until_3(DateTime_t1864329490 value) { ___m_until_3 = value; } inline static int32_t get_offset_of_issuer_4() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___issuer_4)); } inline ASN1_t2411596682 * get_issuer_4() const { return ___issuer_4; } inline ASN1_t2411596682 ** get_address_of_issuer_4() { return &___issuer_4; } inline void set_issuer_4(ASN1_t2411596682 * value) { ___issuer_4 = value; Il2CppCodeGenWriteBarrier((&___issuer_4), value); } inline static int32_t get_offset_of_m_issuername_5() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_issuername_5)); } inline String_t* get_m_issuername_5() const { return ___m_issuername_5; } inline String_t** get_address_of_m_issuername_5() { return &___m_issuername_5; } inline void set_m_issuername_5(String_t* value) { ___m_issuername_5 = value; Il2CppCodeGenWriteBarrier((&___m_issuername_5), value); } inline static int32_t get_offset_of_m_keyalgo_6() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_keyalgo_6)); } inline String_t* get_m_keyalgo_6() const { return ___m_keyalgo_6; } inline String_t** get_address_of_m_keyalgo_6() { return &___m_keyalgo_6; } inline void set_m_keyalgo_6(String_t* value) { ___m_keyalgo_6 = value; Il2CppCodeGenWriteBarrier((&___m_keyalgo_6), value); } inline static int32_t get_offset_of_m_keyalgoparams_7() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_keyalgoparams_7)); } inline ByteU5BU5D_t3983351780* get_m_keyalgoparams_7() const { return ___m_keyalgoparams_7; } inline ByteU5BU5D_t3983351780** get_address_of_m_keyalgoparams_7() { return &___m_keyalgoparams_7; } inline void set_m_keyalgoparams_7(ByteU5BU5D_t3983351780* value) { ___m_keyalgoparams_7 = value; Il2CppCodeGenWriteBarrier((&___m_keyalgoparams_7), value); } inline static int32_t get_offset_of_subject_8() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___subject_8)); } inline ASN1_t2411596682 * get_subject_8() const { return ___subject_8; } inline ASN1_t2411596682 ** get_address_of_subject_8() { return &___subject_8; } inline void set_subject_8(ASN1_t2411596682 * value) { ___subject_8 = value; Il2CppCodeGenWriteBarrier((&___subject_8), value); } inline static int32_t get_offset_of_m_subject_9() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_subject_9)); } inline String_t* get_m_subject_9() const { return ___m_subject_9; } inline String_t** get_address_of_m_subject_9() { return &___m_subject_9; } inline void set_m_subject_9(String_t* value) { ___m_subject_9 = value; Il2CppCodeGenWriteBarrier((&___m_subject_9), value); } inline static int32_t get_offset_of_m_publickey_10() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_publickey_10)); } inline ByteU5BU5D_t3983351780* get_m_publickey_10() const { return ___m_publickey_10; } inline ByteU5BU5D_t3983351780** get_address_of_m_publickey_10() { return &___m_publickey_10; } inline void set_m_publickey_10(ByteU5BU5D_t3983351780* value) { ___m_publickey_10 = value; Il2CppCodeGenWriteBarrier((&___m_publickey_10), value); } inline static int32_t get_offset_of_signature_11() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___signature_11)); } inline ByteU5BU5D_t3983351780* get_signature_11() const { return ___signature_11; } inline ByteU5BU5D_t3983351780** get_address_of_signature_11() { return &___signature_11; } inline void set_signature_11(ByteU5BU5D_t3983351780* value) { ___signature_11 = value; Il2CppCodeGenWriteBarrier((&___signature_11), value); } inline static int32_t get_offset_of_m_signaturealgo_12() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_signaturealgo_12)); } inline String_t* get_m_signaturealgo_12() const { return ___m_signaturealgo_12; } inline String_t** get_address_of_m_signaturealgo_12() { return &___m_signaturealgo_12; } inline void set_m_signaturealgo_12(String_t* value) { ___m_signaturealgo_12 = value; Il2CppCodeGenWriteBarrier((&___m_signaturealgo_12), value); } inline static int32_t get_offset_of_m_signaturealgoparams_13() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___m_signaturealgoparams_13)); } inline ByteU5BU5D_t3983351780* get_m_signaturealgoparams_13() const { return ___m_signaturealgoparams_13; } inline ByteU5BU5D_t3983351780** get_address_of_m_signaturealgoparams_13() { return &___m_signaturealgoparams_13; } inline void set_m_signaturealgoparams_13(ByteU5BU5D_t3983351780* value) { ___m_signaturealgoparams_13 = value; Il2CppCodeGenWriteBarrier((&___m_signaturealgoparams_13), value); } inline static int32_t get_offset_of_certhash_14() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___certhash_14)); } inline ByteU5BU5D_t3983351780* get_certhash_14() const { return ___certhash_14; } inline ByteU5BU5D_t3983351780** get_address_of_certhash_14() { return &___certhash_14; } inline void set_certhash_14(ByteU5BU5D_t3983351780* value) { ___certhash_14 = value; Il2CppCodeGenWriteBarrier((&___certhash_14), value); } inline static int32_t get_offset_of__rsa_15() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ____rsa_15)); } inline RSA_t1848366421 * get__rsa_15() const { return ____rsa_15; } inline RSA_t1848366421 ** get_address_of__rsa_15() { return &____rsa_15; } inline void set__rsa_15(RSA_t1848366421 * value) { ____rsa_15 = value; Il2CppCodeGenWriteBarrier((&____rsa_15), value); } inline static int32_t get_offset_of__dsa_16() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ____dsa_16)); } inline DSA_t1103361111 * get__dsa_16() const { return ____dsa_16; } inline DSA_t1103361111 ** get_address_of__dsa_16() { return &____dsa_16; } inline void set__dsa_16(DSA_t1103361111 * value) { ____dsa_16 = value; Il2CppCodeGenWriteBarrier((&____dsa_16), value); } inline static int32_t get_offset_of_version_17() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___version_17)); } inline int32_t get_version_17() const { return ___version_17; } inline int32_t* get_address_of_version_17() { return &___version_17; } inline void set_version_17(int32_t value) { ___version_17 = value; } inline static int32_t get_offset_of_serialnumber_18() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___serialnumber_18)); } inline ByteU5BU5D_t3983351780* get_serialnumber_18() const { return ___serialnumber_18; } inline ByteU5BU5D_t3983351780** get_address_of_serialnumber_18() { return &___serialnumber_18; } inline void set_serialnumber_18(ByteU5BU5D_t3983351780* value) { ___serialnumber_18 = value; Il2CppCodeGenWriteBarrier((&___serialnumber_18), value); } inline static int32_t get_offset_of_issuerUniqueID_19() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___issuerUniqueID_19)); } inline ByteU5BU5D_t3983351780* get_issuerUniqueID_19() const { return ___issuerUniqueID_19; } inline ByteU5BU5D_t3983351780** get_address_of_issuerUniqueID_19() { return &___issuerUniqueID_19; } inline void set_issuerUniqueID_19(ByteU5BU5D_t3983351780* value) { ___issuerUniqueID_19 = value; Il2CppCodeGenWriteBarrier((&___issuerUniqueID_19), value); } inline static int32_t get_offset_of_subjectUniqueID_20() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___subjectUniqueID_20)); } inline ByteU5BU5D_t3983351780* get_subjectUniqueID_20() const { return ___subjectUniqueID_20; } inline ByteU5BU5D_t3983351780** get_address_of_subjectUniqueID_20() { return &___subjectUniqueID_20; } inline void set_subjectUniqueID_20(ByteU5BU5D_t3983351780* value) { ___subjectUniqueID_20 = value; Il2CppCodeGenWriteBarrier((&___subjectUniqueID_20), value); } inline static int32_t get_offset_of_extensions_21() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293, ___extensions_21)); } inline X509ExtensionCollection_t1845307619 * get_extensions_21() const { return ___extensions_21; } inline X509ExtensionCollection_t1845307619 ** get_address_of_extensions_21() { return &___extensions_21; } inline void set_extensions_21(X509ExtensionCollection_t1845307619 * value) { ___extensions_21 = value; Il2CppCodeGenWriteBarrier((&___extensions_21), value); } }; struct X509Certificate_t3614464293_StaticFields { public: // System.String Mono.Security.X509.X509Certificate::encoding_error String_t* ___encoding_error_22; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$mapF Dictionary_2_t603883569 * ___U3CU3Ef__switchU24mapF_23; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$map10 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map10_24; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$map11 Dictionary_2_t603883569 * ___U3CU3Ef__switchU24map11_25; public: inline static int32_t get_offset_of_encoding_error_22() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293_StaticFields, ___encoding_error_22)); } inline String_t* get_encoding_error_22() const { return ___encoding_error_22; } inline String_t** get_address_of_encoding_error_22() { return &___encoding_error_22; } inline void set_encoding_error_22(String_t* value) { ___encoding_error_22 = value; Il2CppCodeGenWriteBarrier((&___encoding_error_22), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24mapF_23() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293_StaticFields, ___U3CU3Ef__switchU24mapF_23)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24mapF_23() const { return ___U3CU3Ef__switchU24mapF_23; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24mapF_23() { return &___U3CU3Ef__switchU24mapF_23; } inline void set_U3CU3Ef__switchU24mapF_23(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24mapF_23 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapF_23), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24map10_24() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293_StaticFields, ___U3CU3Ef__switchU24map10_24)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map10_24() const { return ___U3CU3Ef__switchU24map10_24; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map10_24() { return &___U3CU3Ef__switchU24map10_24; } inline void set_U3CU3Ef__switchU24map10_24(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map10_24 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map10_24), value); } inline static int32_t get_offset_of_U3CU3Ef__switchU24map11_25() { return static_cast<int32_t>(offsetof(X509Certificate_t3614464293_StaticFields, ___U3CU3Ef__switchU24map11_25)); } inline Dictionary_2_t603883569 * get_U3CU3Ef__switchU24map11_25() const { return ___U3CU3Ef__switchU24map11_25; } inline Dictionary_2_t603883569 ** get_address_of_U3CU3Ef__switchU24map11_25() { return &___U3CU3Ef__switchU24map11_25; } inline void set_U3CU3Ef__switchU24map11_25(Dictionary_2_t603883569 * value) { ___U3CU3Ef__switchU24map11_25 = value; Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map11_25), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // X509CERTIFICATE_T3614464293_H #ifndef SERVERCONTEXT_T4263993783_H #define SERVERCONTEXT_T4263993783_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ServerContext struct ServerContext_t4263993783 : public Context_t4280724427 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SERVERCONTEXT_T4263993783_H #ifndef CLIENTSESSIONINFO_T830906332_H #define CLIENTSESSIONINFO_T830906332_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Protocol.Tls.ClientSessionInfo struct ClientSessionInfo_t830906332 : public RuntimeObject { public: // System.Boolean Mono.Security.Protocol.Tls.ClientSessionInfo::disposed bool ___disposed_1; // System.DateTime Mono.Security.Protocol.Tls.ClientSessionInfo::validuntil DateTime_t1864329490 ___validuntil_2; // System.String Mono.Security.Protocol.Tls.ClientSessionInfo::host String_t* ___host_3; // System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::sid ByteU5BU5D_t3983351780* ___sid_4; // System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::masterSecret ByteU5BU5D_t3983351780* ___masterSecret_5; public: inline static int32_t get_offset_of_disposed_1() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332, ___disposed_1)); } inline bool get_disposed_1() const { return ___disposed_1; } inline bool* get_address_of_disposed_1() { return &___disposed_1; } inline void set_disposed_1(bool value) { ___disposed_1 = value; } inline static int32_t get_offset_of_validuntil_2() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332, ___validuntil_2)); } inline DateTime_t1864329490 get_validuntil_2() const { return ___validuntil_2; } inline DateTime_t1864329490 * get_address_of_validuntil_2() { return &___validuntil_2; } inline void set_validuntil_2(DateTime_t1864329490 value) { ___validuntil_2 = value; } inline static int32_t get_offset_of_host_3() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332, ___host_3)); } inline String_t* get_host_3() const { return ___host_3; } inline String_t** get_address_of_host_3() { return &___host_3; } inline void set_host_3(String_t* value) { ___host_3 = value; Il2CppCodeGenWriteBarrier((&___host_3), value); } inline static int32_t get_offset_of_sid_4() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332, ___sid_4)); } inline ByteU5BU5D_t3983351780* get_sid_4() const { return ___sid_4; } inline ByteU5BU5D_t3983351780** get_address_of_sid_4() { return &___sid_4; } inline void set_sid_4(ByteU5BU5D_t3983351780* value) { ___sid_4 = value; Il2CppCodeGenWriteBarrier((&___sid_4), value); } inline static int32_t get_offset_of_masterSecret_5() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332, ___masterSecret_5)); } inline ByteU5BU5D_t3983351780* get_masterSecret_5() const { return ___masterSecret_5; } inline ByteU5BU5D_t3983351780** get_address_of_masterSecret_5() { return &___masterSecret_5; } inline void set_masterSecret_5(ByteU5BU5D_t3983351780* value) { ___masterSecret_5 = value; Il2CppCodeGenWriteBarrier((&___masterSecret_5), value); } }; struct ClientSessionInfo_t830906332_StaticFields { public: // System.Int32 Mono.Security.Protocol.Tls.ClientSessionInfo::ValidityInterval int32_t ___ValidityInterval_0; public: inline static int32_t get_offset_of_ValidityInterval_0() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t830906332_StaticFields, ___ValidityInterval_0)); } inline int32_t get_ValidityInterval_0() const { return ___ValidityInterval_0; } inline int32_t* get_address_of_ValidityInterval_0() { return &___ValidityInterval_0; } inline void set_ValidityInterval_0(int32_t value) { ___ValidityInterval_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CLIENTSESSIONINFO_T830906332_H #ifndef ARC4MANAGED_T87189223_H #define ARC4MANAGED_T87189223_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Mono.Security.Cryptography.ARC4Managed struct ARC4Managed_t87189223 : public RC4_t1148792191 { public: // System.Byte[] Mono.Security.Cryptography.ARC4Managed::key ByteU5BU5D_t3983351780* ___key_12; // System.Byte[] Mono.Security.Cryptography.ARC4Managed::state ByteU5BU5D_t3983351780* ___state_13; // System.Byte Mono.Security.Cryptography.ARC4Managed::x uint8_t ___x_14; // System.Byte Mono.Security.Cryptography.ARC4Managed::y uint8_t ___y_15; // System.Boolean Mono.Security.Cryptography.ARC4Managed::m_disposed bool ___m_disposed_16; public: inline static int32_t get_offset_of_key_12() { return static_cast<int32_t>(offsetof(ARC4Managed_t87189223, ___key_12)); } inline ByteU5BU5D_t3983351780* get_key_12() const { return ___key_12; } inline ByteU5BU5D_t3983351780** get_address_of_key_12() { return &___key_12; } inline void set_key_12(ByteU5BU5D_t3983351780* value) { ___key_12 = value; Il2CppCodeGenWriteBarrier((&___key_12), value); } inline static int32_t get_offset_of_state_13() { return static_cast<int32_t>(offsetof(ARC4Managed_t87189223, ___state_13)); } inline ByteU5BU5D_t3983351780* get_state_13() const { return ___state_13; } inline ByteU5BU5D_t3983351780** get_address_of_state_13() { return &___state_13; } inline void set_state_13(ByteU5BU5D_t3983351780* value) { ___state_13 = value; Il2CppCodeGenWriteBarrier((&___state_13), value); } inline static int32_t get_offset_of_x_14() { return static_cast<int32_t>(offsetof(ARC4Managed_t87189223, ___x_14)); } inline uint8_t get_x_14() const { return ___x_14; } inline uint8_t* get_address_of_x_14() { return &___x_14; } inline void set_x_14(uint8_t value) { ___x_14 = value; } inline static int32_t get_offset_of_y_15() { return static_cast<int32_t>(offsetof(ARC4Managed_t87189223, ___y_15)); } inline uint8_t get_y_15() const { return ___y_15; } inline uint8_t* get_address_of_y_15() { return &___y_15; } inline void set_y_15(uint8_t value) { ___y_15 = value; } inline static int32_t get_offset_of_m_disposed_16() { return static_cast<int32_t>(offsetof(ARC4Managed_t87189223, ___m_disposed_16)); } inline bool get_m_disposed_16() const { return ___m_disposed_16; } inline bool* get_address_of_m_disposed_16() { return &___m_disposed_16; } inline void set_m_disposed_16(bool value) { ___m_disposed_16 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ARC4MANAGED_T87189223_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize900 = { sizeof (U24ArrayTypeU242048_t847137458)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU242048_t847137458 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize901 = { sizeof (U24ArrayTypeU24256_t3294398382)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU24256_t3294398382 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize902 = { sizeof (U24ArrayTypeU241024_t660597622)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU241024_t660597622 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize903 = { sizeof (U24ArrayTypeU24640_t3420096276)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU24640_t3420096276 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize904 = { sizeof (U24ArrayTypeU24128_t1965195622)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU24128_t1965195622 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize905 = { sizeof (U24ArrayTypeU2452_t1131239061)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU2452_t1131239061 ), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize906 = { sizeof (Il2CppComObject), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize907 = { sizeof (__Il2CppComDelegate_t3886986368), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize908 = { sizeof (U3CModuleU3E_t203241527), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize909 = { sizeof (Locale_t211907278), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize910 = { sizeof (BigInteger_t1332966298), -1, sizeof(BigInteger_t1332966298_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable910[4] = { BigInteger_t1332966298::get_offset_of_length_0(), BigInteger_t1332966298::get_offset_of_data_1(), BigInteger_t1332966298_StaticFields::get_offset_of_smallPrimes_2(), BigInteger_t1332966298_StaticFields::get_offset_of_rng_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize911 = { sizeof (Sign_t3671729870)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable911[4] = { Sign_t3671729870::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize912 = { sizeof (ModulusRing_t2165045869), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable912[2] = { ModulusRing_t2165045869::get_offset_of_mod_0(), ModulusRing_t2165045869::get_offset_of_constant_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize913 = { sizeof (Kernel_t3094601883), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize914 = { sizeof (ConfidenceFactor_t2991353669)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable914[7] = { ConfidenceFactor_t2991353669::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize915 = { sizeof (PrimalityTests_t4140779267), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize916 = { sizeof (PrimeGeneratorBase_t1522174298), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize917 = { sizeof (SequentialSearchPrimeGeneratorBase_t4242388961), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize918 = { sizeof (ASN1_t2411596682), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable918[3] = { ASN1_t2411596682::get_offset_of_m_nTag_0(), ASN1_t2411596682::get_offset_of_m_aValue_1(), ASN1_t2411596682::get_offset_of_elist_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize919 = { sizeof (ASN1Convert_t1164338662), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize920 = { sizeof (BitConverterLE_t3229726040), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize921 = { sizeof (PKCS7_t3150455721), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize922 = { sizeof (ContentInfo_t2274152496), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable922[2] = { ContentInfo_t2274152496::get_offset_of_contentType_0(), ContentInfo_t2274152496::get_offset_of_content_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize923 = { sizeof (EncryptedData_t109997108), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable923[4] = { EncryptedData_t109997108::get_offset_of__version_0(), EncryptedData_t109997108::get_offset_of__content_1(), EncryptedData_t109997108::get_offset_of__encryptionAlgorithm_2(), EncryptedData_t109997108::get_offset_of__encrypted_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize924 = { sizeof (ARC4Managed_t87189223), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable924[5] = { ARC4Managed_t87189223::get_offset_of_key_12(), ARC4Managed_t87189223::get_offset_of_state_13(), ARC4Managed_t87189223::get_offset_of_x_14(), ARC4Managed_t87189223::get_offset_of_y_15(), ARC4Managed_t87189223::get_offset_of_m_disposed_16(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize925 = { sizeof (CryptoConvert_t536819640), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize926 = { sizeof (KeyBuilder_t2993022270), -1, sizeof(KeyBuilder_t2993022270_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable926[1] = { KeyBuilder_t2993022270_StaticFields::get_offset_of_rng_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize927 = { sizeof (MD2_t3580661162), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize928 = { sizeof (MD2Managed_t3582214154), -1, sizeof(MD2Managed_t3582214154_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable928[6] = { MD2Managed_t3582214154::get_offset_of_state_4(), MD2Managed_t3582214154::get_offset_of_checksum_5(), MD2Managed_t3582214154::get_offset_of_buffer_6(), MD2Managed_t3582214154::get_offset_of_count_7(), MD2Managed_t3582214154::get_offset_of_x_8(), MD2Managed_t3582214154_StaticFields::get_offset_of_PI_SUBST_9(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize929 = { sizeof (MD4_t3793402044), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize930 = { sizeof (MD4Managed_t3759342352), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable930[5] = { MD4Managed_t3759342352::get_offset_of_state_4(), MD4Managed_t3759342352::get_offset_of_buffer_5(), MD4Managed_t3759342352::get_offset_of_count_6(), MD4Managed_t3759342352::get_offset_of_x_7(), MD4Managed_t3759342352::get_offset_of_digest_8(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize931 = { sizeof (PKCS1_t358232502), -1, sizeof(PKCS1_t358232502_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable931[4] = { PKCS1_t358232502_StaticFields::get_offset_of_emptySHA1_0(), PKCS1_t358232502_StaticFields::get_offset_of_emptySHA256_1(), PKCS1_t358232502_StaticFields::get_offset_of_emptySHA384_2(), PKCS1_t358232502_StaticFields::get_offset_of_emptySHA512_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize932 = { sizeof (PKCS8_t2522820112), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize933 = { sizeof (PrivateKeyInfo_t294917684), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable933[4] = { PrivateKeyInfo_t294917684::get_offset_of__version_0(), PrivateKeyInfo_t294917684::get_offset_of__algorithm_1(), PrivateKeyInfo_t294917684::get_offset_of__key_2(), PrivateKeyInfo_t294917684::get_offset_of__list_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize934 = { sizeof (EncryptedPrivateKeyInfo_t1479378890), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable934[4] = { EncryptedPrivateKeyInfo_t1479378890::get_offset_of__algorithm_0(), EncryptedPrivateKeyInfo_t1479378890::get_offset_of__salt_1(), EncryptedPrivateKeyInfo_t1479378890::get_offset_of__iterations_2(), EncryptedPrivateKeyInfo_t1479378890::get_offset_of__data_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize935 = { sizeof (RC4_t1148792191), -1, sizeof(RC4_t1148792191_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable935[2] = { RC4_t1148792191_StaticFields::get_offset_of_s_legalBlockSizes_10(), RC4_t1148792191_StaticFields::get_offset_of_s_legalKeySizes_11(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize936 = { sizeof (RSAManaged_t3657898182), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable936[13] = { RSAManaged_t3657898182::get_offset_of_isCRTpossible_2(), RSAManaged_t3657898182::get_offset_of_keyBlinding_3(), RSAManaged_t3657898182::get_offset_of_keypairGenerated_4(), RSAManaged_t3657898182::get_offset_of_m_disposed_5(), RSAManaged_t3657898182::get_offset_of_d_6(), RSAManaged_t3657898182::get_offset_of_p_7(), RSAManaged_t3657898182::get_offset_of_q_8(), RSAManaged_t3657898182::get_offset_of_dp_9(), RSAManaged_t3657898182::get_offset_of_dq_10(), RSAManaged_t3657898182::get_offset_of_qInv_11(), RSAManaged_t3657898182::get_offset_of_n_12(), RSAManaged_t3657898182::get_offset_of_e_13(), RSAManaged_t3657898182::get_offset_of_KeyGenerated_14(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize937 = { sizeof (KeyGeneratedEventHandler_t1006745161), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize938 = { sizeof (SafeBag_t920411420), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable938[2] = { SafeBag_t920411420::get_offset_of__bagOID_0(), SafeBag_t920411420::get_offset_of__asn1_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize939 = { sizeof (PKCS12_t1290927474), -1, sizeof(PKCS12_t1290927474_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable939[17] = { PKCS12_t1290927474_StaticFields::get_offset_of_recommendedIterationCount_0(), PKCS12_t1290927474::get_offset_of__password_1(), PKCS12_t1290927474::get_offset_of__keyBags_2(), PKCS12_t1290927474::get_offset_of__secretBags_3(), PKCS12_t1290927474::get_offset_of__certs_4(), PKCS12_t1290927474::get_offset_of__keyBagsChanged_5(), PKCS12_t1290927474::get_offset_of__secretBagsChanged_6(), PKCS12_t1290927474::get_offset_of__certsChanged_7(), PKCS12_t1290927474::get_offset_of__iterations_8(), PKCS12_t1290927474::get_offset_of__safeBags_9(), PKCS12_t1290927474::get_offset_of__rng_10(), PKCS12_t1290927474_StaticFields::get_offset_of_password_max_length_11(), PKCS12_t1290927474_StaticFields::get_offset_of_U3CU3Ef__switchU24map5_12(), PKCS12_t1290927474_StaticFields::get_offset_of_U3CU3Ef__switchU24map6_13(), PKCS12_t1290927474_StaticFields::get_offset_of_U3CU3Ef__switchU24map7_14(), PKCS12_t1290927474_StaticFields::get_offset_of_U3CU3Ef__switchU24map8_15(), PKCS12_t1290927474_StaticFields::get_offset_of_U3CU3Ef__switchU24mapC_16(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize940 = { sizeof (DeriveBytes_t1678242693), -1, sizeof(DeriveBytes_t1678242693_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable940[7] = { DeriveBytes_t1678242693_StaticFields::get_offset_of_keyDiversifier_0(), DeriveBytes_t1678242693_StaticFields::get_offset_of_ivDiversifier_1(), DeriveBytes_t1678242693_StaticFields::get_offset_of_macDiversifier_2(), DeriveBytes_t1678242693::get_offset_of__hashName_3(), DeriveBytes_t1678242693::get_offset_of__iterations_4(), DeriveBytes_t1678242693::get_offset_of__password_5(), DeriveBytes_t1678242693::get_offset_of__salt_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize941 = { sizeof (X501_t1114902004), -1, sizeof(X501_t1114902004_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable941[15] = { X501_t1114902004_StaticFields::get_offset_of_countryName_0(), X501_t1114902004_StaticFields::get_offset_of_organizationName_1(), X501_t1114902004_StaticFields::get_offset_of_organizationalUnitName_2(), X501_t1114902004_StaticFields::get_offset_of_commonName_3(), X501_t1114902004_StaticFields::get_offset_of_localityName_4(), X501_t1114902004_StaticFields::get_offset_of_stateOrProvinceName_5(), X501_t1114902004_StaticFields::get_offset_of_streetAddress_6(), X501_t1114902004_StaticFields::get_offset_of_domainComponent_7(), X501_t1114902004_StaticFields::get_offset_of_userid_8(), X501_t1114902004_StaticFields::get_offset_of_email_9(), X501_t1114902004_StaticFields::get_offset_of_dnQualifier_10(), X501_t1114902004_StaticFields::get_offset_of_title_11(), X501_t1114902004_StaticFields::get_offset_of_surname_12(), X501_t1114902004_StaticFields::get_offset_of_givenName_13(), X501_t1114902004_StaticFields::get_offset_of_initial_14(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize942 = { sizeof (X509Certificate_t3614464293), -1, sizeof(X509Certificate_t3614464293_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable942[26] = { X509Certificate_t3614464293::get_offset_of_decoder_0(), X509Certificate_t3614464293::get_offset_of_m_encodedcert_1(), X509Certificate_t3614464293::get_offset_of_m_from_2(), X509Certificate_t3614464293::get_offset_of_m_until_3(), X509Certificate_t3614464293::get_offset_of_issuer_4(), X509Certificate_t3614464293::get_offset_of_m_issuername_5(), X509Certificate_t3614464293::get_offset_of_m_keyalgo_6(), X509Certificate_t3614464293::get_offset_of_m_keyalgoparams_7(), X509Certificate_t3614464293::get_offset_of_subject_8(), X509Certificate_t3614464293::get_offset_of_m_subject_9(), X509Certificate_t3614464293::get_offset_of_m_publickey_10(), X509Certificate_t3614464293::get_offset_of_signature_11(), X509Certificate_t3614464293::get_offset_of_m_signaturealgo_12(), X509Certificate_t3614464293::get_offset_of_m_signaturealgoparams_13(), X509Certificate_t3614464293::get_offset_of_certhash_14(), X509Certificate_t3614464293::get_offset_of__rsa_15(), X509Certificate_t3614464293::get_offset_of__dsa_16(), X509Certificate_t3614464293::get_offset_of_version_17(), X509Certificate_t3614464293::get_offset_of_serialnumber_18(), X509Certificate_t3614464293::get_offset_of_issuerUniqueID_19(), X509Certificate_t3614464293::get_offset_of_subjectUniqueID_20(), X509Certificate_t3614464293::get_offset_of_extensions_21(), X509Certificate_t3614464293_StaticFields::get_offset_of_encoding_error_22(), X509Certificate_t3614464293_StaticFields::get_offset_of_U3CU3Ef__switchU24mapF_23(), X509Certificate_t3614464293_StaticFields::get_offset_of_U3CU3Ef__switchU24map10_24(), X509Certificate_t3614464293_StaticFields::get_offset_of_U3CU3Ef__switchU24map11_25(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize943 = { sizeof (X509CertificateCollection_t669936613), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize944 = { sizeof (X509CertificateEnumerator_t2159044171), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable944[1] = { X509CertificateEnumerator_t2159044171::get_offset_of_enumerator_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize945 = { sizeof (X509Chain_t917150473), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable945[5] = { X509Chain_t917150473::get_offset_of_roots_0(), X509Chain_t917150473::get_offset_of_certs_1(), X509Chain_t917150473::get_offset_of__root_2(), X509Chain_t917150473::get_offset_of__chain_3(), X509Chain_t917150473::get_offset_of__status_4(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize946 = { sizeof (X509ChainStatusFlags_t932214918)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable946[8] = { X509ChainStatusFlags_t932214918::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize947 = { sizeof (X509Crl_t1235374381), -1, sizeof(X509Crl_t1235374381_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable947[11] = { X509Crl_t1235374381::get_offset_of_issuer_0(), X509Crl_t1235374381::get_offset_of_version_1(), X509Crl_t1235374381::get_offset_of_thisUpdate_2(), X509Crl_t1235374381::get_offset_of_nextUpdate_3(), X509Crl_t1235374381::get_offset_of_entries_4(), X509Crl_t1235374381::get_offset_of_signatureOID_5(), X509Crl_t1235374381::get_offset_of_signature_6(), X509Crl_t1235374381::get_offset_of_extensions_7(), X509Crl_t1235374381::get_offset_of_encoded_8(), X509Crl_t1235374381::get_offset_of_hash_value_9(), X509Crl_t1235374381_StaticFields::get_offset_of_U3CU3Ef__switchU24map13_10(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize948 = { sizeof (X509CrlEntry_t461759901), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable948[3] = { X509CrlEntry_t461759901::get_offset_of_sn_0(), X509CrlEntry_t461759901::get_offset_of_revocationDate_1(), X509CrlEntry_t461759901::get_offset_of_extensions_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize949 = { sizeof (X509Extension_t433104161), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable949[3] = { X509Extension_t433104161::get_offset_of_extnOid_0(), X509Extension_t433104161::get_offset_of_extnCritical_1(), X509Extension_t433104161::get_offset_of_extnValue_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize950 = { sizeof (X509ExtensionCollection_t1845307619), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable950[1] = { X509ExtensionCollection_t1845307619::get_offset_of_readOnly_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize951 = { sizeof (X509Store_t3771926429), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable951[4] = { X509Store_t3771926429::get_offset_of__storePath_0(), X509Store_t3771926429::get_offset_of__certificates_1(), X509Store_t3771926429::get_offset_of__crls_2(), X509Store_t3771926429::get_offset_of__crl_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize952 = { sizeof (X509StoreManager_t3447247894), -1, sizeof(X509StoreManager_t3447247894_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable952[2] = { X509StoreManager_t3447247894_StaticFields::get_offset_of__userStore_0(), X509StoreManager_t3447247894_StaticFields::get_offset_of__machineStore_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize953 = { sizeof (X509Stores_t1247242059), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable953[2] = { X509Stores_t1247242059::get_offset_of__storePath_0(), X509Stores_t1247242059::get_offset_of__trusted_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize954 = { sizeof (AuthorityKeyIdentifierExtension_t2208413012), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable954[1] = { AuthorityKeyIdentifierExtension_t2208413012::get_offset_of_aki_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize955 = { sizeof (BasicConstraintsExtension_t762066143), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable955[2] = { BasicConstraintsExtension_t762066143::get_offset_of_cA_3(), BasicConstraintsExtension_t762066143::get_offset_of_pathLenConstraint_4(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize956 = { sizeof (ExtendedKeyUsageExtension_t2682024810), -1, sizeof(ExtendedKeyUsageExtension_t2682024810_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable956[2] = { ExtendedKeyUsageExtension_t2682024810::get_offset_of_keyPurpose_3(), ExtendedKeyUsageExtension_t2682024810_StaticFields::get_offset_of_U3CU3Ef__switchU24map14_4(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize957 = { sizeof (GeneralNames_t2881647084), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable957[5] = { GeneralNames_t2881647084::get_offset_of_rfc822Name_0(), GeneralNames_t2881647084::get_offset_of_dnsName_1(), GeneralNames_t2881647084::get_offset_of_directoryNames_2(), GeneralNames_t2881647084::get_offset_of_uris_3(), GeneralNames_t2881647084::get_offset_of_ipAddr_4(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize958 = { sizeof (KeyUsages_t3862338839)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable958[11] = { KeyUsages_t3862338839::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize959 = { sizeof (KeyUsageExtension_t882853614), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable959[1] = { KeyUsageExtension_t882853614::get_offset_of_kubits_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize960 = { sizeof (NetscapeCertTypeExtension_t3101450098), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable960[1] = { NetscapeCertTypeExtension_t3101450098::get_offset_of_ctbits_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize961 = { sizeof (CertTypes_t1628209562)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable961[8] = { CertTypes_t1628209562::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize962 = { sizeof (SubjectAltNameExtension_t167540439), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable962[1] = { SubjectAltNameExtension_t167540439::get_offset_of__names_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize963 = { sizeof (HMAC_t1446275806), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable963[4] = { HMAC_t1446275806::get_offset_of_hash_5(), HMAC_t1446275806::get_offset_of_hashing_6(), HMAC_t1446275806::get_offset_of_innerPad_7(), HMAC_t1446275806::get_offset_of_outerPad_8(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize964 = { sizeof (MD5SHA1_t1637223380), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable964[3] = { MD5SHA1_t1637223380::get_offset_of_md5_4(), MD5SHA1_t1637223380::get_offset_of_sha_5(), MD5SHA1_t1637223380::get_offset_of_hashing_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize965 = { sizeof (AlertLevel_t58903571)+ sizeof (RuntimeObject), sizeof(uint8_t), 0, 0 }; extern const int32_t g_FieldOffsetTable965[3] = { AlertLevel_t58903571::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize966 = { sizeof (AlertDescription_t400044940)+ sizeof (RuntimeObject), sizeof(uint8_t), 0, 0 }; extern const int32_t g_FieldOffsetTable966[25] = { AlertDescription_t400044940::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize967 = { sizeof (Alert_t4252074283), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable967[2] = { Alert_t4252074283::get_offset_of_level_0(), Alert_t4252074283::get_offset_of_description_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize968 = { sizeof (CipherAlgorithmType_t3080725697)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable968[8] = { CipherAlgorithmType_t3080725697::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize969 = { sizeof (CipherSuite_t4022274145), -1, sizeof(CipherSuite_t4022274145_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable969[21] = { CipherSuite_t4022274145_StaticFields::get_offset_of_EmptyArray_0(), CipherSuite_t4022274145::get_offset_of_code_1(), CipherSuite_t4022274145::get_offset_of_name_2(), CipherSuite_t4022274145::get_offset_of_cipherAlgorithmType_3(), CipherSuite_t4022274145::get_offset_of_hashAlgorithmType_4(), CipherSuite_t4022274145::get_offset_of_exchangeAlgorithmType_5(), CipherSuite_t4022274145::get_offset_of_isExportable_6(), CipherSuite_t4022274145::get_offset_of_cipherMode_7(), CipherSuite_t4022274145::get_offset_of_keyMaterialSize_8(), CipherSuite_t4022274145::get_offset_of_keyBlockSize_9(), CipherSuite_t4022274145::get_offset_of_expandedKeyMaterialSize_10(), CipherSuite_t4022274145::get_offset_of_effectiveKeyBits_11(), CipherSuite_t4022274145::get_offset_of_ivSize_12(), CipherSuite_t4022274145::get_offset_of_blockSize_13(), CipherSuite_t4022274145::get_offset_of_context_14(), CipherSuite_t4022274145::get_offset_of_encryptionAlgorithm_15(), CipherSuite_t4022274145::get_offset_of_encryptionCipher_16(), CipherSuite_t4022274145::get_offset_of_decryptionAlgorithm_17(), CipherSuite_t4022274145::get_offset_of_decryptionCipher_18(), CipherSuite_t4022274145::get_offset_of_clientHMAC_19(), CipherSuite_t4022274145::get_offset_of_serverHMAC_20(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize970 = { sizeof (CipherSuiteCollection_t2392215148), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable970[2] = { CipherSuiteCollection_t2392215148::get_offset_of_cipherSuites_0(), CipherSuiteCollection_t2392215148::get_offset_of_protocol_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize971 = { sizeof (CipherSuiteFactory_t2457108133), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize972 = { sizeof (ClientContext_t1958133647), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable972[2] = { ClientContext_t1958133647::get_offset_of_sslStream_30(), ClientContext_t1958133647::get_offset_of_clientHelloProtocol_31(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize973 = { sizeof (ClientRecordProtocol_t369192006), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize974 = { sizeof (ClientSessionInfo_t830906332), -1, sizeof(ClientSessionInfo_t830906332_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable974[6] = { ClientSessionInfo_t830906332_StaticFields::get_offset_of_ValidityInterval_0(), ClientSessionInfo_t830906332::get_offset_of_disposed_1(), ClientSessionInfo_t830906332::get_offset_of_validuntil_2(), ClientSessionInfo_t830906332::get_offset_of_host_3(), ClientSessionInfo_t830906332::get_offset_of_sid_4(), ClientSessionInfo_t830906332::get_offset_of_masterSecret_5(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize975 = { sizeof (ClientSessionCache_t4290476319), -1, sizeof(ClientSessionCache_t4290476319_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable975[2] = { ClientSessionCache_t4290476319_StaticFields::get_offset_of_cache_0(), ClientSessionCache_t4290476319_StaticFields::get_offset_of_locker_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize976 = { sizeof (ContentType_t2986289475)+ sizeof (RuntimeObject), sizeof(uint8_t), 0, 0 }; extern const int32_t g_FieldOffsetTable976[5] = { ContentType_t2986289475::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize977 = { sizeof (Context_t4280724427), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable977[30] = { Context_t4280724427::get_offset_of_securityProtocol_0(), Context_t4280724427::get_offset_of_sessionId_1(), Context_t4280724427::get_offset_of_compressionMethod_2(), Context_t4280724427::get_offset_of_serverSettings_3(), Context_t4280724427::get_offset_of_clientSettings_4(), Context_t4280724427::get_offset_of_current_5(), Context_t4280724427::get_offset_of_negotiating_6(), Context_t4280724427::get_offset_of_read_7(), Context_t4280724427::get_offset_of_write_8(), Context_t4280724427::get_offset_of_supportedCiphers_9(), Context_t4280724427::get_offset_of_lastHandshakeMsg_10(), Context_t4280724427::get_offset_of_handshakeState_11(), Context_t4280724427::get_offset_of_abbreviatedHandshake_12(), Context_t4280724427::get_offset_of_receivedConnectionEnd_13(), Context_t4280724427::get_offset_of_sentConnectionEnd_14(), Context_t4280724427::get_offset_of_protocolNegotiated_15(), Context_t4280724427::get_offset_of_writeSequenceNumber_16(), Context_t4280724427::get_offset_of_readSequenceNumber_17(), Context_t4280724427::get_offset_of_clientRandom_18(), Context_t4280724427::get_offset_of_serverRandom_19(), Context_t4280724427::get_offset_of_randomCS_20(), Context_t4280724427::get_offset_of_randomSC_21(), Context_t4280724427::get_offset_of_masterSecret_22(), Context_t4280724427::get_offset_of_clientWriteKey_23(), Context_t4280724427::get_offset_of_serverWriteKey_24(), Context_t4280724427::get_offset_of_clientWriteIV_25(), Context_t4280724427::get_offset_of_serverWriteIV_26(), Context_t4280724427::get_offset_of_handshakeMessages_27(), Context_t4280724427::get_offset_of_random_28(), Context_t4280724427::get_offset_of_recordProtocol_29(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize978 = { sizeof (ExchangeAlgorithmType_t1399338423)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable978[6] = { ExchangeAlgorithmType_t1399338423::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize979 = { sizeof (HandshakeState_t549057581)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable979[4] = { HandshakeState_t549057581::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize980 = { sizeof (HashAlgorithmType_t143221662)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable980[4] = { HashAlgorithmType_t143221662::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize981 = { sizeof (HttpsClientStream_t3409005790), -1, sizeof(HttpsClientStream_t3409005790_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable981[4] = { HttpsClientStream_t3409005790::get_offset_of__request_20(), HttpsClientStream_t3409005790::get_offset_of__status_21(), HttpsClientStream_t3409005790_StaticFields::get_offset_of_U3CU3Ef__amU24cache2_22(), HttpsClientStream_t3409005790_StaticFields::get_offset_of_U3CU3Ef__amU24cache3_23(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize982 = { sizeof (RecordProtocol_t164207684), -1, sizeof(RecordProtocol_t164207684_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable982[3] = { RecordProtocol_t164207684_StaticFields::get_offset_of_record_processing_0(), RecordProtocol_t164207684::get_offset_of_innerStream_1(), RecordProtocol_t164207684::get_offset_of_context_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize983 = { sizeof (ReceiveRecordAsyncResult_t4167858354), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable983[9] = { ReceiveRecordAsyncResult_t4167858354::get_offset_of_locker_0(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__userCallback_1(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__userState_2(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__asyncException_3(), ReceiveRecordAsyncResult_t4167858354::get_offset_of_handle_4(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__resultingBuffer_5(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__record_6(), ReceiveRecordAsyncResult_t4167858354::get_offset_of_completed_7(), ReceiveRecordAsyncResult_t4167858354::get_offset_of__initialBuffer_8(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize984 = { sizeof (SendRecordAsyncResult_t2703092914), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable984[7] = { SendRecordAsyncResult_t2703092914::get_offset_of_locker_0(), SendRecordAsyncResult_t2703092914::get_offset_of__userCallback_1(), SendRecordAsyncResult_t2703092914::get_offset_of__userState_2(), SendRecordAsyncResult_t2703092914::get_offset_of__asyncException_3(), SendRecordAsyncResult_t2703092914::get_offset_of_handle_4(), SendRecordAsyncResult_t2703092914::get_offset_of__message_5(), SendRecordAsyncResult_t2703092914::get_offset_of_completed_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize985 = { sizeof (RSASslSignatureDeformatter_t3761984734), -1, sizeof(RSASslSignatureDeformatter_t3761984734_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable985[3] = { RSASslSignatureDeformatter_t3761984734::get_offset_of_key_0(), RSASslSignatureDeformatter_t3761984734::get_offset_of_hash_1(), RSASslSignatureDeformatter_t3761984734_StaticFields::get_offset_of_U3CU3Ef__switchU24map15_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize986 = { sizeof (RSASslSignatureFormatter_t1473151827), -1, sizeof(RSASslSignatureFormatter_t1473151827_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable986[3] = { RSASslSignatureFormatter_t1473151827::get_offset_of_key_0(), RSASslSignatureFormatter_t1473151827::get_offset_of_hash_1(), RSASslSignatureFormatter_t1473151827_StaticFields::get_offset_of_U3CU3Ef__switchU24map16_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize987 = { sizeof (SecurityCompressionType_t3955755332)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable987[3] = { SecurityCompressionType_t3955755332::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize988 = { sizeof (SecurityParameters_t3249263566), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable988[3] = { SecurityParameters_t3249263566::get_offset_of_cipher_0(), SecurityParameters_t3249263566::get_offset_of_clientWriteMAC_1(), SecurityParameters_t3249263566::get_offset_of_serverWriteMAC_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize989 = { sizeof (SecurityProtocolType_t2830707411)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable989[5] = { SecurityProtocolType_t2830707411::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize990 = { sizeof (ServerContext_t4263993783), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize991 = { sizeof (ValidationResult_t24465603), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable991[2] = { ValidationResult_t24465603::get_offset_of_trusted_0(), ValidationResult_t24465603::get_offset_of_error_code_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize992 = { sizeof (SslClientStream_t4073644265), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable992[4] = { SslClientStream_t4073644265::get_offset_of_ServerCertValidation_16(), SslClientStream_t4073644265::get_offset_of_ClientCertSelection_17(), SslClientStream_t4073644265::get_offset_of_PrivateKeySelection_18(), SslClientStream_t4073644265::get_offset_of_ServerCertValidation2_19(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize993 = { sizeof (SslCipherSuite_t2568515028), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable993[3] = { SslCipherSuite_t2568515028::get_offset_of_pad1_21(), SslCipherSuite_t2568515028::get_offset_of_pad2_22(), SslCipherSuite_t2568515028::get_offset_of_header_23(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize994 = { sizeof (SslHandshakeHash_t998393304), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable994[8] = { SslHandshakeHash_t998393304::get_offset_of_md5_4(), SslHandshakeHash_t998393304::get_offset_of_sha_5(), SslHandshakeHash_t998393304::get_offset_of_hashing_6(), SslHandshakeHash_t998393304::get_offset_of_secret_7(), SslHandshakeHash_t998393304::get_offset_of_innerPadMD5_8(), SslHandshakeHash_t998393304::get_offset_of_outerPadMD5_9(), SslHandshakeHash_t998393304::get_offset_of_innerPadSHA_10(), SslHandshakeHash_t998393304::get_offset_of_outerPadSHA_11(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize995 = { sizeof (SslStreamBase_t2013173809), -1, sizeof(SslStreamBase_t2013173809_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable995[15] = { 0, SslStreamBase_t2013173809_StaticFields::get_offset_of_record_processing_2(), SslStreamBase_t2013173809::get_offset_of_innerStream_3(), SslStreamBase_t2013173809::get_offset_of_inputBuffer_4(), SslStreamBase_t2013173809::get_offset_of_context_5(), SslStreamBase_t2013173809::get_offset_of_protocol_6(), SslStreamBase_t2013173809::get_offset_of_ownsStream_7(), SslStreamBase_t2013173809::get_offset_of_disposed_8(), SslStreamBase_t2013173809::get_offset_of_checkCertRevocationStatus_9(), SslStreamBase_t2013173809::get_offset_of_negotiate_10(), SslStreamBase_t2013173809::get_offset_of_read_11(), SslStreamBase_t2013173809::get_offset_of_write_12(), SslStreamBase_t2013173809::get_offset_of_negotiationComplete_13(), SslStreamBase_t2013173809::get_offset_of_recbuf_14(), SslStreamBase_t2013173809::get_offset_of_recordStream_15(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize996 = { sizeof (InternalAsyncResult_t3512432811), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable996[12] = { InternalAsyncResult_t3512432811::get_offset_of_locker_0(), InternalAsyncResult_t3512432811::get_offset_of__userCallback_1(), InternalAsyncResult_t3512432811::get_offset_of__userState_2(), InternalAsyncResult_t3512432811::get_offset_of__asyncException_3(), InternalAsyncResult_t3512432811::get_offset_of_handle_4(), InternalAsyncResult_t3512432811::get_offset_of_completed_5(), InternalAsyncResult_t3512432811::get_offset_of__bytesRead_6(), InternalAsyncResult_t3512432811::get_offset_of__fromWrite_7(), InternalAsyncResult_t3512432811::get_offset_of__proceedAfterHandshake_8(), InternalAsyncResult_t3512432811::get_offset_of__buffer_9(), InternalAsyncResult_t3512432811::get_offset_of__offset_10(), InternalAsyncResult_t3512432811::get_offset_of__count_11(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize997 = { sizeof (TlsCipherSuite_t2890608342), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable997[2] = { TlsCipherSuite_t2890608342::get_offset_of_header_21(), TlsCipherSuite_t2890608342::get_offset_of_headerLock_22(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize998 = { sizeof (TlsClientSettings_t97405758), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable998[4] = { TlsClientSettings_t97405758::get_offset_of_targetHost_0(), TlsClientSettings_t97405758::get_offset_of_certificates_1(), TlsClientSettings_t97405758::get_offset_of_clientCertificate_2(), TlsClientSettings_t97405758::get_offset_of_certificateRSA_3(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize999 = { sizeof (TlsException_t2107218173), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable999[1] = { TlsException_t2107218173::get_offset_of_alert_11(), }; #ifdef __clang__ #pragma clang diagnostic pop #endif
5a8f2e17461118cb92a0a5a650faa83dd1df554f
e6b4a9fb699feb39ae4c80ae5c59c539440ccb43
/Prototypes/C++/Signals/v3_bench/test_vc.cxx
14eac16800bbfd0aae2dc943e1f78f01e4362662
[]
no_license
Hedede/various-things
2451154473892546c94633289b66b9d6cd341f9c
ae813b21d70a1dab72a091035332c898d89e5eda
refs/heads/master
2023-08-09T17:46:52.906049
2023-07-30T09:55:41
2023-07-30T09:55:41
63,462,461
0
0
null
null
null
null
UTF-8
C++
false
false
69
cxx
test_vc.cxx
#include "header.h" void vf_counter::invoke() { ctr->count(*this); }
f31de71c9d835345ae707aff389c4ce37b1e6ec9
177396badcf7250e08d7c02b378a905274f4fcd3
/src/SulfurEditor/Widgets/Editors/sfEnumEditor.cpp
e8d9513c92120eb421b59bb449345c008ce2c9d4
[]
no_license
MaximKolesnik/Sulfur
c7157afa6c229f644da70e08750919a62bdf1cc7
10336d94edfb7ca874eb2770783d296d6b702fce
refs/heads/master
2020-04-17T19:43:36.391256
2017-04-23T02:55:07
2017-04-23T02:55:07
66,398,744
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,378
cpp
sfEnumEditor.cpp
/******************************************************************************/ /*! \par Sulfur \file sfEnumEditor.cpp \author Dylan Norris \par DP email: d.norris@digipen.edu \date 9/19/2016 \brief Enum property editor All content © 2016 DigiPen (USA) Corporation, all rights reserved. */ /******************************************************************************/ #include "sfEnumEditor.hpp" namespace Sulfur { EnumEditor::EnumEditor(ReflectionBase *object, Property *prop, QWidget *parent) : LabeledEditor(object, prop, parent) { CreateComboBox(); } EnumEditor::EnumEditor(void *ptr, QWidget *parent) : LabeledEditor(ptr, parent) { CreateComboBox(); } EnumEditor::~EnumEditor() { } void EnumEditor::UpdateValue() { m_comboBox->setCurrentIndex(GetValue<UINT32>()); } void EnumEditor::CreateComboBox() { m_comboBox = new QComboBox(); m_layout->addWidget(m_comboBox); if (m_property != nullptr) { auto& enumValues = m_property->GetTypeInfo()->GetEnumValues(); for (const std::string& value : enumValues) m_comboBox->addItem(value.c_str()); } UpdateValue(); QObject::connect( m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &EnumEditor::OnValueSelected ); } void EnumEditor::OnValueSelected(int index) { SetValue((UINT32)index); UpdateValue(); } }
a92d99e369b6ff8d01453b9db68d238133627e1d
951cf8d8da9632bcad2c2a706c54a634393e4d64
/minerlib/mining_algorithm.cpp
95bf378c5a4860c9999b625523241505cfbd78fe
[]
no_license
gladcow/inproc_miner
ed0884dcd12b6939b16efc25141e7f82051a3eb7
845b8e550d82b1b8d38e09cd450131246d07e961
refs/heads/master
2022-12-02T10:13:43.059200
2020-08-09T08:30:21
2020-08-18T15:43:45
284,700,921
0
0
null
null
null
null
UTF-8
C++
false
false
606
cpp
mining_algorithm.cpp
#include "mining_algorithm.h" #include "cryptonight.h" namespace stratum{ std::unique_ptr<mining_algorithm> mining_algorithm::factory(Algorithm a, const binary& blob, uint32_t target, uint32_t start_nonce) { switch (a) { case(CRYPTONIGHT) : return std::make_unique<cryptonight>(blob, target, start_nonce); } throw std::runtime_error("Failed to create unknown mining algorithm object"); } mining_algorithm::mining_algorithm(const binary& blob, uint32_t target, uint32_t start_nonce) : blob_(blob), target_(target), nonce_(start_nonce) { } }
a0e2e34e338fee648846dce76b98c5097c5d1ed8
4f800db674613d35f11caef5a2e5f151b87ddd7f
/cloisim_ros_depthcamera/include/cloisim_ros_depthcamera/depthcamera.hpp
3f14b53043b87330f6b7f837c5f546f89c85ade7
[ "MIT" ]
permissive
ratharn/cloisim_ros
1860015c49810adf9e1ac630bee8b2cbbe777d56
3e2e70f95e751daddf069c6bdce9e465b49f7c68
refs/heads/main
2023-03-30T03:15:05.990383
2021-04-04T10:31:47
2021-04-04T10:31:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,353
hpp
depthcamera.hpp
/** * @file depthcamera.hpp * @date 2021-01-14 * @author Sungkyu Kang * @author hyunseok Yang * @brief * ROS2 Depth Camera class for simulator * @remark * @warning * LGE Advanced Robotics Laboratory * Copyright(C) 2019 LG Electronics Co., LTD., Seoul, Korea * All Rights are Reserved. */ #ifndef _CLOISIM_ROS_DEPTHCAMERA_HPP_ #define _CLOISIM_ROS_DEPTHCAMERA_HPP_ #include <cloisim_ros_camera/camera.hpp> #include <sensor_msgs/msg/point_cloud2.hpp> namespace cloisim_ros { class DepthCamera : public Camera { public: explicit DepthCamera(const rclcpp::NodeOptions &options_, const std::string node_name_, const std::string namespace_ = ""); explicit DepthCamera(const std::string node_name_ = "cloisim_ros_depthcamera", const std::string namespace_ = ""); virtual ~DepthCamera(); private: virtual void Initialize() override; virtual void Deinitialize() override; virtual void UpdateData(const uint bridge_index) override; private: // Camera info publisher // rclcpp::Publisher<sensor_msgs::msg::CameraInfo>::SharedPtr pubDepthCameraInfo{nullptr}; // Store current point cloud. // sensor_msgs::msg::PointCloud2 msg_pc2; // Point cloud publisher. // rclcpp::Publisher<sensor_msgs::msg::PointCloud2>::SharedPtr pubPointCloud; }; } #endif
a71ebebe6c4334c87a50d3113fde91c1d27aafb8
1e551fed94b4e8dd8bc415c533bd2247b0efd8d7
/Skriptning/Skriptning/main.cpp
77772f68d00c91060b3a578b39994ee3954d3a53
[]
no_license
zsebastian/AI-Homework
a245bc4cf70400a071c0da6ca7f251f6fe5517eb
412a0241021132c24958842313db32ee8fda68cd
refs/heads/master
2016-09-11T08:32:18.905634
2015-09-02T17:46:26
2015-09-02T17:46:26
24,836,837
0
0
null
null
null
null
UTF-8
C++
false
false
971
cpp
main.cpp
#include <lua.hpp> #include <luacppinterface.h> #include <string> #include <fstream> #include <iostream> #include "LuaHelper.h" #include "Window.h" #include "Timer.h" void render_robots(Window& window, const LuaHelper& helper) { for (int i = 0; i < helper.get_robot_count(); ++i) { Robot robot = helper.get_robot_at(i); window.RenderRectangle(robot.x * 8, robot.y * 8, 8, 8, Color::make_from_floats(robot.r, robot.g, robot.b)); } } int main(int argc, char **argv) { LuaHelper helper(800 / 8, 800 / 8); Window window("robot wars", 800, 800); helper.run_script("robots.lua"); Timer timer; timer.Start(); int frame = 0; while (window.Open()) { window.PollEvents(); if (timer.ElapsedMilliseconds() > 1000 / 10) { timer.Start(); helper.update_robots(); } render_robots(window, helper); window.Display(); if (frame++ % 10 == 0) { window.PrintScreen("frame_" + std::to_string(frame) +".bmp"); } window.Clear(); } return 0; }
1b0e348efe01d0eb19373b6c3027a61037090d52
15fa4009e4087a9270b857b4fa155d929c81cb37
/MANA3DEngine/MANA3DEngine/Screen.h
cdb3fb9cfcca4f6f0ce26b673280091651980d81
[]
no_license
MANA3DGames/mana-3d-game-engine-public
1464f52ae99a2912b57db57578882aa8793f7b09
ae1430c8369e7cca1f84b1cc42927ec009565c1f
refs/heads/master
2022-12-11T04:39:03.460071
2020-09-02T13:47:11
2020-09-02T13:47:11
292,292,187
1
0
null
null
null
null
UTF-8
C++
false
false
778
h
Screen.h
#ifndef SCREEN_H #define SCREEN_H #include <array> #include <glfw3.h> namespace MANA3D { class Screen { friend class MANA3DEngine; private: Screen(); ~Screen(); int width; int height; GLFWwindow* window; GLFWmonitor* monitor; std::array<int, 2> _wndPos{ 0, 0 }; std::array<int, 2> _wndSize{ 0, 0 }; std::array<int, 2> _vpSize{ 0, 0 }; private: static Screen* instance; static void Create( GLFWwindow* window, const int& width, const int& height ); static void Destroy(); static void SetSize( const int& width, const int& height ); public: static int GetWidth(); static int GetHeight(); static void Maximize(); static bool IsFullscreen( void ); static void SetFullScreen( const bool& fullscreen ); }; } #endif // !SCREEN_H
b93d0c989cf00996793361f248ce6dd9f8c6e505
90270683c749007275b02af9a4d53401759eb8b6
/Codeforces/LadderD/203d.cpp
aad3f5df5d3874652a014cdaa0b68451fbba006b
[]
no_license
IvanAli/CP
b2d2d676e109f827a86623b0a4f2864776b2b8c1
b1fabccbf611b6a0ddb5107f9c2dcf3a94252f62
refs/heads/master
2021-01-01T05:18:31.190748
2016-10-26T02:17:22
2016-10-26T02:17:22
40,802,076
0
1
null
null
null
null
UTF-8
C++
false
false
819
cpp
203d.cpp
#include <bits/stdc++.h> #define eps 1e-9 using namespace std; double a, b, m; double vx, vy, vz; int main() { cin >> a >> b >> m; cin >> vx >> vy >> vz; double tx = a / fabs(vx); double ty = m / -vy; double tz = b / vz; int bx = (int)(ty / (tx / 2.)) ? 1 + (ty - tx / 2.) / tx : 0; int bz = ty / tz; double fm1 = bx ? fmod(ty - tx / 2., tx) : ty; double fm2 = fmod(ty, tz); double aa, bb; if (vx == 0) aa = a / 2.; else aa = (fabs(fm1) < eps ? (bx % 2 ? (vx ? a : 0) : (vx ? 0 : a)) : bx ? ((bx % 2 ? (vx < 0 ? fm1 * -vx : a - fm1 * vx) : (vx < 0 ? a - fm1 * -vx : fm1 * vx))) : (a / 2. + fm1 * vx)); if (vz == 0) bb = 0; else bb = (fabs(fm2) < eps ? (bz % 2 ? b : 0) : (bz % 2 ? b - fm2 * vz : fm2 * vz)); printf("%.10f %.10f\n", aa, bb); return 0; }
473affc52dd6a335c801b42277d865cf54780e66
01b61b4b576f05dbcdd3926fd27f08d8517fc545
/CBuilder/Tests/IB/TestIB.#2/DataUnit.h
7fdcb4694b47aa7158e5e7850439d3ce392ee1a8
[]
no_license
Ex-Soft/test
0877badde69ddcfc5e1ff78703a053ef2587a69e
7c0d0e554ba91b203564da7e44f43838710ac59d
refs/heads/master
2023-04-11T07:18:43.542556
2023-03-31T14:20:16
2023-03-31T14:20:16
73,572,547
5
5
null
2023-09-07T13:28:45
2016-11-12T19:06:44
C#
UTF-8
C++
false
false
1,359
h
DataUnit.h
//--------------------------------------------------------------------------- #ifndef DataUnitH #define DataUnitH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <DB.hpp> #include <IBCustomDataSet.hpp> #include <IBDatabase.hpp> #include <IBQuery.hpp> #include <IBServices.hpp> #include <IBSQL.hpp> #include <IBStoredProc.hpp> //--------------------------------------------------------------------------- class TDataBases : public TDataModule { __published: // IDE-managed Components TIBDatabase *IBDatabase; TIBTransaction *IBTransaction; TIBSQL *IBSQL1; TIBStoredProc *IBStoredProc; TIBSecurityService *IBSecurityService; TIBServerProperties *IBServerProperties; TIBSQL *IBSQL2; TIBQuery *IBQuery1; TIBQuery *IBQuery2; void __fastcall DataModuleCreate(TObject *Sender); void __fastcall DataModuleDestroy(TObject *Sender); private: // User declarations public: // User declarations __fastcall TDataBases(TComponent* Owner); AnsiString IBUser,IBUserPassword,IBServerName,IBDatabaseName; }; //--------------------------------------------------------------------------- extern PACKAGE TDataBases *DataBases; //--------------------------------------------------------------------------- #endif
79c12d601a040920efba62b74d92624306635835
2d05050d0ada29f7680b4df20c10bb85b0530e45
/src/relay/op/nn/pooling.cc
1cfbab6e661ee31ec44ea70e219cba95342cfa62
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "Zlib", "LLVM-exception", "BSD-2-Clause" ]
permissive
apache/tvm
87cb617f9a131fa44e1693303aaddf70e7a4c403
d75083cd97ede706338ab413dbc964009456d01b
refs/heads/main
2023-09-04T11:24:26.263032
2023-09-04T07:26:00
2023-09-04T07:26:00
70,746,484
4,575
1,903
Apache-2.0
2023-09-14T19:06:33
2016-10-12T22:20:28
Python
UTF-8
C++
false
false
58,789
cc
pooling.cc
/* * 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. */ /*! * \file pooling.cc * \brief Pooling operators */ #include "pooling.h" #include <tvm/relay/attrs/nn.h> #include <tvm/relay/op.h> #include <tvm/relay/op_attr_types.h> #include <tvm/tir/data_layout.h> #include <tvm/topi/nn/pooling.h> #include <vector> #include "../../transforms/infer_layout_utils.h" #include "pooling_common.h" namespace tvm { namespace relay { // relay.nn.max_pool2d & relay.nn.avg_pool2d TVM_REGISTER_NODE_TYPE(MaxPool2DAttrs); TVM_REGISTER_NODE_TYPE(AvgPool2DAttrs); template <typename AttrType> bool Pool2DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) return false; const auto dshape = data->shape; ICHECK_GE(dshape.size(), 2U) << "Pool2D only support input >= 2-D: input must have height and width"; const auto param = attrs.as<AttrType>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(layout.Contains(LayoutAxis::Get('H')) && layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('h')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool2D layout must have H and W, which cannot be split"; const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr pad_h, pad_w; if (param->padding.size() == 1) { pad_h = param->padding[0] * 2; pad_w = param->padding[0] * 2; } else if (param->padding.size() == 2) { // (top, left) pad_h = param->padding[0] * 2; pad_w = param->padding[1] * 2; } else if (param->padding.size() == 4) { // (top, left, bottom, right) pad_h = param->padding[0] + param->padding[2]; pad_w = param->padding[1] + param->padding[3]; } else { return false; } std::vector<IndexExpr> oshape(dshape.begin(), dshape.end()); if (dshape[hidx].as<tir::AnyNode>()) { oshape[hidx] = dshape[hidx]; } else { oshape[hidx] = calculate_pool_dimension(dshape[hidx], pad_h, param->pool_size[0], param->dilation[0], param->strides[0], param->ceil_mode); } if (dshape[widx].as<tir::AnyNode>()) { oshape[widx] = dshape[widx]; } else { oshape[widx] = calculate_pool_dimension(dshape[widx], pad_w, param->pool_size[1], param->dilation[1], param->strides[1], param->ceil_mode); } // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <typename AttrType, topi::nn::PoolType mode> Array<te::Tensor> Pool2DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCHW("NCHW"); const auto* param = attrs.as<AttrType>(); ICHECK(param != nullptr); auto pool_size = param->pool_size; auto strides = param->strides; auto dilation = param->dilation; auto padding = param->padding; auto ceil_mode = param->ceil_mode; Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(tir::BijectiveLayout(layout, kNCHW).defined()) << "max_pool2d currently only supports layouts that are convertible from NCHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "max_pool2d does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "max_pool2d does not support input split on width"; ICHECK(inputs[0].ndim() == 4U || inputs[0].ndim() == 5U || inputs[0].ndim() == 6U) << "Pool2D only support 4-D input (e.g., NCHW)" << " or 5-D input (e.g. NCHWc on for vector instructions)" << " or 6-D input (e.g. NCHWnc for tensor accelerators)"; if (param->padding.size() == 1) { padding.push_back(padding[0]); padding.push_back(padding[0]); padding.push_back(padding[0]); } else if (param->padding.size() == 2) { padding.push_back(padding[0]); padding.push_back(padding[1]); } if (mode == topi::nn::kAvgPool) { bool count_include_pad = reinterpret_cast<const AvgPool2DAttrs*>(param)->count_include_pad; return Array<te::Tensor>{topi::nn::pool2d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name(), count_include_pad)}; } else { return Array<te::Tensor>{topi::nn::pool2d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name())}; } } TVM_REGISTER_GLOBAL("relay.op.nn._make.max_pool2d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode) { return MakeMaxPool<MaxPool2DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, "nn.max_pool2d"); }); RELAY_REGISTER_OP("nn.max_pool2d") .describe(R"code(Max pooling operation for two dimensional data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, out_height, out_width) if `layout` is `NCHW`. out_height and out_width are calculated as:: out_height = floor((height+padding[0]+padding[2]-pool_size[0])/strides[0])+1 out_width = floor((width+padding[1]+padding[3]-pool_size[1])/strides[1])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int : bottom, right use same as top and left. four int: padding width in the order of (top, left, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<MaxPool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("MaxPool2D", Pool2DRel<MaxPool2DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<MaxPool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool2DCompute<MaxPool2DAttrs, topi::nn::kMaxPool>); // AvgPool2D TVM_REGISTER_GLOBAL("relay.op.nn._make.avg_pool2d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode, bool count_include_pad) { return MakeAvgPool<AvgPool2DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, count_include_pad, "nn.avg_pool2d"); }); RELAY_REGISTER_OP("nn.avg_pool2d") .describe(R"code( Average pooling operation for one dimensional data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, out_height, out_width) if `layout` is `NCHW`. out_height and out_width are calculated as:: out_height = floor((height+padding[0]+padding[2]-pool_size[0])/strides[0])+1 out_width = floor((width+padding[1]+padding[3]-pool_size[1])/strides[1])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int : bottom, right use same as top and left. four int: padding width in the order of (top, left, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<AvgPool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("AvgPool2D", Pool2DRel<AvgPool2DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AvgPool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool2DCompute<AvgPool2DAttrs, topi::nn::kAvgPool>); // relay.nn.global_pool_2d & relay.nn.max_pool_2d TVM_REGISTER_NODE_TYPE(GlobalPool2DAttrs); bool GlobalPool2DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) { return false; } const auto dshape = data->shape; ICHECK_GE(dshape.size(), 2U) << "Pool2D only support input >= 2-D: input must have height and width"; const auto param = attrs.as<GlobalPool2DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(layout.Contains(LayoutAxis::Get('H')) && layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('h')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool2D layout must have H and W, which cannot be split"; const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); Array<IndexExpr> oshape(dshape); oshape.Set(hidx, 1); oshape.Set(widx, 1); // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <topi::nn::PoolType mode> Array<te::Tensor> GlobalPool2DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCHW("NCHW"); const auto* param = attrs.as<GlobalPool2DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(tir::BijectiveLayout(layout, kNCHW).defined()) << "global_avg_pool2d currently only supports layouts that are convertible from NCHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "global_avg_pool2d does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "global_avg_pool2d does not support input split on width"; ICHECK(inputs[0].ndim() == 4U || inputs[0].ndim() == 5U) << "Pool2D only support 4-D input (e.g., NCHW)" << " or 5-D input (last dimension is a split of channel)"; return Array<te::Tensor>{topi::nn::global_pool(inputs[0], mode, layout.name())}; } Expr MakeGlobalAvgPool2D(Expr data, String layout, String out_layout) { auto attrs = make_object<GlobalPool2DAttrs>(); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.global_avg_pool2d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.global_avg_pool2d").set_body_typed(MakeGlobalAvgPool2D); // GlobalAvgPool RELAY_REGISTER_OP("nn.global_avg_pool2d") .describe(R"code(Global average pooling operation for 2D data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, 1, 1) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<GlobalPool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("GlobalAvgPool2D", GlobalPool2DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<GlobalPool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", GlobalPool2DCompute<topi::nn::kAvgPool>); // GlobalMaxPool Expr MakeGlobalMaxPool2D(Expr data, String layout, String out_layout) { auto attrs = make_object<GlobalPool2DAttrs>(); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.global_max_pool2d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.global_max_pool2d").set_body_typed(MakeGlobalMaxPool2D); RELAY_REGISTER_OP("nn.global_max_pool2d") .describe(R"code(Global max pooling operation for 2D data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, 1, 1) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<GlobalPool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("GlobalMaxPool2D", GlobalPool2DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<GlobalPool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", GlobalPool2DCompute<topi::nn::kMaxPool>); // relay.nn.adaptive_pool_1d TVM_REGISTER_NODE_TYPE(AdaptivePool1DAttrs); bool AdaptivePool1DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) { return false; } const auto dshape = data->shape; ICHECK_GE(dshape.size(), 1U) << "Pool2D only support input >= 1-D: input must have width"; const auto* param = attrs.as<AdaptivePool1DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool1D layout must have W, which cannot be split"; const auto widx = layout.IndexOf(LayoutAxis::Get('W')); Array<IndexExpr> oshape(dshape); auto output_size = param->output_size; ICHECK_LE(output_size.size(), 1U) << "output_size must have 1 element."; IndexExpr output_width; if (output_size.empty()) { output_width = dshape[widx]; } else { output_width = output_size[0]; } oshape.Set(widx, output_width); // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <topi::nn::PoolType mode> Array<te::Tensor> AdaptivePool1DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCW("NCW"); const auto* param = attrs.as<AdaptivePool1DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(tir::BijectiveLayout(layout, kNCW).defined()) << "Adaptive pool1d currently only supports layouts that are convertible from NCW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "Adaptive pool2d does not support input split on width"; ICHECK(inputs[0].ndim() == 3U || inputs[0].ndim() == 4U) << "Pool1D only support 3-D input (e.g., NCW)" << " or 4-D input (last dimension is a split of channel)"; auto output_size = param->output_size; const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr output_width; if (output_size.empty()) { output_width = inputs[0]->shape[widx]; } else { output_width = output_size[0]; } return Array<te::Tensor>{ topi::nn::adaptive_pool1d(inputs[0], Array<IndexExpr>{output_width}, mode, layout.name())}; } // relay.nn.adaptive_avg_pool1d Expr MakeAdaptiveAvgPool1D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool1DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_avg_pool1d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_avg_pool1d").set_body_typed(MakeAdaptiveAvgPool1D); RELAY_REGISTER_OP("nn.adaptive_avg_pool1d") .describe(R"code(Adaptive average pooling operation for 1D data. - **data**: This depends on the `layout` parameter. Input is 3D array of shape (batch_size, channels, width) if `layout` is `NCW`. - **output_size**: If this argument is not provided, input width will be used as output width. If an integer is provided for output_size, the output size is (N x C x output_size) for any input (NCW). - **out**: This depends on the `layout` parameter. Output is 3D array of shape (batch_size, channels, output_width) if `layout` is `NCW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool1DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveAvgPool1D", AdaptivePool1DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool1DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool1DCompute<topi::nn::kAvgPool>); // relay.nn.adaptive_max_pool1d Expr MakeAdaptiveMaxPool1D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool1DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_max_pool1d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_max_pool1d").set_body_typed(MakeAdaptiveMaxPool1D); RELAY_REGISTER_OP("nn.adaptive_max_pool1d") .describe(R"code(Adaptive max pooling operation for 1D data. - **data**: This depends on the `layout` parameter. Input is 3D array of shape (batch_size, channels, width) if `layout` is `NCW`. - **output_size**: If this argument is not provided, input width will be used as output width. If an integer is provided for output_size, the output size is (N x C x output_size) for any input (NCW). - **out**: This depends on the `layout` parameter. Output is 3D array of shape (batch_size, channels, output_width) if `layout` is `NCW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool1DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveMaxPool1D", AdaptivePool1DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool1DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool1DCompute<topi::nn::kMaxPool>); // relay.nn.adaptive_pool_2d TVM_REGISTER_NODE_TYPE(AdaptivePool2DAttrs); bool AdaptivePool2DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) { return false; } const auto dshape = data->shape; ICHECK_GE(dshape.size(), 2U) << "Pool2D only support input >= 2-D: input must have height and width"; const auto* param = attrs.as<AdaptivePool2DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(layout.Contains(LayoutAxis::Get('H')) && layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('h')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool2D layout must have H and W, which cannot be split"; const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); Array<IndexExpr> oshape(dshape); auto output_size = param->output_size; ICHECK_LE(output_size.size(), 2U) << "output_size can have up to 2 elements."; IndexExpr output_height, output_width; if (output_size.empty()) { output_height = dshape[hidx]; output_width = dshape[widx]; } else if (output_size.size() == 1) { output_height = output_size[0]; output_width = output_size[0]; } else { output_height = output_size[0]; output_width = output_size[1]; } oshape.Set(hidx, output_height); oshape.Set(widx, output_width); // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <topi::nn::PoolType mode> Array<te::Tensor> AdaptivePool2DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCHW("NCHW"); const auto* param = attrs.as<AdaptivePool2DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(tir::BijectiveLayout(layout, kNCHW).defined()) << "Adaptive pool2d currently only supports layouts that are convertible from NCHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "Adaptive pool2d does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "Adaptive pool2d does not support input split on width"; ICHECK(inputs[0].ndim() == 4U || inputs[0].ndim() == 5U) << "Pool2D only support 4-D input (e.g., NCHW)" << " or 5-D input (last dimension is a split of channel)"; auto output_size = param->output_size; const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr output_height, output_width; if (output_size.empty()) { output_height = inputs[0]->shape[hidx]; output_width = inputs[0]->shape[widx]; } else if (output_size.size() == 1) { output_height = output_size[0]; output_width = output_size[0]; } else { output_height = output_size[0]; output_width = output_size[1]; } return Array<te::Tensor>{topi::nn::adaptive_pool( inputs[0], Array<IndexExpr>{output_height, output_width}, mode, layout.name())}; } // relay.nn.adaptive_avg_pool2d Expr MakeAdaptiveAvgPool2D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool2DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_avg_pool2d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_avg_pool2d").set_body_typed(MakeAdaptiveAvgPool2D); RELAY_REGISTER_OP("nn.adaptive_avg_pool2d") .describe(R"code(Adaptive average pooling operation for 2D data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **output_size**: If this argument is not provided, input height and width will be used as output height and width. If a single integer is provided for output_size, the output size is (N x C x output_size x output_size) for any input (NCHW). If a tuple of integers (height, width) are provided for output_size, the output size is (N x C x height x width) for any input (NCHW). - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, output_height, output_width) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveAvgPool2D", AdaptivePool2DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool2DCompute<topi::nn::kAvgPool>); // relay.nn.adaptive_max_pool2d Expr MakeAdaptiveMaxPool2D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool2DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_max_pool2d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_max_pool2d").set_body_typed(MakeAdaptiveMaxPool2D); RELAY_REGISTER_OP("nn.adaptive_max_pool2d") .describe(R"code(Adaptive max pooling operation for 2D data. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **output_size**: If this argument is not provided, input height and width will be used as output height and width. If a single integer is provided for output_size, the output size is (N x C x output_size x output_size) for any input (NCHW). If a tuple of integers (height, width) are provided for output_size, the output size is (N x C x height x width) for any input (NCHW). - **out**: This depends on the `layout` parameter. Output is 4D array of shape (batch_size, channels, output_height, output_width) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool2DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveMaxPool2D", AdaptivePool2DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool2DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool2DCompute<topi::nn::kMaxPool>); // relay.nn.adaptive_pool3d TVM_REGISTER_NODE_TYPE(AdaptivePool3DAttrs); bool AdaptivePool3DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) { return false; } const auto dshape = data->shape; ICHECK_GE(dshape.size(), 3U) << "Pool3D only support input >= 3-D: input must have depth, height and width"; const auto* param = attrs.as<AdaptivePool3DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); ICHECK(layout.Contains(LayoutAxis::Get('D')) && layout.Contains(LayoutAxis::Get('H')) && layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('d')) && !layout.Contains(LayoutAxis::Get('h')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool3D layout must have D, H and W, which cannot be split"; const auto didx = layout.IndexOf(LayoutAxis::Get('D')); const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); Array<IndexExpr> oshape(dshape); auto output_size = param->output_size; ICHECK_LE(output_size.size(), 3U) << "output_size can have up to 3 elements."; IndexExpr output_depth, output_height, output_width; if (output_size.empty()) { output_depth = dshape[didx]; output_height = dshape[hidx]; output_width = dshape[widx]; } else if (output_size.size() == 1) { output_depth = output_size[0]; output_height = output_size[0]; output_width = output_size[0]; } else { output_depth = output_size[0]; output_height = output_size[1]; output_width = output_size[2]; } oshape.Set(didx, output_depth); oshape.Set(hidx, output_height); oshape.Set(widx, output_width); // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <topi::nn::PoolType mode> Array<te::Tensor> AdaptivePool3DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCDHW("NCDHW"); const auto* param = attrs.as<AdaptivePool3DAttrs>(); ICHECK(param != nullptr); Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(tir::BijectiveLayout(layout, kNCDHW).defined()) << "Adaptive pool3d currently only supports layouts that are convertible from NCDHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('d')), -1) << "Adaptive pool3d does not support input split on depth"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "Adaptive pool3d does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "Adaptive pool3d does not support input split on width"; ICHECK(inputs[0].ndim() == 5U || inputs[0].ndim() == 6U) << "Pool3D only support 5-D input (e.g., NCDHW)" << " or 6-D input (last dimension is a split of channel)"; auto output_size = param->output_size; const auto didx = layout.IndexOf(LayoutAxis::Get('D')); const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr output_depth, output_height, output_width; if (output_size.empty()) { output_depth = inputs[0]->shape[didx]; output_height = inputs[0]->shape[hidx]; output_width = inputs[0]->shape[widx]; } else if (output_size.size() == 1) { output_depth = output_size[0]; output_height = output_size[0]; output_width = output_size[0]; } else { output_depth = output_size[0]; output_height = output_size[1]; output_width = output_size[2]; } auto osize = Array<IndexExpr>{output_depth, output_height, output_width}; return Array<te::Tensor>{topi::nn::adaptive_pool3d(inputs[0], osize, mode, layout.name())}; } // relay.nn.adaptive_max_pool3d Expr MakeAdaptiveMaxPool3D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool3DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_max_pool3d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_max_pool3d").set_body_typed(MakeAdaptiveMaxPool3D); RELAY_REGISTER_OP("nn.adaptive_max_pool3d") .describe(R"code(Adaptive max pooling operation for 3D data. - **data**: This depends on the `layout` parameter. Input is 5D array of shape (batch_size, channels, depth, height, width) if `layout` is `NCDHW`. - **output_size**: If this argument is not provided, input depth, height and width will be used as output depth, height and width. If a single integer is provided for output_size, the output size is (N x C x output_size x output_size x output_size) for any input (NCDHW). If a tuple of integers (depth, height, width) are provided for output_size, the output size is (N x C x depth x height x width) for any input (NCDHW). - **out**: This depends on the `layout` parameter. Output is 5D array of shape (batch_size, channels, output_depth, output_height, output_width) if `layout` is `NCDHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool3DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveMaxPool3D", AdaptivePool3DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool3DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool3DCompute<topi::nn::kMaxPool>); // relay.nn.adaptive_max_pool3d Expr MakeAdaptiveAvgPool3D(Expr data, Array<IndexExpr> output_size, String layout, String out_layout) { auto attrs = make_object<AdaptivePool3DAttrs>(); attrs->output_size = std::move(output_size); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); static const Op& op = Op::Get("nn.adaptive_avg_pool3d"); return Call(op, {data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.adaptive_avg_pool3d").set_body_typed(MakeAdaptiveAvgPool3D); RELAY_REGISTER_OP("nn.adaptive_avg_pool3d") .describe(R"code(Adaptive avg pooling operation for 3D data. - **data**: This depends on the `layout` parameter. Input is 5D array of shape (batch_size, channels, depth, height, width) if `layout` is `NCDHW`. - **output_size**: If this argument is not provided, input depth, height and width will be used as output depth, height and width. If a single integer is provided for output_size, the output size is (N x C x output_size x output_size x output_size) for any input (NCDHW). If a tuple of integers (depth, height, width) are provided for output_size, the output size is (N x C x depth x height x width) for any input (NCDHW). - **out**: This depends on the `layout` parameter. Output is 5D array of shape (batch_size, channels, output_depth, output_height, output_width) if `layout` is `NCDHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<AdaptivePool3DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(10) .add_type_rel("AdaptiveAvgPool3D", AdaptivePool3DRel) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AdaptivePool3DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", AdaptivePool3DCompute<topi::nn::kAvgPool>); bool Pool2DGradRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 3); const auto* data = types[1].as<TensorTypeNode>(); if (data == nullptr) return false; // assign output type reporter->Assign(types[2], types[1]); return true; } template <typename AttrType, topi::nn::PoolType mode> Array<te::Tensor> Pool2DGradCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCHW("NCHW"); const auto* param = attrs.as<AttrType>(); ICHECK(param != nullptr); ICHECK_EQ(inputs.size(), 2); auto pool_size = param->pool_size; auto strides = param->strides; auto padding = param->padding; auto ceil_mode = param->ceil_mode; Layout layout(param->layout); ICHECK(tir::BijectiveLayout(layout, kNCHW).defined()) << "pool2d_grad currently only supports layouts that are convertible from NCHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "pool2d_grad does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "pool2d_grad does not support input split on width"; ICHECK(inputs[0].ndim() == 4U || inputs[0].ndim() == 5U) << "Pool2DGrad only support 4-D output gradient (e.g., NCHW)" << " or 5-D output gradient (last dimension is a split of channel)"; ICHECK(inputs[1].ndim() == 4U || inputs[1].ndim() == 5U) << "Pool2DGrad only support 4-D input (e.g., NCHW)" << " or 5-D input (last dimension is a split of channel)"; if (param->padding.size() == 1) { padding.push_back(padding[0]); padding.push_back(padding[0]); padding.push_back(padding[0]); } else if (param->padding.size() == 2) { padding.push_back(padding[0]); padding.push_back(padding[1]); } if (mode == topi::nn::kAvgPool) { bool count_include_pad = reinterpret_cast<const AvgPool2DAttrs*>(param)->count_include_pad; return Array<te::Tensor>{topi::nn::pool_grad(inputs[0], inputs[1], pool_size, strides, padding, mode, ceil_mode, layout.name(), count_include_pad)}; } else { return Array<te::Tensor>{topi::nn::pool_grad(inputs[0], inputs[1], pool_size, strides, padding, mode, ceil_mode, layout.name())}; } } // MaxPool2DGrad Expr MakeMaxPool2DGrad(Expr out_grad, Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode) { auto attrs = make_object<MaxPool2DAttrs>(); attrs->pool_size = std::move(pool_size); attrs->strides = std::move(strides); attrs->padding = std::move(padding); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); attrs->ceil_mode = ceil_mode; static const Op& op = Op::Get("nn.max_pool2d_grad"); return Call(op, {out_grad, data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.max_pool2d_grad").set_body_typed(MakeMaxPool2DGrad); RELAY_REGISTER_OP("nn.max_pool2d_grad") .describe(R"code(Gradient of max pooling operation for two dimensional data. - **out_grad**: This depends on the `layout` parameter. Output gradient is 4D array of shape (batch_size, channels, out_height, out_width) if `layout` is `NCHW`. out_height and out_width are the output size of the pooling operation, which are calculated as:: out_height = floor((height+padding[0]+padding[2]-pool_size[0])/strides[0])+1 out_width = floor((width+padding[1]+padding[3]-pool_size[1])/strides[1])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int : bottom, right use same as top and left. four int: padding width in the order of (top, left, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **grad**: This depends on the `layout` parameter. Grad is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<MaxPool2DAttrs>() .set_num_inputs(2) .add_argument("data", "Tensor", "The input tensor.") .add_argument("grad", "Tensor", "The grad tensor.") .set_support_level(2) .add_type_rel("MaxPool2DGrad", Pool2DGradRel) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool2DGradCompute<MaxPool2DAttrs, topi::nn::kMaxPool>); // AvgPool2DGrad Expr MakeAvgPool2DGrad(Expr out_grad, Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode, bool count_include_pad) { auto attrs = make_object<AvgPool2DAttrs>(); attrs->pool_size = std::move(pool_size); attrs->strides = std::move(strides); attrs->padding = std::move(padding); attrs->layout = std::move(layout); attrs->out_layout = std::move(out_layout); attrs->ceil_mode = ceil_mode; attrs->count_include_pad = count_include_pad; static const Op& op = Op::Get("nn.avg_pool2d_grad"); return Call(op, {out_grad, data}, Attrs(attrs), {}); } TVM_REGISTER_GLOBAL("relay.op.nn._make.avg_pool2d_grad").set_body_typed(MakeAvgPool2DGrad); RELAY_REGISTER_OP("nn.avg_pool2d_grad") .describe(R"code(Gradient of average pooling operation for two dimensional data. - **out_grad**: This depends on the `layout` parameter. Output gradient is 4D array of shape (batch_size, channels, out_height, out_width) if `layout` is `NCHW`. out_height and out_width are the output size of the pooling operation, which are calculated as:: out_height = floor((height+padding[0]+padding[2]-pool_size[0])/strides[0])+1 out_width = floor((width+padding[1]+padding[3]-pool_size[1])/strides[1])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int : bottom, right use same as top and left. four int: padding width in the order of (top, left, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. - **data**: This depends on the `layout` parameter. Input is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. - **grad**: This depends on the `layout` parameter. Grad is 4D array of shape (batch_size, channels, height, width) if `layout` is `NCHW`. )code" TVM_ADD_FILELINE) .set_attrs_type<MaxPool2DAttrs>() .set_num_inputs(2) .add_argument("data", "Tensor", "The input tensor.") .add_argument("grad", "Tensor", "The grad tensor.") .set_support_level(2) .add_type_rel("MaxPool2DGrad", Pool2DGradRel) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool2DGradCompute<AvgPool2DAttrs, topi::nn::kAvgPool>); // relay.nn.max_pool1d & relay.nn.avg_pool1d TVM_REGISTER_NODE_TYPE(MaxPool1DAttrs); TVM_REGISTER_NODE_TYPE(AvgPool1DAttrs); template <typename AttrType> bool Pool1DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) return false; const auto dshape = data->shape; ICHECK_GE(dshape.size(), 1U) << "Pool1D only support input >= 1-D: input must have width"; const auto param = attrs.as<AttrType>(); ICHECK(param != nullptr); Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool1D layout must have W, which cannot be split"; const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr pad_w; if (param->padding.size() == 1) { pad_w = param->padding[0] * 2; } else if (param->padding.size() == 2) { // (left, right) pad_w = param->padding[0] + param->padding[1]; } else { return false; } std::vector<IndexExpr> oshape(dshape.begin(), dshape.end()); if (dshape[widx].as<tir::AnyNode>()) { oshape[widx] = dshape[widx]; } else { oshape[widx] = calculate_pool_dimension(dshape[widx], pad_w, param->pool_size[0], param->dilation[0], param->strides[0], param->ceil_mode); } // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <typename AttrType, topi::nn::PoolType mode> Array<te::Tensor> Pool1DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCW("NCW"); const auto* param = attrs.as<AttrType>(); ICHECK(param != nullptr); auto pool_size = param->pool_size; auto strides = param->strides; auto dilation = param->dilation; auto padding = param->padding; auto ceil_mode = param->ceil_mode; Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(tir::BijectiveLayout(layout, kNCW).defined()) << "max_pool1d currently only supports layouts that are convertible from NCW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "max_pool1d does not support input split on width"; ICHECK(inputs[0].ndim() == 3U || inputs[0].ndim() == 4U || inputs[0].ndim() == 5U) << "Pool1D only support 3-D input (e.g., NCW)" << " or 4-D input (e.g. NCWc on for vector instructions)" << " or 5-D input (e.g. NCWnc for tensor accelerators)"; if (param->padding.size() == 1) { padding.push_back(padding[0]); } if (mode == topi::nn::kAvgPool) { bool count_include_pad = reinterpret_cast<const AvgPool1DAttrs*>(param)->count_include_pad; return Array<te::Tensor>{topi::nn::pool1d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name(), count_include_pad)}; } else { return Array<te::Tensor>{topi::nn::pool1d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name())}; } } TVM_REGISTER_GLOBAL("relay.op.nn._make.max_pool1d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode) { return MakeMaxPool<MaxPool1DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, "nn.max_pool1d"); }); RELAY_REGISTER_OP("nn.max_pool1d") .describe(R"code(Max pooling operation for one dimensional data. - **data**: This depends on the `layout` parameter. Input is 3D array of shape (batch_size, channels, width) if `layout` is `NCW`. - **out**: This depends on the `layout` parameter. Output is 3D array of shape (batch_size, channels, , out_width) if `layout` is `NCW`. out_width is calculated as:: out_width = floor((width+padding[0]+padding[1]-pool_size[0])/strides[0])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int: padding width in the order of (left, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<MaxPool1DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("MaxPool1D", Pool1DRel<MaxPool1DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<MaxPool1DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool1DCompute<MaxPool1DAttrs, topi::nn::kMaxPool>); // AvgPool1D TVM_REGISTER_GLOBAL("relay.op.nn._make.avg_pool1d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode, bool count_include_pad) { return MakeAvgPool<AvgPool1DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, count_include_pad, "nn.avg_pool1d"); }); RELAY_REGISTER_OP("nn.avg_pool1d") .describe(R"code( Average pooling operation for one dimensional data. - **data**: This depends on the `layout` parameter. Input is 3D array of shape (batch_size, channels, width) if `layout` is `NCW`. - **out**: This depends on the `layout` parameter. Output is 3D array of shape (batch_size, channels, out_width) if `layout` is `NCW`. out_width is calculated as:: out_width = floor((width+padding[0]+padding[1]-pool_size[0])/strides[0])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. two int: padding width in the order of (left, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<AvgPool1DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("AvgPool1D", Pool1DRel<AvgPool1DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AvgPool1DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool1DCompute<AvgPool1DAttrs, topi::nn::kAvgPool>); // relay.nn.max_pool3d & relay.nn.avg_pool3d TVM_REGISTER_NODE_TYPE(MaxPool3DAttrs); TVM_REGISTER_NODE_TYPE(AvgPool3DAttrs); template <typename AttrType> bool Pool3DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, const TypeReporter& reporter) { ICHECK_EQ(types.size(), 2); const auto* data = types[0].as<TensorTypeNode>(); if (data == nullptr) return false; const auto dshape = data->shape; ICHECK_GE(dshape.size(), 3U) << "Pool3D only support input >= 3-D: input must have depth, height and width"; const auto param = attrs.as<AttrType>(); ICHECK(param != nullptr); Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(layout.Contains(LayoutAxis::Get('D')) && layout.Contains(LayoutAxis::Get('H')) && layout.Contains(LayoutAxis::Get('W')) && !layout.Contains(LayoutAxis::Get('d')) && !layout.Contains(LayoutAxis::Get('h')) && !layout.Contains(LayoutAxis::Get('w'))) << "Invalid layout " << layout << ". Pool3D layout must have D, H and W, which cannot be split"; const auto didx = layout.IndexOf(LayoutAxis::Get('D')); const auto hidx = layout.IndexOf(LayoutAxis::Get('H')); const auto widx = layout.IndexOf(LayoutAxis::Get('W')); IndexExpr pad[3]; if (param->padding.size() == 1) { pad[0] = param->padding[0] * 2; pad[1] = param->padding[0] * 2; pad[2] = param->padding[0] * 2; } else if (param->padding.size() == 3) { // (front, top, left) pad[0] = param->padding[0] * 2; pad[1] = param->padding[1] * 2; pad[2] = param->padding[2] * 2; } else if (param->padding.size() == 6) { // (front, top, left, back, bottom, right) pad[0] = param->padding[0] + param->padding[3]; pad[1] = param->padding[1] + param->padding[4]; pad[2] = param->padding[2] + param->padding[5]; } else { return false; } std::vector<IndexExpr> oshape(dshape.begin(), dshape.end()); int idxes[3] = {didx, hidx, widx}; for (int i = 0; i < 3; i++) { int ii = idxes[i]; if (dshape[ii].as<tir::AnyNode>()) { oshape[ii] = dshape[ii]; } else { oshape[ii] = calculate_pool_dimension(dshape[ii], pad[i], param->pool_size[i], param->dilation[i], param->strides[i], param->ceil_mode); } } // assign output type reporter->Assign(types[1], TensorType(oshape, data->dtype)); return true; } template <typename AttrType, topi::nn::PoolType mode> Array<te::Tensor> Pool3DCompute(const Attrs& attrs, const Array<te::Tensor>& inputs, const Type& out_type) { static const Layout kNCDHW("NCDHW"); const auto* param = attrs.as<AttrType>(); ICHECK(param != nullptr); auto pool_size = param->pool_size; auto strides = param->strides; auto dilation = param->dilation; auto padding = param->padding; auto ceil_mode = param->ceil_mode; Layout layout(param->layout); Layout out_layout(param->out_layout); ICHECK(tir::BijectiveLayout(layout, kNCDHW).defined()) << "max_pool3d currently only supports layouts that are convertible from NCDHW"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('d')), -1) << "max_pool3d does not support input split on depth"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('h')), -1) << "max_pool3d does not support input split on height"; ICHECK_EQ(layout.IndexOf(LayoutAxis::Get('w')), -1) << "max_pool3d does not support input split on width"; ICHECK(inputs[0].ndim() == 4U || inputs[0].ndim() == 5U || inputs[0].ndim() == 6U) << "Pool3D only support 5-D input (e.g., NCDHW)" << " or 6-D input (e.g. NCDHWc on for vector instructions)" << " or 7-D input (e.g. NCDHWnc for tensor accelerators)"; if (param->padding.size() == 1) { padding.push_back(padding[0]); padding.push_back(padding[0]); padding.push_back(padding[0]); } else if (param->padding.size() == 3) { padding.push_back(padding[0]); padding.push_back(padding[1]); padding.push_back(padding[2]); } if (mode == topi::nn::kAvgPool) { bool count_include_pad = reinterpret_cast<const AvgPool3DAttrs*>(param)->count_include_pad; return Array<te::Tensor>{topi::nn::pool3d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name(), count_include_pad)}; } else { return Array<te::Tensor>{topi::nn::pool3d(inputs[0], pool_size, strides, dilation, padding, mode, ceil_mode, layout.name())}; } } TVM_REGISTER_GLOBAL("relay.op.nn._make.max_pool3d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode) { return MakeMaxPool<MaxPool3DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, "nn.max_pool3d"); }); RELAY_REGISTER_OP("nn.max_pool3d") .describe(R"code(Max pooling operation for three dimensional data. - **data**: This depends on the `layout` parameter. Input is 5D array of shape (batch_size, channels, depth, height, width) if `layout` is `NCDHW`. - **out**: This depends on the `layout` parameter. Output is 5D array of shape (batch_size, channels, out_depth, out_height, out_width) if `layout` is `NCDHW`. out_depth, out_height and out_width are calculated as:: out_depth = floor((depth+padding[0]+padding[3]-pool_size[0])/strides[0])+1 out_height = floor((height+padding[1]+padding[4]-pool_size[1])/strides[1])+1 out_width = floor((width+padding[2]+padding[5]-pool_size[2])/strides[2])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. three int : front, bottom, right use same as back, top and left. six int: padding width in the order of (front, top, left, back, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<MaxPool3DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("MaxPool3D", Pool3DRel<MaxPool3DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<MaxPool3DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool3DCompute<MaxPool3DAttrs, topi::nn::kMaxPool>); // AvgPool3D TVM_REGISTER_GLOBAL("relay.op.nn._make.avg_pool3d") .set_body_typed([](Expr data, Array<IndexExpr> pool_size, Array<IndexExpr> strides, Array<IndexExpr> dilation, Array<IndexExpr> padding, String layout, String out_layout, bool ceil_mode, bool count_include_pad) { return MakeAvgPool<AvgPool3DAttrs>(data, pool_size, strides, dilation, padding, layout, out_layout, ceil_mode, count_include_pad, "nn.avg_pool3d"); }); RELAY_REGISTER_OP("nn.avg_pool3d") .describe(R"code( Average pooling operation for three dimensional data. - **data**: This depends on the `layout` parameter. Input is 5D array of shape (batch_size, channels, depth, height, width) if `layout` is `NCDHW`. - **out**: This depends on the `layout` parameter. Output is 5D array of shape (batch_size, channels, out_depth, out_height, out_width) if `layout` is `NCDHW`. out_depth, out_height and out_width are calculated as:: out_depth = floor((depth+padding[0]+padding[3]-pool_size[0])/strides[0])+1 out_height = floor((height+padding[1]+padding[4]-pool_size[1])/strides[1])+1 out_width = floor((width+padding[2]+padding[5]-pool_size[2])/strides[2])+1 where padding will be an expanded array based on number of values passed as:: one int : all sides same padding used. three int : front, bottom, right use same as back, top and left. six int: padding width in the order of (front, top, left, back, bottom, right). When `ceil_mode` is `True`, ceil will be used instead of floor in this equation. )code" TVM_ADD_FILELINE) .set_attrs_type<AvgPool3DAttrs>() .set_num_inputs(1) .add_argument("data", "Tensor", "The input tensor.") .set_support_level(2) .add_type_rel("AvgPool3D", Pool3DRel<AvgPool3DAttrs>) .set_attr<FInferCorrectLayout>("FInferCorrectLayout", PoolInferCorrectLayout<AvgPool3DAttrs>) .set_attr<TOpPattern>("TOpPattern", kOutEWiseFusable) .set_attr<FTVMCompute>("FTVMCompute", Pool3DCompute<AvgPool3DAttrs, topi::nn::kAvgPool>); } // namespace relay } // namespace tvm
e85de799d2f3e50e5a0af9da2554a31cda7b26ea
d5200712c2e5485fc122b608161eac50d8abedff
/BZOJ/BZOJ4176.cpp
40d8cac13f52547c0598ab1a52696ebcba5370a0
[]
no_license
CSHwang4869/Online-Judge-Solutions
0f416b219616d7eb2d1e979b4690491c17230597
f5e6e3f9722b660955b97e147e14817270c169c4
refs/heads/master
2021-09-26T08:01:39.141055
2021-09-17T06:09:18
2021-09-17T06:09:18
150,004,099
4
1
null
null
null
null
UTF-8
C++
false
false
1,507
cpp
BZOJ4176.cpp
#include <stdio.h> #include <stdlib.h> #include <algorithm> #define ll long long #define DEBUG printf("Passing [%s] in Line %d\n" , __FUNCTION__ , __LINE__) ; const int lim = 2e6 , MAX_N = 2e6 + 10 , mod = 1e9 + 7 ; bool vis[MAX_N] ; int sum[MAX_N] , ans[MAX_N] ; int n , m , tot , mu[MAX_N] , pri[MAX_N] ; void init() { mu[1] = sum[1] = 1 ; m = std::min(n , lim) ; for (int i = 2 ; i <= m ; ++i) { if (!vis[i]) {mu[i] = -1 ; pri[tot++] = i ;} for (int j = 0 ; j < tot ; ++j) { int tmp = i * pri[j] ; if (tmp > m) break ; vis[tmp] = 1 ; if (i % pri[j]) mu[tmp] = -mu[i] ; else {mu[tmp] = 0 ; break ;} } sum[i] = (sum[i - 1] + mod + mu[i]) % mod ; } } int count(int m) { if (m <= lim) return sum[m] ; if (ans[n / m] != -1) return ans[n / m] ; int res = 1 ; for (int L = 2 ; L <= m ;) { int t = m / L , R = m / t ; res = (res + mod - (ll)count(t) * (R - L + 1) % mod) % mod ; L = R + 1 ; } return (ans[n / m] = res) ; } int getsum(int n) { int res = 0 ; for (int L = 1 ; L <= n ;) { int t = n / L , R = n / t ; res = (res + (ll)t * (R - L + 1)) % mod ; L = R + 1 ; } return (ll)res * res % mod ; } int main() { scanf("%d" , &n) ; init() ; for (int i = 0 ; i <= n / lim ; ++i) ans[i] = -1 ; count(n) ; int last = 0 , res = 0 ; for (int L = 1 ; L <= n ;) { int t = n / L , R = n / t , psum = count(R) , S = getsum(t) ; res = (res + (ll)S * (psum + mod - last)) % mod ; L = R + 1 ; last = psum ; } printf("%d\n" , res) ; return 0 ; }
690b0e6b927dda9b81d03b7c77819ac75c714213
0b600fe68cc64779710950952d3d8bed1d3ef809
/AutowareAuto/src/mapping/point_cloud_mapping/test/test_pc_mapper.cpp
02c21034887a93130ea53e8e0d60fa0fbf659f88
[ "Apache-2.0" ]
permissive
JRestovich/Docker-Plantium
13957695afff2862fdddcaa75e563b41da1c06ac
efbf4f7baf4f6bfe22fe337bd46273429ea429b8
refs/heads/master
2023-08-05T09:13:00.270353
2021-09-13T21:23:00
2021-09-13T21:23:00
406,120,080
0
0
null
null
null
null
UTF-8
C++
false
false
8,541
cpp
test_pc_mapper.cpp
// Copyright 2020 the Autoware Foundation // // 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. // // Co-developed by Tier IV, Inc. and Apex.AI, Inc. /// \copyright Copyright 2020 the Autoware Foundation /// All rights reserved. #include "test_pc_mapper.hpp" #include <point_cloud_mapping/point_cloud_mapper.hpp> #include <tf2_sensor_msgs/tf2_sensor_msgs.h> #include <gtest/gtest.h> #include <string> #include <memory> #include <utility> #include <vector> using autoware::mapping::point_cloud_mapping::PlainPointCloudMap; using autoware::mapping::point_cloud_mapping::MapUpdateType; using autoware::mapping::point_cloud_mapping::PCMapperTestContext; using autoware::mapping::point_cloud_mapping::PrefixGeneratorBase; using autoware::mapping::point_cloud_mapping::MockLocalizer; using autoware::mapping::point_cloud_mapping::PointCloudMapper; using autoware::mapping::point_cloud_mapping::CapacityTrigger; using autoware::mapping::point_cloud_mapping::PCLCloud; using autoware::mapping::point_cloud_mapping::check_pc_equal; using autoware::mapping::point_cloud_mapping::MockLocalizerSummary; using autoware::mapping::point_cloud_mapping::Cloud; class PCMapperTest : public PCMapperTestContext, public ::testing::Test {}; class MockPrefixGenerator : public PrefixGeneratorBase<MockPrefixGenerator> { public: std::string get_(const std::string & base_prefix) const noexcept { return base_prefix; } }; TEST_F(PCMapperTest, core) { const std::string fn_prefix{"pc_mapper_test"}; auto register_and_check = [](const auto & pc, const auto & tf, auto update, auto & mapper) { geometry_msgs::msg::PoseWithCovarianceStamped pose_out; const auto sum = mapper.register_measurement( pc, geometry_msgs::msg::TransformStamped{}, pose_out); EXPECT_EQ(sum.map_update_summary.update_type, update); EXPECT_EQ(sum.map_update_summary.num_added_pts, pc.width); EXPECT_EQ(sum.map_increment->width, pc.width); EXPECT_DOUBLE_EQ(tf.transform.translation.x, pose_out.pose.pose.position.x); EXPECT_DOUBLE_EQ(tf.transform.translation.y, pose_out.pose.pose.position.y); EXPECT_DOUBLE_EQ(tf.transform.translation.z, pose_out.pose.pose.position.z); EXPECT_DOUBLE_EQ(tf.transform.rotation.x, pose_out.pose.pose.orientation.x); EXPECT_DOUBLE_EQ(tf.transform.rotation.y, pose_out.pose.pose.orientation.y); EXPECT_DOUBLE_EQ(tf.transform.rotation.z, pose_out.pose.pose.orientation.z); EXPECT_DOUBLE_EQ(tf.transform.rotation.w, pose_out.pose.pose.orientation.w); }; { auto localizer = std::make_unique<MockLocalizer>(m_tf1, m_tf2); PlainPointCloudMap pc_map(m_pc1.width + m_pc2.width + 10U, map_frame); geometry_msgs::msg::PoseWithCovarianceStamped dummy; PointCloudMapper<MockLocalizer, PlainPointCloudMap, CapacityTrigger, MockPrefixGenerator> mapper{fn_prefix, std::move(pc_map), std::move(localizer), map_frame}; geometry_msgs::msg::TransformStamped identity{}; identity.transform.rotation.w = 1.0; // First pc is centered on the map. register_and_check(m_pc0, identity, MapUpdateType::NEW, mapper); register_and_check(m_pc1, m_tf1, MapUpdateType::UPDATE, mapper); register_and_check(m_pc2, m_tf2, MapUpdateType::UPDATE, mapper); } PCLCloud final_map; const auto file_name = fn_prefix + ".pcd"; pcl::io::loadPCDFile(file_name, final_map); check_pc_equal(m_expected_map, final_map); remove(file_name.c_str()); } /////////////////////////////////////////////// constexpr char const * PCMapperTestContext::frame0; constexpr char const * PCMapperTestContext::frame1; constexpr char const * PCMapperTestContext::frame2; constexpr char const * PCMapperTestContext::map_frame; MockLocalizer::MockLocalizer( const geometry_msgs::msg::TransformStamped & tf1, const geometry_msgs::msg::TransformStamped & tf2) { auto tf_to_pose = [](const geometry_msgs::msg::TransformStamped & tf, decltype(m_fixed_estimate1) & pose) { pose.header.frame_id = tf.header.frame_id; auto t = tf.transform.translation; auto r = tf.transform.rotation; pose.pose.pose.position.set__x(t.x).set__y(t.y).set__z(t.z); pose.pose.pose.orientation.set__x(r.x).set__y(r.y).set__z(r.z).set__w(r.w); }; tf_to_pose(tf1, m_fixed_estimate1); tf_to_pose(tf2, m_fixed_estimate2); set_map_valid(); } /// Get the frame id of the current map. const std::string & MockLocalizer::map_frame_id() const noexcept { return m_map_frame; } /// Get the timestamp of the current map. std::chrono::system_clock::time_point MockLocalizer::map_stamp() const noexcept { return std::chrono::system_clock::now(); } /// `set_map` implementation. void MockLocalizer::set_map_impl(const Cloud &) {} /// `insert_to_map` implementation void MockLocalizer::insert_to_map_impl(const Cloud &) {} MockLocalizerSummary MockLocalizer::register_measurement_impl( const Cloud & msg, const MockLocalizer::Transform &, MockLocalizer::PoseWithCovarianceStamped & pose_out) { pose_out = (msg.header.frame_id == PCMapperTestContext::frame1) ? m_fixed_estimate1 : m_fixed_estimate2; return MockLocalizerSummary{}; } PCMapperTestContext::PCMapperTestContext() { using Point = common::types::PointXYZIF; auto make_tf = [](auto x, auto y, auto z, auto r, auto p, auto yaw, const auto & frame) { geometry_msgs::msg::TransformStamped tf_stamped; auto & tf = tf_stamped.transform; tf.translation.set__x(x).set__y(y).set__z(z); tf2::Quaternion q; q.setRPY(r, p, yaw); tf.rotation.set__x(q.x()).set__y(q.y()).set__z(q.z()).set__w(q.w()); tf_stamped.header.frame_id = map_frame; tf_stamped.child_frame_id = frame; return tf_stamped; }; auto make_pc = [](auto & pc, const auto & frame, auto num_pts, auto diff) { auto make_base_pts = [](std::size_t num_pts, float_t diff) { std::vector<Point> pts; for (auto i = 1U; i < num_pts + 1U; ++i) { pts.push_back({0.0, static_cast<float_t>(i) * diff, 0.0, 0.0}); } return pts; }; const auto pts1 = make_base_pts(num_pts, diff); common::lidar_utils::init_pcl_msg(pc, frame, pts1.size()); auto pc_idx = 0U; for (const auto & pt : pts1) { common::lidar_utils::add_point_to_cloud(pc, pt, pc_idx); } }; make_pc(m_pc0, frame0, 2U, 4.2F); make_pc(m_pc1, frame1, 3U, 2.0F); make_pc(m_pc2, frame2, 7U, 1.5F); m_tf1 = make_tf(1, 2, 3, 0.1, 1.4, -0.7, frame1); m_tf2 = make_tf(5, 8, 10, -1.1, 0.0, 0.4, frame2); make_map(); } void PCMapperTestContext::make_map() { Cloud pc1_map, pc2_map; common::lidar_utils::init_pcl_msg(pc1_map, map_frame, m_pc1.width); common::lidar_utils::init_pcl_msg(pc2_map, map_frame, m_pc2.width); tf2::doTransform(m_pc1, pc1_map, m_tf1); tf2::doTransform(m_pc2, pc2_map, m_tf2); append_to_pcl(m_pc0, m_expected_map); // first message should be on the map frame. append_to_pcl(pc1_map, m_expected_map); append_to_pcl(pc2_map, m_expected_map); } void autoware::mapping::point_cloud_mapping::append_to_pcl(const Cloud & pc, PCLCloud & res) { const auto check_not_end = [](const auto & its) { return std::all_of(its.cbegin(), its.cend(), [](const auto & it) {return it != it.end();}); }; std::array<sensor_msgs::PointCloud2ConstIterator<float_t>, 4U> pc_its = { sensor_msgs::PointCloud2ConstIterator<float_t>(pc, "x"), sensor_msgs::PointCloud2ConstIterator<float_t>(pc, "y"), sensor_msgs::PointCloud2ConstIterator<float_t>(pc, "z"), sensor_msgs::PointCloud2ConstIterator<float_t>(pc, "intensity") }; auto pc_idx = 0U; for (; check_not_end(pc_its); ++pc_idx) { // Transfer the point from the observation to the map and advance the iterators. pcl::PointXYZI pt; pt.x = *pc_its[0]; pt.y = *pc_its[1]; pt.z = *pc_its[2]; pt.intensity = *pc_its[3]; res.push_back(pt); // Advance the iterators. for (auto idx = 0U; idx < 4U; ++idx) { ++pc_its[idx]; } } }
d61c8ad6a4c8adaca61b6d3d201010dfd6dc67a6
2a0c68fb9252551eca14bbf1f985e6dc81f80ea6
/Content/code-samples/c++/QuestSystem/Quests/TutorialQuests/ActionTutorialQuests/ActionTutorial.hpp
27f0d0ce1a82b88444330f9fc0c2365a86c82007
[]
no_license
goremykin-michael/Hyperion
ea294465846e692fe21b6f35a5e583578e4ce3ba
8fe40598b982459ebb8bbb2c7e5baf0df4f965d9
refs/heads/master
2016-09-06T18:50:07.537733
2015-05-25T11:32:27
2015-05-25T11:32:27
31,139,021
0
0
null
null
null
null
UTF-8
C++
false
false
9,856
hpp
ActionTutorial.hpp
#ifndef ACTIONTUTORIAL_H #define ACTIONTUTORIAL_H #include "DungeonsIncludes.h" #include "Graphics/GUI/Bars/QuestBar.h" #include "Gameplay/QuestSystem/Quest.h" #include "Gameplay/QuestSystem/Quests/TutorialQuests/ActionTutorialQuests/BattleTutorial.hpp" #include "Gameplay/QuestSystem/Quests/TutorialQuests/ActionTutorialQuests/InventoryTutorial.hpp" #include "Gameplay/QuestSystem/Quests/TutorialQuests/ActionTutorialQuests/MovementTutorial.hpp" #include "Gameplay/QuestSystem/Quests/TutorialQuests/ActionTutorialQuests/ObjectOnMapInteractionTutorial.hpp" #include "Utils/Text/TextUtils.h" #define NUMBER_OF_SECONDS_AFTER_FAIRY_APPEARS 2 #define NUMBER_OF_SECONDS_AFTER_FAIRY_STARTS_TALKING 2 class ActionTutorial : public Quest { THISIS(ActionTutorial); public: //----------------------------------ActionTutorial----------------------------------// ActionTutorial() : _pFairyAppearedTimer(nullptr), _pFairyStartsTalkingTimer(nullptr) { _princessDialogDescription.sBackgroundImagePath = "assets/interface/dialogs/conversation-dialog/background-paper-1.png"; _princessDialogDescription.sCharacterImagePath = "assets/interface/dialogs/conversation-dialog/conversation-character-1.png"; _princessDialogDescription.sCharacterName = "Fairy"; _L("character.fairy.name"); LISTEN_TO(QuestCompletionInfo); addSubquest(new MovementTutorial()); addSubquest(new ObjectOnMapInteractionTutorial()); addSubquest(new InventoryTutorial()); addSubquest(new BattleTutorial()); } virtual ~ActionTutorial() { } //------------------------------Declarative Description-----------------------------// virtual QuestButtonDescription getQuestButtonDescription() { QuestButtonDescription questButtonDescription; questButtonDescription.sIconImagePath = "assets/interface/bars/quest-bar/quest-icon1.png"; questButtonDescription.bUseProgressLabel = true; questButtonDescription.iNumberOfSteps = 4; return questButtonDescription; } virtual QuestDialogDescription getQuestDialogDescription() { QuestDialogDescription questDialogDescription; questDialogDescription.sBackgroundImagePath = "assets/interface/dialogs/quest-dialog/quest-dialog-background1.png"; questDialogDescription.sCharacterImagePath = "assets/interface/dialogs/quest-dialog/quest-character-fairy.png"; return questDialogDescription; } virtual QuestDescription getQuestDescription() { QuestDescription questDescription; questDescription.sRewardItemSummary.push_back("axe"); questDescription.sRewardItemSummary.push_back("the fairy"); questDescription.sRewardItemSummary.push_back("(optionally) health\nbottles (x2)"); questDescription.sSummary = "To get out of the dungeon alive,\nyou should learn how to behave\nin this world."; questDescription.sTitle = "Get Out Of The Dungeon"; _L("quest.actionTutorial.rewardItemSummary.1"); _L("quest.actionTutorial.rewardItemSummary.2"); _L("quest.actionTutorial.rewardItemSummary.3"); _L("quest.actionTutorial.summary"); _L("quest.actionTutorial.title"); return questDescription; } //--------------------------------------Quest---------------------------------------// virtual QuestID getQuestID() { return kActionTutorialID; } virtual bool isSkippable() { return false; } virtual void saveState() { } virtual void restoreState() { } virtual void cleanup() { UNLISTEN_TO(MapLoadedEvent); UNLISTEN_TO(DialogShowedEvent); UNLISTEN_TO(QuestCompletionInfo); if(_pFairyAppearedTimer != nullptr) { delete _pFairyAppearedTimer; } if(_pFairyStartsTalkingTimer != nullptr) { delete _pFairyStartsTalkingTimer; } } //-------------------------------Game Event Listeners-------------------------------// EVENT_LISTENER(MapLoadedEvent) { MapLoadedEvent * pMapLoadedEvent = reinterpret_cast<MapLoadedEvent *>(from->sender); if(pMapLoadedEvent->sMapName == "map-tutorial") { UNLISTEN_TO(MapLoadedEvent); GameAPI::Instance()->setPlayerTargetResponseToPointOnly(CCPoint(-345, -456)); _pHero = GameAPI::Instance()->getObjectByName("Hero"); _pFairy = GameAPI::Instance()->getObjectByName("fairy"); _pFairy->getSprite()->setVisible(false); _pFairyAppearedTimer = new Timer(); _pFairyAppearedTimer->initWith(NUMBER_OF_SECONDS_AFTER_FAIRY_APPEARS); connect(_pFairyAppearedTimer->eventTimeOut, this, &ActionTutorial::onFairyAppearedTimeOut); _pFairyAppearedTimer->start(); GameAPI::Instance()->getButtonByID(kDigButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kUndigButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kWorkshopButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kDecorationButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kRefinementButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kTrapButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kAchievementsButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kCollectionsButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kInventoryButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kFriendsButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kWarehouseButtonID)->setEnabled(false); GameAPI::Instance()->getButtonByID(kMenuButtonID)->setEnabled(true); } } EVENT_LISTENER(DialogShowedEvent) { Dialog * pDialog = (reinterpret_cast<DialogShowedEvent *>(from->sender))->pDialog; if(pDialog->getDialogID() == kQuestDialogID) { for(unsigned int i = 0; i < _subquests.size(); ++i) { if(!_subquests[i]->isCompleted() && !_subquests[i]->isStarted()) // quest is not started { bool bAnySubquestIsInProgress = false; for(unsigned int i = 0; i < _subquests.size(); ++i) { if(_subquests[i]->isStarted()) { bAnySubquestIsInProgress = true; break; } } // if any subquest is in progress // then current quest's start button is disabled if(bAnySubquestIsInProgress) { break; } // if there is not any subquest in progress // check if current quest should be next to start else { int iNextSubquestToStart; for(unsigned int i = 0; i < _subquests.size(); ++i) { if(!_subquests[i]->isCompleted()) { iNextSubquestToStart = i; break; } } // add an arrow pointer to the corresponding subquest start button ButtonID startSubquestButtonID; switch(iNextSubquestToStart) { case 0: // MovementTutorial startSubquestButtonID = kStartSubquest1ButtonID; break; case 1: // ObjectOnMapInteractionTutorial startSubquestButtonID = kStartSubquest2ButtonID; break; case 2: // InventoryTutorial startSubquestButtonID = kStartSubquest3ButtonID; break; case 3: // BattleTutorial UNLISTEN_TO(DialogShowedEvent); startSubquestButtonID = kStartSubquest4ButtonID; break; } Button * pStartSubquestButton = pDialog->getButtonByID(startSubquestButtonID); if(pStartSubquestButton != nullptr) { GameAPI::Instance()->pointArrowAtObject(pStartSubquestButton, kArrowPointerDirectionLeft); } Button * pCloseQuestDialogButton = pDialog->getButtonByID(kCloseQuestDialogID); pCloseQuestDialogButton->setEnabled(false); break; } } } } } EVENT_LISTENER(QuestCompletionInfo) { QuestCompletionInfo * pQuestCompletionInfo = reinterpret_cast<QuestCompletionInfo *>(from->sender); if(pQuestCompletionInfo->questID == kMovementTutorialID) { addArrowToQuestButton(); } else if(pQuestCompletionInfo->questID == kObjectOnMapInteractionTutorialID) { addArrowToQuestButton(); } else if(pQuestCompletionInfo->questID == kInventoryTutorialID) { addArrowToQuestButton(); } else if(pQuestCompletionInfo->questID == kBattleTutorialID) { UNLISTEN_TO(QuestCompletionInfo); } } protected: //--------------------------------------Quest---------------------------------------// virtual void onSetPassive() { LISTEN_TO(MapLoadedEvent); } //----------------------------------ActionTutorial----------------------------------// GameObject * _pHero; GameObject * _pFairy; ConversationDialogDescription _princessDialogDescription; Timer * _pFairyAppearedTimer; void onFairyAppearedTimeOut(float fUnused) { _pFairy->getSprite()->setVisible(true); _pFairy->setAnimationActive(kAnimationStatAppear, _pHero); _pFairyStartsTalkingTimer = new Timer(); _pFairyStartsTalkingTimer->initWith(NUMBER_OF_SECONDS_AFTER_FAIRY_STARTS_TALKING); connect(_pFairyStartsTalkingTimer->eventTimeOut, this, &ActionTutorial::onFairyStartsTalkingTimeOut); _pFairyStartsTalkingTimer->start(); } Timer * _pFairyStartsTalkingTimer; void onFairyStartsTalkingTimeOut(float fUnused) { _princessDialogDescription.sCharacterLine = "Hello, stranger!\n \ I am the Fairy.\n \ \n \ I will teach you,\n \ how to behave\n \ in this world!\n \ \n \ Check your first quest!"; _L("quest.actionTutorial.line.firstDialog"); //string sTemp = TextDataProvider::Instance()->getText("quest.actionTutorial.line.firstDialog"); GameAPI::Instance()->showConversationDialog(_princessDialogDescription, bind(&ActionTutorial::onFirstConversationDialogClosed, this, placeholders::_1)); } void onFirstConversationDialogClosed(bool bAccepted) { setExplicit(); addArrowToQuestButton(); LISTEN_TO(DialogShowedEvent); } void addArrowToQuestButton() { vector<QuestButton*> questButtons = QuestBar::Instance()->getItems<QuestButton>(); if(!questButtons.empty()) { GameAPI::Instance()->pointArrowAtObject(questButtons[0], kArrowPointerDirectionLeft); } } }; #endif //ACTIONTUTORIAL_H
33f792533fb72d975ef2623aeb40098092258ccc
06bcfe30ea72e4835e7278b9f155e9f91d69eefe
/sixth-week/week6_dynamic_programming2/gift.cpp
337558295fce3831a986ed6155a23299dbbee0c9
[]
no_license
mauropasse/algorithms
96bf24cbcffe48e4e24a2fcd2bc815115a495691
6bfecc6c28de1e800ba65bed20ed6134856de5a2
refs/heads/master
2021-04-26T22:22:10.839549
2018-03-06T20:49:04
2018-03-06T20:49:04
124,080,188
0
0
null
null
null
null
UTF-8
C++
false
false
3,441
cpp
gift.cpp
#include <iostream> #include <cstdlib> #include <iomanip> #include <vector> using namespace std; int loop(void) { int n; cout << endl; //cin >> n; //////////////////////////////////////// vector<long> res; long sumatoria = 0; int indice = 0; long max_num = rand()%500; while(true) { long random = rand()%30 + 1; if(sumatoria + random < max_num) { res.push_back(random); sumatoria += random; cout << random << ' '; } else { random = max_num - sumatoria; sumatoria += random; res.push_back(random); cout << random << ' '; cout << "sumatoria: "<<sumatoria << endl; sumatoria = 0; if(++indice == 3) break; } } cout << endl; //////////////////////////////////////// n = res.size(); vector<int> w(n+1); vector<int> v(n+1); vector<int> r(n+1); int index = 0; int idx = 0; v[0] = w[0] = 0; for(int i=1;i<=n;i++) v[i] = w[i] = res[i-1]; //for(int i=1;i<=n;i++) // cout << v[i] << " "; //cout << endl; //for(int i=1;i<=n;i++) // cin >> w[i]; //for(int i=1;i<=n;i++) // v[i] = w[i]; long W =0; for(int i=0;i<=n;i++) W += w[i]; if (W%3 == 0) { W = W/3; cout << "Es divisible!" << endl; } else { cout << "W: " << W << endl; cout << "No es divisible!" << endl; cout << 0 << endl; return 0; } vector<vector<long> > value; value.resize(W+1); for(long w=0;w<=W;w++) value[w].resize(n+1); for(long w=0;w<=W;w++) value[w][0] = 0; for(long j=0;j<=n;j++) value[0][j] = 0; int count = 0; while(true) { count++; for(long i=1;i<=n;i++) { for(long j=1;j<=W;j++) { value[j][i] = value[j][i-1]; if (w[i]<=j) { long val = value[j - w[i]][i-1] + v[i]; value[j][i] = max(value[j][i],val); } } } long i = n; for(long j=W;i>0;i--) { if(j<w[i]) continue; long pre_val = value[j-w[i]][i-1]; if(value[j][i] == value[j][i-1]) continue; else if(value[j][i] == pre_val + v[i]) { j = j - w[i]; //////////////////////////////////////// r[index++] = v[i]; //////////////////////////////////////// v[i] = w[i] = 0; } } //////////////////////////////////////// int result = 0; for(int i=idx;i<index;i++) { result += r[i]; cout << r[i] << '+'; } cout << " = " << result << endl; idx=index; //////////////////////////////////////// if(value[W][n] == W && count == 3) { cout << 1 << endl; cout << "lo hizo!!!" << endl; return 1; break; } if(value[W][n] != W) { cout << 0 << endl; return 0; break; } } cout << "****************************************" << endl; return 0; } int main(void) { while(loop()); cout << "todo mal" << endl; return 1; }
e9375a4dde8b4582296f8de78a315313624d0de2
19e07c48f3a44116fb68eb86eaeeb367ca9d0e8d
/2576.cpp
51c31768c8f860d4147fc72f49e0f095a26398a1
[]
no_license
tojslee/BOJ_my_code
fb6e0bebd3fff278ffd91c165f0e2b4a617c8d2b
04895ecd550fc1cd0921f2fc452060155cdedf04
refs/heads/master
2021-07-25T02:42:36.317139
2020-08-18T06:17:47
2020-08-18T06:17:47
209,487,689
0
0
null
null
null
null
UTF-8
C++
false
false
661
cpp
2576.cpp
#include <iostream> using namespace std; int main() { int arr[7]; int hap=0; int min; for (int i = 0; i < 7; i++) { scanf("%d", &arr[i]); } bool flag = true; for (int i = 0; i < 7; i++) { if (arr[i] % 2 != 0) { flag = false; } } if (flag == false) { for (int i = 0; i < 7; i++) { if (arr[i] % 2 != 0) { hap += arr[i]; } } int k; for (int i = 0; i < 7; i++) { if (arr[i] % 2 != 0) { min = arr[i]; k = i; break; } } for (int i = k; i < 7; i++) { if (min > arr[i] && arr[i] % 2 != 0) { min = arr[i]; } } cout << hap << endl; cout << min << endl; } else { cout << -1 << endl; } }
b279b7546271b1febc6c341fcc0c2694cbd0d974
fb66a5cc43d27f33c85320a6dba8b9a8ff4765a9
/gapputils/gml.nn/optlib/IObservable.h
b6b156a23e881da1ff898fa0fd55935abc54b57d
[]
no_license
e-thereal/gapputils
7a211c7d92fd2891703cb16bf94e6e05f0fb3b8a
a9eca31373c820c12f4f5f308c0e2005e4672fd0
refs/heads/master
2021-04-26T16:42:58.303603
2015-09-02T21:32:45
2015-09-02T21:32:45
38,838,767
2
0
null
null
null
null
UTF-8
C++
false
false
514
h
IObservable.h
/** * @file IObservable.h * @brief The IObservable interface * * @date Nov 5, 2008 * @author Tom Brosch */ #ifndef _OPTLIB_IOBSERVABLE_H_ #define _OPTLIB_IOBSERVABLE_H_ #include "IObserver.h" namespace optlib { /// Tells, that a class can be observed. class OPTLIB_API IObservable { public: /// Adds an observer to the optimization algorithm /** * @param[in] observer The observer to be added. */ virtual void addObserver(IObserver& observer) = 0; }; } #endif /* _OPTLIB_IOBSERVABLE_H_ */
f70659b8fd983106643f7ddd7016467fb22f09ff
558b75f4715273ebb01e36e0b92446130c1a5c08
/engine/src/qlci18n.cpp
404c5b33651d90edff042131157e302f38cf1ba8
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sbenejam/qlcplus
c5c83efe36830dcd75d41b3fba50944dc22019e1
2f2197ff086f2441d755c03f7d67c11f72ad21df
refs/heads/master
2023-08-25T09:06:57.397956
2023-08-17T16:02:42
2023-08-17T16:02:42
502,436,497
0
0
Apache-2.0
2022-06-11T19:17:52
2022-06-11T19:17:51
null
UTF-8
C++
false
false
1,956
cpp
qlci18n.cpp
/* Q Light Controller qlci18n.cpp Copyright (C) Heikki Junnila 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.txt 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 <QCoreApplication> #include <QTranslator> #include <QLocale> #include <QString> #include <QDebug> #include <QDir> #include "qlcconfig.h" #include "qlcfile.h" #include "qlci18n.h" QString QLCi18n::s_defaultLocale = QString(); QString QLCi18n::s_translationFilePath = QString(); void QLCi18n::init() { // Set the default translation file path before parsing args QLCi18n::setTranslationFilePath(QLCFile::systemDirectory(TRANSLATIONDIR).absolutePath()); } void QLCi18n::setDefaultLocale(const QString& locale) { s_defaultLocale = locale; } QString QLCi18n::defaultLocale() { return s_defaultLocale; } void QLCi18n::setTranslationFilePath(const QString& path) { s_translationFilePath = path; } QString QLCi18n::translationFilePath() { return s_translationFilePath; } bool QLCi18n::loadTranslation(const QString& component) { QString lc; if (defaultLocale().isEmpty() == true) lc = QLocale::system().name(); else lc = defaultLocale(); QString file(QString("%1_%2").arg(component).arg(lc)); QTranslator* translator = new QTranslator(QCoreApplication::instance()); if (translator->load(file, translationFilePath()) == true) { QCoreApplication::installTranslator(translator); return true; } else { return false; } }
3e0def643cb39d533e6a5e697b368626e14fe56d
76b886aa7325e7bcfc1412260c8b58c0af8342af
/DSA/Tasks/vjezbanje/HTTP_Class/HTTP_klijent.cpp
f536deff3ce57c2cbf7a00655051c916680c2913
[]
no_license
kelj0/university
770963a54a626f9e15500b45787cd16375c03f9b
636a4076bbd4b065284bc57b36272a47031db7ac
refs/heads/master
2023-03-16T08:00:01.588817
2020-08-25T13:53:37
2020-08-25T13:53:37
139,969,683
0
0
null
2023-03-03T04:17:12
2018-07-06T10:19:15
Jupyter Notebook
UTF-8
C++
false
false
719
cpp
HTTP_klijent.cpp
#include "HTTP_klijent.h" HTTP_klijent::HTTP_klijent(std::string url, int port){ this->url = url; this->port = port; } HTTP_klijent::HTTP_klijent(std::string url) { this->url = url; port = 80; } std::string HTTP_klijent::get_random_word(){ char arr[] = {'a','s','d','e','f','g','h','j','k','l'}; //some chars to make output std::string random_word=" "; srand(static_cast<unsigned int>(time(0))); int random_number = (rand() % 10); for (int i = 0; i < 10; i++) { random_number = (rand() % 10); random_word[i] = arr[random_number]; } return random_word; } int HTTP_klijent::get_port(){ return port; } std::string HTTP_klijent::get_url(){ return url; }
8b75759fe35fca9bcba07d120d4a2140edc69d0a
d92acaaabf07ca21f83bd136ed3bbd741aea9cfe
/LuckyLeprechauns/Framework/FBXModelLoader.h
07b08c11ef847f1734efbd942adce3e840fc84d6
[]
no_license
sp-alex-osou/LuckyLeprechauns
54b4c64718769ba2c93a723f331ef160c8def7c5
c7bce0f14be1cc1cfd7ca4571cbb11c3819fc1e8
refs/heads/master
2016-09-05T13:46:54.134574
2013-08-26T10:46:39
2013-08-26T10:46:39
null
0
0
null
null
null
null
UTF-8
C++
false
false
624
h
FBXModelLoader.h
#pragma once #include "STL.h" #include "FBXModel.h" #include "GraphicsDevice.h" #include "Config.h" #include "TinyXML\tinyxml.h" class FBXModelLoader { typedef std::map<std::string, FBXModel> ModelMap; public: static void init(const std::string& path, const GraphicsDevice& device); static void release(); static FBXModel getModelClone(const std::string& name); static void onResetDevice(const GraphicsDevice& device); static void onLostDevice(); private: static TiXmlDocument doc; static const std::string xmlTrue; static const std::string xmlFalse; static ModelMap models; };
0de8ffdb3b24e335181b94ad7852f16b1593a11d
114ea1c047c886f889f4204146d92b83a5687419
/Aula_16/Funcionario.h
cd4c49235d4a2a33a169b3f2c9c46a7e561a1b63
[]
no_license
marcellsd/Linguagem_de_Programacao_I
b0f4a76d478221e21ee239d53ec2781d9d946378
a9cc9e2ca21ad90be1d29bb4fd55778295ac74a6
refs/heads/master
2022-11-20T11:54:59.501194
2020-07-21T03:04:18
2020-07-21T03:04:18
272,709,436
0
0
null
null
null
null
UTF-8
C++
false
false
671
h
Funcionario.h
#ifndef FUNCIONARIO_H #define FUNCIONARIO_H #include <string> #include "Empresa.h" class Funcionario { private: std::string nome; Empresa empresa; std::string departamento; float salario; std::string dataDeAdmissao; public: Funcionario(); ~Funcionario(); std::string getNome(); void setNome(std::string nome_); Empresa getEmpresa(); void setEmpresa(Empresa empresa_); std::string getDepartamento(); void setDepartamento(std::string departamento_); float getSalario(); void setSalario(float salario_); std::string getDataDeAdmissao(); void setDataDeAdmissao(std::string dataDeAdmissao_); }; #endif
c62735e8244a75105e3bb17928286e169166d9e3
ceb03f592ca67647e4e8d21d9f765d6fed88d85f
/WWC-CPP-2018/Session6/Code/5_MyVector.cpp
78784d289f2124ca02fa5488a21c4c7b5f5b3b0f
[]
no_license
anupamachandra/WWC
8ecd41d94c3a387acd01a50a86dbce13633035c2
edd2936b6d13ca33e47c486072ce04106b5b4e88
refs/heads/master
2020-03-25T11:35:19.113391
2019-12-10T21:57:40
2019-12-10T21:57:40
143,738,809
13
3
null
2019-12-10T21:50:16
2018-08-06T14:18:08
C++
UTF-8
C++
false
false
397
cpp
5_MyVector.cpp
MyVector(const MyVector& other) :size(other.size) { elems = new int[size]; for (int i = 0; i < size; i++) elems[i] = other.elems[i]; } void swap(MyVector& other) { std::swap(elems, other.elems); std::swap(size, others,size); //MyVector temp(other); //other = *this; //*this = temp; } MyVector(MyVector&& other) : size(0), elems(nullptr) { swap(other); } ~MyVector { delete[] elems; }
b442d875cafd6d63f13e925555dbd58590e8feac
9e2446900bd1c7d00aa4bd191d0f5c0164ce05d9
/examples/simple.cpp
4febd9ed4c2747df84522adc2e429a566c95016c
[ "MIT" ]
permissive
green-anger/ThreadSafePrinter
31442ef7fafdfc6d5ed46eb70ce27ef7bcc6d93d
620235379c29bac9767e2ad0af7f014bf8ba71e9
refs/heads/master
2020-03-21T12:54:10.717675
2018-06-25T10:18:24
2018-06-25T10:18:24
138,577,318
0
0
null
null
null
null
UTF-8
C++
false
false
2,361
cpp
simple.cpp
#include <thread> #include <vector> #include "ThreadSafePrinter.hpp" using namespace alt; namespace { class CustomPolicy1 { public: static void prefix( std::ostringstream& oss ) { oss << "[begin] "; } static void suffix( std::ostringstream& oss ) { oss << " [end]"; } }; class CustomPolicy2 : public MarkPolicy { public: static void prefix( std::ostringstream& oss ) { MarkPolicy::prefix( oss ); oss << "[custom prefix] "; } static void suffix( std::ostringstream& oss ) { MarkPolicy::suffix( oss ); oss << " [custom suffix]"; } }; } using TSP = ThreadSafePrinter<>; using TSPM = ThreadSafePrinter<MarkPolicy>; using TSPC1 = ThreadSafePrinter<CustomPolicy1>; using TSPC2 = ThreadSafePrinter<CustomPolicy2>; int main( int argc, char** argv ) { TSP() << "main thread " << std::this_thread::get_id() << "\n"; const std::size_t tNum = 4; std::vector<std::thread> vec; auto clearVec = [&vec]() { for ( auto&& t : vec ) t.join(); vec.clear(); }; TSP() << "\nTest.1\n"; for ( decltype( vec )::size_type i = 0; i < tNum; ++i ) { vec.emplace_back( std::thread( [i]() { for ( int k = 0; k < 10; ++k ) TSP() << "Thread " << std::to_string( i ); } ) ); } clearVec(); TSP() << "\nTest.2\n"; for ( decltype( vec )::size_type i = 0; i < tNum; ++i ) { vec.emplace_back( std::thread( [i]() { for ( int k = 0; k < 10; ++k ) TSPM() << "Thread " << std::to_string( i ); } ) ); } clearVec(); TSP() << "\nTest.3\n"; for ( decltype( vec )::size_type i = 0; i < tNum; ++i ) { vec.emplace_back( std::thread( [i]() { for ( int k = 0; k < 10; ++k ) TSPC1() << "Thread " << std::to_string( i ); } ) ); } clearVec(); TSP() << "\nTest.4\n"; for ( decltype( vec )::size_type i = 0; i < tNum; ++i ) { vec.emplace_back( std::thread( [i]() { for ( int k = 0; k < 10; ++k ) TSPC2() << "Thread " << std::to_string( i ); } ) ); } clearVec(); return 0; }
b6bf6d7b94ca231c514fc09124427ad06a1a0fe2
1266254e5763ec1dbbd861fa2045bcef1edbcec6
/SurgSim/Devices/Sixense/UnitTests/SixenseScaffoldTest.cpp
9764cf7e48d91367601e3bdcae1c1537ac94d0c1
[ "Bitstream-Vera", "BSL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
simquest/opensurgsim
0a443f8e54b276f4e41ed991b2fcb3d2b0c0b5a7
bd30629f2fd83f823632293959b7654275552fa9
refs/heads/master
2022-02-13T15:05:47.744267
2020-11-24T14:27:19
2020-11-24T14:27:19
24,512,532
30
11
Apache-2.0
2022-02-03T20:18:01
2014-09-26T19:25:40
C++
UTF-8
C++
false
false
7,452
cpp
SixenseScaffoldTest.cpp
// This file is a part of the OpenSurgSim project. // Copyright 2013, SimQuest Solutions 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. /// \file /// Tests for the SixenseScaffold class and its device interactions. #include <memory> #include <string> #include <boost/thread.hpp> #include <boost/chrono.hpp> #include <gtest/gtest.h> #include "SurgSim/Devices/Sixense/SixenseDevice.h" #include "SurgSim/Devices/Sixense/SixenseScaffold.h" #include "SurgSim/DataStructures/DataGroup.h" #include "SurgSim/Math/RigidTransform.h" #include "SurgSim/Math/Matrix.h" using SurgSim::Devices::SixenseDevice; using SurgSim::Devices::SixenseScaffold; TEST(SixenseScaffoldTest, CreateAndDestroyScaffold) { //SixenseScaffold::setDefaultLogLevel(SurgSim::Framework::LOG_LEVEL_DEBUG); std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); ASSERT_NE(nullptr, scaffold) << "The scaffold was not created!"; std::weak_ptr<SixenseScaffold> scaffold1 = scaffold; { std::shared_ptr<SixenseScaffold> stillHaveScaffold = scaffold1.lock(); EXPECT_NE(nullptr, stillHaveScaffold) << "Unable to get scaffold from weak ref (while strong ref exists)"; EXPECT_EQ(scaffold, stillHaveScaffold) << "Scaffold mismatch!"; } { std::shared_ptr<SixenseScaffold> sameScaffold = SixenseScaffold::getOrCreateSharedInstance(); EXPECT_NE(nullptr, sameScaffold) << "Unable to get scaffold from class"; EXPECT_EQ(scaffold, sameScaffold) << "Scaffold mismatch!"; } scaffold.reset(); { std::shared_ptr<SixenseScaffold> dontHaveScaffold = scaffold1.lock(); EXPECT_EQ(nullptr, dontHaveScaffold) << "Able to get scaffold from weak ref (with no strong ref)"; } scaffold = SixenseScaffold::getOrCreateSharedInstance(); ASSERT_NE(nullptr, scaffold) << "The scaffold was not created the 2nd time!"; std::weak_ptr<SixenseScaffold> scaffold2 = scaffold; { std::shared_ptr<SixenseScaffold> stillHaveScaffold = scaffold2.lock(); ASSERT_NE(nullptr, stillHaveScaffold) << "Unable to get scaffold from weak ref (while strong ref exists)"; ASSERT_EQ(scaffold, stillHaveScaffold) << "Scaffold mismatch!"; } } TEST(SixenseScaffoldTest, ScaffoldLifeCycle) { //SixenseScaffold::setDefaultLogLevel(SurgSim::Framework::LOG_LEVEL_DEBUG); std::weak_ptr<SixenseScaffold> lastScaffold; { std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); ASSERT_NE(nullptr, scaffold) << "The scaffold was not created!"; lastScaffold = scaffold; } { std::shared_ptr<SixenseScaffold> dontHaveScaffold = lastScaffold.lock(); EXPECT_EQ(nullptr, dontHaveScaffold) << "Able to get scaffold from weak ref (with no strong ref)"; lastScaffold.reset(); } { std::shared_ptr<SixenseDevice> device = std::make_shared<SixenseDevice>("TestSixense"); ASSERT_NE(nullptr, device) << "Creation failed. Is a Sixense/Hydra device plugged in?"; // note: the device is NOT initialized! { std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); EXPECT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; lastScaffold = scaffold; // save the scaffold for later std::shared_ptr<SixenseScaffold> sameScaffold = lastScaffold.lock(); EXPECT_NE(nullptr, sameScaffold); EXPECT_EQ(scaffold, sameScaffold); } // The device has not been initialized, so it should NOT be hanging on to the device! { std::shared_ptr<SixenseScaffold> deadScaffold = lastScaffold.lock(); EXPECT_EQ(nullptr, deadScaffold); } // the ("empty") device is about to get destroyed } { std::shared_ptr<SixenseDevice> device = std::make_shared<SixenseDevice>("TestSixense"); ASSERT_NE(nullptr, device) << "Device creation failed."; ASSERT_TRUE(device->initialize()) << "Initialization failed. Is a Sixense/Hydra device plugged in?"; { std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); EXPECT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; lastScaffold = scaffold; // save the scaffold for later std::shared_ptr<SixenseScaffold> sameScaffold = lastScaffold.lock(); EXPECT_NE(nullptr, sameScaffold); EXPECT_EQ(scaffold, sameScaffold); } // The same scaffold is supposed to still be around because of the device { std::shared_ptr<SixenseScaffold> sameScaffold = lastScaffold.lock(); EXPECT_NE(nullptr, sameScaffold); std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); EXPECT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; EXPECT_EQ(sameScaffold, scaffold); } // the device and the scaffold are about to get destroyed } { std::shared_ptr<SixenseScaffold> deadScaffold = lastScaffold.lock(); EXPECT_EQ(nullptr, deadScaffold); } { std::shared_ptr<SixenseDevice> device = std::make_shared<SixenseDevice>("TestSixense"); ASSERT_NE(nullptr, device) << "Device creation failed."; ASSERT_TRUE(device->initialize()) << "Initialization failed. Didn't this work a moment ago?"; std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); EXPECT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; std::shared_ptr<SixenseScaffold> deadScaffold = lastScaffold.lock(); EXPECT_EQ(nullptr, deadScaffold); } } TEST(SixenseScaffoldTest, CreateDeviceSeveralTimes) { //SixenseScaffold::setDefaultLogLevel(SurgSim::Framework::LOG_LEVEL_DEBUG); std::weak_ptr<SixenseScaffold> lastScaffold; for (int i = 0; i < 6; ++i) { SCOPED_TRACE(i); EXPECT_EQ(nullptr, lastScaffold.lock()); std::shared_ptr<SixenseDevice> device = std::make_shared<SixenseDevice>("TestSixense"); ASSERT_NE(nullptr, device) << "Device creation failed."; ASSERT_TRUE(device->initialize()) << "Initialization failed. Is a Sixense/Hydra device plugged in?"; std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); ASSERT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; lastScaffold = scaffold; // the device and the scaffold will be destroyed here } } TEST(SixenseScaffoldTest, CreateDeviceSeveralTimesWithScaffoldRef) { //SixenseScaffold::setDefaultLogLevel(SurgSim::Framework::LOG_LEVEL_DEBUG); std::shared_ptr<SixenseScaffold> lastScaffold; for (int i = 0; i < 6; ++i) { SCOPED_TRACE(i); std::shared_ptr<SixenseDevice> device = std::make_shared<SixenseDevice>("TestSixense"); ASSERT_NE(nullptr, device) << "Device creation failed."; ASSERT_TRUE(device->initialize()) << "Initialization failed. Is a Sixense/Hydra device plugged in?"; std::shared_ptr<SixenseScaffold> scaffold = SixenseScaffold::getOrCreateSharedInstance(); ASSERT_NE(nullptr, scaffold) << "The scaffold was not retrieved!"; if (! lastScaffold) { lastScaffold = scaffold; } EXPECT_EQ(lastScaffold, scaffold); // the device will be destroyed here, but the scaffold stays around because we have a shared_ptr to it. } }
f4ab028f80f38351570c014dc16fa7848816c8f3
d3a17b2acb989b903efa54bcc64302e20e30a9bb
/面程之程序/setings.h
397cb22d5d38367a86ba705355b7e6627228d6c0
[]
no_license
RichardHGL/Ba_class
376b28456aec321822c15d92488ed251ab67fb1b
32b17c299ef13342aa50cf29d643ed5002e742aa
refs/heads/master
2021-01-21T11:49:05.854919
2016-11-12T05:36:39
2016-11-12T05:36:39
73,532,672
0
0
null
null
null
null
GB18030
C++
false
false
13,402
h
setings.h
#include<iostream> #include<stdlib.h> #include<iomanip> int showtime(int hour,int minute); int output(int a); class Weapon{ public: int type;//武器种类 int force;//武器攻击力 int time;//弓箭的使用次数 /*Weapon(int a,int b):type(a),force(b){ if(a==2) time=3; else time=0; }*/ //Weapon(const Weapon & wp):type(wp.type),force(wp.force),time(wp.time){} Weapon & operator =(Weapon & wp){ return wp; } const Weapon & operator =(Weapon & wp)const{ return wp; } void addw(int i,int j){ type=i; if(i==2) time=3; else time=0; if(i==0) force=j; else force=0; } }; class worridor{ public: int type;//种族 int strenth;//生命值 int loyaty;//lion专属忠诚度 int force;//武士本身攻击力 int weapon_num;//武器数目,可变 int tag;//归属红方或蓝方 int num;//编号 Weapon weapon[4];//武器系列,-1为没有,012为正常值sword bomb arrow int position;//位于城镇的位置,红方从0开始,蓝方从N+1开始 double morale;//dragon专属士气 int model;//0代表正常出战,1代表死亡,2代表逃跑,3代表到达目的地 /*worridor(){//初始化根据武士种类有异 type=0,strenth=0,loyaty=0,tag=0, weapon_num=0,morale=0.0; model=0; }*/ void get_weapon(Weapon a[],int b){ int i=0,j=0; if(b>0){ for(i=0;i<b;i++){ for(j=0;j<weapon_num;j++){ if(weapon[j].type==a[i].type) break; } if(j==weapon_num){ weapon[j].type=a[i].type; weapon[j].force=a[i].force; weapon[j].time=a[i].time; weapon_num++; } } } } int has_arrow(){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==2&&weapon[i].time>0) return weapon[i].time; } return 0; } void arrow_cost(){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==2&&weapon[i].time>0) weapon[i].time--; } } bool has_bomb(){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==1) return true; } return false; } bool has_sword(){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==0&&weapon[i].force>0) return true; } return false; } int sword(int tag){//tag为0代表模拟,为1代表实战 int temp=0; if(has_sword()){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==0){ temp=weapon[i].force; if(tag) weapon[i].force*=0.8; } } } return 0; } void lose_weapon(){ for(int i=0;i<weapon_num;i++){ if(weapon[i].type==0&&weapon[i].force<=0){ for(int j=i+1;j<weapon_num;j++) weapon[j-1]=weapon[j]; weapon_num--; i--;continue; } else if(weapon[i].type==2&&weapon[i].time<=0){ for(int j=i+1;j<weapon_num;j++) weapon[j-1]=weapon[j]; weapon_num--; i--;continue; } } } worridor & operator =(worridor &wp){ return wp; } int battle_win(worridor wp2,int adv){ if(wp2.strenth<=0&&strenth>0) return 1; if(strenth<=0&&wp2.strenth>0) return 2; if(tag==0){ if(adv==0){ int attack=force+sword(0); if(attack>=wp2.strenth) return 1; if(wp2.type==2) return 0; int b_attack=wp2.force/2+wp2.sword(0); if(b_attack>=strenth) return 2; } else if(adv==1){ int attack=wp2.force+wp2.sword(0); if(attack>=strenth) return 2; if(type==2) return 0; int b_attack=force/2+sword(0); if(b_attack>=wp2.strenth) return 1; } } else if(tag==1){ if(adv==0){ int attack=wp2.force+wp2.sword(0); if(attack>=strenth) return 2; if(type==2) return 0; int b_attack=force/2+sword(0); if(b_attack>=wp2.strenth) return 1; } else if(adv==1){ int attack=force+sword(0); if(attack>=wp2.strenth) return 1; if(wp2.type==2) return 0; int b_attack=wp2.force/2+wp2.sword(0); if(b_attack>=strenth) return 2; } } return 0; } int battle(worridor &wp,int p,int adv,int hour,int minute){//0代表初态均死或无胜负 int strenth1=strenth,strenth2=wp.strenth; if(strenth<=0&&wp.strenth>0) return 2; else if(strenth>0&&wp.strenth<=0) return 1; else if(strenth<=0&&wp.strenth<=0) return 0; showtime(hour,minute); if(adv==0){ int attack=force+sword(1); wp.gethurt(attack); cout<<" red "; output(type); cout<<" "<<num<<" attacked blue "; output(wp.type); cout<<" "<<wp.num<<" in city "<<p<<" with "<<strenth<<" elements" <<" and force "<<force<<endl; showtime(hour,minute); cout<<" blue "; output(wp.type); cout<<" "<<wp.num; if(wp.strenth<=0){ cout<<" was killed in city "<<p<<endl; morale+=0.2; if(type==4) get_weapon(wp.weapon,wp.weapon_num); if(wp.type==0) strenth+=strenth2; if(type==1&&morale>=0.8){ cout<<" red "; output(type); cout<<" "<<num<<" yelled in city "<<p<<endl; } return 1; } if(type==0) loyaty-=K; if(wp.type==2) return 0; int b_attack=wp.force/2+wp.sword(1); gethurt(b_attack); cout<<" fought back against red "; output(type); cout<<" "<<num<<" in city "<<p<<endl; if(strenth<=0){ showtime(hour,minute); if(type==0) wp.strenth+=strenth1; if(wp.type==4) wp.get_weapon(weapon,weapon_num); cout<<" red "; output(type); cout<<" "<<num; cout<<" was killed in city "<<p<<endl; wp.morale+=0.2; return 2; } if(type==1) morale-=0.2; if(type==1&&morale>=0.8){ cout<<" red "; output(type); cout<<" "<<num<<" yelled in city "<<p<<endl; } if(wp.type==0) wp.loyaty-=K; } if(adv==1){ int attack=wp.force+wp.sword(1); gethurt(attack); cout<<" blue "; output(wp.type); cout<<" "<<wp.num<<" attacked red "; output(type); cout<<" "<<num<<" in city "<<p<<" with "<<wp.strenth<<" elements and force " <<wp.force<<endl; showtime(hour,minute); cout<<" red "; output(type); cout<<" "<<num; if(strenth<=0){ if(wp.type==4){ wp.get_weapon(weapon,weapon_num); } if(type==0) wp.strenth+=strenth1; if(wp.type==1) wp.morale+=0.2; cout<<" was killed in city "<<p<<endl; if(wp.type==1&&wp.morale>=0.8){ cout<<" blue "; output(wp.type); cout<<" "<<wp.num<<" yelled in city "<<p<<endl; } return 2; } if(wp.type==0) wp.loyaty-=K; if(type==2) return 0; cout<<" fought back against blue "; output(wp.type); cout<<" "<<wp.num<<" in city "<<p<<endl; int b_attack=force/2+sword(1); wp.gethurt(b_attack); if(wp.strenth<=0){ if(type==4) get_weapon(wp.weapon,weapon_num); if(wp.type==0) strenth+=strenth2; showtime(hour,minute); cout<<" blue "; output(wp.type); cout<<" "<<wp.num; cout<<" was killed in city "<<p<<endl; return 1; } if(type==0) loyaty-=K; if(wp.type==1) wp.morale-=0.2; if(wp.type==1&&wp.morale>=0.8){ cout<<" blue "; output(wp.type); cout<<" "<<wp.num<<" yelled in city "<<p<<endl; } } return 0; } int usebomb(worridor &wp,int p,int adv){ if(wp.strenth<=0) return 0; if(strenth<=0) return 0; if(has_bomb()&&battle_win(wp,adv)==2){ strenth=0;wp.strenth=0; return 1; } return 0; } void gethurt(int a){ strenth-=a; } void weapon_out(){ output(type); cout<<" "<<num<<" has "; if(weapon_num==0) cout<<"no weapon"; else{ if(has_arrow()) cout<<"arrow("<<has_arrow()<<")"; if(has_bomb()) cout<<",bomb"; if(has_sword()) cout<<",sword("<<sword(0)<<")"; cout<<endl; } } }; class City{ public: int num;//城市位置 int strenth;//生命元数,可累积 int belongs;//0为红方,1为蓝方,-1代表无主 int people_n; int last_win;//上次赢家 worridor competitor[3]; City(){ num=0;strenth=0;belongs=-1;last_win=-1; people_n=0; } void setfactor(int a,int b,int c,int d,int e){ num=a; strenth=b; belongs=c; people_n=d; last_win=e; } void locate(worridor sodier[],int number){ for(int i=0;i<number;i++){ if(sodier[i].position==num){ competitor[people_n]=sodier[i]; people_n++; } } } void makebelongs(int tag,int hour,int minute){ showtime(hour,minute); belongs=tag; if(tag==0) cout<<" red "; else if(tag==1) cout<<" blue "; cout<<"flag raised in city "<<num; } int adv_judge(){ int adv=-1; if(belongs==0) adv=0; else if(belongs==1) adv=1; else if(belongs==-1&&num%2==1) adv=0; else if(belongs==-1&&num%2==0) adv=1; return adv; } }; class Head{ public: int lion,dragon,ninja,iceman,wolf; int strenth,number; int arrived; worridor sodier[200]; Head(){ lion=0;ninja=0;iceman=0; wolf=0;dragon=0;number=0;arrived=0; } void setfactor(int a=0); void cut(int a=0); void add(int a=0); void addw(int a=0,int strenth=0,int force=0,int tag=0); void escape(int tag); int born(int tag,int hour,int minute); int forward(int tag,int hour,int minute); void report(int tag,int hour,int minute); void reward(int tag,int a[],int n){ if(tag==0){ for(int i=n-1;i>=0;i--){ if(strenth>=8){ sodier[i].strenth+=8; strenth-=8; } else break; } } else if(tag==1){ for(int i=0;i<n;i++){ if(strenth>=8){ sodier[i].strenth+=8; strenth-=8; } else break; } } } }; { //类成员区 int Head::born(int tag,int hour,int minute){ int temp=number%5; int cost1=0,num1=0,force1=0; if(tag==0) num1=R_rank[temp]; else if(tag==1) num1=B_rank[temp]; cost1=cost[num1]; force1=force[num1]; if(strenth<cost1) return 0; showtime(hour,minute); if(tag==0) cout<<" red "; else if(tag==1) cout<<" blue "; cut(cost1); addw(num1,cost1,force1,tag); output(num1); cout<<number<<" born"<<endl;//born 时编号为number switch(num1){ case 0:{ cout<<"its loyaty is "<<sodier[number-1].loyaty<<endl; break; } case 1:{ cout<<" its morale is "<<setiosflags(ios::fixed) <<setprecision(2)<<sodier[number-1].morale<<endl; break; } } return 0; } void Head::death(){ for(int i=0,i<number;i++){ if(sodier[i].model==0&&sodier[i].strenth<=0){ sodier[i].model=1; } } } void Head::escape(int tag,int hour,int minute){//判断某时刻是否有逃跑的狮子 if(lion>0){ for(int i=0;i<number;i++){ if(sodier[i].type==0&&sodier[i].loyaty<=0&&sodier[i].model==0){ showtime(hour,minute); if(tag==0) cout<<" red "; else if(tag==1) cout<<" blue "; cout<<"lion "<<sodier[i].num<<" ran away"<<endl; sodier[i].model=2; } } } } int Head::forward(int tag,int hour,int minute){ for(int i=0;i<number;i++){ if(sodier[i].model==0){ showtime(hour,minute); if(tag==0){ cout<<" red "; output(sodier[i].type); cout<<" "<<sodier[i].num; if(sodier[i].position<=N) sodier[i].position++; if(sodier[i].type==3&&sodier[i].position%2==0){ if(sodier[i].strenth-9>0){ sodier[i].strenth-=9; sodier[i].force+=20; } } if(sodier[i].position==N+1){ sodier[i].model=3; cout<<" reached blue headquarter with "; arrived++; if(arrived==2) return 1; } else{ cout<<" marched to city "<<sodier[i].position<<" with "; } cout<<sodier[i].strenth<<" elements and force "<<sodier[i].force<<endl; } if(tag==1){ cout<<" blue "; output(sodier[i].type); cout<<" "<<sodier[i].num; if(sodier[i].position>=1) sodier[i].position--; if(sodier[i].position==0){ sodier[i].model=3; cout<<" reached red headquarter with "; arrived++; if(arrived==2) return 1; } else{ cout<<" marched to city "<<sodier[i].position<<" with "; } cout<<sodier[i].strenth<<" elements and force "<<sodier[i].force<<endl; } } } return 0; } void Head::setfactor(int a){ strenth=a; } void Head::cut(int a){ strenth-=a; } void Head::add(int a){ strenth+=a; } void Head::addw(int a,int strenth_in,int force_in,int tag){ sodier[number].type=a; sodier[number].strenth=strenth_in; sodier[number].force=force_in; sodier[number].num=number+1; int temp_force=force_in*0.2; switch(a){ case 0: { lion++; sodier[number].weapon_num=0; sodier[number].loyaty=strenth; }break; case 1: { dragon++; sodier[number].weapon_num=1; sodier[number].weapon[0].add_w((number+1)%3,temp_force); sodier[number].morale=(double)strenth/(double)strenth_in; }break; case 2:{ ninja++; sodier[number].weapon_num=2; sodier[number].weapon[0].add_w((number+1)%3,temp_force); sodier[number].weapon[1].add_w((number+2)%3,temp_force); } break; case 3:{ iceman++; sodier[number].weapon_num=1; sodier[number].weapon[0].add_w((number+1)%3,temp_force); } break; case 4:{ sodier[number].weapon_num=0; wolf++; } break; } if(tag==0) sodier[number].position=0; else if(tag==1) sodier[number].position=N+1; number++; } void Head::report(int tag,int hour,int minute){ if(tag==0) for(int i=0;i<number-1;i++){ if(sodier[i].model==0||sodier[i].model==3){ showtime(hour,minute); cout<<" red "; sodier[i].weapon_out(); } } else if(tag==1) for(int i=number-1;i>=0;i--){ if(sodier[i].model==0||sodier[i].model==3){ showtime(hour,minute); cout<<" blue "; sodier[i].weapon_out(); } } } }
19c10785555c791844480c8a6e390f801e7d48a6
d8cea15cbaa45293ffe8e23d13e4d0b173b70056
/Epoch/MPMissions/DayZ_Epoch_16.Panthera2/CONFIGS/TRADERS/Category/OWSuperCars.hpp
427f80b611c9b95c1a95c4841a1700972deae334
[]
no_license
quitanddead/DayZEpoch1Click
89708d49ee021314498b6c593edb7c2af0d9e0a6
fa5b514dcb97fa2c4d3a744b5e9c5950445fb7bb
refs/heads/master
2020-04-03T09:03:10.489683
2015-04-16T03:43:45
2015-04-16T03:43:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,384
hpp
OWSuperCars.hpp
class Category_1016 { class 350z_red {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_kiwi {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_black {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_silver {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_green {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_blue {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_gold {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_white {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_pink {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_v {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_city {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; class 350z_yellow {type = "trade_any_vehicle";buy[] = {1,"ItemBriefcase100oz"};sell[] = {1,"ItemBriefcase30oz"};}; };
f79a25b9d12c30043ecedecb9d3b87d85d28bca3
46fe600c77fa8eb42f3974bb67b8b785078ee0a0
/1era clase/Ejercicios/Ejericicio7.cpp
f8ce91451421f906ee5930ae2fecb9c13edc31ea
[]
no_license
devkira11/Fundamentos_Programacion_C
32b2f3f53539459abcc88a89a0750fed2b27fdb2
8009569e0faa3397c28ad98ce50a74efaf8f2068
refs/heads/master
2022-09-02T01:36:26.368460
2020-05-27T01:12:01
2020-05-27T01:12:01
257,719,480
1
0
null
2020-05-27T01:12:02
2020-04-21T21:25:42
C++
UTF-8
C++
false
false
469
cpp
Ejericicio7.cpp
//1era parte : incluir librerias ? conjunto de paquetes de ayudas #include <stdio.h> #include <math.h> //LAS PALABRAS EN NEGRIDA NI SE TE OCURRA PONERLAS EN MAYUSCULA O CONFUNDIRTE ( ROJO EN LA GUIA ) SE LLAMAN PALABRAS RESERVADAS int main() { int u=1, d=9, c=9 , resultado; int es_Armstrong; resultado= pow(u,3)+pow(d,3)+pow(c,3); es_Armstrong= resultado>=100 && resultado<1000; printf("Es Armstrong? %d\n", es_Armstrong); return 0; }
0819fa1ed88e3f446b741b35aa0920ce9e9eebc2
0cb91c9b793f57e47d20c80762c671e8578ace30
/TeamBuffalo_EE183DB_The_YaoGuai_Snack_Launcher/Code/lidar_test.ino
642ede75faa0b1b6f803f6722e12eee645b03869
[]
no_license
IouSC/UCLA_EE183DA_TeamBuffalo
eb04214fe289c646820f28c0b61f6e21552b3b6b
001a30ce55a5824c5fe2e96613da71dfcb41dbed
refs/heads/master
2020-04-18T04:24:47.407406
2019-08-12T21:23:22
2019-08-12T21:23:22
167,237,142
1
0
null
null
null
null
UTF-8
C++
false
false
2,407
ino
lidar_test.ino
/* Example code for Benewake TFMini time-of-flight distance sensor. by Peter Jansen (December 11/2017) This example code is in the public domain. This example communicates to the TFMini using a SoftwareSerial port at 115200, while communicating the distance results through the default Arduino hardware Serial debug port. SoftwareSerial for some boards can be unreliable at high speeds (such as 115200). The driver includes some limited error detection and automatic retries, that means it can generally work with SoftwareSerial on (for example) an UNO without the end-user noticing many communications glitches, as long as a constant refresh rate is not required. The (UNO) circuit: * Uno RX is digital pin 10 (connect to TX of TF Mini) * Uno TX is digital pin 11 (connect to RX of TF Mini) THIS SOFTWARE IS PROVIDED ''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 AUTHOR(S) 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 <SoftwareSerial.h> #include "TFMini.h" // Setup software serial port SoftwareSerial mySerial(50, 51); // Uno RX (TFMINI TX), Uno TX (TFMINI RX) TFMini tfmini; void setup() { // Step 1: Initialize hardware serial port (serial debug port) Serial.begin(115200); // wait for serial port to connect. Needed for native USB port only while (!Serial); Serial.println ("Initializing..."); // Step 2: Initialize the data rate for the SoftwareSerial port mySerial.begin(TFMINI_BAUDRATE); // Step 3: Initialize the TF Mini sensor tfmini.begin(&mySerial); } void loop() { // Take one TF Mini distance measurement uint16_t dist = tfmini.getDistance(); uint16_t strength = tfmini.getRecentSignalStrength(); // Display the measurement Serial.println((dist+3.0263)/1.0538 - 10.8); // Wait some short time before taking the next measurement delay(25); }
01fef32e25d8097a259b96f71892e14adfd91db2
5f9aa7846462f286ecff94d55fd26a736ac21238
/source/core/surface/fresnel/dielectricFresnel.cpp
f5bbc818289d9bd8e18235ea260b9cb2b057e463
[ "MIT" ]
permissive
xh5a5n6k6/cadise
bba37903facf98b7640571ec3f910a8ec0f070e1
797b116b96d7d3989b58454422501f6ace04c4b8
refs/heads/master
2023-06-01T08:17:39.848765
2021-02-04T13:17:06
2021-02-04T13:17:06
179,852,908
35
0
null
null
null
null
UTF-8
C++
false
false
365
cpp
dielectricFresnel.cpp
#include "core/surface/fresnel/dielectricFresnel.h" namespace cadise { DielectricFresnel::DielectricFresnel(const real iorOuter, const real iorInner) : _iorOuter(iorOuter), _iorInner(iorInner) { } real DielectricFresnel::iorOuter() const { return _iorOuter; } real DielectricFresnel::iorInner() const { return _iorInner; } } // namespace cadise
6ab7614a708165edc11d30ce44f2f4fefdffc516
aa5f21d80c0c6492bb5146e321f567487d618418
/BackDesktop.cpp
136a756b94ea47c08a7b45cc9e3677bc91d83d92
[]
no_license
lixujia/MagiCube
c018d4d118daf83a4bc9356cf778485169b67fbf
c727f4132616fef9365ad7513efb6dc5245f0fbf
refs/heads/master
2020-05-17T19:43:28.086197
2014-06-26T09:59:13
2014-06-26T09:59:13
15,214,858
4
0
null
null
null
null
UTF-8
C++
false
false
1,744
cpp
BackDesktop.cpp
/* @(#)BackDesktop.cpp * * Created on: 24 6月 2014 13:47:54 * Author: Lixujia <lixujia.cn@gmail.com> */ #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; #include "BackDesktop.h" BackDesktop::BackDesktop(GLfloat h,GLfloat w,GLfloat d,char const* texPath) { FILE* fp = NULL; unsigned char data[512 * 512 * 3]; memset(data,0xFF,sizeof(data)); if (NULL != (fp = fopen(texPath,"rb"))) { fseek(fp,54,SEEK_SET); fread(data,512*512*3,1,fp); fclose(fp); } glGenTextures(1,this->texture); glBindTexture(GL_TEXTURE_2D, this->texture[0]); glTexImage2D(GL_TEXTURE_2D, 0, 3, 512,512, 0, GL_BGR_EXT, GL_UNSIGNED_BYTE, data); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // 线形滤波 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // 线形滤波 this->height = h; this->width = w; this->depth = d; } void BackDesktop::draw() { GlVertex *vertex1 = NULL; GlVertex *vertex2 = NULL; GlVertex *vertex3 = NULL; GlVertex *vertex4 = NULL; vertex1 = new GlVertex(0 - this->width / 2,0 - this->height / 2,this->depth); vertex2 = new GlVertex(this->width / 2 ,0 - this->height / 2,this->depth); vertex3 = new GlVertex(this->width / 2 ,this->height / 2,this->depth); vertex4 = new GlVertex(0 - this->width / 2,this->height / 2,this->depth); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glBindTexture(GL_TEXTURE_2D, this->texture[0]); GlRectangle::draw_rectangle(*vertex1, *vertex2, *vertex3,*vertex4); glFlush(); glDisable(GL_TEXTURE_2D); }
df490aa11e1fbfc0b82ad757efed3dd7afccdaf4
8faee0b01b9afed32bb5b7ef1ab0dcbc46788b5b
/source/src/objtools/readers/unit_test/unit_test_fasta_reader.cpp
099240136312c5e64e9464de96570655a3499d1d
[]
no_license
jackgopack4/pico-blast
5fe3fa1944b727465845e1ead1a3c563b43734fb
cde1bd03900d72d0246cb58a66b41e5dc17329dd
refs/heads/master
2021-01-14T12:31:05.676311
2014-05-17T19:22:05
2014-05-17T19:22:05
16,808,473
2
0
null
null
null
null
UTF-8
C++
false
false
25,611
cpp
unit_test_fasta_reader.cpp
/* $Id: unit_test_fasta_reader.cpp 398090 2013-05-02 18:07:42Z rafanovi $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Author: Michael Kornbluh, NCBI * (initial skeleton generated by script written by Pavel Ivanov) * * File Description: * Does misc tests on the CFastaReader that aren't already covered by * test_fasta_round_trip, etc. * * * =========================================================================== */ #include <ncbi_pch.hpp> #include <corelib/ncbi_system.hpp> #include <corelib/ncbiapp.hpp> // This header must be included before all Boost.Test headers if there are any #include <corelib/test_boost.hpp> #include <corelib/rwstream.hpp> #include <corelib/stream_utils.hpp> #include <corelib/ncbimisc.hpp> #include <objects/seqset/Seq_entry.hpp> #include <objtools/readers/fasta.hpp> #include <objects/misc/sequence_macros.hpp> USING_NCBI_SCOPE; USING_SCOPE(objects); namespace { // represents inforation about one test of the CFastaReader warning system struct SWarningTest { // Each SWarningTest has one SOneWarningsInfo for each // possible type of warning. // The index into warnings_expected must equal the m_eType // of that one. m_eType is also for readability of array struct SOneWarningsInfo { enum EAppears { // start with 1 so that 0 is invalid and we catch it eAppears_MustNot = 1, eAppears_Must }; CFastaReader::CWarning::EType m_eType; EAppears m_eAppears; int m_iLineNumExpected; // 0 if doesn't appear or doesn't matter }; string m_sName; // easier than array index for humans to understand SOneWarningsInfo m_warnings_expected[CFastaReader::CWarning::eType_NUM]; CFastaReader::TFlags m_fFastaFlags; string m_sInputFASTA; }; const static CFastaReader::TFlags kDefaultFastaReaderFlags = CFastaReader::fAssumeNuc | CFastaReader::fForceType; // list of FASTA warning tests const SWarningTest fasta_warning_test_arr[] = { { "test case of no warnings", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah \n" "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" }, { "title too long", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_Must, 1 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ ABCDEFGHIJ\n" "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" }, { "nucs in title", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_Must, 1 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" }, { "too many ambig on first line", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_Must, 2 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah\n" "ACGTACGTACGTNNNNNNNNNNNNNNNTUYYYYYYYYYYYYYYYYYYYYYYYYYYTACGT\n" }, { "invalid residue on first line", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_Must, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah\n" "ACEACGTAEEEACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" }, { "invalid residue on subsequent line", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_Must, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah\n" "ACGACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\n" "ACEACGTACGTACGTAEETACGTACGTACGTACGTACGTACGTACGT\n" }, { "amino acids in title", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_Must, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\n" }, { "trigger as many warnings as possible", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_Must, 1 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_Must, 1 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_Must, 2 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_Must, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_Must, 1 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah [topology=linear] ACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTACACGTACGTAC\n" "ACGACNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGTEACGTACGTACGT\n" }, { "invalid residue on multiple lines", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_Must, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, kDefaultFastaReaderFlags, // CFastaReader flags "> blah\n" "ACACEACGTACGTACGTEEEETACGTACGTACGTACGTACGTACGTA\n" "ACEACGTACGTACGTAEETACGTACGTACGTACGTACGTACGTACGT\n" }, { "Make sure it reads modifiers if requested", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 } }, // Note: non-default flags CFastaReader::fAddMods | kDefaultFastaReaderFlags, // CFastaReader flags "> blah [topology=linear]\n" "ACACAACGTACGTACGTAAAATACGTACGTACGTACGTACGTACGTA\n" "ACAACGTACGTACGTAAATACGTACGTACGTACGTACGTACGTACGT\n" }, { "Test unexpected mods on line other than first line", { { CFastaReader::CWarning::eType_TitleTooLong, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_NucsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_TooManyAmbigOnFirstLine, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_InvalidResidue, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_AminoAcidsInTitle, SWarningTest::SOneWarningsInfo::eAppears_MustNot, 0 }, { CFastaReader::CWarning::eType_ModsFoundButNotExpected, SWarningTest::SOneWarningsInfo::eAppears_Must, 4 } }, kDefaultFastaReaderFlags, // CFastaReader flags ">blah \n" "ACACAACGTACGTACGTAAAATACGTACGTACGTACGTACGTACGTA\n" "ACAACGTACGTACGTAAATACGTACGTACGTACGTACGTACGTACGT\n" ">blahblah [topology=linear]\n" "TCACAACGTACGTACGTAAAATACGTACGTACGTACGTACGTACGTA\n" "ACAACGTACGTACGTAAATACGTACGTACGTACGTACGTACGTACGT\n" ">blahblah2 \n" "GCACAACGTACGTACGTAAAATACGTACGTACGTACGTACGTACGTA\n" "ACAACGTACGTACGTAAATACGTACGTACGTACGTACGTACGTACGT\n" } }; } // Test that the right warnings appear under the right conditions BOOST_AUTO_TEST_CASE(TestWarnings) { // IF THIS FAILS, IT MEANS YOU NEED TO UPDATE THE TESTS! // ( this is here because the tests may need to be adjusted if // the number of possible warnings changes. ) BOOST_REQUIRE( CFastaReader::CWarning::eType_NUM == 6 ); // sanity test the tests for( size_t warn_test_idx = 0; warn_test_idx < ArraySize(fasta_warning_test_arr); ++warn_test_idx ) { for( size_t iTestNum = 0; iTestNum < CFastaReader::CWarning::eType_NUM; ++iTestNum ) { const SWarningTest::SOneWarningsInfo & one_warning_info = fasta_warning_test_arr[warn_test_idx].m_warnings_expected[iTestNum]; // index must equal the EType BOOST_REQUIRE( one_warning_info.m_eType == iTestNum ); BOOST_REQUIRE( one_warning_info.m_eAppears == SWarningTest::SOneWarningsInfo::eAppears_Must || one_warning_info.m_eAppears == SWarningTest::SOneWarningsInfo::eAppears_MustNot ); // expected line num should be 0 if the warning isn't supposed to appear, // but this isn't a show-stopper. BOOST_CHECK( one_warning_info.m_eAppears == SWarningTest::SOneWarningsInfo::eAppears_Must || one_warning_info.m_iLineNumExpected == 0 ); } } for( size_t warn_test_idx = 0; warn_test_idx < ArraySize(fasta_warning_test_arr); ++warn_test_idx ) { const SWarningTest & warning_test = fasta_warning_test_arr[warn_test_idx]; cout << endl; cout << "Running test case '" << warning_test.m_sName << "'" << endl; // this will hold warnings found CRef<CFastaReader::TWarningRefVec> pWarningRefVec( new CFastaReader::TWarningRefVec ); // create fasta reader CStringReader fastaStringReader( warning_test.m_sInputFASTA ); CRStream fastaRStream( &fastaStringReader ); CFastaReader fasta_reader( fastaRStream, warning_test.m_fFastaFlags ); fasta_reader.SetWarningOutput( pWarningRefVec ); // do the parsing BOOST_CHECK_NO_THROW( fasta_reader.ReadSet() ); // make sure exactly the warnings that were supposed to appeared typedef map<CFastaReader::CWarning::EType, int> TMapWarningTypeToLineNum; TMapWarningTypeToLineNum mapWarningTypeToLineNum; // load the warnings that were seen into warningsSeenFromThisTest ITERATE( CFastaReader::TWarningRefVec::TObjectType, warning_load_it, pWarningRefVec->GetData() ) { // check if it already exists and has a different line num TMapWarningTypeToLineNum::const_iterator find_iter = mapWarningTypeToLineNum.find((*warning_load_it)->GetType()); BOOST_CHECK_MESSAGE( ( find_iter == mapWarningTypeToLineNum.end() ) || ( find_iter->second == (*warning_load_it)->GetLineNum() ), "On warning check " << warning_test.m_sName << '(' << warn_test_idx << "): " << "Multiple warnings on different lines of type " << CFastaReader::CWarning::GetStringOfType( (*warning_load_it)->GetType()) ); mapWarningTypeToLineNum.insert( TMapWarningTypeToLineNum::value_type( (*warning_load_it)->GetType(), (*warning_load_it)->GetLineNum() ) ); } // make sure we have exactly the warnings we're expecting for( size_t warning_check_idx = 0; warning_check_idx < ArraySize(warning_test.m_warnings_expected); ++warning_check_idx ) { const SWarningTest::SOneWarningsInfo & one_warning_info = warning_test.m_warnings_expected[warning_check_idx]; const CFastaReader::CWarning::EType eExpectedType = one_warning_info.m_eType; const bool bWarningShouldAppear = ( one_warning_info.m_eAppears == SWarningTest::SOneWarningsInfo::eAppears_Must ); const int iExpectedLineNum = one_warning_info.m_iLineNumExpected; // check whether warning does actually appear and // what line it's on bool bWarningDoesAppear = false; int iWarningLineNum = 0; TMapWarningTypeToLineNum::const_iterator find_iter = mapWarningTypeToLineNum.find( eExpectedType ); if( find_iter != mapWarningTypeToLineNum.end() ) { bWarningDoesAppear = true; iWarningLineNum = find_iter->second; } // check if warning does appear if it's supposed to, // or that it doesn't appear if it isn't supposed to BOOST_CHECK_MESSAGE( bWarningShouldAppear == bWarningDoesAppear, "On warning check " << warning_test.m_sName << '(' << warn_test_idx << "): " << "Type " << CFastaReader::CWarning::GetStringOfType( eExpectedType) << ": should " << (bWarningShouldAppear ? "": "not ") << "appear but " << "it does" << (bWarningDoesAppear ? "" : " not") ); // check that line numbers match if( bWarningShouldAppear && bWarningDoesAppear && iExpectedLineNum > 0 ) { BOOST_CHECK_MESSAGE( iExpectedLineNum == iWarningLineNum, "On warning check " << warning_test.m_sName << '(' << warn_test_idx << "): " << "Type " << CFastaReader::CWarning::GetStringOfType( eExpectedType) << ": " << "Line num of warning should be " << iExpectedLineNum << ", but it's " << iWarningLineNum); } } } } BOOST_AUTO_TEST_CASE(TestTitleRemovedIfEmpty) { static const string kFastaWhereAllModsRemoved = ">Seq1 [topology=circular]\n" "ACGTACGTACGTACGTACGTACGTACGTACGTACGT\n"; CMemoryLineReader line_reader( kFastaWhereAllModsRemoved.c_str(), kFastaWhereAllModsRemoved.length() ); CFastaReader fasta_reader( line_reader, CFastaReader::fAddMods ); CRef<CSeq_entry> pSeqEntry = fasta_reader.ReadOneSeq(); FOR_EACH_SEQDESC_ON_BIOSEQ(desc_it, pSeqEntry->GetSeq()) { BOOST_CHECK( ! (*desc_it)->IsTitle() ); } } BOOST_AUTO_TEST_CASE(TestProteinSeqGapChar) { static const string kFastaWithProtGap = ">Dobi [organism=Canis familiaris] [breed=Doberman pinscher]\n" "MMMTGCMTGGGTMMMMGTMGTMGMMGMGMMGGCTTTTMGCCCMGMMGTMMTMCCCMTGTTTTCMGCMTTM\n" "GGMMMMMGGGCTGTTG\n" ">?unk100\n" "TGGMTGMCMGMMMCCTTGTTGGTCCMMMMTGCMMMCCCMGMTKGTMMGMCCMTTTTMMMMGCMTTGGGTC\n" "TTMGMMMTMGGGCMMCMCMGMMCMMMMMT\n" ">?234\n" "MMMMMTMMMMGCMTTMGTMGMMMTTTGTMCMGMMCTGGMMMMGGMMGGMMMMMTTTCMMMMMTTGGGCCT\n"; CMemoryLineReader line_reader( kFastaWithProtGap.c_str(), kFastaWithProtGap.length() ); CFastaReader fasta_reader( line_reader, CFastaReader::fAddMods | CFastaReader::fAssumeProt | // Yes, assume prot even though you see only ACGT above CFastaReader::fUseIupacaa | CFastaReader::fNoSplit ); BOOST_CHECK_NO_THROW(fasta_reader.ReadOneSeq()); }
817de2b48b54ee4f8e49bf6b4d00bc94575b3c3a
32ae3886dc59a8484655a3983fa8cd3b1a17724a
/integrators/symmetric_linear_multistep_integrator_body.hpp
9d819d4c0a331ac35ebd6895580db2df1994f932
[ "MIT" ]
permissive
smartdummies/Principia
7983b4e05ba060146ec04c0932994dbb623f098d
829819616b56a0d283d72468e0e7ac5f9212b818
refs/heads/master
2021-08-26T09:25:48.676900
2017-11-17T18:24:41
2017-11-17T18:24:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
18,375
hpp
symmetric_linear_multistep_integrator_body.hpp
 #pragma once #include "integrators/symmetric_linear_multistep_integrator.hpp" #include <algorithm> #include <list> #include <vector> #include "geometry/serialization.hpp" #include "integrators/symplectic_runge_kutta_nyström_integrator.hpp" namespace principia { namespace integrators { namespace internal_symmetric_linear_multistep_integrator { using base::make_not_null_unique; using geometry::QuantityOrMultivectorSerializer; int const startup_step_divisor = 16; template<typename Position, int order_> Status SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Solve( Instant const& t_final) { using Acceleration = typename ODE::Acceleration; using Displacement = typename ODE::Displacement; using DoubleDisplacement = DoublePrecision<Displacement>; using DoubleDisplacements = std::vector<DoubleDisplacement>; using DoublePosition = DoublePrecision<Position>; auto const& ɑ = integrator_.ɑ_; auto const& β_numerator = integrator_.β_numerator_; auto const& β_denominator = integrator_.β_denominator_; auto& current_state = this->current_state_; auto& append_state = this->append_state_; auto const& step = this->step_; auto const& equation = this->equation_; if (previous_steps_.size() < order_) { StartupSolve(t_final); // If |t_final| is not large enough, we may not have generated enough // points. Bail out, we'll continue the next time |Solve| is called. if (previous_steps_.size() < order_) { return Status::OK; } } CHECK_EQ(previous_steps_.size(), order_); // Argument checks. int const dimension = previous_steps_.back().displacements.size(); // Time step. CHECK_LT(Time(), step); Time const& h = step; // Current time. DoublePrecision<Instant> t = previous_steps_.back().time; // Order. int const k = order_; std::vector<Position> positions(dimension); DoubleDisplacements Σj_minus_ɑj_qj(dimension); std::vector<Acceleration> Σj_βj_numerator_aj(dimension); while (h <= (t_final - t.value) - t.error) { // We take advantage of the symmetry to iterate on the list of previous // steps from both ends. auto front_it = previous_steps_.begin(); auto back_it = previous_steps_.rbegin(); // This block corresponds to j = 0. We must not pair it with j = k. { DoubleDisplacements const& qj = front_it->displacements; std::vector<Acceleration> const& aj = front_it->accelerations; double const ɑj = ɑ[0]; double const βj_numerator = β_numerator[0]; for (int d = 0; d < dimension; ++d) { Σj_minus_ɑj_qj[d] = Scale(-ɑj, qj[d]); Σj_βj_numerator_aj[d] = βj_numerator * aj[d]; } ++front_it; } // The generic value of j, paired with k - j. for (int j = 1; j < k / 2; ++j) { DoubleDisplacements const& qj = front_it->displacements; DoubleDisplacements const& qk_minus_j = back_it->displacements; std::vector<Acceleration> const& aj = front_it->accelerations; std::vector<Acceleration> const& ak_minus_j = back_it->accelerations; double const ɑj = ɑ[j]; double const βj_numerator = β_numerator[j]; for (int d = 0; d < dimension; ++d) { Σj_minus_ɑj_qj[d] -= Scale(ɑj, qj[d]); Σj_minus_ɑj_qj[d] -= Scale(ɑj, qk_minus_j[d]); Σj_βj_numerator_aj[d] += βj_numerator * (aj[d] + ak_minus_j[d]); } ++front_it; ++back_it; } // This block corresponds to j = k / 2. We must not pair it with j = k / 2. { DoubleDisplacements const& qj = front_it->displacements; std::vector<Acceleration> const& aj = front_it->accelerations; double const ɑj = ɑ[k / 2]; double const βj_numerator = β_numerator[k / 2]; for (int d = 0; d < dimension; ++d) { Σj_minus_ɑj_qj[d] -= Scale(ɑj, qj[d]); Σj_βj_numerator_aj[d] += βj_numerator * aj[d]; } } // Create a new step in the instance. t.Increment(h); previous_steps_.pop_front(); previous_steps_.emplace_back(); Step& current_step = previous_steps_.back(); current_step.time = t; current_step.accelerations.resize(dimension); // Fill the new step. We skip the division by ɑk as it is equal to 1.0. double const ɑk = ɑ[0]; DCHECK_EQ(ɑk, 1.0); for (int d = 0; d < dimension; ++d) { DoubleDisplacement& current_displacement = Σj_minus_ɑj_qj[d]; current_displacement.Increment(h * h * Σj_βj_numerator_aj[d] / β_denominator); current_step.displacements.push_back(current_displacement); DoublePosition const current_position = DoublePosition() + current_displacement; positions[d] = current_position.value; current_state.positions[d] = current_position; } equation.compute_acceleration(t.value, positions, current_step.accelerations); VelocitySolve(dimension); // Inform the caller of the new state. current_state.time = t; append_state(current_state); } return Status::OK; } template<typename Position, int order_> SymmetricLinearMultistepIntegrator<Position, order_> const& SymmetricLinearMultistepIntegrator<Position, order_>::Instance::integrator() const { return integrator_; } template<typename Position, int order_> not_null<std::unique_ptr<typename Integrator< SpecialSecondOrderDifferentialEquation<Position>>::Instance>> SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Clone() const { return std::unique_ptr<Instance>(new Instance(*this)); } template<typename Position, int order_> void SymmetricLinearMultistepIntegrator<Position, order_>:: Instance::WriteToMessage( not_null<serialization::IntegratorInstance*> message) const { FixedStepSizeIntegrator<ODE>::Instance::WriteToMessage(message); auto* const extension = message ->MutableExtension( serialization::FixedStepSizeIntegratorInstance::extension) ->MutableExtension( serialization::SymmetricLinearMultistepIntegratorInstance:: extension); for (auto const& previous_step : previous_steps_) { previous_step.WriteToMessage(extension->add_previous_steps()); } extension->set_startup_step_index(startup_step_index_); } template<typename Position, int order_> void SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Step:: WriteToMessage( not_null<serialization::SymmetricLinearMultistepIntegratorInstance:: Step*> const message) const { using AccelerationSerializer = QuantityOrMultivectorSerializer< typename ODE::Acceleration, serialization::SymmetricLinearMultistepIntegratorInstance::Step:: Acceleration>; for (auto const& displacement : displacements) { displacement.WriteToMessage(message->add_displacements()); } for (auto const& acceleration : accelerations) { AccelerationSerializer::WriteToMessage(acceleration, message->add_accelerations()); } time.WriteToMessage(message->mutable_time()); } template <typename Position, int order_> typename SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Step SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Step:: ReadFromMessage( serialization::SymmetricLinearMultistepIntegratorInstance::Step const& message) { using AccelerationSerializer = QuantityOrMultivectorSerializer< typename ODE::Acceleration, serialization::SymmetricLinearMultistepIntegratorInstance::Step:: Acceleration>; Step step; for (auto const& displacement : message.displacements()) { step.displacements.push_back( DoublePrecision<typename ODE::Displacement>::ReadFromMessage( displacement)); } for (auto const& acceleration : message.accelerations()) { step.accelerations.push_back( AccelerationSerializer::ReadFromMessage(acceleration)); } step.time = DoublePrecision<Instant>::ReadFromMessage(message.time()); return step; } template<typename Position, int order_> SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Instance( IntegrationProblem<ODE> const& problem, AppendState const& append_state, Time const& step, SymmetricLinearMultistepIntegrator const& integrator) : FixedStepSizeIntegrator<ODE>::Instance(problem, append_state, step), integrator_(integrator) { previous_steps_.emplace_back(); FillStepFromSystemState(this->equation_, this->current_state_, this->previous_steps_.back()); } template<typename Position, int order_> SymmetricLinearMultistepIntegrator<Position, order_>::Instance::Instance( IntegrationProblem<ODE> const& problem, AppendState const& append_state, Time const& step, int const startup_step_index, std::list<Step> const& previous_steps, SymmetricLinearMultistepIntegrator const& integrator) : FixedStepSizeIntegrator<ODE>::Instance(problem, append_state, step), startup_step_index_(startup_step_index), previous_steps_(previous_steps), integrator_(integrator) {} template<typename Position, int order_> void SymmetricLinearMultistepIntegrator<Position, order_>:: Instance::StartupSolve(Instant const& t_final) { auto& current_state = this->current_state_; auto const& step = this->step_; auto const& equation = this->equation_; Time const startup_step = step / startup_step_divisor; CHECK(!previous_steps_.empty()); CHECK_LT(previous_steps_.size(), order_); auto const startup_append_state = [this](typename ODE::SystemState const& state) { // Stop changing anything once we're done with the startup. We may be // called one more time by the |startup_integrator_|. if (previous_steps_.size() < order_) { this->current_state_ = state; // The startup integrator has a smaller step. We do not record all // the states it computes, but only those that are a multiple of the // main integrator step. if (++startup_step_index_ % startup_step_divisor == 0) { CHECK_LT(previous_steps_.size(), order_); previous_steps_.emplace_back(); FillStepFromSystemState(this->equation_, this->current_state_, previous_steps_.back()); // This call must happen last for a subtle reason: the callback may // want to |Clone| this instance (see |Ephemeris::Checkpoint|) in // which cases it is necessary that all the member variables be // filled for restartability to work. this->append_state_(state); } } }; auto const startup_instance = integrator_.startup_integrator_.NewInstance({equation, current_state}, startup_append_state, startup_step); startup_instance->Solve( std::min(current_state.time.value + (order_ - previous_steps_.size()) * step + step / 2.0, t_final)); CHECK_LE(previous_steps_.size(), order_); } template<typename Position, int order_> void SymmetricLinearMultistepIntegrator<Position, order_>:: Instance::VelocitySolve(int const dimension) { using Velocity = typename ODE::Velocity; using Acceleration = typename ODE::Acceleration; auto const& velocity_integrator = integrator_.velocity_integrator_; auto& current_state = this->current_state_; auto const& step = this->step_; for (int d = 0; d < dimension; ++d) { DoublePrecision<Velocity>& velocity = current_state.velocities[d]; auto it = previous_steps_.rbegin(); Acceleration weighted_acceleration; for (int i = 0; i < velocity_integrator.numerators.size; ++i) { double const numerator = velocity_integrator.numerators[i]; weighted_acceleration += numerator * it->accelerations[d]; ++it; } velocity.Increment(step * weighted_acceleration / velocity_integrator.denominator); } } template<typename Position, int order_> void SymmetricLinearMultistepIntegrator<Position, order_>:: Instance::FillStepFromSystemState(ODE const& equation, typename ODE::SystemState const& state, Step& step) { std::vector<typename ODE::Position> positions; step.time = state.time; for (auto const& position : state.positions) { step.displacements.push_back(position - DoublePrecision<Position>()); positions.push_back(position.value); } step.accelerations.resize(step.displacements.size()); equation.compute_acceleration(step.time.value, positions, step.accelerations); } template<typename Position, int order_> SymmetricLinearMultistepIntegrator<Position, order_>:: SymmetricLinearMultistepIntegrator( serialization::FixedStepSizeIntegrator::Kind const kind, FixedStepSizeIntegrator<ODE> const& startup_integrator, FixedVector<double, half_order_> const & ɑ, FixedVector<double, half_order_> const& β_numerator, double const β_denominator) : FixedStepSizeIntegrator< SpecialSecondOrderDifferentialEquation<Position>>(kind), startup_integrator_(startup_integrator), velocity_integrator_(AdamsMoultonOrder<velocity_order_>()), ɑ_(ɑ), β_numerator_(β_numerator), β_denominator_(β_denominator) { CHECK_EQ(ɑ_[0], 1.0); CHECK_EQ(β_numerator_[0], 0.0); } template <typename Position, int order_> not_null<std::unique_ptr<typename Integrator< SpecialSecondOrderDifferentialEquation<Position>>::Instance>> SymmetricLinearMultistepIntegrator<Position, order_>::NewInstance( IntegrationProblem<ODE> const& problem, AppendState const& append_state, Time const& step) const { // Cannot use |make_not_null_unique| because the constructor of |Instance| is // private. return std::unique_ptr<Instance>( new Instance(problem, append_state, step, *this)); } template<typename Position, int order_> not_null<std::unique_ptr< typename Integrator< SpecialSecondOrderDifferentialEquation<Position>>::Instance>> SymmetricLinearMultistepIntegrator<Position, order_>::ReadFromMessage( serialization::FixedStepSizeIntegratorInstance const& message, IntegrationProblem<ODE> const& problem, AppendState const& append_state, Time const& step) const { CHECK(message.HasExtension( serialization::SymmetricLinearMultistepIntegratorInstance::extension)) << message.DebugString(); auto const& extension = message.GetExtension( serialization::SymmetricLinearMultistepIntegratorInstance::extension); std::list<typename Instance::Step> previous_steps; for (auto const& previous_step : extension.previous_steps()) { previous_steps.push_back(Instance::Step::ReadFromMessage(previous_step)); } return std::unique_ptr<typename Integrator<ODE>::Instance>( new Instance(problem, append_state, step, extension.startup_step_index(), previous_steps, *this)); } } // namespace internal_symmetric_linear_multistep_integrator template<typename Position> SymmetricLinearMultistepIntegrator<Position, 8> const& Quinlan1999Order8A() { static SymmetricLinearMultistepIntegrator<Position, 8> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_1999_ORDER_8A, BlanesMoan2002SRKN14A<Position>(), {1.0, -2.0, 2.0, -2.0, 2.0}, {0.0, 22081.0, -29418.0, 75183.0, -75212.0}, 15120.0); return integrator; } template<typename Position> SymmetricLinearMultistepIntegrator<Position, 8> const& Quinlan1999Order8B() { static SymmetricLinearMultistepIntegrator<Position, 8> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_1999_ORDER_8B, BlanesMoan2002SRKN14A<Position>(), {1.0, 0.0, 0.0, -0.5, -1.0}, {0.0, 192481.0, 6582.0, 816783.0, -156812.0}, 120960.0); return integrator; } template<typename Position> SymmetricLinearMultistepIntegrator<Position, 8> const& QuinlanTremaine1990Order8() { static SymmetricLinearMultistepIntegrator<Position, 8> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_TREMAINE_1990_ORDER_8, BlanesMoan2002SRKN14A<Position>(), {1.0, -2.0, 2.0, -1.0, 0.0}, {0.0, 17671.0, -23622.0, 61449.0, -50516.0}, 12096.0); return integrator; } template<typename Position> SymmetricLinearMultistepIntegrator<Position, 10> const& QuinlanTremaine1990Order10() { static SymmetricLinearMultistepIntegrator<Position, 10> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_TREMAINE_1990_ORDER_10, BlanesMoan2002SRKN14A<Position>(), {1.0, -1.0, 1.0, -1.0, 1.0, -2.0}, {0.0, 399187.0, -485156.0, 2391436.0, -2816732.0, 4651330.0}, 241920.0); return integrator; } template<typename Position> SymmetricLinearMultistepIntegrator<Position, 12> const& QuinlanTremaine1990Order12() { static SymmetricLinearMultistepIntegrator<Position, 12> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_TREMAINE_1990_ORDER_12, BlanesMoan2002SRKN14A<Position>(), {1.0, -2.0, 2.0, -1.0, 0.0, 0.0, 0.0}, {0.0, 90987349.0, -229596838.0, 812627169.0, -1628539944.0, 2714971338.0, -3041896548.0}, 53222400.0); return integrator; } template<typename Position> SymmetricLinearMultistepIntegrator<Position, 14> const& QuinlanTremaine1990Order14() { static SymmetricLinearMultistepIntegrator<Position, 14> const integrator( serialization::FixedStepSizeIntegrator::QUINLAN_TREMAINE_1990_ORDER_14, BlanesMoan2002SRKN14A<Position>(), {1.0, -2.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0}, {0.0, 433489274083.0, -1364031998256.0, 5583113380398.0, -14154444148720.0, 28630585332045.0, -42056933842656.0, 48471792742212.0}, 237758976000.0); return integrator; } } // namespace integrators } // namespace principia
f45d58873e3fa4238e29517ebb66fbb485a1aa18
0c670490d899edf9abc93499b1f3c712bf599f42
/Evil_man.cpp
14dfa03aec82f5d8aef6e1f7a5f404ce70c165e8
[]
no_license
Akapulk/LAB_1.5
48d4e922177e4fbb59c6b702fb10922aa9921534
114d89654e4d6573a8843ea39e9c302c146f992c
refs/heads/master
2020-09-14T01:12:01.564096
2019-11-20T15:07:57
2019-11-20T15:07:57
222,960,701
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
1,253
cpp
Evil_man.cpp
#pragma once #include "Evil_man.hpp" //констурктор Evil_man::Evil_man(const string& name) :Personage(name), type_of_weapon(type_of_weapon), basic_skills(basic_skills), crime(crime), habitat(habitat) { cout << "\nEvil_man\n"; } //конструктор копирования Evil_man::Evil_man(const Evil_man& a) : Personage(a.name), type_of_weapon(a.type_of_weapon), basic_skills(a.basic_skills), crime(a.crime), habitat(a.habitat) { cout << "\nEvil_man cpy\n"; } //методы получения данных string& Evil_man::Type_of_weapon() { return type_of_weapon; } string& Evil_man::Basic_skills() { return basic_skills; } string& Evil_man::Crime() { return crime; } string& Evil_man::Habitat() { return habitat; } Evil_man::~Evil_man() { cout << "\n~Evil_man\n"; } //перегрузка опретаоров дружественой функцией для ввода и вывода istream& operator >> (istream& in, Evil_man& a) { a.read(in); return in >> a.type_of_weapon >> a.basic_skills >> a.crime >> a.habitat; } ostream& operator<<(ostream& out, const Evil_man& a) { a.print(out); return out << a.type_of_weapon << " " << a.basic_skills << " " << a.crime << " " << a.habitat; }
199f5c3957fb3c4e0b217a23ec662e76eece0496
f48bac1c922efe6cc5fa53f3a453b5112c2a39d7
/function_object_demos/Func_obj_example.cpp
2a5f07691829df26cf6ece3d7b0165335e6d8045
[]
no_license
zincxenon/381
f814b7e560dfaa8561d20ef49dac4dac6f536762
1a7e1ee5867c94da0928d14d51826c8ff3339e18
refs/heads/master
2021-01-10T01:47:53.935266
2016-03-02T21:00:13
2016-03-02T21:00:13
52,933,121
1
0
null
null
null
null
UTF-8
C++
false
false
1,130
cpp
Func_obj_example.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // a function object class that calculates a mean, accumulating every supplied value class Calc_Mean { public: Calc_Mean() : sum(0.), n(0) {} void operator() (double x) // accumulate the supplied value { n++; sum += x; } double get_mean() const {return sum / double(n);} int get_n() const {return n;} private: double sum; int n; }; // prototypes void test1(); void test2(); int main() { // test1(); test2(); } void test1() { cout << "Enter a bunch of values, ^D (EOF) when done:" << endl; double x; Calc_Mean cm; while (cin >> x) cm(x); // use like an ordinary function cout << endl; cout << "mean of " << cm.get_n() << " values is " << cm.get_mean() << endl; } void test2() { cout << "Enter a bunch of values, ^D (EOF) when done:" << endl; vector<double> data; double x; while (cin >> x) data.push_back(x); // use with an algorithm Calc_Mean cm = for_each(data.begin(), data.end(), Calc_Mean()); cout << endl; cout << "mean of " << cm.get_n() << " values is " << cm.get_mean() << endl; }
c79da739788532132a22e6a1b2885df3438e2cd6
6c23eadf0eaac5784bd843bcc858d4f3a5fc5663
/passenger_airplane.cpp
1e9342b2b424e2b22a25a2e7fd0cb4d2ed9f25c4
[]
no_license
amirasgharian/airport
c0957a4d1bd8a94b8e3b4f99a179965f5c493874
fc6d5518dcaf63a81a0d284e31eb36f9b3dc89cf
refs/heads/main
2023-06-29T09:40:07.871267
2021-07-27T16:47:27
2021-07-27T16:47:27
389,931,794
0
0
null
null
null
null
UTF-8
C++
false
false
657
cpp
passenger_airplane.cpp
#include <iostream> #include <vector> #include <typeinfo> #include <iomanip> //#include <stdexcept> #include "passenger_airplane.h" #include "airplane.h" using namespace std ; passenger_airplane::passenger_airplane() { } void passenger_airplane::set_airplane_capacity(int capacity) { this->capacity = capacity ; } int passenger_airplane::get_airplane_capacity() { return capacity ; } void passenger_airplane::show(int u) { cout <<u+1<<"_"<<"the plane_id :"<< left << setw(20) << airplane_ptr[u]->get_airplane_id() <<"the capacity of airplane :"<< airplane_ptr[u]->get_airplane_capacity() <<" persons"<< endl ; }
fce9cf214b6ec99ef7dc97bc3b411719c992011b
7ab5c79d2716bc56c2fc2be9bf1cdcb8530379a4
/c++/Diverse problems and algorithms/Algorithms/LEE_prob/LEE/taxe/taxe.cpp
9eeed779d4c670c431733a77f185a46c3f643311
[]
no_license
TeoPaius/Projects
dfd8771199cd8a0e2df07e18dd165bf63ad08292
ced149ecf1243da2aa97bb1f0e4cd37140bd2d2d
refs/heads/master
2021-09-24T02:10:52.220320
2018-10-01T16:29:01
2018-10-01T16:29:01
104,876,094
1
0
null
null
null
null
UTF-8
C++
false
false
1,600
cpp
taxe.cpp
#include <fstream.h> #define INFILE "taxe.in" #define OUTFILE "taxe.out" #define DIM 101 int n; long S; int a[DIM][DIM]; long b[DIM][DIM]; // matricea costurilor const int di[] = { -1, 0, 1, 0 }; const int dj[] = { 0, 1, 0, -1 }; typedef struct nod { int i, j; nod *urm; } *PNOD, NOD; PNOD prim; PNOD ultim; void Citeste(); void Rezolva(); void Add(int l, int c); int main () { Citeste (); Rezolva (); return 0; } void Add(int l, int c) { if (prim == NULL) // coda vida { prim = new NOD; prim->urm = NULL; prim->i = l; prim->j = c; ultim = prim; } else { PNOD p; p = new NOD; p->urm = NULL; p->i = l; p->j = c; ultim->urm = p; ultim = p; } } void Remove () { PNOD p; p = prim; prim = prim->urm; delete p; } void Citeste () { ifstream fin(INFILE); fin >> S >> n; int i, j; for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) fin >> a[i][j]; fin.close(); } void Rezolva () { Add(1, 1); // bag in coada configuratia initiala (1, 1) b[1][1] = a[1][1]; PNOD p; p = prim; int inou, jnou, k; while (p != NULL) // cat timp lista nu e vida { for (k = 0; k < 4; k++) { inou = p->i + di[k]; jnou = p->j + dj[k]; if (inou > 0 && inou <= n && jnou > 0 && jnou <= n) if (b[inou][jnou] == 0 || b[inou][jnou] > b[p->i][p->j] + (long)(a[inou][jnou])) { b[inou][jnou] = b[p->i][p->j] + (long)(a[inou][jnou]); Add(inou, jnou); } } p = p->urm; Remove (); // sterge vechiul cap al cozii } ofstream fout(OUTFILE); if ( S < b[n][n]) fout << "-1"; else fout << S - b[n][n]; fout.close(); }
6cf2b8dc0aa514be63da969e07b3ce2beb847811
9868d84ff72a6b30408b01b1cab9042480d12ccc
/src/file.cpp
f8c014261df659b32768e0f35560fce716886e3d
[]
no_license
sanwave/kick2
d48126424efa407743ac2d6ffdb59a22495e4da5
48b154ee469a1bc20625b84502a37ccaa02479ba
refs/heads/master
2020-04-06T06:55:52.578205
2017-12-16T06:28:42
2017-12-16T06:28:42
64,542,639
0
2
null
null
null
null
UTF-8
C++
false
false
17,491
cpp
file.cpp
#include <iostream> #include <assert.h> #include <errno.h> #include <cstdlib> #include "log.h" #include "file.h" File::File(AeEngine *engine) :m_eventFd(-1), m_engine(engine) {} File::~File() {} bool File::Initialize() { bool isOk = true; do { m_eventFd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); if (m_eventFd < 0) // -1, errno { ERROR_LOG("File::Initialize(), create event fd failed, errno: " << errno); isOk = false; break; } DEBUG_LOG("File::Initialize(), create event fd: " << m_eventFd); memset(&m_aioCtx, 0, sizeof(m_aioCtx)); int result = io_setup(LIBAIO_EVENTS_SIZE, &m_aioCtx); if (result != 0) { ERROR_LOG("File::Initialize(), libaio initialize failed, errno: " << errno); isOk = false; break; } DEBUG_LOG("File::Initialize(), libaio initialize successfully"); m_engine->AddIoEvent(m_eventFd, AE_READABLE, NULL); } while (0); return isOk; } void File::OnRead(int fd, ClientData *data, int mask) { do { int eventFd = fd; uint64_t finishedNum; int result = read(eventFd, &finishedNum, sizeof(finishedNum)); if (result != sizeof(finishedNum)) { perror("read"); ERROR_LOG("File::OnRead(), read event fd failed. result: " << result << ", errno: " << errno); break; } while (finishedNum) { struct io_event aioEvents[LIBAIO_EVENTS_SIZE]; struct timespec timeout = { 0, 0 }; int ready = io_getevents(m_aioCtx, 1, LIBAIO_EVENTS_SIZE, aioEvents, &timeout); if (ready < 0) { perror("io_getevent"); ERROR_LOG("io_getevents() failed. errno: " << ready); break; } for (int i = 0; i < ready; ++i) { if (aioEvents[i].res < aioEvents[i].obj->u.c.nbytes || aioEvents[i].res2 != 0) { OnAsyncIoError(aioEvents[i]); } else { OnAsyncIoComplete(aioEvents[i]); } } finishedNum -= ready; } } while (0); } void File::OnWrite(int fd, ClientData *data, int mask) {} bool File::Exist(const string &fileName) { return access(fileName.c_str(), F_OK) == 0; } int32_t File::Create(const string &fileName, int64_t size) { int fd = open(fileName.c_str(), O_CREAT | O_EXCL | O_RDWR | O_DIRECT, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (fd == -1) // -1, errno { if (errno == EEXIST) { ERROR_LOG("File::Create(), the file: " << fileName << " exists, " "or O_EXCL is not supported in the environment, errno: " << errno); } else { ERROR_LOG("File::Create(), create file failed, file name: " << fileName << ", errno: " << errno); } return -1; } if (size > 0) { if (fallocate(fd, 0, 0, size) == -1) // -1 { ERROR_LOG("File::Create(), fallocate() failed, errno: " << errno); close(fd); return -1; } } close(fd); return 0; } int32_t File::CreateDirectory(const string &directoryName) { int result = mkdir(directoryName.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (result < 0) // -1 { ERROR_LOG("File::CreateDirectory(), mkdir() failed, directory name: " << directoryName << ", errno: " << errno); return -1; } return 0; } int32_t File::Rename(const string &oldName, const string &newName, bool canOverwrite) { int32_t result = 0; do { bool isExist = Exist(oldName); if (isExist == false) { ERROR_LOG("File::Rename(), the original file: " << oldName << " do not exist"); return -1; } isExist = Exist(newName); if ((isExist == true) && (canOverwrite == false)) { ERROR_LOG("File::Rename(), the destination file: " << newName << " already exists, so move file failed"); result = -1; break; } struct stat buf; int result = stat(oldName.c_str(), &buf); if (result < 0) // -1, errno { ERROR_LOG("File::Rename(), require file: " << newName << " stat info failed, errno" << errno); result = -1; break; } result = rename(oldName.c_str(), newName.c_str()); if (result < 0) { ERROR_LOG("File::Rename(), reanme file: " << newName << " failed, errno" << errno); result = -1; break; } } while (0); return result; } int64_t File::GetSize(const string &fileName) { struct stat buf; int result = stat(fileName.c_str(), &buf); if (result < 0) // -1, errno { ERROR_LOG("File::GetSize(), require file: " << fileName << " stat info failed, errno" << errno); return -1; } return buf.st_size; } int64_t File::GetSizeOnDisk(const string &fileName) { struct stat buf; int result = stat(fileName.c_str(), &buf); if (result < 0) // -1, errno { ERROR_LOG("File::GetSizeOnDisk(), require file: " << fileName << " stat info failed, errno" << errno); return -1; } return buf.st_blksize / 8 * buf.st_blocks; } int32_t File::Delete(const string &fileName) { int result = remove(fileName.c_str()); if (result < 0) // -1, errno { ERROR_LOG("File::Delete(), remove file: " << fileName << " failed, errno" << errno); return -1; } return 0; } int32_t File::Scan(const string &path, int layers, list<FileInfo> &fileInfos) { int32_t result = 0; DIR *dirFd = NULL; do { if (layers <= 0) { break; } assert(path.at(path.size() - 1) == '/'); dirFd = opendir(path.c_str()); if (!dirFd) { ERROR_LOG("File::Scan(), open dir: " << path << " failed, errno" << errno); result = -1; break; } struct stat buf; struct dirent entry; struct dirent *item = NULL; result = readdir_r(dirFd, &entry, &item); for (; (item != NULL) && (result == 0); result = readdir_r(dirFd, &entry, &item)) { if (strcmp(item->d_name, ".") == 0 || strcmp(item->d_name, "..") == 0) continue; string fullName = path + item->d_name; result = stat(fullName.c_str(), &buf); if (result < 0) { ERROR_LOG("File::Scan(), require file: " << fullName << " stat info failed, " "errno" << errno); result = -1; continue; } if (S_ISDIR(buf.st_mode)) { string subPath = item->d_name; result = Scan(path + subPath + "/", layers - 1, fileInfos); continue; } FileInfo fileInfo; fileInfo.Path = path; fileInfo.FileName = item->d_name; fileInfo.FileSize = buf.st_size; fileInfo.LastModifyTime = buf.st_mtim.tv_sec; fileInfos.push_back(fileInfo); } } while (0); if (dirFd != NULL) { closedir(dirFd); } return 0; } int32_t File::FastScan(const string &directory, int layers, std::list<FileInfo> &fileInfos) { int result = 0; do { std::string path = directory; struct dirent **namelist; result = scandir(path.c_str(), &namelist, __FileScanFilter, alphasort); if (result == -1) { perror("result"); DEBUG_LOG("File::FastScan(), execute scandir() failed, errno: " << errno); break; } else { struct stat buf; for (int i = 0; i < result; ++i) { std::string fullName = path + namelist[i]->d_name; if (stat(fullName.c_str(), &buf) < 0) { ERROR_LOG("File::FastScan(), require file: " << fullName << " stat info failed, " "errno" << errno); continue; } if (S_ISDIR(buf.st_mode)) { continue; } FileInfo fileInfo; fileInfo.Path = path; fileInfo.FileName = namelist[i]->d_name; fileInfo.FileSize = buf.st_size; fileInfo.LastModifyTime = buf.st_mtim.tv_sec; fileInfos.push_back(fileInfo); free(namelist[i]); } free(namelist); } } while (0); return result != -1 ? 0 : -1; } int __FileScanFilter(const struct dirent *entry) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) return 0; else return 1; }; int32_t File::GetFileInfo(const string &fileName, FileInfo &fileInfo) { int32_t result = 0; do { size_t found = fileName.rfind('/'); if (found == string::npos || found == fileName.size() - 1) { ERROR_LOG("File::GetFileInfo(), fileName do not include path. " "file name: " << fileName); result = EINVAL; } struct stat buf; int result = stat(fileName.c_str(), &buf); if (result < 0) { ERROR_LOG("File::GetFileInfo(), require file: " << fileName << " stat info failed, " "errno: " << errno); result = -1; } fileInfo.Path = fileName.substr(0, found + 1); fileInfo.FileName = fileName.substr(found + 1); fileInfo.FileSize = buf.st_size; fileInfo.LastModifyTime = buf.st_mtim.tv_sec; } while (0); return result; } string File::GetFileNameByFullName(const string &fullName) { size_t found = fullName.rfind('/'); if (found == string::npos || found == fullName.size() - 1) { ERROR_LOG("File::GetFileInfo(), fileName do not include path"); } return fullName.substr(found + 1); } int32_t File::GetCurrentPath(string &currentPath) { int32_t result = 0; do { char buf[PATH_MAX]; int result = readlink("/proc/self/exe", buf, PATH_MAX); if (result < 0 || result >= PATH_MAX) { perror("readlink"); ERROR_LOG("File::GetCurrentPath(), readlink() failed"); result = -1; break; } for (int i = result; i >= 0; --i) { if (buf[i] == '/') { buf[i + 1] = '\0'; break; } } currentPath = buf; } while (0); return result; } int32_t File::Truncate(const string &fullFileName, int64_t length) { int32_t result = truncate(fullFileName.c_str(), length); if (result != 0) { ERROR_LOG("File::Truncate(), truncate file failed, " "file: " << fullFileName << ", length: " << length << ", errno: " << errno); } return result; } bool File::ReadToStream(const string &fileName, stringstream &stream) { std::ifstream inFileStream(fileName.c_str()); if (!inFileStream) { ERROR_LOG("File::ReadToStream(), open file: " << fileName << " failed, errno" << errno); return false; } stream << inFileStream.rdbuf(); inFileStream.close(); return true; } bool File::WriteFromStream(const string &fileName, const stringstream &stream) { std::ofstream outFileStream(fileName.c_str()); if (!outFileStream) { ERROR_LOG("File::WriteFromStream(), open file: " << fileName << " failed, errno" << errno); return false; } outFileStream << stream.str(); outFileStream.close(); return true; } int32_t File::ReadSync(const char *fileName, int64_t offset, int64_t length, void *buffer) { int32_t result; do { int fd = open(fileName, O_LARGEFILE | O_RDONLY | O_NOATIME); if (fd == -1) // -1, errno { perror("open"); ERROR_LOG("File::ReadSync(), open file: " << fileName << " failed, errno: " << errno); result = -1; break; } //struct stat info; //if (fstat(fd, &info) == -1) //{ // result = -1; // ERROR_LOG("File::ReadSync(), fstat file fd: " << fd << " failed, errno: " << errno); // break; //} if (lseek(fd, offset, SEEK_SET) == -1) { result = -1; break; } result = read(fd, buffer, length); } while (0); return result; } int32_t File::WriteSync(const char *fileName, int64_t offset, int64_t length, void *data) { int32_t result; do { int fd = open(fileName, O_LARGEFILE | O_WRONLY); if (fd == -1) // -1, errno { perror("open"); ERROR_LOG("File::WriteSync(), open file: " << fileName << " failed, errno: " << errno); result = -1; break; } //struct stat info; //if (fstat(fd, &info) == -1) //{ // result = -1; // ERROR_LOG("File::ReadSync(), fstat file fd: " << fd << " failed, errno: " << errno); // break; //} if (lseek(fd, offset, SEEK_SET) == -1) { result = -1; break; } result = write(fd, data, length); } while (0); return result; } int32_t File::ReadAsync(const string &fileName, int64_t offset, int64_t length, void *buffer, const AsyncIoInfo *asyncIoInfo) { assert(asyncIoInfo->Callbacker); int32_t result = 0; do { int fd = open(fileName.c_str(), O_LARGEFILE | O_DIRECT | O_RDONLY | O_NOATIME); if (fd == -1) // -1, errno { perror("open"); ERROR_LOG("File::ReadAsync(), open file: " << fileName << " failed, errno: " << errno); result = -1; break; } struct iocb *ptrIocb = new iocb(); io_prep_pread(ptrIocb, fd, buffer, (size_t)length, offset); io_set_eventfd(ptrIocb, m_eventFd); ptrIocb->data = (void *)asyncIoInfo; result = io_submit(m_aioCtx, 1, &ptrIocb); if (result < 0) { close(fd); perror("io_submit"); ERROR_LOG("File::ReadAsync(), io_submit() failed, errno: " << errno); result = -1; break; } result = fd; } while (0); return result; } int32_t File::WriteAsync(const string &fileName, int64_t offset, int64_t length, void *data, const AsyncIoInfo *asyncIoInfo) { assert(asyncIoInfo->Callbacker); int32_t result = 0; do { int fd = open(fileName.c_str(), O_LARGEFILE | O_DIRECT | O_WRONLY); if (fd < 0) // -1, errno { perror("open"); ERROR_LOG("File::WriteAsnyc(), open file: " << fileName << " failed, errno: " << errno); result = -1; break; } struct iocb *ptrIocb = new iocb(); io_prep_pwrite(ptrIocb, fd, data, length, offset); io_set_eventfd(ptrIocb, m_eventFd); ptrIocb->data = (void *)asyncIoInfo; result = io_submit(m_aioCtx, 1, &ptrIocb); if (result < 0) { close(fd); perror("io_submit"); ERROR_LOG("File::WriteAsnyc(), io_submit() failed, errno: " << errno); result = -1; break; } result = fd; } while (0); return result; } void File::OnAsyncIoComplete(struct io_event &aioEvent) { iocb *ptrIocb = aioEvent.obj; assert(ptrIocb); close(ptrIocb->aio_fildes); IAsyncIoEvent *callbacker = ((AsyncIoInfo *)ptrIocb->data)->Callbacker; switch (ptrIocb->aio_lio_opcode) { case IO_CMD_PREAD: callbacker->OnRead((AsyncIoInfo *)ptrIocb->data, ptrIocb->u.c.buf, ptrIocb->u.c.offset, ptrIocb->u.c.nbytes, aioEvent.res); break; case IO_CMD_PWRITE: callbacker->OnWrite((AsyncIoInfo *)ptrIocb->data, ptrIocb->u.c.buf, ptrIocb->u.c.offset, ptrIocb->u.c.nbytes, aioEvent.res); break; } } void File::OnAsyncIoError(struct io_event &aioEvent) { iocb *ptrIocb = aioEvent.obj; assert(ptrIocb); if (aioEvent.res2 != 0) { ERROR_LOG("File::OnAsyncIoError(), async io complete failed, res2" << aioEvent.res2); close(ptrIocb->aio_fildes); IAsyncIoEvent *callbacker = ((AsyncIoInfo *)ptrIocb->data)->Callbacker; switch (ptrIocb->aio_lio_opcode) { case IO_CMD_PREAD: callbacker->OnRead((AsyncIoInfo *)ptrIocb->data, ptrIocb->u.c.buf, ptrIocb->u.c.offset, ptrIocb->u.c.nbytes, -1); break; case IO_CMD_PWRITE: callbacker->OnWrite((AsyncIoInfo *)ptrIocb->data, ptrIocb->u.c.buf, ptrIocb->u.c.offset, ptrIocb->u.c.nbytes, -1); break; } } else if (aioEvent.res < ptrIocb->u.c.nbytes) { ERROR_LOG("The libaio complete bytes is less than request."); OnAsyncIoComplete(aioEvent); } }
46d4cee1f4fa01691f67f8475cd4f7b90a0973b1
ba1e90ae6ea9f8f74d9b542e159825341c717712
/2020/lcContest136B.cpp
6527b8bd2b72c7a55e5d7f24cfcaa8c5a41c6441
[]
no_license
sailesh2/CompetitiveCode
b384687a7caa8980ab9b9c9deef2488b0bfe9cd9
5671dac08216f4ce75d5992e6af8208fa2324d12
refs/heads/master
2021-06-24T22:39:11.396049
2020-11-27T05:22:17
2020-11-27T05:22:17
161,877,355
0
0
null
null
null
null
UTF-8
C++
false
false
1,540
cpp
lcContest136B.cpp
class Solution { private: vector<int> graph[20005]; vector<int> ans; void fillGraph(vector<vector<int>>& paths){ for(int i=0;i<paths.size();i++){ graph[paths[i][0]].push_back(paths[i][1]); graph[paths[i][1]].push_back(paths[i][0]); } } void fillEmptyGarden(int n){ for(int i=0;i<=n;i++) ans.push_back(0); } bool isPossible(int gardenNo){ int g=ans[gardenNo]; for(int i=0;i<graph[gardenNo].size();i++){ if(graph[gardenNo][i]==g) return false; } return true; } int missingFlower(set<int> flowers){ for(int i=1;i<=4;i++){ if(flowers.count(i)==0) return i; } return 0; } int getFlower(int gardenNo){ if(ans[gardenNo]!=0 && isPossible(gardenNo)) return ans[gardenNo]; set<int> flowers; for(int i=0;i<graph[gardenNo].size();i++){ flowers.insert(ans[graph[gardenNo][i]]); } return missingFlower(flowers); } vector<int> garden(int N){ fillEmptyGarden(N); for(int i=1;i<=N;i++){ ans[i]=getFlower(i); } vector<int> ans2; for(int i=1;i<=N;i++) ans2.push_back(ans[i]); return ans2; } public: vector<int> gardenNoAdj(int N, vector<vector<int>>& paths) { fillGraph(paths); return garden(N); } };
ae1f5ecef83a673eed144481603bcd6bf4696024
283fb7966bd3ec6590723023b4287af39b3fd36b
/page1/q2.cpp
ae5fb96451a05bb00355a893dc6b0bf3f7028b1e
[]
no_license
horiuchi/My-Project-Euler
8a37c25838e67339d49c7a6b901965efd14ddb2b
5c3d2ee5706314268176f41e2d36656eb9666b22
refs/heads/master
2021-01-10T22:12:44.680412
2012-09-17T06:24:23
2012-09-17T06:24:23
1,085,115
1
0
null
null
null
null
UTF-8
C++
false
false
300
cpp
q2.cpp
#include <inttypes.h> #include <iostream> int main() { uint64_t sum = 2; long x = 1, y = 2; while (true) { long term = x + y; if (term > 4000000) break; if (term % 2 == 0) { sum += term; //std::cout << term << std::endl; } x = y; y = term; } std::cout << sum << std::endl; }
3559cff6a35c23db23b233667cf129042385b31a
6b550d3d0b182bcddda1f0a175d6b6cd07b60fb3
/logdevice/common/PriorityMap.cpp
1fdb736f98e05d540e841dabf3a4356738128dac
[ "BSD-3-Clause" ]
permissive
Rachelmorrell/LogDevice
5bd04f7ab0bdf9cc6e5b2da4a4b51210cdc9a4c8
3a8d800033fada47d878b64533afdf41dc79e057
refs/heads/master
2021-06-24T09:10:20.240011
2020-04-21T14:10:52
2020-04-21T14:13:09
157,563,026
1
0
NOASSERTION
2020-04-21T19:20:55
2018-11-14T14:43:33
C++
UTF-8
C++
false
false
2,329
cpp
PriorityMap.cpp
/** * Copyright (c) 2017-present, 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. */ #include "logdevice/common/PriorityMap.h" namespace facebook { namespace logdevice { PriorityMap::NameMap& PriorityMap::toName() { static PriorityMap::NameMap _toName; return _toName; } template <> /* static */ const std::string& PriorityMap::NameMap::invalidValue() { static const std::string invalidPriorityName(""); return invalidPriorityName; } template <> void PriorityMap::NameMap::setValues() { #define PRIORITY(c) set(Priority::c, #c); #include "logdevice/common/priorities.inc" } EnumMap<TrafficClass, Priority>& PriorityMap::fromTrafficClass() { static EnumMap<TrafficClass, Priority> _fromTrafficClass; return _fromTrafficClass; } template <> const Priority& EnumMap<TrafficClass, Priority>::invalidValue() { static const Priority invalidPriority(Priority::INVALID); return (invalidPriority); }; // Define priorities for all traffic classes. // // The function template scheme used here ensures there will be a // compile time failure if a new traffic class is added without being // assigned a default priority. template <TrafficClass Tc> constexpr Priority trafficClassToPriority(); #define TRAFFIC_CLASS_TO_PRIORITY(TC, P) \ template <> \ constexpr Priority trafficClassToPriority<TrafficClass::TC>() { \ return Priority::P; \ } TRAFFIC_CLASS_TO_PRIORITY(HANDSHAKE, MAX) TRAFFIC_CLASS_TO_PRIORITY(FAILURE_DETECTOR, MAX) TRAFFIC_CLASS_TO_PRIORITY(RECOVERY, MAX) TRAFFIC_CLASS_TO_PRIORITY(RSM, MAX) TRAFFIC_CLASS_TO_PRIORITY(APPEND, CLIENT_HIGH) TRAFFIC_CLASS_TO_PRIORITY(TRIM, CLIENT_HIGH) TRAFFIC_CLASS_TO_PRIORITY(READ_TAIL, CLIENT_NORMAL) TRAFFIC_CLASS_TO_PRIORITY(READ_BACKLOG, CLIENT_LOW) TRAFFIC_CLASS_TO_PRIORITY(REBUILD, BACKGROUND) #undef TRAFFIC_CLASS_TO_PRIORITY template <> void EnumMap<TrafficClass, Priority>::setValues() { #define TRAFFIC_CLASS(name) \ set(TrafficClass::name, trafficClassToPriority<TrafficClass::name>()); #include "logdevice/common/traffic_classes.inc" } }} // namespace facebook::logdevice
6119852f16f90f286f90d74831e6815c2d8a77a0
797b6eecef5bf3511080e66f33c75748b9430efb
/moisture/moisture.ino
a65995507f8051d0340e91545ae1ff8b647fc1eb
[]
no_license
JOPHIN1992/MOISTURE-DETECTION
03497637ad1c5020185bcd05628adc198b4e7324
d32980623555db72ae38779949d65d0b97d0d34a
refs/heads/master
2020-06-25T11:03:13.923346
2019-07-28T13:36:47
2019-07-28T13:36:47
199,291,446
0
0
null
null
null
null
UTF-8
C++
false
false
303
ino
moisture.ino
float b,a; // int a,b; void setup() { // put your setup code here, to run once: pinMode(A0,INPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: b=analogRead(A0); a=(100-((b/1023)*100)); Serial.println("moisture value="); Serial.println(a); delay(1000); }
c02f81da597054b5f43bbc56f0536b85110011c4
2cf314b8237fc6a77b7f1a096f17a679179b0057
/internal/core/src/indexbuilder/VecIndexCreator.cpp
962ff7f0b9878dfc4ca3ab8fc42e0b49e5ac1ae8
[ "Apache-2.0" ]
permissive
milvus-io/milvus
a02d732cf746effec1ea723f9e4d17856843f8a8
0530fd80c91dc5b200606c00214c12bf8dd17cb4
refs/heads/master
2023-09-04T06:28:57.681855
2023-09-04T02:01:04
2023-09-04T02:01:04
208,728,772
23,316
2,917
Apache-2.0
2023-09-14T15:06:12
2019-09-16T06:43:43
Go
UTF-8
C++
false
false
2,564
cpp
VecIndexCreator.cpp
// Copyright (C) 2019-2020 Zilliz. 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 <map> #include "exceptions/EasyAssert.h" #include "indexbuilder/VecIndexCreator.h" #include "index/Utils.h" #include "index/IndexFactory.h" #include "pb/index_cgo_msg.pb.h" namespace milvus::indexbuilder { VecIndexCreator::VecIndexCreator(DataType data_type, Config& config, storage::FileManagerImplPtr file_manager) : data_type_(data_type), config_(config) { index::CreateIndexInfo index_info; index_info.field_type = data_type_; index_info.index_type = index::GetIndexTypeFromConfig(config_); index_info.metric_type = index::GetMetricTypeFromConfig(config_); index_ = index::IndexFactory::GetInstance().CreateIndex(index_info, file_manager); AssertInfo(index_ != nullptr, "[VecIndexCreator]Index is null after create index"); } int64_t VecIndexCreator::dim() { return index::GetDimFromConfig(config_); } void VecIndexCreator::Build(const milvus::DatasetPtr& dataset) { index_->BuildWithDataset(dataset, config_); } void VecIndexCreator::Build() { index_->Build(config_); } milvus::BinarySet VecIndexCreator::Serialize() { return index_->Serialize(config_); } void VecIndexCreator::Load(const milvus::BinarySet& binary_set) { index_->Load(binary_set, config_); } std::unique_ptr<SearchResult> VecIndexCreator::Query(const milvus::DatasetPtr& dataset, const SearchInfo& search_info, const BitsetView& bitset) { auto vector_index = dynamic_cast<index::VectorIndex*>(index_.get()); return vector_index->Query(dataset, search_info, bitset); } BinarySet VecIndexCreator::Upload() { return index_->Upload(); } void VecIndexCreator::CleanLocalData() { auto vector_index = dynamic_cast<index::VectorIndex*>(index_.get()); vector_index->CleanLocalData(); } } // namespace milvus::indexbuilder
5d31ca1af8f1096694f28efbae4448c926e9934f
7f6f5b75ec2d9b96171aeae421be95b18600b0bb
/CITB102/Tema 5 kontrolno/group_2zad_1.cpp
227b43e1266701cf0b94eee712c2714dccb45753
[]
no_license
nanguelov/CITB102
4fe994a879d130ea35315c364154ea9cbdbd75ca
f8ec34665fcec21d201c6e1d9f0557e426352bfd
refs/heads/master
2021-01-21T10:12:56.887472
2018-03-09T12:40:57
2018-03-09T12:40:57
28,687,305
0
0
null
null
null
null
UTF-8
C++
false
false
257
cpp
group_2zad_1.cpp
#include <iostream> using namespace std; int main() { double num1=0, num2=0; cout << "Enter number 1: "; cin >> num1; cout <<"Enter number 2: "; cin >> num2; double sum=0; sum=(num1+num2)/2; cout << sum << endl; return 0; }
a395b1a74a46a21d3aa32ec337a61f6df1a794b8
9f16950a070174c4ad6419b6aa48e0b3fd34a09e
/users/marcel/libjgmod/jshare.h
276c4c1992e68dda65e5928f5a53e6c629843354
[]
no_license
marcel303/framework
594043fad6a261ce2f8e862f921aee1192712612
9459898c280223b853bf16d6e382a6f7c573e10e
refs/heads/master
2023-05-14T02:30:51.063401
2023-05-07T07:57:12
2023-05-07T10:16:34
112,006,739
53
1
null
2020-01-13T18:48:32
2017-11-25T13:45:56
C++
UTF-8
C++
false
false
1,232
h
jshare.h
#pragma once #include <stdio.h> #if defined(__GNUC__) #define sprintf_s(s, ss, f, ...) snprintf(s, ss, f, __VA_ARGS__) #define vsprintf_s(s, ss, f, a) vsnprintf(s, ss, f, a) #define strcpy_s(d, ds, s) strcpy(d, s) #define sscanf_s sscanf #endif struct JGMOD; struct JGMOD_INFO; void *jgmod_calloc (int size); namespace jgmod { int detect_m31 (const char *filename); int detect_m15 (const char *filename); int detect_s3m (const char *filename); int detect_xm (const char *filename); int detect_it(const char *filename); int detect_unreal_it (const char *filename); int detect_unreal_xm (const char *filename); int detect_unreal_s3m (const char *filename); JGMOD *load_m (const char *filename, int no_inst); JGMOD *load_s3m (const char *filename, const int start_offset, const bool fast_loading); JGMOD *load_it (const char *filename, int start_offset); JGMOD *load_xm (const char *filename, int start_offset); int get_it_info(const char *filename, int start_offset, JGMOD_INFO *ji); int get_s3m_info (const char *filename, const int start_offset, JGMOD_INFO * ji); int get_xm_info (const char *filename, int start_offset, JGMOD_INFO *ji); int get_m_info(const char *filename, int no_inst, JGMOD_INFO *ji); }
61242a5de4eb812b19ca1c0869a88252caec39e5
0f96980cda0c5b6cb3bc85b00449597dd7f99ecc
/src/qt/test/addressbooktests.h
b207845b9d94816ab7b13b0dc379be21b2b09533
[ "MIT" ]
permissive
bitcoin-cash-node/bitcoin-cash-node
85368cb3883deed1f934fe431e6e86f3e8718234
44591e2a2c0511282ee3e587205ecc6a9632dfd7
refs/heads/master
2023-06-26T14:45:25.743556
2023-06-08T18:33:08
2023-06-08T18:33:08
241,285,883
75
30
null
null
null
null
UTF-8
C++
false
false
345
h
addressbooktests.h
// Copyright (c) 2019-2021 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include <QObject> #include <QTest> class AddressBookTests : public QObject { Q_OBJECT private Q_SLOTS: void addressBookTests(); };
75f37a685b6671589af6091d505d92026962fdbd
d9e8968375171c18dc53a454708769baf050a4ab
/JALF/mainwindow.cpp
3df06d6f030436682be2f09c8dee3723805983db
[]
no_license
JonathanOtte/JALF
42a589ab266488546098c15011effa96e268f96e
da9cfdcf8029f06893e7334065dcc010b6035f40
refs/heads/master
2022-11-01T05:03:32.451076
2020-06-14T17:07:28
2020-06-14T17:07:28
272,399,784
0
0
null
null
null
null
UTF-8
C++
false
false
1,833
cpp
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); //Beim Starten des Main UI werden die 3 anderen UIs als stackedWidgets dem MainWindow hinzugefügt, das dient //der Übersichtlichkeit, da die 3 Hauptmenüpunkte auch nochmal jeweils zu einem UI mit stackedWidgets führen //MainWindow hat Index 0, Lebensmittel 1, Rezepte 2, Einkauf 3 ui->stackedWidget->insertWidget(1, &wdwLebensm); ui->stackedWidget->insertWidget(2, &wdwRezepte); ui->stackedWidget->insertWidget(3, &wdwEinkauf); //Verbindung der "Zurück"-Buttons als Signal mit dem Slot Back_Clicked, der MainWindow-Klasse, welches das Hauptmenü aufruft connect(&wdwRezepte, SIGNAL(BackClicked()), this, SLOT(Back_Clicked())); connect(&wdwLebensm, SIGNAL(BackClicked()), this, SLOT(Back_Clicked())); connect(&wdwEinkauf, SIGNAL(BackClicked()), this, SLOT(Back_Clicked())); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_cmdClose_clicked() //schließen der Anwendung { this->close(); } void MainWindow::on_cmdLebensm_clicked() //Klick auf Lebensmittel wechselt den Index des stackedWidget auf 1 { //1 entspricht dem Fenster Lebensmittel, welches nun erscheint ui->stackedWidget->setCurrentIndex(1); } void MainWindow::on_cmdRezepte_clicked() //analog für Rezepte { ui->stackedWidget->setCurrentIndex(2); } void MainWindow::on_cmdEinkauf_clicked() //analog für Einkauf { ui->stackedWidget->setCurrentIndex(3); } void MainWindow::Back_Clicked() //Wechsel zum Hauptmenüfenster { ui->stackedWidget->setCurrentIndex(0); }
0a64962b917c96a805832b0fe8f106e8fede46fb
bc7d06038df1275710de064999c5e0a2aa4f81a7
/July/28 July/minimumCostOfCuttingRopes.cpp
af618e8df85769c9c3fad7910f0352cbfe209810
[]
no_license
almas-ashruff/DSASolutions
0da67313658239e2355a13bc14d6f3c7aad4478e
649c536826c67fc0a0b658603b92463eb51e8d89
refs/heads/main
2023-07-20T00:54:00.888617
2021-08-12T14:26:55
2021-08-12T14:26:55
376,128,025
0
0
null
null
null
null
UTF-8
C++
false
false
875
cpp
minimumCostOfCuttingRopes.cpp
// There are given N ropes of different lengths, we need to connect these ropes into one rope. // The cost to connect two ropes is equal to sum of their lengths. // The task is to connect the ropes with minimum cost. // https://practice.geeksforgeeks.org/problems/minimum-cost-of-ropes-1587115620/1# long long minCost(long long arr[], long long n) { priority_queue<long long int,vector<long long int>,greater<long long int>> pq; for(int i = 0; i < n; i++) { pq.push(arr[i]); } long long int sum = 0; // to store the sum while(pq.size() > 1) { long long len1 = pq.top(); pq.pop(); long long len2 = pq.top(); pq.pop(); pq.push(len1 + len2); sum += len1 + len2; } return sum; } };
926c45793e2762bdac49097d0d572cd4dce78646
e8d7815ead08f04d39c4e166301010c460a0daa3
/src/anything/Anything.cpp
980a73e1a49cde7af4620e68e825e7704b3a2338
[ "MIT" ]
permissive
carlcc/Anything
cbb635ea18785752c4f73f521022934126ef3f3c
d5101d2b807a4eca1f76a78231fcbc956b392fba
refs/heads/master
2020-09-09T06:51:02.795100
2019-11-15T12:10:55
2019-11-15T12:10:55
221,379,898
2
0
null
null
null
null
UTF-8
C++
false
false
1,546
cpp
Anything.cpp
#include "anything/Anything.h" #include "anything/FileEnumerator.h" #include "anything/Log.h" #include "anything/StringUtil.h" namespace at { Anything::Anything(const AnythingConfig& config) : mConfig(config) { } void Anything::reload() { mAllFiles.clear(); bool stop = false; FileEnumerator enumerator(stop); for (auto& path : mConfig.searchPaths()) { enumerator.enumerateFiles(path, [this](const cppfs::FileHandle& handle) { auto filePath = handle.path(); for (auto& excludePath : mConfig.excludePaths()) { if (str::starts_with(filePath, excludePath)) { return; } } // DEBUG("Enum: {}", filePath); mAllFiles.pushBack(filePath); }); } DEBUG("All files size = {}", mAllFiles.size()); } void Anything::reload(bool& stop) { mAllFiles.clear(); FileEnumerator enumerator(stop); for (auto& path : mConfig.searchPaths()) { enumerator.enumerateFiles(path, [this](const cppfs::FileHandle& handle) { auto filePath = handle.path(); for (auto& excludePath : mConfig.excludePaths()) { if (str::starts_with(filePath, excludePath)) { return; } } // DEBUG("Enum: {}", filePath); mAllFiles.pushBack(filePath); }); if (stop) { break; } } DEBUG("All files size = {}", mAllFiles.size()); } void Anything::writeCache() { } }
bfe049fd6c6ac3dce95145b8c01efb5bb6f08698
a05443c2b5c3b0dae53a860cc67e36bb47d92868
/MyProjectGit/2020-07-27_Domasnee_zadanie_1594661480/Domasnee_zadanie_1594661480_lesson_5_task_1.cpp
9a877c39ee988461af5937ccdf43a1e2da1e6ce6
[]
no_license
novice-bicycle-mechanic/training-project
24bb582b3f685e67f481159084531579f961266e
0191be0d7627538abd9aff356a1730f91506d400
refs/heads/master
2022-12-18T22:33:30.334349
2020-09-23T17:14:29
2020-09-23T17:14:29
254,652,160
1
0
null
null
null
null
WINDOWS-1251
C++
false
false
11,732
cpp
Domasnee_zadanie_1594661480_lesson_5_task_1.cpp
// задание 1 из файла Domasnee_zadanie_1594661480.txt // Выполните домашние задания после уроков 3, 4, 5 // Урок 5. Задание 1 /* 1. Создайте класс Время, в котором реализованы операции сложения, вычитания, сравнения, ввода и вывода на экран, возможность конвертации времени из американского формата am (pm): 10:00 pm = 22:00, 12:00 pm =00:00. */ #include <iostream> #include <clocale> using namespace std; // КЛАСС Время class Time { private: size_t hour{ 0 }; size_t minute{ 0 }; size_t second{ 0 }; public: enum class AT{am, pm}; // КОНСТРУКТОР по умолчанию Time(){ cout << " Конструктор Time() по умолчанию" << endl; } // КОНСТРУКТОР с параметрами Time(size_t hour_, size_t minute_ = 0, size_t second_ = 0) { cout << " Конструктор Time() с параметрами" << endl; if (verifyTime(hour_, minute_, second_)) exit(5); else { hour = hour_; minute = minute_; second = second_; } } // КОНСТРУКТОР с параметрами №2 Time(AT at, size_t hour_, size_t minute_ = 0, size_t second_ = 0) { cout << " Конструктор Time() с параметрами №2" << endl; if (at == Time::AT::pm) hour_ += 12; if (verifyTime(hour_, minute_, second_)) exit(5); else { hour = hour_; minute = minute_; second = second_; } } // Конструктор копирования Time(const Time& time) { cout << " Конструктор Time() копирования" << endl; this->hour = time.hour; this->minute = time.minute; this->second = time.second; } // Деструктор ~Time() { cout << " Деструктор ~Time()" << endl; } static bool verifyTime(size_t hour_, size_t minute_ = 0, size_t second_ = 0) { bool error{ false }; if (!((0 <= hour_) && (hour_ < 24))) { cout << " Значение часов { " << hour_ << " } не входит в разрешенный диапазон 0 <= Часы < 24" << endl; error = true; } if (!((0 <= minute_) && (minute_ < 60))) { cout << " Значение минут { " << minute_ << " } не входит в разрешенный диапазон 0 <= Минуты < 60" << endl; error = true; } if (!((0 <= second_) && (second_ < 60))) { cout << " Значение секунд { " << second_ << " } не входит в разрешенный диапазон 0 <= Секунды < 60" << endl; error = true; } return error; } // метод присвоения значения объекту перегрузкой оператора = Time operator=(const Time& time) { cout << " Перегрузка оператора = - присвоение значения" << endl; this->hour = time.hour; this->minute = time.minute; this->second = time.second; return *this; } // прототип дружественной функции вывода объекта в консоль перегрузкой оператора << friend std::ostream& operator<<(std::ostream& out, const Time& time); // прототип дружественной функции ввода объекта с консоли перегрузкой оператора >> friend std::istream& operator>>(std::istream& in, Time& time); // прототип дружественной функции перегрузки оператора + friend Time operator+(const Time& time1, const Time& time2); // прототип дружественной функции перегрузки оператора - friend Time operator-(const Time& time1, const Time& time2); // прототип дружественной функции перегрузки оператора == friend bool operator==(const Time& time1, const Time& time2); // прототип дружественной функции перегрузки оператора != friend bool operator!=(const Time& time1, const Time& time2); // прототип дружественной функции перегрузки оператора > friend bool operator>(const Time& time1, const Time& time2); // прототип дружественной функции перегрузки оператора < friend bool operator<(const Time& time1, const Time& time2); }; // Конец КЛАССА Время // дружественная функция вывода объекта в консоль перегрузкой оператора << std::ostream& operator<<(std::ostream& out, const Time& time) { out << (time.hour < 10 ? "0" : "") << time.hour << ":" << (time.minute < 10 ? "0" : "") << time.minute << ":" << (time.second < 10 ? "0" : "") << time.second ; return out; } // дружественная функция вывода объекта в консоль перегрузкой оператора >> std::istream& operator>>(std::istream& in, Time& time1) { Time temp; in >> temp.hour; in >> temp.minute; in >> temp.second; if (!(Time::verifyTime(temp.hour, temp.minute, temp.second))) { time1 = temp; return in; } else return in; } // Дружественная ФУНКЦИЯ перегрузки оператора + Time operator+(const Time& time1, const Time& time2) { Time time3; size_t buffer_hour{ 0 }; size_t buffer_minute{ 0 }; time3.second = ( (time1.second + time2.second) > 60 ? (++buffer_minute, time1.second + time2.second - 60) : (time1.second + time2.second) ); time3.minute = ( (time1.minute + time2.minute + buffer_minute) > 60 ? (++buffer_hour, time1.minute + time2.minute + buffer_minute - 60) : (time1.minute + time2.minute + buffer_minute) ); time3.hour = ( (time1.hour + time2.hour + buffer_hour) > 23 ? (time1.hour + time2.hour + buffer_hour - 24) : (time1.hour + time2.hour + buffer_hour) ); return time3; } // Дружественная ФУНКЦИЯ перегрузки оператора - Time operator-(const Time& timeFirst, const Time& timeSecond) { Time time1; Time time2; Time time3; if (timeFirst > timeSecond) { time1 = timeFirst; time2 = timeSecond; } else { time2 = timeFirst; time1 = timeSecond; } time3.hour = time1.hour - time2.hour; time3.minute = time1.minute - time2.minute; time3.second = time1.second - time2.second; return time3; } // Дружественная ФУНКЦИЯ перегрузки оператора == bool operator==(const Time& time1, const Time& time2) { return (time1.hour == time2.hour) && (time1.minute == time2.minute) && (time1.second == time2.second); } // Дружественная ФУНКЦИЯ перегрузки оператора != bool operator!=(const Time& time1, const Time& time2) { return (time1.hour != time2.hour) || (time1.minute != time2.minute) || (time1.second != time2.second); } // Дружественная ФУНКЦИЯ перегрузки оператора > bool operator>(const Time& time1, const Time& time2) { return (time1.hour > time2.hour) || ((time1.hour == time2.hour) && (time1.minute > time2.minute)) || ((time1.hour == time2.hour) && (time1.minute == time2.minute) && (time1.second > time2.second)); } // Дружественная ФУНКЦИЯ перегрузки оператора < bool operator<(const Time& time1, const Time& time2) { return (time1.hour < time2.hour) || ((time1.hour == time2.hour) && (time1.minute < time2.minute)) || ((time1.hour == time2.hour) && (time1.minute == time2.minute) && (time1.second < time2.second)); } // ГЛАВНАЯ ФУНКЦИЯ int main() { setlocale(LC_ALL, "ru"); Time time1; cout << " time1: " << time1 << endl; cout << endl; Time time2(13, 34, 35); cout << " time2: " << time2 << endl; cout << endl; Time time3(time2); cout << " time3: " << time3 << endl; cout << endl; Time time4 = time2; cout << " time4: " << time4 << endl; cout << endl; Time time5; time5 = time2; cout << " time5: " << time5 << endl; cout << endl; Time time6 = time2 + time3; cout << " time6 = time2 + time3 == " << time6 << endl; cout << endl; Time time7; time7 = time2 + time6; cout << " time7 = time2 + time6 == " << time7 << endl; cout << endl; Time time8 = time6 - time5; cout << " time8 = time6 - time5 == " << time8 << endl; cout << endl; // сравним объекты на равенство cout << " Сравним объекты на равенство >>> \n" << " Время " << time1 << (time1 == time2 ? "" : " не") << " равно Времени " << time2 << endl; cout << endl; // сравним объекты на равенство cout << " Сравним объекты на равенство >>> \n" << " Время " << time3 << (time3 == time2 ? "" : " не") << " равно Времени " << time2 << endl; cout << endl; // сравним объекты на неравенство cout << " Сравним объекты на неравенство >>> \n" << " Время " << time5 << (time5 != time2 ? " не" : "") << " равно Времени " << time2 << endl; cout << endl; // сравним объекты на неравенство cout << " Сравним объекты на неравенство >>> \n" << " Время " << time6 << (time6 != time2 ? " не" : "") << " равно Времени " << time2 << endl; cout << endl; // сравним объекты на больше cout << " Сравним объекты на больше >>> \n" << " Время " << time7 << (time7 > time2 ? "" : " не") << " больше Времени " << time2 << endl; cout << endl; // сравним объекты на больше cout << " Сравним объекты на больше >>> \n" << " Время " << time6 << (time6 > time2 ? "" : " не") << " больше Времени " << time2 << endl; cout << endl; // сравним объекты на меньше cout << " Сравним объекты на меньше >>> \n" << " Время " << time7 << (time7 < time2 ? "" : " не") << " меньше Времени " << time2 << endl; cout << endl; // сравним объекты на меньше cout << " Сравним объекты на меньше >>> \n" << " Время " << time6 << (time6 < time2 ? "" : " не") << " меньше Времени " << time2 << endl; cout << endl; // введем американское время - до полудня Time time9(Time::AT::am, 10); cout << " time9 по американски, 10:00 am: " << time9 << endl; cout << endl; // введем американское время - после полудня Time time10(Time::AT::pm, 10); cout << " time10 по американски, 10:00 pm: " << time10 << endl; cout << endl; // введем время cout << " Введите через пробелы: часы минуты секунды\n в диапазоне: 00 00 00 - 23 59 59 >>> \n"; cin >> time1; cout << " time1: " << time1 << endl; cout << endl; return 0; } // Конец ГЛАВНОЙ ФУНКЦИИ
a62a64bc14a364d8ea2516d6f555225359d4f026
875e79dd215328697da2876e5803a0c481b0c6e1
/SyGameBase/network/refpoint.h
0b556b8e08ef41a55cb9f312bbc0701d513cde30
[]
no_license
jijinlong/SyGame
304fd85653b147838a77d795e80bc54e89195071
b6bf9d6f7a0d4cd8d5fbe82e84b79683a6c71ae5
refs/heads/master
2021-01-22T05:15:44.142811
2013-10-25T05:40:10
2013-10-25T05:40:10
11,146,791
6
3
null
null
null
null
GB18030
C++
false
false
3,057
h
refpoint.h
#pragma once #include "memorymanager.h" #include "memorynode.h" #include <new> template <class T> class Ref{ public: DYNAMIC_API static Ref get() { Ref<T> object; object.alloc(); return object; } DYNAMIC_API Ref(stRefMemory ref) { this->ref.pointer = ref.pointer; this->ref.refQuickId = ref.refQuickId; } DYNAMIC_API T* pointer() { if (-1 != ref.refQuickId) { MemoryNode * node = theMemoryManager.findNode(ref); if (node) { return reinterpret_cast<T*>(&node->content[0]); } return NULL; } return NULL; /* MemoryNode *node = theMemoryManager.alloc(sizeof(T)); ref.createTime = node->createTime; ref.refQuickId = node->refQuickId; return new (&node->content[0]) T; */ } DYNAMIC_API T* alloc() { if (ref.refQuickId != -1) { return NULL; } MemoryNode *node = theMemoryManager.alloc(sizeof(T)); ref.pointer = node->pointer; ref.refQuickId = node->refQuickId; printf("当前分配了:%u\n",theMemoryManager.blockSize()); return new (&node->content[0]) T; } DYNAMIC_API T* operator->() { MemoryNode * node = theMemoryManager.findNode(ref); if (node) { return reinterpret_cast<T*>(&node->content[0]); } return NULL; } DYNAMIC_API void dealloc() { theMemoryManager.dealloc(ref); } DYNAMIC_API Ref & operator=(stRefMemory& ref) { this->ref.pointer = ref.pointer; this->ref.refQuickId = ref.refQuickId; return *this; } DYNAMIC_API stRefMemory& getRef() { return ref; } private: stRefMemory ref; Ref() { //alloc(); } }; template <class T> class LocalRef{ public: DYNAMIC_API static LocalRef get() { LocalRef<T> object; object.alloc(); return object; } DYNAMIC_API LocalRef(stRefMemory ref) { this->ref.pointer = ref.pointer; this->ref.refQuickId = ref.refQuickId; } DYNAMIC_API T* pointer() { if (-1 != ref.refQuickId) { MemoryNode * node = manager.findNode(ref); if (node) { return reinterpret_cast<T*>(&node->content[0]); } return NULL; } return NULL; /* MemoryNode *node = manager.alloc(sizeof(T)); if (!node) return NULL; ref.createTime = node->createTime; ref.refQuickId = node->refQuickId; return new (&node->content[0]) T; */ } DYNAMIC_API T* alloc() { if (ref.refQuickId != -1) { return NULL; } MemoryNode *node = manager.alloc(sizeof(T)); if (!node) return NULL; printf("当前分配了:%u\n",manager.blockSize()); ref.pointer = node->pointer; ref.refQuickId = node->refQuickId; return new (&node->content[0]) T; } DYNAMIC_API T* operator->() { MemoryNode * node = manager.findNode(ref); if (node) { return reinterpret_cast<T*>(&node->content[0]); } return NULL; } DYNAMIC_API void dealloc() { manager.dealloc(ref); } DYNAMIC_API LocalRef & operator=(stRefMemory& ref) { this->ref.pointer = ref.pointer; this->ref.refQuickId = ref.refQuickId; return *this; } private: LocalRef() { //alloc(); } stRefMemory ref; static MemoryManager manager; }; template <class T> MemoryManager LocalRef<T>::manager(true);
a7faf0e325b0eb916af52e4ab2168c5d0dc879f8
e1f70af61ec02d391153fe4a407c216eec28c758
/nnforge/network_trainer_sdlm.cpp
555a7224e88f39496656e7ff4a833a54281243ac
[ "Apache-2.0" ]
permissive
npinto/nnForge
fada0bd26ba423eeb0b2ba7ee55a623f09e16e12
cea0caded1f44647dead67912255fba9caff16da
refs/heads/master
2021-01-14T13:08:49.453574
2014-01-14T17:33:54
2014-01-14T17:33:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,614
cpp
network_trainer_sdlm.cpp
/* * Copyright 2011-2013 Maxim Milakov * * 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 "network_trainer_sdlm.h" #include <boost/format.hpp> #include <numeric> #include "neural_network_exception.h" namespace nnforge { const unsigned int network_trainer_sdlm::min_hessian_entry_to_process_count = 10; network_trainer_sdlm::network_trainer_sdlm( network_schema_smart_ptr schema, hessian_calculator_smart_ptr hessian_calc, network_updater_smart_ptr updater) : network_trainer(schema) , hessian_calc(hessian_calc) , updater(updater) , hessian_entry_to_process_ratio(0.05F) , max_mu(5.0e-4F) , mu_increase_factor(1.3F) , speed(0.02F) , eta_degradation(1.0F) { } network_trainer_sdlm::~network_trainer_sdlm() { } void network_trainer_sdlm::train_step( supervised_data_reader& reader, std::vector<training_task_state>& task_list) { boost::chrono::steady_clock::time_point start = boost::chrono::high_resolution_clock::now(); unsigned int hessian_entry_to_process_count = std::min<unsigned int>(std::max<unsigned int>(static_cast<unsigned int>(hessian_entry_to_process_ratio * reader.get_entry_count()), min_hessian_entry_to_process_count), reader.get_entry_count()); std::vector<network_data_smart_ptr> training_speed_vector_list; for(unsigned int i = 0; i < task_list.size(); ++i) { network_data_smart_ptr hessian = hessian_calc->get_hessian( reader, task_list[i].data, hessian_entry_to_process_count); std::string comment = convert_hessian_to_training_vector( hessian, task_list[i].history); training_speed_vector_list.push_back(hessian); task_list[i].comments.push_back(comment); } std::vector<network_data_smart_ptr> data_list; for(std::vector<training_task_state>::iterator it = task_list.begin(); it != task_list.end(); ++it) data_list.push_back(it->data); std::vector<testing_result_smart_ptr> train_result = updater->update( reader, training_speed_vector_list, data_list); boost::chrono::duration<float> sec = (boost::chrono::high_resolution_clock::now() - start) / task_list.size(); float flops = updater->get_flops_for_single_entry(); float flops_hessian = hessian_calc->get_flops_for_single_entry(); for(unsigned int i = 0; i < task_list.size(); ++i) { testing_result_smart_ptr res = train_result[i]; res->time_to_complete_seconds = sec.count(); res->flops = (static_cast<float>(res->entry_count) * flops) + (static_cast<float>(hessian_entry_to_process_count) * flops_hessian); task_list[i].history.push_back(res); } } std::string network_trainer_sdlm::convert_hessian_to_training_vector( network_data_smart_ptr hessian, const std::vector<testing_result_smart_ptr>& history) const { std::vector<std::vector<float> > original_mu_list; float mu = get_mu( hessian, history, original_mu_list); float eta = get_eta( mu, history); convert_hessian_to_training_vector(hessian, mu, eta); std::string original_mu_str; for(std::vector<std::vector<float> >::const_iterator it = original_mu_list.begin(); it != original_mu_list.end(); it++) { if (it != original_mu_list.begin()) original_mu_str += ", "; for(std::vector<float>::const_iterator it2 = it->begin(); it2 != it->end(); it2++) { if (it2 != it->begin()) original_mu_str += " "; original_mu_str += (boost::format("%|1$.1e|") % *it2).str(); } } return (boost::format("Eta = %|1$.2e|, Mu = %|2$.2e| (%|3$s|)") % eta % mu % original_mu_str).str(); } float network_trainer_sdlm::get_mu( network_data_smart_ptr hessian, const std::vector<testing_result_smart_ptr>& history, std::vector<std::vector<float> >& original_mu_list) const { original_mu_list.clear(); float min_hessian = 1.0e38F; float max_hessian = 1.0e-37F; for(network_data::iterator it = hessian->begin(); it != hessian->end(); it++) { if ((*it)->size() > 0) { std::vector<float> mu_list; for(layer_data::iterator it2 = (*it)->begin(); it2 != (*it)->end(); it2++) { float sum = std::accumulate(it2->begin(), it2->end(), 0.0F); float new_hessian_per_block = sum / it2->size(); mu_list.push_back(new_hessian_per_block); min_hessian = std::min<float>(min_hessian, new_hessian_per_block); max_hessian = std::max<float>(max_hessian, new_hessian_per_block); } original_mu_list.push_back(mu_list); } } float max_mu_current = std::min<float>(max_mu, max_hessian * 0.5F); float current_mu = min_hessian * 0.5F * powf(mu_increase_factor, static_cast<float>(history.size())); current_mu = std::min<float>(current_mu, max_mu_current); return current_mu; } float network_trainer_sdlm::get_eta( float mu, const std::vector<testing_result_smart_ptr>& history) const { float res = mu * speed; if (history.size() > 0) res *= powf(eta_degradation, static_cast<float>(history.size())); res *= get_tail_decay_factor(static_cast<unsigned int>(history.size())); return res; } network_trainer_sdlm::hessian_transform::hessian_transform(float mu, float eta) : mu(mu) , eta(eta) { } float network_trainer_sdlm::hessian_transform::operator() (float in) { return eta / (in + mu); } void network_trainer_sdlm::convert_hessian_to_training_vector( network_data_smart_ptr hessian, float mu, float eta) const { hessian_transform ht(mu, eta); for(network_data::iterator it = hessian->begin(); it != hessian->end(); it++) for(layer_data::iterator it2 = (*it)->begin(); it2 != (*it)->end(); it2++) std::transform(it2->begin(), it2->end(), it2->begin(), ht); } unsigned int network_trainer_sdlm::get_max_batch_size() const { return updater->get_max_batch_size(); } void network_trainer_sdlm::initialize_train(supervised_data_reader& reader) { updater->set_input_configuration_specific(reader.get_input_configuration()); } }
c8da0ae2faa08c0478f284b4b72bdba5adbcf56f
d4ee5afcf8d5bc3b77223b29c85cc3c104f4e8a2
/interface/IPySubWalletCallback.h
47fcdb984c17c652cf7b7fd3c7eebc34f481de65
[ "MIT" ]
permissive
JeanMaritain/spvsdkpy
6f68105740ddd546245fb1a27962731dd4a83448
3fa87b8dfebb9f47a8bc3a98440186c726d8c993
refs/heads/master
2020-05-20T11:45:46.521909
2019-05-31T15:05:49
2019-05-31T15:05:49
185,556,812
0
1
MIT
2019-05-09T12:41:15
2019-05-08T07:39:59
C++
UTF-8
C++
false
false
2,006
h
IPySubWalletCallback.h
// Copyright (c) 2012-2018 The Elastos Open Source Project // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef SPVSDKPY_IPYSUBWALLETCALLBACK_H #define SPVSDKPY_IPYSUBWALLETCALLBACK_H #include <string> class IPySubWalletCallback { public: virtual ~IPySubWalletCallback() noexcept {} /** * Callback method fired when status of a transaction changed. * @param txid indicate hash of the transaction. * @param status can be "Added", "Deleted" or "Updated". * @param desc is an detail description of transaction status. * @param confirms is confirm count util this callback fired. */ virtual void OnTransactionStatusChanged( const std::string &txid, const std::string &status, const std::string &desc, uint32_t confirms) = 0; /** * Callback method fired when block begin synchronizing with a peer. This callback could be used to show progress. */ virtual void OnBlockSyncStarted() = 0; /** * Callback method fired when best block chain height increased. This callback could be used to show progress. * @param currentBlockHeight is the of current block when callback fired. * @param estimatedHeight is max height of blockchain. * @param lastBlockTime timestamp of the last block. */ virtual void OnBlockSyncProgress(uint32_t currentBlockHeight, uint32_t estimatedHeight, time_t lastBlockTime) = 0; /** * Callback method fired when block end synchronizing with a peer. This callback could be used to show progress. */ virtual void OnBlockSyncStopped() = 0; virtual void OnBalanceChanged(const std::string &asset, const std::string &balance) = 0; virtual void OnTxPublished(const std::string &hash, const std::string &result) = 0; virtual void OnTxDeleted(const std::string &hash, bool notifyUser, bool recommendRescan) = 0; virtual void OnAssetRegistered(const std::string &asset, const std::string &info) = 0; }; #endif //SPVSDKPY_IPYSUBWALLETCALLBACK_H
a6f53adad91801d84bcd4388b881fd55c5364b58
41feca08aabaf34cba0eae3fcb5f75bdf812e339
/ball_chaser/src/process_image.cpp
fb5a8d2a587efe99378118c93805ffe8ef4510d6
[]
no_license
eevci/Simple-Ball-Chaser-Robot
3db61ffb71fca5fad028bf598ae61845d087dd75
33df4558b37075e32685bac78933afb2455e4329
refs/heads/main
2023-01-12T20:16:34.828627
2020-11-10T14:47:54
2020-11-10T14:47:54
311,687,487
0
0
null
null
null
null
UTF-8
C++
false
false
2,099
cpp
process_image.cpp
#include "ros/ros.h" #include "ball_chaser/DriveToTarget.h" #include <sensor_msgs/Image.h> #include <sensor_msgs/image_encodings.h> // Define a global client that can request services ros::ServiceClient client; int white_pixel = 255; // This function calls the command_robot service to drive the robot in the specified direction void drive_robot(float lin_x, float ang_z) { ball_chaser::DriveToTarget message; message.request.linear_x = lin_x; message.request.angular_z = ang_z; if (!client.call(message)) ROS_ERROR("Failed to call service drive_bot"); } // This callback function continuously executes and reads the image data void process_image_callback(const sensor_msgs::Image img) { int numberOfChannels = sensor_msgs::image_encodings::numChannels(img.encoding); int found_j, index; bool is_white_pixel_found = false; for(int i = 0; i<img.height; i++) { for(int j = 0; j<img.step - numberOfChannels; j+=numberOfChannels) { index = (i*img.step)+j; is_white_pixel_found = true; for(int k=0; k<numberOfChannels; k++) { if(img.data[index+k]!=white_pixel) { is_white_pixel_found = false; break; } } if(is_white_pixel_found == true) { found_j = j; break; } } if(is_white_pixel_found == true) break; } if(is_white_pixel_found == true) { if(found_j < img.step*0.25) drive_robot(0.0, 1); else if(found_j > img.step*0.75) drive_robot(0.0, -1); else drive_robot(1,0); } } int main(int argc, char** argv) { // Initialize the process_image node and create a handle to it ros::init(argc, argv, "process_image"); ros::NodeHandle n; // Define a client service capable of requesting services from command_robot client = n.serviceClient<ball_chaser::DriveToTarget>("/ball_chaser/command_robot"); // Subscribe to /camera/rgb/image_raw topic to read the image data inside the process_image_callback function ros::Subscriber sub1 = n.subscribe("/camera/rgb/image_raw", 10, process_image_callback); // Handle ROS communication events ros::spin(); return 0; }
658a21eb9212eccffb428996a85864da9fcf2d66
5cd40f362b26e4e20d62cad705ffec64bdb4d480
/PETCTCOSEG/optnet_vce_lib/optnet/_base/io/io_options.hxx
e02d90e5add71759ef9aad8537a93f79a8a6d359
[]
no_license
maxwell-zhou/PETCTCOSEGExtension
4fc0d728a04bcf4088c842b14d2dc0f97dc2d045
f9592fde632ded9403e33e1f175d6a5a0842c480
refs/heads/master
2021-01-20T09:54:39.019251
2017-01-18T16:26:13
2017-01-18T16:26:13
78,767,668
3
1
null
null
null
null
UTF-8
C++
false
false
1,656
hxx
io_options.hxx
/* ========================================================================== | | $Id: io_options.hxx 21 2005-01-14 15:52:31Z kangli $ | | Written by Kang Li <kangl@cmu.edu> | Department of Electrical and Computer Engineering | Carnegie Mellon University | ========================================================================== | This file is a part of the OptimalNet library. ========================================================================== | Copyright (c) 2004-2005 Kang Li <kangl@cmu.edu>. All Rights Reserved. | | This software is supplied under the terms of a license agreement or | nondisclosure agreement with the author and may not be copied or | disclosed except in accordance with the terms of that agreement. ========================================================================== */ #ifndef ___IO_OPTIONS__ # define ___IO_OPTIONS__ # include <string> namespace optnet { namespace io { /////////////////////////////////////////////////////////////////////////// /// @class save_options /// @brief Save options. /////////////////////////////////////////////////////////////////////////// struct save_options { // Options: bool single_file; /// Save the image as a single entity, /// if possible. int compression_level; /// Compression level, 0 if no compression. int slice_to_save; /// Index of the slice needs to save. int phase_to_save; /// Index of the phase needs to save. }; } // namespace } // namespace #endif
89637f6d995b5d28d02b71d67b1805675b8986d2
bf2ba1f3ccd60ef2174afe6ef0809a420e569b2f
/controllers/showlogtable.h
53af05b43789187869ba3c986e7d7a6f9733be5e
[]
no_license
38277105/30GroundN
e2ec2bbc7c18acf1239487781a85629cfad53a03
ec44ecd3675387083c64aeb239ed7a8986dbb6d2
refs/heads/master
2023-08-21T05:35:36.823147
2021-10-29T06:03:50
2021-10-29T06:03:50
409,119,376
0
0
null
null
null
null
UTF-8
C++
false
false
446
h
showlogtable.h
#ifndef SHOWLOGTABLE_H #define SHOWLOGTABLE_H #include <QStandardItemModel> #include <QTableView> #include "vehicles/vehiclestate.h" class showlogtable : public QTableView { Q_OBJECT public: explicit showlogtable(QTableView* parent = 0); ~showlogtable(); int setTableData(QList<LogData> datalist); private: void initTable(); private: QStandardItemModel* m_dataModel; }; #endif // SHOWLOGTABLE_H
ced77a036d154ead789e38f733e6f023e8088276
9320375dc23c3e332cc599d7d32e18669515ff0f
/Chapter09/EpsilonV/ex9_45.cpp
f5770ef56b44dee65e48d13a95a509dd11c21522
[]
no_license
kawaiidoo/CPP_Primer
1bf279f92c30bef435de9cc7b30ae94e7fbd6f4f
aa8dfdb38d92136803dd96512a6c780977db8ec1
refs/heads/master
2020-04-25T20:59:58.305405
2019-04-15T12:18:30
2019-04-15T12:18:30
173,067,258
0
0
null
null
null
null
UTF-8
C++
false
false
321
cpp
ex9_45.cpp
#include <iostream> #include <string> using namespace std; string add_pre_and_suffix(string &s, string const& pre, string const& suffix) { s.insert(s.begin(), pre.begin(), pre.end()); return s.append(suffix); } int main() { string name("wnag"); cout << add_pre_and_suffix(name, "Mr.", ", Jr") << endl; return 0; }
4096d44756ac76c55fb5f8afcaebf3a62dcc0b44
3453a94cdec9cf8b3aae6243387463ae34dda272
/problems/kattis/Pivot.cpp
09c4f0438138291d50a9906bb0eac8cb1c863cd6
[]
no_license
abhinav1592/CompetitiveProgramming
3750f7902ad65afff37c33848723d9df0a322dfd
0eadfc03654bfcfb02869f2a7a08cf69987d75b9
refs/heads/master
2020-12-31T04:07:38.432958
2015-10-20T01:23:28
2015-10-20T01:23:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
574
cpp
Pivot.cpp
#include <cstdio> using namespace std; int a[100010], min_a[100010], max_a[100010]; int main() { int n; scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", a + i); } int max = a[0]; max_a[0] = a[0]; for (int i = 1; i < n; ++i) { if (a[i] > max) max = a[i]; max_a[i] = max; } int min = a[n - 1]; min_a[n - 1] = a[n - 1]; for (int i = n - 2; i >= 0; --i) { if (a[i] < min) min = a[i]; min_a[i] = min; } int ans = 0; for (int i = 0; i < n; ++i) { if (a[i] == min_a[i] && a[i] == max_a[i]) ++ans; } printf("%d\n", ans); return 0; }
0ca87994bbfa95577e5eba749399a3216c9c872a
7c71410d765d366a388d940c7859538c3b916198
/P146PROC.cpp
cee21eaba260034ed859dd5179993d6a38b398d5
[]
no_license
dinhtai1104/SPOJ_PTIT
790f8474682e7c8d1a90f01bdd55aa697000897d
e7aef29eda3b0dea6ae5a833810f0a70d4ea4423
refs/heads/master
2022-12-03T22:27:23.397741
2020-08-26T16:00:07
2020-08-26T16:00:07
290,542,452
1
0
null
null
null
null
UTF-8
C++
false
false
447
cpp
P146PROC.cpp
#include <iostream>   int main () { int n = 0; int arr[5]; int tmp; for (int i=1; i<=4; i++) { scanf("%d", &tmp); int kt = 0; for (int i=1; i<=n; i++) { if (tmp==arr[i]) { kt = 1; break; } } if (kt==0) { n++; arr[n]=tmp; } } printf ("%d", 4-n); return 0; }
db1f8f32a251f0ec3ba8e60c370448867e37a8a0
6322afe42dd32f0cc72cfe637c109f042ec4af39
/include/lvr2/util/CLUtil.hpp
9ef0bea2b16b51845bbb667a3362d8f6ec437867
[]
permissive
uos/lvr2
3c94d640f3e315e23fd194d85c2bd8e6877cd674
9bb03a30441b027c39db967318877e03725112d5
refs/heads/develop
2023-06-22T11:49:52.100143
2021-10-08T15:58:07
2021-10-08T15:58:07
173,213,176
66
16
BSD-3-Clause
2023-05-28T19:10:14
2019-03-01T01:18:58
C++
UTF-8
C++
false
false
22,395
hpp
CLUtil.hpp
#pragma once #define CL_HPP_ENABLE_EXCEPTIONS #define CL_HPP_MINIMUM_OPENCL_VERSION 120 // Need to set to 120 on CUDA 8 #define CL_HPP_TARGET_OPENCL_VERSION 120 // Need to set to 120 on CUDA 8 #if defined LVR2_USE_OPENCL_NEW_API #include <CL/cl2.hpp> #else #include <CL/cl.hpp> #endif namespace lvr2 { /** * @brief Util class for CL that maps error codes to human readable strings */ class CLUtil { public: /** * @brief Util method that maps error codes to CL error strings * * @param error the given error code * * @return the CL error string */ static inline const char* getErrorString(cl_int error) { switch (error) { // run-time and JIT compiler errors case 0: return "CL_SUCCESS"; case -1: return "CL_DEVICE_NOT_FOUND"; case -2: return "CL_DEVICE_NOT_AVAILABLE"; case -3: return "CL_COMPILER_NOT_AVAILABLE"; case -4: return "CL_MEM_OBJECT_ALLOCATION_FAILURE"; case -5: return "CL_OUT_OF_RESOURCES"; case -6: return "CL_OUT_OF_HOST_MEMORY"; case -7: return "CL_PROFILING_INFO_NOT_AVAILABLE"; case -8: return "CL_MEM_COPY_OVERLAP"; case -9: return "CL_IMAGE_FORMAT_MISMATCH"; case -10: return "CL_IMAGE_FORMAT_NOT_SUPPORTED"; case -11: return "CL_BUILD_PROGRAM_FAILURE"; case -12: return "CL_MAP_FAILURE"; case -13: return "CL_MISALIGNED_SUB_BUFFER_OFFSET"; case -14: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"; case -15: return "CL_COMPILE_PROGRAM_FAILURE"; case -16: return "CL_LINKER_NOT_AVAILABLE"; case -17: return "CL_LINK_PROGRAM_FAILURE"; case -18: return "CL_DEVICE_PARTITION_FAILED"; case -19: return "CL_KERNEL_ARG_INFO_NOT_AVAILABLE"; // compile-time errors case -30: return "CL_INVALID_VALUE"; case -31: return "CL_INVALID_DEVICE_TYPE"; case -32: return "CL_INVALID_PLATFORM"; case -33: return "CL_INVALID_DEVICE"; case -34: return "CL_INVALID_CONTEXT"; case -35: return "CL_INVALID_QUEUE_PROPERTIES"; case -36: return "CL_INVALID_COMMAND_QUEUE"; case -37: return "CL_INVALID_HOST_PTR"; case -38: return "CL_INVALID_MEM_OBJECT"; case -39: return "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"; case -40: return "CL_INVALID_IMAGE_SIZE"; case -41: return "CL_INVALID_SAMPLER"; case -42: return "CL_INVALID_BINARY"; case -43: return "CL_INVALID_BUILD_OPTIONS"; case -44: return "CL_INVALID_PROGRAM"; case -45: return "CL_INVALID_PROGRAM_EXECUTABLE"; case -46: return "CL_INVALID_KERNEL_NAME"; case -47: return "CL_INVALID_KERNEL_DEFINITION"; case -48: return "CL_INVALID_KERNEL"; case -49: return "CL_INVALID_ARG_INDEX"; case -50: return "CL_INVALID_ARG_VALUE"; case -51: return "CL_INVALID_ARG_SIZE"; case -52: return "CL_INVALID_KERNEL_ARGS"; case -53: return "CL_INVALID_WORK_DIMENSION"; case -54: return "CL_INVALID_WORK_GROUP_SIZE"; case -55: return "CL_INVALID_WORK_ITEM_SIZE"; case -56: return "CL_INVALID_GLOBAL_OFFSET"; case -57: return "CL_INVALID_EVENT_WAIT_LIST"; case -58: return "CL_INVALID_EVENT"; case -59: return "CL_INVALID_OPERATION"; case -60: return "CL_INVALID_GL_OBJECT"; case -61: return "CL_INVALID_BUFFER_SIZE"; case -62: return "CL_INVALID_MIP_LEVEL"; case -63: return "CL_INVALID_GLOBAL_WORK_SIZE"; case -64: return "CL_INVALID_PROPERTY"; case -65: return "CL_INVALID_IMAGE_DESCRIPTOR"; case -66: return "CL_INVALID_COMPILER_OPTIONS"; case -67: return "CL_INVALID_LINKER_OPTIONS"; case -68: return "CL_INVALID_DEVICE_PARTITION_COUNT"; // extension errors case -1000: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR"; case -1001: return "CL_PLATFORM_NOT_FOUND_KHR"; case -1002: return "CL_INVALID_D3D10_DEVICE_KHR"; case -1003: return "CL_INVALID_D3D10_RESOURCE_KHR"; case -1004: return "CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR"; case -1005: return "CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR"; default: return "Unknown OpenCL error"; } }; /** * @brief Util method that maps error codes to CL error description messages * * @param error the given error code * * @return the CL error description messages */ static inline const char* getErrorDescription(cl_int error) { switch (error) { // run-time and JIT compiler errors case 0: return "Indicates that the function executed successfully."; case -1: return "Returned by clGetDeviceIDs and clCreateContextFromType if no OpenCL devices that match " "the specified devices were found."; case -2: return "Returned by clCreateContext and clCreateContextFromType if the specified device is not " "currently available."; case -3: return "Returned by clBuildProgram if the parameter program is created with " "clCreateProgramWithSource and a compiler is not available. For example " "CL_DEVICE_COMPILER_AVAILABLE is set to CL_FALSE."; case -4: return "Returned by the functions listed below if there is a failure to allocate memory for data " "store associated with image or buffer objects specified as arguments to kernel. The exact " "condition that generates this error depends on the calling function. Refer to the " "function for more information. \n" "Returned by the following functions: clCreateBuffer, clEnqueueReadBuffer, " "clEnqueueWriteBuffer, clEnqueueCopyBuffer, clCreateImage2D, clCreateImage3D, " "clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, " "clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, " "clEnqueueNDRangeKernel, clEnqueueTask, and clEnqueueNativeKernel "; case -5: return "Returned by clEnqueueNDRangeKernel, clEnqueueTask, and clEnqueueNativeKernel in the event " "of a failure to queue the execution instance of kernel on the command-queue because of " "insufficient resources needed to execute the kernel."; case -6: return "Returned by the functions listed below in the event of a failure to allocate resources " "required by the OpenCL implementation on the host. The exact condition that generates " "this error depends on the calling function. Refer to the function for more information. "; case -7: return "Returned by clGetEventProfilingInfo if the CL_QUEUE_PROFILING_ENABLE flag is not set for " "the command-queue and the profiling information is currently not available (because the " "command identified by event has not completed)."; case -8: return "Returned by clEnqueueCopyBuffer and clEnqueueCopyImage if the source and destination " "images are the same image (or the source and destination buffers are the same buffer), " "and the source and destination regions overlap."; case -9: return "Returned by clEnqueueCopyImage if the specified source and destination images are not " "valid image objects."; case -10: return "Returned by clCreateImage2D and clCreateImage3D if the specified image format is not " "supported."; case -11: return "Returned by clBuildProgram if there is a failure to build the program executable. This " "error will be returned if clBuildProgram does not return until the build has completed."; case -12: return "Returned by clEnqueueMapBuffer and clEnqueueMapImage if there is a failure to map the " "requested region into the host address space. This error cannot occur for buffer objects " "created with CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR."; case -13: return "CL_MISALIGNED_SUB_BUFFER_OFFSET"; case -14: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"; case -15: return "CL_COMPILE_PROGRAM_FAILURE"; case -16: return "CL_LINKER_NOT_AVAILABLE"; case -17: return "CL_LINK_PROGRAM_FAILURE"; case -18: return "CL_DEVICE_PARTITION_FAILED"; case -19: return "CL_KERNEL_ARG_INFO_NOT_AVAILABLE"; // compile-time errors case -30: return "Returned by the functions listed below if a parameter is not an expected value. The " "exact condition that generates this error depends on the calling function. Refer to the " "function for more information."; case -31: return "Returned by clGetDeviceIDs and clCreateContextFromType if device type specified is not " "valid."; case -32: return "Returned by clGetPlatformInfo and clGetDeviceIDs if the specified platform is not a " "valid platform.\n" "Returned by clCreateContext and clCreateContextFromType if properties is NULL and no " "platform could be selected, or if platform value specified in properties is not a valid " "platform."; case -33: return "Returned by the functions listed below if the device or devices specified are not valid. " "The exact condition that generates this error depends on the calling function. Refer to " "the function for more information."; case -34: return "Returned by the functions listed below if the specified context is not a valid OpenCL " "context, or the context associated with certain parameters are not the same. The exact " "condition that generates this error depends on the calling function. Refer to the " "function for more information."; case -35: return "Returned by clCreateCommandQueue and clSetCommandQueueProperty if specified properties " "are valid but are not supported by the device."; case -36: return "Returned by the functions listed below if the specified command-queue is not a valid " "command-queue. The exact condition that generates this error depends on the calling " "function. Refer to the function for more information."; case -37: return "Returned by the functions listed below if host_ptr is NULL and CL_MEM_USE_HOST_PTR or " "CL_MEM_COPY_HOST_PTR are set in flags or if host_ptr is not NULL but " "CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in flags. The exact condition " "that generates this error depends on the calling function. Refer to the function for " "more information.\n" "Returned by the functions clCreateBuffer, clCreateImage2D, and clCreateImage3D. "; case -38: return "Returned by the functions listed below if a parameter is not a valid memory, image, or " "buffer object. The exact condition that generates this error depends on the calling " "function. Refer to the function for more information."; case -39: return "Returned by clCreateImage2D and clCreateImage3D if the image format specified is not " "valid or is NULL.\n" "Returned byclCreateFromGLTexture2D and clCreateFromGLTexture3D\n" "Returned by clCreateFromGLRenderbuffer if the OpenGL renderbuffer internal format does " "not map to a supported OpenCL image format. "; case -40: return "Returned by clCreateImage2D if the specified image width or height are 0 or if they " "exceed values specified in CL_DEVICE_IMAGE2D_MAX_WIDTH or CL_DEVICE_IMAGE2D_MAX_HEIGHT " "respectively for all devices in context, or if the specified image row pitch does not " "follow rules described for clCreateImage2D.\n" "Returned by clCreateImage3D if the specified image width or height are 0 or if the image " "depth is <= 1, or if they exceed values specified in CL_DEVICE_IMAGE3D_MAX_WIDTH, " "CL_DEVICE_IMAGE3D_MAX_HEIGHT or CL_DEVICE_IMAGE3D_MAX_DEPTH respectively for all devices " "in context, or if the image row pitch and image slice pitch do not follow rules " "described for clCreateImage3D. "; case -41: return "Returned by clRetainSampler, clReleaseSampler, and clGetSamplerInfo if the specified " "sampler is not a valid sampler object.\n" "Returned by clSetKernelArg for an argument declared to be of type sampler_t when the " "specified arg_value is not a valid sampler object. "; case -42: return "Returned by clBuildProgram and clCreateProgramWithBinary if the program binary is not a " "valid binary for the specified device."; case -43: return "Returned by clBuildProgram if the specified build options are invalid."; case -44: return "Returned by clCreateKernel if there is no successfully built executable for program, and " "returned by clCreateKernelsInProgram if there is no device in program.\n" "Returned by clEnqueueNDRangeKernel and clEnqueueTask if there is no successfully built " "program executable available for device associated with command_queue. "; case -45: return "Returned by clCreateKernel if there is no successfully built executable for program, and " "returned by clCreateKernelsInProgram if there is no device in program.\n" "Returned by clEnqueueNDRangeKernel and clEnqueueTask if there is no successfully built " "program executable available for device associated with command_queue. "; case -46: return "Returned by clCreateKernel if the specified kernel name is not found in program."; case -47: return "Returned by clCreateKernel if the function definition for __kernel function given by " "kernel_name such as the number of arguments, the argument types are not the same for all " "devices for which the program executable has been built."; case -48: return "Returned by the functions listed below if the specified kernel is not a valid kernel " "object. The exact condition that generates this error depends on the calling function. " "Refer to the function for more information."; case -49: return "Returned by clSetKernelArg if an invalid argument index is specified."; case -50: return "Returned by clSetKernelArg if the argument value specified is NULL for an argument that " "is not declared with the __local qualifier or vice-versa."; case -51: return "Returned by clSetKernelArg if argument size specified (arg_size) does not match the size " "of the data type for an argument that is not a memory object, or if the argument is a " "memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is " "declared with the __local qualifier or if the argument is a sampler and arg_size != " "sizeof(cl_sampler)."; case -52: return "Returned by clEnqueueNDRangeKernel and clEnqueueTask if the kernel argument values have " "not been specified."; case -53: return "Returned by clEnqueueNDRangeKernel if work_dim is not a valid value."; case -54: return "Returned by clEnqueueNDRangeKernel and clEnqueueTask if local_work_size is specified and " "number of workitems specified by global_work_size is not evenly divisible by size of " "work-group given by local_work_size or does not match the work-group size specified for " "kernel using the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier in program " "source."; case -55: return "Returned by clEnqueueNDRangeKernel if the number of work-items specified in any of " "local_work_size... [0]... local_work_size[work_dim - 1] is greater than the " "corresponding values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0],... " "CL_DEVICE_MAX_WORK_ITEM_SIZES[work_dim -1]."; case -56: return "Returned by clEnqueueNDRangeKernel if global_work_offset is not NULL."; case -57: return "Returned by the functions listed below if event_wait_list is NULL and " "num_events_in_wait_list > 0, or event_wait_list_list is not NULL and " "num_events_in_wait_list is 0, or specified event objects are not valid events. The exact " "condition that generates this error depends on the calling function. Refer to the " "function for more information."; case -58: return "Returned by the functions listed below if the event objects specified are not valid. The " "exact condition that generates this error depends on the calling function. Refer to the " "function for more information."; case -59: return "Returned by clCreateImage2D, clCreateImage3D, and clCreateSampler if there are no " "devices in context that support images.\n" "Returned by clBuildProgram if the build of a program executable for any of the devices " "specified by a previous call to clBuildProgram for program has not completed, or if " "there are kernel objects attached to program.\n" "Returned by clEnqueueNativeKernel if the specified device cannot execute the native " "kernel.\n" "Returned by clCreateFromGLTexture2D if the miplevel is less than 0.\n" "Returned by clCreateFromGLTexture3D if 3D images are not supported by the OpenCL " "embedded profile. "; case -60: return "Returned by clCreateFromGLBuffer if bufobj is not a GL buffer object or is a GL buffer " "object but does not have an existing data store.\n" "Returned by clCreateFromGLRenderbuffer if renderbuffer is not a GL renderbuffer object " "or if the width or height of renderbuffer is zero.\n" "Returned by clCreateFromGLTexture2D and clCreateFromGLTexture3D if texture is not a GL " "texture object whose type matches texture_target, if the specified miplevel of texture " "is not defined, or if the width, height or depth of the specified miplevel is zero.\n" "Returned by clGetGLObjectInfo and clGetGLTextureInfo if there is no GL object or texture " "associated with memobj.\n" "Returned by clEnqueueAcquireGLObjects and clEnqueueReleaseGLObjects if memory objects " "in mem_objects have not been created from a GL object(s). The exact condition that " "generates this error depends on the calling function. "; case -61: return "Returned by clCreateBuffer if the value of the parameter size is 0 or is greater than " "CL_DEVICE_MAX_MEM_ALLOC_SIZE for all devices specified in the parameter context."; case -62: return "CL_INVALID_MIP_LEVEL"; case -63: return "CL_INVALID_GLOBAL_WORK_SIZE"; case -64: return "CL_INVALID_PROPERTY"; case -65: return "CL_INVALID_IMAGE_DESCRIPTOR"; case -66: return "CL_INVALID_COMPILER_OPTIONS"; case -67: return "CL_INVALID_LINKER_OPTIONS"; case -68: return "CL_INVALID_DEVICE_PARTITION_COUNT"; // extension errors case -1000: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR"; case -1001: return "CL_PLATFORM_NOT_FOUND_KHR"; case -1002: return "CL_INVALID_D3D10_DEVICE_KHR"; case -1003: return "CL_INVALID_D3D10_RESOURCE_KHR"; case -1004: return "CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR"; case -1005: return "CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR"; default: return "Unknown OpenCL error"; } }; }; } // namespace lvr2
34151e3734176b42f001202ab4dc0e1e980bb91c
07d784d60aacc1872b19525e4de755378ba5fe9e
/EersteGraphicEngine/Geometry.h
bbc282936b33e20cf5bef27dc0a4cfedcb0d866b
[ "MIT" ]
permissive
fabsgc/EersteGraphicEngine
0c9308a51d1b2b2e83f0f22da9950e75bdf5ee0b
09d0da03dbe3a17a5da6651409f697a0db8634bd
refs/heads/master
2021-04-29T15:47:30.391663
2018-09-24T14:13:48
2018-09-24T14:13:48
121,803,405
3
0
null
null
null
null
UTF-8
C++
false
false
786
h
Geometry.h
#pragma once #include "PrerequisitesCore.h" #include "IUpdatable.h" #include "IDrawable.h" #include "RenderAPI.h" #include "VertexDesc.h" #include "Color.h" namespace ege { class Geometry: IUpdatable, IDrawable { public: Geometry(); ~Geometry(); void Build(SPtr<ModelDesc> modelDesc = nullptr); void Update() override; void Draw() override; void SetColor(const Color color); ID3D11Buffer* GetVertexBuffer(); ID3D11Buffer* GetIndexBuffer(); Vector<WORD>& GetIndices(); protected: RenderAPI& _renderAPI; Vector<VertexDesc> _vertices; Vector<WORD> _indices; ID3D11Buffer* _vertexBuffer; ID3D11Buffer* _indexBuffer; }; }
2c44a1563247f02acdf008515e6febe895ea3f0d
21f5c51d5a4260bc2184625fcb81c78e6272a8ec
/src/plugins/misc/CellMLSupport/src/cellmlfilecellmlexporter.cpp
2cd3835afa039bf64536cd7d21911aa1e30a0296
[]
no_license
A1kmm/opencor
61bb5b011661da87bfd310743a21024b18cc6d55
fb82d6d8c1476d2ebfa5f5769472d2b3aa894150
refs/heads/master
2021-01-18T05:54:32.499935
2013-07-14T20:10:48
2013-07-14T20:10:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,346
cpp
cellmlfilecellmlexporter.cpp
//============================================================================== // CellML file CellML exporter //============================================================================== #include "cellmlfilecellmlexporter.h" //============================================================================== //#include "cellml-api-cxx-support.hpp" #include "CellMLBootstrap.hpp" //============================================================================== namespace OpenCOR { namespace CellMLSupport { //============================================================================== CellMLFileCellMLExporter::CellMLFileCellMLExporter(iface::cellml_api::Model *pModel, const std::wstring &pVersion) : CellMLFileExporter(), mModel(pModel) { // Create an empty CellML model of the required version ObjRef<iface::cellml_api::CellMLBootstrap> cellmlBootstrap = CreateCellMLBootstrap(); mExportedModel = cellmlBootstrap->createModel(pVersion); } //============================================================================== } // namespace CellMLSupport } // namespace OpenCOR //============================================================================== // End of file //==============================================================================
13d05f4700ab462cd89301f6f7e97558d432e28e
7b275d60ad5c122c5a9ea8befce766c980388771
/UVA/10591/8498040_AC_0ms_0kB.cpp
f97a2501d9201f4503f281b888c4a6d5d4365945
[]
no_license
FahadAminShovon/Solved-Problems
706d4b45769f0c959d892882be00cc6fb1f10ad8
25d3206886172e252365e73dd2002c12ad3324df
refs/heads/master
2020-04-13T05:25:55.104149
2018-12-29T17:24:09
2018-12-29T17:24:09
162,991,852
1
0
null
null
null
null
UTF-8
C++
false
false
860
cpp
8498040_AC_0ms_0kB.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x; scanf("%d",&x); for(int i=1;i<=x;i++) { long long int a; scanf("%lld",&a); int counter=0; long long int w=a; while(true) { stringstream ssd; ssd<<w; string str; ssd>>str; //cout<<str<<endl; long long int sum=0; for(int j=0;j<str.size();j++) { sum+=((str[j]-'0')*(str[j]-'0')); //cout<<sum<<endl; } w=sum; //cout<<w<<endl; if(w==1) { counter++; break; } else if(w<=9) { break; } } if(counter==0) { printf("Case #%d: %d is an Unhappy number.\n",i,a); } else { printf("Case #%d: %d is a Happy number.\n",i,a); } } return 0; }
9b361da54fc37b3258e3d369cca1cd406f97560f
c378701c4217a0355e4165d35dbb18a2eb9cda97
/546A.cpp
3bd400a4294044a1a5169f4f10e5d9e622dd63e0
[]
no_license
PriyanshBordia/CodeForces
b3307154e8ecd413728a74839f839b8f0c5fb5bd
ff48c4724a8eef95eb3e585ea7042408bcad01c1
refs/heads/main
2023-07-30T12:48:41.564106
2021-09-18T15:38:29
2021-09-18T15:38:29
279,111,884
0
0
null
null
null
null
UTF-8
C++
false
false
182
cpp
546A.cpp
#include <iostream> #include <math.h> using namespace std; int main() { int n, w, k; cin >> k >> n >> w; int sum = (w * (w + 1) / 2) * k; cout << max(0, sum - n) << endl; }
ced5ae6865ae162b5b0a1e51783fd6c8d2b5696f
b7961f3df8a1ecbc23e5194bc4b94d3dad87a211
/DDL_Procesor/cTypeOfTranslator.h
80648b0da27d4fe13078c5038003466f4787298e
[]
no_license
mrNoactiv/DDL_Procesor-new
3509c24c677a9e65e3e0e31d2a0a76bf5e86aa8a
93a507b7e49bda7cedbb6614d4b4a54a5864cb83
refs/heads/master
2021-01-19T16:58:26.754947
2017-04-14T20:42:10
2017-04-14T20:42:10
88,292,966
0
0
null
null
null
null
UTF-8
C++
false
false
1,010
h
cTypeOfTranslator.h
#pragma once #include "cTranslatorCreate.h" enum Type { CREATE_BTREE,CREATE_RTREE , INDEX ,CREATE }; class cTypeOfTranslator { public: Type type; void SetType(string input); cTypeOfTranslator(); }; cTypeOfTranslator::cTypeOfTranslator() :type() { } void cTypeOfTranslator::SetType(string input) { std::transform(input.begin(), input.end(), input.begin(), ::tolower); if ( input.find("create table index", 0) == 0 || input.find("CREATE TABLE INDEX", 0) == 0) { if (input.find("option:btree") != std::string::npos) { std::cout << "btree" << '\n'; type = CREATE; } else if (input.find("option:md_table") != std::string::npos) //rstrom { std::cout << "Rtree" << '\n'; type = CREATE; } else if (input.find("option:clustered_table") != std::string::npos) { std::cout << "clustered table" << '\n'; type = CREATE; } else { type = CREATE; } } else if (input.find("create index", 0) == 0 || input.find("CREATE INDEX", 0) == 0) { type = INDEX; } }
df649f99cd18d6d53b48d8148da5219c0489cce3
13b14c9c75143bf2eda87cb4a41006a52dd6f02b
/AOJ/UAPC2010/J/gen.cpp
e971840a06ecf0e5f4640285e14b5e3024316e94
[]
no_license
yutaka-watanobe/problem-solving
2c311ac856c79c20aef631938140118eb3bc3835
f0b92125494fbd3c8d203989ec9fef53f52ad4b4
refs/heads/master
2021-06-03T12:58:39.881107
2020-12-16T14:34:16
2020-12-16T14:34:16
94,963,754
0
1
null
null
null
null
UTF-8
C++
false
false
132
cpp
gen.cpp
#include<iostream> using namespace std; main(){ for ( int i = 1; i <= 10000; i++ ) cout << i << endl; cout << 0 << endl; }
443ba65122fcb1b7082161f72c12f9b446822888
9162a3334cadf6e4f724425a261d68070adb431f
/Ybt/1727.cpp
08680280429938fb4555655c26edb24ede31f3a7
[]
no_license
agicy/OI
c8c375c6586110ed0df731d6bd1a1c65aed603d4
1050632a0d9bde7666d9aa2162bba6939b148c1b
refs/heads/master
2023-06-25T01:02:30.336307
2021-07-22T12:57:49
2021-07-22T12:57:49
227,121,193
0
0
null
null
null
null
UTF-8
C++
false
false
1,892
cpp
1727.cpp
#include<bits/stdc++.h> using namespace std; #define reg register typedef long long ll; #define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) static char buf[1<<21],*p1=buf,*p2=buf; inline int read(void){ reg bool f=false; reg char ch=getchar(); reg int res=0; while(!isdigit(ch)) f|=(ch=='-'),ch=getchar(); while(isdigit(ch)) res=10*res+(ch^'0'),ch=getchar(); return f?-res:res; } const int MAXN=500+5; const int MAXV=4e4+5; const int MAXE=3*MAXN; int n,hp; int sum[MAXN]; inline int up(reg int x,reg int y){ if(x%y==0) return x/y; else if(x<0) return x/y; else return x/y+1; } int cnt,head[MAXV],to[MAXE],w[MAXE],Next[MAXE]; inline void Add_Edge(reg int u,reg int v,reg int len){ Next[++cnt]=head[u]; to[cnt]=v; w[cnt]=len; head[u]=cnt; return; } bool inque[MAXV]; int dis[MAXV]; inline bool spfa(void){ queue<int> Q; for(int i=0;i<=n;++i){ dis[i]=0; inque[i]=false; Q.push(i); } reg int cnt=0; while(!Q.empty()){ reg int u=Q.front(); Q.pop(); inque[u]=false; for(reg int i=head[u];i;i=Next[i]){ int v=to[i]; if(dis[v]>dis[u]+w[i]){ dis[v]=dis[u]+w[i]; if(!inque[v]){ inque[v]=true; Q.push(v); } } } if(++cnt>2e5) return false; } return true; } inline bool check(reg int mid){ cnt=0,memset(head,0,sizeof(head)); for(reg int i=1;i<=n;++i){ Add_Edge(i,i-1,0); reg int pos=up(sum[i+1]-hp+1,15); if(pos>0&&i<n) Add_Edge(i,pos-1,-1); if(i-mid>=0) Add_Edge(i-mid,i,1); } return spfa(); } int main(void){ n=read(),hp=read(); for(reg int i=1;i<=n;++i) sum[i]=sum[i-1]+read(); if(check(n)) puts("No upper bound."); else if(!check(1)) puts("-1"); else{ reg int l=1,r=n,mid; while(l+1<r){ mid=(l+r)>>1; if(check(mid)) l=mid; else r=mid; } if(check(r)) printf("%d\n",r); else if(check(l)) printf("%d\n",l); } return 0; }
c57f54c1bd5369dd48e6947353443e3b4c154f35
4090aed9b69d1e355b40a6db6a138f34353197a0
/glitchbot.cpp
e3489c61765a623ba85464632b52c82ff3ebb18e
[]
no_license
HongyuHe/OJ
0ecb72c4a87ac8ac5dc90210be0fbd71c6843f64
f8713ed4e374fdbc783c7c683020a1c23f42b3ad
refs/heads/master
2020-03-31T17:14:30.991344
2018-10-10T01:17:27
2018-10-10T01:17:27
152,414,016
1
0
null
null
null
null
UTF-8
C++
false
false
1,995
cpp
glitchbot.cpp
#include <iostream> #include <vector> #include <string> using namespace std; string other(string original) { if(original == "Left") { return "Right"; } if(original == "Right") { return "Forward"; } else { return "Left"; } } string other2(string original) { if(original == "Left") { return "Forward"; } if(original == "Right") { return "Left"; } else { return "Right"; } } int turn(int dir, string direction) { if(direction == "Left") { dir--; } if(direction == "Right") { dir++; } if(dir < 0) { dir += 4; } if(dir > 3) { dir -= 4; } return dir; } void move(int& x, int& y, int& dir, string direction) { if(direction == "Forward") { if(dir == 0) { y++; } if(dir == 1) { x++; } if(dir == 2) { y--; } if(dir == 3) { x--; } } else { dir = turn(dir, direction); } } bool process(int x, int y, vector<string>& moves) { int currX = 0; int currY = 0; int dir = 0; for(auto i : moves) { move(currX, currY, dir, i); } if(currX == x && currY == y) { return true; } return false; } int main() { int endX, endY; cin >> endX >> endY; int n; cin >> n; vector<string> moves; for(int i = 0; i < n; i++) { string temp; cin >> temp; moves.push_back(temp); } for(int i = 0; i < moves.size(); i++) { string original = moves[i]; moves[i] = other(original); if(process(endX, endY, moves)) { cout << i+1 << " " << moves[i] << endl; return 0; } moves[i] = other2(original); if(process(endX, endY, moves)) { cout << i+1 << " " << moves[i] << endl; return 0; } moves[i] = original; } }
337a96c0887eb91c356cd7cbe555dfb6088eb6d8
e2975883b8acc1ccb220601c07a2bed969dd822a
/gns/sequence_simple_sobol.h
41b3bf01594fecdc51838bfb3ccccd3cc219b261
[ "MIT" ]
permissive
i05nagai/generalized_niederreiter_sequence
33b7d9aa3d5923c08efb1220dca4495036b30478
dccf2d00c7e4648b76be8408af17104efd0d5c30
refs/heads/master
2021-01-22T23:05:42.082650
2018-05-20T04:38:39
2018-05-20T04:38:39
85,601,969
0
0
MIT
2018-05-20T04:38:40
2017-03-20T16:45:54
C++
UTF-8
C++
false
false
1,003
h
sequence_simple_sobol.h
#pragma once #include <vector> #include <cstddef> namespace gns { constexpr unsigned int MAX_BIT = 31; constexpr double NORMALIZE_FACTOR = 0.5 / (double)(1UL << (MAX_BIT - 1UL)); /** * @brief Fast and simple sobol sequence. */ class SimpleSobolGrayMap { //private typedef private: //public typedef public: //public function public: /** * @brief * * @param dimension */ SimpleSobolGrayMap(const size_t dimension); /** * @brief get next points. * * @return 'dimension'-dim sobol sequence. */ std::vector<double> Next(); //private function private: //private members private: /** * @brief */ size_t dimension_; /** * @brief */ std::vector<size_t> premitive_polynomials_; /** * @brief */ std::vector<std::vector<size_t>> direction_numbers_; /** * @brief */ std::vector<size_t> number_; /** * @brief */ std::vector<double> points_; size_t counter_; /** * @brief */ bool is_first_; }; } // namespace gns
0410dff1105569fa5d93cadf8fd24869f38374f1
517fc1eba43f10d18fb83029d6476d9a6d3c6f8b
/GhostRacer/StudentWorld.h
82a6a85b569dd29c14c8b1c8bffe29cfa6e765cf
[]
no_license
danielfrees/GRacer
7c3ca9c2c112313e6419e582ce29b9f9eee15f1c
d0dd987e84ca0d0bd75800fef5f934d024ab3d69
refs/heads/main
2023-07-27T20:09:53.592740
2021-09-10T19:21:24
2021-09-10T19:21:24
405,184,019
0
0
null
null
null
null
UTF-8
C++
false
false
3,551
h
StudentWorld.h
#ifndef STUDENTWORLD_H_ #define STUDENTWORLD_H_ #include "GameWorld.h" #include <string> #include <vector> //for vector container to actors #include <sstream> //for stringstream member tracking game data class Actor; class GhostRacer; class StudentWorld : public GameWorld { public: //StudentWorld constants const int LEFT_EDGE = ROAD_CENTER - ROAD_WIDTH/2; const int RIGHT_EDGE = ROAD_CENTER + ROAD_WIDTH/2; //MAIN METHODS: StudentWorld(std::string assetPath); virtual ~StudentWorld(){ cleanUp(); } virtual int init(); virtual int move(); virtual void cleanUp(); //public getters to learn about Ghost Racer: double getRacerSpeed() const; int getRacerDirection() const; double getRacerX() const; double getRacerY() const; bool racerIsAlive() const; //public setters to affect the GhostRacer: void killRacer(); void damageRacer(const int& amt); void spinRacer(); void healRacer(const int& amt); void giveRacerAmmo(const int& amt); //Other Public setters: void saveASoul(); void addActor(Actor* a); //allows actors to add another actor to the world //Public helpers/ other methods bool overlapWithRacer(const Actor* a) const; //allows actors to determine whether they overlap with the racer void closestCAWActorsInLane(const Actor* a, double& pixelsFront, double& pixelsBack) const; //finds the closest live CAW actors in front or behind the given actor (in the same lane). Does not count GRacer, used for cab slowing and speeding up and cabs don't avoid GRacer. bool projectileMaybeDamageActor(const Actor* projectile) const; private: std::vector< Actor* > m_actors; //container for all actors GhostRacer* m_racer; //separate pointer to GhostRacer int m_souls2Save; //holds # of souls left to save on current level int m_bonusPoints; //holds # of bonus points awarded if win level rn double m_highestWhiteBorder; //holds y coord of highest white border line std::ostringstream gameStats; //stringstream which is edited and set as game text each tick //private helpers: bool theyOverlap(const Actor* a, const Actor* b) const; //finds whether two actors overlap bool findSafePlaceForCab(int& chosenLane, double& startY, double& startSpeed); //tries to find a safe place to spawn a Zombie Cab int getActorLane(const Actor* a) const; //returns lane an Actor is in double lowestCAWActorInLane(const int& laneNumber); //returns the y coordinate of the lowest CAW Actor in any given lane. used for cab spawning and includes GRacer double highestCAWActorInLane(const int& laneNumber); //returns y coord of highest CAW Actor in any given lane. Used for cab spawning and includes GRacer void addBorderLines(); void addZombieCabs(); void addOilSlicks(); void addZombiePeds(); void addHumanPeds(); void addHolyWaterGoodies(); void addSoulGoodies(); }; #endif // STUDENTWORLD_H_
faa0e0f0562224c70e9e265f41ebd7a19a89523d
921abfe8a10a4c0edc3035e8abc4a33d51625c1d
/BOJ/6198_옥상정원꾸미기.cpp
6b3b754044a7eb994925bc004150786d5955cf68
[]
no_license
gudwnsgur/Algorithm
760fcff3b1e930bf1f8cf047c26253449b52cae9
016f6db056d821c918ea620d5517b00a387eff9a
refs/heads/master
2023-05-01T03:28:17.003101
2023-04-18T14:08:05
2023-04-18T14:08:05
230,247,085
4
0
null
null
null
null
UTF-8
C++
false
false
598
cpp
6198_옥상정원꾸미기.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> #define endl '\n' using namespace std; int main() { int n; long long res = 0; cin >> n; vector<int> v(n+1); for (int i = 1; i <= n; i++) cin >> v[i]; stack<pair<int, int>> s; s.push({ v[n], 0 }); for (int i = n - 1; i >= 1; i--) { int check = 0; while (s.top().first < v[i]) { res += s.top().second; check += 1 + s.top().second; s.pop(); if (s.empty()) break; } s.push({ v[i], check }); } while (!s.empty()) { res += s.top().second; s.pop(); } cout << res << endl; return 0; }
41b5879037a3e5e4ffdd9aa40bb75d01dc3ffed2
8293b1575afa25194f853a2db83ee9720b180589
/ListNodeExchage.cpp
ff0514b5d39213a49e958a42f0a678cc2b4dff87
[]
no_license
Rajeesh5/CtsRepo
594c0602776fc612d08c9bd87266872ea9e48a6b
9b5f1c2e74dea7b027828ef0889d27930ab6d59f
refs/heads/master
2021-01-20T22:09:51.538589
2018-11-11T17:03:58
2018-11-11T17:03:58
64,389,073
0
0
null
null
null
null
UTF-8
C++
false
false
1,714
cpp
ListNodeExchage.cpp
#include<iostream> #include<stdio.h> #include<malloc.h> #define MAX_LEN 50 using namespace std; struct node { int data; struct node* next; }*head=NULL; struct node* newNode(int data) { struct node* node = (struct node*) malloc(sizeof(struct node)); node->data = data; node->next=NULL; return(node); } void displayList(struct node *tmp) { while(tmp) { cout<<tmp->data<<" "; tmp=tmp->next; } printf("\n"); } void revList(struct node *nd) { if(nd->next==NULL) { head=nd; return; } struct node *tmp=nd->next; nd->next=NULL; revList(tmp); tmp->next=nd; } void revListIter(struct node *nd) { } void listDataExchange(struct node *nd) { int tmp; if(nd==NULL || nd->next==NULL){return;} while(1) { //exchange(nd->data,nd->next->data); tmp=nd->data; nd->data=nd->next->data; nd->next->data=tmp; nd=nd->next->next; if(nd==NULL || nd->next==NULL) break; } } struct node* listLinkExchange(struct node *NODE) { if(NODE==NULL || NODE->next==NULL){return NODE;} struct node *tmp=NODE->next->next; NODE->next->next=NODE; //NODE->next=NULL; struct node *nd=listLinkExchange(tmp); struct node *nodeNext=NODE->next; NODE->next=nd; return nodeNext; } int main() { head = newNode(10); head->next=newNode(20); head->next->next=newNode(30); head->next->next->next=newNode(40); head->next->next->next->next=newNode(50); head->next->next->next->next->next=newNode(60); displayList(head); //revList(head); head=listLinkExchange(head); displayList(head); return 0; }
9297a0693734b13fdca0343e8ccc7f8ae5c4d3be
158dd3cf9796956edf0cfd6f0ecbfa5b542c29c2
/Programme/Jugend2.1/Data_modelthreadlicht.h
c02d0b67734c5f1af6e680022945bcfbe72380f6
[]
no_license
mvu/jugendprojekt
1dd242132eded96e31ad56cbfeb40587041492d7
88bb977d5e25191d6a5e5a6bf7f08fdad3d7c7ac
refs/heads/master
2020-12-24T19:35:58.789498
2019-11-05T21:15:30
2019-11-05T21:15:30
59,227,936
1
3
null
2019-10-27T20:21:22
2016-05-19T17:30:27
C++
UTF-8
C++
false
false
1,189
h
Data_modelthreadlicht.h
#ifndef MODELTHREADLICHT_H #define MODELTHREADLICHT_H #include <QObject> #include <QThread> #include <QtCore> #include "mainconfig.h" class steuerungThreadLicht; class ModelThreadLicht : public QThread { Q_OBJECT public: explicit ModelThreadLicht(QObject *parent = 0, steuerungThreadLicht * s = NULL); void run(); float arrayTemp[5] = {0.00, 0.00, 0.00, 0.00, 0.00}; bool arrayRelais[9]; int arrayPWMHL[8] = {0, 0, 0, 0, 0, 0, 0, 0,}; bool arryStatus[8]; int t_main = 1000, t_Slider = 10000; bool SliderOn; private: QTimer *timer_mainInfo; QTimer *timer_SLiderCheck; steuerungThreadLicht *sThread; float minTemp = 10.; float maxTemp = 100.; float arrayTempOld[5] = {0.00, 0.00, 0.00, 0.00, 0.00}; void setHL(); void setStatusRelais(); public slots: void mainInfoCheck(); void getHauptlichtslot(int val, int LED); void getStatusRelaisslot(bool); // alle mit in sind die feedback eingänge für die anfrage mit get void updateFinish(); signals: // void getHauptlicht(int val); // Aktuellen PWM wertes des Hauptlichtes void update(); }; #endif // MODELTHREADLICHT_H
b501bfacbbb357321c8b49fb2987cf0d474c63f6
915c488ca25aac64c03ff16ce4adeea48ef8a976
/Lab06/include/Primitive.h
2980fbd38c489181639ceae23b14851345c9b226
[]
no_license
Dodzik/PO
adacc54574cc31a747f1bf5858e561b1c55c763d
7174b119f3c60b663605b2608d801950cf9c8b83
refs/heads/main
2023-05-26T00:12:06.495644
2021-06-15T13:47:35
2021-06-15T13:47:35
346,689,770
0
0
null
null
null
null
UTF-8
C++
false
false
619
h
Primitive.h
#pragma once #include <iostream> //klasa macierzysta class Primitive{ public: //konstruktor jedno argumentowy val = war Primitive(float war); //konstruktor bezargumentowy val = 0 Primitive(); //funkcja zmieniająca wartość val na war void Set(float war); //funkcja zwracająca val virtual float Get()const; //funkcja pozwalająca zadane równanie i wynik który kryje się pod zmienna val virtual void PrintWithValue()const; //funkcja która jest nadpisywana przez pochodne klasy reprezentuje działanie virtual void prt()const; private: //zmienna do przechowywania wyniku float val; };
99a46ca5e495edc87f21f1c78602302633b68070
b5640ffc914108a092d39ab2a0dd36a26689e26d
/project/src/braitenberg_vehicle.h
df155cd5b6eb901caacb7d1b8eff460600e2b88c
[]
no_license
4ngelaMarie/BraitenbergVehicleSim
d29216deea9a49e18d5e7bbc67295cc8b06bd939
8ed5718b90c9c88d651e5b8afc300902a295ae9a
refs/heads/master
2020-05-29T10:44:08.978023
2019-05-28T20:46:07
2019-05-28T20:46:07
189,100,282
0
0
null
null
null
null
UTF-8
C++
false
false
7,929
h
braitenberg_vehicle.h
/** * @file braitenberg_vehicle.h * * @copyright 2017 3081 Staff, All rights reserved. */ #ifndef SRC_BRAITENBERG_VEHICLE_H_ #define SRC_BRAITENBERG_VEHICLE_H_ /******************************************************************************* * Includes ******************************************************************************/ #include <ctime> #include <string> #include <vector> #include "src/common.h" #include "src/arena_mobile_entity.h" #include "src/motion_behavior_differential.h" #include "src/subject.h" #include "src/wheel_velocity.h" #include "src/behavior_enum.h" #include "src/behavior.h" #include "src/love.h" #include "src/none.h" #include "src/aggressive.h" #include "src/coward.h" #include "src/explore.h" #include "src/food.h" /******************************************************************************* * Namespaces ******************************************************************************/ NAMESPACE_BEGIN(csci3081); /******************************************************************************* * Class Definitions ******************************************************************************/ /* @brief Entity class to represent a Braitenberg Vehicle * * A braitenberg vehicle is a simple machine that is used to show how simple * concepts (in this case wiring) can give way to complex looking behavior. In * this simulation, Braitenberg vehicles contain sensors, which can be hooked * up in four different ways, and thus they can exhibit four different behaviors */ class BraitenbergVehicle : public ArenaMobileEntity, public Subject { public: /** * @brief Default constructor. */ BraitenbergVehicle(); /** * Deleting the copy assignment and copy constructor. required now with * inclusion of references to sensors and motion_handler/behavior */ BraitenbergVehicle(const BraitenbergVehicle & rhs) = delete; BraitenbergVehicle operator=(const BraitenbergVehicle & rhs) = delete; /** * @brief Update the BraitenbergVehicle's position and velocity after the * specified duration has passed. * * @param dt The # of timesteps that have elapsed since the last update. */ void TimestepUpdate(unsigned int dt) override; /** * @brief Update the wheel velocities and color of the BraitenbergVehicle. * Notify any observers of the update if any are subscribed. Wheel * velocities are weighted differently if BraitenbergVehicle is nearing * starvation. */ void Update() override; /** * @brief Change the movement state of the BraitenbergVehicle. */ void HandleCollision(EntityType ent_type, ArenaEntity * object = NULL) override; /** * @brief Sense other entities in arena other than itself. */ void SenseEntity(const ArenaEntity& entity); /** * @brief Returns the ID of the BraitenbergVehicle. */ std::string get_name() const override; std::vector<Pose> get_light_sensors_const() const; std::vector<Pose> get_light_sensors(); void UpdateLightSensors(); /** * @brief Create an instance of a BraitenbergVehicle based of * parameters given in a json file. */ void LoadFromObject(json_object* entity_config) override; /** * @brief Returns BraitenbergVehicle's current light behavior. */ Behavior get_light_behavior() { return light_behavior_; } /** *@brief For each behavior: Create new behavior instances * These behaviors uniquely affect the BV wheel velocity */ void set_light_behavior(Behavior behavior) { light_behavior_ = behavior; delete light_behavior_ptr_; switch (light_behavior_) { case kExplore: light_behavior_ptr_ = new Explore(); break; case kLove: light_behavior_ptr_ = new Love(); break; case kAggressive: light_behavior_ptr_ = new Aggressive(); break; case kNone: light_behavior_ptr_ = new None(); break; case kCoward: light_behavior_ptr_ = new Coward(); break; default: light_behavior_ptr_ = new None(); break; } } /** * @brief Returns BraitenbergVehicle's current food behavior. */ Behavior get_food_behavior() { return food_behavior_; } /** *@brief For each behavior: Create new behavior instances * These behaviors uniquely affect the BV wheel velocity */ void set_food_behavior(Behavior behavior) { food_behavior_ = behavior; delete food_behavior_ptr_; switch (food_behavior_) { case kExplore: food_behavior_ptr_ = new Explore(); break; case kLove: food_behavior_ptr_ = new Love(); break; case kAggressive: food_behavior_ptr_ = new Aggressive(); break; case kNone: food_behavior_ptr_ = new None(); break; case kCoward: food_behavior_ptr_ = new Coward(); break; default: food_behavior_ptr_ = new None(); break; } } /** * @brief Returns BraitenbergVehicle's current robot behavior. */ Behavior get_bv_behavior() { return bv_behavior_; } /** *@brief For each behavior: Create new behavior instances * These behaviors uniquely affect the BV wheel velocity */ void set_bv_behavior(Behavior behavior) { bv_behavior_ = behavior; delete bv_behavior_ptr_; switch (bv_behavior_) { case kExplore: bv_behavior_ptr_ = new Explore(); break; case kLove: bv_behavior_ptr_ = new Love(); break; case kAggressive: bv_behavior_ptr_ = new Aggressive(); break; case kNone: bv_behavior_ptr_ = new None(); break; case kCoward: bv_behavior_ptr_ = new Coward(); break; default: bv_behavior_ptr_ = new None(); break; } } /** * @brief BraitenbergVehicle's starvation counter is reset to zero. * Food's position is updated to a new location to inspire new * robot trajectories. */ void ConsumeFood(Food * fp); /** * @brief Sets the BraitenbergVehicle's graphics_arena_pointer to * point to the velocity_observer. Observer is then notified of * updated wheel velocities upon BraitenbergVehicle::Update(). */ void Subscribe(Observer *observer) override; /** * @brief Sets BraitenbergVehicle's graphics_arena_pointer, more * specifically, the velocity_observer, to NULL. */ void Unsubscribe() override; /** * @brief Notifies any subscribers of the current wheel velocities * contributions from each behavior. */ void Notify(WheelVelocity* light_wv_ptr, WheelVelocity* food_wv_ptr, WheelVelocity* bv_wv_ptr) override; /** * @brief Returns BraitenbergVehicle's left sensor readings for given * entity. */ double get_sensor_reading_left(const ArenaEntity* entity); /** * @brief Returns BraitenbergVehicle's right sensor readings for given * entity. */ double get_sensor_reading_right(const ArenaEntity* entity); /** * @brief The BraitenbergVehicle's ID. */ static int count; /** * @brief Counter that changes the angle heading after collision. */ int collision_counter_ = 20; /** * @brief Couner that keeps track if vehicle is nearing starvation. * Starvation occurs after 600 iterations. */ int starvation_counter_ = 0; private: std::vector<Pose> light_sensors_; MotionBehaviorDifferential * motion_behavior_{nullptr}; WheelVelocity wheel_velocity_; Behavior light_behavior_; Behavior food_behavior_; Behavior bv_behavior_; BehaviorEntity* light_behavior_ptr_; // added BehaviorEntity* food_behavior_ptr_; // added BehaviorEntity* bv_behavior_ptr_; // added Observer* gav_observer; const ArenaEntity* closest_light_entity_; const ArenaEntity* closest_food_entity_; const ArenaEntity* closest_bv_entity_; double defaultSpeed_; }; NAMESPACE_END(csci3081); #endif // SRC_BRAITENBERG_VEHICLE_H_
6976c42d75309657f0ed6a5033e32848aaaf000d
c8cf973af91404a716d08d6ac12f6cc8601421d4
/1169/6196244_AC_0MS_180K.cpp
43e3c64a8e6f288e8f195385212f555e4f3f6b98
[ "MIT" ]
permissive
Xuhui-Wang/poj-solutions
f1cd7009fcc37672d3a2ca81851ac3b3cc64ca02
4895764ab800e8c2c4b2334a562dec2f07fa243e
refs/heads/master
2021-05-05T00:14:35.384333
2015-08-19T21:57:31
2015-08-19T21:57:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,496
cpp
6196244_AC_0MS_180K.cpp
#define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<algorithm> #include<set> struct Rectangle{ int height,width; }; struct RectangleLess{ bool operator()(const Rectangle& left,const Rectangle& right){ return left.height<right.height; } }; int solutionArea=INT_MAX; std::set<Rectangle,RectangleLess> solutions; void updateSolution(Rectangle pack){ if(pack.height>pack.width) std::swap(pack.height,pack.width); if(solutionArea>=pack.height*pack.width){ if(solutionArea>pack.height*pack.width){ solutions.clear(); solutionArea=pack.height*pack.width; } solutions.insert(pack); } } void layout1(Rectangle rectangles[4]){ Rectangle pack={0,0}; for(int i=0;i<4;i++){ if(pack.height<rectangles[i].height) pack.height=rectangles[i].height; pack.width+=rectangles[i].width; } updateSolution(pack); } void layout2(Rectangle rectangles[4]){ for(int bottom=0;bottom<4;bottom++){ Rectangle pack={0,0}; for(int i=0;i<4;i++) if(i!=bottom){ if(pack.height<rectangles[i].height) pack.height=rectangles[i].height; pack.width+=rectangles[i].width; } pack.height+=rectangles[bottom].height; if(pack.width<rectangles[bottom].width) pack.width=rectangles[bottom].width; updateSolution(pack); } } void layout3(Rectangle rectangles[4]){ for(int bottom=0;bottom<4;bottom++) for(int right=0;right<4;right++){ if(bottom==right) continue; Rectangle pack={0,0}; for(int i=0;i<4;i++) if(i!=bottom && i!=right){ if(pack.height<rectangles[i].height) pack.height=rectangles[i].height; pack.width+=rectangles[i].width; } pack.height+=rectangles[bottom].height; if(pack.width<rectangles[bottom].width) pack.width=rectangles[bottom].width; if(pack.height<rectangles[right].height) pack.height=rectangles[right].height; pack.width+=rectangles[right].width; updateSolution(pack); } } void layout4(Rectangle rectangles[4]){ for(int left=0;left<4;left++) for(int right=0;right<4;right++){ if(left==right) continue; Rectangle pack={0,0}; for(int i=0;i<4;i++) if(i!=left && i!=right){ pack.height+=rectangles[i].height; if(pack.width<rectangles[i].width) pack.width=rectangles[i].width; } if(pack.height<std::max(rectangles[left].height,rectangles[right].height)) pack.height=std::max(rectangles[left].height,rectangles[right].height); pack.width+=rectangles[left].width+rectangles[right].width; updateSolution(pack); } } void layout5(Rectangle rectangles[4]){ int sequence[4]={0,1,2,3}; do{ Rectangle pack={0,0}; pack.height=std::max( rectangles[sequence[0]].height+rectangles[sequence[1]].height, rectangles[sequence[2]].height+rectangles[sequence[3]].height); if(rectangles[sequence[0]].width>=rectangles[sequence[1]].width){ if(rectangles[sequence[2]].height<rectangles[sequence[0]].height) pack.width=rectangles[sequence[0]].width+std::max( rectangles[sequence[2]].width, rectangles[sequence[3]].width); else if(rectangles[sequence[2]].height<rectangles[sequence[0]].height+rectangles[sequence[1]].height) pack.width=std::max(rectangles[sequence[0]].width+rectangles[sequence[2]].width, rectangles[sequence[1]].width+rectangles[sequence[3]].width); else pack.width=std::max(rectangles[sequence[0]].width+rectangles[sequence[2]].width, rectangles[sequence[3]].width); } else continue; updateSolution(pack); }while(std::next_permutation(sequence,sequence+4)); } void tryLayout(Rectangle rectangles[4]){ layout1(rectangles); layout2(rectangles); layout3(rectangles); layout4(rectangles); layout5(rectangles); } void rotate(Rectangle rectangles[4],int index){ if(index==4) return tryLayout(rectangles); rotate(rectangles,index+1); if(rectangles[index].height!=rectangles[index].width){ std::swap(rectangles[index].height,rectangles[index].width); rotate(rectangles,index+1); } } void tryRotate(Rectangle rectangles[4]){ rotate(rectangles,0); } int main(){ Rectangle rectangles[4]; for(int i=0;i<4;i++) scanf("%d%d",&rectangles[i].height,&rectangles[i].width); tryRotate(rectangles); printf("%d\n",solutionArea); for(std::set<Rectangle,RectangleLess>::iterator iter=solutions.begin();iter!=solutions.end();iter++) printf("%d %d\n",iter->height,iter->width); return 0; }
ec9e489bffee7c23937b22df25592cff92acd141
49bfe66b126275fa5f7ab5acdb368492906e49a1
/Project1/alterarMobilizacao.cpp
6e986c639eaae83fc65a43776021ee06359a05c8
[]
no_license
hkenzo/InfoBuraco_G1
44f7cf0cca98a7652284e23163b4e65e937e0d80
caa5f8ad4782091745082412091f69e8227cc157
refs/heads/master
2020-03-13T07:07:21.066604
2018-07-04T09:51:41
2018-07-04T09:51:41
131,018,920
0
0
null
2018-05-09T02:40:12
2018-04-25T14:27:10
C++
UTF-8
C++
false
false
33
cpp
alterarMobilizacao.cpp
#include "alterarMobilizacao.h"
242471aeb0c2a1864dc688f93ee0f278aef332c3
3005450e4faa88b0b364da0e4e6f101cd59d5d1a
/src/nirm_ms.cpp
9036e9b4ee8dc5591654d14ac073d2def37bf0ff
[]
no_license
kentjin97/nirm
11c791599ca0bf48dc827c45e37b8b7a5717ae7c
14e33a5fec225c7f05c8271597911edba014cca9
refs/heads/master
2020-04-06T08:08:50.841624
2018-11-13T00:30:37
2018-11-13T00:30:37
157,296,560
2
2
null
null
null
null
UTF-8
C++
false
false
15,924
cpp
nirm_ms.cpp
#include <RcppArmadillo.h> #include <omp.h> //[[Rcpp::depends(RcppArmadillo)]] //[[Rcpp::plugins(openmp)]] using namespace arma; //[[Rcpp::export]] Rcpp::List nirmmscpp(arma::cube data, arma::vec nsample, arma::vec nitem, const int ndim, const int nset, const int nsamp_max, const int nitem_max, const int ntotal_max, const int niter, const int nburn, const int nthin, const int nprint, const double jump_beta, const double jump_theta, const double jump_z, const double pr_mean_beta, const double pr_sd_beta, const double pr_mean_theta, const double pr_sd_theta, const double pr_mean_z, const double prior_a, const double prior_b, bool option=true, const int cores = 1){ omp_set_num_threads(cores); // omp setting int i, j, k, l, a, b, s, accept, count, stsamp, stitem, zstart; double num, den, un, ratio, mle_z, mle_w; double old_like_beta, new_like_beta, old_like_theta, new_like_theta; double update_like_samp, beta_dist, theta_dist; double post_a, post_b; arma::vec ntotal(nset, fill::zeros); for(i = 0; i < nset; i++){ if(i == 0) ntotal(i) = nsample(nset-1) + nsample(i); else ntotal(i) = nsample(i-1) + nsample(i); } arma::dcube y(nitem_max, ntotal_max, ntotal_max, fill::zeros); arma::dcube u(ntotal_max, nitem_max, nitem_max, fill::zeros); arma::field<cube> datafield(nset, 2); for(s = 0; s < nset; s++){ y.fill(0.0); for(i = 0; i < nitem(s); i++){ for(k = 1; k < ntotal(s); k++){ for(l = 0; l < k; l++){ y(i,k,l) = data(k,i,s) * data(l,i,s) * 1.0; y(i,l,k) = y(i,k,l); } } } datafield(s,0) = y.subcube(0,0,0,nitem(s)-1,ntotal(s)-1,ntotal(s)-1); u.fill(0.0); for(k = 0; k < ntotal(s); k++){ for(i = 1; i < nitem(s); i++){ for(j = 0; j < i; j++){ u(k,i,j) = data(k,i,s) * data(k,j,s) * 1.0; u(k,j,i) = u(k,i,j); } } } datafield(s,1) = u.subcube(0,0,0,ntotal(s)-1,nitem(s)-1,nitem(s)-1); } arma::dmat count_samp(ntotal_max, nset, fill::zeros); arma::dmat count_item(nitem_max, nset, fill::zeros); for(s = 0; s < nset; s++){ for(k = 0; k < ntotal(s); k++){ for(i = 0; i < nitem(s); i++){ count_samp(k,s) += data(k,i,s); count_item(i,s) += data(k,i,s); } } } arma::dvec oldbeta(nitem_max, fill::zeros); arma::field<dvec> betafield(nset, 1); for(s = 0; s < nset; s++){ oldbeta.fill(0.0); oldbeta.subvec(0,nitem(s)-1) = randu<vec>(nitem(s)) * 3.0 - 1.5; betafield(s,0) = oldbeta.subvec(0,nitem(s)-1); } arma::dvec newbeta(nitem_max, fill::zeros); arma::dvec oldtheta(ntotal_max, fill::zeros); arma::field<dvec> thetafield(nset, 1); for(s = 0; s < nset; s++){ oldtheta.fill(0.0); oldtheta.subvec(0,ntotal(s)-1) = randu<vec>(ntotal(s)) * 3.0 - 1.5; thetafield(s,0) = oldtheta.subvec(0,ntotal(s)-1); } arma::dvec newtheta(ntotal_max, fill::zeros); arma::dmat old_z(ntotal_max, ndim, fill::randu); arma::field<dmat> zfield(nset, 1); for(s = 0; s < nset; s++){ old_z.fill(0.0); old_z.submat(0,0,nsample(s)-1,ndim-1) = randu<mat>(nsample(s),ndim) * 2.0 - 1.0; zfield(s,0) = old_z.submat(0,0,nsample(s)-1,ndim-1); } arma::dmat new_z(ntotal_max, ndim, fill::zeros); arma::dvec sigma_z(nset, fill::ones); arma::dmat old_w(nitem_max, ndim, fill::zeros); arma::field<dmat> wfield(nset, 1); for(s = 0; s < nset; s++){ old_z.fill(0.0); old_w.fill(0.0); if(s == 0){ old_z.submat(0,0,nsample(nset-1)-1,ndim-1) = zfield(nset-1,0); old_z.submat(nsample(nset-1),0,nsample(nset-1)+nsample(s)-1,ndim-1) = zfield(s,0); } else{ old_z.submat(0,0,nsample(s-1)-1,ndim-1) = zfield(s-1,0); old_z.submat(nsample(s-1),0,nsample(s-1)+nsample(s)-1,ndim-1) = zfield(s,0); } for(k = 0; k < ntotal(s); k++){ for(j = 0; j < ndim; j++){ for(i = 0; i < nitem(s); i++){ if(data(k,i,s) == 1.0) old_w(i,j) += old_z(k,j) / (count_item(i,s) * 1.0); } } } wfield(s,0) = old_w.submat(0,0,nitem(s)-1,ndim-1); } arma::dmat new_w(nitem_max, ndim, fill::zeros); arma::dvec samp_like(ntotal_max, fill::zeros); arma::dvec old_sdist(ntotal_max, fill::zeros); arma::dvec new_sdist(ntotal_max, fill::zeros); arma::dcube samp_beta((niter-nburn)/nthin, nitem_max, nset, fill::zeros); arma::dcube samp_theta((niter-nburn)/nthin, ntotal_max, nset, fill::zeros); arma::dcube samp_z((niter-nburn)/nthin, nsamp_max * ndim, nset, fill::zeros); arma::dcube samp_w((niter-nburn)/nthin, nitem_max * ndim, nset, fill::zeros); arma::dvec samp_mle_z((niter-nburn)/nthin, fill::zeros); arma::dvec samp_mle_w((niter-nburn)/nthin, fill::zeros); arma::dmat samp_sigma_z((niter-nburn)/nthin, nset, fill::zeros); arma::dmat acc_beta(nitem_max, nset, fill::zeros); arma::dmat acc_theta(ntotal_max, nset, fill::zeros); arma::dmat acc_z(nsamp_max, nset, fill::zeros); arma::dmat acc_w(nitem_max, nset, fill::zeros); arma::dcube distance_z(ntotal_max, ntotal_max, nset, fill::zeros); arma::dcube distance_w(nitem_max, nitem_max, nset, fill::zeros); arma::dvec mean_z(ndim, fill::zeros); accept = count = 0; for(int iter = 1; iter <= niter; iter++){ for(s = 0; s < nset; s++){ y.fill(0.0); u.fill(0.0); y.subcube(0,0,0,nitem(s)-1,ntotal(s)-1,ntotal(s)-1) = datafield(s,0); u.subcube(0,0,0,ntotal(s)-1,nitem(s)-1,nitem(s)-1) = datafield(s,1); oldbeta.fill(0.0); oldtheta.fill(0.0); old_z.fill(0.0); old_w.fill(0.0); oldbeta.subvec(0,nitem(s)-1) = betafield(s,0); oldtheta.subvec(0,ntotal(s)-1) = thetafield(s,0); if(s == 0){ old_z.submat(0,0,nsample(nset-1)-1,ndim-1) = zfield(nset-1,0); old_z.submat(nsample(nset-1),0,nsample(nset-1)+nsample(s)-1,ndim-1) = zfield(s,0); } else{ old_z.submat(0,0,nsample(s-1)-1,ndim-1) = zfield(s-1,0); old_z.submat(nsample(s-1),0,nsample(s-1)+nsample(s)-1,ndim-1) = zfield(s,0); } old_w.submat(0,0,nitem(s)-1,ndim-1) = wfield(s,0); newbeta = oldbeta; newtheta = oldtheta; new_z = old_z; new_w = old_w; stsamp = ntotal(s); stitem = nitem(s); if(s == 0) zstart = nsample(nset-1); else zstart = nsample(s-1); for(k = zstart; k < stsamp; k++){ for(j = 0; j < ndim; j++){ new_z(k,j) = R::rnorm(old_z(k,j), jump_z); for(i = 0; i < stitem; i++) if(data(k,i,s) == 1.0){ new_w(i,j) -= old_z(k,j) / (count_item(i,s) * 1.0); new_w(i,j) += new_z(k,j) / (count_item(i,s) * 1.0); } } samp_like.fill(0.0); old_sdist.fill(0.0); new_sdist.fill(0.0); #pragma omp parallel for private(a,i,j) default(shared) for(a = 0; a < stsamp; a++){ if(a != k){ for(j = 0; j < ndim; j++){ old_sdist(a) += std::pow(old_z(a,j) - old_z(k,j), 2.0); new_sdist(a) += std::pow(old_z(a,j) - new_z(k,j), 2.0); } old_sdist(a) = std::sqrt(old_sdist(a)); new_sdist(a) = std::sqrt(new_sdist(a)); for(i = 0; i < stitem; i++){ if(y(i,a,k) == 1.0){ samp_like(a) -= -std::log(1.0 + std::exp(-(oldbeta(i) - old_sdist(a)))); samp_like(a) += -std::log(1.0 + std::exp(-(oldbeta(i) - new_sdist(a)))); } else{ samp_like(a) -= -std::log(1.0 + std::exp(oldbeta(i) - old_sdist(a))); samp_like(a) += -std::log(1.0 + std::exp(oldbeta(i) - new_sdist(a))); } } } } update_like_samp = arma::as_scalar(arma::sum(samp_like)); num = den = 0.0; for(j = 0; j < ndim; j++){ num += R::dnorm4(new_z(k,j), pr_mean_z, std::sqrt(sigma_z(s)), 1); den += R::dnorm4(old_z(k,j), pr_mean_z, std::sqrt(sigma_z(s)), 1); } ratio = update_like_samp + (num - den); // if(option) printf("Sample-%.2d: Likelihood %.3f, Num %.3f, Den %.3f, Ratio: %.3f\n", k, update_like_samp, num, den, ratio); if(ratio > 0.0) accept = 1; else{ un = R::runif(0, 1); if(std::log(un) < ratio) accept = 1; else accept = 0; } if(accept == 1){ for(j = 0; j < ndim; j++){ old_z(k,j) = new_z(k,j); for(i = 0; i < stitem; i++) if(data(k,i,s)==1.0) old_w(i,j) = new_w(i,j); } acc_z(k) += 1.0 / (niter * 1.0); } else{ for(j = 0; j < ndim; j++){ new_z(k,j) = old_z(k,j); for(i = 0; i < stitem; i++) if(data(k,i,s)==1.0) new_w(i,j) = old_w(i,j); } } } mean_z.fill(0.0); for(i = 0; i < stsamp; i++) for(j = 0; j < ndim; j++) mean_z(j) += old_z(i,j) / (stsamp * 1.0); post_a = prior_a + 0.5 * stsamp * ndim; post_b = prior_b; for(i = 0; i < stsamp; i++) for(j = 0; j < ndim; j++) post_b += 0.5 * std::pow(old_z(i,j) - mean_z(j), 2.0); sigma_z(s) = post_b * (1.0 / R::rchisq(post_a)); // 4. update item intercept parameters (\beta) #pragma omp parallel for private(i, j, k, l, beta_dist, old_like_beta, new_like_beta, num, den, accept, ratio, un) default(shared) for(i = 0; i < stitem; i++){ newbeta(i) = R::rnorm(oldbeta(i), jump_beta); old_like_beta = new_like_beta = 0.0; for(k = 1; k < stsamp; k++) for(l = 0; l < k; l++){ beta_dist = 0.0; for(j = 0; j < ndim; j++) beta_dist += std::pow(old_z(k,j) - old_z(l,j), 2.0); beta_dist = std::sqrt(beta_dist); if(y(i,k,l) == 1.0) old_like_beta += -std::log(1.0 + std::exp(-(oldbeta(i) - beta_dist))); else old_like_beta += -std::log(1.0 + std::exp(oldbeta(i) - beta_dist)); if(y(i,k,l) == 1.0) new_like_beta += -std::log(1.0 + std::exp(-(newbeta(i) - beta_dist))); else new_like_beta += -std::log(1.0 + std::exp(newbeta(i) - beta_dist)); } num = new_like_beta + R::dnorm4(newbeta(i), pr_mean_beta, pr_sd_beta, 1); den = old_like_beta + R::dnorm4(oldbeta(i), pr_mean_beta, pr_sd_beta, 1); ratio = num - den; if(ratio > 0.0) accept = 1; else{ un = R::runif(0, 1); if(std::log(un) < ratio) accept = 1; else accept = 0; } if(accept == 1){ oldbeta(i) = newbeta(i); acc_beta(i) += 1.0 / (niter * 1.0); } else newbeta(i) = oldbeta(i); } // 5. update person characteristic parameters (\theta) #pragma omp parallel for private(a, b, j, k, theta_dist, old_like_theta, new_like_theta, num, den, accept, ratio, un) default(shared) for(k = 0; k < stsamp; k++){ newtheta(k) = R::rnorm(oldtheta(k), jump_theta); old_like_theta = new_like_theta = 0.0; for(a = 1; a < stitem; a++) for(b = 0; b < a; b++){ theta_dist = 0.0; for(j = 0; j < ndim; j++) theta_dist += std::pow(old_w(a,j) - old_w(b,j), 2.0); theta_dist = std::sqrt(theta_dist); if(u(k,a,b) == 1.0) old_like_theta += -std::log(1.0 + std::exp(-(oldtheta(k) - theta_dist))); else old_like_theta += -std::log(1.0 + std::exp(oldtheta(k) - theta_dist)); if(u(k,a,b) == 1.0) new_like_theta += -std::log(1.0 + std::exp(-(newtheta(k) - theta_dist))); else new_like_theta += -std::log(1.0 + std::exp(newtheta(k) - theta_dist)); } num = new_like_theta + R::dnorm4(newtheta(k), pr_mean_theta, pr_sd_theta, 1); den = old_like_theta + R::dnorm4(oldtheta(k), pr_mean_theta, pr_sd_theta, 1); ratio = num - den; if(ratio > 0.0) accept = 1; else{ un = R::runif(0, 1); if(std::log(un) < ratio) accept = 1; else accept = 0; } if(accept == 1){ oldtheta(k) = newtheta(k); acc_theta(k) += 1.0 / (niter * 1.0); } else newtheta(k) = oldtheta(k); } if(iter > nburn && iter % nthin == 0){ // 6. Save Posterior value if(s == 0){ mle_z = 0.0; distance_z.fill(0.0); } for(k = 1; k < stsamp; k++){ for(l = 0; l < k; l++){ for(j = 0; j < ndim; j++) distance_z(k,l,s) += std::pow(old_z(k,j) - old_z(l,j), 2.0); distance_z(k,l,s) = std::sqrt(distance_z(k,l,s)); distance_z(l,k,s) = distance_z(k,l,s); } } #pragma omp parallel for private(i, j, k, l) default(shared) for(i = 0; i < stitem; i++){ for(k = 1; k < stsamp; k++){ for(l = 0; l < k; l++){ if(y(i,k,l) == 1.0) mle_z += -std::log(1.0 + std::exp(-(oldbeta(i) - distance_z(k,l,s)))); else mle_z += -std::log(1.0 + std::exp(oldbeta(i) - distance_z(k,l,s))); } } } for(i = 0; i < stitem; i++) mle_z += R::dnorm4(oldbeta(i), pr_mean_beta, pr_sd_beta, 1); for(k = zstart; k < stsamp; k++) for(j = 0; j < ndim; j++) mle_z += R::dnorm4(old_z(k,j), pr_mean_z, std::sqrt(sigma_z(s)), 1); if(s == 0){ mle_w = 0.0; distance_w.fill(0.0); } for(a = 1; a < stitem; a++){ for(b = 0; b < a; b++){ for(j = 0; j < ndim; j++) distance_w(a,b,s) += std::pow(old_w(a,j) - old_w(b,j), 2.0); distance_w(a,b,s) = std::sqrt(distance_w(a,b,s)); distance_w(b,a,s) = distance_w(a,b,s); } } #pragma omp parallel for private(a, b, j, k) default(shared) for(k = 0; k < stsamp; k++){ for(a = 1; a < stitem; a++) for(b = 0; b < a; b++){ if(u(k,a,b) == 1.0) mle_w += -std::log(1.0 + std::exp(-(oldtheta(k) - distance_w(a,b,s)))); else mle_w += -std::log(1.0 + std::exp(oldtheta(k) - distance_w(a,b,s))); } } for(k = 0; k < stsamp; k++) mle_w += R::dnorm4(oldtheta(k), pr_mean_theta, pr_sd_theta, 1); for(k = zstart; k < stsamp; k++) for(j = 0; j < ndim; j++) samp_z(count,((k-zstart)*ndim+j),s) = old_z(k,j); for(i = 0; i < stitem; i++) for(j = 0; j < ndim; j++) samp_w(count,(i*ndim+j),s) = old_w(i,j); for(i = 0; i < stitem; i++) samp_beta(count,i,s) = oldbeta(i); for(k = 0; k < stsamp; k++) samp_theta(count,k,s) = oldtheta(k); samp_mle_z(count) = mle_z; samp_mle_w(count) = mle_w; samp_sigma_z(count,s) = std::sqrt(sigma_z(s)); } if(iter % nprint == 0){ if(option){ printf("%.5d-SET%.2d ", iter, s); for(i = 0; i < nitem(s); i++) printf("% .3f ", oldbeta(i)); printf("% .3f\n", std::sqrt(sigma_z(s))); } } betafield(s,0) = oldbeta.subvec(0,nitem(s)-1); thetafield(s,0) = oldtheta.subvec(0,ntotal(s)-1); zfield(s,0) = old_z.submat(nsample(nset-1),0,nsample(nset-1)+nsample(s)-1,ndim-1); wfield(s,0) = old_w.submat(0,0,nitem(s)-1,ndim-1); } if(iter > nburn && iter % nthin == 0){ count++; } } Rcpp::List output; output["beta"] = samp_beta; output["theta"] = samp_theta; output["z"] = samp_z; output["w"] = samp_w; output["sigma_z"] = samp_sigma_z; output["accept_beta"] = acc_beta; output["accept_theta"] = acc_theta; output["accept_z"] = acc_z; output["posterior_z"] = samp_mle_z; output["posterior_w"] = samp_mle_w; return(output); }
2f091e50e11171e741d0fd4ad91e7b163d42e2c1
c10061e6ac1a0a06eaacb802764a291907198d5a
/build-practiceLPNU-Desktop_Qt_5_13_0_MSVC2017_64bit-Debug/ui_addslot.h
23f5ccd5c520aea7ae11ebe13b13c1c054bc6e92
[]
no_license
PeterLysyk/PracticeWorkLPNU
42fcfc8cfc2789ca0697071de538756f602b8744
7149f1894ebe5009b3e4677128d8dd589e755129
refs/heads/master
2020-07-16T17:12:55.797278
2019-09-11T05:23:15
2019-09-11T05:23:15
205,830,126
0
0
null
null
null
null
UTF-8
C++
false
false
6,442
h
ui_addslot.h
/******************************************************************************** ** Form generated from reading UI file 'addslot.ui' ** ** Created by: Qt User Interface Compiler version 5.13.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_ADDSLOT_H #define UI_ADDSLOT_H #include <QtCore/QVariant> #include <QtWidgets/QApplication> #include <QtWidgets/QLabel> #include <QtWidgets/QLineEdit> #include <QtWidgets/QPushButton> #include <QtWidgets/QWidget> QT_BEGIN_NAMESPACE class Ui_AddSlot { public: QLineEdit *IdSlot; QLineEdit *IdStorage; QLabel *IdSlotLabel; QLabel *IdMaterialLabel; QLabel *IdStorageLabel; QLineEdit *MaterialCount; QPushButton *AddDeliveryButton; QLineEdit *IdMaterial; QLabel *MaterialCountLabel; QLabel *label; QLabel *label_2; QLineEdit *idSlotAdding; QLabel *IdSlotLabel_2; QLineEdit *MaterialCountAdding; QLabel *MaterialCountLabel_2; QPushButton *addMatherialsToSlot; void setupUi(QWidget *AddSlot) { if (AddSlot->objectName().isEmpty()) AddSlot->setObjectName(QString::fromUtf8("AddSlot")); AddSlot->resize(345, 244); IdSlot = new QLineEdit(AddSlot); IdSlot->setObjectName(QString::fromUtf8("IdSlot")); IdSlot->setGeometry(QRect(110, 20, 231, 22)); IdStorage = new QLineEdit(AddSlot); IdStorage->setObjectName(QString::fromUtf8("IdStorage")); IdStorage->setGeometry(QRect(110, 50, 231, 22)); IdSlotLabel = new QLabel(AddSlot); IdSlotLabel->setObjectName(QString::fromUtf8("IdSlotLabel")); IdSlotLabel->setGeometry(QRect(10, 20, 91, 16)); IdMaterialLabel = new QLabel(AddSlot); IdMaterialLabel->setObjectName(QString::fromUtf8("IdMaterialLabel")); IdMaterialLabel->setGeometry(QRect(10, 80, 81, 16)); IdStorageLabel = new QLabel(AddSlot); IdStorageLabel->setObjectName(QString::fromUtf8("IdStorageLabel")); IdStorageLabel->setGeometry(QRect(10, 50, 91, 16)); MaterialCount = new QLineEdit(AddSlot); MaterialCount->setObjectName(QString::fromUtf8("MaterialCount")); MaterialCount->setGeometry(QRect(110, 110, 231, 22)); AddDeliveryButton = new QPushButton(AddSlot); AddDeliveryButton->setObjectName(QString::fromUtf8("AddDeliveryButton")); AddDeliveryButton->setGeometry(QRect(260, 130, 80, 21)); IdMaterial = new QLineEdit(AddSlot); IdMaterial->setObjectName(QString::fromUtf8("IdMaterial")); IdMaterial->setGeometry(QRect(110, 80, 231, 22)); MaterialCountLabel = new QLabel(AddSlot); MaterialCountLabel->setObjectName(QString::fromUtf8("MaterialCountLabel")); MaterialCountLabel->setGeometry(QRect(10, 110, 101, 21)); label = new QLabel(AddSlot); label->setObjectName(QString::fromUtf8("label")); label->setGeometry(QRect(90, 0, 161, 20)); QFont font; font.setPointSize(12); label->setFont(font); label_2 = new QLabel(AddSlot); label_2->setObjectName(QString::fromUtf8("label_2")); label_2->setGeometry(QRect(80, 150, 211, 20)); label_2->setFont(font); idSlotAdding = new QLineEdit(AddSlot); idSlotAdding->setObjectName(QString::fromUtf8("idSlotAdding")); idSlotAdding->setGeometry(QRect(110, 170, 231, 22)); IdSlotLabel_2 = new QLabel(AddSlot); IdSlotLabel_2->setObjectName(QString::fromUtf8("IdSlotLabel_2")); IdSlotLabel_2->setGeometry(QRect(10, 170, 91, 16)); MaterialCountAdding = new QLineEdit(AddSlot); MaterialCountAdding->setObjectName(QString::fromUtf8("MaterialCountAdding")); MaterialCountAdding->setGeometry(QRect(110, 200, 231, 22)); MaterialCountLabel_2 = new QLabel(AddSlot); MaterialCountLabel_2->setObjectName(QString::fromUtf8("MaterialCountLabel_2")); MaterialCountLabel_2->setGeometry(QRect(10, 200, 101, 21)); addMatherialsToSlot = new QPushButton(AddSlot); addMatherialsToSlot->setObjectName(QString::fromUtf8("addMatherialsToSlot")); addMatherialsToSlot->setGeometry(QRect(260, 220, 80, 21)); retranslateUi(AddSlot); QMetaObject::connectSlotsByName(AddSlot); } // setupUi void retranslateUi(QWidget *AddSlot) { AddSlot->setWindowTitle(QCoreApplication::translate("AddSlot", "\320\241\320\233\320\236\320\242", nullptr)); IdSlotLabel->setText(QCoreApplication::translate("AddSlot", "ID \320\241\320\273\320\276\321\202\320\260", nullptr)); IdMaterialLabel->setText(QCoreApplication::translate("AddSlot", "ID \320\234\320\260\321\202\320\265\321\200\321\226\320\260\320\273\321\203", nullptr)); IdStorageLabel->setText(QCoreApplication::translate("AddSlot", "ID \320\241\320\272\320\273\320\260\320\264\321\203", nullptr)); AddDeliveryButton->setText(QCoreApplication::translate("AddSlot", "\320\241\321\202\320\262\320\276\321\200\320\270\321\202\320\270", nullptr)); MaterialCountLabel->setText(QCoreApplication::translate("AddSlot", "\320\232\321\226\320\273\321\214\320\272\321\226\321\201\321\202\321\214 \320\274\320\260\321\202\320\265\321\200\321\226\320\260\320\273\321\203", nullptr)); label->setText(QCoreApplication::translate("AddSlot", "\320\241\321\202\320\262\320\276\321\200\320\270\321\202\320\270 \320\275\320\276\320\262\320\270\320\271 \321\201\320\273\320\276\321\202", nullptr)); label_2->setText(QCoreApplication::translate("AddSlot", "\320\227\320\274\321\226\320\275\320\270\321\202\320\270 \321\226\321\201\320\275\321\203\321\216\321\207\320\270\320\271 \321\201\320\273\320\276\321\202", nullptr)); IdSlotLabel_2->setText(QCoreApplication::translate("AddSlot", "ID \320\241\320\273\320\276\321\202\320\260", nullptr)); MaterialCountLabel_2->setText(QCoreApplication::translate("AddSlot", "\320\227\320\274\321\226\320\275\320\260 \320\274\320\260\321\202\320\265\321\200\321\226\320\260\320\273\321\203", nullptr)); addMatherialsToSlot->setText(QCoreApplication::translate("AddSlot", "\320\224\320\276\320\264\320\260\321\202\320\270", nullptr)); } // retranslateUi }; namespace Ui { class AddSlot: public Ui_AddSlot {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_ADDSLOT_H
9a6d3261fd4eec97299d1b9b11cf3a13f380dff9
8665e5416b8e4287a27d97f86e661e0e073a30a6
/7.01.19/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp
9d470bf5c14fb309ee5263c84c4d78d3952f7e15
[]
no_license
shewhite/zadaci-c-sara
26ae34d90f1aa21a8c5c530bae1425a9e51f0bb3
3c7b07a58488792f0a5da29e77ed887d32c3ac59
refs/heads/master
2021-10-10T18:49:20.680614
2019-01-15T15:14:41
2019-01-15T15:14:41
159,631,062
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
3,569
cpp
ConsoleApplication1.cpp
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <string> #include "zivotinje.h" using namespace std; class Kutija { public: int x; void ispis(); }; void Kutija::ispis() { cout << x << endl; } class Covjek { public: string hodanje; string trcanje; string lezanje; void ispis(); }; void Covjek::ispis() { cout << hodanje << endl; cout << trcanje << endl; cout << lezanje << endl; } class Kocka { public: double visina; double sirina; double dubina; void otvori(); void zatvori(); }; void Kocka::otvori() { cout << visina << endl; cout << sirina << endl; cout << dubina << endl; } void Kocka::zatvori() { cout << "Zatvorili ste Kocku" << endl; } class Automobil { private: string marka=""; string model = ""; int broj_sasije= 0; public: void upali(); void ugasi(); void ubrzaj(); void uspori(); void setmarka(); void setmodel(); void setbroj_sasije(); string getmarka(); string getmodel(); int getbroj_sasije(); }; void Automobil::upali() { cout << marka << endl; cout << model << endl; cout << broj_sasije << endl; } void Automobil ::setmarka() { marka = "Volvo"; } class Box { public: int x; Box(); ~Box(); }; Box::Box() { cout << "Stvoren je objekt box" << endl; } Box::~Box() { cout << "Uništen je objekt kutija" << endl; } class Boxx { public: static int broj_boxx; Boxx(); static void koliko_boxx(); }; Boxx::Boxx() { broj_boxx++; } void Boxx::koliko_boxx() { cout << "Imamo " << broj_boxx << " box-eva" << endl; } int Boxx::broj_boxx = 0; class Node { void *info; Node *next; public: static int broj_nodova; static void broj_nodova(); Node(void *v) { info = v; next = 0; } void put_next(Node *n) { next = n; } Node *get_next() { return next; } void *get_info() { return info; } }; void Node::broj_nodova() { cout << "Imamo " << broj_nodova << " nodova." << endl; } class povezanalista { Node*start; }; Node::~Node(){} int main() { /*cout << Boxx::broj_boxx << endl; Boxx kutija; Boxx kutija2; cout << Boxx::broj_boxx << endl; Boxx kutija3; Boxx::koliko_boxx(); */ /*Kocka Plava; Plava.dubina = 2; Plava.sirina = 3; Plava.visina = 3; Plava.otvori(); Plava.zatvori(); Kocka Bijela; Bijela.dubina = 4; Bijela.sirina = 4; Bijela.visina = 4; Bijela.otvori(); Bijela.zatvori(); Kocka Crvena; Crvena.dubina = 3.5; Crvena.sirina = 3.5; Crvena.visina = 3.5; Crvena.otvori(); Crvena.zatvori();*/ /*Kutija box; box.x = 100; box.ispis(); */ /*Covjek Pero; Pero.trcanje = "Trcim"; Pero.hodanje = "Hodam"; Pero.lezanje = "Lezim"; Pero.ispis(); */ /*Zivotinja Navike; Navike.Lav = "Lovi"; Navike.Zmaj = "Riga vatru"; Navike.Mrav = "Skuplja hranu"; Navike.ispis(); */ } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Getting Started: // 1. Use the Solution Explorer window to add/manage files // 2. Use the Team Explorer window to connect to source control // 3. Use the Output window to see build output and other messages // 4. Use the Error List window to view errors // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
512878a4987e316e25634d3be2c0c835f2e24d32
92a7c04900df0414b8fb27ffd609711e42a92e0a
/Hunter/Main.cpp
5917c2aa8f9edaa74c75670c45c0e607295830fe
[]
no_license
eXplowar/TheHunter
7f59e8509ed53bb257ce5f4059ac9e2266303dcc
1def1e477f9735457e93d2759738c3ffa13b9516
refs/heads/master
2021-05-08T21:53:04.433288
2018-02-07T12:14:55
2018-02-07T12:14:55
119,649,144
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
16,737
cpp
Main.cpp
#include <SFML/Graphics.hpp> #include <time.h> #include <iostream> #include <vector> using namespace sf; const int sizeCharacter = 54; // Размер текстуры персонажа const int restartMenuHeight = 54; // Высота спрайта рестарта игры const int restartMenuWidth = 162; // Ширина спрайта рестарта игры bool animalSeeTrap = false; // Животное видит ловушки bool humanTurn = false; // True - ход игрока. False - ход компьютера bool gameOver = false; // Маркер конца игры Texture textureHunter; Texture textureAnimal; Texture textureTrap; Texture textureRestart; const int worldMapHeight = 4; // Высота карты const int worldMapWidth = 4; // Ширина карты int worldMap[worldMapWidth][worldMapHeight]; // Размер карты class Hunter { public: int xPos; int yPos; int id = 1; bool isMoveByPlayer = false; bool loaded = false; Sprite sprite; Hunter() { } Hunter(int x, int y) { this->xPos = x; this->yPos = y; textureHunter.loadFromFile("res/hunter.png"); sprite.setTextureRect(IntRect(0, 0, sizeCharacter, sizeCharacter)); // Резка текстуры на спрайты sprite.setTexture(textureHunter); } }; class Animal { public: int xPos; int yPos; int id = 2; bool isMoveByPlayer = false; Sprite sprite; Animal() {} Animal(int x, int y) { this->xPos = x; this->yPos = y; textureAnimal.loadFromFile("res/animal.png"); sprite.setTextureRect(IntRect(0, 0, sizeCharacter, sizeCharacter)); sprite.setTexture(textureAnimal); } }; class Trap { public: int xPos; int yPos; int id = 3; bool isMoveByPlayer = false; Sprite sprite; Trap() {} Trap(int x, int y) { this->xPos = x; this->yPos = y; textureTrap.loadFromFile("res/trap.png"); sprite.setTextureRect(IntRect(0, 0, sizeCharacter, sizeCharacter)); sprite.setTexture(textureTrap); } }; Sprite spriteRestart; void ShowRestartMenu() { textureRestart.loadFromFile("res/restart.png"); spriteRestart.setTextureRect(IntRect(0, 0, restartMenuWidth, restartMenuHeight)); spriteRestart.setTexture(textureRestart); spriteRestart.setPosition(worldMapWidth * sizeCharacter / 2 - restartMenuWidth / 2, worldMapHeight * sizeCharacter / 2 - restartMenuHeight / 2); } Hunter hunter1; Hunter hunter2; Animal animal1; Trap trap1; void PrintWorldMap(std::string msg) { std::cout << msg << std::endl; for (int i = 0; i < worldMapHeight; i++) { for (int j = 0; j < worldMapWidth; j++) { std::cout << worldMap[i][j]; } std::cout << std::endl; } std::cout << "________" << std::endl; std::cout << std::endl; } // Инициализация карты void initWorldMap() { // Заполнение двумерного массива нулями for (int i = 0; i < worldMapHeight; i++) { for (int j = 0; j < worldMapWidth; j++) { worldMap[i][j] = 0; } } // Во избежание ситуаций когда сгенерированная новая пара уже присвоена некоторому объекту, // создаётся Карта(ИмяИгровогоОбьекта, Пара(координатаX, координатаY)), // после чего проверяется наличие пары с координатами в карте std::map<std::pair<int, int>, std::string> mGameObjectPair; std::pair<int, int> tempCoordinate; tempCoordinate = std::make_pair(std::rand() % worldMapHeight, std::rand() % worldMapWidth); mGameObjectPair[tempCoordinate] = "hunter1"; do { tempCoordinate = std::make_pair(std::rand() % worldMapHeight, std::rand() % worldMapWidth); } while (!mGameObjectPair[tempCoordinate].empty()); mGameObjectPair[tempCoordinate] = "hunter2"; do { tempCoordinate = std::make_pair(std::rand() % worldMapHeight, std::rand() % worldMapWidth); } while (!mGameObjectPair[tempCoordinate].empty()); mGameObjectPair[tempCoordinate] = "animal1"; do { tempCoordinate = std::make_pair(std::rand() % worldMapHeight, std::rand() % worldMapWidth); } while (!mGameObjectPair[tempCoordinate].empty()); mGameObjectPair[tempCoordinate] = "trap1"; // Сопоставление значения карты с игровыми объектами for (std::map<std::pair<int, int>, std::string>::iterator it = mGameObjectPair.begin(); it != mGameObjectPair.end(); ++it) { /*std::cout << it->second << ": "; std::cout << it->first.first << " "; std::cout << it->first.second << "\n";*/ if (it->second == "hunter1") { hunter1 = Hunter(it->first.first, it->first.second); worldMap[hunter1.yPos][hunter1.xPos] = hunter1.id; } else if (it->second == "hunter2") { hunter2 = Hunter(it->first.first, it->first.second); worldMap[hunter2.yPos][hunter2.xPos] = hunter2.id; } else if (it->second == "animal1") { animal1 = Animal(it->first.first, it->first.second); worldMap[animal1.yPos][animal1.xPos] = animal1.id; } else if (it->second == "trap1") { trap1 = Trap(it->first.first, it->first.second); worldMap[trap1.yPos][trap1.xPos] = trap1.id; } } std::cout << hunter1.id << " - Hunter; " << animal1.id << " - Animal; " << trap1.id << " - Trap" << std::endl << std::endl; // Вывод двумерного массива PrintWorldMap("Map created:"); } void loadPosition() { for (int i = 0; i < worldMapHeight; i++) { for (int j = 0; j < worldMapWidth; j++) { int n = worldMap[i][j]; // Некоторая позиция на доске if (!n) continue; if (n == 1) { if (i == hunter1.yPos && j == hunter1.xPos) { hunter1.sprite.setPosition(sizeCharacter*j, sizeCharacter*i);// hunter1.loaded = true; continue; } if (i == hunter2.yPos && j == hunter2.xPos) { hunter2.sprite.setPosition(sizeCharacter*j, sizeCharacter*i);// hunter2.loaded = true; continue; } } if (n == 2) { animal1.sprite.setPosition(sizeCharacter*j, sizeCharacter*i);// } if (n == 3) { trap1.sprite.setPosition(sizeCharacter*j, sizeCharacter*i);// } } } } float dx = 0, dy = 0; Vector2f curPos; // Получение точки захвата спрайта template<typename T> void SelectGameUnit(T &gameUnit, Vector2i mousePos) { if (gameUnit.sprite.getGlobalBounds().contains(mousePos.x, mousePos.y)) { gameUnit.isMoveByPlayer = true; curPos = gameUnit.sprite.getPosition(); dx = mousePos.x - gameUnit.sprite.getPosition().x; dy = mousePos.y - gameUnit.sprite.getPosition().y; } } // Изменение позиции игрового обьекта игроком template<typename T> void MoveGameUnitByPlayer(T &gameUnit, Vector2i mousePos) { if (gameUnit.sprite.getGlobalBounds().contains(mousePos.x, mousePos.y) && (gameUnit.isMoveByPlayer)) { gameUnit.isMoveByPlayer = false; // Расчёт новой позиции Vector2f p = gameUnit.sprite.getPosition() + Vector2f(sizeCharacter / 2, sizeCharacter / 2); int newArrayPosX = int(p.x / sizeCharacter); int newArrayPosY = int(p.y / sizeCharacter); // Ходить можно только по пустым клеткам if (worldMap[newArrayPosY][newArrayPosX] != 0) { std::cout << "You can not move to this cage, there is already someone on it!" << std::endl; gameUnit.sprite.setPosition(curPos); return; } // Движение только на одину клетку if (((gameUnit.xPos != newArrayPosX) && (gameUnit.yPos != newArrayPosY)) || ((abs(gameUnit.xPos - newArrayPosX) > 1) || (abs(gameUnit.yPos - newArrayPosY) > 1))) { gameUnit.sprite.setPosition(curPos); return; } // Перемещение спрайта. Выравнивание Vector2f newPos = Vector2f(sizeCharacter*newArrayPosX, sizeCharacter*newArrayPosY); gameUnit.sprite.setPosition(newPos); // Перемещение числа в массиве worldMap[gameUnit.yPos][gameUnit.xPos] = 0; // Удаление старого места gameUnit.xPos = newArrayPosX; gameUnit.yPos = newArrayPosY; worldMap[gameUnit.yPos][gameUnit.xPos] = gameUnit.id; // Старые значения: Hunter(4, 3) = map[2][3]. Новые значения при ходе вправо Hunter(5, 3) = map[2][4] humanTurn = false; // Конец хода игрока // Вывод двумерного массива после хода игрока PrintWorldMap("The Player made a move:"); } } bool startGame() { gameOver = false; srand(static_cast <unsigned> (time(0))); RenderWindow window(VideoMode(worldMapWidth * sizeCharacter, worldMapHeight * sizeCharacter), "The Hunter", sf::Style::Titlebar | sf::Style::Close); Texture tCharacter, tWorldMap; tWorldMap.loadFromFile("res/map432.png"); Sprite spriteMap(tWorldMap); initWorldMap(); loadPosition(); humanTurn = true; while (window.isOpen()) { Vector2i mousePos = Mouse::getPosition(window); Event e; while (window.pollEvent(e)) { if (e.type == Event::Closed) window.close(); if (humanTurn) { // Перетаскивание if (e.type == Event::MouseButtonPressed) { if (e.key.code == Mouse::Left) { // Точка захвата спрайта SelectGameUnit(hunter1, mousePos); SelectGameUnit(hunter2, mousePos); /*SelectGameUnit(animal1, mousePos); SelectGameUnit(trap1, mousePos);*/ } } if (e.type == Event::MouseButtonReleased) { if (e.key.code == Mouse::Left) { MoveGameUnitByPlayer(hunter1, mousePos); MoveGameUnitByPlayer(hunter2, mousePos); /*MoveGameUnitByPlayer(animal1, mousePos); MoveGameUnitByPlayer(trap1, mousePos);*/ } } } if (!humanTurn && !gameOver) { // 1. Координаты соседних ячеек int xLeft = animal1.xPos - 1; int xRight = animal1.xPos + 1; int yTop = animal1.yPos - 1; int yDown = animal1.yPos + 1; // 2. Отобрать только доступные координаты std::vector<std::pair<int, int>> vAvailableCells; // Список достуных клеток std::vector<std::pair<int, int>> vCellsWithTrap; // Список клеток с ловушкой, которые находится в непосредственной близости к животному // Значения в ячейках по периметру std::cout << "Perimeter values:" << std::endl; std::cout << "map[animal1.yPos][animal1.xPos - 1]: " << worldMap[animal1.yPos][xLeft] << std::endl; if (worldMap[animal1.yPos][xLeft] == 3) vCellsWithTrap.push_back(std::pair<int, int>(xLeft, animal1.yPos)); std::cout << "map[animal1.yPos][animal1.xPos + 1]: " << worldMap[animal1.yPos][xRight] << std::endl; if (worldMap[animal1.yPos][xRight] == 3) vCellsWithTrap.push_back(std::pair<int, int>(xRight, animal1.yPos)); std::cout << "map[animal1.yPos - 1][animal1.xPos]: " << worldMap[yTop][animal1.xPos] << std::endl; if (worldMap[yTop][animal1.xPos] == 3) vCellsWithTrap.push_back(std::pair<int, int>(animal1.xPos, yTop)); std::cout << "map[animal1.yPos + 1][animal1.xPos]: " << worldMap[yDown][animal1.xPos] << std::endl; if (worldMap[yDown][animal1.xPos] == 3) vCellsWithTrap.push_back(std::pair<int, int>(animal1.xPos, yDown)); // Координата клетки слева от животного должна быть положительной if (xLeft >= 0) { // Поместить координату в список доступных для хода в случае если: (Животное видит ловушки, ячейка слева не охотник и не ловушка) либо (Животное не видит ловушки, ячейка слева не охотник) if (((animalSeeTrap) && ((worldMap[animal1.yPos][xLeft] != 1) && (worldMap[animal1.yPos][xLeft] != 3))) || ((!animalSeeTrap) && (worldMap[animal1.yPos][xLeft] != 1))) { vAvailableCells.push_back(std::pair<int, int>(xLeft, animal1.yPos)); } } if (xRight < worldMapWidth) { if (((animalSeeTrap) && ((worldMap[animal1.yPos][xRight] != 1) && (worldMap[animal1.yPos][xRight] != 3))) || ((!animalSeeTrap) && (worldMap[animal1.yPos][xRight] != 1))) { vAvailableCells.push_back(std::pair<int, int>(xRight, animal1.yPos)); } } if (yTop >= 0) { if (((animalSeeTrap) && ((worldMap[yTop][animal1.xPos] != 1) && (worldMap[yTop][animal1.xPos] != 3))) || ((!animalSeeTrap) && (worldMap[yTop][animal1.xPos] != 1))) { vAvailableCells.push_back(std::pair<int, int>(animal1.xPos, yTop)); } } if (yDown < worldMapHeight) { if (((animalSeeTrap) && ((worldMap[yDown][animal1.xPos] != 1) && (worldMap[yDown][animal1.xPos] != 3))) || ((!animalSeeTrap) && (worldMap[yDown][animal1.xPos] != 1))) { vAvailableCells.push_back(std::pair<int, int>(animal1.xPos, yDown)); } } // Наличие возможных ходов if (vAvailableCells.size() > 0) { // Вывод вектора std::cout << std::endl << "The Animal can go here:" << std::endl; for (int i = 0; i < vAvailableCells.size(); i++) { std::cout << vAvailableCells[i].first; std::cout << vAvailableCells[i].second; std::cout << std::endl; } } else { if (vCellsWithTrap.size() != 0) { vAvailableCells.push_back(vCellsWithTrap[0]); } std::cout << std::endl << "Rabbit has nowhere to go, he has to go to the trap:" << std::endl; for (int i = 0; i < vAvailableCells.size(); i++) { std::cout << vAvailableCells[i].first; std::cout << vAvailableCells[i].second; std::cout << std::endl; } } std::cout << std::endl; // 3. Используя функцию случайных чисел выбрать случайное число изходя из количества доступных для хода вариантов int randomInt = std::rand() % vAvailableCells.size(); std::pair<int, int> botMoveCoordinate = vAvailableCells[randomInt]; // 4. Зафиксировать ход на карте Vector2f newPos = Vector2f(sizeCharacter*botMoveCoordinate.first, sizeCharacter*botMoveCoordinate.second); animal1.sprite.setPosition(newPos); // 5. Зафиксировать ход в двумерном массиве worldMap[animal1.yPos][animal1.xPos] = 0; animal1.xPos = botMoveCoordinate.first; animal1.yPos = botMoveCoordinate.second; if (worldMap[botMoveCoordinate.second][botMoveCoordinate.first] == 3) { gameOver = true; std::cout << "You caught the rabbit!" << std::endl << std::endl; break; } worldMap[botMoveCoordinate.second][botMoveCoordinate.first] = animal1.id; // Вывод двумерного массива после хода компьютера PrintWorldMap("The Computer made a move:"); humanTurn = true; // Конец хода бота } // Рестрат if (Keyboard::isKeyPressed(Keyboard::R)) { std::cout << "Restart pressed" << std::endl; std::cout << "________" << std::endl << std::endl; return true; } } // Привязка позиции спрайта к позиции курсора с сохранением точки захвата if (hunter1.isMoveByPlayer) { hunter1.sprite.setPosition(mousePos.x - dx, mousePos.y - dy); } if (hunter2.isMoveByPlayer) { hunter2.sprite.setPosition(mousePos.x - dx, mousePos.y - dy); } if (animal1.isMoveByPlayer) { animal1.sprite.setPosition(mousePos.x - dx, mousePos.y - dy); } if (trap1.isMoveByPlayer) { trap1.sprite.setPosition(mousePos.x - dx, mousePos.y - dy); } // Отрисовка window.clear(); window.draw(spriteMap); window.draw(hunter1.sprite); window.draw(hunter2.sprite); window.draw(animal1.sprite); window.draw(trap1.sprite); if (gameOver) { ShowRestartMenu(); window.draw(spriteRestart); } window.display(); } } void gameRunning() { // Функция startGame() завершает свою работу и возращает true только при нажатии на R, что, в свою очередь снова вызывает функцию gameRunning(), которая заново вызывает startGame() if (startGame()) { gameRunning(); } } int main(int argc, char *argv[]) { if (argc == 1) { std::cout << "Rabbit does not see the trap" << std::endl; animalSeeTrap = false; } else { for (int i = 1; i < argc; i++) { std::string param = argv[i]; if (param == "AnimalSeeTrap") { animalSeeTrap = true; std::cout << "Rabbit sees traps" << std::endl; } } } gameRunning(); return 0; }
bbc43de97365eadad65d3a631767caa9f8d09498
1efef9121dc79782d8bec55d29c093eb9897c58b
/2017/pc/tarefa3/src/figuras/Figura.h
e0e5f5485e4a623d4cb0727e88097673c2667241
[ "MIT" ]
permissive
LorhanSohaky/UFSCar
11590e8b063a04a27975127555bdbfa2a571a961
af0e84946cbb61b12dfa738610065bbb0f4887a2
refs/heads/master
2021-10-05T10:23:04.242242
2021-09-22T13:40:37
2021-09-22T13:40:37
87,256,617
1
1
MIT
2021-09-22T13:42:21
2017-04-05T02:25:14
TeX
UTF-8
C++
false
false
392
h
Figura.h
#ifndef FIGURA_H #define FIGURA_H #include "Ponto.h" #include <gtkmm.h> using namespace Gtk; class Figura : public Ponto { public: Figura( const int x = 0, const int y = 0 ); void setPosition( const int x = 0, const int y = 0 ); void setPosition( Ponto p ); virtual void draw( const Cairo::RefPtr<Cairo::Context> &cr ) const = 0; virtual ~Figura( void ); }; #endif
9b7528652672462cbbf89d57b7c6af6d8053d243
0c00de6dbe45c0093cd4afa04329f8bc19ef4326
/demo1/main.cpp
5a2762b4cec7d0ea977831cbd197b8e3acc6f240
[]
no_license
windowxiaoming/cmake_tutorial1
c7718f8fa29b18ddf16d8dfcb0d80eec5c52c294
7bf9664a876a527e46730a4d219a85e1141f4ebb
refs/heads/master
2020-07-04T15:49:39.134041
2018-12-03T07:50:28
2018-12-03T07:50:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
721
cpp
main.cpp
#include <iostream> #include <chrono> using namespace std; void print_msg(const string& msg); int main() { std::cout << "Hello, World!" << std::endl; print_msg("just from cpp"); int count = 1; // const int MAX_LOOP = 10000 * 10000; const int MAX_LOOP = 10000 * 1; std::chrono::steady_clock::time_point beg = std::chrono::steady_clock::now(); for (int i = 0; i < MAX_LOOP; ++i) { ++count; } std::chrono::steady_clock::time_point end= std::chrono::steady_clock::now(); std::cout<<"after loop count is: "<<count<<std::endl; std::cout <<" Time difference = " << std::chrono::duration_cast<std::chrono::milliseconds>(end - beg).count() <<std::endl; return 0; }
721526ad7c43d62e248ceb1a797dd7912aba3110
70418d8faa76b41715c707c54a8b0cddfb393fb3
/1060.cpp
87e659410773736de6d0f15681ed8a8d2640df3b
[]
no_license
evandrix/UVa
ca79c25c8bf28e9e05cae8414f52236dc5ac1c68
17a902ece2457c8cb0ee70c320bf0583c0f9a4ce
refs/heads/master
2021-06-05T01:44:17.908960
2017-10-22T18:59:42
2017-10-22T18:59:42
107,893,680
3
1
null
null
null
null
UTF-8
C++
false
false
3,841
cpp
1060.cpp
#include <bits/stdc++.h> using namespace std; const double eps = 1e-8; const double INF = 1e30; int dcmp(double x) { if (x < -eps) return -1; return x > eps; } struct point { double x, y; point(double _x = 0, double _y = 0) : x(_x), y(_y) {} double len() { return sqrt(x * x + y * y); } point nor() { double L = len(); return point(x / L, y / L); } bool operator<(const point r) const { if (dcmp(x - r.x)) return x < r.x; return y < r.y; } } p[1000], O; int N; double v1, v2; double cross(point &k, point &a, point &b) { return (a.x - k.x) * (b.y - k.y) - (a.y - k.y) * (b.x - k.x); } double dot(point &k, point &a, point &b) { return (a.x - k.x) * (b.x - k.x) + (a.y - k.y) * (b.y - k.y); } bool onSeg(point k, point p1, point p2) { return dcmp(cross(k, p1, p2)) == 0 && dcmp(dot(k, p1, p2)) <= 0; } bool inPoly(point cp) { int i, j, k, d1, d2, w = 0; for (i = 0; i < N; ++i) { if (onSeg(cp, p[i], p[i + 1])) return 0; k = dcmp(cross(p[i], p[i + 1], cp)); d1 = dcmp(p[i].y - cp.y); d2 = dcmp(p[i + 1].y - cp.y); if (k > 0 && d1 <= 0 && d2 > 0) w++; if (k < 0 && d2 <= 0 && d1 > 0) w--; } return w != 0; } int inter(point &a1, point &a2, point &b1, point &b2, point &k) { double u = cross(a1, a2, b1), v = cross(a2, a1, b2); if (dcmp(u + v)) { k = point((b1.x * v + b2.x * u) / (v + u), (b1.y * v + b2.y * u) / (v + u)); return 1; } if (dcmp(u) || dcmp(cross(b1, b2, a1))) return 0; return -1; } double dis(point &a, point &b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } point tmp[1000]; bool ok(point a, point b) { point k; int i, d, e = 0; tmp[e++] = a, tmp[e++] = b; for (i = 0; i < N; ++i) { d = inter(a, b, p[i], p[i + 1], k); if (d == 1 && dcmp(dot(k, a, b)) <= 0) tmp[e++] = k; } sort(tmp, tmp + e); for (i = 1; i < e; ++i) if (inPoly(point((tmp[i - 1].x + tmp[i].x) / 2, (tmp[i - 1].y + tmp[i].y) / 2))) return 0; return 1; } double d[200][200]; double len[1000], per; void init() { per = 0; p[N] = p[0]; p[N + 1] = O; for (int i = 0; i < N; ++i) { len[i] = dis(p[i], p[i + 1]); per += len[i]; } for (int i = 1; i <= N + 1; ++i) { d[i][i] = 0; for (int j = i + 1; j <= N + 1; ++j) { if (ok(p[i], p[j])) d[i][j] = d[j][i] = dis(p[i], p[j]); else d[i][j] = d[j][i] = INF; } } } bool vis[200]; double h[200]; bool chk(double tim) { double S = fmod(tim * v1, per); point t; int i, j, k; for (i = 0; i < N; ++i) { if (len[i] < S) S -= len[i]; else { t = point(p[i + 1].x - p[i].x, p[i + 1].y - p[i].y).nor(); p[N + 2] = point(p[i].x + t.x * S, p[i].y + t.y * S); break; } } d[N + 2][N + 2] = 0; for (i = 1; i <= N + 1; ++i) { if (ok(p[i], p[N + 2])) d[i][N + 2] = d[N + 2][i] = dis(p[i], p[N + 2]); else d[i][N + 2] = d[N + 2][i] = INF; } if (d[N + 2][N + 1] > 1e28) { for (i = 1; i <= N + 2; ++i) { vis[i] = 0; h[i] = INF; } h[N + 2] = 0; while (1) { S = INF, j = -1; for (i = 1; i <= N + 2; ++i) if (!vis[i]) { if (h[i] < S) S = h[i], j = i; } if (j == N + 1) break; vis[j] = 1; for (i = 1; i <= N + 2; ++i) if (!vis[i]) h[i] = min(h[i], h[j] + d[j][i]); } } else h[N + 1] = d[N + 2][N + 1]; return h[N + 1] / v2 <= tim; } int main() { int cases = 1; int i, j, k; double ll, rr, mid, t; while (scanf("%d", &N), N) { for (i = 0; i < N; ++i) scanf("%lf %lf", &p[i].x, &p[i].y); scanf("%lf %lf", &O.x, &O.y); scanf("%lf %lf", &v1, &v2); init(); ll = 0, rr = 1e8; while (rr - ll > eps) { mid = (ll + rr) / 2; if (chk(mid)) rr = mid; else ll = mid; } chk(5); mid = (ll + rr) * 30; k = (int)(mid + 0.5 + eps); printf("Case %d: Time = %d:%02d\n", cases++, k / 60, k % 60); } return 0; }
d9843124d062178f7d7fa2714b979de56befebd4
9c046eeda11be532cc0017e6da316e7ddfd16283
/Telecomm/SharedLib/zbar/include/zbar/Scanner.h
ae367c6edc985586b32553f1eb567bbe1a7ffd30
[ "BSD-3-Clause" ]
permissive
telecommai/windows
83cd3ac4dec7742c6e038689689ac7ec9cde842a
30e34ffe0bc81f39c25be7624d16856bf42e03eb
refs/heads/master
2023-01-12T02:10:59.904541
2019-04-23T11:42:07
2019-04-23T11:42:07
180,726,308
3
0
BSD-3-Clause
2023-01-03T19:52:20
2019-04-11T06:12:20
C++
UTF-8
C++
false
false
4,359
h
Scanner.h
//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown <spadix@users.sourceforge.net> // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader is distributed in the hope that it will be // useful, but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_SCANNER_H_ #define _ZBAR_SCANNER_H_ /// @file /// Scanner C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Scanner.h" #endif #include <stdio.h> namespace zbar { /// low-level linear intensity sample stream scanner interface. /// identifies "bar" edges and measures width between them. /// optionally passes to bar width Decoder class Scanner { public: /// constructor. /// @param decoder reference to a Decoder instance which will /// be passed scan results automatically Scanner (Decoder& decoder) { _scanner = zbar_scanner_create(decoder._decoder); } /// constructor. /// @param decoder pointer to a Decoder instance which will /// be passed scan results automatically Scanner (Decoder* decoder = NULL) { zbar_decoder_t *zdcode = NULL; if(decoder) zdcode = decoder->_decoder; _scanner = zbar_scanner_create(zdcode); } ~Scanner () { zbar_scanner_destroy(_scanner); } /// clear all scanner state. /// see zbar_scanner_reset() void reset () { zbar_scanner_reset(_scanner); } /// mark start of a new scan pass. /// see zbar_scanner_new_scan() zbar_symbol_type_t new_scan () { _type = zbar_scanner_new_scan(_scanner); return(_type); } /// flush scanner pipeline. /// see zbar_scanner_flush() zbar_symbol_type_t flush () { _type = zbar_scanner_flush(_scanner); return(_type); } /// process next sample intensity value. /// see zbar_scan_y() zbar_symbol_type_t scan_y (int y) { _type = zbar_scan_y(_scanner, y); return(_type); } /// process next sample intensity value. /// see zbar_scan_y() Scanner& operator<< (int y) { _type = zbar_scan_y(_scanner, y); return(*this); } /// process next sample from RGB (or BGR) triple. /// see zbar_scan_rgb24() zbar_symbol_type_t scan_rgb24 (unsigned char *rgb) { _type = zbar_scan_rgb24(_scanner, rgb); return(_type); } /// process next sample from RGB (or BGR) triple. /// see zbar_scan_rgb24() Scanner& operator<< (unsigned char *rgb) { _type = zbar_scan_rgb24(_scanner, rgb); return(*this); } /// retrieve last scanned width. /// see zbar_scanner_get_width() unsigned get_width () const { return(zbar_scanner_get_width(_scanner)); } /// retrieve last scanned color. /// see zbar_scanner_get_color() zbar_color_t get_color () const { return(zbar_scanner_get_color(_scanner)); } /// retrieve last scan result. zbar_symbol_type_t get_type () const { return(_type); } /// cast to C scanner operator zbar_scanner_t* () const { return(_scanner); } /// retrieve C scanner const zbar_scanner_t *get_c_scanner () const { return(_scanner); } private: zbar_scanner_t *_scanner; zbar_symbol_type_t _type; }; } #endif
1786ff429d303552b305b66a122b6a67c60861b6
bdab9bf01d20b8bc14aab78a70ea3aa292f0e015
/src/core/primitive.h
9ceca6eae2e71d5d930c6b6745879d1aac0917ba
[]
no_license
OscarShen/eng
08b46ec725b4e2dce97fdb3eafe599e47cde92f0
be674cb0675c9467642bab2760b2d1973d6e8b19
refs/heads/master
2021-01-22T20:07:53.823631
2017-04-15T14:06:33
2017-04-15T14:06:33
85,281,640
1
0
null
null
null
null
GB18030
C++
false
false
5,327
h
primitive.h
/************************************************************************ * @description : * @author : $username$ * @creat : $time$ ************************************************************************ * Copyright @ OscarShen 2017. All rights reserved. ************************************************************************/ #pragma once #ifndef ENG_PRIMITIVE_H_ #define ENG_PRIMITIVE_H_ #include <eng.h> #include <common/meta.h> #include <core/intersection.h> #include <math/linalg.h> #include <util/print.h> namespace eng { // 光线 class Ray { public: Vector3f orig, dir; Ray(const Vector3f &orig, const Vector3f &dir) :orig(orig), dir(dir) {} Vector3f get_point(Float t) const { return orig + t * dir; } }; inline Ray operator*(const Matrix4f &transform, const Ray &ray) { return Ray(multiply_matrix4(transform, ray.orig, 1), multiply_matrix4(transform, ray.dir, 0)); } // 三维包围盒 template <typename T> class Bound3 { public: glm::tvec3<T, glm::highp> p_min, p_max; Bound3() : p_min(std::numeric_limits<T>::max()), p_max(std::numeric_limits<T>::lowest()) { } Bound3(const glm::tvec3<T, glm::highp> &p) : p_min(p), p_max(p) {} Bound3(const glm::tvec3<T, glm::highp> &p1, const glm::tvec3<T, glm::highp> &p2) : p_min(std::min(p1.x, p2.x), std::min(p1.y, p2.y), std::min(p1.z, p2.z)), p_max(std::max(p1.x, p2.x), std::max(p1.y, p2.y), std::max(p1.z, p2.z)) {} bool intersect(const Ray &ray, Float *hitt0 = nullptr, Float *hitt1 = nullptr); }; template<typename T> inline bool Bound3<T>::intersect(const Ray & ray, Float * hitt0, Float * hitt1) { Float t0 = 0, t1 = fInfinity; for (int i = 0; i < 3; ++i) { Float inv_ray_dir = 1 / ray.dir[i]; Float t_near = (p_min[i] - ray.orig[i]) * inv_ray_dir; Float t_far = (p_max[i] - ray.orig[i]) * inv_ray_dir; if (t_near > t_far) std::swap(t_near, t_far); t0 = t_near > t0 ? t_near : t0; t1 = t_far < t1 ? t_far : t1; if (t0 > t1) return false; } if (hitt0) *hitt0 = t0; if (hitt1) *hitt1 = t1; return true; } template<typename T> Bound3<T> Union(const Bound3<T>& b, const glm::tvec3<T, glm::highp>& p) { return Bound3<T>( glm::tvec3<T, glm::highp>(std::min(b.p_min.x, p.x), std::min(b.p_min.y, p.y), std::min(b.p_min.z, p.z)), glm::tvec3<T, glm::highp>(std::max(b.p_max.x, p.x), std::max(b.p_max.y, p.y), std::max(b.p_max.z, p.z))); } template<typename T> Bound3<T> Union(const Bound3<T>& b1, const Bound3<T>& b2) { return Bound3<T>(glm::tvec3<T, glm::highp>(std::min(b1.p_min.x, b2.p_min.x), std::min(b1.p_min.y, b2.p_min.y), std::min(b1.p_min.z, b2.p_min.z)), glm::tvec3<T, glm::highp>(std::max(b1.p_max.x, b2.p_max.x), std::max(b1.p_max.y, b2.p_max.y), std::max(b1.p_max.z, b2.p_max.z))); } typedef Bound3<Float> Bound3f; typedef Bound3<int> Bound3i; inline Bound3f operator*(const Matrix4f &transform, const Bound3f &bound) { Bound3f ret(multiply_matrix4(transform, Vector3f(bound.p_min.x, bound.p_min.y, bound.p_min.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_max.x, bound.p_min.y, bound.p_min.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_min.x, bound.p_max.y, bound.p_min.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_min.x, bound.p_min.y, bound.p_max.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_min.x, bound.p_max.y, bound.p_max.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_max.x, bound.p_max.y, bound.p_min.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_max.x, bound.p_min.y, bound.p_max.z), 1.0f)); ret = Union(ret, multiply_matrix4(transform, Vector3f(bound.p_max.x, bound.p_max.y, bound.p_max.z), 1.0f)); return ret; } // 几何形状 class Shape { public: Matrix4f local2world; Matrix4f world2local; Vector3f color; // 临时使用 public: Shape(const Matrix4f &local2world, const Matrix4f &world2local) : local2world(local2world), world2local(world2local) { color = Vector3f(rand(), rand(), rand()); // 临时使用 } virtual bool intersect(const Ray &ray, Float &t_hit, Intersection &iset) const = 0; virtual Bound3f get_bound() const = 0; }; class Sphere : public Shape { private: //Vector3f center; Float radius, radius_square;// 半径平方 public: Sphere(const Matrix4f &local2world, const Matrix4f &world2local, Float radius) : Shape(local2world, world2local), radius(radius), radius_square(radius * radius) {} virtual bool intersect(const Ray &ray, Float &t_hit, Intersection &iset) const override; virtual Bound3f get_bound() const override { return Bound3f(Vector3f(-radius), Vector3f(radius)); } }; class Disk : public Shape { private: Float radius; public: // 默认圆盘中心位于原点,法向量指向Z轴正方向 Disk(const Matrix4f &local2world, const Matrix4f &world2local, Float radius) : Shape(local2world, world2local), radius(radius) {} virtual bool intersect(const Ray &ray, Float &t_hit, Intersection &iset) const override; virtual Bound3f get_bound() const override { return Bound3f(Vector3f(-radius, -radius, -1e-6f), Vector3f(radius, radius, 1e-6f)); } }; } #endif // !ENG_PRIMITIVE_H_
3d01c62301221cf019a756cda1008fe074df71b2
35142ada4f02ef34ad47307d3b9770b7c97674b5
/src/engine/time.cpp
84bb8f04d3175db02cd88f9a2c6c1b5d2b9f36ee
[]
no_license
BK1603/Wolf-Gang-Engine
83e58ed1b79b6538dd3493fd7e7fb1ea1f8378e5
182c87dbefd3bfd1014f09dd151f4729b7045838
refs/heads/master
2020-03-08T16:28:17.659552
2018-03-29T03:40:20
2018-03-29T03:40:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,583
cpp
time.cpp
#include <engine/time.hpp> #include <cmath> using namespace engine; // Seconds float time_converter::seconds() const { return mSeconds; } // Microseconds float time_converter::milliseconds() const { return mSeconds * 1000; } float time_converter::nanoseconds() const { return mSeconds * 1000 * 1000; } time_converter::operator float() const { return mSeconds; } time_converter::time_converter(float pSeconds) { mSeconds = pSeconds; } clock::clock() { mPlay = true; mStart_point = std::chrono::high_resolution_clock::now(); } time_converter clock::get_elapse() const { std::chrono::time_point<std::chrono::high_resolution_clock> end_point = std::chrono::high_resolution_clock::now(); std::chrono::duration<float> elapsed_seconds = end_point - mStart_point; return elapsed_seconds.count(); } void clock::start() { if (!mPlay) mStart_point += std::chrono::high_resolution_clock::now() - mPause_point; mPlay = true; } void clock::pause() { mPlay = false; mPause_point = std::chrono::high_resolution_clock::now(); } time_converter clock::restart() { const time_converter elapse_time(get_elapse()); mStart_point = std::chrono::high_resolution_clock::now(); return elapse_time; } void timer::start() { mStart_point = std::chrono::high_resolution_clock::now(); } void timer::start(float pSeconds) { set_duration(pSeconds); start(); } void timer::set_duration(float pSeconds) { if (pSeconds <= 0) return; mSeconds = pSeconds; } bool timer::is_reached() const { std::chrono::duration<float> time = std::chrono::high_resolution_clock::now() - mStart_point; return time.count() >= mSeconds; } void counter_clock::start() { mStart_point = std::chrono::high_resolution_clock::now(); } void counter_clock::set_interval(float pInterval) { if (pInterval <= 0) throw "Bad time"; mInterval = pInterval; } size_t counter_clock::get_count() const { std::chrono::duration<float> time = std::chrono::high_resolution_clock::now() - mStart_point; return static_cast<size_t>(std::floor(time.count() / mInterval)); } frame_clock::frame_clock(float pInterval) { mFps = 0; mFrames = 0; mInterval = pInterval; } void frame_clock::set_interval(float pSeconds) { mInterval = pSeconds; } float frame_clock::get_delta() const { return mDelta; } float frame_clock::get_fps() const { return mFps; } void frame_clock::tick() { ++mFrames; auto time = mFps_clock.get_elapse().seconds(); if (time >= mInterval) { mFps = mFrames / time; mFrames = 0; mFps_clock.restart(); } mDelta = mDelta_clock.get_elapse().seconds(); mDelta_clock.restart(); }
d6c5480e1f4ac964515077fff40f858406856cb4
60dcc88ba9a108d7eda470653175ae23923fdeec
/Instruction.cpp
e59ad5a933bdfcff4cad690d96ccdc64ad880670
[]
no_license
lcc-816/asm-816
46e3754ba47aaefd96676b9a0336aaab2a8149fe
19c49eaf14bdcdd5642fa51fecfc440d165f50ff
refs/heads/master
2021-09-10T17:28:11.449360
2018-03-30T01:50:36
2018-03-30T01:50:36
107,269,332
2
0
null
null
null
null
UTF-8
C++
false
false
21,434
cpp
Instruction.cpp
// // Mnemonic.cpp // 65calc02 // // Created by Kelvin Sherlock on 9/5/2011. // Copyright 2011 Kelvin W Sherlock LLC. All rights reserved. // #include "Instruction.h" #ifdef __OBJC__ #include <Foundation/NSString.h> #endif #include <utility> #include <tuple> #include <unordered_map> typedef std::tuple<Machine, Mnemonic, AddressMode> MMA; typedef std::pair<Machine, Mnemonic> MachineMnemonic; namespace std { template<> struct hash<MachineMnemonic> : public unary_function<MachineMnemonic, size_t> { size_t operator()(MachineMnemonic mm) const { return mm.first | mm.second << 8; } }; template<> struct hash<MMA> : public unary_function<MMA, size_t> { size_t operator()(MMA mma) const { return get<0>(mma) | get<1>(mma) << 8 | get<2>(mma) << 16; } }; }; #include "gen-i-table.h" #pragma mark - // JSR long -> JSL // JMP long -> JMP // BRK #imm -> BRK xx // PEA #imm -> PEA abs // JMP (zp) -> JMP (abs) // etc. // need extra flag so, eg "brk <12" is an error (explicit address mode) // but "brk 12" is not bool Instruction::coerce(Instruction &instruction, AddressMode &addressMode, bool explicitAddress) { Mnemonic mnemonic = instruction.mnemonic(); Machine machine = instruction.machine(); if (instruction.hasAddressMode(addressMode)) return true; // handle relative here as it is somewhat common. if (instruction.isRelative()) { if (addressMode == zp || addressMode == absolute || addressMode == absolute_long) { if (explicitAddress) return false; addressMode = instruction.hasAddressMode(relative_long) ? relative_long : relative; return true; } } if (machine == m65816 || machine == m65802) { // stuff that changes the instruction. if (mnemonic == JSR) { if (addressMode == absolute_long) { instruction = Instruction(machine, JSL); return true; } } else if (mnemonic == JMP) { if (addressMode == absolute_long) { instruction = Instruction(machine, JML); return true; } else if (addressMode == absolute_indirect_long) { instruction = Instruction(machine, JML); return true; } else if (addressMode == zp_indirect_long) { if (explicitAddress) return false; addressMode = absolute_indirect_long; instruction = Instruction(machine, JML); return true; } } else if (mnemonic == PEA) { if (addressMode == immediate) { addressMode = absolute; return true; } } else if (mnemonic == PEI) { // zp_indirect is actually the /correct/ form. if (addressMode == zp) { addressMode = zp_indirect; return true; } if (!explicitAddress) { if (addressMode == absolute || addressMode == absolute_long) { addressMode = zp_indirect; return true; } } } } // block / zp,relative ? // brk #ff allowed even if explicit address... if (addressMode == immediate && instruction.hasAddressMode(interrupt)) { addressMode = interrupt; return true; } if (explicitAddress) return false; // upgrade/downgrade the address mode. switch (addressMode) { default: return false; case zp_indirect_long: // jml [abs]? if (instruction.hasAddressMode(absolute_indirect_long)) { addressMode = absolute_indirect_long; return true; } break; case zp_indirect: // jsr (abs)? if (instruction.hasAddressMode(absolute_indirect)) { addressMode = absolute_indirect; return true; } break; case zp_indirect_x: // jsr (abs,x)? if (instruction.hasAddressMode(absolute_indirect_x)) { addressMode = absolute_indirect_x; return true; } break; case zp: // break zp? if (instruction.hasAddressMode(interrupt)) { addressMode = interrupt; return true; } // hmm, any xxx zp -> xxx abs? if (instruction.hasAddressMode(absolute)) { addressMode = absolute; return true; } if (instruction.hasAddressMode(absolute_long)) { addressMode = absolute_long; return true; } break; case immediate: // break #immediate if (instruction.hasAddressMode(interrupt)) { addressMode = interrupt; return true; } break; case absolute: // JML, JSL if (instruction.hasAddressMode(absolute_long)) { addressMode = absolute_long; return true; } break; case absolute_long: if (instruction.hasAddressMode(absolute)) { addressMode = absolute; return true; } if (instruction.hasAddressMode(zp)) { addressMode = zp; } break; case absolute_long_x: // abslong,x -> abs,x -> zp,x if (instruction.hasAddressMode(absolute_x)) { addressMode = absolute_x; return true; } if (instruction.hasAddressMode(zp_x)) { addressMode = zp_x; } break; case absolute_indirect: // (abs) -> (zp) if (instruction.hasAddressMode(zp_indirect)) { addressMode = zp_indirect; return true; } break; case absolute_indirect_x: // (abs,x) -> (zp,x) if (instruction.hasAddressMode(zp_indirect_x)) { addressMode = zp_indirect_x; return true; } break; case absolute_indirect_long: // [abs] -> [zp] if (instruction.hasAddressMode(zp_indirect_long)) { addressMode = zp_indirect_long; return true; } break; } return false; } const_vector<Instruction> Instruction::Instructions(Machine machine) { #undef xxx #define xxx(table) { return const_vector<Instruction>(table, sizeof(table) / sizeof(table[0])); } switch (machine) { case kUndefinedMachine: return const_vector<Instruction>(); break; case m6502: xxx(m6502_instructions); break; case m65c02: xxx(m65c02_instructions); break; case mw65c02: xxx(mw65c02_instructions); break; case mr65c02: xxx(mr65c02_instructions); break; case m65802: case m65816: case m65816_e: xxx(m65816_instructions); break; case m65ce02: xxx(m65ce02_instructions); break; } #undef xxx } /* * Return the number of bytes for this instruction with specified address mode and m/x bits. * */ unsigned Instruction::bytes(AddressMode addressMode, bool longM, bool longXY) const { if (addressMode == immediate) { switch (_mnemonic) { case LDX: case LDY: case CPX: case CPY: return longXY ? 3 : 2; case ADC: case AND: case BIT: case CMP: case EOR: case LDA: case ORA: case SBC: return longM ? 3 : 2; default: break; } } switch (addressMode) { case implied: return 1; case immediate: return 2; // should be caught above. case zp: case zp_x: case zp_y: case zp_indirect: case zp_indirect_x: case zp_indirect_y: case zp_indirect_z: case zp_indirect_long: case zp_indirect_long_y: case stack_relative: case stack_relative_y: return 2; case zp_relative: // bbr0 zp,offset return 3; case absolute: case absolute_x: case absolute_y: case absolute_indirect: case absolute_indirect_x: return 3; case relative: return 2; case relative_long: return 3; case interrupt: // brk, cop, wdm return 2; case absolute_long: case absolute_long_x: return 4; case absolute_indirect_long: // jml [abs] return 3; case block: // mvn, srcb, destb return 3; case kUndefinedAddressMode: return 0; } } #ifdef __OBJC__ NSString *Instruction::formatOperand(uint32_t operand, AddressMode addressMode, uint16_t address, bool longM, bool longX) { unsigned b; b = bytes(addressMode, longM, longX) - 1; if (addressMode == immediate && _machine == m65816) { if (b == 4) return [NSString stringWithFormat: @"#%04X", operand]; } switch (addressMode) { case kUndefinedAddressMode: return nil; case implied: return @""; case immediate: return [NSString stringWithFormat: @"#%02X", operand]; case interrupt: case zp: return [NSString stringWithFormat: @"%02X", operand]; case zp_x: return [NSString stringWithFormat: @"%02X,X", operand]; case zp_y: return [NSString stringWithFormat: @"%02X,Y", operand]; case zp_indirect: return [NSString stringWithFormat: @"(%02X)", operand]; case zp_indirect_x: return [NSString stringWithFormat: @"(%02X,X)", operand]; case zp_indirect_y: return [NSString stringWithFormat: @"(%02X),Y", operand]; case zp_indirect_long: return [NSString stringWithFormat: @"[%02X]", operand]; case zp_indirect_long_y: return [NSString stringWithFormat: @"[%02X],Y", operand]; case absolute: return [NSString stringWithFormat: @"%04X", operand]; case absolute_x: return [NSString stringWithFormat: @"%04X,X", operand]; case absolute_y: return [NSString stringWithFormat: @"%04X,Y", operand]; case absolute_indirect: return [NSString stringWithFormat: @"(%04X)", operand]; case absolute_indirect_x: return [NSString stringWithFormat: @"(%04X,X)", operand]; case absolute_long: return [NSString stringWithFormat: @"%06X", operand]; case absolute_long_x: return [NSString stringWithFormat: @"%06X,X", operand]; case absolute_indirect_long: return [NSString stringWithFormat: @"[%04X]", operand]; case block: return [NSString stringWithFormat: @"%02X,%02X", operand >> 8, operand & 0xff]; case stack_relative: return [NSString stringWithFormat: @"%02X,S", operand]; case stack_relative_y: return [NSString stringWithFormat: @"(%02X,S),Y", operand]; case relative_long: if (true) { uint16_t tmp; bool n; operand &= 0xffff; n = operand & 0x8000; tmp = address + 3 + operand; if (n) return [NSString stringWithFormat: @"%04X (*-%04X)", tmp, 0x1000 - operand]; else return [NSString stringWithFormat: @"%04X (*+%04X)", tmp, operand]; } case relative: if (true) { uint16_t tmp; bool n; operand &= 0xff; n = operand & 0x80; tmp = address + 2 + (operand & 0xff); if (n) { tmp += 0xff00; return [NSString stringWithFormat: @"%04X (*-%02X)", tmp, 0x100 - operand]; } else return [NSString stringWithFormat: @"%04X (*+%02X)", tmp, operand]; } case zp_relative: if (true) { uint16_t tmp; bool n; unsigned zp; zp = operand >> 8; operand &= 0xff; n = operand & 0x80; tmp = address + 2 + (operand & 0xff); if (n) { tmp += 0xff00; return [NSString stringWithFormat: @"%02X,%04X (*-%02X)", zp, tmp, 0x100 - operand]; } else return [NSString stringWithFormat: @"%02X,%04X (*+%02X)", zp, tmp, operand]; } } return nil; } #endif static uint_least32_t NameToInt(const char *cp) { uint_least32_t rv = 0; if (cp) { // todo -- allow RMB.0 format... char c; int i = 0; while ((c = *cp++)) { if (i == 4) return 0; if (c >= '0' && c <= '9') { rv = (rv << 8) | c; ++i; continue; } if (c >= 'a' && c <= 'z') { c = c - 'a' + 'A'; rv = (rv << 8) | c; ++i; continue; } if (c >= 'A' && c <= 'Z') { rv = (rv << 8) | c; ++i; continue; } if (c == '.' && i == 3) { // RMB.0 is allowed. switch (rv) { case 'R' << 16 | 'M' << 8 | 'B': case 'S' << 16 | 'M' << 8 | 'B': case 'B' << 16 | 'B' << 8 | 'R': case 'B' << 16 | 'B' << 8 | 'S': continue; default: break; } } return 0; } } return rv; } typedef std::pair<Machine, uint_least32_t> MachineName; namespace std { template<> struct hash<MachineName> : public unary_function<MachineName, size_t> { size_t operator()(MachineName mn) const { hash<uint_least32_t> hasher; return hasher(mn.first) + hasher(mn.second); } }; } Instruction::Instruction(Machine machine, const char *mnemonic) : Instruction() { //returns empty if unable to match mnemonic. // since all mnemonics are 3 (or 4, RMBx, et alia) characters, // they can be converted to a 24 or 32-bit integer. So there. // Even better, the alphabet is 36 characters, so they can be stored in 5 * 4 = 20 bits. // typedef std::unordered_map<MachineName, Instruction> MachineNameInstructionHash; static MachineNameInstructionHash hash; if (machine == m65802) machine = m65816; if (hash.empty()) { static Machine machine_array[] = { m6502, m65c02, mw65c02, mr65c02, m65816 }; uint_least32_t i; const_vector<Machine> machines(machine_array, sizeof(machine_array) / sizeof(machine_array[0])); const_vector<Machine>::iterator m_iter; for (m_iter = machines.begin(); m_iter != machines.end(); ++m_iter) { const_vector<Instruction> instructions; const_vector<Instruction>::iterator i_iter; instructions = Instructions(*m_iter); for (i_iter = instructions.begin(); i_iter != instructions.end(); ++i_iter) { i = NameToInt(i_iter->toString()); hash[MachineName(*m_iter, i)] = *i_iter; } } // aliases.. // INA/DEA are aliases for INC a/DEC a // (not available for the 6502) i = NameToInt("INA"); for (m_iter = machines.begin() + 1; m_iter != machines.end(); ++m_iter) { hash[MachineName(*m_iter, i)] = Instruction(*m_iter, INC, 1 << implied); } i = NameToInt("DEA"); for (m_iter = machines.begin() + 1; m_iter != machines.end(); ++m_iter) { hash[MachineName(*m_iter, i)] = Instruction(*m_iter, DEC, 1 << implied); } // BLT = BCC // BGE = BCS i = NameToInt("BLT"); for (m_iter = machines.begin(); m_iter != machines.end(); ++m_iter) { hash[MachineName(*m_iter, i)] = Instruction(*m_iter, BCC, 1 << relative); } i = NameToInt("BGE"); for (m_iter = machines.begin(); m_iter != machines.end(); ++m_iter) { hash[MachineName(*m_iter, i)] = Instruction(*m_iter, BCS, 1 << relative); } // 65816 -- // TAD -> TCD // TAS -> TCS // TDA -> TDC // TSA -> TSC // SWA -> XBA hash[MachineName(m65816, NameToInt("TAD"))] = Instruction(m65816, TCD, 1 << implied); hash[MachineName(m65816, NameToInt("TCS"))] = Instruction(m65816, TCS, 1 << implied); hash[MachineName(m65816, NameToInt("TDA"))] = Instruction(m65816, TDC, 1 << implied); hash[MachineName(m65816, NameToInt("TSA"))] = Instruction(m65816, TSC, 1 << implied); hash[MachineName(m65816, NameToInt("SWA"))] = Instruction(m65816, XBA, 1 << implied); } MachineNameInstructionHash::iterator iter; MachineName mn(machine, NameToInt(mnemonic)); iter = hash.find(mn); if (iter == hash.end()) return; *this = iter->second; } Instruction::Instruction(Machine machine, Mnemonic mnemonic) : Instruction() { typedef std::unordered_map<MachineMnemonic, uint_least32_t> MachineMnemonicModesHash; static MachineMnemonicModesHash hash; if (hash.empty()) { static Machine machine_array[] = { m6502, m65c02, mw65c02, mr65c02, m65816 }; const_vector<Machine> machines(machine_array, sizeof(machine_array) / sizeof(machine_array[0])); const_vector<Machine>::iterator m_iter; for (m_iter = machines.begin(); m_iter != machines.end(); ++m_iter) { const_vector<Instruction> instructions; const_vector<Instruction>::iterator i_iter; instructions = Instructions(*m_iter); for (i_iter = instructions.begin(); i_iter != instructions.end(); ++i_iter) { hash[MachineMnemonic(*m_iter, i_iter->mnemonic())] = i_iter->addressModes(); } } } MachineMnemonicModesHash::iterator iter; MachineMnemonic key(machine, mnemonic); iter = hash.find(key); if (iter == hash.end()) return; _machine = machine; _mnemonic = mnemonic; _addressModes = iter->second; }
39bfceb6d57fa4a4d18b1668373fb61aecf46b18
16e1d89e56e908848564cab9cb44440591d4e12d
/cpp/d01/ex06/HumanB.hpp
5e2f03686472d6074d22eaab456bfc0cd22b5f39
[]
no_license
uael/42piscine
e54220ff7893f3fe29c8eb3609fdea100ec37440
fe87e0845d2c31857a4e12bd0275243f50611daa
refs/heads/master
2021-09-24T17:37:21.888927
2018-10-12T15:23:27
2018-10-12T15:23:27
98,616,747
21
19
null
null
null
null
UTF-8
C++
false
false
319
hpp
HumanB.hpp
#ifndef PROJECT_HUMANB_HPP #define PROJECT_HUMANB_HPP #include <string> #include "Weapon.hpp" namespace zob { class HumanB { private: std::string name; zob::Weapon *weapon; public: HumanB(const std::string &name); void setWeapon(Weapon &weapon); void attack() const; }; } #endif //PROJECT_HUMANB_HPP
018598cec3e8b59c0fea9cc7eb89ba99639fddb1
0c0088fdb45a5069e1304de9a85162ea713a4558
/DecomposeForPacking/DecomposeForPacking/Part.cpp
6f200df58887189fcd2d603a2c3246feb16d61c5
[]
no_license
orperel/DecomposeForPacking
cda2ae35efd9b2ade24ec87d7005a7d6caea802d
7d92e97942835288bf4c00f7adf957a383f99e68
refs/heads/master
2021-05-08T16:48:27.561656
2015-03-25T23:58:43
2015-03-25T23:58:43
120,173,070
1
0
null
2018-02-04T09:57:56
2018-02-04T09:57:55
null
UTF-8
C++
false
false
2,753
cpp
Part.cpp
#include "Part.h" #include <set> // Static variable initialization unique_ptr<PrimeNumbersGenerator> Part::idAllocator = NULL; Part::Part(PartOrientationPtr partOrient, bool is3D /*= false*/) { // If the id allocator is accessed for the first time, create it here. // The reason this initialization is done here and not at the static variable initialization line // is the generator creation involves accessing external files, and doing that during the static // initializtion stage (happens before the main() runs) causes uninitialized variables bugs. if (idAllocator == NULL) { idAllocator = PrimeNumbersModule::createGenerator(); } // Assign the next available id (the next prime number the generator creates). // The ids are assigned as prime numbers to make the hash function of solutions made of // combinations of multiple parts more efficient. m_partId = idAllocator->nextPrime(); m_partOrientations = PartOrientationListPtr(new PartOrientationList()); partOrient->setPartId(m_partId); m_partOrientations->push_back(partOrient); extendPartOrientations(is3D); } Part::~Part() { } PartOrientationListPtr Part::getPartOrientations() { return m_partOrientations; } PartOrientationPtr Part::getPartOrientationByIndex(int index) { return m_partOrientations->at(index); } void Part::extendPartOrientations(bool is3D /*= false*/) { // XY rotations PartOrientationPtr partOrient = getPartOrientationByIndex(0); PartOrientationPtr rotation1 = partOrient->XYRotate(); PartOrientationPtr rotation2 = rotation1->XYRotate(); PartOrientationPtr rotation3 = rotation2->XYRotate(); addUniquePartOrientation(rotation1); addUniquePartOrientation(rotation2); addUniquePartOrientation(rotation3); if (is3D) { // Mirror Y Axis to Z Axis and do XZ rotations PartOrientationPtr mirrored = partOrient->YZMirror(); rotation1 = mirrored->ZXRotate(); rotation2 = rotation1->ZXRotate(); rotation3 = rotation2->ZXRotate(); addUniquePartOrientation(mirrored); addUniquePartOrientation(rotation1); addUniquePartOrientation(rotation2); addUniquePartOrientation(rotation3); // Mirror X Axis to Z Axis and do YZ rotations mirrored = partOrient->XZMirror(); rotation1 = mirrored->ZYRotate(); rotation2 = rotation1->ZYRotate(); rotation3 = rotation2->ZYRotate(); addUniquePartOrientation(mirrored); addUniquePartOrientation(rotation1); addUniquePartOrientation(rotation2); addUniquePartOrientation(rotation3); } } void Part::addUniquePartOrientation(PartOrientationPtr partOrient) { for each(const PartOrientationPtr partOrientItem in *m_partOrientations) { if (!(*partOrient != *partOrientItem)) { return; } } partOrient->setPartId(m_partId); m_partOrientations->push_back(partOrient); }
d51fa27fb968277904528ce029e581677ac1cde4
8bff1bafa73b909c4019b7a1dfe7b795e071687f
/DFAFramework.h
8d988248172d3ef3376e96d01c16d0c65a616de2
[]
no_license
kaivanwadia/DCEandLICM-Pass
4da92989ffecc390b912a369b45721f8b98021fe
128ba3e503b83d55656b8790d0cac0145d82e5df
refs/heads/master
2020-12-25T13:33:39.890797
2015-09-18T21:56:39
2015-09-18T21:56:39
33,053,794
0
0
null
null
null
null
UTF-8
C++
false
false
6,219
h
DFAFramework.h
#ifndef CS380C_ASSIGNMENT4_DFAFRAMEWORK_H #define CS380C_ASSIGNMENT4_DFAFRAMEWORK_H #include <llvm/Support/Debug.h> #include <unordered_set> #include <unordered_map> #include "Meet.h" #include "Transfer.h" #include "Worklist.h" #include "Hasher.h" #include "Equal.h" #include <llvm/Analysis/LoopInfo.h> #include <llvm/IR/BasicBlock.h> #include <llvm/IR/Function.h> #include <llvm/IR/CFG.h> #include <llvm/Analysis/LoopPass.h> #include <queue> #include <stack> namespace cs380c { // T is the type on which the analysis is being done. For example it can be done on Instructions, // Expressions, Definitions etc // , typename HasherType, typename EqualType template <typename T, typename HasherType = std::hash<T>, typename EqualType = std::equal_to<T> > class DFAFramework { private: bool topDown; using TypeSet = std::unordered_set<T, HasherType, EqualType>; using DFAMap = std::unordered_map<const llvm::BasicBlock*, TypeSet>; using OrderMap = std::unordered_map<llvm::BasicBlock*, int>; DFAMap inMap, outMap; Meet<T, HasherType, EqualType>* meet; Transfer<T, HasherType, EqualType>* transfer; TypeSet initialSet; OrderMap postOrderMap; public: DFAFramework() {} DFAFramework(bool _topDown, Meet<T, HasherType, EqualType>* _meet, Transfer<T, HasherType, EqualType>* _transfer) { topDown = _topDown; inMap = DFAMap(); outMap = DFAMap(); meet = _meet; transfer = _transfer; initialSet = TypeSet(); postOrderMap = std::unordered_map<llvm::BasicBlock*, int>(); } void computePostOrder(llvm::Function& f) { OrderMap statusMap; for (auto& bb : f) { statusMap[&bb] = 0; } int orderNo = 0; std::stack<llvm::BasicBlock*> bbStack; bbStack.push(&f.getEntryBlock()); statusMap[&f.getEntryBlock()] = 1; while(!bbStack.empty()) { llvm::BasicBlock* currBB = bbStack.top(); bool pushed = false; for (auto itr = succ_begin(currBB); itr != succ_end(currBB); ++itr) { if (statusMap[*itr] == 0) { pushed = true; statusMap[*itr] = 1; bbStack.push(*itr); } } if (!pushed) { bbStack.pop(); statusMap[currBB] = 2; postOrderMap[currBB] = orderNo; orderNo++; } } } void doDFA(llvm::Function& f) { DEBUG (printf("In doDFA on Function\n") ); computePostOrder(f); WorkList<llvm::BasicBlock*> workList = WorkList<llvm::BasicBlock*>(postOrderMap.size(), topDown); llvm::BasicBlock* bb; // Setting up initial basic block if (topDown) { bb = &(f.front()); this->inMap.insert(std::make_pair(bb, this->initialSet)); } else { bb = &(f.back()); this->outMap.insert(std::make_pair(bb, this->initialSet)); } workList.enqueue(bb, postOrderMap[bb]); bool first = true; // Start iterating over the worklist till empty while (!workList.empty()) { auto currBB = workList.dequeue(); DEBUG (errs() << "=======================================\n" ); DEBUG (errs() << "Analyzing BB : " << currBB->getName() << "\n" ); DEBUG (printSet(inMap[currBB], "In")); DEBUG (printSet(outMap[currBB], "Out")); bool meetChangedValue = this->meet->doMeet(currBB, this->inMap, this->outMap); DEBUG (printSet(outMap[currBB], "New Out")); if (!meetChangedValue && !first) { continue; } first = false; bool transferChangedValue = this->transfer->doTransfer(currBB, this->inMap, this->outMap); DEBUG( printSet(inMap[currBB], "New In") ); this->addToWorklist(currBB, workList); } } void doDFA(llvm::Loop* loop, llvm::LPPassManager& lpm) { llvm::Function* f = (loop->getLoopPreheader()->getParent()); DEBUG (printf("In doDFA for Loop\n") ); DEBUG (errs() << "inMap Size : " << inMap.size() << "\n"); DEBUG (errs() << "outMap Size : " << outMap.size() << "\n"); DEBUG (errs() << "Function name : " << f->getName() << "\n"); DEBUG (loop->print(errs())); DEBUG (errs() << "\n"); DEBUG (errs() << "Preheader : " << loop->getLoopPreheader()->getName() << "\n"); computePostOrder(*f); WorkList<llvm::BasicBlock*> workList = WorkList<llvm::BasicBlock*>(postOrderMap.size(), topDown); llvm::BasicBlock* bb; // Setting up initial basic block bb = *(loop->block_begin()); this->inMap.insert(std::make_pair(bb, this->initialSet)); workList.enqueue(bb, postOrderMap[bb]); bool first = true; // Start iterating over the worklist till empty while (!workList.empty()) { auto currBB = workList.dequeue(); DEBUG (errs() << "=======================================\n"); DEBUG (errs() << "Analyzing BB : " << currBB->getName() << "\n"); if (!loop->contains(currBB)) { DEBUG (errs() << "Not Contained in Loop\n"); continue; } // DEBUG (printSet(inMap[currBB], "In")); // DEBUG (printSet(outMap[currBB], "Out")); bool meetChangedValue = this->meet->doMeet(currBB, this->inMap, this->outMap); // DEBUG (errs() << "Meet Changed : " << meetChangedValue << "\n"); // DEBUG (printSet(inMap[currBB], "New In")); if (!meetChangedValue && !first) { continue; } first = false; bool transferChangedValue = this->transfer->doTransfer(currBB, this->inMap, this->outMap); DEBUG (printSet(outMap[currBB], "New Out")); this->addToWorklist(currBB, workList); } } void setTransferHelpers(Loop* _loop) { this->transfer->loop = _loop; } static void printSet(TypeSet& set, std::string str) { errs() << str << " : {"; for (auto& inVar : set) { errs() << " " << inVar; } errs() << " }\n"; } template <typename WorkListType> void addToWorklist(llvm::BasicBlock* currBB, WorkListType& workList) { if (this->topDown) { for (auto itr = succ_begin(currBB); itr != succ_end(currBB); ++itr) { bool pushed = workList.enqueue(*itr, postOrderMap[*itr]); } } else { for (auto itr = pred_begin(currBB); itr != pred_end(currBB); ++itr) { workList.enqueue(*itr, postOrderMap[*itr]); } } return; } void setInitialValues(TypeSet _initialSet) { initialSet = _initialSet; } const TypeSet& getInValues(const llvm::BasicBlock* bb) const { return inMap.at(bb); } const TypeSet& getOutValues(const llvm::BasicBlock* bb) const { return outMap.at(bb); } const OrderMap* getPostOrderMap() const { return &postOrderMap; } }; } #endif