hexsha
stringlengths 40
40
| size
int64 7
1.05M
| ext
stringclasses 13
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 4
269
| max_stars_repo_name
stringlengths 5
109
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
9
| max_stars_count
int64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 4
269
| max_issues_repo_name
stringlengths 5
116
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
9
| max_issues_count
int64 1
48.5k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 4
269
| max_forks_repo_name
stringlengths 5
116
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
9
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 7
1.05M
| avg_line_length
float64 1.21
330k
| max_line_length
int64 6
990k
| alphanum_fraction
float64 0.01
0.99
| author_id
stringlengths 2
40
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d9a3bf76307b2b683cd7bfa51518af752ce649d
| 3,354
|
cpp
|
C++
|
components/button/xitembutton.cpp
|
pavelvasev/Xclu
|
6cdbb7040c057b3c1107f7a039acf0a72046ed83
|
[
"MIT"
] | null | null | null |
components/button/xitembutton.cpp
|
pavelvasev/Xclu
|
6cdbb7040c057b3c1107f7a039acf0a72046ed83
|
[
"MIT"
] | null | null | null |
components/button/xitembutton.cpp
|
pavelvasev/Xclu
|
6cdbb7040c057b3c1107f7a039acf0a72046ed83
|
[
"MIT"
] | null | null | null |
#include "xitembutton.h"
#include "xguibutton.h"
#include "incl_cpp.h"
#include "moduleinterface.h"
#include "registrarxitem.h"
#include "module.h"
REGISTER_XITEM(XItemButton, button)
//---------------------------------------------------------------------
//in button Execute execute
XItemButton::XItemButton(ModuleInterface *interf, const XItemPreDescription &pre_description)
: XItem_<int>(interf, pre_description)
{
//Button не может быть out
xc_assert(pre_description.qualifier != XQualifierOut, "button can't have 'out' qualifier, '" + pre_description.title + "'");
//page Main_page
name_ = pre_description.line_to_parse;
//reset value, in opposite case can be "random" value
reset_value();
}
//---------------------------------------------------------------------
//графический интерфейс
XGui *XItemButton::create_gui(XGuiPageBuilder &page_builder) {
gui__ = new XGuiButton(page_builder, this);
return gui__;
}
//---------------------------------------------------------------------
//вызывается из gui при нажатии кнопки
void XItemButton::callback_button_pressed() {
//Проверка, что parent не нулевой - возможно, в конструкторе это не очень хорошо, но все же лучше проверить:)
xc_assert(interf(),
"Internal error in XItemButton::callback_button_pressed, empty 'interf()' at '" + name() + "'");
//hit_value() will be called from there
interf()->callback_button_pressed(name());
}
//---------------------------------------------------------------------
//значение - нажатие считывается один раз, затем стирается
int XItemButton::value_int() {
int res = value_read().data();
reset_value();
return res;
}
//---------------------------------------------------------------------
//Function for setting value using link
void XItemButton::set_value_from_link(XLinkResolved *linkres) {
xc_assert(linkres, "set_value_from_link for `" + name() + "` - linkres is nullptr");
Module *mod = linkres->module_ptr();
set_value_int(mod->geti(linkres));
}
//---------------------------------------------------------------------
void XItemButton::hit_value() { //set that button was pressed
if (value_read().data() == 0) {
value_write().data() = 1;
}
}
//---------------------------------------------------------------------
void XItemButton::reset_value() { //reset that button was pressed
if (value_read().data() != 0) {
value_write().data() = 0;
}
}
//---------------------------------------------------------------------
//получение значения из gui
void XItemButton::gui_to_var_internal() {
if (((XGuiButton *)gui__)->value()) {
hit_value();
}
}
//---------------------------------------------------------------------
//установка значения в gui
void XItemButton::var_to_gui_internal() {
//gui_->set_value(value());
}
//---------------------------------------------------------------------
//C++
void XItemButton::export_interface(QStringList &file) {
export_interface_template(file, false, true, "Button ", true,
"int ", "i", "geti", "seti", false, false, false);
//export button name
file.append(QString("QString button_%1() { return \"%1\"; }").arg(name()));
file.append("");
}
//---------------------------------------------------------------------
| 33.207921
| 128
| 0.514311
|
pavelvasev
|
1d9b2651d10954b39298ed68ee204fdbfeef52cd
| 283
|
hpp
|
C++
|
include/GraFX/api/basic_observers/basic/AutosubscribableObserver.hpp
|
VladimirSuvorov1996/GraFX
|
60f543c5283976a624f8dd460dbf515f2d06df5e
|
[
"MIT"
] | null | null | null |
include/GraFX/api/basic_observers/basic/AutosubscribableObserver.hpp
|
VladimirSuvorov1996/GraFX
|
60f543c5283976a624f8dd460dbf515f2d06df5e
|
[
"MIT"
] | null | null | null |
include/GraFX/api/basic_observers/basic/AutosubscribableObserver.hpp
|
VladimirSuvorov1996/GraFX
|
60f543c5283976a624f8dd460dbf515f2d06df5e
|
[
"MIT"
] | null | null | null |
#pragma once
#include "EventObserver.hpp"
namespace graFX::input {
template<typename R, typename...As>
class AutosubscribableObserver :
public EventObserver<R, As...>{
public:
AutosubscribableObserver() {
EventObserver<R, As...>::base_t::enabled(true);
}
};
}
| 23.583333
| 51
| 0.681979
|
VladimirSuvorov1996
|
1d9ce0d0d99350c923c6778271c5a0622021d9bb
| 316
|
cpp
|
C++
|
Camp_1-2562/Proble 60/35_MaxSub.cpp
|
MasterIceZ/POSN_BUU
|
56e176fb843d7ddcee0cf4acf2bb141576c260cf
|
[
"MIT"
] | null | null | null |
Camp_1-2562/Proble 60/35_MaxSub.cpp
|
MasterIceZ/POSN_BUU
|
56e176fb843d7ddcee0cf4acf2bb141576c260cf
|
[
"MIT"
] | null | null | null |
Camp_1-2562/Proble 60/35_MaxSub.cpp
|
MasterIceZ/POSN_BUU
|
56e176fb843d7ddcee0cf4acf2bb141576c260cf
|
[
"MIT"
] | null | null | null |
#include<bits/stdc++.h>
using namespace std;
int main () {
int n,i,st=1,ansst=1,ansen,Max = -1e9,num,sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&num);
sum+=num;
if(sum> Max)
Max = sum,ansst = st,ansen=i;
if(sum<0)
sum = 0,st = i+1;
}
printf("%d %d\n%d\n",ansst,ansen,Max);
return 0;
}
| 17.555556
| 49
| 0.550633
|
MasterIceZ
|
1d9ffce04a5c8cd36a1db332d58abdbc415a35c2
| 3,340
|
hpp
|
C++
|
src/base/parameter/RealVar.hpp
|
saichikine/GMAT
|
80bde040e12946a61dae90d9fc3538f16df34190
|
[
"Apache-2.0"
] | null | null | null |
src/base/parameter/RealVar.hpp
|
saichikine/GMAT
|
80bde040e12946a61dae90d9fc3538f16df34190
|
[
"Apache-2.0"
] | null | null | null |
src/base/parameter/RealVar.hpp
|
saichikine/GMAT
|
80bde040e12946a61dae90d9fc3538f16df34190
|
[
"Apache-2.0"
] | 1
|
2021-12-05T05:40:15.000Z
|
2021-12-05T05:40:15.000Z
|
//$Id$
//------------------------------------------------------------------------------
// RealVar
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool
//
// Copyright (c) 2002 - 2018 United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration.
// All Other 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.
//
// Developed jointly by NASA/GSFC and Thinking Systems, Inc. under contract
// number S-67573-G
//
// Author: Linda Jun
// Created: 2004/01/08
//
/**
* Declares base class of parameters returning Real.
*/
//------------------------------------------------------------------------------
#ifndef RealVar_hpp
#define RealVar_hpp
#include "gmatdefs.hpp"
#include "Parameter.hpp"
class GMAT_API RealVar : public Parameter
{
public:
RealVar(const std::string &name = "", const std::string &valStr = "",
const std::string &typeStr = "RealVar",
GmatParam::ParameterKey key = GmatParam::USER_PARAM,
GmatBase *obj = NULL, const std::string &desc = "",
const std::string &unit = "",
GmatParam::DepObject depObj = GmatParam::NO_DEP,
UnsignedInt ownerType = Gmat::UNKNOWN_OBJECT,
bool isTimeParam = false, bool isSettable = false,
bool isPlottable = true, bool isReportable = true,
UnsignedInt ownedObjType = Gmat::UNKNOWN_OBJECT);
RealVar(const RealVar ©);
RealVar& operator= (const RealVar& right);
virtual ~RealVar();
bool operator==(const RealVar &right) const;
bool operator!=(const RealVar &right) const;
// methods inherited from Parameter
virtual bool Initialize();
virtual std::string ToString();
virtual Real GetReal() const;
virtual void SetReal(Real val);
virtual Integer GetParameterID(const std::string &str) const;
virtual Real GetRealParameter(const Integer id) const;
virtual Real GetRealParameter(const std::string &label) const;
virtual Real SetRealParameter(const Integer id, const Real value);
virtual Real SetRealParameter(const std::string &label, const Real value);
virtual bool SetStringParameter(const Integer id, const std::string &value);
virtual bool SetStringParameter(const std::string &label,
const std::string &value);
protected:
enum
{
VALUE = ParameterParamCount,
RealVarParamCount
};
static const Gmat::ParameterType
PARAMETER_TYPE[RealVarParamCount - ParameterParamCount];
static const std::string
PARAMETER_TEXT[RealVarParamCount - ParameterParamCount];
bool mValueSet;
bool mIsNumber;
Real mRealValue;
private:
};
#endif // RealVar_hpp
| 34.43299
| 80
| 0.637126
|
saichikine
|
1da274dff69789834dc0d773bd2b2bf74920fbd2
| 5,868
|
cc
|
C++
|
src/grin/CommonGrin.cc
|
jheleniak/btcpool
|
28ad61f60d529c203db2b58379d851ba20697eae
|
[
"MIT"
] | null | null | null |
src/grin/CommonGrin.cc
|
jheleniak/btcpool
|
28ad61f60d529c203db2b58379d851ba20697eae
|
[
"MIT"
] | null | null | null |
src/grin/CommonGrin.cc
|
jheleniak/btcpool
|
28ad61f60d529c203db2b58379d851ba20697eae
|
[
"MIT"
] | 1
|
2020-03-25T13:53:33.000Z
|
2020-03-25T13:53:33.000Z
|
/*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
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 "CommonGrin.h"
#include "cuckoo/cuckaroo.h"
#include "cuckoo/cuckarood.h"
#include "cuckoo/cuckaroom.h"
#include "cuckoo/cuckatoo.h"
#include "cuckoo/siphash.h"
#include "libblake2/blake2.h"
#include <boost/multiprecision/cpp_int.hpp>
#include <limits>
#include <Utils.h>
static const uint8_t BASE_EDGE_BITS = 24;
static const uint8_t DEFAULT_MIN_EDGE_BITS = 31;
static const uint8_t SECOND_POW_EDGE_BITS = 29;
static const uint64_t MAX_DIFFICUTY = std::numeric_limits<uint64_t>::max();
static const uint64_t BLOCK_TIME_SEC = 60;
static const uint64_t HOUR_HEIGHT = 3600 / BLOCK_TIME_SEC;
static const uint64_t DAY_HEIGHT = 24 * HOUR_HEIGHT;
static const uint64_t WEEK_HEIGHT = 7 * DAY_HEIGHT;
static const uint64_t YEAR_HEIGHT = 52 * WEEK_HEIGHT;
static const uint64_t GRIN_BASE = 1000000000;
static const uint64_t REWARD = BLOCK_TIME_SEC * GRIN_BASE;
static uint64_t
PowDifficultyGrinScaled(uint64_t hash, uint32_t secondaryScaling) {
boost::multiprecision::uint128_t x = secondaryScaling;
x <<= 64;
x /= hash;
return x > MAX_DIFFICUTY ? MAX_DIFFICUTY : static_cast<uint64_t>(x);
}
// verify that edges are ascending and form a cycle in header-generated graph
bool VerifyPowGrinPrimary(
const std::vector<uint64_t> &edges, siphash_keys &keys, uint32_t edgeBits) {
return verify_cuckatoo(edges, keys, edgeBits);
}
// verify that edges are ascending and form a cycle in header-generated graph
bool VerifyPowGrinSecondary(
const std::vector<uint64_t> &edges,
siphash_keys &keys,
uint32_t edgeBits,
uint16_t version) {
switch (version) {
case 3:
return verify_cuckaroom(edges, keys, edgeBits);
case 2:
return verify_cuckarood(edges, keys, edgeBits);
default:
return verify_cuckaroo(edges, keys, edgeBits);
}
}
bool VerifyPowGrin(
const PreProofGrin &preProof,
uint32_t edgeBits,
const std::vector<uint64_t> &proofs) {
if (edgeBits != SECOND_POW_EDGE_BITS && edgeBits < DEFAULT_MIN_EDGE_BITS)
return false;
siphash_keys siphashKeys;
char preProofKeys[32];
blake2b(
preProofKeys, sizeof(preProofKeys), &preProof, sizeof(preProof), 0, 0);
siphashKeys.setkeys(preProofKeys);
return edgeBits == SECOND_POW_EDGE_BITS
? VerifyPowGrinSecondary(
proofs, siphashKeys, edgeBits, preProof.prePow.version.value())
: VerifyPowGrinPrimary(proofs, siphashKeys, edgeBits);
}
uint256 PowHashGrin(uint32_t edgeBits, const std::vector<uint64_t> &proofs) {
// Compress the proofs to a bit vector
std::vector<uint8_t> proofBits((proofs.size() * edgeBits + 7) / 8, 0);
uint64_t edgeMask = (static_cast<uint64_t>(1) << edgeBits) - 1;
size_t i = 0;
for (uint64_t proof : proofs) {
proof &= edgeMask;
for (uint32_t j = 0; j < edgeBits; ++j) {
if (0x1 & (proof >> j)) {
uint32_t position = i * edgeBits + j;
proofBits[position / 8] |= (1 << (position % 8));
}
}
++i;
}
// Generate the blake2b hash
uint256 hash;
blake2b(hash.begin(), sizeof(hash), proofBits.data(), proofBits.size(), 0, 0);
return hash;
}
uint32_t GraphWeightGrin(uint64_t height, uint32_t edgeBits) {
uint64_t xprEdgeBits = edgeBits;
auto bitsOverMin =
edgeBits <= DEFAULT_MIN_EDGE_BITS ? 0 : edgeBits - DEFAULT_MIN_EDGE_BITS;
auto expiryHeight = (1 << bitsOverMin) * YEAR_HEIGHT;
if (edgeBits < 32 && height >= expiryHeight) {
auto weeks = 1 + (height - expiryHeight) / WEEK_HEIGHT;
xprEdgeBits = xprEdgeBits > weeks ? xprEdgeBits - weeks : 0;
}
return ((2 << (edgeBits - BASE_EDGE_BITS)) * xprEdgeBits);
}
uint32_t
PowScalingGrin(uint64_t height, uint32_t edgeBits, uint32_t secondaryScaling) {
return edgeBits == SECOND_POW_EDGE_BITS ? secondaryScaling
: GraphWeightGrin(height, edgeBits);
}
uint64_t PowDifficultyGrin(
uint64_t height,
uint32_t edgeBits,
uint32_t secondaryScaling,
const std::vector<uint64_t> &proofs) {
// Compress the proofs to a bit vector
std::vector<uint8_t> proofBits((proofs.size() * edgeBits + 7) / 8, 0);
uint64_t edgeMask = (static_cast<uint64_t>(1) << edgeBits) - 1;
size_t i = 0;
for (uint64_t proof : proofs) {
proof &= edgeMask;
for (uint32_t j = 0; j < edgeBits; ++j) {
if (0x1 & (proof >> j)) {
uint32_t position = i * edgeBits + j;
proofBits[position / 8] |= (1 << (position % 8));
}
}
++i;
}
// Generate the blake2b hash
boost::endian::big_uint64_buf_t hash[4];
blake2b(hash, sizeof(hash), proofBits.data(), proofBits.size(), 0, 0);
// Scale the difficulty
return PowDifficultyGrinScaled(
hash[0].value(), PowScalingGrin(height, edgeBits, secondaryScaling));
}
uint64_t GetBlockRewardGrin(uint64_t height) {
return REWARD;
}
| 33.724138
| 80
| 0.712849
|
jheleniak
|
1da505713dbef44cd67d486a606fb3c7f5efc994
| 1,651
|
cpp
|
C++
|
tcp_client.cpp
|
devmentality/bachelors_thesis
|
11fcd78b2be9b6d50474950cac497a5b2c7ee3dd
|
[
"MIT"
] | null | null | null |
tcp_client.cpp
|
devmentality/bachelors_thesis
|
11fcd78b2be9b6d50474950cac497a5b2c7ee3dd
|
[
"MIT"
] | null | null | null |
tcp_client.cpp
|
devmentality/bachelors_thesis
|
11fcd78b2be9b6d50474950cac497a5b2c7ee3dd
|
[
"MIT"
] | null | null | null |
#include "tcp_client.h"
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <cstring>
#include <netdb.h>
#include "version_vector.h"
#include "ron/op.hpp"
#include "ron/ron-streams.hpp"
#include "socket_io.h"
using namespace std;
using namespace ron;
int Connect(const string& server_ip, int server_port) {
struct hostent* host = gethostbyname(server_ip.c_str());
sockaddr_in server_address;
bzero((char*)&server_address, sizeof(server_address));
server_address.sin_family = AF_INET;
server_address.sin_addr.s_addr =
inet_addr(inet_ntoa(*(struct in_addr*)*host->h_addr_list));
server_address.sin_port = htons(server_port);
int client_socket = socket(AF_INET, SOCK_STREAM, 0);
int status = connect(client_socket, (sockaddr*) &server_address, sizeof(server_address));
if(status < 0)
{
cout<< "Error connecting to socket"<< endl;
return -1;
}
return client_socket;
}
void SendCmd(int socket, const string& cmd) {
send(socket, cmd.c_str(), cmd.length() + 1, 0);
}
int64_t FetchOndx(int socket, uint64_t replica_id) {
send(socket, &replica_id, sizeof replica_id, 0);
int64_t ondx;
recv(socket, &ondx, sizeof ondx, 0);
return ondx;
}
void SendOndx(int socket, int64_t ondx) {
send(socket, &ondx, sizeof ondx, 0);
}
void PushChanges(
int socket,
const map<uint64_t, Version>& version_vector,
const vector<Op>& patch
) {
SendVersionVector(socket, version_vector);
SendPatch(socket, patch);
}
| 23.253521
| 93
| 0.684434
|
devmentality
|
1da5484cabf0e878b96f6ab521247f08f4227fbe
| 567,866
|
cpp
|
C++
|
src/main_10300.cpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
src/main_10300.cpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
src/main_10300.cpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ProBuilder.Poly2Tri.TriangulationUtil
#include "UnityEngine/ProBuilder/Poly2Tri/TriangulationUtil.hpp"
// Including type: UnityEngine.ProBuilder.Poly2Tri.TriangulationPoint
#include "UnityEngine/ProBuilder/Poly2Tri/TriangulationPoint.hpp"
// Including type: UnityEngine.ProBuilder.Poly2Tri.Orientation
#include "UnityEngine/ProBuilder/Poly2Tri/Orientation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public System.Double EPSILON
double UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::_get_EPSILON() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::_get_EPSILON");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<double>("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", "EPSILON"));
}
// Autogenerated static field setter
// Set static field: static public System.Double EPSILON
void UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::_set_EPSILON(double value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::_set_EPSILON");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", "EPSILON", value));
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.TriangulationUtil..cctor
void UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.TriangulationUtil.SmartIncircle
bool UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::SmartIncircle(::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pa, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pb, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pc, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pd) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::SmartIncircle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", "SmartIncircle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pa), ::il2cpp_utils::ExtractType(pb), ::il2cpp_utils::ExtractType(pc), ::il2cpp_utils::ExtractType(pd)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, pa, pb, pc, pd);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.TriangulationUtil.InScanArea
bool UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::InScanArea(::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pa, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pb, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pc, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pd) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::InScanArea");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", "InScanArea", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pa), ::il2cpp_utils::ExtractType(pb), ::il2cpp_utils::ExtractType(pc), ::il2cpp_utils::ExtractType(pd)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, pa, pb, pc, pd);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.TriangulationUtil.Orient2d
::UnityEngine::ProBuilder::Poly2Tri::Orientation UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::Orient2d(::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pa, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pb, ::UnityEngine::ProBuilder::Poly2Tri::TriangulationPoint* pc) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::TriangulationUtil::Orient2d");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ProBuilder.Poly2Tri", "TriangulationUtil", "Orient2d", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pa), ::il2cpp_utils::ExtractType(pb), ::il2cpp_utils::ExtractType(pc)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ProBuilder::Poly2Tri::Orientation, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, pa, pb, pc);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3
#include "UnityEngine/ProBuilder/Poly2Tri/FixedBitArray3.hpp"
// Including type: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10
#include "UnityEngine/ProBuilder/Poly2Tri/FixedBitArray3_-Enumerate-d__10.hpp"
// Including type: System.Collections.Generic.IEnumerator`1
#include "System/Collections/Generic/IEnumerator_1.hpp"
// Including type: System.Collections.IEnumerator
#include "System/Collections/IEnumerator.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Boolean _0
bool& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__0() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__0");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_0"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean _1
bool& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__1() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__1");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_1"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean _2
bool& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__2() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::dyn__2");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_2"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.get_Item
bool UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::get_Item(int index) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::get_Item");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Item", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(index)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, index);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.set_Item
void UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::set_Item(int index, bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::set_Item");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_Item", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(index), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, index, value);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.Clear
void UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::Clear() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::Clear");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Clear", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.Enumerate
::System::Collections::Generic::IEnumerable_1<bool>* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::Enumerate() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::Enumerate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Enumerate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IEnumerable_1<bool>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.GetEnumerator
::System::Collections::Generic::IEnumerator_1<bool>* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::GetEnumerator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::GetEnumerator");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetEnumerator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IEnumerator_1<bool>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3.System.Collections.IEnumerable.GetEnumerator
::System::Collections::IEnumerator* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::System_Collections_IEnumerable_GetEnumerator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::System.Collections.IEnumerable.GetEnumerator");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "System.Collections.IEnumerable.GetEnumerator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::IEnumerator*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10
#include "UnityEngine/ProBuilder/Poly2Tri/FixedBitArray3_-Enumerate-d__10.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Int32 <>1__state
int& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$1__state() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$1__state");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean <>2__current
bool& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$2__current() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$2__current");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>2__current"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <>l__initialThreadId
int& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$l__initialThreadId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$l__initialThreadId");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>l__initialThreadId"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3 <>4__this
::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$4__this");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset;
return *reinterpret_cast<::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3 <>3__<>4__this
::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$3__$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$$3__$$4__this");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>3__<>4__this"))->offset;
return *reinterpret_cast<::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <i>5__2
int& UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$i$5__2() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::dyn_$i$5__2");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<i>5__2"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.Collections.Generic.IEnumerator<System.Boolean>.get_Current
bool UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_Collections_Generic_IEnumerator$System_Boolean$_get_Current() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.Collections.Generic.IEnumerator<System.Boolean>.get_Current");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.Collections.Generic.IEnumerator<System.Boolean>.get_Current", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.Collections.IEnumerator.get_Current
::Il2CppObject* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_Collections_IEnumerator_get_Current() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.Collections.IEnumerator.get_Current");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.Collections.IEnumerator.get_Current", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.IDisposable.Dispose
void UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_IDisposable_Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.IDisposable.Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.IDisposable.Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.MoveNext
bool UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::MoveNext() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::MoveNext");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "MoveNext", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.Collections.IEnumerator.Reset
void UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_Collections_IEnumerator_Reset() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.Collections.IEnumerator.Reset");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.Collections.IEnumerator.Reset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.Collections.Generic.IEnumerable<System.Boolean>.GetEnumerator
::System::Collections::Generic::IEnumerator_1<bool>* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_Collections_Generic_IEnumerable$System_Boolean$_GetEnumerator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.Collections.Generic.IEnumerable<System.Boolean>.GetEnumerator");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.Collections.Generic.IEnumerable<System.Boolean>.GetEnumerator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IEnumerator_1<bool>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ProBuilder.Poly2Tri.FixedBitArray3/UnityEngine.ProBuilder.Poly2Tri.<Enumerate>d__10.System.Collections.IEnumerable.GetEnumerator
::System::Collections::IEnumerator* UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System_Collections_IEnumerable_GetEnumerator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ProBuilder::Poly2Tri::FixedBitArray3::$Enumerate$d__10::System.Collections.IEnumerable.GetEnumerator");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "System.Collections.IEnumerable.GetEnumerator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::IEnumerator*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: MonoBehaviourCallbackHooks
#include "GlobalNamespace/MonoBehaviourCallbackHooks.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: System.Action`1<System.Single> m_OnUpdateDelegate
::System::Action_1<float>*& GlobalNamespace::MonoBehaviourCallbackHooks::dyn_m_OnUpdateDelegate() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::MonoBehaviourCallbackHooks::dyn_m_OnUpdateDelegate");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_OnUpdateDelegate"))->offset;
return *reinterpret_cast<::System::Action_1<float>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: MonoBehaviourCallbackHooks.add_OnUpdateDelegate
void GlobalNamespace::MonoBehaviourCallbackHooks::add_OnUpdateDelegate(::System::Action_1<float>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::MonoBehaviourCallbackHooks::add_OnUpdateDelegate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "add_OnUpdateDelegate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: MonoBehaviourCallbackHooks.remove_OnUpdateDelegate
void GlobalNamespace::MonoBehaviourCallbackHooks::remove_OnUpdateDelegate(::System::Action_1<float>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::MonoBehaviourCallbackHooks::remove_OnUpdateDelegate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "remove_OnUpdateDelegate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: MonoBehaviourCallbackHooks.Update
void GlobalNamespace::MonoBehaviourCallbackHooks::Update() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::MonoBehaviourCallbackHooks::Update");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: MonoBehaviourCallbackHooks.GetGameObjectName
::StringW GlobalNamespace::MonoBehaviourCallbackHooks::GetGameObjectName() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::MonoBehaviourCallbackHooks::GetGameObjectName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGameObjectName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
// Including type: UnityEngine.Networking.CertificateHandler
#include "UnityEngine/Networking/CertificateHandler.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.CompletedOperation`1
#include "UnityEngine/ResourceManagement/ResourceManager_CompletedOperation_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation
#include "UnityEngine/ResourceManagement/ResourceManager_InstanceOperation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.<>c__DisplayClass83_0`1
#include "UnityEngine/ResourceManagement/ResourceManager_--c__DisplayClass83_0_1.hpp"
// Including type: System.Func`2
#include "System/Func_2.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: ListWithEvents`1
#include "GlobalNamespace/ListWithEvents_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IResourceProvider.hpp"
// Including type: UnityEngine.ResourceManagement.Util.IAllocationStrategy
#include "UnityEngine/ResourceManagement/Util/IAllocationStrategy.hpp"
// Including type: UnityEngine.ResourceManagement.IUpdateReceiver
#include "UnityEngine/ResourceManagement/IUpdateReceiver.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/IAsyncOperation.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
// Including type: DelegateList`1
#include "GlobalNamespace/DelegateList_1.hpp"
// Including type: System.Action`4
#include "System/Action_4.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: System.Action`2
#include "System/Action_2.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationBase_1.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/GroupOperation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ISceneProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/ISceneProvider.hpp"
// Including type: UnityEngine.SceneManagement.LoadSceneMode
#include "UnityEngine/SceneManagement/LoadSceneMode.hpp"
// Including type: UnityEngine.GameObject
#include "UnityEngine/GameObject.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IInstanceProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters
#include "UnityEngine/ResourceManagement/ResourceProviders/InstantiationParameters.hpp"
// Including type: UnityEngine.SceneManagement.Scene
#include "UnityEngine/SceneManagement/Scene.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private System.Action`2<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle,System.Exception> <ExceptionHandler>k__BackingField
::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>* UnityEngine::ResourceManagement::ResourceManager::_get_$ExceptionHandler$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_get_$ExceptionHandler$k__BackingField");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>*>("UnityEngine.ResourceManagement", "ResourceManager", "<ExceptionHandler>k__BackingField")));
}
// Autogenerated static field setter
// Set static field: static private System.Action`2<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle,System.Exception> <ExceptionHandler>k__BackingField
void UnityEngine::ResourceManagement::ResourceManager::_set_$ExceptionHandler$k__BackingField(::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_set_$ExceptionHandler$k__BackingField");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager", "<ExceptionHandler>k__BackingField", value));
}
// Autogenerated static field getter
// Get static field: static private System.Int32 s_GroupOperationTypeHash
int UnityEngine::ResourceManagement::ResourceManager::_get_s_GroupOperationTypeHash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_get_s_GroupOperationTypeHash");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("UnityEngine.ResourceManagement", "ResourceManager", "s_GroupOperationTypeHash"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 s_GroupOperationTypeHash
void UnityEngine::ResourceManagement::ResourceManager::_set_s_GroupOperationTypeHash(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_set_s_GroupOperationTypeHash");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager", "s_GroupOperationTypeHash", value));
}
// Autogenerated static field getter
// Get static field: static private System.Int32 s_InstanceOperationTypeHash
int UnityEngine::ResourceManagement::ResourceManager::_get_s_InstanceOperationTypeHash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_get_s_InstanceOperationTypeHash");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("UnityEngine.ResourceManagement", "ResourceManager", "s_InstanceOperationTypeHash"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 s_InstanceOperationTypeHash
void UnityEngine::ResourceManagement::ResourceManager::_set_s_InstanceOperationTypeHash(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::_set_s_InstanceOperationTypeHash");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager", "s_InstanceOperationTypeHash", value));
}
// Autogenerated instance field getter
// Get instance field: System.Boolean postProfilerEvents
bool& UnityEngine::ResourceManagement::ResourceManager::dyn_postProfilerEvents() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_postProfilerEvents");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "postProfilerEvents"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Func`2<UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation,System.String> <InternalIdTransformFunc>k__BackingField
::System::Func_2<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, ::StringW>*& UnityEngine::ResourceManagement::ResourceManager::dyn_$InternalIdTransformFunc$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_$InternalIdTransformFunc$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<InternalIdTransformFunc>k__BackingField"))->offset;
return *reinterpret_cast<::System::Func_2<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, ::StringW>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Boolean CallbackHooksEnabled
bool& UnityEngine::ResourceManagement::ResourceManager::dyn_CallbackHooksEnabled() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_CallbackHooksEnabled");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "CallbackHooksEnabled"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private ListWithEvents`1<UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider> m_ResourceProviders
::GlobalNamespace::ListWithEvents_1<::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_ResourceProviders() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_ResourceProviders");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ResourceProviders"))->offset;
return *reinterpret_cast<::GlobalNamespace::ListWithEvents_1<::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.Util.IAllocationStrategy m_allocator
::UnityEngine::ResourceManagement::Util::IAllocationStrategy*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_allocator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_allocator");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_allocator"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::Util::IAllocationStrategy**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private ListWithEvents`1<UnityEngine.ResourceManagement.IUpdateReceiver> m_UpdateReceivers
::GlobalNamespace::ListWithEvents_1<::UnityEngine::ResourceManagement::IUpdateReceiver*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateReceivers() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateReceivers");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UpdateReceivers"))->offset;
return *reinterpret_cast<::GlobalNamespace::ListWithEvents_1<::UnityEngine::ResourceManagement::IUpdateReceiver*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<UnityEngine.ResourceManagement.IUpdateReceiver> m_UpdateReceiversToRemove
::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::IUpdateReceiver*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateReceiversToRemove() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateReceiversToRemove");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UpdateReceiversToRemove"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::IUpdateReceiver*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_UpdatingReceivers
bool& UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdatingReceivers() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdatingReceivers");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UpdatingReceivers"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider> m_providerMap
::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_providerMap() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_providerMap");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_providerMap"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation> m_AssetOperationCache
::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_AssetOperationCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_AssetOperationCache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_AssetOperationCache"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.HashSet`1<UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation> m_TrackedInstanceOperations
::System::Collections::Generic::HashSet_1<::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_TrackedInstanceOperations() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_TrackedInstanceOperations");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_TrackedInstanceOperations"))->offset;
return *reinterpret_cast<::System::Collections::Generic::HashSet_1<::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private DelegateList`1<System.Single> m_UpdateCallbacks
::GlobalNamespace::DelegateList_1<float>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_UpdateCallbacks");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UpdateCallbacks"))->offset;
return *reinterpret_cast<::GlobalNamespace::DelegateList_1<float>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation> m_DeferredCompleteCallbacks
::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_DeferredCompleteCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_DeferredCompleteCallbacks");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DeferredCompleteCallbacks"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Action`4<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle,UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType,System.Int32,System.Object> m_obsoleteDiagnosticsHandler
::System::Action_4<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType, int, ::Il2CppObject*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_obsoleteDiagnosticsHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_obsoleteDiagnosticsHandler");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_obsoleteDiagnosticsHandler"))->offset;
return *reinterpret_cast<::System::Action_4<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType, int, ::Il2CppObject*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Action`1<UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext> m_diagnosticsHandler
::System::Action_1<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_diagnosticsHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_diagnosticsHandler");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_diagnosticsHandler"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Action`1<UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation> m_ReleaseOpNonCached
::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseOpNonCached() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseOpNonCached");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ReleaseOpNonCached"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Action`1<UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation> m_ReleaseOpCached
::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseOpCached() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseOpCached");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ReleaseOpCached"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Action`1<UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation> m_ReleaseInstanceOp
::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseInstanceOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_ReleaseInstanceOp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ReleaseInstanceOp"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Networking.CertificateHandler <CertificateHandlerInstance>k__BackingField
::UnityEngine::Networking::CertificateHandler*& UnityEngine::ResourceManagement::ResourceManager::dyn_$CertificateHandlerInstance$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_$CertificateHandlerInstance$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<CertificateHandlerInstance>k__BackingField"))->offset;
return *reinterpret_cast<::UnityEngine::Networking::CertificateHandler**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_RegisteredForCallbacks
bool& UnityEngine::ResourceManagement::ResourceManager::dyn_m_RegisteredForCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_RegisteredForCallbacks");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RegisteredForCallbacks"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Type,System.Type> m_ProviderOperationTypeCache
::System::Collections::Generic::Dictionary_2<::System::Type*, ::System::Type*>*& UnityEngine::ResourceManagement::ResourceManager::dyn_m_ProviderOperationTypeCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::dyn_m_ProviderOperationTypeCache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProviderOperationTypeCache"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::System::Type*, ::System::Type*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_ExceptionHandler
::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>* UnityEngine::ResourceManagement::ResourceManager::get_ExceptionHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_ExceptionHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "ResourceManager", "get_ExceptionHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.set_ExceptionHandler
void UnityEngine::ResourceManagement::ResourceManager::set_ExceptionHandler(::System::Action_2<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::System::Exception*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::set_ExceptionHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "ResourceManager", "set_ExceptionHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_InternalIdTransformFunc
::System::Func_2<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, ::StringW>* UnityEngine::ResourceManagement::ResourceManager::get_InternalIdTransformFunc() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_InternalIdTransformFunc");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InternalIdTransformFunc", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Func_2<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, ::StringW>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.set_InternalIdTransformFunc
void UnityEngine::ResourceManagement::ResourceManager::set_InternalIdTransformFunc(::System::Func_2<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, ::StringW>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::set_InternalIdTransformFunc");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_InternalIdTransformFunc", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_OperationCacheCount
int UnityEngine::ResourceManagement::ResourceManager::get_OperationCacheCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_OperationCacheCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_OperationCacheCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_InstanceOperationCount
int UnityEngine::ResourceManagement::ResourceManager::get_InstanceOperationCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_InstanceOperationCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InstanceOperationCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_Allocator
::UnityEngine::ResourceManagement::Util::IAllocationStrategy* UnityEngine::ResourceManagement::ResourceManager::get_Allocator() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_Allocator");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Allocator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::Util::IAllocationStrategy*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.set_Allocator
void UnityEngine::ResourceManagement::ResourceManager::set_Allocator(::UnityEngine::ResourceManagement::Util::IAllocationStrategy* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::set_Allocator");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Allocator", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_ResourceProviders
::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>* UnityEngine::ResourceManagement::ResourceManager::get_ResourceProviders() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_ResourceProviders");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ResourceProviders", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.get_CertificateHandlerInstance
::UnityEngine::Networking::CertificateHandler* UnityEngine::ResourceManagement::ResourceManager::get_CertificateHandlerInstance() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::get_CertificateHandlerInstance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CertificateHandlerInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Networking::CertificateHandler*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.set_CertificateHandlerInstance
void UnityEngine::ResourceManagement::ResourceManager::set_CertificateHandlerInstance(::UnityEngine::Networking::CertificateHandler* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::set_CertificateHandlerInstance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_CertificateHandlerInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager..cctor
void UnityEngine::ResourceManagement::ResourceManager::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "ResourceManager", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.TransformInternalId
::StringW UnityEngine::ResourceManagement::ResourceManager::TransformInternalId(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::TransformInternalId");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TransformInternalId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.AddUpdateReceiver
void UnityEngine::ResourceManagement::ResourceManager::AddUpdateReceiver(::UnityEngine::ResourceManagement::IUpdateReceiver* receiver) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::AddUpdateReceiver");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddUpdateReceiver", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(receiver)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, receiver);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RemoveUpdateReciever
void UnityEngine::ResourceManagement::ResourceManager::RemoveUpdateReciever(::UnityEngine::ResourceManagement::IUpdateReceiver* receiver) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RemoveUpdateReciever");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RemoveUpdateReciever", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(receiver)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, receiver);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.OnObjectAdded
void UnityEngine::ResourceManagement::ResourceManager::OnObjectAdded(::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::OnObjectAdded");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnObjectAdded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.OnObjectRemoved
void UnityEngine::ResourceManagement::ResourceManager::OnObjectRemoved(::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::OnObjectRemoved");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnObjectRemoved", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RegisterForCallbacks
void UnityEngine::ResourceManagement::ResourceManager::RegisterForCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RegisterForCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterForCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ClearDiagnosticsCallback
void UnityEngine::ResourceManagement::ResourceManager::ClearDiagnosticsCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ClearDiagnosticsCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearDiagnosticsCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ClearDiagnosticCallbacks
void UnityEngine::ResourceManagement::ResourceManager::ClearDiagnosticCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ClearDiagnosticCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearDiagnosticCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.UnregisterDiagnosticCallback
void UnityEngine::ResourceManagement::ResourceManager::UnregisterDiagnosticCallback(::System::Action_1<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext>* func) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::UnregisterDiagnosticCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnregisterDiagnosticCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(func)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, func);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RegisterDiagnosticCallback
void UnityEngine::ResourceManagement::ResourceManager::RegisterDiagnosticCallback(::System::Action_4<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, ::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType, int, ::Il2CppObject*>* func) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RegisterDiagnosticCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterDiagnosticCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(func)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, func);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RegisterDiagnosticCallback
void UnityEngine::ResourceManagement::ResourceManager::RegisterDiagnosticCallback(::System::Action_1<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext>* func) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RegisterDiagnosticCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterDiagnosticCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(func)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, func);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.PostDiagnosticEvent
void UnityEngine::ResourceManagement::ResourceManager::PostDiagnosticEvent(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext context) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::PostDiagnosticEvent");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PostDiagnosticEvent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(context)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, context);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.GetResourceProvider
::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider* UnityEngine::ResourceManagement::ResourceManager::GetResourceProvider(::System::Type* t, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::GetResourceProvider");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetResourceProvider", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t), ::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider*, false>(this, ___internal__method, t, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.GetDefaultTypeForLocation
::System::Type* UnityEngine::ResourceManagement::ResourceManager::GetDefaultTypeForLocation(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* loc) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::GetDefaultTypeForLocation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDefaultTypeForLocation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(loc)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method, loc);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.CalculateLocationsHash
int UnityEngine::ResourceManagement::ResourceManager::CalculateLocationsHash(::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>* locations, ::System::Type* t) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::CalculateLocationsHash");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CalculateLocationsHash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(locations), ::il2cpp_utils::ExtractType(t)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, locations, t);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ProvideResource
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::ResourceManager::ProvideResource(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::System::Type* desiredType, bool releaseDependenciesOnFailure) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ProvideResource");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideResource", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(desiredType), ::il2cpp_utils::ExtractType(releaseDependenciesOnFailure)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method, location, desiredType, releaseDependenciesOnFailure);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.StartOperation
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::ResourceManager::StartOperation(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* operation, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle dependency) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::StartOperation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartOperation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(operation), ::il2cpp_utils::ExtractType(dependency)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method, operation, dependency);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.OnInstanceOperationDestroy
void UnityEngine::ResourceManagement::ResourceManager::OnInstanceOperationDestroy(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* o) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::OnInstanceOperationDestroy");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnInstanceOperationDestroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(o)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, o);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.OnOperationDestroyNonCached
void UnityEngine::ResourceManagement::ResourceManager::OnOperationDestroyNonCached(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* o) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::OnOperationDestroyNonCached");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnOperationDestroyNonCached", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(o)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, o);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.OnOperationDestroyCached
void UnityEngine::ResourceManagement::ResourceManager::OnOperationDestroyCached(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* o) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::OnOperationDestroyCached");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnOperationDestroyCached", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(o)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, o);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.AddOperationToCache
void UnityEngine::ResourceManagement::ResourceManager::AddOperationToCache(int hash, ::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* operation) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::AddOperationToCache");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddOperationToCache", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash), ::il2cpp_utils::ExtractType(operation)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hash, operation);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RemoveOperationFromCache
bool UnityEngine::ResourceManagement::ResourceManager::RemoveOperationFromCache(int hash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RemoveOperationFromCache");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RemoveOperationFromCache", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hash);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.IsOperationCached
bool UnityEngine::ResourceManagement::ResourceManager::IsOperationCached(int hash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::IsOperationCached");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsOperationCached", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hash);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.CachedOperationCount
int UnityEngine::ResourceManagement::ResourceManager::CachedOperationCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::CachedOperationCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CachedOperationCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.Release
void UnityEngine::ResourceManagement::ResourceManager::Release(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle handle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::Release");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.Acquire
void UnityEngine::ResourceManagement::ResourceManager::Acquire(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle handle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::Acquire");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Acquire", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.AcquireGroupOpFromCache
::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation* UnityEngine::ResourceManagement::ResourceManager::AcquireGroupOpFromCache(int hash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::AcquireGroupOpFromCache");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AcquireGroupOpFromCache", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation*, false>(this, ___internal__method, hash);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.CreateGenericGroupOperation
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*> UnityEngine::ResourceManagement::ResourceManager::CreateGenericGroupOperation(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* operations, bool releasedCachedOpOnComplete) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::CreateGenericGroupOperation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateGenericGroupOperation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(operations), ::il2cpp_utils::ExtractType(releasedCachedOpOnComplete)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*>, false>(this, ___internal__method, operations, releasedCachedOpOnComplete);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ProvideResourceGroupCached
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*> UnityEngine::ResourceManagement::ResourceManager::ProvideResourceGroupCached(::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>* locations, int groupHash, ::System::Type* desiredType, ::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* callback, bool releaseDependenciesOnFailure) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ProvideResourceGroupCached");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideResourceGroupCached", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(locations), ::il2cpp_utils::ExtractType(groupHash), ::il2cpp_utils::ExtractType(desiredType), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(releaseDependenciesOnFailure)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*>, false>(this, ___internal__method, locations, groupHash, desiredType, callback, releaseDependenciesOnFailure);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ProvideScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceManager::ProvideScene(::UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider* sceneProvider, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::SceneManagement::LoadSceneMode loadMode, bool activateOnLoad, int priority) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ProvideScene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sceneProvider), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(loadMode), ::il2cpp_utils::ExtractType(activateOnLoad), ::il2cpp_utils::ExtractType(priority)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, sceneProvider, location, loadMode, activateOnLoad, priority);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ReleaseScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceManager::ReleaseScene(::UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider* sceneProvider, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> sceneLoadHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ReleaseScene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sceneProvider), ::il2cpp_utils::ExtractType(sceneLoadHandle)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, sceneProvider, sceneLoadHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ProvideInstance
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*> UnityEngine::ResourceManagement::ResourceManager::ProvideInstance(::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider* provider, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters instantiateParameters) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ProvideInstance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provider), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(instantiateParameters)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*>, false>(this, ___internal__method, provider, location, instantiateParameters);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.CleanupSceneInstances
void UnityEngine::ResourceManagement::ResourceManager::CleanupSceneInstances(::UnityEngine::SceneManagement::Scene scene) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::CleanupSceneInstances");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CleanupSceneInstances", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(scene)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, scene);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.ExecuteDeferredCallbacks
void UnityEngine::ResourceManagement::ResourceManager::ExecuteDeferredCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::ExecuteDeferredCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ExecuteDeferredCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.RegisterForDeferredCallback
void UnityEngine::ResourceManagement::ResourceManager::RegisterForDeferredCallback(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* op, bool incrementRefCount) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::RegisterForDeferredCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterForDeferredCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op), ::il2cpp_utils::ExtractType(incrementRefCount)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op, incrementRefCount);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.Update
void UnityEngine::ResourceManagement::ResourceManager::Update(float unscaledDeltaTime) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::Update");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(unscaledDeltaTime)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, unscaledDeltaTime);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.Dispose
void UnityEngine::ResourceManagement::ResourceManager::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager.<.ctor>b__45_0
void UnityEngine::ResourceManagement::ResourceManager::$_ctor$b__45_0(::UnityEngine::ResourceManagement::IUpdateReceiver* x) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::<.ctor>b__45_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.ctor>b__45_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(x)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, x);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationFail
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationFail() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationFail");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationFail"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationFail
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationFail(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationFail");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationFail", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationCreate
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationCreate() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationCreate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationCreate"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationCreate
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationCreate(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationCreate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationCreate", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationPercentComplete
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationPercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationPercentComplete");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationPercentComplete"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationPercentComplete
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationPercentComplete(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationPercentComplete");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationPercentComplete", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationComplete
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationComplete");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationComplete"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationComplete
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationComplete(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationComplete");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationComplete", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationReferenceCount
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationReferenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationReferenceCount");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationReferenceCount"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationReferenceCount
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationReferenceCount(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationReferenceCount");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationReferenceCount", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationDestroy
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationDestroy() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_get_AsyncOperationDestroy");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType>("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationDestroy"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType AsyncOperationDestroy
void UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationDestroy(::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::_set_AsyncOperationDestroy");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "ResourceManager/DiagnosticEventType", "AsyncOperationDestroy", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private readonly UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle <OperationHandle>k__BackingField
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$OperationHandle$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$OperationHandle$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<OperationHandle>k__BackingField"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventType <Type>k__BackingField
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Type$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Type$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Type>k__BackingField"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int32 <EventValue>k__BackingField
int& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$EventValue$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$EventValue$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<EventValue>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation <Location>k__BackingField
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Location$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Location$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Location>k__BackingField"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Object <Context>k__BackingField
::Il2CppObject*& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Context$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Context$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Context>k__BackingField"))->offset;
return *reinterpret_cast<::Il2CppObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.String <Error>k__BackingField
::StringW& UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Error$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::dyn_$Error$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Error>k__BackingField"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_OperationHandle
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_OperationHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_OperationHandle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_OperationHandle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_Type
::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Type() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Type");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Type", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_EventValue
int UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_EventValue() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_EventValue");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_EventValue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_Location
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Location() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Location");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Location", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_Context
::Il2CppObject* UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Context() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Context");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Context", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext.get_Error
::StringW UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Error() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::get_Error");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Error", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.DiagnosticEventContext..ctor
UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::DiagnosticEventContext(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle op, ::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventType type, int eventValue, ::StringW error, ::Il2CppObject* context) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::DiagnosticEventContext::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op), ::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(eventValue), ::il2cpp_utils::ExtractType(error), ::il2cpp_utils::ExtractType(context)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op, type, eventValue, error, context);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation
#include "UnityEngine/ResourceManagement/ResourceManager_InstanceOperation.hpp"
// Including type: UnityEngine.GameObject
#include "UnityEngine/GameObject.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IInstanceProvider.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/DownloadStatus.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1<UnityEngine.GameObject> m_dependency
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*>& UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_dependency() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_dependency");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_dependency"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters m_instantiationParams
::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters& UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instantiationParams() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instantiationParams");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_instantiationParams"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider m_instanceProvider
::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider*& UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instanceProvider() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instanceProvider");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_instanceProvider"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.GameObject m_instance
::UnityEngine::GameObject*& UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instance() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_instance");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_instance"))->offset;
return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.SceneManagement.Scene m_scene
::UnityEngine::SceneManagement::Scene& UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_scene() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::dyn_m_scene");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_scene"))->offset;
return *reinterpret_cast<::UnityEngine::SceneManagement::Scene*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.Init
void UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Init(::UnityEngine::ResourceManagement::ResourceManager* rm, ::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider* instanceProvider, ::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters instantiationParams, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*> dependency) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(instanceProvider), ::il2cpp_utils::ExtractType(instantiationParams), ::il2cpp_utils::ExtractType(dependency)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rm, instanceProvider, instantiationParams, dependency);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.InstanceScene
::UnityEngine::SceneManagement::Scene UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::InstanceScene() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::InstanceScene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InstanceScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::SceneManagement::Scene, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.get_DebugName
::StringW UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::get_DebugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::get_DebugName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DebugName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.get_Progress
float UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::get_Progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::get_Progress");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Progress", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::GetDownloadStatus(::System::Collections::Generic::HashSet_1<::Il2CppObject*>* visited) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::GetDownloadStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(visited)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method, visited);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.GetDependencies
void UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::GetDependencies(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::GetDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.Destroy
void UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Destroy() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Destroy");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Destroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.InvokeWaitForCompletion
bool UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::InvokeWaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::InvokeWaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeWaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceManager/UnityEngine.ResourceManagement.InstanceOperation.Execute
void UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Execute() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceManager::InstanceOperation::Execute");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Execute", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.IUpdateReceiver
#include "UnityEngine/ResourceManagement/IUpdateReceiver.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.IUpdateReceiver.Update
void UnityEngine::ResourceManagement::IUpdateReceiver::Update(float unscaledDeltaTime) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::IUpdateReceiver::Update");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(unscaledDeltaTime)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, unscaledDeltaTime);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.WebRequestQueueOperation
#include "UnityEngine/ResourceManagement/WebRequestQueueOperation.hpp"
// Including type: UnityEngine.Networking.UnityWebRequestAsyncOperation
#include "UnityEngine/Networking/UnityWebRequestAsyncOperation.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
// Including type: UnityEngine.Networking.UnityWebRequest
#include "UnityEngine/Networking/UnityWebRequest.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Networking.UnityWebRequestAsyncOperation Result
::UnityEngine::Networking::UnityWebRequestAsyncOperation*& UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_Result() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_Result");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Result"))->offset;
return *reinterpret_cast<::UnityEngine::Networking::UnityWebRequestAsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Action`1<UnityEngine.Networking.UnityWebRequestAsyncOperation> OnComplete
::System::Action_1<::UnityEngine::Networking::UnityWebRequestAsyncOperation*>*& UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_OnComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_OnComplete");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnComplete"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::Networking::UnityWebRequestAsyncOperation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: UnityEngine.Networking.UnityWebRequest m_WebRequest
::UnityEngine::Networking::UnityWebRequest*& UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_m_WebRequest() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueueOperation::dyn_m_WebRequest");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_WebRequest"))->offset;
return *reinterpret_cast<::UnityEngine::Networking::UnityWebRequest**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueueOperation.get_IsDone
bool UnityEngine::ResourceManagement::WebRequestQueueOperation::get_IsDone() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueueOperation::get_IsDone");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsDone", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueueOperation.Complete
void UnityEngine::ResourceManagement::WebRequestQueueOperation::Complete(::UnityEngine::Networking::UnityWebRequestAsyncOperation* asyncOp) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueueOperation::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncOp)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncOp);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.WebRequestQueue
#include "UnityEngine/ResourceManagement/WebRequestQueue.hpp"
// Including type: System.Collections.Generic.Queue`1
#include "System/Collections/Generic/Queue_1.hpp"
// Including type: UnityEngine.ResourceManagement.WebRequestQueueOperation
#include "UnityEngine/ResourceManagement/WebRequestQueueOperation.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: UnityEngine.Networking.UnityWebRequestAsyncOperation
#include "UnityEngine/Networking/UnityWebRequestAsyncOperation.hpp"
// Including type: UnityEngine.Networking.UnityWebRequest
#include "UnityEngine/Networking/UnityWebRequest.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static System.Int32 s_MaxRequest
int UnityEngine::ResourceManagement::WebRequestQueue::_get_s_MaxRequest() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_get_s_MaxRequest");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("UnityEngine.ResourceManagement", "WebRequestQueue", "s_MaxRequest"));
}
// Autogenerated static field setter
// Set static field: static System.Int32 s_MaxRequest
void UnityEngine::ResourceManagement::WebRequestQueue::_set_s_MaxRequest(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_set_s_MaxRequest");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "WebRequestQueue", "s_MaxRequest", value));
}
// Autogenerated static field getter
// Get static field: static System.Collections.Generic.Queue`1<UnityEngine.ResourceManagement.WebRequestQueueOperation> s_QueuedOperations
::System::Collections::Generic::Queue_1<::UnityEngine::ResourceManagement::WebRequestQueueOperation*>* UnityEngine::ResourceManagement::WebRequestQueue::_get_s_QueuedOperations() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_get_s_QueuedOperations");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Collections::Generic::Queue_1<::UnityEngine::ResourceManagement::WebRequestQueueOperation*>*>("UnityEngine.ResourceManagement", "WebRequestQueue", "s_QueuedOperations"));
}
// Autogenerated static field setter
// Set static field: static System.Collections.Generic.Queue`1<UnityEngine.ResourceManagement.WebRequestQueueOperation> s_QueuedOperations
void UnityEngine::ResourceManagement::WebRequestQueue::_set_s_QueuedOperations(::System::Collections::Generic::Queue_1<::UnityEngine::ResourceManagement::WebRequestQueueOperation*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_set_s_QueuedOperations");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "WebRequestQueue", "s_QueuedOperations", value));
}
// Autogenerated static field getter
// Get static field: static System.Collections.Generic.List`1<UnityEngine.Networking.UnityWebRequestAsyncOperation> s_ActiveRequests
::System::Collections::Generic::List_1<::UnityEngine::Networking::UnityWebRequestAsyncOperation*>* UnityEngine::ResourceManagement::WebRequestQueue::_get_s_ActiveRequests() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_get_s_ActiveRequests");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Collections::Generic::List_1<::UnityEngine::Networking::UnityWebRequestAsyncOperation*>*>("UnityEngine.ResourceManagement", "WebRequestQueue", "s_ActiveRequests"));
}
// Autogenerated static field setter
// Set static field: static System.Collections.Generic.List`1<UnityEngine.Networking.UnityWebRequestAsyncOperation> s_ActiveRequests
void UnityEngine::ResourceManagement::WebRequestQueue::_set_s_ActiveRequests(::System::Collections::Generic::List_1<::UnityEngine::Networking::UnityWebRequestAsyncOperation*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::_set_s_ActiveRequests");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement", "WebRequestQueue", "s_ActiveRequests", value));
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueue.get_ShouldQueueNextRequest
bool UnityEngine::ResourceManagement::WebRequestQueue::get_ShouldQueueNextRequest() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::get_ShouldQueueNextRequest");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "WebRequestQueue", "get_ShouldQueueNextRequest", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueue..cctor
void UnityEngine::ResourceManagement::WebRequestQueue::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "WebRequestQueue", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueue.SetMaxConcurrentRequests
void UnityEngine::ResourceManagement::WebRequestQueue::SetMaxConcurrentRequests(int maxRequests) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::SetMaxConcurrentRequests");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "WebRequestQueue", "SetMaxConcurrentRequests", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(maxRequests)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, maxRequests);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueue.QueueRequest
::UnityEngine::ResourceManagement::WebRequestQueueOperation* UnityEngine::ResourceManagement::WebRequestQueue::QueueRequest(::UnityEngine::Networking::UnityWebRequest* request) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::QueueRequest");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "WebRequestQueue", "QueueRequest", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(request)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::WebRequestQueueOperation*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, request);
}
// Autogenerated method: UnityEngine.ResourceManagement.WebRequestQueue.OnWebAsyncOpComplete
void UnityEngine::ResourceManagement::WebRequestQueue::OnWebAsyncOpComplete(::UnityEngine::AsyncOperation* operation) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::WebRequestQueue::OnWebAsyncOpComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement", "WebRequestQueue", "OnWebAsyncOpComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(operation)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, operation);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Exceptions.ResourceManagerException
#include "UnityEngine/ResourceManagement/Exceptions/ResourceManagerException.hpp"
// Including type: System.Runtime.Serialization.SerializationInfo
#include "System/Runtime/Serialization/SerializationInfo.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException
#include "UnityEngine/ResourceManagement/Exceptions/UnknownResourceProviderException.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: System.Runtime.Serialization.SerializationInfo
#include "System/Runtime/Serialization/SerializationInfo.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation <Location>k__BackingField
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*& UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::dyn_$Location$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::dyn_$Location$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Location>k__BackingField"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException.get_Location
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::get_Location() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::get_Location");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Location", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException.set_Location
void UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::set_Location(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::set_Location");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Location", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException.get_Message
::StringW UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::get_Message() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::get_Message");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Message", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException.ToString
::StringW UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Exceptions::UnknownResourceProviderException::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.DelayedActionManager
#include "UnityEngine/ResourceManagement/Util/DelayedActionManager.hpp"
// Including type: System.Collections.Generic.LinkedList`1
#include "System/Collections/Generic/LinkedList_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Collections.Generic.Stack`1
#include "System/Collections/Generic/Stack_1.hpp"
// Including type: System.Collections.Generic.LinkedListNode`1
#include "System/Collections/Generic/LinkedListNode_1.hpp"
// Including type: System.Delegate
#include "System/Delegate.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo>[] m_Actions
::ArrayW<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*>& UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_Actions() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_Actions");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Actions"))->offset;
return *reinterpret_cast<::ArrayW<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.LinkedList`1<UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo> m_DelayedActions
::System::Collections::Generic::LinkedList_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*& UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_DelayedActions() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_DelayedActions");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DelayedActions"))->offset;
return *reinterpret_cast<::System::Collections::Generic::LinkedList_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Stack`1<System.Collections.Generic.LinkedListNode`1<UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo>> m_NodeCache
::System::Collections::Generic::Stack_1<::System::Collections::Generic::LinkedListNode_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*>*& UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_NodeCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_NodeCache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_NodeCache"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Stack_1<::System::Collections::Generic::LinkedListNode_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_CollectionIndex
int& UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_CollectionIndex() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_CollectionIndex");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CollectionIndex"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_DestroyOnCompletion
bool& UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_DestroyOnCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::dyn_m_DestroyOnCompletion");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DestroyOnCompletion"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.get_IsActive
bool UnityEngine::ResourceManagement::Util::DelayedActionManager::get_IsActive() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::get_IsActive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "DelayedActionManager", "get_IsActive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.GetNode
::System::Collections::Generic::LinkedListNode_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>* UnityEngine::ResourceManagement::Util::DelayedActionManager::GetNode(ByRef<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo> del) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::GetNode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(del)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::LinkedListNode_1<::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo>*, false>(this, ___internal__method, byref(del));
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.Clear
void UnityEngine::ResourceManagement::Util::DelayedActionManager::Clear() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::Clear");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "DelayedActionManager", "Clear", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.DestroyWhenComplete
void UnityEngine::ResourceManagement::Util::DelayedActionManager::DestroyWhenComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DestroyWhenComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DestroyWhenComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.AddAction
void UnityEngine::ResourceManagement::Util::DelayedActionManager::AddAction(::System::Delegate* action, float delay, ::ArrayW<::Il2CppObject*> parameters) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::AddAction");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "DelayedActionManager", "AddAction", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(action), ::il2cpp_utils::ExtractType(delay), ::il2cpp_utils::ExtractType(parameters)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, action, delay, parameters);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.AddActionInternal
void UnityEngine::ResourceManagement::Util::DelayedActionManager::AddActionInternal(::System::Delegate* action, float delay, ::ArrayW<::Il2CppObject*> parameters) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::AddActionInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddActionInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(action), ::il2cpp_utils::ExtractType(delay), ::il2cpp_utils::ExtractType(parameters)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, action, delay, parameters);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.Wait
bool UnityEngine::ResourceManagement::Util::DelayedActionManager::Wait(float timeout, float timeAdvanceAmount) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::Wait");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "DelayedActionManager", "Wait", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(timeout), ::il2cpp_utils::ExtractType(timeAdvanceAmount)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, timeout, timeAdvanceAmount);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.LateUpdate
void UnityEngine::ResourceManagement::Util::DelayedActionManager::LateUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::LateUpdate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LateUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.InternalLateUpdate
void UnityEngine::ResourceManagement::Util::DelayedActionManager::InternalLateUpdate(float t) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::InternalLateUpdate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InternalLateUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, t);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager.OnApplicationQuit
void UnityEngine::ResourceManagement::Util::DelayedActionManager::OnApplicationQuit() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::OnApplicationQuit");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnApplicationQuit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo
#include "UnityEngine/ResourceManagement/Util/DelayedActionManager.hpp"
// Including type: System.Delegate
#include "System/Delegate.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private System.Int32 s_Id
int UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::_get_s_Id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::_get_s_Id");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("UnityEngine.ResourceManagement.Util", "DelayedActionManager/DelegateInfo", "s_Id"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 s_Id
void UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::_set_s_Id(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::_set_s_Id");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Util", "DelayedActionManager/DelegateInfo", "s_Id", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Id
int& UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Id");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Id"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Delegate m_Delegate
::System::Delegate*& UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Delegate() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Delegate");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Delegate"))->offset;
return *reinterpret_cast<::System::Delegate**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Object[] m_Target
::ArrayW<::Il2CppObject*>& UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Target() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_m_Target");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Target"))->offset;
return *reinterpret_cast<::ArrayW<::Il2CppObject*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Single <InvocationTime>k__BackingField
float& UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_$InvocationTime$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::dyn_$InvocationTime$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<InvocationTime>k__BackingField"))->offset;
return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo.get_InvocationTime
float UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::get_InvocationTime() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::get_InvocationTime");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_InvocationTime", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo.set_InvocationTime
void UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::set_InvocationTime(float value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::set_InvocationTime");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_InvocationTime", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo..ctor
UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::DelegateInfo(::System::Delegate* d, float invocationTime, ::ArrayW<::Il2CppObject*> p) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(d), ::il2cpp_utils::ExtractType(invocationTime), ::il2cpp_utils::ExtractType(p)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, d, invocationTime, p);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo.Invoke
void UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::Invoke");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DelayedActionManager/UnityEngine.ResourceManagement.Util.DelegateInfo.ToString
::StringW UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DelayedActionManager::DelegateInfo::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Util.IInitializableObject
#include "UnityEngine/ResourceManagement/Util/IInitializableObject.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.Util.IInitializableObject.Initialize
bool UnityEngine::ResourceManagement::Util::IInitializableObject::Initialize(::StringW id, ::StringW data) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IInitializableObject::Initialize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Initialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(data)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, id, data);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.IInitializableObject.InitializeAsync
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<bool> UnityEngine::ResourceManagement::Util::IInitializableObject::InitializeAsync(::UnityEngine::ResourceManagement::ResourceManager* rm, ::StringW id, ::StringW data) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IInitializableObject::InitializeAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InitializeAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(data)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<bool>, false>(this, ___internal__method, rm, id, data);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Util.IObjectInitializationDataProvider
#include "UnityEngine/ResourceManagement/Util/IObjectInitializationDataProvider.hpp"
// Including type: UnityEngine.ResourceManagement.Util.ObjectInitializationData
#include "UnityEngine/ResourceManagement/Util/ObjectInitializationData.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.Util.IObjectInitializationDataProvider.get_Name
::StringW UnityEngine::ResourceManagement::Util::IObjectInitializationDataProvider::get_Name() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IObjectInitializationDataProvider::get_Name");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Name", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.IObjectInitializationDataProvider.CreateObjectInitializationData
::UnityEngine::ResourceManagement::Util::ObjectInitializationData UnityEngine::ResourceManagement::Util::IObjectInitializationDataProvider::CreateObjectInitializationData() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IObjectInitializationDataProvider::CreateObjectInitializationData");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateObjectInitializationData", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::Util::ObjectInitializationData, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.IAllocationStrategy
#include "UnityEngine/ResourceManagement/Util/IAllocationStrategy.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.Util.IAllocationStrategy.New
::Il2CppObject* UnityEngine::ResourceManagement::Util::IAllocationStrategy::New(::System::Type* type, int typeHash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IAllocationStrategy::New");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "New", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(typeHash)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, type, typeHash);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.IAllocationStrategy.Release
void UnityEngine::ResourceManagement::Util::IAllocationStrategy::Release(int typeHash, ::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::IAllocationStrategy::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(typeHash), ::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, typeHash, obj);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.DefaultAllocationStrategy
#include "UnityEngine/ResourceManagement/Util/DefaultAllocationStrategy.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.Util.DefaultAllocationStrategy.New
::Il2CppObject* UnityEngine::ResourceManagement::Util::DefaultAllocationStrategy::New(::System::Type* type, int typeHash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DefaultAllocationStrategy::New");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "New", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(typeHash)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, type, typeHash);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.DefaultAllocationStrategy.Release
void UnityEngine::ResourceManagement::Util::DefaultAllocationStrategy::Release(int typeHash, ::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::DefaultAllocationStrategy::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(typeHash), ::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, typeHash, obj);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy
#include "UnityEngine/ResourceManagement/Util/LRUCacheAllocationStrategy.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_poolMaxSize
int& UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolMaxSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolMaxSize");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_poolMaxSize"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_poolInitialCapacity
int& UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolInitialCapacity() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolInitialCapacity");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_poolInitialCapacity"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_poolCacheMaxSize
int& UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolCacheMaxSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolCacheMaxSize");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_poolCacheMaxSize"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Object>> m_poolCache
::System::Collections::Generic::List_1<::System::Collections::Generic::List_1<::Il2CppObject*>*>*& UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_poolCache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_poolCache"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::System::Collections::Generic::List_1<::Il2CppObject*>*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,System.Collections.Generic.List`1<System.Object>> m_cache
::System::Collections::Generic::Dictionary_2<int, ::System::Collections::Generic::List_1<::Il2CppObject*>*>*& UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_cache() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::dyn_m_cache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_cache"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::System::Collections::Generic::List_1<::Il2CppObject*>*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.GetPool
::System::Collections::Generic::List_1<::Il2CppObject*>* UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::GetPool() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::GetPool");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPool", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::List_1<::Il2CppObject*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.ReleasePool
void UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::ReleasePool(::System::Collections::Generic::List_1<::Il2CppObject*>* pool) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::ReleasePool");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleasePool", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pool)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, pool);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.New
::Il2CppObject* UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::New(::System::Type* type, int typeHash) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::New");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "New", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(typeHash)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, type, typeHash);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.Release
void UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::Release(int typeHash, ::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::LRUCacheAllocationStrategy::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(typeHash), ::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, typeHash, obj);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Util.SerializedTypeRestrictionAttribute
#include "UnityEngine/ResourceManagement/Util/SerializedTypeRestrictionAttribute.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Type type
::System::Type*& UnityEngine::ResourceManagement::Util::SerializedTypeRestrictionAttribute::dyn_type() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedTypeRestrictionAttribute::dyn_type");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "type"))->offset;
return *reinterpret_cast<::System::Type**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Util.SerializedType
#include "UnityEngine/ResourceManagement/Util/SerializedType.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.String m_AssemblyName
::StringW& UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_AssemblyName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_AssemblyName");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_AssemblyName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_ClassName
::StringW& UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_ClassName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_ClassName");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ClassName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Type m_CachedType
::System::Type*& UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_CachedType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::dyn_m_CachedType");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CachedType"))->offset;
return *reinterpret_cast<::System::Type**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean <ValueChanged>k__BackingField
bool& UnityEngine::ResourceManagement::Util::SerializedType::dyn_$ValueChanged$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::dyn_$ValueChanged$k__BackingField");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<ValueChanged>k__BackingField"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.get_AssemblyName
::StringW UnityEngine::ResourceManagement::Util::SerializedType::get_AssemblyName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::get_AssemblyName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_AssemblyName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.get_ClassName
::StringW UnityEngine::ResourceManagement::Util::SerializedType::get_ClassName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::get_ClassName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ClassName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.get_Value
::System::Type* UnityEngine::ResourceManagement::Util::SerializedType::get_Value() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::get_Value");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Value", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.set_Value
void UnityEngine::ResourceManagement::Util::SerializedType::set_Value(::System::Type* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::set_Value");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_Value", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.get_ValueChanged
bool UnityEngine::ResourceManagement::Util::SerializedType::get_ValueChanged() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::get_ValueChanged");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ValueChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.set_ValueChanged
void UnityEngine::ResourceManagement::Util::SerializedType::set_ValueChanged(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::set_ValueChanged");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_ValueChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.SerializedType.ToString
::StringW UnityEngine::ResourceManagement::Util::SerializedType::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::SerializedType::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Util.ObjectInitializationData
#include "UnityEngine/ResourceManagement/Util/ObjectInitializationData.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.String m_Id
::StringW& UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_Id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_Id");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Id"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.Util.SerializedType m_ObjectType
::UnityEngine::ResourceManagement::Util::SerializedType& UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_ObjectType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_ObjectType");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ObjectType"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::Util::SerializedType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_Data
::StringW& UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_Data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::dyn_m_Data");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Data"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ObjectInitializationData.get_Id
::StringW UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_Id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_Id");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Id", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ObjectInitializationData.get_ObjectType
::UnityEngine::ResourceManagement::Util::SerializedType UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_ObjectType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_ObjectType");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ObjectType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::Util::SerializedType, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ObjectInitializationData.get_Data
::StringW UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_Data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::get_Data");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Data", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ObjectInitializationData.GetAsyncInitHandle
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::Util::ObjectInitializationData::GetAsyncInitHandle(::UnityEngine::ResourceManagement::ResourceManager* rm, ::StringW idOverride) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::GetAsyncInitHandle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetAsyncInitHandle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(idOverride)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method, rm, idOverride);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ObjectInitializationData.ToString
::StringW UnityEngine::ResourceManagement::Util::ObjectInitializationData::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ObjectInitializationData::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.Util.ResourceManagerConfig
#include "UnityEngine/ResourceManagement/Util/ResourceManagerConfig.hpp"
// Including type: System.Array
#include "System/Array.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.Object
#include "UnityEngine/Object.hpp"
// Including type: System.Collections.IList
#include "System/Collections/IList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.Util.ResourceManagerConfig.ExtractKeyAndSubKey
bool UnityEngine::ResourceManagement::Util::ResourceManagerConfig::ExtractKeyAndSubKey(::Il2CppObject* keyObj, ByRef<::StringW> mainKey, ByRef<::StringW> subKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ResourceManagerConfig::ExtractKeyAndSubKey");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "ResourceManagerConfig", "ExtractKeyAndSubKey", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(keyObj), ::il2cpp_utils::ExtractIndependentType<::StringW&>(), ::il2cpp_utils::ExtractIndependentType<::StringW&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, keyObj, byref(mainKey), byref(subKey));
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ResourceManagerConfig.IsPathRemote
bool UnityEngine::ResourceManagement::Util::ResourceManagerConfig::IsPathRemote(::StringW path) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ResourceManagerConfig::IsPathRemote");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "ResourceManagerConfig", "IsPathRemote", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(path)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, path);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ResourceManagerConfig.ShouldPathUseWebRequest
bool UnityEngine::ResourceManagement::Util::ResourceManagerConfig::ShouldPathUseWebRequest(::StringW path) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ResourceManagerConfig::ShouldPathUseWebRequest");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "ResourceManagerConfig", "ShouldPathUseWebRequest", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(path)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, path);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ResourceManagerConfig.CreateArrayResult
::System::Array* UnityEngine::ResourceManagement::Util::ResourceManagerConfig::CreateArrayResult(::System::Type* type, ::ArrayW<::UnityEngine::Object*> allAssets) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ResourceManagerConfig::CreateArrayResult");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "ResourceManagerConfig", "CreateArrayResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(allAssets)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Array*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, type, allAssets);
}
// Autogenerated method: UnityEngine.ResourceManagement.Util.ResourceManagerConfig.CreateListResult
::System::Collections::IList* UnityEngine::ResourceManagement::Util::ResourceManagerConfig::CreateListResult(::System::Type* type, ::ArrayW<::UnityEngine::Object*> allAssets) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Util::ResourceManagerConfig::CreateListResult");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Util", "ResourceManagerConfig", "CreateListResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(allAssets)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::IList*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, type, allAssets);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource
#include "UnityEngine/ResourceManagement/ResourceProviders/IAssetBundleResource.hpp"
// Including type: UnityEngine.AssetBundle
#include "UnityEngine/AssetBundle.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource.GetAssetBundle
::UnityEngine::AssetBundle* UnityEngine::ResourceManagement::ResourceProviders::IAssetBundleResource::GetAssetBundle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IAssetBundleResource::GetAssetBundle");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetBundle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AssetBundle*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions
#include "UnityEngine/ResourceManagement/ResourceProviders/AssetBundleRequestOptions.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.String m_Hash
::StringW& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Hash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Hash");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Hash"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt32 m_Crc
uint& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Crc() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Crc");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Crc"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Timeout
int& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Timeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_Timeout");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Timeout"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_ChunkedTransfer
bool& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_ChunkedTransfer() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_ChunkedTransfer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ChunkedTransfer"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_RedirectLimit
int& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_RedirectLimit() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_RedirectLimit");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RedirectLimit"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_RetryCount
int& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_RetryCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_RetryCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RetryCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_BundleName
::StringW& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_BundleName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_BundleName");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_BundleName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 m_BundleSize
int64_t& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_BundleSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_BundleSize");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_BundleSize"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_UseCrcForCachedBundles
bool& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_UseCrcForCachedBundles() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_UseCrcForCachedBundles");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UseCrcForCachedBundles"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_ClearOtherCachedVersionsWhenLoaded
bool& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_ClearOtherCachedVersionsWhenLoaded() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::dyn_m_ClearOtherCachedVersionsWhenLoaded");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ClearOtherCachedVersionsWhenLoaded"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_Hash
::StringW UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Hash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Hash");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_Hash
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Hash(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Hash");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_Crc
uint UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Crc() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Crc");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Crc", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_Crc
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Crc(uint value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Crc");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Crc", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_Timeout
int UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Timeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_Timeout");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Timeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_Timeout
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Timeout(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_Timeout");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Timeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_ChunkedTransfer
bool UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_ChunkedTransfer() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_ChunkedTransfer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ChunkedTransfer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_ChunkedTransfer
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_ChunkedTransfer(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_ChunkedTransfer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ChunkedTransfer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_RedirectLimit
int UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_RedirectLimit() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_RedirectLimit");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RedirectLimit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_RedirectLimit
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_RedirectLimit(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_RedirectLimit");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_RedirectLimit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_RetryCount
int UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_RetryCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_RetryCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RetryCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_RetryCount
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_RetryCount(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_RetryCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_RetryCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_BundleName
::StringW UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_BundleName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_BundleName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BundleName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_BundleName
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_BundleName(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_BundleName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_BundleName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_BundleSize
int64_t UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_BundleSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_BundleSize");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BundleSize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_BundleSize
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_BundleSize(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_BundleSize");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_BundleSize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_UseCrcForCachedBundle
bool UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_UseCrcForCachedBundle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_UseCrcForCachedBundle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_UseCrcForCachedBundle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_UseCrcForCachedBundle
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_UseCrcForCachedBundle(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_UseCrcForCachedBundle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_UseCrcForCachedBundle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.get_ClearOtherCachedVersionsWhenLoaded
bool UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_ClearOtherCachedVersionsWhenLoaded() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::get_ClearOtherCachedVersionsWhenLoaded");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ClearOtherCachedVersionsWhenLoaded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.set_ClearOtherCachedVersionsWhenLoaded
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_ClearOtherCachedVersionsWhenLoaded(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::set_ClearOtherCachedVersionsWhenLoaded");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ClearOtherCachedVersionsWhenLoaded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions.ComputeSize
int64_t UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::ComputeSize(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::ResourceManagement::ResourceManager* resourceManager) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions::ComputeSize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ComputeSize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(resourceManager)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, location, resourceManager);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource
#include "UnityEngine/ResourceManagement/ResourceProviders/AssetBundleResource.hpp"
// Including type: UnityEngine.AssetBundle
#include "UnityEngine/AssetBundle.hpp"
// Including type: UnityEngine.Networking.DownloadHandlerAssetBundle
#include "UnityEngine/Networking/DownloadHandlerAssetBundle.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
// Including type: UnityEngine.ResourceManagement.WebRequestQueueOperation
#include "UnityEngine/ResourceManagement/WebRequestQueueOperation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions
#include "UnityEngine/ResourceManagement/ResourceProviders/AssetBundleRequestOptions.hpp"
// Including type: UnityEngine.Networking.UnityWebRequest
#include "UnityEngine/Networking/UnityWebRequest.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.Networking.UnityWebRequestAsyncOperation
#include "UnityEngine/Networking/UnityWebRequestAsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.AssetBundle m_AssetBundle
::UnityEngine::AssetBundle*& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_AssetBundle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_AssetBundle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_AssetBundle"))->offset;
return *reinterpret_cast<::UnityEngine::AssetBundle**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Networking.DownloadHandlerAssetBundle m_downloadHandler
::UnityEngine::Networking::DownloadHandlerAssetBundle*& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_downloadHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_downloadHandler");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_downloadHandler"))->offset;
return *reinterpret_cast<::UnityEngine::Networking::DownloadHandlerAssetBundle**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.AsyncOperation m_RequestOperation
::UnityEngine::AsyncOperation*& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_RequestOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_RequestOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RequestOperation"))->offset;
return *reinterpret_cast<::UnityEngine::AsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.WebRequestQueueOperation m_WebRequestQueueOperation
::UnityEngine::ResourceManagement::WebRequestQueueOperation*& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_WebRequestQueueOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_WebRequestQueueOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_WebRequestQueueOperation"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::WebRequestQueueOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle m_ProvideHandle
::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_ProvideHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_ProvideHandle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProvideHandle"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions m_Options
::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions*& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Options() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Options");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Options"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleRequestOptions**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Retries
int& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Retries() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Retries");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Retries"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 m_BytesToDownload
int64_t& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_BytesToDownload() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_BytesToDownload");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_BytesToDownload"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 m_DownloadedBytes
int64_t& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_DownloadedBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_DownloadedBytes");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DownloadedBytes"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Completed
bool& UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Completed() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::dyn_m_Completed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Completed"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.CreateWebRequest
::UnityEngine::Networking::UnityWebRequest* UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::CreateWebRequest(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* loc) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::CreateWebRequest");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateWebRequest", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(loc)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Networking::UnityWebRequest*, false>(this, ___internal__method, loc);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.PercentComplete
float UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::PercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::PercentComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PercentComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::GetDownloadStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::GetDownloadStatus");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.GetAssetBundle
::UnityEngine::AssetBundle* UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::GetAssetBundle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::GetAssetBundle");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetBundle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AssetBundle*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.Start
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::Start(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::Start");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.WaitForCompletionHandler
bool UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::WaitForCompletionHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::WaitForCompletionHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForCompletionHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.BeginOperation
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::BeginOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::BeginOperation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginOperation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.LocalRequestOperationCompleted
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::LocalRequestOperationCompleted(::UnityEngine::AsyncOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::LocalRequestOperationCompleted");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LocalRequestOperationCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.WebRequestOperationCompleted
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::WebRequestOperationCompleted(::UnityEngine::AsyncOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::WebRequestOperationCompleted");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WebRequestOperationCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.Unload
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::Unload() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::Unload");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Unload", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.<BeginOperation>b__16_0
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::$BeginOperation$b__16_0(::UnityEngine::Networking::UnityWebRequestAsyncOperation* asyncOp) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleResource::<BeginOperation>b__16_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<BeginOperation>b__16_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncOp)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncOp);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/AssetBundleProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle providerInterface) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(providerInterface)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, providerInterface);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider.GetDefaultType
::System::Type* UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::GetDefaultType(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::GetDefaultType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDefaultType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider.Release
void UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::Release(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::Il2CppObject* asset) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AssetBundleProvider::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(asset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, location, asset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.AtlasSpriteProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/AtlasSpriteProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.AtlasSpriteProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::AtlasSpriteProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle providerInterface) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::AtlasSpriteProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(providerInterface)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, providerInterface);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/BundledAssetProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/BundledAssetProvider_InternalOp.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/BundledAssetProvider_InternalOp.hpp"
// Including type: UnityEngine.AssetBundleRequest
#include "UnityEngine/AssetBundleRequest.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource
#include "UnityEngine/ResourceManagement/ResourceProviders/IAssetBundleResource.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.AssetBundleRequest m_RequestOperation
::UnityEngine::AssetBundleRequest*& UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_m_RequestOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_m_RequestOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RequestOperation"))->offset;
return *reinterpret_cast<::UnityEngine::AssetBundleRequest**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle m_ProvideHandle
::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle& UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_m_ProvideHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_m_ProvideHandle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProvideHandle"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String subObjectName
::StringW& UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_subObjectName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::dyn_subObjectName");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "subObjectName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.LoadBundleFromDependecies
::UnityEngine::ResourceManagement::ResourceProviders::IAssetBundleResource* UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::LoadBundleFromDependecies(::System::Collections::Generic::IList_1<::Il2CppObject*>* results) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::LoadBundleFromDependecies");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.ResourceProviders", "BundledAssetProvider/InternalOp", "LoadBundleFromDependecies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(results)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceProviders::IAssetBundleResource*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, results);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.Start
void UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::Start(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::Start");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.WaitForCompletionHandler
bool UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::WaitForCompletionHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::WaitForCompletionHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForCompletionHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.ActionComplete
void UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::ActionComplete(::UnityEngine::AsyncOperation* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::ActionComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ActionComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.ProgressCallback
float UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::ProgressCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::BundledAssetProvider::InternalOp::ProgressCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProgressCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters
#include "UnityEngine/ResourceManagement/ResourceProviders/InstantiationParameters.hpp"
// Including type: UnityEngine.Transform
#include "UnityEngine/Transform.hpp"
// Including type: UnityEngine.Object
#include "UnityEngine/Object.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Vector3 m_Position
::UnityEngine::Vector3& UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Position");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Position"))->offset;
return *reinterpret_cast<::UnityEngine::Vector3*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Quaternion m_Rotation
::UnityEngine::Quaternion& UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Rotation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Rotation");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Rotation"))->offset;
return *reinterpret_cast<::UnityEngine::Quaternion*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Transform m_Parent
::UnityEngine::Transform*& UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Parent() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_Parent");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Parent"))->offset;
return *reinterpret_cast<::UnityEngine::Transform**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_InstantiateInWorldPosition
bool& UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_InstantiateInWorldPosition() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_InstantiateInWorldPosition");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_InstantiateInWorldPosition"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_SetPositionRotation
bool& UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_SetPositionRotation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::dyn_m_SetPositionRotation");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_SetPositionRotation"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters.get_Position
::UnityEngine::Vector3 UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Position");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Vector3, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters.get_Rotation
::UnityEngine::Quaternion UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Rotation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Rotation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Rotation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Quaternion, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters.get_Parent
::UnityEngine::Transform* UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Parent() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_Parent");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Parent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Transform*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters.get_InstantiateInWorldPosition
bool UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_InstantiateInWorldPosition() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_InstantiateInWorldPosition");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_InstantiateInWorldPosition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters.get_SetPositionRotation
bool UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_SetPositionRotation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::get_SetPositionRotation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_SetPositionRotation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters..ctor
UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::InstantiationParameters(::UnityEngine::Transform* parent, bool instantiateInWorldSpace) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(parent), ::il2cpp_utils::ExtractType(instantiateInWorldSpace)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, parent, instantiateInWorldSpace);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters..ctor
UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::InstantiationParameters(::UnityEngine::Vector3 position, ::UnityEngine::Quaternion rotation, ::UnityEngine::Transform* parent) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(position), ::il2cpp_utils::ExtractType(rotation), ::il2cpp_utils::ExtractType(parent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, position, rotation, parent);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IInstanceProvider.hpp"
// Including type: UnityEngine.GameObject
#include "UnityEngine/GameObject.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters
#include "UnityEngine/ResourceManagement/ResourceProviders/InstantiationParameters.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider.ProvideInstance
::UnityEngine::GameObject* UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider::ProvideInstance(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*> prefabHandle, ::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters instantiateParameters) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider::ProvideInstance");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(prefabHandle), ::il2cpp_utils::ExtractType(instantiateParameters)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::GameObject*, false>(this, ___internal__method, resourceManager, prefabHandle, instantiateParameters);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IInstanceProvider.ReleaseInstance
void UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider::ReleaseInstance(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::GameObject* instance) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IInstanceProvider::ReleaseInstance");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(instance)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, resourceManager, instance);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags
#include "UnityEngine/ResourceManagement/ResourceProviders/ProviderBehaviourFlags.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags None
::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags>("UnityEngine.ResourceManagement.ResourceProviders", "ProviderBehaviourFlags", "None"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags None
void UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_set_None(::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.ResourceProviders", "ProviderBehaviourFlags", "None", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags CanProvideWithFailedDependencies
::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_get_CanProvideWithFailedDependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_get_CanProvideWithFailedDependencies");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags>("UnityEngine.ResourceManagement.ResourceProviders", "ProviderBehaviourFlags", "CanProvideWithFailedDependencies"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags CanProvideWithFailedDependencies
void UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_set_CanProvideWithFailedDependencies(::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::_set_CanProvideWithFailedDependencies");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.ResourceProviders", "ProviderBehaviourFlags", "CanProvideWithFailedDependencies", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/IGenericProviderOperation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.Func`1
#include "System/Func_1.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Version
int& UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_Version() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_Version");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Version"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation m_InternalOp
::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation*& UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_InternalOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_InternalOp");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_InternalOp"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceManager m_ResourceManager
::UnityEngine::ResourceManagement::ResourceManager*& UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_ResourceManager() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::dyn_m_ResourceManager");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ResourceManager"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.get_InternalOp
::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation* UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_InternalOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_InternalOp");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_InternalOp", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.get_ResourceManager
::UnityEngine::ResourceManagement::ResourceManager* UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_ResourceManager() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_ResourceManager");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ResourceManager", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceManager*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.get_Type
::System::Type* UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_Type() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_Type");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Type", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.get_Location
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_Location() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_Location");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Location", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.get_DependencyCount
int UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_DependencyCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::get_DependencyCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_DependencyCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle..ctor
UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::ProvideHandle(::UnityEngine::ResourceManagement::ResourceManager* rm, ::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rm, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.GetDependencies
void UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::GetDependencies(::System::Collections::Generic::IList_1<::Il2CppObject*>* list) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::GetDependencies");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(list)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, list);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.SetProgressCallback
void UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetProgressCallback(::System::Func_1<float>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetProgressCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "SetProgressCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.SetDownloadProgressCallbacks
void UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetDownloadProgressCallbacks(::System::Func_1<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetDownloadProgressCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "SetDownloadProgressCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle.SetWaitForCompletionCallback
void UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetWaitForCompletionCallback(::System::Func_1<bool>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle::SetWaitForCompletionCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "SetWaitForCompletionCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IResourceProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags
#include "UnityEngine/ResourceManagement/ResourceProviders/ProviderBehaviourFlags.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.get_ProviderId
::StringW UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::get_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::get_ProviderId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProviderId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.get_BehaviourFlags
::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::get_BehaviourFlags() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::get_BehaviourFlags");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BehaviourFlags", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.GetDefaultType
::System::Type* UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::GetDefaultType(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::GetDefaultType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDefaultType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.CanProvide
bool UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::CanProvide(::System::Type* type, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::CanProvide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CanProvide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, type, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.Release
void UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::Release(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::Il2CppObject* asset) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(asset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, location, asset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneInstance.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.SceneManagement.Scene m_Scene
::UnityEngine::SceneManagement::Scene& UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::dyn_m_Scene() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::dyn_m_Scene");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Scene"))->offset;
return *reinterpret_cast<::UnityEngine::SceneManagement::Scene*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: UnityEngine.AsyncOperation m_Operation
::UnityEngine::AsyncOperation*& UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::dyn_m_Operation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::dyn_m_Operation");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Operation"))->offset;
return *reinterpret_cast<::UnityEngine::AsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.get_Scene
::UnityEngine::SceneManagement::Scene UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::get_Scene() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::get_Scene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Scene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::SceneManagement::Scene, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.set_Scene
void UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::set_Scene(::UnityEngine::SceneManagement::Scene value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::set_Scene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_Scene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.Activate
void UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::Activate() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::Activate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Activate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.ActivateAsync
::UnityEngine::AsyncOperation* UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::ActivateAsync() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::ActivateAsync");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "ActivateAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AsyncOperation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.GetHashCode
int UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::GetHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::GetHashCode");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetHashCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.Equals
bool UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::Equals(::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance::Equals");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Equals", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, obj);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ISceneProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/ISceneProvider.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.SceneManagement.LoadSceneMode
#include "UnityEngine/SceneManagement/LoadSceneMode.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ISceneProvider.ProvideScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider::ProvideScene(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::SceneManagement::LoadSceneMode loadMode, bool activateOnLoad, int priority) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider::ProvideScene");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(loadMode), ::il2cpp_utils::ExtractType(activateOnLoad), ::il2cpp_utils::ExtractType(priority)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, resourceManager, location, loadMode, activateOnLoad, priority);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ISceneProvider.ReleaseScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider::ReleaseScene(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> sceneLoadHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ISceneProvider::ReleaseScene");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(sceneLoadHandle)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, resourceManager, sceneLoadHandle);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/InstanceProvider.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: UnityEngine.GameObject
#include "UnityEngine/GameObject.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.InstantiationParameters
#include "UnityEngine/ResourceManagement/ResourceProviders/InstantiationParameters.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<UnityEngine.GameObject,UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1<UnityEngine.GameObject>> m_InstanceObjectToPrefabHandle
::System::Collections::Generic::Dictionary_2<::UnityEngine::GameObject*, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*>>*& UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::dyn_m_InstanceObjectToPrefabHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::dyn_m_InstanceObjectToPrefabHandle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_InstanceObjectToPrefabHandle"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::UnityEngine::GameObject*, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*>>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider.ProvideInstance
::UnityEngine::GameObject* UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::ProvideInstance(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::GameObject*> prefabHandle, ::UnityEngine::ResourceManagement::ResourceProviders::InstantiationParameters instantiateParameters) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::ProvideInstance");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(prefabHandle), ::il2cpp_utils::ExtractType(instantiateParameters)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::GameObject*, false>(this, ___internal__method, resourceManager, prefabHandle, instantiateParameters);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider.ReleaseInstance
void UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::ReleaseInstance(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::GameObject* instance) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::InstanceProvider::ReleaseInstance");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(instance)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, resourceManager, instance);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.JsonAssetProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/JsonAssetProvider.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.JsonAssetProvider.Convert
::Il2CppObject* UnityEngine::ResourceManagement::ResourceProviders::JsonAssetProvider::Convert(::System::Type* type, ::StringW text) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::JsonAssetProvider::Convert");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Convert", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(text)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, type, text);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/LegacyResourcesProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/LegacyResourcesProvider_InternalOp.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle pi) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pi)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, pi);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider.Release
void UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::Release(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::Il2CppObject* asset) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(asset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, location, asset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/LegacyResourcesProvider_InternalOp.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.AsyncOperation m_RequestOperation
::UnityEngine::AsyncOperation*& UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::dyn_m_RequestOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::dyn_m_RequestOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RequestOperation"))->offset;
return *reinterpret_cast<::UnityEngine::AsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle m_ProvideHandle
::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle& UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::dyn_m_ProvideHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::dyn_m_ProvideHandle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProvideHandle"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.Start
void UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::Start(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::Start");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.AsyncOperationCompleted
void UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::AsyncOperationCompleted(::UnityEngine::AsyncOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::AsyncOperationCompleted");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AsyncOperationCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.PercentComplete
float UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::PercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::LegacyResourcesProvider::InternalOp::PercentComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PercentComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase
#include "UnityEngine/ResourceManagement/ResourceProviders/ResourceProviderBase.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.BaseInitAsyncOp
#include "UnityEngine/ResourceManagement/ResourceProviders/ResourceProviderBase_BaseInitAsyncOp.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.<>c__DisplayClass10_0
#include "UnityEngine/ResourceManagement/ResourceProviders/ResourceProviderBase_--c__DisplayClass10_0.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: protected System.String m_ProviderId
::StringW& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::dyn_m_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::dyn_m_ProviderId");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProviderId"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: protected UnityEngine.ResourceManagement.ResourceProviders.ProviderBehaviourFlags m_BehaviourFlags
::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::dyn_m_BehaviourFlags() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::dyn_m_BehaviourFlags");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_BehaviourFlags"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.get_ProviderId
::StringW UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::get_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::get_ProviderId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProviderId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.get_BehaviourFlags
::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::UnityEngine_ResourceManagement_ResourceProviders_IResourceProvider_get_BehaviourFlags() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.get_BehaviourFlags");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.get_BehaviourFlags", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceProviders::ProviderBehaviourFlags, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.Initialize
bool UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Initialize(::StringW id, ::StringW data) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Initialize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Initialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(data)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, id, data);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.CanProvide
bool UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::CanProvide(::System::Type* t, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::CanProvide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CanProvide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t), ::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, t, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.Release
void UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Release(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::Il2CppObject* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Release");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, location, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.GetDefaultType
::System::Type* UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::GetDefaultType(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::GetDefaultType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDefaultType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method, location);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.Provide
void UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.InitializeAsync
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<bool> UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::InitializeAsync(::UnityEngine::ResourceManagement::ResourceManager* rm, ::StringW id, ::StringW data) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::InitializeAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InitializeAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(data)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<bool>, false>(this, ___internal__method, rm, id, data);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase.ToString
::StringW UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.BaseInitAsyncOp
#include "UnityEngine/ResourceManagement/ResourceProviders/ResourceProviderBase_BaseInitAsyncOp.hpp"
// Including type: System.Func`1
#include "System/Func_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Func`1<System.Boolean> m_CallBack
::System::Func_1<bool>*& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::dyn_m_CallBack() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::dyn_m_CallBack");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CallBack"))->offset;
return *reinterpret_cast<::System::Func_1<bool>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.BaseInitAsyncOp.Init
void UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::Init(::System::Func_1<bool>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.BaseInitAsyncOp.InvokeWaitForCompletion
bool UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::InvokeWaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::InvokeWaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeWaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.BaseInitAsyncOp.Execute
void UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::Execute() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::BaseInitAsyncOp::Execute");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Execute", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.<>c__DisplayClass10_0
#include "UnityEngine/ResourceManagement/ResourceProviders/ResourceProviderBase_--c__DisplayClass10_0.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase <>4__this
::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase*& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_$$4__this");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.String id
::StringW& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_id");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "id"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.String data
::StringW& UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::dyn_data");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "data"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ResourceProviderBase/UnityEngine.ResourceManagement.ResourceProviders.<>c__DisplayClass10_0.<InitializeAsync>b__0
bool UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::$InitializeAsync$b__0() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ResourceProviderBase::$$c__DisplayClass10_0::<InitializeAsync>b__0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<InitializeAsync>b__0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProviderLoadRequestOptions
#include "UnityEngine/ResourceManagement/ResourceProviders/ProviderLoadRequestOptions.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_IgnoreFailures
bool& UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::dyn_m_IgnoreFailures() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::dyn_m_IgnoreFailures");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_IgnoreFailures"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProviderLoadRequestOptions.get_IgnoreFailures
bool UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::get_IgnoreFailures() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::get_IgnoreFailures");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IgnoreFailures", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.ProviderLoadRequestOptions.set_IgnoreFailures
void UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::set_IgnoreFailures(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::ProviderLoadRequestOptions::set_IgnoreFailures");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IgnoreFailures", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneProvider_SceneOp.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneProvider_UnloadSceneOp.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.SceneManagement.LoadSceneMode
#include "UnityEngine/SceneManagement/LoadSceneMode.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider.ProvideScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::ProvideScene(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::SceneManagement::LoadSceneMode loadMode, bool activateOnLoad, int priority) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::ProvideScene");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ProvideScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(loadMode), ::il2cpp_utils::ExtractType(activateOnLoad), ::il2cpp_utils::ExtractType(priority)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, resourceManager, location, loadMode, activateOnLoad, priority);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider.ReleaseScene
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::ReleaseScene(::UnityEngine::ResourceManagement::ResourceManager* resourceManager, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> sceneLoadHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::ReleaseScene");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resourceManager), ::il2cpp_utils::ExtractType(sceneLoadHandle)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>, false>(this, ___internal__method, resourceManager, sceneLoadHandle);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneProvider_SceneOp.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_ActivateOnLoad
bool& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_ActivateOnLoad() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_ActivateOnLoad");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ActivateOnLoad"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.SceneInstance m_Inst
::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Inst() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Inst");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Inst"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation m_Location
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Location() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Location");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Location"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.SceneManagement.LoadSceneMode m_LoadMode
::UnityEngine::SceneManagement::LoadSceneMode& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_LoadMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_LoadMode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_LoadMode"))->offset;
return *reinterpret_cast<::UnityEngine::SceneManagement::LoadSceneMode*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Priority
int& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Priority() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_Priority");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Priority"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1<System.Collections.Generic.IList`1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle>> m_DepOp
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*>& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_DepOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_DepOp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DepOp"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceManager m_ResourceManager
::UnityEngine::ResourceManagement::ResourceManager*& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_ResourceManager() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::dyn_m_ResourceManager");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ResourceManager"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.Init
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Init(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::SceneManagement::LoadSceneMode loadMode, bool activateOnLoad, int priority, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*> depOp) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(loadMode), ::il2cpp_utils::ExtractType(activateOnLoad), ::il2cpp_utils::ExtractType(priority), ::il2cpp_utils::ExtractType(depOp)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, location, loadMode, activateOnLoad, priority, depOp);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.InternalLoadScene
::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InternalLoadScene(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, bool loadingFromBundle, ::UnityEngine::SceneManagement::LoadSceneMode loadMode, bool activateOnLoad, int priority) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InternalLoadScene");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InternalLoadScene", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(loadingFromBundle), ::il2cpp_utils::ExtractType(loadMode), ::il2cpp_utils::ExtractType(activateOnLoad), ::il2cpp_utils::ExtractType(priority)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance, false>(this, ___internal__method, location, loadingFromBundle, loadMode, activateOnLoad, priority);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.InternalLoad
::UnityEngine::AsyncOperation* UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InternalLoad(::StringW path, bool loadingFromBundle, ::UnityEngine::SceneManagement::LoadSceneMode mode) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InternalLoad");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InternalLoad", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(path), ::il2cpp_utils::ExtractType(loadingFromBundle), ::il2cpp_utils::ExtractType(mode)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AsyncOperation*, false>(this, ___internal__method, path, loadingFromBundle, mode);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.UnityEngine.ResourceManagement.IUpdateReceiver.Update
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::UnityEngine_ResourceManagement_IUpdateReceiver_Update(float unscaledDeltaTime) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::UnityEngine.ResourceManagement.IUpdateReceiver.Update");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnityEngine.ResourceManagement.IUpdateReceiver.Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(unscaledDeltaTime)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, unscaledDeltaTime);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.get_DebugName
::StringW UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::get_DebugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::get_DebugName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DebugName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.get_Progress
float UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::get_Progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::get_Progress");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Progress", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::GetDownloadStatus(::System::Collections::Generic::HashSet_1<::Il2CppObject*>* visited) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::GetDownloadStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(visited)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method, visited);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.InvokeWaitForCompletion
bool UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InvokeWaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::InvokeWaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeWaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.GetDependencies
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::GetDependencies(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::GetDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.Execute
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Execute() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Execute");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Execute", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.SceneOp.Destroy
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Destroy() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::SceneOp::Destroy");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Destroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp
#include "UnityEngine/ResourceManagement/ResourceProviders/SceneProvider_UnloadSceneOp.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.SceneInstance m_Instance
::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::dyn_m_Instance() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::dyn_m_Instance");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Instance"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1<UnityEngine.ResourceManagement.ResourceProviders.SceneInstance> m_sceneLoadHandle
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>& UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::dyn_m_sceneLoadHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::dyn_m_sceneLoadHandle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_sceneLoadHandle"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.Init
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::Init(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::UnityEngine::ResourceManagement::ResourceProviders::SceneInstance> sceneLoadHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sceneLoadHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, sceneLoadHandle);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.UnloadSceneCompleted
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::UnloadSceneCompleted(::UnityEngine::AsyncOperation* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::UnloadSceneCompleted");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnloadSceneCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.UnloadSceneCompletedNoRelease
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::UnloadSceneCompletedNoRelease(::UnityEngine::AsyncOperation* obj) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::UnloadSceneCompletedNoRelease");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnloadSceneCompletedNoRelease", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(obj)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, obj);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.get_Progress
float UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::get_Progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::get_Progress");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Progress", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.Execute
void UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::Execute() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::Execute");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Execute", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider/UnityEngine.ResourceManagement.ResourceProviders.UnloadSceneOp.InvokeWaitForCompletion
bool UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::InvokeWaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::SceneProvider::UnloadSceneOp::InvokeWaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeWaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/TextDataProvider.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/TextDataProvider_InternalOp.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle
#include "UnityEngine/ResourceManagement/ResourceProviders/ProvideHandle.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Boolean <IgnoreFailures>k__BackingField
bool& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::dyn_$IgnoreFailures$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::dyn_$IgnoreFailures$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<IgnoreFailures>k__BackingField"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider.get_IgnoreFailures
bool UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::get_IgnoreFailures() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::get_IgnoreFailures");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IgnoreFailures", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider.set_IgnoreFailures
void UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::set_IgnoreFailures(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::set_IgnoreFailures");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IgnoreFailures", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider.Convert
::Il2CppObject* UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::Convert(::System::Type* type, ::StringW text) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::Convert");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Convert", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(text)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, type, text);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider.Provide
void UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::Provide(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::Provide");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Provide", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp
#include "UnityEngine/ResourceManagement/ResourceProviders/TextDataProvider_InternalOp.hpp"
// Including type: UnityEngine.Networking.UnityWebRequestAsyncOperation
#include "UnityEngine/Networking/UnityWebRequestAsyncOperation.hpp"
// Including type: UnityEngine.ResourceManagement.WebRequestQueueOperation
#include "UnityEngine/ResourceManagement/WebRequestQueueOperation.hpp"
// Including type: UnityEngine.AsyncOperation
#include "UnityEngine/AsyncOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider m_Provider
::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider*& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_Provider() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_Provider");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Provider"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Networking.UnityWebRequestAsyncOperation m_RequestOperation
::UnityEngine::Networking::UnityWebRequestAsyncOperation*& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_RequestOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_RequestOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RequestOperation"))->offset;
return *reinterpret_cast<::UnityEngine::Networking::UnityWebRequestAsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.WebRequestQueueOperation m_RequestQueueOperation
::UnityEngine::ResourceManagement::WebRequestQueueOperation*& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_RequestQueueOperation() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_RequestQueueOperation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_RequestQueueOperation"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::WebRequestQueueOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle m_PI
::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_PI() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_PI");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_PI"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_IgnoreFailures
bool& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_IgnoreFailures() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_IgnoreFailures");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_IgnoreFailures"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Complete
bool& UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_Complete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::dyn_m_Complete");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Complete"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.GetPercentComplete
float UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::GetPercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::GetPercentComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPercentComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.Start
void UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::Start(::UnityEngine::ResourceManagement::ResourceProviders::ProvideHandle provideHandle, ::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider* rawProvider, bool ignoreFailures) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::Start");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(provideHandle), ::il2cpp_utils::ExtractType(rawProvider), ::il2cpp_utils::ExtractType(ignoreFailures)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, provideHandle, rawProvider, ignoreFailures);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.WaitForCompletionHandler
bool UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::WaitForCompletionHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::WaitForCompletionHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForCompletionHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.RequestOperation_completed
void UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::RequestOperation_completed(::UnityEngine::AsyncOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::RequestOperation_completed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RequestOperation_completed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.ConvertText
::Il2CppObject* UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::ConvertText(::StringW text) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::ConvertText");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ConvertText", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(text)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, text);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider/UnityEngine.ResourceManagement.ResourceProviders.InternalOp.<Start>b__7_0
void UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::$Start$b__7_0(::UnityEngine::Networking::UnityWebRequestAsyncOperation* asyncOperation) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceProviders::TextDataProvider::InternalOp::<Start>b__7_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<Start>b__7_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncOperation)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncOperation);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.ResourceLocations.ILocationSizeData
#include "UnityEngine/ResourceManagement/ResourceLocations/ILocationSizeData.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ILocationSizeData.ComputeSize
int64_t UnityEngine::ResourceManagement::ResourceLocations::ILocationSizeData::ComputeSize(::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::ResourceManagement::ResourceManager* resourceManager) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ILocationSizeData::ComputeSize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ComputeSize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(resourceManager)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, location, resourceManager);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.Type
#include "System/Type.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_InternalId
::StringW UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_InternalId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_InternalId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InternalId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_ProviderId
::StringW UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_ProviderId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProviderId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_Dependencies
::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>* UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_Dependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_Dependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Dependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_DependencyHashCode
int UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_DependencyHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_DependencyHashCode");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DependencyHashCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_HasDependencies
bool UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_HasDependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_HasDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_Data
::Il2CppObject* UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_Data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_Data");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Data", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_PrimaryKey
::StringW UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_PrimaryKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_PrimaryKey");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PrimaryKey", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.get_ResourceType
::System::Type* UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_ResourceType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::get_ResourceType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ResourceType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation.Hash
int UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::Hash(::System::Type* resultType) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation::Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(resultType)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, resultType);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase
#include "UnityEngine/ResourceManagement/ResourceLocations/ResourceLocationBase.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.String m_Name
::StringW& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Name() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Name");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Name"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_Id
::StringW& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Id() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Id");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Id"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_ProviderId
::StringW& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_ProviderId");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ProviderId"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Object m_Data
::Il2CppObject*& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Data");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Data"))->offset;
return *reinterpret_cast<::Il2CppObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_DependencyHashCode
int& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_DependencyHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_DependencyHashCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DependencyHashCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_HashCode
int& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_HashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_HashCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_HashCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Type m_Type
::System::Type*& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Type() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Type");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Type"))->offset;
return *reinterpret_cast<::System::Type**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation> m_Dependencies
::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>*& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Dependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_Dependencies");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Dependencies"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_PrimaryKey
::StringW& UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_PrimaryKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::dyn_m_PrimaryKey");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_PrimaryKey"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_InternalId
::StringW UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_InternalId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_InternalId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InternalId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_ProviderId
::StringW UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_ProviderId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_ProviderId");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProviderId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_Dependencies
::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>* UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_Dependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_Dependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Dependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_HasDependencies
bool UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_HasDependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_HasDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_Data
::Il2CppObject* UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_Data() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_Data");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Data", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.set_Data
void UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::set_Data(::Il2CppObject* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::set_Data");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Data", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_PrimaryKey
::StringW UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_PrimaryKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_PrimaryKey");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PrimaryKey", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.set_PrimaryKey
void UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::set_PrimaryKey(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::set_PrimaryKey");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_PrimaryKey", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_DependencyHashCode
int UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_DependencyHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_DependencyHashCode");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DependencyHashCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.get_ResourceType
::System::Type* UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_ResourceType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::get_ResourceType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ResourceType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.Hash
int UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::Hash(::System::Type* t) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, t);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.ComputeDependencyHash
void UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::ComputeDependencyHash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::ComputeDependencyHash");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ComputeDependencyHash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.ResourceLocations.ResourceLocationBase.ToString
::StringW UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::ToString() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::ResourceLocations::ResourceLocationBase::ToString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ToString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent
#include "UnityEngine/ResourceManagement/Diagnostics/DiagnosticEvent.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.String m_Graph
::StringW& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Graph() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Graph");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Graph"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32[] m_Dependencies
::ArrayW<int>& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Dependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Dependencies");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Dependencies"))->offset;
return *reinterpret_cast<::ArrayW<int>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_ObjectId
int& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_ObjectId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_ObjectId");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ObjectId"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_DisplayName
::StringW& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_DisplayName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_DisplayName");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DisplayName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Stream
int& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Stream() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Stream");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Stream"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Frame
int& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Frame() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Frame");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Frame"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Value
int& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Value() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::dyn_m_Value");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Value"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_Graph
::StringW UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Graph() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Graph");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Graph", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_ObjectId
int UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_ObjectId() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_ObjectId");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ObjectId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_DisplayName
::StringW UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_DisplayName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_DisplayName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_DisplayName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_Dependencies
::ArrayW<int> UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Dependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Dependencies");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Dependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<int>, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_Stream
int UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Stream() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Stream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Stream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_Frame
int UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Frame() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Frame");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Frame", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.get_Value
int UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Value() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::get_Value");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Value", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent..ctor
UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::DiagnosticEvent(::StringW graph, ::StringW name, int id, int stream, int frame, int value, ::ArrayW<int> deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(graph), ::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(stream), ::il2cpp_utils::ExtractType(frame), ::il2cpp_utils::ExtractType(value), ::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, graph, name, id, stream, frame, value, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.Serialize
::ArrayW<uint8_t> UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::Serialize() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::Serialize");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Serialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent.Deserialize
::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::Deserialize(::ArrayW<uint8_t> data) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent::Deserialize");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEvent", "Deserialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(data)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, data);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton
#include "UnityEngine/ResourceManagement/Diagnostics/DiagnosticEventCollectorSingleton.hpp"
// Including type: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c
#include "UnityEngine/ResourceManagement/Diagnostics/DiagnosticEventCollectorSingleton_--c.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: DelegateList`1
#include "GlobalNamespace/DelegateList_1.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private System.Guid s_editorConnectionGuid
::System::Guid UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::_get_s_editorConnectionGuid() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::_get_s_editorConnectionGuid");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Guid>("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton", "s_editorConnectionGuid"));
}
// Autogenerated static field setter
// Set static field: static private System.Guid s_editorConnectionGuid
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::_set_s_editorConnectionGuid(::System::Guid value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::_set_s_editorConnectionGuid");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton", "s_editorConnectionGuid", value));
}
// Autogenerated instance field getter
// Get instance field: System.Collections.Generic.Dictionary`2<System.Int32,UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent> m_CreatedEvents
::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>*& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_CreatedEvents() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_CreatedEvents");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CreatedEvents"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Collections.Generic.List`1<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent> m_UnhandledEvents
::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>*& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_UnhandledEvents() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_UnhandledEvents");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_UnhandledEvents"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: DelegateList`1<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent> s_EventHandlers
::GlobalNamespace::DelegateList_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>*& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_s_EventHandlers() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_s_EventHandlers");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "s_EventHandlers"))->offset;
return *reinterpret_cast<::GlobalNamespace::DelegateList_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Single m_lastTickSent
float& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_lastTickSent() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_lastTickSent");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_lastTickSent"))->offset;
return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_lastFrame
int& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_lastFrame() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_m_lastFrame");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_lastFrame"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Single fpsAvg
float& UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_fpsAvg() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::dyn_fpsAvg");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "fpsAvg"))->offset;
return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.get_PlayerConnectionGuid
::System::Guid UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::get_PlayerConnectionGuid() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::get_PlayerConnectionGuid");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton", "get_PlayerConnectionGuid", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Guid, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.RegisterEventHandler
bool UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::RegisterEventHandler(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* handler, bool _register, bool create) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::RegisterEventHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton", "RegisterEventHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handler), ::il2cpp_utils::ExtractType(_register), ::il2cpp_utils::ExtractType(create)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, handler, _register, create);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.RegisterEventHandler
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::RegisterEventHandler(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* handler) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::RegisterEventHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterEventHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handler)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handler);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.UnregisterEventHandler
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::UnregisterEventHandler(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* handler) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::UnregisterEventHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnregisterEventHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handler)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handler);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.PostEvent
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::PostEvent(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent diagnosticEvent) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::PostEvent");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PostEvent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(diagnosticEvent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, diagnosticEvent);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.Update
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::Update() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::Update");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.GetGameObjectName
::StringW UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::GetGameObjectName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::GetGameObjectName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGameObjectName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton.Awake
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::Awake() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::Awake");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Awake", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c
#include "UnityEngine/ResourceManagement/Diagnostics/DiagnosticEventCollectorSingleton_--c.hpp"
// Including type: System.Func`2
#include "System/Func_2.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public readonly UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c <>9
::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c* UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c*>("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9")));
}
// Autogenerated static field setter
// Set static field: static public readonly UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c <>9
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9");
THROW_UNLESS((il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9", value)));
}
// Autogenerated static field getter
// Get static field: static public System.Func`2<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent,System.Int32> <>9__8_0
::System::Func_2<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent, int>* UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9__8_0() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9__8_0");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Func_2<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent, int>*>("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9__8_0")));
}
// Autogenerated static field setter
// Set static field: static public System.Func`2<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent,System.Int32> <>9__8_0
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9__8_0(::System::Func_2<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent, int>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9__8_0");
THROW_UNLESS((il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9__8_0", value)));
}
// Autogenerated static field getter
// Get static field: static public System.Action`1<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent> <>9__11_0
::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9__11_0() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_get_$$9__11_0");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>*>("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9__11_0")));
}
// Autogenerated static field setter
// Set static field: static public System.Action`1<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEvent> <>9__11_0
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9__11_0(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_set_$$9__11_0");
THROW_UNLESS((il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", "<>9__11_0", value)));
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c..cctor
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollectorSingleton/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c.<RegisterEventHandler>b__8_0
int UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::$RegisterEventHandler$b__8_0(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent evt) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::<RegisterEventHandler>b__8_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<RegisterEventHandler>b__8_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(evt)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, evt);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton/UnityEngine.ResourceManagement.Diagnostics.<>c.<Awake>b__11_0
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::$Awake$b__11_0(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent diagnosticEvent) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollectorSingleton::$$c::<Awake>b__11_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<Awake>b__11_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(diagnosticEvent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, diagnosticEvent);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector
#include "UnityEngine/ResourceManagement/Diagnostics/DiagnosticEventCollector.hpp"
// Including type: System.Guid
#include "System/Guid.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector s_Collector
::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector* UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::_get_s_Collector() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::_get_s_Collector");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector*>("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollector", "s_Collector"));
}
// Autogenerated static field setter
// Set static field: static private UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector s_Collector
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::_set_s_Collector(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::_set_s_Collector");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollector", "s_Collector", value));
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector.get_PlayerConnectionGuid
::System::Guid UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::get_PlayerConnectionGuid() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::get_PlayerConnectionGuid");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollector", "get_PlayerConnectionGuid", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Guid, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector.FindOrCreateGlobalInstance
::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector* UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::FindOrCreateGlobalInstance() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::FindOrCreateGlobalInstance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollector", "FindOrCreateGlobalInstance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector.RegisterEventHandler
bool UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::RegisterEventHandler(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* handler, bool _register, bool create) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::RegisterEventHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("UnityEngine.ResourceManagement.Diagnostics", "DiagnosticEventCollector", "RegisterEventHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handler), ::il2cpp_utils::ExtractType(_register), ::il2cpp_utils::ExtractType(create)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, handler, _register, create);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector.UnregisterEventHandler
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::UnregisterEventHandler(::System::Action_1<::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent>* handler) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::UnregisterEventHandler");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnregisterEventHandler", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handler)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handler);
}
// Autogenerated method: UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollector.PostEvent
void UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::PostEvent(::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEvent diagnosticEvent) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::Diagnostics::DiagnosticEventCollector::PostEvent");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PostEvent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(diagnosticEvent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, diagnosticEvent);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.AsyncOperations.ICachable
#include "UnityEngine/ResourceManagement/AsyncOperations/ICachable.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.ICachable.get_Hash
int UnityEngine::ResourceManagement::AsyncOperations::ICachable::get_Hash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::ICachable::get_Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.ICachable.set_Hash
void UnityEngine::ResourceManagement::AsyncOperations::ICachable::set_Hash(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::ICachable::set_Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/IAsyncOperation.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationStatus.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
// Including type: System.Threading.Tasks.Task`1
#include "System/Threading/Tasks/Task_1.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/DownloadStatus.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: DelegateList`1
#include "GlobalNamespace/DelegateList_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_ResultType
::System::Type* UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_ResultType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_ResultType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ResultType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_Version
int UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Version() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Version");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Version", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_DebugName
::StringW UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_DebugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_DebugName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DebugName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_ReferenceCount
int UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_ReferenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_ReferenceCount");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReferenceCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_PercentComplete
float UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_PercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_PercentComplete");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PercentComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_Status
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Status() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Status");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Status", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_OperationException
::System::Exception* UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_OperationException() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_OperationException");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_OperationException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Exception*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_IsDone
bool UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_IsDone() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_IsDone");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsDone", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.set_OnDestroy
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::set_OnDestroy(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::set_OnDestroy");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_OnDestroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_IsRunning
bool UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_IsRunning() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_IsRunning");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsRunning", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_Task
::System::Threading::Tasks::Task_1<::Il2CppObject*>* UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Task() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Task");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Task", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task_1<::Il2CppObject*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.get_Handle
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::get_Handle");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Handle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.add_CompletedTypeless
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::add_CompletedTypeless(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::add_CompletedTypeless");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "add_CompletedTypeless", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.remove_CompletedTypeless
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::remove_CompletedTypeless(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::remove_CompletedTypeless");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "remove_CompletedTypeless", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.add_Destroyed
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::add_Destroyed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::add_Destroyed");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "add_Destroyed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.remove_Destroyed
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::remove_Destroyed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::remove_Destroyed");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "remove_Destroyed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.GetResultAsObject
::Il2CppObject* UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetResultAsObject() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetResultAsObject");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetResultAsObject", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.DecrementReferenceCount
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::DecrementReferenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::DecrementReferenceCount");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DecrementReferenceCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.IncrementReferenceCount
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::IncrementReferenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::IncrementReferenceCount");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IncrementReferenceCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetDownloadStatus(::System::Collections::Generic::HashSet_1<::Il2CppObject*>* visited) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetDownloadStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(visited)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method, visited);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.GetDependencies
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetDependencies(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::GetDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.InvokeCompletionEvent
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::InvokeCompletionEvent() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::InvokeCompletionEvent");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeCompletionEvent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.Start
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::Start(::UnityEngine::ResourceManagement::ResourceManager* rm, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle dependency, ::GlobalNamespace::DelegateList_1<float>* updateCallbacks) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::Start");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(dependency), ::il2cpp_utils::ExtractType(updateCallbacks)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rm, dependency, updateCallbacks);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.WaitForCompletion
void UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::WaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation::WaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/IAsyncOperation.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationStatus.hpp"
// Including type: System.Threading.Tasks.Task`1
#include "System/Threading/Tasks/Task_1.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/DownloadStatus.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation m_InternalOp
::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*& UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_InternalOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_InternalOp");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_InternalOp"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_Version
int& UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_Version() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_Version");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Version"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String m_LocationName
::StringW& UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_LocationName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::dyn_m_LocationName");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_LocationName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_LocationName
::StringW UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_LocationName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_LocationName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_LocationName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.set_LocationName
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::set_LocationName(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::set_LocationName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_LocationName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_DebugName
::StringW UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_DebugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_DebugName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_DebugName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_InternalOp
::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_InternalOp() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_InternalOp");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_InternalOp", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_IsDone
bool UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_IsDone() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_IsDone");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_IsDone", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_OperationException
::System::Exception* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_OperationException() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_OperationException");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_OperationException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Exception*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_PercentComplete
float UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_PercentComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_PercentComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_PercentComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_ReferenceCount
int UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_ReferenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_ReferenceCount");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ReferenceCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_Result
::Il2CppObject* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Result() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Result");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Result", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_Status
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Status() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Status");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Status", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_Task
::System::Threading::Tasks::Task_1<::Il2CppObject*>* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Task() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::get_Task");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Task", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task_1<::Il2CppObject*>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.System.Collections.IEnumerator.get_Current
::Il2CppObject* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System_Collections_IEnumerator_get_Current() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System.Collections.IEnumerator.get_Current");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "System.Collections.IEnumerator.get_Current", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.add_Completed
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::add_Completed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::add_Completed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "add_Completed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.remove_Completed
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::remove_Completed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::remove_Completed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "remove_Completed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.add_Destroyed
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::add_Destroyed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::add_Destroyed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "add_Destroyed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.remove_Destroyed
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::remove_Destroyed(::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::remove_Destroyed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "remove_Destroyed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle..ctor
UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::AsyncOperationHandle(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle..ctor
UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::AsyncOperationHandle(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* op, int version) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op), ::il2cpp_utils::ExtractType(version)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op, version);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle..ctor
UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::AsyncOperationHandle(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* op, ::StringW locationName) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op), ::il2cpp_utils::ExtractType(locationName)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op, locationName);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle..ctor
// ABORTED elsewhere. UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::AsyncOperationHandle(::UnityEngine::ResourceManagement::AsyncOperations::IAsyncOperation* op, int version, ::StringW locationName)
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Acquire
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Acquire() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Acquire");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Acquire", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Equals
bool UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Equals(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle other) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Equals");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Equals", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(other)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, other);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.GetDependencies
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetDependencies(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetDependencies");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.IsValid
bool UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::IsValid() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::IsValid");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "IsValid", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetDownloadStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetDownloadStatus");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.InternalGetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::InternalGetDownloadStatus(::System::Collections::Generic::HashSet_1<::Il2CppObject*>* visited) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::InternalGetDownloadStatus");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "InternalGetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(visited)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method, visited);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Release
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Release() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::Release");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "Release", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.System.Collections.IEnumerator.MoveNext
bool UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System_Collections_IEnumerator_MoveNext() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System.Collections.IEnumerator.MoveNext");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "System.Collections.IEnumerator.MoveNext", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.System.Collections.IEnumerator.Reset
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System_Collections_IEnumerator_Reset() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::System.Collections.IEnumerator.Reset");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "System.Collections.IEnumerator.Reset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.WaitForCompletion
::Il2CppObject* UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::WaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::WaitForCompletion");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "WaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.GetHashCode
int UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle::GetHashCode");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetHashCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus None
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus>("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "None"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus None
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_None(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "None", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus Succeeded
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_Succeeded() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_Succeeded");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus>("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "Succeeded"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus Succeeded
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_Succeeded(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_Succeeded");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "Succeeded", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus Failed
::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_Failed() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_get_Failed");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus>("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "Failed"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationStatus Failed
void UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_Failed(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::_set_Failed");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "AsyncOperationStatus", "Failed", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationStatus::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/DownloadStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Int64 TotalBytes
int64_t& UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_TotalBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_TotalBytes");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "TotalBytes"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int64 DownloadedBytes
int64_t& UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_DownloadedBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_DownloadedBytes");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DownloadedBytes"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean IsDone
bool& UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_IsDone() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::dyn_IsDone");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "IsDone"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus.get_Percent
float UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::get_Percent() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus::get_Percent");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_Percent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/GroupOperation.hpp"
// Including type: System.Collections.Generic.HashSet`1
#include "System/Collections/Generic/HashSet_1.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.Action`1
#include "System/Action_1.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.DownloadStatus
#include "UnityEngine/ResourceManagement/AsyncOperations/DownloadStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private System.Int32 k_MaxDisplayedLocationLength
int UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::_get_k_MaxDisplayedLocationLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::_get_k_MaxDisplayedLocationLength");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation", "k_MaxDisplayedLocationLength"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 k_MaxDisplayedLocationLength
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::_set_k_MaxDisplayedLocationLength(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::_set_k_MaxDisplayedLocationLength");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation", "k_MaxDisplayedLocationLength", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Action`1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle> m_InternalOnComplete
::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_InternalOnComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_InternalOnComplete");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_InternalOnComplete"))->offset;
return *reinterpret_cast<::System::Action_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_LoadedCount
int& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_LoadedCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_LoadedCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_LoadedCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings m_Settings
::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_Settings() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_Settings");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Settings"))->offset;
return *reinterpret_cast<::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.String debugName
::StringW& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_debugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_debugName");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "debugName"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <UnityEngine.ResourceManagement.AsyncOperations.ICachable.Hash>k__BackingField
int& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_$UnityEngine_ResourceManagement_AsyncOperations_ICachable_Hash$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_$UnityEngine_ResourceManagement_AsyncOperations_ICachable_Hash$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<UnityEngine.ResourceManagement.AsyncOperations.ICachable.Hash>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.HashSet`1<System.String> m_CachedDependencyLocations
::System::Collections::Generic::HashSet_1<::StringW>*& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_CachedDependencyLocations() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::dyn_m_CachedDependencyLocations");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CachedDependencyLocations"))->offset;
return *reinterpret_cast<::System::Collections::Generic::HashSet_1<::StringW>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.UnityEngine.ResourceManagement.AsyncOperations.ICachable.get_Hash
int UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::UnityEngine_ResourceManagement_AsyncOperations_ICachable_get_Hash() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::UnityEngine.ResourceManagement.AsyncOperations.ICachable.get_Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnityEngine.ResourceManagement.AsyncOperations.ICachable.get_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.UnityEngine.ResourceManagement.AsyncOperations.ICachable.set_Hash
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::UnityEngine_ResourceManagement_AsyncOperations_ICachable_set_Hash(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::UnityEngine.ResourceManagement.AsyncOperations.ICachable.set_Hash");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnityEngine.ResourceManagement.AsyncOperations.ICachable.set_Hash", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.GetDependentOps
::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDependentOps() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDependentOps");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependentOps", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.DependenciesAreUnchanged
bool UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::DependenciesAreUnchanged(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::DependenciesAreUnchanged");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DependenciesAreUnchanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.CompleteIfDependenciesComplete
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::CompleteIfDependenciesComplete() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::CompleteIfDependenciesComplete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CompleteIfDependenciesComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.Init
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Init(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* operations, bool releaseDependenciesOnFailure, bool allowFailedDependencies) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(operations), ::il2cpp_utils::ExtractType(releaseDependenciesOnFailure), ::il2cpp_utils::ExtractType(allowFailedDependencies)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, operations, releaseDependenciesOnFailure, allowFailedDependencies);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.Init
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Init(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* operations, ::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings settings) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(operations), ::il2cpp_utils::ExtractType(settings)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, operations, settings);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.OnOperationCompleted
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::OnOperationCompleted(::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle op) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::OnOperationCompleted");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnOperationCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(op)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, op);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.get_DebugName
::StringW UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::get_DebugName() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::get_DebugName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DebugName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.get_Progress
float UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::get_Progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::get_Progress");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Progress", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.InvokeWaitForCompletion
bool UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::InvokeWaitForCompletion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::InvokeWaitForCompletion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InvokeWaitForCompletion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.GetDependencies
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDependencies(::System::Collections::Generic::List_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>* deps) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(deps)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, deps);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.ReleaseDependencies
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::ReleaseDependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::ReleaseDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.GetDownloadStatus
::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDownloadStatus(::System::Collections::Generic::HashSet_1<::Il2CppObject*>* visited) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GetDownloadStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDownloadStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(visited)})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus, false>(this, ___internal__method, visited);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.Execute
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Execute() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Execute");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Execute", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation.Destroy
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Destroy() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::Destroy");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Destroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings
#include "UnityEngine/ResourceManagement/AsyncOperations/GroupOperation.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings None
::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings>("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "None"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings None
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_None(::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "None", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings ReleaseDependenciesOnFailure
::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_ReleaseDependenciesOnFailure() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_ReleaseDependenciesOnFailure");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings>("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "ReleaseDependenciesOnFailure"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings ReleaseDependenciesOnFailure
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_ReleaseDependenciesOnFailure(::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_ReleaseDependenciesOnFailure");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "ReleaseDependenciesOnFailure", value));
}
// Autogenerated static field getter
// Get static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings AllowFailedDependencies
::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_AllowFailedDependencies() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_get_AllowFailedDependencies");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings>("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "AllowFailedDependencies"));
}
// Autogenerated static field setter
// Set static field: static public UnityEngine.ResourceManagement.AsyncOperations.GroupOperation/UnityEngine.ResourceManagement.AsyncOperations.GroupOperationSettings AllowFailedDependencies
void UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_AllowFailedDependencies(::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings value) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::_set_AllowFailedDependencies");
THROW_UNLESS(il2cpp_utils::SetFieldValue("UnityEngine.ResourceManagement.AsyncOperations", "GroupOperation/GroupOperationSettings", "AllowFailedDependencies", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::GroupOperation::GroupOperationSettings::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation
#include "UnityEngine/ResourceManagement/AsyncOperations/IGenericProviderOperation.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation
#include "UnityEngine/ResourceManagement/ResourceLocations/IResourceLocation.hpp"
// Including type: System.Type
#include "System/Type.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceManager
#include "UnityEngine/ResourceManagement/ResourceManager.hpp"
// Including type: UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider
#include "UnityEngine/ResourceManagement/ResourceProviders/IResourceProvider.hpp"
// Including type: UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1
#include "UnityEngine/ResourceManagement/AsyncOperations/AsyncOperationHandle_1.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.Func`1
#include "System/Func_1.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.get_ProvideHandleVersion
int UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_ProvideHandleVersion() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_ProvideHandleVersion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProvideHandleVersion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.get_Location
::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_Location() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_Location");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Location", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.get_DependencyCount
int UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_DependencyCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_DependencyCount");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DependencyCount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.get_RequestedType
::System::Type* UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_RequestedType() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::get_RequestedType");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RequestedType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Type*, false>(this, ___internal__method);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.Init
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::Init(::UnityEngine::ResourceManagement::ResourceManager* rm, ::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider* provider, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*> depOp) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::Init");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(provider), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(depOp)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rm, provider, location, depOp);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.Init
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::Init(::UnityEngine::ResourceManagement::ResourceManager* rm, ::UnityEngine::ResourceManagement::ResourceProviders::IResourceProvider* provider, ::UnityEngine::ResourceManagement::ResourceLocations::IResourceLocation* location, ::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle_1<::System::Collections::Generic::IList_1<::UnityEngine::ResourceManagement::AsyncOperations::AsyncOperationHandle>*> depOp, bool releaseDependenciesOnFailure) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::Init");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rm), ::il2cpp_utils::ExtractType(provider), ::il2cpp_utils::ExtractType(location), ::il2cpp_utils::ExtractType(depOp), ::il2cpp_utils::ExtractType(releaseDependenciesOnFailure)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rm, provider, location, depOp, releaseDependenciesOnFailure);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.GetDependencies
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::GetDependencies(::System::Collections::Generic::IList_1<::Il2CppObject*>* dstList) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::GetDependencies");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDependencies", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(dstList)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, dstList);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.SetProgressCallback
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetProgressCallback(::System::Func_1<float>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetProgressCallback");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetProgressCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.SetDownloadProgressCallback
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetDownloadProgressCallback(::System::Func_1<::UnityEngine::ResourceManagement::AsyncOperations::DownloadStatus>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetDownloadProgressCallback");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetDownloadProgressCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: UnityEngine.ResourceManagement.AsyncOperations.IGenericProviderOperation.SetWaitForCompletionCallback
void UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetWaitForCompletionCallback(::System::Func_1<bool>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::ResourceManagement::AsyncOperations::IGenericProviderOperation::SetWaitForCompletionCallback");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetWaitForCompletionCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.FastAction
#include "TMPro/FastAction.hpp"
// Including type: System.Collections.Generic.LinkedList`1
#include "System/Collections/Generic/LinkedList_1.hpp"
// Including type: System.Action
#include "System/Action.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: System.Collections.Generic.LinkedListNode`1
#include "System/Collections/Generic/LinkedListNode_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.LinkedList`1<System.Action> delegates
::System::Collections::Generic::LinkedList_1<::System::Action*>*& TMPro::FastAction::dyn_delegates() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::FastAction::dyn_delegates");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "delegates"))->offset;
return *reinterpret_cast<::System::Collections::Generic::LinkedList_1<::System::Action*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Action,System.Collections.Generic.LinkedListNode`1<System.Action>> lookup
::System::Collections::Generic::Dictionary_2<::System::Action*, ::System::Collections::Generic::LinkedListNode_1<::System::Action*>*>*& TMPro::FastAction::dyn_lookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::FastAction::dyn_lookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "lookup"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::System::Action*, ::System::Collections::Generic::LinkedListNode_1<::System::Action*>*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: TMPro.FastAction.Add
void TMPro::FastAction::Add(::System::Action* rhs) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::FastAction::Add");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Add", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rhs)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rhs);
}
// Autogenerated method: TMPro.FastAction.Remove
void TMPro::FastAction::Remove(::System::Action* rhs) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::FastAction::Remove");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Remove", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(rhs)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, rhs);
}
// Autogenerated method: TMPro.FastAction.Call
void TMPro::FastAction::Call() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::FastAction::Call");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Call", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.MaterialReferenceManager
#include "TMPro/MaterialReferenceManager.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: UnityEngine.Material
#include "UnityEngine/Material.hpp"
// Including type: TMPro.TMP_FontAsset
#include "TMPro/TMP_FontAsset.hpp"
// Including type: TMPro.TMP_SpriteAsset
#include "TMPro/TMP_SpriteAsset.hpp"
// Including type: TMPro.TMP_ColorGradient
#include "TMPro/TMP_ColorGradient.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private TMPro.MaterialReferenceManager s_Instance
::TMPro::MaterialReferenceManager* TMPro::MaterialReferenceManager::_get_s_Instance() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::_get_s_Instance");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::MaterialReferenceManager*>("TMPro", "MaterialReferenceManager", "s_Instance"));
}
// Autogenerated static field setter
// Set static field: static private TMPro.MaterialReferenceManager s_Instance
void TMPro::MaterialReferenceManager::_set_s_Instance(::TMPro::MaterialReferenceManager* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::_set_s_Instance");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "MaterialReferenceManager", "s_Instance", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,UnityEngine.Material> m_FontMaterialReferenceLookup
::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::Material*>*& TMPro::MaterialReferenceManager::dyn_m_FontMaterialReferenceLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::dyn_m_FontMaterialReferenceLookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_FontMaterialReferenceLookup"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::UnityEngine::Material*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,TMPro.TMP_FontAsset> m_FontAssetReferenceLookup
::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_FontAsset*>*& TMPro::MaterialReferenceManager::dyn_m_FontAssetReferenceLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::dyn_m_FontAssetReferenceLookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_FontAssetReferenceLookup"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_FontAsset*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,TMPro.TMP_SpriteAsset> m_SpriteAssetReferenceLookup
::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_SpriteAsset*>*& TMPro::MaterialReferenceManager::dyn_m_SpriteAssetReferenceLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::dyn_m_SpriteAssetReferenceLookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_SpriteAssetReferenceLookup"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_SpriteAsset*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,TMPro.TMP_ColorGradient> m_ColorGradientReferenceLookup
::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_ColorGradient*>*& TMPro::MaterialReferenceManager::dyn_m_ColorGradientReferenceLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::dyn_m_ColorGradientReferenceLookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ColorGradientReferenceLookup"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::TMPro::TMP_ColorGradient*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.get_instance
::TMPro::MaterialReferenceManager* TMPro::MaterialReferenceManager::get_instance() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::get_instance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "get_instance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::TMPro::MaterialReferenceManager*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddFontAsset
void TMPro::MaterialReferenceManager::AddFontAsset(::TMPro::TMP_FontAsset* fontAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddFontAsset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "AddFontAsset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(fontAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, fontAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddFontAssetInternal
void TMPro::MaterialReferenceManager::AddFontAssetInternal(::TMPro::TMP_FontAsset* fontAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddFontAssetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddFontAssetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(fontAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, fontAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddSpriteAsset
void TMPro::MaterialReferenceManager::AddSpriteAsset(::TMPro::TMP_SpriteAsset* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddSpriteAsset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "AddSpriteAsset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddSpriteAssetInternal
void TMPro::MaterialReferenceManager::AddSpriteAssetInternal(::TMPro::TMP_SpriteAsset* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddSpriteAssetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddSpriteAssetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddSpriteAsset
void TMPro::MaterialReferenceManager::AddSpriteAsset(int hashCode, ::TMPro::TMP_SpriteAsset* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddSpriteAsset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "AddSpriteAsset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddSpriteAssetInternal
void TMPro::MaterialReferenceManager::AddSpriteAssetInternal(int hashCode, ::TMPro::TMP_SpriteAsset* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddSpriteAssetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddSpriteAssetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hashCode, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddFontMaterial
void TMPro::MaterialReferenceManager::AddFontMaterial(int hashCode, ::UnityEngine::Material* material) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddFontMaterial");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "AddFontMaterial", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(material)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, material);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddFontMaterialInternal
void TMPro::MaterialReferenceManager::AddFontMaterialInternal(int hashCode, ::UnityEngine::Material* material) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddFontMaterialInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddFontMaterialInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(material)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hashCode, material);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddColorGradientPreset
void TMPro::MaterialReferenceManager::AddColorGradientPreset(int hashCode, ::TMPro::TMP_ColorGradient* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddColorGradientPreset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "AddColorGradientPreset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.AddColorGradientPreset_Internal
void TMPro::MaterialReferenceManager::AddColorGradientPreset_Internal(int hashCode, ::TMPro::TMP_ColorGradient* spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::AddColorGradientPreset_Internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddColorGradientPreset_Internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractType(spriteAsset)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hashCode, spriteAsset);
}
// Autogenerated method: TMPro.MaterialReferenceManager.Contains
bool TMPro::MaterialReferenceManager::Contains(::TMPro::TMP_FontAsset* font) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::Contains");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Contains", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(font)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, font);
}
// Autogenerated method: TMPro.MaterialReferenceManager.Contains
bool TMPro::MaterialReferenceManager::Contains(::TMPro::TMP_SpriteAsset* sprite) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::Contains");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Contains", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sprite)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, sprite);
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetFontAsset
bool TMPro::MaterialReferenceManager::TryGetFontAsset(int hashCode, ByRef<::TMPro::TMP_FontAsset*> fontAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetFontAsset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "TryGetFontAsset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_FontAsset*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, byref(fontAsset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetFontAssetInternal
bool TMPro::MaterialReferenceManager::TryGetFontAssetInternal(int hashCode, ByRef<::TMPro::TMP_FontAsset*> fontAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetFontAssetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TryGetFontAssetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_FontAsset*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hashCode, byref(fontAsset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetSpriteAsset
bool TMPro::MaterialReferenceManager::TryGetSpriteAsset(int hashCode, ByRef<::TMPro::TMP_SpriteAsset*> spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetSpriteAsset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "TryGetSpriteAsset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_SpriteAsset*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, byref(spriteAsset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetSpriteAssetInternal
bool TMPro::MaterialReferenceManager::TryGetSpriteAssetInternal(int hashCode, ByRef<::TMPro::TMP_SpriteAsset*> spriteAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetSpriteAssetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TryGetSpriteAssetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_SpriteAsset*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hashCode, byref(spriteAsset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetColorGradientPreset
bool TMPro::MaterialReferenceManager::TryGetColorGradientPreset(int hashCode, ByRef<::TMPro::TMP_ColorGradient*> gradientPreset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetColorGradientPreset");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "TryGetColorGradientPreset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_ColorGradient*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, byref(gradientPreset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetColorGradientPresetInternal
bool TMPro::MaterialReferenceManager::TryGetColorGradientPresetInternal(int hashCode, ByRef<::TMPro::TMP_ColorGradient*> gradientPreset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetColorGradientPresetInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TryGetColorGradientPresetInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::TMPro::TMP_ColorGradient*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hashCode, byref(gradientPreset));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetMaterial
bool TMPro::MaterialReferenceManager::TryGetMaterial(int hashCode, ByRef<::UnityEngine::Material*> material) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetMaterial");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReferenceManager", "TryGetMaterial", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::UnityEngine::Material*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, hashCode, byref(material));
}
// Autogenerated method: TMPro.MaterialReferenceManager.TryGetMaterialInternal
bool TMPro::MaterialReferenceManager::TryGetMaterialInternal(int hashCode, ByRef<::UnityEngine::Material*> material) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReferenceManager::TryGetMaterialInternal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TryGetMaterialInternal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hashCode), ::il2cpp_utils::ExtractIndependentType<::UnityEngine::Material*&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hashCode, byref(material));
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.MaterialReference
#include "TMPro/MaterialReference.hpp"
// Including type: TMPro.TMP_FontAsset
#include "TMPro/TMP_FontAsset.hpp"
// Including type: TMPro.TMP_SpriteAsset
#include "TMPro/TMP_SpriteAsset.hpp"
// Including type: UnityEngine.Material
#include "UnityEngine/Material.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Int32 index
int& TMPro::MaterialReference::dyn_index() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_index");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "index"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public TMPro.TMP_FontAsset fontAsset
::TMPro::TMP_FontAsset*& TMPro::MaterialReference::dyn_fontAsset() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_fontAsset");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "fontAsset"))->offset;
return *reinterpret_cast<::TMPro::TMP_FontAsset**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public TMPro.TMP_SpriteAsset spriteAsset
::TMPro::TMP_SpriteAsset*& TMPro::MaterialReference::dyn_spriteAsset() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_spriteAsset");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "spriteAsset"))->offset;
return *reinterpret_cast<::TMPro::TMP_SpriteAsset**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Material material
::UnityEngine::Material*& TMPro::MaterialReference::dyn_material() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_material");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "material"))->offset;
return *reinterpret_cast<::UnityEngine::Material**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean isDefaultMaterial
bool& TMPro::MaterialReference::dyn_isDefaultMaterial() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_isDefaultMaterial");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "isDefaultMaterial"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean isFallbackMaterial
bool& TMPro::MaterialReference::dyn_isFallbackMaterial() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_isFallbackMaterial");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "isFallbackMaterial"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Material fallbackMaterial
::UnityEngine::Material*& TMPro::MaterialReference::dyn_fallbackMaterial() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_fallbackMaterial");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "fallbackMaterial"))->offset;
return *reinterpret_cast<::UnityEngine::Material**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Single padding
float& TMPro::MaterialReference::dyn_padding() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_padding");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "padding"))->offset;
return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 referenceCount
int& TMPro::MaterialReference::dyn_referenceCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::dyn_referenceCount");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "referenceCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: TMPro.MaterialReference..ctor
TMPro::MaterialReference::MaterialReference(int index, ::TMPro::TMP_FontAsset* fontAsset, ::TMPro::TMP_SpriteAsset* spriteAsset, ::UnityEngine::Material* material, float padding) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(index), ::il2cpp_utils::ExtractType(fontAsset), ::il2cpp_utils::ExtractType(spriteAsset), ::il2cpp_utils::ExtractType(material), ::il2cpp_utils::ExtractType(padding)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, index, fontAsset, spriteAsset, material, padding);
}
// Autogenerated method: TMPro.MaterialReference.Contains
bool TMPro::MaterialReference::Contains(::ArrayW<::TMPro::MaterialReference> materialReferences, ::TMPro::TMP_FontAsset* fontAsset) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::Contains");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReference", "Contains", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(materialReferences), ::il2cpp_utils::ExtractType(fontAsset)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, materialReferences, fontAsset);
}
// Autogenerated method: TMPro.MaterialReference.AddMaterialReference
int TMPro::MaterialReference::AddMaterialReference(::UnityEngine::Material* material, ::TMPro::TMP_FontAsset* fontAsset, ::ArrayW<::TMPro::MaterialReference> materialReferences, ::System::Collections::Generic::Dictionary_2<int, int>* materialReferenceIndexLookup) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::AddMaterialReference");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReference", "AddMaterialReference", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(material), ::il2cpp_utils::ExtractType(fontAsset), ::il2cpp_utils::ExtractType(materialReferences), ::il2cpp_utils::ExtractType(materialReferenceIndexLookup)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, material, fontAsset, materialReferences, materialReferenceIndexLookup);
}
// Autogenerated method: TMPro.MaterialReference.AddMaterialReference
int TMPro::MaterialReference::AddMaterialReference(::UnityEngine::Material* material, ::TMPro::TMP_SpriteAsset* spriteAsset, ::ArrayW<::TMPro::MaterialReference> materialReferences, ::System::Collections::Generic::Dictionary_2<int, int>* materialReferenceIndexLookup) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::MaterialReference::AddMaterialReference");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "MaterialReference", "AddMaterialReference", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(material), ::il2cpp_utils::ExtractType(spriteAsset), ::il2cpp_utils::ExtractType(materialReferences), ::il2cpp_utils::ExtractType(materialReferenceIndexLookup)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, material, spriteAsset, materialReferences, materialReferenceIndexLookup);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.TMP_Asset
#include "TMPro/TMP_Asset.hpp"
// Including type: UnityEngine.Material
#include "UnityEngine/Material.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Int32 hashCode
int& TMPro::TMP_Asset::dyn_hashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_Asset::dyn_hashCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "hashCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Material material
::UnityEngine::Material*& TMPro::TMP_Asset::dyn_material() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_Asset::dyn_material");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "material"))->offset;
return *reinterpret_cast<::UnityEngine::Material**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 materialHashCode
int& TMPro::TMP_Asset::dyn_materialHashCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_Asset::dyn_materialHashCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "materialHashCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.TMP_Character
#include "TMPro/TMP_Character.hpp"
// Including type: UnityEngine.TextCore.Glyph
#include "UnityEngine/TextCore/Glyph.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.ColorMode
#include "TMPro/ColorMode.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public TMPro.ColorMode Single
::TMPro::ColorMode TMPro::ColorMode::_get_Single() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_get_Single");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorMode>("TMPro", "ColorMode", "Single"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorMode Single
void TMPro::ColorMode::_set_Single(::TMPro::ColorMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_set_Single");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorMode", "Single", value));
}
// Autogenerated static field getter
// Get static field: static public TMPro.ColorMode HorizontalGradient
::TMPro::ColorMode TMPro::ColorMode::_get_HorizontalGradient() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_get_HorizontalGradient");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorMode>("TMPro", "ColorMode", "HorizontalGradient"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorMode HorizontalGradient
void TMPro::ColorMode::_set_HorizontalGradient(::TMPro::ColorMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_set_HorizontalGradient");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorMode", "HorizontalGradient", value));
}
// Autogenerated static field getter
// Get static field: static public TMPro.ColorMode VerticalGradient
::TMPro::ColorMode TMPro::ColorMode::_get_VerticalGradient() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_get_VerticalGradient");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorMode>("TMPro", "ColorMode", "VerticalGradient"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorMode VerticalGradient
void TMPro::ColorMode::_set_VerticalGradient(::TMPro::ColorMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_set_VerticalGradient");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorMode", "VerticalGradient", value));
}
// Autogenerated static field getter
// Get static field: static public TMPro.ColorMode FourCornersGradient
::TMPro::ColorMode TMPro::ColorMode::_get_FourCornersGradient() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_get_FourCornersGradient");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorMode>("TMPro", "ColorMode", "FourCornersGradient"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorMode FourCornersGradient
void TMPro::ColorMode::_set_FourCornersGradient(::TMPro::ColorMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::_set_FourCornersGradient");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorMode", "FourCornersGradient", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& TMPro::ColorMode::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorMode::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.TMP_ColorGradient
#include "TMPro/TMP_ColorGradient.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static private TMPro.ColorMode k_DefaultColorMode
::TMPro::ColorMode TMPro::TMP_ColorGradient::_get_k_DefaultColorMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::_get_k_DefaultColorMode");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorMode>("TMPro", "TMP_ColorGradient", "k_DefaultColorMode"));
}
// Autogenerated static field setter
// Set static field: static private TMPro.ColorMode k_DefaultColorMode
void TMPro::TMP_ColorGradient::_set_k_DefaultColorMode(::TMPro::ColorMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::_set_k_DefaultColorMode");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "TMP_ColorGradient", "k_DefaultColorMode", value));
}
// Autogenerated static field getter
// Get static field: static private readonly UnityEngine.Color k_DefaultColor
::UnityEngine::Color TMPro::TMP_ColorGradient::_get_k_DefaultColor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::_get_k_DefaultColor");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::UnityEngine::Color>("TMPro", "TMP_ColorGradient", "k_DefaultColor"));
}
// Autogenerated static field setter
// Set static field: static private readonly UnityEngine.Color k_DefaultColor
void TMPro::TMP_ColorGradient::_set_k_DefaultColor(::UnityEngine::Color value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::_set_k_DefaultColor");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "TMP_ColorGradient", "k_DefaultColor", value));
}
// Autogenerated instance field getter
// Get instance field: public TMPro.ColorMode colorMode
::TMPro::ColorMode& TMPro::TMP_ColorGradient::dyn_colorMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::dyn_colorMode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "colorMode"))->offset;
return *reinterpret_cast<::TMPro::ColorMode*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Color topLeft
::UnityEngine::Color& TMPro::TMP_ColorGradient::dyn_topLeft() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::dyn_topLeft");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "topLeft"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Color topRight
::UnityEngine::Color& TMPro::TMP_ColorGradient::dyn_topRight() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::dyn_topRight");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "topRight"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Color bottomLeft
::UnityEngine::Color& TMPro::TMP_ColorGradient::dyn_bottomLeft() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::dyn_bottomLeft");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "bottomLeft"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public UnityEngine.Color bottomRight
::UnityEngine::Color& TMPro::TMP_ColorGradient::dyn_bottomRight() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::dyn_bottomRight");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "bottomRight"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: TMPro.TMP_ColorGradient..cctor
void TMPro::TMP_ColorGradient::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::TMP_ColorGradient::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("TMPro", "TMP_ColorGradient", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.ITweenValue
#include "TMPro/ITweenValue.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: TMPro.ITweenValue.get_ignoreTimeScale
bool TMPro::ITweenValue::get_ignoreTimeScale() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ITweenValue::get_ignoreTimeScale");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ignoreTimeScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ITweenValue.get_duration
float TMPro::ITweenValue::get_duration() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ITweenValue::get_duration");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_duration", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ITweenValue.TweenValue
void TMPro::ITweenValue::TweenValue(float floatPercentage) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ITweenValue::TweenValue");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TweenValue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(floatPercentage)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, floatPercentage);
}
// Autogenerated method: TMPro.ITweenValue.ValidTarget
bool TMPro::ITweenValue::ValidTarget() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ITweenValue::ValidTarget");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ValidTarget", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.ColorTween
#include "TMPro/ColorTween.hpp"
// Including type: TMPro.ColorTween/TMPro.ColorTweenCallback
#include "TMPro/ColorTween_ColorTweenCallback.hpp"
// Including type: UnityEngine.Events.UnityAction`1
#include "UnityEngine/Events/UnityAction_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private TMPro.ColorTween/TMPro.ColorTweenCallback m_Target
::TMPro::ColorTween::ColorTweenCallback*& TMPro::ColorTween::dyn_m_Target() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_Target");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Target"))->offset;
return *reinterpret_cast<::TMPro::ColorTween::ColorTweenCallback**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Color m_StartColor
::UnityEngine::Color& TMPro::ColorTween::dyn_m_StartColor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_StartColor");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_StartColor"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private UnityEngine.Color m_TargetColor
::UnityEngine::Color& TMPro::ColorTween::dyn_m_TargetColor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_TargetColor");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_TargetColor"))->offset;
return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private TMPro.ColorTween/TMPro.ColorTweenMode m_TweenMode
::TMPro::ColorTween::ColorTweenMode& TMPro::ColorTween::dyn_m_TweenMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_TweenMode");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_TweenMode"))->offset;
return *reinterpret_cast<::TMPro::ColorTween::ColorTweenMode*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Single m_Duration
float& TMPro::ColorTween::dyn_m_Duration() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_Duration");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Duration"))->offset;
return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_IgnoreTimeScale
bool& TMPro::ColorTween::dyn_m_IgnoreTimeScale() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::dyn_m_IgnoreTimeScale");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_IgnoreTimeScale"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: TMPro.ColorTween.get_startColor
::UnityEngine::Color TMPro::ColorTween::get_startColor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::get_startColor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_startColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.set_startColor
void TMPro::ColorTween::set_startColor(::UnityEngine::Color value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::set_startColor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_startColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: TMPro.ColorTween.get_targetColor
::UnityEngine::Color TMPro::ColorTween::get_targetColor() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::get_targetColor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_targetColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.set_targetColor
void TMPro::ColorTween::set_targetColor(::UnityEngine::Color value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::set_targetColor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_targetColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: TMPro.ColorTween.get_tweenMode
::TMPro::ColorTween::ColorTweenMode TMPro::ColorTween::get_tweenMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::get_tweenMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_tweenMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::TMPro::ColorTween::ColorTweenMode, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.set_tweenMode
void TMPro::ColorTween::set_tweenMode(::TMPro::ColorTween::ColorTweenMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::set_tweenMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_tweenMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: TMPro.ColorTween.get_duration
float TMPro::ColorTween::get_duration() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::get_duration");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_duration", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.set_duration
void TMPro::ColorTween::set_duration(float value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::set_duration");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_duration", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: TMPro.ColorTween.get_ignoreTimeScale
bool TMPro::ColorTween::get_ignoreTimeScale() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::get_ignoreTimeScale");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "get_ignoreTimeScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.set_ignoreTimeScale
void TMPro::ColorTween::set_ignoreTimeScale(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::set_ignoreTimeScale");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "set_ignoreTimeScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: TMPro.ColorTween.TweenValue
void TMPro::ColorTween::TweenValue(float floatPercentage) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::TweenValue");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "TweenValue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(floatPercentage)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, floatPercentage);
}
// Autogenerated method: TMPro.ColorTween.AddOnChangedCallback
void TMPro::ColorTween::AddOnChangedCallback(::UnityEngine::Events::UnityAction_1<::UnityEngine::Color>* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::AddOnChangedCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "AddOnChangedCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, callback);
}
// Autogenerated method: TMPro.ColorTween.GetIgnoreTimescale
bool TMPro::ColorTween::GetIgnoreTimescale() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::GetIgnoreTimescale");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetIgnoreTimescale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.GetDuration
float TMPro::ColorTween::GetDuration() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::GetDuration");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "GetDuration", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method);
}
// Autogenerated method: TMPro.ColorTween.ValidTarget
bool TMPro::ColorTween::ValidTarget() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ValidTarget");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "ValidTarget", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.ColorTween/TMPro.ColorTweenMode
#include "TMPro/ColorTween.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated static field getter
// Get static field: static public TMPro.ColorTween/TMPro.ColorTweenMode All
::TMPro::ColorTween::ColorTweenMode TMPro::ColorTween::ColorTweenMode::_get_All() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_get_All");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorTween::ColorTweenMode>("TMPro", "ColorTween/ColorTweenMode", "All"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorTween/TMPro.ColorTweenMode All
void TMPro::ColorTween::ColorTweenMode::_set_All(::TMPro::ColorTween::ColorTweenMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_set_All");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorTween/ColorTweenMode", "All", value));
}
// Autogenerated static field getter
// Get static field: static public TMPro.ColorTween/TMPro.ColorTweenMode RGB
::TMPro::ColorTween::ColorTweenMode TMPro::ColorTween::ColorTweenMode::_get_RGB() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_get_RGB");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorTween::ColorTweenMode>("TMPro", "ColorTween/ColorTweenMode", "RGB"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorTween/TMPro.ColorTweenMode RGB
void TMPro::ColorTween::ColorTweenMode::_set_RGB(::TMPro::ColorTween::ColorTweenMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_set_RGB");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorTween/ColorTweenMode", "RGB", value));
}
// Autogenerated static field getter
// Get static field: static public TMPro.ColorTween/TMPro.ColorTweenMode Alpha
::TMPro::ColorTween::ColorTweenMode TMPro::ColorTween::ColorTweenMode::_get_Alpha() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_get_Alpha");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::TMPro::ColorTween::ColorTweenMode>("TMPro", "ColorTween/ColorTweenMode", "Alpha"));
}
// Autogenerated static field setter
// Set static field: static public TMPro.ColorTween/TMPro.ColorTweenMode Alpha
void TMPro::ColorTween::ColorTweenMode::_set_Alpha(::TMPro::ColorTween::ColorTweenMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::_set_Alpha");
THROW_UNLESS(il2cpp_utils::SetFieldValue("TMPro", "ColorTween/ColorTweenMode", "Alpha", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& TMPro::ColorTween::ColorTweenMode::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::TMPro::ColorTween::ColorTweenMode::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: TMPro.ColorTween/TMPro.ColorTweenCallback
#include "TMPro/ColorTween_ColorTweenCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
| 96.428256
| 578
| 0.805653
|
RedBrumbler
|
1da54baee266483de8763dbbe42ff1a4d2ec766a
| 1,538
|
hpp
|
C++
|
src/connection_types/socket_connection.hpp
|
Felix-Rm/iac
|
59bfc7e859d4cc0b923c75dd34316ae2fafd9097
|
[
"BSD-2-Clause"
] | null | null | null |
src/connection_types/socket_connection.hpp
|
Felix-Rm/iac
|
59bfc7e859d4cc0b923c75dd34316ae2fafd9097
|
[
"BSD-2-Clause"
] | null | null | null |
src/connection_types/socket_connection.hpp
|
Felix-Rm/iac
|
59bfc7e859d4cc0b923c75dd34316ae2fafd9097
|
[
"BSD-2-Clause"
] | null | null | null |
#pragma once
#ifndef ARDUINO
# include <arpa/inet.h>
# include <netinet/in.h>
# include <sys/fcntl.h>
# include <sys/ioctl.h>
# include <sys/socket.h>
# include <unistd.h>
# include <csignal>
# include <cstdio>
# include <cstdlib>
# include "../std_provider/string.hpp"
# include "connection.hpp"
namespace iac {
class SocketConnection : public Connection {
public:
SocketConnection(const char* ip, int port);
size_t read(void* buffer, size_t size) override;
size_t write(const void* buffer, size_t size) override;
bool flush() override;
bool clear() override;
size_t available() override;
explicit operator bool() const {
return m_good;
};
protected:
const char* m_ip = nullptr;
int m_port = 0;
in_addr_t m_addr = INADDR_ANY;
int m_rw_fd = -1;
bool m_good = true;
};
class SocketClientConnection : public SocketConnection {
public:
SocketClientConnection(const char* ip, int port);
bool open() override;
bool close() override;
void printBuffer(int cols = 4);
private:
sockaddr_in m_address{};
static constexpr unsigned s_connect_timeout = 100000;
};
class SocketServerConnection : public SocketConnection {
public:
SocketServerConnection(const char* ip, int port);
bool open() override;
bool close() override;
void printBuffer(int cols = 4);
private:
int m_server_fd{-1};
sockaddr_in m_server_address{}, m_client_address{};
};
} // namespace iac
#endif
| 19.468354
| 59
| 0.662549
|
Felix-Rm
|
1da8c18fa83b6061ebfdfe6059e2f5e0590af07a
| 7,456
|
cpp
|
C++
|
compiler/luci/service/src/GraphBlock.test.cpp
|
wateret/ONE_private
|
9789c52633e665d2e10273d88d6f7970faa8aee9
|
[
"Apache-2.0"
] | null | null | null |
compiler/luci/service/src/GraphBlock.test.cpp
|
wateret/ONE_private
|
9789c52633e665d2e10273d88d6f7970faa8aee9
|
[
"Apache-2.0"
] | null | null | null |
compiler/luci/service/src/GraphBlock.test.cpp
|
wateret/ONE_private
|
9789c52633e665d2e10273d88d6f7970faa8aee9
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. 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 "GraphBlock.h"
#include "Check.h"
#include <loco.h>
#include <memory>
// TODO Change all Canonical nodes to Circle nodes
namespace
{
template <luci::FeatureLayout T> loco::Permutation<loco::Domain::Feature> perm();
template <> loco::Permutation<loco::Domain::Feature> perm<luci::FeatureLayout::NHWC>()
{
// Make NHWC permutation for encoder and decoder
loco::Permutation<loco::Domain::Feature> NHWC;
NHWC.axis(loco::FeatureAxis::Count) = 0;
NHWC.axis(loco::FeatureAxis::Height) = 1;
NHWC.axis(loco::FeatureAxis::Width) = 2;
NHWC.axis(loco::FeatureAxis::Depth) = 3;
return NHWC;
}
template <luci::FilterLayout T> loco::Permutation<loco::Domain::Filter> perm();
template <> loco::Permutation<loco::Domain::Filter> perm<luci::FilterLayout::HWIO>()
{
loco::Permutation<loco::Domain::Filter> HWIO; // a.k.a., HWCN
HWIO.axis(loco::FilterAxis::Height) = 0;
HWIO.axis(loco::FilterAxis::Width) = 1;
HWIO.axis(loco::FilterAxis::Depth) = 2;
HWIO.axis(loco::FilterAxis::Count) = 3;
return HWIO;
}
template <> loco::Permutation<loco::Domain::Filter> perm<luci::FilterLayout::OHWI>()
{
// Make NHWC permutation for encoder and decoder
loco::Permutation<loco::Domain::Filter> OHWI; // a.k.a., NHWC
OHWI.axis(loco::FilterAxis::Count) = 0;
OHWI.axis(loco::FilterAxis::Height) = 1;
OHWI.axis(loco::FilterAxis::Width) = 2;
OHWI.axis(loco::FilterAxis::Depth) = 3;
return OHWI;
}
template <luci::DepthwiseFilterLayout T> loco::Permutation<loco::Domain::DepthwiseFilter> perm();
template <>
loco::Permutation<loco::Domain::DepthwiseFilter> perm<luci::DepthwiseFilterLayout::HWCM>()
{
loco::Permutation<loco::Domain::DepthwiseFilter> HWCM;
HWCM.axis(loco::DepthwiseFilterAxis::Height) = 0;
HWCM.axis(loco::DepthwiseFilterAxis::Width) = 1;
HWCM.axis(loco::DepthwiseFilterAxis::Depth) = 2;
HWCM.axis(loco::DepthwiseFilterAxis::Multiplier) = 3;
return HWCM;
}
template <luci::MatrixLayout T> loco::Permutation<loco::Domain::Matrix> perm();
template <> loco::Permutation<loco::Domain::Matrix> perm<luci::MatrixLayout::HW>()
{
loco::Permutation<loco::Domain::Matrix> HW;
HW.axis(loco::MatrixAxis::Height) = 0;
HW.axis(loco::MatrixAxis::Width) = 1;
return HW;
}
template <> loco::Permutation<loco::Domain::Matrix> perm<luci::MatrixLayout::WH>()
{
loco::Permutation<loco::Domain::Matrix> WH;
WH.axis(loco::MatrixAxis::Height) = 1;
WH.axis(loco::MatrixAxis::Width) = 0;
return WH;
}
} // namespace
namespace luci
{
template <FeatureLayout T> loco::FeatureEncode *make_feature_encode(loco::Node *input_for_encode)
{
LUCI_ASSERT(input_for_encode != nullptr, "input should not be nullptr");
loco::Graph *g = input_for_encode->graph();
auto encoder = std::make_unique<loco::PermutingEncoder<loco::Domain::Feature>>();
encoder->perm(perm<T>());
auto enc = g->nodes()->create<loco::FeatureEncode>();
enc->input(input_for_encode);
enc->encoder(std::move(encoder));
return enc;
}
template <FeatureLayout T> loco::FeatureDecode *make_feature_decode(loco::Node *input_for_decode)
{
LUCI_ASSERT(input_for_decode != nullptr, "input should not be nullptr");
loco::Graph *g = input_for_decode->graph();
auto decoder = std::make_unique<loco::PermutingDecoder<loco::Domain::Feature>>();
decoder->perm(perm<T>());
auto dec = g->nodes()->create<loco::FeatureDecode>();
dec->input(input_for_decode);
dec->decoder(std::move(decoder));
return dec;
}
template <FilterLayout T> loco::FilterEncode *make_filter_encode(loco::Node *input_for_encode)
{
LUCI_ASSERT(input_for_encode != nullptr, "filter should not be nullptr");
loco::Graph *g = input_for_encode->graph();
auto encoder = std::make_unique<loco::PermutingEncoder<loco::Domain::Filter>>();
encoder->perm(perm<T>());
auto enc = g->nodes()->create<loco::FilterEncode>();
enc->input(input_for_encode);
enc->encoder(std::move(encoder));
return enc;
}
template <FilterLayout T> loco::FilterDecode *make_filter_decode(loco::Node *input_for_decode)
{
LUCI_ASSERT(input_for_decode != nullptr, "filter should not be nullptr");
loco::Graph *g = input_for_decode->graph();
auto decoder = std::make_unique<loco::PermutingDecoder<loco::Domain::Filter>>();
decoder->perm(perm<T>());
auto dec = g->nodes()->create<loco::FilterDecode>();
dec->input(input_for_decode);
dec->decoder(std::move(decoder));
return dec;
}
template <DepthwiseFilterLayout T>
loco::DepthwiseFilterDecode *make_dw_filter_decode(loco::Node *input_for_decode)
{
LUCI_ASSERT(input_for_decode != nullptr, "filter should not be nullptr");
loco::Graph *g = input_for_decode->graph();
auto decoder = std::make_unique<loco::PermutingDecoder<loco::Domain::DepthwiseFilter>>();
decoder->perm(perm<T>());
auto dec = g->nodes()->create<loco::DepthwiseFilterDecode>();
dec->input(input_for_decode);
dec->decoder(std::move(decoder));
return dec;
}
template <MatrixLayout T> loco::MatrixEncode *make_matrix_encode(loco::Node *input_for_encode)
{
LUCI_ASSERT(input_for_encode != nullptr, "input should not be nullptr");
loco::Graph *g = input_for_encode->graph();
auto encoder = std::make_unique<loco::PermutingEncoder<loco::Domain::Matrix>>();
encoder->perm(perm<T>());
auto enc = g->nodes()->create<loco::MatrixEncode>();
enc->input(input_for_encode);
enc->encoder(std::move(encoder));
return enc;
}
template <MatrixLayout T> loco::MatrixDecode *make_matrix_decode(loco::Node *input_for_decode)
{
LUCI_ASSERT(input_for_decode != nullptr, "input should not be nullptr");
loco::Graph *g = input_for_decode->graph();
auto decoder = std::make_unique<loco::PermutingDecoder<loco::Domain::Matrix>>();
decoder->perm(perm<T>());
auto dec = g->nodes()->create<loco::MatrixDecode>();
dec->input(input_for_decode);
dec->decoder(std::move(decoder));
return dec;
}
// template instantiation
template loco::FeatureEncode *
make_feature_encode<FeatureLayout::NHWC>(loco::Node *input_for_encode);
template loco::FeatureDecode *
make_feature_decode<FeatureLayout::NHWC>(loco::Node *input_for_encode);
template loco::FilterEncode *make_filter_encode<FilterLayout::HWIO>(loco::Node *input_for_encode);
template loco::FilterDecode *make_filter_decode<FilterLayout::OHWI>(loco::Node *input_for_decode);
template loco::DepthwiseFilterDecode *
make_dw_filter_decode<DepthwiseFilterLayout::HWCM>(loco::Node *input_for_decode);
template loco::MatrixEncode *make_matrix_encode<MatrixLayout::HW>(loco::Node *input_for_encode);
template loco::MatrixEncode *make_matrix_encode<MatrixLayout::WH>(loco::Node *input_for_encode);
template loco::MatrixDecode *make_matrix_decode<MatrixLayout::HW>(loco::Node *input_for_decode);
template loco::MatrixDecode *make_matrix_decode<MatrixLayout::WH>(loco::Node *input_for_decode);
} // namespace luci
| 30.186235
| 98
| 0.725992
|
wateret
|
1db186488106b897f8da6df052c0a78a226a6b32
| 282
|
cpp
|
C++
|
bootloader/Disk/IDE/ATADevice.cpp
|
supercomputer7/nahmanboot2
|
6b4ed2db89394ef2e8d878df98a988e205a63ee6
|
[
"MIT"
] | 3
|
2019-10-15T22:22:51.000Z
|
2019-11-29T10:39:28.000Z
|
bootloader/Disk/IDE/ATADevice.cpp
|
supercomputer7/nahmanboot2
|
6b4ed2db89394ef2e8d878df98a988e205a63ee6
|
[
"MIT"
] | null | null | null |
bootloader/Disk/IDE/ATADevice.cpp
|
supercomputer7/nahmanboot2
|
6b4ed2db89394ef2e8d878df98a988e205a63ee6
|
[
"MIT"
] | null | null | null |
#include <Disk/IDE/ATADevice.h>
ATADevice::ATADevice(IDEController* controller,uint8_t port) : StorageDevice(controller,port)
{
this->transfer_mode = DefaultTransferMode;
this->command_set = ATACommandSet;
}
uint16_t ATADevice::get_hardware_protocol()
{
return IDEATA;
}
| 28.2
| 93
| 0.769504
|
supercomputer7
|
1db64e09e3c30a39480db9c8bbe73721e490e358
| 35
|
hpp
|
C++
|
src/boost_range_pointer.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 10
|
2018-03-17T00:58:42.000Z
|
2021-07-06T02:48:49.000Z
|
src/boost_range_pointer.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 2
|
2021-03-26T15:17:35.000Z
|
2021-05-20T23:55:08.000Z
|
src/boost_range_pointer.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 4
|
2019-05-28T21:06:37.000Z
|
2021-07-06T03:06:52.000Z
|
#include <boost/range/pointer.hpp>
| 17.5
| 34
| 0.771429
|
miathedev
|
1db98fdb3d8fba7fe7ffd6ce5db5f83ae1f7fe20
| 8,151
|
cpp
|
C++
|
src/lexical/lexical.cpp
|
MisakaCenter/SimpleCompiler
|
aafb13c6c6b2f20c19757ec8b04231746a298f55
|
[
"MIT"
] | 24
|
2020-09-26T13:20:23.000Z
|
2022-03-09T18:56:58.000Z
|
src/lexical/lexical.cpp
|
MRNIU/Compiler
|
746106625ea6fba34f36bd04ac7f6394d82166a8
|
[
"MIT"
] | 2
|
2020-07-19T23:35:02.000Z
|
2021-09-27T16:43:40.000Z
|
src/lexical/lexical.cpp
|
MRNIU/Compiler
|
746106625ea6fba34f36bd04ac7f6394d82166a8
|
[
"MIT"
] | 11
|
2020-06-07T04:57:57.000Z
|
2021-08-03T08:00:48.000Z
|
// This file is a part of Simple-XX/SimpleCompiler
// (https://github.com/Simple-XX/SimpleCompiler).
//
// lexical.cpp for Simple-XX/SimpleCompiler.
#include "iostream"
#include "string"
#include "lexical.h"
using namespace std;
Keywords Lexer::keywords;
Lexer::Lexer(Scanner &sc) : scanner(sc) {
ch = ' ';
token = NULL;
return;
}
Lexer::~Lexer() {
if (token != NULL) {
delete token;
}
return;
}
bool Lexer::scan(char need) {
ch = scanner.scan();
if (need) {
if (ch != need)
return false;
ch = scanner.scan();
return true;
}
return true;
}
void Lexer::blank() {
Token *t = NULL;
// 跳过空字符
do {
scan();
} while (COND_BLANK);
token = t;
return;
}
void Lexer::identifier() {
Token *t = NULL;
// 标识符
while (COND_IDENTIFIER) {
string name = "";
do {
// 记录字符
name.push_back(ch);
scan();
} while (COND_IDENTIFIER || (ch >= '0' && ch <= '9'));
// 判断是不是关键字
Tag tag = keywords.get_tag(name);
// 如果不是,则为标识符
if (tag == ID) {
t = new Id(name);
}
// 如果是
else {
t = new Token(tag);
}
}
token = t;
return;
}
void Lexer::number() {
Token *t = NULL;
int val = 0;
// 十进制数
do {
// 计算数字
val = val * 10 + ch - '0';
} while (scan(), (ch >= '0' && ch <= '9'));
t = new Num(val);
token = t;
return;
}
void Lexer::character() {
Token *t = NULL;
do {
// 过滤掉第一个单引号
if (ch == '\'') {
continue;
}
// 文件结束或换行
else if ((ch == '\n') || (ch == EOF) ) {
t = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
break;
}
// 转义字符
else if (ch == '\\') {
scan();
if (ch == 'n') {
t = new Char('\n');
}
else if (ch == 't') {
t = new Char('\t');
}
else if (ch == '0') {
t = new Char('\0');
}
else if (ch == '\'') {
t = new Char('\'');
}
else if (ch == '\\') {
t = new Char('\\');
}
else if ((ch == EOF) || (ch == '\n')) {
t = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
break;
}
// 其它的不转义
else {
t = new Char(ch);
}
}
// 一般情况
else {
t = new Char(ch);
}
} while (scan('\'') == false);
token = t;
return;
}
void Lexer::str() {
Token *t = NULL;
string s = "";
do {
// 过滤掉第一个双引号
if (ch == '"') {
continue;
}
// 直接结束
else if ((ch == '\n') || (ch == EOF)) {
t = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
break;
}
// 转义字符
if (ch == '\\') {
scan();
if (ch == 'n') {
s.push_back('\n');
}
else if (ch == 't') {
s.push_back('\t');
}
else if (ch == '0') {
s.push_back('\0');
}
else if (ch == '"') {
s.push_back('"');
}
else if (ch == '\\') {
s.push_back('\\');
}
else if (ch == '\n') {
;
}
else if (ch == EOF) {
t = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
break;
}
// 其它的不转义
else {
s.push_back(ch);
}
}
// 一般情况
else {
s.push_back(ch);
}
} while (scan('"') == false);
// 最终字符串
if (t == NULL) {
t = new Str(s);
}
token = t;
return;
}
void Lexer::separator() {
Token *t = NULL;
switch (ch) {
case '(':
t = new Token(LPAREN);
break;
case ')':
t = new Token(RPAREN);
break;
case '{':
t = new Token(LBRACE);
break;
case '}':
t = new Token(RBRACE);
break;
case '[':
t = new Token(LBRACKET);
break;
case ']':
t = new Token(RBRACKET);
break;
case ',':
t = new Token(COMMA);
break;
case ':':
t = new Token(COLON);
break;
case ';':
t = new Token(SEMICON);
break;
default:
t = new Token(ERR); // 错误的词法记号
}
scan();
token = t;
return;
}
void Lexer::operation() {
Token *t = NULL;
switch (ch) {
case '=':
t = new Token(scan('=') ? EQU : ASSIGN);
break;
case '+':
t = new Token(ADD);
scan();
break;
case '-':
t = new Token(SUB);
scan();
break;
case '*':
t = new Token(MUL);
scan();
break;
case '/':
scan();
// 单行注释
if (ch == '/') {
while (ch != '\n' && ch != EOF)
scan();
}
// 多行注释
else if (ch == '*') {
while (scan(EOF) == false) {
if (ch == '*') {
if (scan('/'))
break;
}
}
// 没有闭合
if (ch == EOF) {
cout << "多行注释未正常结束" << endl;
}
}
// 否则为除号
else
t = new Token(DIV);
break;
case '%':
t = new Token(MOD);
scan();
break;
case '|':
t = new Token(scan('|') ? OR : ORBIT);
break;
case '&':
t = new Token(scan('&') ? AND : ANDBIT);
break;
case '^':
t = new Token(EORBIT);
scan();
break;
case '!':
t = new Token(scan('=') ? NEQU : NOT);
break;
case '>':
t = new Token(scan('=') ? GE : GT);
break;
case '<':
t = new Token(scan('=') ? LE : LT);
break;
// 除此以外是错误的
default:
t = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
scan();
}
token = t;
return;
}
Token *Lexer::lexing() {
// 字符不为空且没有出错时
while ((is_done() == false)) {
if (COND_BLANK)
blank();
else if (COND_IDENTIFIER)
identifier();
else if (COND_NUMBER) {
number();
}
else if (ch == '\'') {
character();
}
else if (ch == '"') {
this->str();
}
else if (COND_SEPARATOR) {
separator();
}
else if (COND_OPERATION) {
operation();
}
else {
token = new Token(ERR);
error->set_err_no(ERR);
error->display_err();
return token;
}
// 更新 token 内容
if (token != NULL && token->tag != ERR) {
return token;
}
}
token = new Token(END);
return token;
}
bool Lexer::is_done() const {
return scanner.is_done() || (error->get_err_no() < 0);
}
| 23.090652
| 63
| 0.330266
|
MisakaCenter
|
1dbaf0f021069a31137ec35db0a3d12bf546b1fe
| 7,538
|
cpp
|
C++
|
far/tracer.cpp
|
andrastantos/FarManager
|
1df1cd0f964c1e2fcde5ff108c2756b5ad5f71b7
|
[
"BSD-3-Clause"
] | null | null | null |
far/tracer.cpp
|
andrastantos/FarManager
|
1df1cd0f964c1e2fcde5ff108c2756b5ad5f71b7
|
[
"BSD-3-Clause"
] | null | null | null |
far/tracer.cpp
|
andrastantos/FarManager
|
1df1cd0f964c1e2fcde5ff108c2756b5ad5f71b7
|
[
"BSD-3-Clause"
] | null | null | null |
/*
tracer.cpp
*/
/*
Copyright © 2016 Far Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "tracer.hpp"
#include "imports.hpp"
#include "farexcpt.hpp"
#include "encoding.hpp"
#include "pathmix.hpp"
#include "platform.fs.hpp"
#include "format.hpp"
static auto GetBackTrace(const exception_context& Context)
{
std::vector<const void*> Result;
// StackWalk64() may modify context record passed to it, so we will use a copy.
auto ContextRecord = *Context.pointers()->ContextRecord;
STACKFRAME64 StackFrame{};
#if defined(_WIN64)
const DWORD MachineType = IMAGE_FILE_MACHINE_AMD64;
StackFrame.AddrPC.Offset = ContextRecord.Rip;
StackFrame.AddrFrame.Offset = ContextRecord.Rbp;
StackFrame.AddrStack.Offset = ContextRecord.Rsp;
#else
const DWORD MachineType = IMAGE_FILE_MACHINE_I386;
StackFrame.AddrPC.Offset = ContextRecord.Eip;
StackFrame.AddrFrame.Offset = ContextRecord.Ebp;
StackFrame.AddrStack.Offset = ContextRecord.Esp;
#endif
StackFrame.AddrPC.Mode = AddrModeFlat;
StackFrame.AddrFrame.Mode = AddrModeFlat;
StackFrame.AddrStack.Mode = AddrModeFlat;
while (imports.StackWalk64(MachineType, GetCurrentProcess(), Context.thread_handle(), &StackFrame, &ContextRecord, nullptr, nullptr, nullptr, nullptr))
{
Result.emplace_back(reinterpret_cast<const void*>(StackFrame.AddrPC.Offset));
}
return Result;
}
static void GetSymbols(const std::vector<const void*>& BackTrace, const std::function<void(string&&, string&&, string&&)>& Consumer)
{
const auto Process = GetCurrentProcess();
const auto MaxNameLen = MAX_SYM_NAME;
block_ptr<SYMBOL_INFO> Symbol(sizeof(SYMBOL_INFO) + MaxNameLen + 1);
Symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
Symbol->MaxNameLen = MaxNameLen;
imports.SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS | SYMOPT_INCLUDE_32BIT_MODULES);
IMAGEHLP_MODULEW64 Module{ static_cast<DWORD>(aligned_size(offsetof(IMAGEHLP_MODULEW64, LoadedImageName), 8)) }; // use the pre-07-Jun-2002 struct size, aligned to 8
IMAGEHLP_LINE64 Line{ sizeof(Line) };
DWORD Displacement;
const auto MaxAddressSize = format(L"{0:0X}", reinterpret_cast<uintptr_t>(*std::max_element(ALL_CONST_RANGE(BackTrace)))).size();
for (const auto i: BackTrace)
{
const auto Address = reinterpret_cast<DWORD_PTR>(i);
const auto GotName = imports.SymFromAddr(Process, Address, nullptr, Symbol.get()) != FALSE;
const auto GotModule = imports.SymGetModuleInfoW64(Process, Address, &Module) != FALSE;
const auto GotSource = imports.SymGetLineFromAddr64(Process, Address, &Displacement, &Line) != FALSE;
Consumer(format(L"0x{0:0{1}X}", Address, MaxAddressSize),
format(L"{0}!{1}", GotModule? PointToName(Module.ImageName) : L""sv, GotName? encoding::ansi::get_chars(Symbol->Name) : L""s),
GotSource? format(L"{0}:{1}", encoding::ansi::get_chars(Line.FileName), Line.LineNumber) : L""s);
}
}
static auto GetSymbols(const std::vector<const void*>& BackTrace)
{
std::vector<string> Result;
GetSymbols(BackTrace, [&](string&& Address, string&& Name, string&& Source)
{
if (!Name.empty())
append(Address, L' ', Name);
if (!Source.empty())
append(Address, L" ("sv, Source, L')');
Result.emplace_back(std::move(Address));
});
return Result;
}
tracer* StaticInstance;
static LONG WINAPI StackLogger(EXCEPTION_POINTERS *xp)
{
if (IsCppException(xp))
{
// 0 indicates rethrow
if (xp->ExceptionRecord->ExceptionInformation[1])
{
if (StaticInstance)
StaticInstance->store(ToPtr(xp->ExceptionRecord->ExceptionInformation[1]), xp);
}
}
return EXCEPTION_CONTINUE_SEARCH;
}
tracer::veh_handler::veh_handler(PVECTORED_EXCEPTION_HANDLER Handler):
m_Handler(imports.AddVectoredExceptionHandler(TRUE, Handler))
{
}
tracer::veh_handler::~veh_handler()
{
imports.RemoveVectoredExceptionHandler(m_Handler);
}
tracer::tracer():
m_Handler(StackLogger)
{
assert(!StaticInstance);
string Path;
if (os::fs::GetModuleFileName(nullptr, nullptr, Path))
{
CutToParent(Path);
m_SymbolSearchPath = encoding::ansi::get_bytes(Path);
}
StaticInstance = this;
}
tracer::~tracer()
{
assert(StaticInstance);
StaticInstance = nullptr;
}
void tracer::store(const void* CppObject, const EXCEPTION_POINTERS* ExceptionInfo)
{
SCOPED_ACTION(os::critical_section_lock)(m_CS);
if (m_CppMap.size() > 2048)
{
// We can't store them forever
m_CppMap.clear();
}
m_CppMap.emplace(CppObject, std::make_unique<exception_context>(ExceptionInfo->ExceptionRecord->ExceptionCode, ExceptionInfo));
}
std::unique_ptr<exception_context> tracer::get_context(const void* CppObject)
{
SCOPED_ACTION(os::critical_section_lock)(m_CS);
auto Iterator = m_CppMap.find(CppObject);
if (Iterator == m_CppMap.end())
return nullptr;
auto Result = std::move(Iterator->second);
m_CppMap.erase(Iterator);
return Result;
}
std::unique_ptr<exception_context> tracer::get_exception_context(const void* CppObject)
{
return StaticInstance? StaticInstance->get_context(CppObject) : nullptr;
}
class with_symbols
{
public:
NONCOPYABLE(with_symbols);
with_symbols()
{
if (StaticInstance)
StaticInstance->SymInitialise();
}
~with_symbols()
{
if (StaticInstance)
StaticInstance->SymCleanup();
}
};
std::vector<string> tracer::get(const void* CppObject)
{
const auto Context = StaticInstance? StaticInstance->get_context(CppObject) : nullptr;
if (!Context)
return {};
SCOPED_ACTION(with_symbols);
return GetSymbols(GetBackTrace(*Context));
}
std::vector<string> tracer::get(const exception_context& Context)
{
SCOPED_ACTION(with_symbols);
return GetSymbols(GetBackTrace(Context));
}
void tracer::get_one(const void* Ptr, string& Address, string& Name, string& Source)
{
SCOPED_ACTION(with_symbols);
GetSymbols({Ptr}, [&](string&& StrAddress, string&& StrName, string&& StrSource)
{
Address = std::move(StrAddress);
Name = std::move(StrName);
Source = std::move(StrSource);
});
}
bool tracer::SymInitialise()
{
if (!m_SymInitialised)
{
m_SymInitialised = imports.SymInitialize(GetCurrentProcess(), EmptyToNull(m_SymbolSearchPath.c_str()), TRUE) != FALSE;
}
return m_SymInitialised;
}
void tracer::SymCleanup()
{
if (m_SymInitialised)
{
m_SymInitialised = !imports.SymCleanup(GetCurrentProcess());
}
}
| 29.794466
| 166
| 0.756699
|
andrastantos
|
1dbb5b8f8b57ce06e2ba2cc701913588f7d58790
| 2,510
|
cpp
|
C++
|
src/Main.cpp
|
Joco223/LogicGateSimulator
|
78bdb72886a5b2908a073a168a141471aed636d8
|
[
"MIT"
] | null | null | null |
src/Main.cpp
|
Joco223/LogicGateSimulator
|
78bdb72886a5b2908a073a168a141471aed636d8
|
[
"MIT"
] | null | null | null |
src/Main.cpp
|
Joco223/LogicGateSimulator
|
78bdb72886a5b2908a073a168a141471aed636d8
|
[
"MIT"
] | null | null | null |
#define SDL_MAIN_HANDLED
#include "Simple2D.h"
#include "Simple2D_Sprite.h"
#include "Simple2D_Text.h"
#include "Sandbox.h"
#include "Camera.h"
#include "GUI_Controller.h"
#include "Chip.h"
#include "Asset_loader.h"
#include <iostream>
#include <string>
#include <optional>
#include <functional>
constexpr int width = 1600;
constexpr int height = 900;
constexpr Simple2D::Colour window_colour = {50, 50, 50, 255};
void placeholder() {}
int main() {
Simple2D::Context ctx(width, height, "LGS");
ctx.set_window_colour(window_colour);
ctx.set_blending_mode(Simple2D::S2D_BLENDING_ALPHA);
ctx.set_aa_mode(Simple2D::S2D_AA_LINEAR);
Simple2D::Text_context text_ctx("assets/Cascadia.ttf");
Sandbox sandbox;
GUI_Controller gui_controller = GUI_Controller(ctx, width, height);
gui_controller.init_menu_bar(ctx, text_ctx);
Asset_loader asset_loader;
asset_loader.load_chips(ctx, "assets/chips/", gui_controller);
asset_loader.load_logic_gates(ctx, "assets/logic_gates/", gui_controller);
Camera camera = Camera();
int rel_x = 0;
int rel_y = 0;
int curr_mouse_x = 0;
int curr_mouse_y = 0;
while(!ctx.check_exit()) {
ctx.clear();
rel_x = 0;
rel_y = 0;
std::optional<Simple2D::mouse_motion_e> mouse_motion_event = ctx.check_mouse_motion();
while(mouse_motion_event) {
rel_x += mouse_motion_event->rel_x;
rel_y -= mouse_motion_event->rel_y;
curr_mouse_x = mouse_motion_event->x;
curr_mouse_y = mouse_motion_event->y;
gui_controller.handle_mouse_move(*mouse_motion_event);
mouse_motion_event = ctx.check_mouse_motion();
}
std::optional<Simple2D::mouse_button_e> mouse_button_event = ctx.check_mouse_button();
if(mouse_button_event) {
camera.update_position(*mouse_button_event);
gui_controller.handle_mouse_click(camera.get_pos_x(), camera.get_pos_y(), ctx, *mouse_button_event, sandbox);
}
std::optional<Simple2D::mouse_wheel_e> mouse_wheel_event = ctx.check_mouse_wheel();
if(mouse_wheel_event) {
gui_controller.handle_mouse_scroll(*mouse_wheel_event, curr_mouse_x, curr_mouse_y);
}
std::optional<Simple2D::keyboard_e> keyboard_event = ctx.check_keyboard();
while(keyboard_event) {
gui_controller.handle_keyboard(*keyboard_event);
keyboard_event = ctx.check_keyboard();
}
gui_controller.handle_events(ctx);
camera.move_camera(rel_x, rel_y);
sandbox.draw(camera.get_pos_x(), camera.get_pos_y(), ctx);
gui_controller.draw_gui(ctx, text_ctx);
ctx.draw();
}
return 0;
}
| 26.702128
| 112
| 0.741036
|
Joco223
|
1dbcf0e090976b6dd2c43c7613c9529903d8e7d2
| 4,827
|
cpp
|
C++
|
external/globjects-0.5.0/source/globjects/source/Buffer.cpp
|
steppobeck/rgbd-recon
|
171a8336c8e3ba52a1b187b73544338fdd3c9285
|
[
"MIT"
] | 18
|
2016-09-03T05:12:25.000Z
|
2022-02-23T15:52:33.000Z
|
external/globjects-0.5.0/source/globjects/source/Buffer.cpp
|
3d-scan/rgbd-recon
|
c4a5614eaa55dd93c74da70d6fb3d813d74f2903
|
[
"MIT"
] | 1
|
2016-05-04T09:06:29.000Z
|
2016-05-04T09:06:29.000Z
|
external/globjects-0.5.0/source/globjects/source/Buffer.cpp
|
3d-scan/rgbd-recon
|
c4a5614eaa55dd93c74da70d6fb3d813d74f2903
|
[
"MIT"
] | 7
|
2016-04-20T13:58:50.000Z
|
2018-07-09T15:47:26.000Z
|
#include <globjects/Buffer.h>
#include <cassert>
#include <glbinding/gl/functions.h>
#include <glbinding/gl/enum.h>
#include <globjects/globjects.h>
#include <globjects/ObjectVisitor.h>
#include "registry/ImplementationRegistry.h"
#include "Resource.h"
#include "implementations/BufferImplementation_Legacy.h"
using namespace gl;
namespace
{
const globjects::AbstractBufferImplementation & implementation()
{
return globjects::ImplementationRegistry::current().bufferImplementation();
}
}
namespace globjects
{
void Buffer::hintBindlessImplementation(BindlessImplementation impl)
{
ImplementationRegistry::current().initialize(impl);
}
void Buffer::setWorkingTarget(GLenum target)
{
BufferImplementation_Legacy::s_workingTarget = target;
}
Buffer::Buffer()
: Buffer(new BufferResource)
{
}
Buffer::Buffer(IDResource * resource)
: Object(resource)
{
}
Buffer * Buffer::fromId(const GLuint id)
{
return new Buffer(new ExternalResource(id));
}
Buffer::~Buffer()
{
}
void Buffer::accept(ObjectVisitor& visitor)
{
visitor.visitBuffer(this);
}
void Buffer::bind(const GLenum target) const
{
glBindBuffer(target, id());
}
void Buffer::unbind(const GLenum target)
{
glBindBuffer(target, 0);
}
void Buffer::unbind(const GLenum target, const GLuint index)
{
glBindBufferBase(target, index, 0);
}
const void * Buffer::map() const
{
return static_cast<const void*>(implementation().map(this, GL_READ_ONLY));
}
void* Buffer::map(const GLenum access)
{
return implementation().map(this, access);
}
void* Buffer::mapRange(const GLintptr offset, const GLsizeiptr length, const BufferAccessMask access)
{
return implementation().mapRange(this, offset, length, access);
}
bool Buffer::unmap() const
{
return implementation().unmap(this);
}
void Buffer::flushMappedRange(const GLintptr offset, const GLsizeiptr length)
{
implementation().flushMappedRange(this, offset, length);
}
void Buffer::setData(const GLsizeiptr size, const GLvoid * data, const GLenum usage)
{
implementation().setData(this, size, data, usage);
}
void Buffer::setSubData(const GLintptr offset, const GLsizeiptr size, const GLvoid * data)
{
implementation().setSubData(this, offset, size, data);
}
void Buffer::setStorage(const GLsizeiptr size, const GLvoid * data, const BufferStorageMask flags)
{
implementation().setStorage(this, size, data, flags);
}
GLint Buffer::getParameter(const GLenum pname) const
{
return implementation().getParameter(this, pname);
}
GLint64 Buffer::getParameter64(const GLenum pname) const
{
return implementation().getParameter64(this, pname);
}
void Buffer::bindBase(const GLenum target, const GLuint index) const
{
glBindBufferBase(target, index, id());
}
void Buffer::bindRange(const GLenum target, const GLuint index, const GLintptr offset, const GLsizeiptr size) const
{
glBindBufferRange(target, index, id(), offset, size);
}
void Buffer::copySubData(Buffer * buffer, const GLintptr readOffset, const GLintptr writeOffset, const GLsizeiptr size) const
{
assert(buffer != nullptr);
implementation().copySubData(this, buffer, readOffset, writeOffset, size);
}
void Buffer::copySubData(Buffer * buffer, const GLsizeiptr size) const
{
copySubData(buffer, 0, 0, size);
}
void Buffer::copyData(Buffer * buffer, const GLsizeiptr size, const GLenum usage) const
{
assert(buffer != nullptr);
buffer->setData(static_cast<GLsizei>(size), nullptr, usage);
copySubData(buffer, 0, 0, size);
}
void Buffer::clearData(const GLenum internalformat, const GLenum format, const GLenum type, const void * data)
{
implementation().clearData(this, internalformat, format, type, data);
}
void Buffer::clearSubData(const GLenum internalformat, const GLintptr offset, const GLsizeiptr size, const GLenum format, const GLenum type, const void * data)
{
implementation().clearSubData(this, internalformat, offset, size, format, type, data);
}
const void * Buffer::getPointer() const
{
return getPointer(GL_BUFFER_MAP_POINTER);
}
void * Buffer::getPointer()
{
return getPointer(GL_BUFFER_MAP_POINTER);
}
const void * Buffer::getPointer(const GLenum pname) const
{
return implementation().getPointer(this, pname);
}
void * Buffer::getPointer(const GLenum pname)
{
return implementation().getPointer(this, pname);
}
void Buffer::getSubData(const GLintptr offset, const GLsizeiptr size, void * data) const
{
implementation().getBufferSubData(this, offset, size, data);
}
void Buffer::invalidateData() const
{
implementation().invalidateData(this);
}
void Buffer::invalidateSubData(const GLintptr offset, const GLsizeiptr length) const
{
implementation().invalidateSubData(this, offset, length);
}
GLenum Buffer::objectType() const
{
return GL_BUFFER;
}
} // namespace globjects
| 22.556075
| 159
| 0.743526
|
steppobeck
|
1dc0243aad3e3515f84aed1f4ddcfd73663abba7
| 848
|
cpp
|
C++
|
libraries/RelaisSwitch/RelaisSwitch.cpp
|
naice/arduino
|
c63763bc532df3ab446e9b6ce48aa127962c8b42
|
[
"MIT"
] | null | null | null |
libraries/RelaisSwitch/RelaisSwitch.cpp
|
naice/arduino
|
c63763bc532df3ab446e9b6ce48aa127962c8b42
|
[
"MIT"
] | null | null | null |
libraries/RelaisSwitch/RelaisSwitch.cpp
|
naice/arduino
|
c63763bc532df3ab446e9b6ce48aa127962c8b42
|
[
"MIT"
] | null | null | null |
/*
Name: RelaisSwitch.cpp
Created: 10/6/2019 12:16:27 PM
Author: Jens Marchewka
*/
#include "RelaisSwitch.h"
RelaisSwitch::RelaisSwitch(unsigned int pin, bool defaultState, bool isDigital)
{
_currentState = defaultState;
_isDigital = isDigital;
_pin = pin;
pinMode(_pin, OUTPUT);
if (_currentState)
Off();
else
On();
}
RelaisSwitch::~RelaisSwitch()
{
}
bool RelaisSwitch::Toggle()
{
if (_currentState)
Off();
else
On();
return GetState();
}
bool RelaisSwitch::GetState()
{
return _currentState;
}
void RelaisSwitch::On()
{
if (_isDigital)
digitalWrite(_pin, HIGH);
else
analogWrite(_pin, HIGH);
_currentState = true;
}
void RelaisSwitch::Off()
{
if (_isDigital)
digitalWrite(_pin, LOW);
else
analogWrite(_pin, LOW);
_currentState = false;
}
| 14.62069
| 80
| 0.643868
|
naice
|
1b8efa7675d18b6880c0accafd7002abd79f228a
| 1,304
|
cxx
|
C++
|
test/epoch_allocator.cxx
|
cychan-lbnl/devastator
|
a23bb21f9da5841fa2036edc68f3a89a2241831b
|
[
"BSD-3-Clause-LBNL"
] | 1
|
2022-03-16T08:11:02.000Z
|
2022-03-16T08:11:02.000Z
|
test/epoch_allocator.cxx
|
cychan-lbnl/devastator
|
a23bb21f9da5841fa2036edc68f3a89a2241831b
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
test/epoch_allocator.cxx
|
cychan-lbnl/devastator
|
a23bb21f9da5841fa2036edc68f3a89a2241831b
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
#include <devastator/diagnostic.hxx>
#include <devastator/threads/epoch_allocator.hxx>
#include <random>
#include <map>
#include <deque>
#include <vector>
using namespace std;
template<int epochs>
void test() {
deva::threads::epoch_allocator<epochs> ma;
ma.init(nullptr, 1<<20);
map<uintptr_t, uintptr_t> liveset;
deque<vector<uintptr_t>> live_at(epochs);
default_random_engine rng(0);
for(int e=0; e < 10000; e++) {
int q = rng() % 10;
for(int m=0; m < q; m++) {
size_t sz = 1 + (rng() % 256);
uintptr_t p = reinterpret_cast<uintptr_t>(ma.allocate(sz, 1));
auto bef = liveset.lower_bound(p);
auto aft = liveset.lower_bound(p + sz);
DEVA_ASSERT_ALWAYS(bef == aft, "p="<<p<<" "<<p+sz<<" bef="<<bef->first<<' '<<bef->first+bef->second<<" aft="<<aft->first);
if(bef != liveset.begin()) {
--bef;
DEVA_ASSERT_ALWAYS(bef->first + bef->second <= p);
}
live_at.back().push_back(p);
liveset[p] = sz;
}
ma.bump_epoch();
for(uintptr_t p: live_at[0]) {
DEVA_ASSERT_ALWAYS(liveset.count(p));
liveset.erase(p);
}
live_at.pop_front();
live_at.push_back({});
}
}
int main() {
test<2>();
test<3>();
test<4>();
test<5>();
std::cout<<"SUCCESS\n";
return 0;
}
| 22.877193
| 128
| 0.585123
|
cychan-lbnl
|
1b8ff835b8d5dd033dc69a3c0fffc3c20fd65f39
| 1,631
|
cpp
|
C++
|
getMathML/Modules/XML/XMLNodeList.cpp
|
TanWei/getMathML
|
b6fbef24aaa5e80229cce42823f7595f1fe78ddf
|
[
"MIT"
] | null | null | null |
getMathML/Modules/XML/XMLNodeList.cpp
|
TanWei/getMathML
|
b6fbef24aaa5e80229cce42823f7595f1fe78ddf
|
[
"MIT"
] | null | null | null |
getMathML/Modules/XML/XMLNodeList.cpp
|
TanWei/getMathML
|
b6fbef24aaa5e80229cce42823f7595f1fe78ddf
|
[
"MIT"
] | null | null | null |
// XMLNodeList.cpp: implementation of the CXMLNodeList class.
//CXMLNodeList: Node List read-only collection
//////////////////////////////////////////////////////////////////////
#include "XML.h"
#include "TFuncCalls.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CXMLNodeList::CXMLNodeList(const MSXML2::IXMLDOMNodeListPtr& ptr)
:m_ptrList(ptr)
{
}
CXMLNodeList::~CXMLNodeList()
{
}
CXMLNode CXMLNodeList::operator[](unsigned long ulIndex)const
{
ValidateState();
return CXMLNode(TCallMemberFunc1(
m_ptrList.GetInterfacePtr(),&MSXML2::IXMLDOMNodeList::Getitem,ulIndex));
}
unsigned long CXMLNodeList::GetLength() const
{
ValidateState();
long lLength = TCallMemberFunc0(
m_ptrList.GetInterfacePtr(),&MSXML2::IXMLDOMNodeList::Getlength);
return ((lLength<0) ? 0 : lLength);
}
CXMLNode CXMLNodeList::NextNode() const
{
ValidateState();
return CXMLNode(TCallMemberFunc0(
m_ptrList.GetInterfacePtr(),&MSXML2::IXMLDOMNodeList::nextNode));
}
void CXMLNodeList::Reset() const
{
ValidateState();
TCallMemberFunc0(m_ptrList.GetInterfacePtr(),
&MSXML2::IXMLDOMNodeList::reset);
}
MSXML2::IXMLDOMNodeListPtr CXMLNodeList::GetListPtr() const
{
return m_ptrList;
}
CXMLNodeList::operator MSXML2::IXMLDOMNodeListPtr()const
{
return m_ptrList;
}
CXMLNodeList::operator bool()const
{
return m_ptrList.operator bool();
}
void CXMLNodeList::ValidateState() const
{
if(! m_ptrList.operator bool())
{
throw CXMLError(
L"CXMLNodeList::ValidateState() NULL Pointer Detected");
}
}
| 21.181818
| 74
| 0.659718
|
TanWei
|
1b90e91ef9a796654807084a0577c3ab2330c503
| 351
|
cpp
|
C++
|
CodeChef/SQUIDRULE/solution.cpp
|
afifabroory/CompetitiveProgramming
|
231883eeab5abbd84005e80c5065dd02fd8430ef
|
[
"Unlicense"
] | null | null | null |
CodeChef/SQUIDRULE/solution.cpp
|
afifabroory/CompetitiveProgramming
|
231883eeab5abbd84005e80c5065dd02fd8430ef
|
[
"Unlicense"
] | null | null | null |
CodeChef/SQUIDRULE/solution.cpp
|
afifabroory/CompetitiveProgramming
|
231883eeab5abbd84005e80c5065dd02fd8430ef
|
[
"Unlicense"
] | null | null | null |
#include <bits/stdc++.h>
#define FOR(a, b) for (int i = a; i < b; i++)
using namespace std;
int main() {
unsigned short t;
cin >> t;
unsigned int n, a, ans, small;
while (t--) {
cin >> n;
ans = 0; small = INT_MAX;
FOR(0, n) {
cin >> a;
ans += a;
if (a < small) small = a;
}
cout << ans-small << '\n';
}
return 0;
}
| 12.535714
| 45
| 0.495726
|
afifabroory
|
1b94c0655e8ad85184622e31dc69fea7482847f5
| 41,848
|
cpp
|
C++
|
src/editor/EditorWindow.cpp
|
FuRuYa7/Koder
|
73171109f5ed93ea45351019ff3c03c99dd9de5c
|
[
"MIT"
] | 31
|
2015-03-12T23:23:48.000Z
|
2021-12-05T17:23:14.000Z
|
src/editor/EditorWindow.cpp
|
FuRuYa7/Koder
|
73171109f5ed93ea45351019ff3c03c99dd9de5c
|
[
"MIT"
] | 137
|
2017-01-03T02:40:00.000Z
|
2022-01-19T12:36:57.000Z
|
src/editor/EditorWindow.cpp
|
FuRuYa7/Koder
|
73171109f5ed93ea45351019ff3c03c99dd9de5c
|
[
"MIT"
] | 21
|
2017-01-03T02:20:00.000Z
|
2022-03-11T06:19:59.000Z
|
/*
* Copyright 2014-2019 Kacper Kasper <kacperkasper@gmail.com>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "EditorWindow.h"
#include <string>
#include <Alert.h>
#include <Application.h>
#include <Bitmap.h>
#include <Button.h>
#include <Catalog.h>
#include <Entry.h>
#include <FilePanel.h>
#include <GroupLayout.h>
#include <LayoutBuilder.h>
#include <MenuBar.h>
#include <MimeType.h>
#include <NodeMonitor.h>
#include <ObjectList.h>
#include <Path.h>
#include <PopUpMenu.h>
#include <Roster.h>
#include <String.h>
#include <StringFormat.h>
#include <ToolBar.h>
#include <kernel/fs_attr.h>
#include "App.h"
#include "AppPreferencesWindow.h"
#include "BookmarksWindow.h"
#include "Editor.h"
#include "Editorconfig.h"
#include "File.h"
#include "FindReplaceHandler.h"
#include "FindWindow.h"
#include "GoToLineWindow.h"
#include "Languages.h"
#include "Preferences.h"
#include "ScintillaUtils.h"
#include "StatusView.h"
#include "Styler.h"
#include "ToolBar.h"
#include "Utils.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "EditorWindow"
using namespace Scintilla::Properties;
const float kWindowStagger = 17.0f;
Preferences* EditorWindow::fPreferences = nullptr;
namespace {
enum {
INCREMENTAL_SEARCH_CHAR = 'incs',
INCREMENTAL_SEARCH_BACKSPACE = 'incb',
INCREMENTAL_SEARCH_CANCEL = 'ince',
INCREMENTAL_SEARCH_COMMIT = 'incc'
};
}
EditorWindow::EditorWindow(bool stagger)
:
BWindow(fPreferences->fWindowRect, gAppName, B_DOCUMENT_WINDOW, 0),
fIncrementalSearchTerm(""),
fIncrementalSearchFilter(new BMessageFilter(B_KEY_DOWN, _IncrementalSearchFilter))
{
fActivatedGuard = false;
fModifiedOutside = false;
fModified = false;
fReadOnly = false;
fOnQuitReplyToMessage = nullptr;
fGoToLineWindow = nullptr;
fBookmarksWindow = nullptr;
fOpenedFilePath = nullptr;
fOpenedFileMimeType.SetTo("text/plain");
fCurrentLanguage = "text";
BMessage openMessage(B_REFS_RECEIVED);
openMessage.AddPointer("window", this);
BMessenger* windowMessenger = new BMessenger(this);
fOpenPanel = new BFilePanel(B_OPEN_PANEL, windowMessenger);
fOpenPanel->SetMessage(&openMessage);
fSavePanel = new BFilePanel(B_SAVE_PANEL, windowMessenger, nullptr, 0, false);
fMainMenu = new BMenuBar("MainMenu");
BLayoutBuilder::Menu<>(fMainMenu)
.AddMenu(B_TRANSLATE("File"))
.AddItem(B_TRANSLATE("New"), MAINMENU_FILE_NEW, 'N')
.AddSeparator()
.AddItem(B_TRANSLATE("Open" B_UTF8_ELLIPSIS), MAINMENU_FILE_OPEN, 'O')
.AddItem(B_TRANSLATE("Reload"), MAINMENU_FILE_RELOAD)
.AddItem(B_TRANSLATE("Save"), MAINMENU_FILE_SAVE, 'S')
.AddItem(B_TRANSLATE("Save as" B_UTF8_ELLIPSIS), MAINMENU_FILE_SAVEAS)
.AddSeparator()
.AddItem(B_TRANSLATE("Open partner file"), MAINMENU_FILE_OPEN_CORRESPONDING, 'O', B_OPTION_KEY)
.AddSeparator()
.AddItem(B_TRANSLATE("Close"), B_QUIT_REQUESTED, 'W')
.AddItem(B_TRANSLATE("Quit"), MAINMENU_FILE_QUIT, 'Q')
.End()
.AddMenu(B_TRANSLATE("Edit"))
.AddItem(B_TRANSLATE("Undo"), B_UNDO, 'Z')
.AddItem(B_TRANSLATE("Redo"), B_REDO, 'Y')
.AddSeparator()
.AddItem(B_TRANSLATE("Cut"), B_CUT, 'X')
.AddItem(B_TRANSLATE("Copy"), B_COPY, 'C')
.AddItem(B_TRANSLATE("Paste"), B_PASTE, 'V')
.AddSeparator()
.AddItem(B_TRANSLATE("Select all"), B_SELECT_ALL, 'A')
.AddSeparator()
.AddItem(B_TRANSLATE("Comment line"), EDIT_COMMENTLINE, '/')
.AddItem(B_TRANSLATE("Comment block"), EDIT_COMMENTBLOCK, '/', B_SHIFT_KEY)
.AddSeparator()
.AddItem(B_TRANSLATE("Trim trailing whitespace"), MAINMENU_EDIT_TRIMWS)
.AddSeparator()
.AddMenu(B_TRANSLATE("Line endings"))
.AddItem(B_TRANSLATE("Unix format"), MAINMENU_EDIT_CONVERTEOLS_UNIX)
.AddItem(B_TRANSLATE("Windows format"), MAINMENU_EDIT_CONVERTEOLS_WINDOWS)
.AddItem(B_TRANSLATE("Old Mac format"), MAINMENU_EDIT_CONVERTEOLS_MAC)
.End()
.AddSeparator()
//.AddItem(B_TRANSLATE("File preferences" B_UTF8_ELLIPSIS), MAINMENU_EDIT_FILE_PREFERENCES)
.AddItem(B_TRANSLATE("Koder preferences" B_UTF8_ELLIPSIS), MAINMENU_EDIT_APP_PREFERENCES)
.End()
.AddMenu(B_TRANSLATE("View"))
.AddMenu(B_TRANSLATE("Special symbols"))
.AddItem(B_TRANSLATE("Show white space"), MAINMENU_VIEW_SPECIAL_WHITESPACE)
.AddItem(B_TRANSLATE("Show line endings"), MAINMENU_VIEW_SPECIAL_EOL)
.End()
.AddItem(B_TRANSLATE("Show toolbar"), MAINMENU_VIEW_TOOLBAR)
.AddItem(B_TRANSLATE("Wrap lines"), MAINMENU_VIEW_WRAPLINES)
.End()
.AddMenu(B_TRANSLATE("Search"))
.AddItem(B_TRANSLATE("Find/Replace" B_UTF8_ELLIPSIS), MAINMENU_SEARCH_FINDREPLACE, 'F')
.AddItem(B_TRANSLATE("Find next"), MAINMENU_SEARCH_FINDNEXT, 'G')
.AddItem(B_TRANSLATE("Find selection"), MAINMENU_SEARCH_FINDSELECTION, 'H')
.AddItem(B_TRANSLATE("Replace and find"), MAINMENU_SEARCH_REPLACEANDFIND, 'T')
.AddItem(B_TRANSLATE("Incremental search"), MAINMENU_SEARCH_INCREMENTAL, 'I')
.AddSeparator()
.AddItem(B_TRANSLATE("Bookmarks"), MAINMENU_SEARCH_BOOKMARKS)
.AddItem(B_TRANSLATE("Toggle bookmark"), MAINMENU_SEARCH_TOGGLEBOOKMARK, 'B')
.AddItem(B_TRANSLATE("Next bookmark"), MAINMENU_SEARCH_NEXTBOOKMARK, 'N', B_CONTROL_KEY)
.AddItem(B_TRANSLATE("Previous bookmark"), MAINMENU_SEARCH_PREVBOOKMARK, 'P', B_CONTROL_KEY)
.AddSeparator()
.AddItem(B_TRANSLATE("Go to line" B_UTF8_ELLIPSIS), MAINMENU_SEARCH_GOTOLINE, ',')
.End()
.AddMenu(B_TRANSLATE("Language"))
.AddItem("Dummy", MAINMENU_LANGUAGE)
.End()
.AddMenu(B_TRANSLATE("Help"))
.AddItem(B_TRANSLATE("About" B_UTF8_ELLIPSIS), B_ABOUT_REQUESTED)
.End();
// When changing this shortcut remember to update one in StatusView as well
AddShortcut('T', B_COMMAND_KEY | B_OPTION_KEY, new BMessage((uint32) OPEN_TERMINAL));
fLanguageMenu = fMainMenu->FindItem(MAINMENU_LANGUAGE)->Menu();
_PopulateLanguageMenu();
fContextMenu = new BPopUpMenu("ContextMenu", false, false);
BLayoutBuilder::Menu<>(fContextMenu)
.AddItem(B_TRANSLATE("Undo"), B_UNDO, 'Z')
.AddItem(B_TRANSLATE("Redo"), B_REDO, 'Y')
.AddSeparator()
.AddItem(B_TRANSLATE("Cut"), B_CUT, 'X')
.AddItem(B_TRANSLATE("Copy"), B_COPY, 'C')
.AddItem(B_TRANSLATE("Paste"), B_PASTE, 'V')
.AddSeparator()
.AddItem(B_TRANSLATE("Select all"), B_SELECT_ALL, 'A')
.AddSeparator()
.AddItem(B_TRANSLATE("Comment line"), EDIT_COMMENTLINE, '/')
.AddItem(B_TRANSLATE("Comment block"), EDIT_COMMENTBLOCK, '/', B_SHIFT_KEY);
fContextMenu->SetTargetForItems(*windowMessenger);
fEditor = new Editor();
Languages::LoadExternalLexers(fEditor);
fToolbar = new ToolBar(this);
fToolbar->AddAction(MAINMENU_FILE_OPEN,
B_TRANSLATE("Open" B_UTF8_ELLIPSIS), "open");
fToolbar->AddAction(MAINMENU_FILE_RELOAD,
B_TRANSLATE("Reload"), "reload");
fToolbar->SetActionEnabled(MAINMENU_FILE_RELOAD, false);
fToolbar->AddAction(MAINMENU_FILE_SAVE,
B_TRANSLATE("Save"), "save");
fToolbar->SetActionEnabled(MAINMENU_FILE_SAVE, false);
fToolbar->AddAction(MAINMENU_FILE_SAVEAS,
B_TRANSLATE("Save as" B_UTF8_ELLIPSIS), "save as");
fToolbar->AddSeparator();
fToolbar->AddAction(B_UNDO,
B_TRANSLATE("Undo"), "undo");
fToolbar->SetActionEnabled(B_UNDO, false);
fToolbar->AddAction(B_REDO, B_TRANSLATE("Redo"), "redo");
fToolbar->SetActionEnabled(B_REDO, false);
fToolbar->AddSeparator();
fToolbar->AddAction(TOOLBAR_SPECIAL_SYMBOLS,
B_TRANSLATE("Special symbols"), "whitespace", true);
fToolbar->AddSeparator();
fToolbar->AddAction(MAINMENU_SEARCH_BOOKMARKS,
B_TRANSLATE("Bookmarks"), "bookmarks");
fToolbar->AddAction(MAINMENU_SEARCH_PREVBOOKMARK,
B_TRANSLATE("Previous bookmark"), "bookmark prev");
fToolbar->AddAction(MAINMENU_SEARCH_NEXTBOOKMARK,
B_TRANSLATE("Next bookmark"), "bookmark next");
fToolbar->AddSeparator();
fToolbar->AddAction(MAINMENU_EDIT_APP_PREFERENCES,
B_TRANSLATE("Koder preferences" B_UTF8_ELLIPSIS), "preferences");
fToolbar->AddAction(MAINMENU_SEARCH_FINDREPLACE,
B_TRANSLATE("Find/Replace" B_UTF8_ELLIPSIS), "find");
fToolbar->AddGlue();
BGroupLayout *layout = new BGroupLayout(B_VERTICAL, 0);
SetLayout(layout);
layout->AddView(fMainMenu);
layout->AddView(fToolbar);
layout->AddView(fEditor);
layout->SetInsets(0, 0, -1, -1);
SetKeyMenuBar(fMainMenu);
fEditor->SendMessage(SCI_GRABFOCUS);
fFindReplaceHandler = new FindReplaceHandler(fEditor, this);
AddHandler(fFindReplaceHandler);
_SyncWithPreferences();
fEditor->SendMessage(SCI_SETSCROLLWIDTH, fEditor->Bounds().Width());
fEditor->SendMessage(SCI_SETSCROLLWIDTHTRACKING, true, 0);
fEditor->SendMessage(SCI_SETSAVEPOINT, 0, 0);
BFont font;
font.SetFamilyAndStyle(fPreferences->fFontFamily.c_str(), nullptr);
font.SetSize(fPreferences->fFontSize);
BFont *fontPtr = (fPreferences->fUseCustomFont ? &font : nullptr);
Styler::ApplyGlobal(fEditor, fPreferences->fStyle.c_str(), fontPtr);
RefreshTitle();
if(stagger == true) {
MoveBy(kWindowStagger, kWindowStagger);
}
}
EditorWindow::~EditorWindow()
{
delete fFindReplaceHandler;
RemoveCommonFilter(fIncrementalSearchFilter.get());
}
void
EditorWindow::New()
{
BMessage message(WINDOW_NEW);
message.AddPointer("window", this);
be_app->PostMessage(&message);
}
/**
* Sets up monitoring, checks for permissions, opens and reads the file, resets
* the save point and undo buffer, sets the caret on position when it was
* closed, sets the langugage, adds the file to recent documents, refreshes the
* window title and syncs the preferences.
*/
void
EditorWindow::OpenFile(const entry_ref* ref, Sci_Position line, Sci_Position column)
{
fEditor->SetReadOnly(false);
// let us load new file
if(fOpenedFilePath != nullptr) {
// stop watching previously opened file
BEntry open(fOpenedFilePath->Path());
File::Monitor(&open, false, this);
}
BEntry entry(ref);
uint32 openMode = B_READ_ONLY;
if(!entry.Exists()) {
// TODO: alert/phantom mode?
openMode |= B_CREATE_FILE;
}
File file(&entry, openMode);
file.Monitor(true, this);
file.GetModificationTime(&fOpenedFileModificationTime);
fModifiedOutside = false;
fEditor->SetText(file.Read().data());
fEditor->SendMessage(SCI_SETSAVEPOINT);
fEditor->SendMessage(SCI_EMPTYUNDOBUFFER);
Sci_Position gotoPos = file.ReadCaretPosition();
if(line != -1) {
gotoPos = fEditor->SendMessage(SCI_POSITIONFROMLINE, line - 1);
if(column != -1) {
gotoPos += column;
}
}
fEditor->SendMessage(SCI_GOTOPOS, gotoPos, 0);
fEditor->SetBookmarks(file.ReadBookmarks());
fOpenedFileMimeType.SetTo(file.ReadMimeType().c_str());
char name[B_FILE_NAME_LENGTH];
entry.GetName(name);
_SetLanguageByFilename(name);
fReadOnly = !File::CanWrite(&file);
fEditor->SetReadOnly(fReadOnly);
fEditor->SetRef(*ref);
be_roster->AddToRecentDocuments(ref, gAppMime);
if(fOpenedFilePath == nullptr)
fOpenedFilePath = new BPath(&entry);
else
fOpenedFilePath->SetTo(&entry);
RefreshTitle();
// load .editorconfig and apply settings
_SyncWithPreferences();
}
void
EditorWindow::RefreshTitle()
{
BString title;
if(fModified == true)
title << "*";
if(fOpenedFilePath != nullptr)
if(fPreferences->fFullPathInTitle == true) {
title << fOpenedFilePath->Path();
} else {
title << fOpenedFilePath->Leaf();
}
else {
title << B_TRANSLATE("Untitled");
}
if(fReadOnly) {
title << " " << B_TRANSLATE("[read-only]");
}
SetTitle(title);
}
void
EditorWindow::SaveFile(entry_ref* ref)
{
if(ref == nullptr) return;
std::string path(BPath(ref).Path());
if(fOpenedFilePath != nullptr) {
// stop watching currently open file, in case it is different from ref
BEntry open(fOpenedFilePath->Path());
File::Monitor(&open, false, this);
}
BackupFileGuard backupGuard(path.c_str(), this);
// TODO error checking
File file(path.c_str(), B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE);
if(file.InitCheck() == B_PERMISSION_DENIED) {
OKAlert(B_TRANSLATE("Access denied"), B_TRANSLATE("You don't have "
"sufficient permissions to edit this file."), B_STOP_ALERT);
return;
}
file.Monitor(false, this);
if(fFilePreferences.fTrimTrailingWhitespace.value_or(
fPreferences->fTrimTrailingWhitespaceOnSave) == true) {
fEditor->TrimTrailingWhitespace();
}
if(fPreferences->fAppendNLAtTheEndIfNotPresent) {
fEditor->AppendNLAtTheEndIfNotPresent();
}
std::vector<char> buffer(fEditor->TextLength() + 1);
fEditor->GetText(0, buffer.size(), buffer.data());
file.Write(buffer);
fEditor->SendMessage(SCI_SETSAVEPOINT);
file.WriteMimeType(fOpenedFileMimeType.Type());
file.Monitor(true, this);
file.GetModificationTime(&fOpenedFileModificationTime);
fModifiedOutside = false;
if(fOpenedFilePath != nullptr) {
delete fOpenedFilePath;
}
fOpenedFilePath = new BPath(path.c_str());
RefreshTitle();
backupGuard.SaveSuccessful();
}
bool
EditorWindow::QuitRequested()
{
bool close = true;
if(fModified == true) {
int32 result = _ShowModifiedAlert();
switch(result) {
case ModifiedAlertResult::CANCEL:
close = false;
break;
case ModifiedAlertResult::SAVE:
_Save();
case ModifiedAlertResult::DISCARD:
close = true;
break;
}
}
if(close == true) {
if(fOpenedFilePath != nullptr) {
File file(fOpenedFilePath->Path(), B_READ_ONLY);
file.WriteCaretPosition(fEditor->SendMessage(SCI_GETCURRENTPOS));
file.WriteBookmarks(fEditor->Bookmarks());
}
if(fGoToLineWindow != nullptr) {
fGoToLineWindow->LockLooper();
fGoToLineWindow->Quit();
}
delete fOpenPanel;
delete fSavePanel;
if(fOnQuitReplyToMessage != nullptr)
fOnQuitReplyToMessage->SendReply(B_OK);
BMessage closing(WINDOW_CLOSE);
closing.AddPointer("window", this);
be_app->PostMessage(&closing);
}
return close;
}
void
EditorWindow::MessageReceived(BMessage* message)
{
if(message->WasDropped()) {
message->what = B_REFS_RECEIVED;
}
if(message->IsReply()) {
switch(message->what) {
case FindReplaceHandler::FIND: {
bool found = message->GetBool("found", true);
if(found == false) {
OKAlert(B_TRANSLATE("Searching finished"),
B_TRANSLATE("Reached the end of the target. "
"No results found."));
}
} break;
case FindReplaceHandler::REPLACEALL: {
int32 replaced = message->GetInt32("replaced", 0);
BString alertMessage;
static BStringFormat format(B_TRANSLATE("Replaced "
"{0, plural, one{# occurence} other{# occurences}}."));
format.Format(alertMessage, replaced);
OKAlert(B_TRANSLATE("Replacement finished"), alertMessage);
} break;
}
}
switch(message->what) {
case INCREMENTAL_SEARCH_CHAR: {
const char* character = message->GetString("character", "");
fIncrementalSearchTerm.append(character);
fEditor->IncrementalSearch(fIncrementalSearchTerm);
} break;
case INCREMENTAL_SEARCH_BACKSPACE: {
if(!fIncrementalSearchTerm.empty()) {
fIncrementalSearchTerm.pop_back();
fEditor->IncrementalSearch(fIncrementalSearchTerm);
}
} break;
case INCREMENTAL_SEARCH_CANCEL: {
fEditor->IncrementalSearchCancel();
fIncrementalSearchTerm = "";
RemoveCommonFilter(fIncrementalSearchFilter.get());
} break;
case INCREMENTAL_SEARCH_COMMIT: {
fEditor->IncrementalSearchCommit(fIncrementalSearchTerm);
fIncrementalSearchTerm = "";
RemoveCommonFilter(fIncrementalSearchFilter.get());
} break;
case SAVE_FILE: {
_Save();
message->SendReply((uint32) B_OK);
// TODO: error handling
} break;
case MAINMENU_FILE_NEW:
New();
break;
case MAINMENU_FILE_OPEN: {
if(fOpenedFilePath != nullptr) {
BPath parent(*fOpenedFilePath);
parent.GetParent(&parent);
fOpenPanel->SetPanelDirectory(parent.Path());
}
fOpenPanel->Show();
} break;
case MAINMENU_FILE_RELOAD: {
BAlert* alert = new BAlert(B_TRANSLATE("Unsaved changes"),
B_TRANSLATE("Your changes will be lost."),
B_TRANSLATE("Cancel"), B_TRANSLATE("Reload"), nullptr,
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_STOP_ALERT);
alert->SetShortcut(0, B_ESCAPE);
int32 result = alert->Go();
switch(result) {
case 0: break;
case 1:
_ReloadFile();
break;
}
} break;
case MAINMENU_FILE_SAVE: {
if(fModified == true) {
if(fReadOnly == true) {
// TODO: alert
} else {
_Save();
}
}
} break;
case MAINMENU_FILE_SAVEAS: {
if(fOpenedFilePath != nullptr) {
BPath parent(*fOpenedFilePath);
parent.GetParent(&parent);
fSavePanel->SetPanelDirectory(parent.Path());
}
fSavePanel->Show();
} break;
case MAINMENU_FILE_OPEN_CORRESPONDING: {
if(fOpenedFilePath != nullptr) {
_OpenCorrespondingFile(*fOpenedFilePath, fCurrentLanguage);
}
} break;
case MAINMENU_FILE_QUIT: {
be_app->PostMessage(B_QUIT_REQUESTED);
} break;
case EDIT_COMMENTLINE: {
fEditor->CommentLine(fEditor->Get<Selection>());
} break;
case EDIT_COMMENTBLOCK: {
fEditor->CommentBlock(fEditor->Get<Selection>());
} break;
case MAINMENU_EDIT_CONVERTEOLS_UNIX: {
fEditor->SendMessage(SCI_CONVERTEOLS, SC_EOL_LF, 0);
fEditor->SendMessage(SCI_SETEOLMODE, SC_EOL_LF, 0);
} break;
case MAINMENU_EDIT_CONVERTEOLS_WINDOWS: {
fEditor->SendMessage(SCI_CONVERTEOLS, SC_EOL_CRLF, 0);
fEditor->SendMessage(SCI_SETEOLMODE, SC_EOL_CRLF, 0);
} break;
case MAINMENU_EDIT_CONVERTEOLS_MAC: {
fEditor->SendMessage(SCI_CONVERTEOLS, SC_EOL_CR, 0);
fEditor->SendMessage(SCI_SETEOLMODE, SC_EOL_CR, 0);
} break;
case MAINMENU_EDIT_TRIMWS: {
fEditor->TrimTrailingWhitespace();
} break;
case MAINMENU_EDIT_APP_PREFERENCES: {
be_app->PostMessage(message);
} break;
case MAINMENU_SEARCH_FINDREPLACE: {
std::string selection = fEditor->SelectionText();
if(!selection.empty())
message->AddString("selection", selection.c_str());
be_app->PostMessage(message);
} break;
case MAINMENU_SEARCH_FINDNEXT: {
fEditor->FindNext();
} break;
case MAINMENU_SEARCH_FINDSELECTION: {
fEditor->FindSelection();
} break;
case MAINMENU_SEARCH_REPLACEANDFIND: {
fEditor->ReplaceAndFind();
} break;
case MAINMENU_SEARCH_INCREMENTAL: {
RemoveCommonFilter(fIncrementalSearchFilter.get());
AddCommonFilter(fIncrementalSearchFilter.get());
} break;
case MAINMENU_SEARCH_BOOKMARKS: {
if(fBookmarksWindow == nullptr) {
fBookmarksWindow = new BookmarksWindow(this, fEditor->BookmarksWithText());
}
fBookmarksWindow->Show();
fBookmarksWindow->Activate();
} break;
case MAINMENU_SEARCH_TOGGLEBOOKMARK: {
Sci_Position pos = fEditor->SendMessage(SCI_GETCURRENTPOS);
int64 line = fEditor->SendMessage(SCI_LINEFROMPOSITION, pos);
bool added = fEditor->ToggleBookmark(line);
BMessage notice = fEditor->BookmarksWithText();
SendNotices(added ? BOOKMARK_ADDED : BOOKMARK_REMOVED, ¬ice);
} break;
case BOOKMARK_REMOVED: {
int32 line = message->GetInt32("line", -1);
if(line != -1) {
fEditor->ToggleBookmark(line);
BMessage notice = fEditor->BookmarksWithText();
SendNotices(BOOKMARK_REMOVED, ¬ice);
}
} break;
case MAINMENU_SEARCH_NEXTBOOKMARK: {
fEditor->GoToNextBookmark();
} break;
case MAINMENU_SEARCH_PREVBOOKMARK: {
fEditor->GoToPreviousBookmark();
} break;
case MAINMENU_SEARCH_GOTOLINE: {
if(fGoToLineWindow == nullptr) {
fGoToLineWindow = new GoToLineWindow(this);
}
fGoToLineWindow->ShowCentered(Frame());
} break;
case MAINMENU_VIEW_SPECIAL_WHITESPACE: {
fPreferences->fWhiteSpaceVisible = !fPreferences->fWhiteSpaceVisible;
fMainMenu->FindItem(message->what)->SetMarked(fPreferences->fWhiteSpaceVisible);
fEditor->SendMessage(SCI_SETVIEWWS, fPreferences->fWhiteSpaceVisible, 0);
bool pressed = fPreferences->fWhiteSpaceVisible && fPreferences->fEOLVisible;
fToolbar->SetActionPressed(TOOLBAR_SPECIAL_SYMBOLS, pressed);
} break;
case MAINMENU_VIEW_SPECIAL_EOL: {
fPreferences->fEOLVisible = !fPreferences->fEOLVisible;
fMainMenu->FindItem(message->what)->SetMarked(fPreferences->fEOLVisible);
fEditor->SendMessage(SCI_SETVIEWEOL, fPreferences->fEOLVisible, 0);
bool pressed = fPreferences->fWhiteSpaceVisible && fPreferences->fEOLVisible;
fToolbar->SetActionPressed(TOOLBAR_SPECIAL_SYMBOLS, pressed);
} break;
case MAINMENU_VIEW_TOOLBAR: {
fPreferences->fToolbar = !fPreferences->fToolbar;
fMainMenu->FindItem(message->what)->SetMarked(fPreferences->fToolbar);
if(fPreferences->fToolbar == true)
fToolbar->Show();
else
fToolbar->Hide();
} break;
case MAINMENU_VIEW_WRAPLINES: {
fPreferences->fWrapLines = !fPreferences->fWrapLines;
fMainMenu->FindItem(message->what)->SetMarked(fPreferences->fWrapLines);
fEditor->SendMessage(SCI_SETWRAPMODE, fPreferences->fWrapLines ?
SC_WRAP_WORD : SC_WRAP_NONE, 0);
} break;
case MAINMENU_LANGUAGE: {
_SetLanguage(message->GetString("lang", "text"));
} break;
case TOOLBAR_SPECIAL_SYMBOLS: {
bool pressed = fPreferences->fWhiteSpaceVisible && fPreferences->fEOLVisible;
if(pressed == true) {
fPreferences->fWhiteSpaceVisible = false;
fPreferences->fEOLVisible = false;
} else {
fPreferences->fWhiteSpaceVisible = true;
fPreferences->fEOLVisible = true;
}
fMainMenu->FindItem(MAINMENU_VIEW_SPECIAL_WHITESPACE)->SetMarked(fPreferences->fWhiteSpaceVisible);
fMainMenu->FindItem(MAINMENU_VIEW_SPECIAL_EOL)->SetMarked(fPreferences->fEOLVisible);
fEditor->SendMessage(SCI_SETVIEWWS, fPreferences->fWhiteSpaceVisible, 0);
fEditor->SendMessage(SCI_SETVIEWEOL, fPreferences->fEOLVisible, 0);
fToolbar->SetActionPressed(TOOLBAR_SPECIAL_SYMBOLS, !pressed);
} break;
case B_SAVE_REQUESTED: {
entry_ref ref;
if(message->FindRef("directory", &ref) == B_OK) {
BString name;
message->FindString("name", &name);
BPath path(&ref);
path.Append(name);
BEntry entry(path.Path());
entry.GetRef(&ref);
SaveFile(&ref);
}
} break;
case B_CUT: {
fEditor->SendMessage(SCI_CUT, 0, 0);
_SyncEditMenus();
} break;
case B_COPY: {
fEditor->SendMessage(SCI_COPY, 0, 0);
} break;
case B_PASTE: {
fEditor->SendMessage(SCI_PASTE, 0, 0);
_SyncEditMenus();
} break;
case B_SELECT_ALL: {
fEditor->SendMessage(SCI_SELECTALL, 0, 0);
} break;
case B_UNDO: {
fEditor->SendMessage(SCI_UNDO, 0, 0);
_SyncEditMenus();
} break;
case B_REDO: {
fEditor->SendMessage(SCI_REDO, 0, 0);
_SyncEditMenus();
} break;
case EDITOR_SAVEPOINT_LEFT: {
OnSavePoint(true);
} break;
case EDITOR_SAVEPOINT_REACHED: {
OnSavePoint(false);
} break;
case EDITOR_UPDATEUI: {
_SyncEditMenus();
} break;
case EDITOR_CONTEXT_MENU: {
BPoint where;
if(message->FindPoint("where", &where) == B_OK) {
where = ConvertToScreen(where);
fContextMenu->Go(where, true, true);
}
} break;
case EDITOR_MODIFIED: {
BMessage notice = fEditor->BookmarksWithText();
SendNotices(BOOKMARKS_INVALIDATED, ¬ice);
};
case B_ABOUT_REQUESTED:
be_app->PostMessage(message);
break;
case B_REFS_RECEIVED: {
entry_ref ref;
if(message->FindRef("refs", &ref) == B_OK) {
if(fOpenedFilePath == nullptr && fModified == false
&& !fPreferences->fAlwaysOpenInNewWindow) {
OpenFile(&ref);
} else {
message->AddPointer("window", this);
be_app->PostMessage(message);
}
}
} break;
case B_NODE_MONITOR: {
int32 opcode = message->GetInt32("opcode", 0);
if(opcode == B_STAT_CHANGED) {
BEntry entry;
if(fOpenedFilePath != nullptr) {
entry.SetTo(fOpenedFilePath->Path());
time_t mt;
entry.GetModificationTime(&mt);
if(mt > fOpenedFileModificationTime) {
fModifiedOutside = true;
fOpenedFileModificationTime = mt;
}
fReadOnly = !File::CanWrite(&entry);
fEditor->SetReadOnly(fReadOnly);
}
RefreshTitle();
// Notification about this is sent when window is activated
} else if(opcode == B_ENTRY_MOVED) {
entry_ref ref;
const char* name;
message->FindInt32("device", &ref.device);
message->FindInt64("to directory", &ref.directory);
message->FindString("name", &name);
ref.set_name(name);
_ReloadFile(&ref);
} else if(opcode == B_ENTRY_REMOVED) {
// Do not delete fOpenedFilePath here.
// git removes the file when changing branches. Losing the path
// because of that is not useful.
// Ideally, if the file still exists and was not modified we
// would just reload it, but there is a timing issue and this
// can fail (load an "empty" file).
_ReloadAlert(B_TRANSLATE("File removed"),
B_TRANSLATE("The file has been removed. What to do?"));
}
} break;
case B_OBSERVER_NOTICE_CHANGE: {
int32 what = message->GetInt32("be:observe_change_what", 0);
if(what == APP_PREFERENCES_CHANGED) {
_SyncWithPreferences();
}
} break;
case GTLW_GO: {
int32 line;
if(message->FindInt32("line", &line) == B_OK) {
fEditor->SendMessage(SCI_ENSUREVISIBLEENFORCEPOLICY, line - 1, 0);
fEditor->SendMessage(SCI_GOTOLINE, line - 1, 0);
}
} break;
case BOOKMARKS_WINDOW_QUITTING: {
fBookmarksWindow = nullptr;
} break;
// FIXME: this looked better in my head...
case FINDWINDOW_FIND: {
message->what = FindReplaceHandler::FIND;
PostMessage(message, fFindReplaceHandler, this);
} break;
case FINDWINDOW_REPLACE: {
message->what = FindReplaceHandler::REPLACE;
PostMessage(message, fFindReplaceHandler, this);
} break;
case FINDWINDOW_REPLACEALL: {
message->what = FindReplaceHandler::REPLACEALL;
PostMessage(message, fFindReplaceHandler, this);
} break;
case FINDWINDOW_REPLACEFIND: {
message->what = FindReplaceHandler::REPLACEFIND;
PostMessage(message, fFindReplaceHandler, this);
} break;
case OPEN_TERMINAL: {
if(fOpenedFilePath != nullptr) {
BPath directory;
fOpenedFilePath->GetParent(&directory);
_OpenTerminal(directory.Path());
}
} break;
default:
BWindow::MessageReceived(message);
break;
}
}
void
EditorWindow::WindowActivated(bool active)
{
if(active == true) {
if(fActivatedGuard == false) {
// Ensure that caret will be visible after opening file in a new
// window GOTOPOS in OpenFile does not do that, because in that time
// Scintilla view does not have proper dimensions, and the control
// cannot calculate scroll position correctly.
// After the window is activated for the first time, we are sure
// layouting has been completed.
fEditor->SendMessage(SCI_SCROLLCARET);
// We can safely assume that caret is at the bottom at this point,
// so scroll further down.
int linesOnScreen = fEditor->SendMessage(SCI_LINESONSCREEN);
fEditor->SendMessage(SCI_LINESCROLL, 0, linesOnScreen - 8);
// ...if that assumption is not correct, make sure the caret
// is in the view.
fEditor->SendMessage(SCI_SCROLLCARET);
fActivatedGuard = true;
}
BMessage message(ACTIVE_WINDOW_CHANGED);
message.AddPointer("window", this);
be_app->PostMessage(&message);
if(fModifiedOutside == true) {
_ReloadAlert(B_TRANSLATE("File modified"), B_TRANSLATE(
"The file has been modified by another application. "
"What to do?"));
fModifiedOutside = false;
}
}
}
void
EditorWindow::FrameMoved(BPoint origin)
{
fPreferences->fWindowRect.OffsetTo(origin);
}
void
EditorWindow::Show()
{
BWindow::Show();
if(LockLooper()) {
_SyncWithPreferences();
UnlockLooper();
}
}
const char*
EditorWindow::OpenedFilePath()
{
if(fOpenedFilePath != nullptr)
return fOpenedFilePath->Path();
return "Untitled";
}
/* static */ void
EditorWindow::SetPreferences(Preferences* preferences)
{
fPreferences = preferences;
}
void
EditorWindow::SetOnQuitReplyToMessage(BMessage* message)
{
fOnQuitReplyToMessage = message;
}
void
EditorWindow::_PopulateLanguageMenu()
{
// Clear the menu first
int32 count = fLanguageMenu->CountItems();
fLanguageMenu->RemoveItems(0, count, true);
Languages::SortAlphabetically();
char submenuName[] = "\0";
BObjectList<BMenu> menus;
for(int32 i = 0; i < Languages::GetCount(); ++i) {
std::string lang = Languages::GetLanguage(i);
std::string name = Languages::GetMenuItemName(lang);
BMessage *msg = new BMessage(MAINMENU_LANGUAGE);
msg->AddString("lang", lang.c_str());
BMenuItem *menuItem = new BMenuItem(name.c_str(), msg);
if(fPreferences->fCompactLangMenu == true) {
if(submenuName[0] != name[0]) {
submenuName[0] = name[0];
BMenu *submenu = new BMenu(submenuName);
menus.AddItem(submenu);
}
menus.LastItem()->AddItem(menuItem);
} else {
fLanguageMenu->AddItem(menuItem);
}
}
if(fPreferences->fCompactLangMenu == true) {
int32 menusCount = menus.CountItems();
for(int32 i = 0; i < menusCount; i++) {
if(menus.ItemAt(i)->CountItems() > 1) {
fLanguageMenu->AddItem(menus.ItemAt(i));
} else {
fLanguageMenu->AddItem(menus.ItemAt(i)->RemoveItem((int32) 0));
}
}
}
}
void
EditorWindow::_ReloadFile(entry_ref* ref)
{
if(fOpenedFilePath == nullptr) return;
if(ref == nullptr) {
// reload file from current location
entry_ref e;
BEntry entry(fOpenedFilePath->Path());
entry.GetRef(&e);
OpenFile(&e);
} else {
// file has been moved
BEntry entry(ref);
char name[B_FILE_NAME_LENGTH];
entry.GetName(name);
_SetLanguageByFilename(name);
fOpenedFilePath->SetTo(&entry);
RefreshTitle();
}
}
void
EditorWindow::_SetLanguage(std::string lang)
{
fCurrentLanguage = lang;
const auto mapping = Languages::ApplyLanguage(fEditor, lang.c_str());
BFont font;
font.SetFamilyAndStyle(fPreferences->fFontFamily.c_str(), nullptr);
font.SetSize(fPreferences->fFontSize);
BFont *fontPtr = (fPreferences->fUseCustomFont ? &font : nullptr);
Styler::ApplyGlobal(fEditor, fPreferences->fStyle.c_str(), fontPtr);
Styler::ApplyLanguage(fEditor, mapping);
fEditor->SetType(Languages::GetMenuItemName(lang));
fMainMenu->FindItem(EDIT_COMMENTLINE)->SetEnabled(fEditor->CanCommentLine());
fMainMenu->FindItem(EDIT_COMMENTBLOCK)->SetEnabled(fEditor->CanCommentBlock());
fMainMenu->FindItem(MAINMENU_FILE_OPEN_CORRESPONDING)->SetEnabled(lang == "c" || lang == "cpp");
fContextMenu->FindItem(EDIT_COMMENTLINE)->SetEnabled(fEditor->CanCommentLine());
fContextMenu->FindItem(EDIT_COMMENTBLOCK)->SetEnabled(fEditor->CanCommentBlock());
// folding margin state can change depending on the language used
fEditor->SetFoldMarginEnabled(fPreferences->fFoldMargin);
}
void
EditorWindow::_SetLanguageByFilename(const char* filename)
{
std::string lang;
// try to match whole filename first, this is needed for e.g. CMake
bool found = Languages::GetLanguageForExtension(filename, lang);
if(found == false) {
const std::string extension = GetFileExtension(filename);
if(!extension.empty())
Languages::GetLanguageForExtension(extension.c_str(), lang);
}
_SetLanguage(lang);
}
void
EditorWindow::_OpenCorrespondingFile(const BPath &file, const std::string lang)
{
if(lang != "c" && lang != "cpp")
return;
const std::vector<std::string> extensionsToTryC{"h", "hh", "hxx", "hpp"};
const std::vector<std::string> extensionsToTryH{"c", "cc", "cxx", "cpp"};
const std::vector<std::string>* extensionsToTry = &extensionsToTryC;
if(GetFileExtension(file.Leaf())[0] == 'h') {
extensionsToTry = &extensionsToTryH;
}
BPath parent;
if(file.GetParent(&parent) == B_OK) {
const BDirectory parentDir(parent.Path());
const std::string filename = GetFileName(file.Leaf());
for(auto &ext : *extensionsToTry) {
BEntry fileToTry(&parentDir, (filename + '.' + ext).c_str());
if(fileToTry.Exists()) {
BMessage openFile(B_REFS_RECEIVED);
entry_ref ref;
if(fileToTry.GetRef(&ref) == B_OK) {
openFile.AddRef("refs", &ref);
openFile.AddPointer("window", this);
be_app->PostMessage(&openFile);
return;
}
}
}
OKAlert(B_TRANSLATE("Open partner file"),
B_TRANSLATE("Partner file not found."), B_STOP_ALERT);
}
}
void
EditorWindow::_LoadEditorconfig()
{
if(fOpenedFilePath == nullptr) return;
BPath editorconfig;
if(Editorconfig::Find(fOpenedFilePath, &editorconfig)) {
BMessage allProps;
if(Editorconfig::Parse(editorconfig.Path(), &allProps)) {
BMessage props;
Editorconfig::MatchFilename(fOpenedFilePath->Path(), &allProps, &props);
char* name;
uint32 type;
int32 count;
for(int32 i = 0;
props.GetInfo(B_STRING_TYPE, i, &name, &type, &count) == B_OK;
i++) {
BString propName(name);
BString value;
props.FindString(propName, &value);
propName.ToLower();
if(propName == "end_of_line") {
value.ToLower();
uint8 eolMode = SC_EOL_LF;
if(value == "lf")
eolMode = SC_EOL_LF;
else if(value == "cr")
eolMode = SC_EOL_CR;
else if(value == "crlf")
eolMode = SC_EOL_CRLF;
fFilePreferences.fEOLMode = std::make_optional(eolMode);
} else if(propName == "tab_width") {
uint8 tabWidth = std::stoi(value.String());
fFilePreferences.fTabWidth = std::make_optional(tabWidth);
} else if(propName == "indent_style") {
value.ToLower();
bool tabsToSpaces = (value == "space");
fFilePreferences.fTabsToSpaces = std::make_optional(tabsToSpaces);
} else if(propName == "indent_size") {
if(value.ToLower() == "tab")
fFilePreferences.fIndentWidth = fFilePreferences.fTabWidth;
else {
uint8 indentWidth = std::stoi(value.String());
fFilePreferences.fIndentWidth = std::make_optional(indentWidth);
}
} else if(propName == "trim_trailing_whitespace") {
bool trim = (value.ToLower() == "true");
fFilePreferences.fTrimTrailingWhitespace = std::make_optional(trim);
}
}
}
}
}
void
EditorWindow::_SyncWithPreferences()
{
if(fPreferences != nullptr) {
if(fPreferences->fUseEditorconfig) {
_LoadEditorconfig();
} else {
// reset file preferences so they aren't picked up later
fFilePreferences.fTabWidth.reset();
fFilePreferences.fIndentWidth.reset();
fFilePreferences.fTabsToSpaces.reset();
fFilePreferences.fTrimTrailingWhitespace.reset();
fFilePreferences.fEOLMode.reset();
}
bool pressed = fPreferences->fWhiteSpaceVisible && fPreferences->fEOLVisible;
fToolbar->SetActionPressed(TOOLBAR_SPECIAL_SYMBOLS, pressed);
fMainMenu->FindItem(MAINMENU_VIEW_SPECIAL_WHITESPACE)->SetMarked(fPreferences->fWhiteSpaceVisible);
fMainMenu->FindItem(MAINMENU_VIEW_SPECIAL_EOL)->SetMarked(fPreferences->fEOLVisible);
fMainMenu->FindItem(MAINMENU_VIEW_TOOLBAR)->SetMarked(fPreferences->fToolbar);
fMainMenu->FindItem(MAINMENU_VIEW_WRAPLINES)->SetMarked(fPreferences->fWrapLines);
// reapply styles
_SetLanguage(fCurrentLanguage);
fEditor->SendMessage(SCI_SETVIEWEOL, fPreferences->fEOLVisible, 0);
fEditor->SendMessage(SCI_SETVIEWWS, fPreferences->fWhiteSpaceVisible, 0);
fEditor->SendMessage(SCI_SETTABWIDTH,
fFilePreferences.fTabWidth.value_or(fPreferences->fTabWidth), 0);
fEditor->SendMessage(SCI_SETUSETABS,
!fFilePreferences.fTabsToSpaces.value_or(fPreferences->fTabsToSpaces), 0);
fEditor->SendMessage(SCI_SETINDENT,
fFilePreferences.fIndentWidth.value_or(0), 0);
fEditor->SendMessage(SCI_SETCARETLINEVISIBLE, fPreferences->fLineHighlighting, 0);
fEditor->SendMessage(SCI_SETCARETLINEVISIBLEALWAYS, true, 0);
fEditor->SendMessage(SCI_SETCARETLINEFRAME, fPreferences->fLineHighlightingMode ? 2 : 0);
if(fFilePreferences.fEOLMode) {
fEditor->SendMessage(SCI_SETEOLMODE, fFilePreferences.fEOLMode.value_or(SC_EOL_LF), 0);
}
if(fPreferences->fLineLimitShow == true) {
fEditor->SendMessage(SCI_SETEDGEMODE, fPreferences->fLineLimitMode, 0);
fEditor->SendMessage(SCI_SETEDGECOLUMN, fPreferences->fLineLimitColumn, 0);
} else {
fEditor->SendMessage(SCI_SETEDGEMODE, 0, 0);
}
if(fPreferences->fIndentGuidesShow == true) {
fEditor->SendMessage(SCI_SETINDENTATIONGUIDES, fPreferences->fIndentGuidesMode, 0);
} else {
fEditor->SendMessage(SCI_SETINDENTATIONGUIDES, 0, 0);
}
if(fPreferences->fWrapLines == true) {
fEditor->SendMessage(SCI_SETWRAPMODE, SC_WRAP_WORD, 0);
} else {
fEditor->SendMessage(SCI_SETWRAPMODE, SC_WRAP_NONE, 0);
}
fEditor->SetNumberMarginEnabled(fPreferences->fLineNumbers);
fEditor->SetFoldMarginEnabled(fPreferences->fFoldMargin);
fEditor->SetBookmarkMarginEnabled(fPreferences->fBookmarkMargin);
fEditor->SetBracesHighlightingEnabled(
fPreferences->fBracesHighlighting);
fEditor->SetTrailingWSHighlightingEnabled(
fPreferences->fHighlightTrailingWhitespace);
fEditor->UpdateLineNumberWidth();
if(!IsHidden()) {
if(fPreferences->fToolbar == true)
while(fToolbar->IsHidden()) fToolbar->Show();
else
while(!fToolbar->IsHidden()) fToolbar->Hide();
}
float baseSize = std::round(be_plain_font->Size() / 6.0f) * 4.0f;
// 12 = 8.0f, 18 = 12.0f, 24 = 16.0f
fToolbar->ChangeIconSize(baseSize * fPreferences->fToolbarIconSizeMultiplier);
// TODO Do this only if it has changed
RefreshTitle();
// TODO Do this only if language menu preference has changed
_PopulateLanguageMenu();
}
}
void
EditorWindow::_SyncEditMenus()
{
bool canUndo = fEditor->SendMessage(SCI_CANUNDO, 0, 0);
bool canRedo = fEditor->SendMessage(SCI_CANREDO, 0, 0);
bool canPaste = fEditor->SendMessage(SCI_CANPASTE, 0, 0);
bool selectionEmpty = fEditor->SendMessage(SCI_GETSELECTIONEMPTY, 0, 0);
fMainMenu->FindItem(B_UNDO)->SetEnabled(canUndo);
fMainMenu->FindItem(B_REDO)->SetEnabled(canRedo);
fMainMenu->FindItem(B_PASTE)->SetEnabled(canPaste);
fMainMenu->FindItem(B_CUT)->SetEnabled(!selectionEmpty);
fMainMenu->FindItem(B_COPY)->SetEnabled(!selectionEmpty);
fContextMenu->FindItem(B_UNDO)->SetEnabled(canUndo);
fContextMenu->FindItem(B_REDO)->SetEnabled(canRedo);
fContextMenu->FindItem(B_PASTE)->SetEnabled(canPaste);
fContextMenu->FindItem(B_CUT)->SetEnabled(!selectionEmpty);
fContextMenu->FindItem(B_COPY)->SetEnabled(!selectionEmpty);
fToolbar->SetActionEnabled(B_UNDO, canUndo);
fToolbar->SetActionEnabled(B_REDO, canRedo);
if(fEditor->CanCommentBlock()) {
fMainMenu->FindItem(EDIT_COMMENTBLOCK)->SetEnabled(!selectionEmpty);
fContextMenu->FindItem(EDIT_COMMENTBLOCK)->SetEnabled(!selectionEmpty);
}
}
int32
EditorWindow::_ShowModifiedAlert()
{
const char* alertText;
const char* button0 = B_TRANSLATE("Cancel");
const char* button1 = B_TRANSLATE("Discard");
const char* button2 = nullptr;
if(fReadOnly == true) {
alertText = B_TRANSLATE("The file contains unsaved changes, but is read-only. What to do?");
//button2 = B_TRANSLATE("Save as" B_UTF8_ELLIPSIS);
// FIXME: Race condition when opening file
} else {
alertText = B_TRANSLATE("The file contains unsaved changes. What to do?");
button2 = B_TRANSLATE("Save");
}
BAlert* modifiedAlert = new BAlert(B_TRANSLATE("Unsaved changes"),
alertText, button0, button1, button2, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT);
modifiedAlert->SetShortcut(0, B_ESCAPE);
return modifiedAlert->Go();
}
void
EditorWindow::_ReloadAlert(const char* title, const char* message)
{
// TODO: clarify in the alert that Reloading will recreate the file if it
// doesn't exist anymore, and that some SCMs remove files on checkout
// reload opened file
BAlert* alert = new BAlert(title, message,
B_TRANSLATE("Reload"), B_TRANSLATE("Do nothing"),
nullptr, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT);
alert->SetShortcut(1, B_ESCAPE);
int result = alert->Go();
if(result == 0) {
_ReloadFile();
} else {
PostMessage(EDITOR_SAVEPOINT_LEFT);
}
}
void
EditorWindow::_Save()
{
if(fOpenedFilePath == nullptr || fReadOnly == true)
fSavePanel->Show();
else {
BEntry entry(fOpenedFilePath->Path());
entry_ref ref;
entry.GetRef(&ref);
SaveFile(&ref);
}
// block until user has chosen location
while(fSavePanel->IsShowing()) UpdateIfNeeded();
}
/**
* Launches Terminal with current working directory set to path.
* Uses Tracker add-on to do that, because it's easier (Terminal doesn't accept
* paths as arguments).
* Taken from Tracker.
*/
void
EditorWindow::_OpenTerminal(const char* path)
{
const char* terminalAddonSignature = "application/x-vnd.Haiku-OpenTerminal";
entry_ref addonRef, directoryRef;
be_roster->FindApp(terminalAddonSignature, &addonRef);
BEntry(path).GetRef(&directoryRef);
image_id addonImage = load_add_on(BPath(&addonRef).Path());
if (addonImage >= 0) {
void (*processRefsFn)(entry_ref, BMessage*, void*);
status_t result = get_image_symbol(addonImage, "process_refs", 2,
(void**) &processRefsFn);
if (result >= 0) {
// call add-on code
(*processRefsFn)(directoryRef, new BMessage(), NULL);
} else {
OKAlert(B_TRANSLATE("Open Terminal"), B_TRANSLATE("Could not "
"launch Open Terminal Tracker add-on."), B_STOP_ALERT);
}
unload_add_on(addonImage);
} else {
OKAlert(B_TRANSLATE("Open Terminal"), B_TRANSLATE("Could not find "
"Open Terminal Tracker add-on."), B_STOP_ALERT);
}
}
/**
* left parameter specifies whether savepoint was left or reached.
*/
void
EditorWindow::OnSavePoint(bool left)
{
fModified = left;
RefreshTitle();
fMainMenu->FindItem(MAINMENU_FILE_RELOAD)->SetEnabled(fModified);
fMainMenu->FindItem(MAINMENU_FILE_SAVE)->SetEnabled(fModified);
fToolbar->SetActionEnabled(MAINMENU_FILE_RELOAD, fModified);
fToolbar->SetActionEnabled(MAINMENU_FILE_SAVE, fModified);
}
filter_result
EditorWindow::_IncrementalSearchFilter(BMessage* message, BHandler** target,
BMessageFilter* messageFilter)
{
if(message->what == B_KEY_DOWN) {
BLooper *looper = messageFilter->Looper();
const char* bytes;
message->FindString("bytes", &bytes);
if(bytes[0] == B_RETURN) {
looper->PostMessage(INCREMENTAL_SEARCH_COMMIT);
} else if(bytes[0] == B_ESCAPE) {
looper->PostMessage(INCREMENTAL_SEARCH_CANCEL);
} else if(bytes[0] == B_BACKSPACE) {
looper->PostMessage(INCREMENTAL_SEARCH_BACKSPACE);
} else {
BMessage msg(INCREMENTAL_SEARCH_CHAR);
msg.AddString("character", &bytes[0]);
messageFilter->Looper()->PostMessage(&msg);
}
return B_SKIP_MESSAGE;
}
return B_DISPATCH_MESSAGE;
}
| 30.590643
| 102
| 0.723619
|
FuRuYa7
|
1b99e0fa5b0be12ef6ba12727c6cc2652f9b9e06
| 28,188
|
cpp
|
C++
|
src/postgres/backend/executor/execUtils.cpp
|
jessesleeping/my_peloton
|
a19426cfe34a04692a11008eaffc9c3c9b49abc4
|
[
"Apache-2.0"
] | 6
|
2017-04-28T00:38:52.000Z
|
2018-11-06T07:06:49.000Z
|
src/postgres/backend/executor/execUtils.cpp
|
jessesleeping/my_peloton
|
a19426cfe34a04692a11008eaffc9c3c9b49abc4
|
[
"Apache-2.0"
] | 57
|
2016-03-19T22:27:55.000Z
|
2017-07-08T00:41:51.000Z
|
src/postgres/backend/executor/execUtils.cpp
|
eric-haibin-lin/pelotondb
|
904d6bbd041a0498ee0e034d4f9f9f27086c3cab
|
[
"Apache-2.0"
] | 4
|
2016-07-17T20:44:56.000Z
|
2018-06-27T01:01:36.000Z
|
/*-------------------------------------------------------------------------
*
* execUtils.c
* miscellaneous executor utility routines
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/backend/executor/execUtils.c
*
*-------------------------------------------------------------------------
*/
/*
* INTERFACE ROUTINES
* CreateExecutorState Create/delete executor working state
* FreeExecutorState
* CreateExprContext
* CreateStandaloneExprContext
* FreeExprContext
* ReScanExprContext
*
* ExecAssignExprContext Common code for plan node init routines.
* ExecAssignResultType
* etc
*
* ExecOpenScanRelation Common code for scan node init routines.
* ExecCloseScanRelation
*
* RegisterExprContextCallback Register function shutdown callback
* UnregisterExprContextCallback Deregister function shutdown callback
*
* NOTES
* This file has traditionally been the place to stick misc.
* executor support stuff that doesn't really go anyplace else.
*/
#include "postgres.h"
#include "access/relscan.h"
#include "access/transam.h"
#include "executor/executor.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "utils/memutils.h"
#include "utils/rel.h"
static bool get_last_attnums(Node *node, ProjectionInfo *projInfo);
static void ShutdownExprContext(ExprContext *econtext, bool isCommit);
/* ----------------------------------------------------------------
* Executor state and memory management functions
* ----------------------------------------------------------------
*/
/* ----------------
* CreateExecutorState
*
* Create and initialize an EState node, which is the root of
* working storage for an entire Executor invocation.
*
* Principally, this creates the per-query memory context that will be
* used to hold all working data that lives till the end of the query.
* Note that the per-query context will become a child of the caller's
* CurrentMemoryContext.
* ----------------
*/
EState *
CreateExecutorState(void)
{
EState *estate;
MemoryContext qcontext;
MemoryContext oldcontext;
/*
* Create the per-query context for this Executor run.
*/
// TODO: Peloton Changes
qcontext = AllocSetContextCreate(CurrentMemoryContext,
"ExecutorState",
ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE,
ALLOCSET_DEFAULT_MAXSIZE);
/*
* Make the EState node within the per-query context. This way, we don't
* need a separate pfree() operation for it at shutdown.
*/
oldcontext = MemoryContextSwitchTo(qcontext);
estate = makeNode(EState);
/*
* Initialize all fields of the Executor State structure
*/
estate->es_direction = ForwardScanDirection;
estate->es_snapshot = InvalidSnapshot; /* caller must initialize this */
estate->es_crosscheck_snapshot = InvalidSnapshot; /* no crosscheck */
estate->es_range_table = NIL;
estate->es_plannedstmt = NULL;
estate->es_junkFilter = NULL;
estate->es_output_cid = (CommandId) 0;
estate->es_result_relations = NULL;
estate->es_num_result_relations = 0;
estate->es_result_relation_info = NULL;
estate->es_trig_target_relations = NIL;
estate->es_trig_tuple_slot = NULL;
estate->es_trig_oldtup_slot = NULL;
estate->es_trig_newtup_slot = NULL;
estate->es_param_list_info = NULL;
estate->es_param_exec_vals = NULL;
estate->es_query_cxt = qcontext;
estate->es_tupleTable = NIL;
estate->es_rowMarks = NIL;
estate->es_processed = 0;
estate->es_lastoid = InvalidOid;
estate->es_top_eflags = 0;
estate->es_instrument = 0;
estate->es_finished = false;
estate->es_exprcontexts = NIL;
estate->es_subplanstates = NIL;
estate->es_auxmodifytables = NIL;
estate->es_per_tuple_exprcontext = NULL;
estate->es_epqTuple = NULL;
estate->es_epqTupleSet = NULL;
estate->es_epqScanDone = NULL;
/*
* Return the executor state structure
*/
MemoryContextSwitchTo(oldcontext);
return estate;
}
/* ----------------
* FreeExecutorState
*
* Release an EState along with all remaining working storage.
*
* Note: this is not responsible for releasing non-memory resources,
* such as open relations or buffer pins. But it will shut down any
* still-active ExprContexts within the EState. That is sufficient
* cleanup for situations where the EState has only been used for expression
* evaluation, and not to run a complete Plan.
*
* This can be called in any memory context ... so long as it's not one
* of the ones to be freed.
* ----------------
*/
void
FreeExecutorState(EState *estate)
{
/*
* Shut down and free any remaining ExprContexts. We do this explicitly
* to ensure that any remaining shutdown callbacks get called (since they
* might need to release resources that aren't simply memory within the
* per-query memory context).
*/
while (estate->es_exprcontexts)
{
/*
* XXX: seems there ought to be a faster way to implement this than
* repeated list_delete(), no?
*/
FreeExprContext((ExprContext *) linitial(estate->es_exprcontexts),
true);
/* FreeExprContext removed the list link for us */
}
/*
* Free the per-query memory context, thereby releasing all working
* memory, including the EState node itself.
*/
MemoryContextDelete(estate->es_query_cxt);
}
/* ----------------
* CreateExprContext
*
* Create a context for expression evaluation within an EState.
*
* An executor run may require multiple ExprContexts (we usually make one
* for each Plan node, and a separate one for per-output-tuple processing
* such as constraint checking). Each ExprContext has its own "per-tuple"
* memory context.
*
* Note we make no assumption about the caller's memory context.
* ----------------
*/
ExprContext *
CreateExprContext(EState *estate)
{
ExprContext *econtext;
MemoryContext oldcontext;
/* Create the ExprContext node within the per-query memory context */
oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
econtext = makeNode(ExprContext);
/* Initialize fields of ExprContext */
econtext->ecxt_scantuple = NULL;
econtext->ecxt_innertuple = NULL;
econtext->ecxt_outertuple = NULL;
econtext->ecxt_per_query_memory = estate->es_query_cxt;
/*
* Create working memory for expression evaluation in this context.
*/
econtext->ecxt_per_tuple_memory =
AllocSetContextCreate(estate->es_query_cxt,
"ExprContext",
ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE,
ALLOCSET_DEFAULT_MAXSIZE);
econtext->ecxt_param_exec_vals = estate->es_param_exec_vals;
econtext->ecxt_param_list_info = estate->es_param_list_info;
econtext->ecxt_aggvalues = NULL;
econtext->ecxt_aggnulls = NULL;
econtext->caseValue_datum = (Datum) 0;
econtext->caseValue_isNull = true;
econtext->domainValue_datum = (Datum) 0;
econtext->domainValue_isNull = true;
econtext->ecxt_estate = estate;
econtext->ecxt_callbacks = NULL;
/*
* Link the ExprContext into the EState to ensure it is shut down when the
* EState is freed. Because we use lcons(), shutdowns will occur in
* reverse order of creation, which may not be essential but can't hurt.
*/
estate->es_exprcontexts = lcons(econtext, estate->es_exprcontexts);
MemoryContextSwitchTo(oldcontext);
return econtext;
}
/* ----------------
* CreateStandaloneExprContext
*
* Create a context for standalone expression evaluation.
*
* An ExprContext made this way can be used for evaluation of expressions
* that contain no Params, subplans, or Var references (it might work to
* put tuple references into the scantuple field, but it seems unwise).
*
* The ExprContext struct is allocated in the caller's current memory
* context, which also becomes its "per query" context.
*
* It is caller's responsibility to free the ExprContext when done,
* or at least ensure that any shutdown callbacks have been called
* (ReScanExprContext() is suitable). Otherwise, non-memory resources
* might be leaked.
* ----------------
*/
ExprContext *
CreateStandaloneExprContext(void)
{
ExprContext *econtext;
/* Create the ExprContext node within the caller's memory context */
econtext = makeNode(ExprContext);
/* Initialize fields of ExprContext */
econtext->ecxt_scantuple = NULL;
econtext->ecxt_innertuple = NULL;
econtext->ecxt_outertuple = NULL;
econtext->ecxt_per_query_memory = CurrentMemoryContext;
/*
* Create working memory for expression evaluation in this context.
*/
econtext->ecxt_per_tuple_memory =
AllocSetContextCreate(CurrentMemoryContext,
"ExprContext",
ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE,
ALLOCSET_DEFAULT_MAXSIZE);
econtext->ecxt_param_exec_vals = NULL;
econtext->ecxt_param_list_info = NULL;
econtext->ecxt_aggvalues = NULL;
econtext->ecxt_aggnulls = NULL;
econtext->caseValue_datum = (Datum) 0;
econtext->caseValue_isNull = true;
econtext->domainValue_datum = (Datum) 0;
econtext->domainValue_isNull = true;
econtext->ecxt_estate = NULL;
econtext->ecxt_callbacks = NULL;
return econtext;
}
/* ----------------
* FreeExprContext
*
* Free an expression context, including calling any remaining
* shutdown callbacks.
*
* Since we free the temporary context used for expression evaluation,
* any previously computed pass-by-reference expression result will go away!
*
* If isCommit is false, we are being called in error cleanup, and should
* not call callbacks but only release memory. (It might be better to call
* the callbacks and pass the isCommit flag to them, but that would require
* more invasive code changes than currently seems justified.)
*
* Note we make no assumption about the caller's memory context.
* ----------------
*/
void
FreeExprContext(ExprContext *econtext, bool isCommit)
{
EState *estate;
/* Call any registered callbacks */
ShutdownExprContext(econtext, isCommit);
/* And clean up the memory used */
MemoryContextDelete(econtext->ecxt_per_tuple_memory);
/* Unlink self from owning EState, if any */
estate = econtext->ecxt_estate;
if (estate)
estate->es_exprcontexts = list_delete_ptr(estate->es_exprcontexts,
econtext);
/* And delete the ExprContext node */
pfree(econtext);
}
/*
* ReScanExprContext
*
* Reset an expression context in preparation for a rescan of its
* plan node. This requires calling any registered shutdown callbacks,
* since any partially complete set-returning-functions must be canceled.
*
* Note we make no assumption about the caller's memory context.
*/
void
ReScanExprContext(ExprContext *econtext)
{
/* Call any registered callbacks */
ShutdownExprContext(econtext, true);
/* And clean up the memory used */
MemoryContextReset(econtext->ecxt_per_tuple_memory);
}
/*
* Build a per-output-tuple ExprContext for an EState.
*
* This is normally invoked via GetPerTupleExprContext() macro,
* not directly.
*/
ExprContext *
MakePerTupleExprContext(EState *estate)
{
if (estate->es_per_tuple_exprcontext == NULL)
estate->es_per_tuple_exprcontext = CreateExprContext(estate);
return estate->es_per_tuple_exprcontext;
}
/* ----------------------------------------------------------------
* miscellaneous node-init support functions
*
* Note: all of these are expected to be called with CurrentMemoryContext
* equal to the per-query memory context.
* ----------------------------------------------------------------
*/
/* ----------------
* ExecAssignExprContext
*
* This initializes the ps_ExprContext field. It is only necessary
* to do this for nodes which use ExecQual or ExecProject
* because those routines require an econtext. Other nodes that
* don't have to evaluate expressions don't need to do this.
* ----------------
*/
void
ExecAssignExprContext(EState *estate, PlanState *planstate)
{
planstate->ps_ExprContext = CreateExprContext(estate);
}
/* ----------------
* ExecAssignResultType
* ----------------
*/
void
ExecAssignResultType(PlanState *planstate, TupleDesc tupDesc)
{
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
ExecSetSlotDescriptor(slot, tupDesc);
}
/* ----------------
* ExecAssignResultTypeFromTL
* ----------------
*/
void
ExecAssignResultTypeFromTL(PlanState *planstate)
{
bool hasoid;
TupleDesc tupDesc;
if (ExecContextForcesOids(planstate, &hasoid))
{
/* context forces OID choice; hasoid is now set correctly */
}
else
{
/* given free choice, don't leave space for OIDs in result tuples */
hasoid = false;
}
/*
* ExecTypeFromTL needs the parse-time representation of the tlist, not a
* list of ExprStates. This is good because some plan nodes don't bother
* to set up planstate->targetlist ...
*/
tupDesc = ExecTypeFromTL(planstate->plan->targetlist, hasoid);
ExecAssignResultType(planstate, tupDesc);
}
/* ----------------
* ExecGetResultType
* ----------------
*/
TupleDesc
ExecGetResultType(PlanState *planstate)
{
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
return slot->tts_tupleDescriptor;
}
/* ----------------
* ExecBuildProjectionInfo
*
* Build a ProjectionInfo node for evaluating the given tlist in the given
* econtext, and storing the result into the tuple slot. (Caller must have
* ensured that tuple slot has a descriptor matching the tlist!) Note that
* the given tlist should be a list of ExprState nodes, not Expr nodes.
*
* inputDesc can be NULL, but if it is not, we check to see whether simple
* Vars in the tlist match the descriptor. It is important to provide
* inputDesc for relation-scan plan nodes, as a cross check that the relation
* hasn't been changed since the plan was made. At higher levels of a plan,
* there is no need to recheck.
* ----------------
*/
ProjectionInfo *
ExecBuildProjectionInfo(List *targetList,
ExprContext *econtext,
TupleTableSlot *slot,
TupleDesc inputDesc)
{
ProjectionInfo *projInfo = makeNode(ProjectionInfo);
int len = ExecTargetListLength(targetList);
int *workspace;
int *varSlotOffsets;
int *varNumbers;
int *varOutputCols;
List *exprlist;
int numSimpleVars;
bool directMap;
ListCell *tl;
projInfo->pi_exprContext = econtext;
projInfo->pi_slot = slot;
/* since these are all int arrays, we need do just one palloc */
workspace = (int *) palloc(len * 3 * sizeof(int));
projInfo->pi_varSlotOffsets = varSlotOffsets = workspace;
projInfo->pi_varNumbers = varNumbers = workspace + len;
projInfo->pi_varOutputCols = varOutputCols = workspace + len * 2;
projInfo->pi_lastInnerVar = 0;
projInfo->pi_lastOuterVar = 0;
projInfo->pi_lastScanVar = 0;
/*
* We separate the target list elements into simple Var references and
* expressions which require the full ExecTargetList machinery. To be a
* simple Var, a Var has to be a user attribute and not mismatch the
* inputDesc. (Note: if there is a type mismatch then ExecEvalScalarVar
* will probably throw an error at runtime, but we leave that to it.)
*/
exprlist = NIL;
numSimpleVars = 0;
directMap = true;
foreach(tl, targetList)
{
GenericExprState *gstate = (GenericExprState *) lfirst(tl);
Var *variable = (Var *) gstate->arg->expr;
bool isSimpleVar = false;
if (variable != NULL &&
IsA(variable, Var) &&
variable->varattno > 0)
{
if (!inputDesc)
isSimpleVar = true; /* can't check type, assume OK */
else if (variable->varattno <= inputDesc->natts)
{
Form_pg_attribute attr;
attr = inputDesc->attrs[variable->varattno - 1];
if (!attr->attisdropped && variable->vartype == attr->atttypid)
isSimpleVar = true;
}
}
if (isSimpleVar)
{
TargetEntry *tle = (TargetEntry *) gstate->xprstate.expr;
AttrNumber attnum = variable->varattno;
varNumbers[numSimpleVars] = attnum;
varOutputCols[numSimpleVars] = tle->resno;
if (tle->resno != numSimpleVars + 1)
directMap = false;
switch (variable->varno)
{
case INNER_VAR:
varSlotOffsets[numSimpleVars] = offsetof(ExprContext,
ecxt_innertuple);
if (projInfo->pi_lastInnerVar < attnum)
projInfo->pi_lastInnerVar = attnum;
break;
case OUTER_VAR:
varSlotOffsets[numSimpleVars] = offsetof(ExprContext,
ecxt_outertuple);
if (projInfo->pi_lastOuterVar < attnum)
projInfo->pi_lastOuterVar = attnum;
break;
/* INDEX_VAR is handled by default case */
default:
varSlotOffsets[numSimpleVars] = offsetof(ExprContext,
ecxt_scantuple);
if (projInfo->pi_lastScanVar < attnum)
projInfo->pi_lastScanVar = attnum;
break;
}
numSimpleVars++;
}
else
{
/* Not a simple variable, add it to generic targetlist */
exprlist = lappend(exprlist, gstate);
/* Examine expr to include contained Vars in lastXXXVar counts */
get_last_attnums((Node *) variable, projInfo);
}
}
projInfo->pi_targetlist = exprlist;
projInfo->pi_numSimpleVars = numSimpleVars;
projInfo->pi_directMap = directMap;
if (exprlist == NIL)
projInfo->pi_itemIsDone = NULL; /* not needed */
else
projInfo->pi_itemIsDone = (ExprDoneCond *)
palloc(len * sizeof(ExprDoneCond));
return projInfo;
}
/*
* get_last_attnums: expression walker for ExecBuildProjectionInfo
*
* Update the lastXXXVar counts to be at least as large as the largest
* attribute numbers found in the expression
*/
static bool
get_last_attnums(Node *node, ProjectionInfo *projInfo)
{
if (node == NULL)
return false;
if (IsA(node, Var))
{
Var *variable = (Var *) node;
AttrNumber attnum = variable->varattno;
switch (variable->varno)
{
case INNER_VAR:
if (projInfo->pi_lastInnerVar < attnum)
projInfo->pi_lastInnerVar = attnum;
break;
case OUTER_VAR:
if (projInfo->pi_lastOuterVar < attnum)
projInfo->pi_lastOuterVar = attnum;
break;
/* INDEX_VAR is handled by default case */
default:
if (projInfo->pi_lastScanVar < attnum)
projInfo->pi_lastScanVar = attnum;
break;
}
return false;
}
/*
* Don't examine the arguments or filters of Aggrefs or WindowFuncs,
* because those do not represent expressions to be evaluated within the
* overall targetlist's econtext. GroupingFunc arguments are never
* evaluated at all.
*/
if (IsA(node, Aggref) || IsA(node, GroupingFunc))
return false;
if (IsA(node, WindowFunc))
return false;
return expression_tree_walker(node, reinterpret_cast<expression_tree_walker_fptr>(get_last_attnums),
(void *) projInfo);
}
/* ----------------
* ExecAssignProjectionInfo
*
* forms the projection information from the node's targetlist
*
* Notes for inputDesc are same as for ExecBuildProjectionInfo: supply it
* for a relation-scan node, can pass NULL for upper-level nodes
* ----------------
*/
void
ExecAssignProjectionInfo(PlanState *planstate,
TupleDesc inputDesc)
{
planstate->ps_ProjInfo =
ExecBuildProjectionInfo(planstate->targetlist,
planstate->ps_ExprContext,
planstate->ps_ResultTupleSlot,
inputDesc);
}
/* ----------------
* ExecFreeExprContext
*
* A plan node's ExprContext should be freed explicitly during executor
* shutdown because there may be shutdown callbacks to call. (Other resources
* made by the above routines, such as projection info, don't need to be freed
* explicitly because they're just memory in the per-query memory context.)
*
* However ... there is no particular need to do it during ExecEndNode,
* because FreeExecutorState will free any remaining ExprContexts within
* the EState. Letting FreeExecutorState do it allows the ExprContexts to
* be freed in reverse order of creation, rather than order of creation as
* will happen if we delete them here, which saves O(N^2) work in the list
* cleanup inside FreeExprContext.
* ----------------
*/
void
ExecFreeExprContext(PlanState *planstate)
{
/*
* Per above discussion, don't actually delete the ExprContext. We do
* unlink it from the plan node, though.
*/
planstate->ps_ExprContext = NULL;
}
/* ----------------------------------------------------------------
* the following scan type support functions are for
* those nodes which are stubborn and return tuples in
* their Scan tuple slot instead of their Result tuple
* slot.. luck fur us, these nodes do not do projections
* so we don't have to worry about getting the ProjectionInfo
* right for them... -cim 6/3/91
* ----------------------------------------------------------------
*/
/* ----------------
* ExecGetScanType
* ----------------
*/
TupleDesc
ExecGetScanType(ScanState *scanstate)
{
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
return slot->tts_tupleDescriptor;
}
/* ----------------
* ExecAssignScanType
* ----------------
*/
void
ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
{
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
ExecSetSlotDescriptor(slot, tupDesc);
}
/* ----------------
* ExecAssignScanTypeFromOuterPlan
* ----------------
*/
void
ExecAssignScanTypeFromOuterPlan(ScanState *scanstate)
{
PlanState *outerPlan;
TupleDesc tupDesc;
outerPlan = outerPlanState(scanstate);
tupDesc = ExecGetResultType(outerPlan);
ExecAssignScanType(scanstate, tupDesc);
}
/* ----------------------------------------------------------------
* Scan node support
* ----------------------------------------------------------------
*/
/* ----------------------------------------------------------------
* ExecRelationIsTargetRelation
*
* Detect whether a relation (identified by rangetable index)
* is one of the target relations of the query.
* ----------------------------------------------------------------
*/
bool
ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
{
ResultRelInfo *resultRelInfos;
int i;
resultRelInfos = estate->es_result_relations;
for (i = 0; i < estate->es_num_result_relations; i++)
{
if (resultRelInfos[i].ri_RangeTableIndex == scanrelid)
return true;
}
return false;
}
/* ----------------------------------------------------------------
* ExecOpenScanRelation
*
* Open the heap relation to be scanned by a base-level scan plan node.
* This should be called during the node's ExecInit routine.
*
* By default, this acquires AccessShareLock on the relation. However,
* if the relation was already locked by InitPlan, we don't need to acquire
* any additional lock. This saves trips to the shared lock manager.
* ----------------------------------------------------------------
*/
Relation
ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
{
Relation rel;
Oid reloid;
LOCKMODE lockmode;
/*
* Determine the lock type we need. First, scan to see if target relation
* is a result relation. If not, check if it's a FOR UPDATE/FOR SHARE
* relation. In either of those cases, we got the lock already.
*/
lockmode = AccessShareLock;
if (ExecRelationIsTargetRelation(estate, scanrelid))
lockmode = NoLock;
else
{
/* Keep this check in sync with InitPlan! */
ExecRowMark *erm = ExecFindRowMark(estate, scanrelid, true);
if (erm != NULL && erm->relation != NULL)
lockmode = NoLock;
}
/* Open the relation and acquire lock as needed */
reloid = getrelid(scanrelid, estate->es_range_table);
rel = heap_open(reloid, lockmode);
/*
* Complain if we're attempting a scan of an unscannable relation, except
* when the query won't actually be run. This is a slightly klugy place
* to do this, perhaps, but there is no better place.
*/
if ((eflags & (EXEC_FLAG_EXPLAIN_ONLY | EXEC_FLAG_WITH_NO_DATA)) == 0 &&
!RelationIsScannable(rel))
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("materialized view \"%s\" has not been populated",
RelationGetRelationName(rel)),
errhint("Use the REFRESH MATERIALIZED VIEW command.")));
return rel;
}
/* ----------------------------------------------------------------
* ExecCloseScanRelation
*
* Close the heap relation scanned by a base-level scan plan node.
* This should be called during the node's ExecEnd routine.
*
* Currently, we do not release the lock acquired by ExecOpenScanRelation.
* This lock should be held till end of transaction. (There is a faction
* that considers this too much locking, however.)
*
* If we did want to release the lock, we'd have to repeat the logic in
* ExecOpenScanRelation in order to figure out what to release.
* ----------------------------------------------------------------
*/
void
ExecCloseScanRelation(Relation scanrel)
{
heap_close(scanrel, NoLock);
}
/*
* UpdateChangedParamSet
* Add changed parameters to a plan node's chgParam set
*/
void
UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
{
Bitmapset *parmset;
/*
* The plan node only depends on params listed in its allParam set. Don't
* include anything else into its chgParam set.
*/
parmset = bms_intersect(node->plan->allParam, newchg);
/*
* Keep node->chgParam == NULL if there's not actually any members; this
* allows the simplest possible tests in executor node files.
*/
if (!bms_is_empty(parmset))
node->chgParam = bms_join(node->chgParam, parmset);
else
bms_free(parmset);
}
/*
* Register a shutdown callback in an ExprContext.
*
* Shutdown callbacks will be called (in reverse order of registration)
* when the ExprContext is deleted or rescanned. This provides a hook
* for functions called in the context to do any cleanup needed --- it's
* particularly useful for functions returning sets. Note that the
* callback will *not* be called in the event that execution is aborted
* by an error.
*/
void
RegisterExprContextCallback(ExprContext *econtext,
ExprContextCallbackFunction function,
Datum arg)
{
ExprContext_CB *ecxt_callback;
/* Save the info in appropriate memory context */
ecxt_callback = (ExprContext_CB *)
MemoryContextAlloc(econtext->ecxt_per_query_memory,
sizeof(ExprContext_CB));
ecxt_callback->function = function;
ecxt_callback->arg = arg;
/* link to front of list for appropriate execution order */
ecxt_callback->next = econtext->ecxt_callbacks;
econtext->ecxt_callbacks = ecxt_callback;
}
/*
* Deregister a shutdown callback in an ExprContext.
*
* Any list entries matching the function and arg will be removed.
* This can be used if it's no longer necessary to call the callback.
*/
void
UnregisterExprContextCallback(ExprContext *econtext,
ExprContextCallbackFunction function,
Datum arg)
{
ExprContext_CB **prev_callback;
ExprContext_CB *ecxt_callback;
prev_callback = &econtext->ecxt_callbacks;
while ((ecxt_callback = *prev_callback) != NULL)
{
if (ecxt_callback->function == function && ecxt_callback->arg == arg)
{
*prev_callback = ecxt_callback->next;
pfree(ecxt_callback);
}
else
prev_callback = &ecxt_callback->next;
}
}
/*
* Call all the shutdown callbacks registered in an ExprContext.
*
* The callback list is emptied (important in case this is only a rescan
* reset, and not deletion of the ExprContext).
*
* If isCommit is false, just clean the callback list but don't call 'em.
* (See comment for FreeExprContext.)
*/
static void
ShutdownExprContext(ExprContext *econtext, bool isCommit)
{
ExprContext_CB *ecxt_callback;
MemoryContext oldcontext;
/* Fast path in normal case where there's nothing to do. */
if (econtext->ecxt_callbacks == NULL)
return;
/*
* Call the callbacks in econtext's per-tuple context. This ensures that
* any memory they might leak will get cleaned up.
*/
oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
/*
* Call each callback function in reverse registration order.
*/
while ((ecxt_callback = econtext->ecxt_callbacks) != NULL)
{
econtext->ecxt_callbacks = ecxt_callback->next;
if (isCommit)
(*ecxt_callback->function) (ecxt_callback->arg);
pfree(ecxt_callback);
}
MemoryContextSwitchTo(oldcontext);
}
| 28.822086
| 101
| 0.68632
|
jessesleeping
|
1b9e4e4bac7a166866d730a520a8f98dc3b84767
| 2,439
|
cpp
|
C++
|
timus/1008.cpp
|
y-wan/OJ
|
5dea140dbaaec98e440ad4b1c10fa5072f1ceea7
|
[
"MIT"
] | null | null | null |
timus/1008.cpp
|
y-wan/OJ
|
5dea140dbaaec98e440ad4b1c10fa5072f1ceea7
|
[
"MIT"
] | null | null | null |
timus/1008.cpp
|
y-wan/OJ
|
5dea140dbaaec98e440ad4b1c10fa5072f1ceea7
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <string>
#include <sstream>
#include <queue>
using namespace std;
bool a[11][11], v[11][11];
queue<pair<int, int> > q;
int cnt, n;
void print_rtlb(int x, int y) {
if (x < 10 && a[x + 1][y] && !v[x + 1][y]) {
cout << 'R';
v[x + 1][y] = true;
q.push(make_pair(x + 1, y));
}
if (y < 10 && a[x][y + 1] && !v[x][y + 1]) {
cout << 'T';
v[x][y + 1] = true;
q.push(make_pair(x, y + 1));
}
if (x > 1 && a[x - 1][y] && !v[x - 1][y]) {
cout << 'L';
v[x - 1][y] = true;
q.push(make_pair(x - 1, y));
}
if (y > 1 && a[x][y - 1] && !v[x][y - 1]) {
cout << 'B';
v[x][y - 1] = true;
q.push(make_pair(x, y - 1));
}
if (++cnt < n) cout << ",\n";
else cout << ".\n";
if (!q.empty()) {
x = q.front().first, y = q.front().second;
q.pop();
print_rtlb(x, y);
}
}
void print_digit() {
for (int i = 1; i < 11; ++i)
for (int j = 1; j < 11; ++j)
if (a[i][j]) cout << i << ' ' << j << endl;
}
int main() {
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
string s;
getline(cin, s);
stringstream ss(s);
if (s.find(' ') == string::npos) {
int x0, y0, x, y;
ss >> n;
cin >> x0 >> y0;
a[x0][y0] = true;
for (int i = 1; i < n; ++i) {
cin >> x >> y;
a[x][y] = true;
}
cout << x0 << ' ' << y0 << endl;
v[x0][y0] = true;
print_rtlb(x0, y0);
}
else {
int x, y, len;
ss >> x >> y;
a[x][y] = true;
++n;
q.push(make_pair(x, y));
do {
cin >> s;
len = s.size();
x = q.front().first, y = q.front().second;
q.pop();
for (int i = 0; i < len - 1; ++i) {
switch (s[i]) {
case 'R': a[x + 1][y] = true; q.push(make_pair(x + 1, y)); ++n; break;
case 'T': a[x][y + 1] = true; q.push(make_pair(x, y + 1)); ++n; break;
case 'L': a[x - 1][y] = true; q.push(make_pair(x - 1, y)); ++n; break;
case 'B': a[x][y - 1] = true; q.push(make_pair(x, y - 1)); ++n; break;
default: break;
}
}
} while (s[len - 1] != '.');
cout << n << endl;
print_digit();
}
return 0;
}
| 26.802198
| 86
| 0.369824
|
y-wan
|
1ba2d80232f33fd9ab0f5f4c3bee4e401a3fa164
| 8,540
|
cpp
|
C++
|
src/Tools/ImagePolygonize/ImagePolygonize.cpp
|
irov/Mengine
|
b76e9f8037325dd826d4f2f17893ac2b236edad8
|
[
"MIT"
] | 39
|
2016-04-21T03:25:26.000Z
|
2022-01-19T14:16:38.000Z
|
src/Tools/ImagePolygonize/ImagePolygonize.cpp
|
irov/Mengine
|
b76e9f8037325dd826d4f2f17893ac2b236edad8
|
[
"MIT"
] | 23
|
2016-06-28T13:03:17.000Z
|
2022-02-02T10:11:54.000Z
|
src/Tools/ImagePolygonize/ImagePolygonize.cpp
|
irov/Mengine
|
b76e9f8037325dd826d4f2f17893ac2b236edad8
|
[
"MIT"
] | 14
|
2016-06-22T20:45:37.000Z
|
2021-07-05T12:25:19.000Z
|
#include "ToolUtils/ToolUtils.h"
#include "Config/Config.h"
#include "pugixml.hpp"
#include <vector>
#include <string>
#include <sstream>
//////////////////////////////////////////////////////////////////////////
int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdLine, int nShowCmd )
{
MENGINE_UNUSED( hInstance );
MENGINE_UNUSED( hPrevInstance );
MENGINE_UNUSED( nShowCmd );
std::wstring texturepacker_path = parse_kwds( lpCmdLine, L"--texturepacker", std::wstring() );
std::wstring in_path = parse_kwds( lpCmdLine, L"--in_path", std::wstring() );
std::wstring result_path = parse_kwds( lpCmdLine, L"--result_path", std::wstring() );
uint32_t offset_x = parse_kwds( lpCmdLine, L"--offset_x", 0U );
uint32_t offset_y = parse_kwds( lpCmdLine, L"--offset_y", 0U );
float width = parse_kwds( lpCmdLine, L"--width", -1.f );
float height = parse_kwds( lpCmdLine, L"--height", -1.f );
uint32_t tolerance = parse_kwds( lpCmdLine, L"--tolerance", 200U );
if( texturepacker_path.empty() == true )
{
message_error( "not found 'texturepacker' param" );
return 0;
}
if( in_path.empty() == true )
{
message_error( "not found 'image' param" );
return 0;
}
std::wstring system_cmd;
system_cmd += L" --shape-padding 0 ";
system_cmd += L" --border-padding 0 ";
system_cmd += L" --padding 0 ";
system_cmd += L" --disable-rotation ";
system_cmd += L" --extrude 0 ";
system_cmd += L" --trim-mode Polygon ";
system_cmd += L" --trim-threshold 0 ";
system_cmd += L" --tracer-tolerance ";
system_cmd += L" --max-width 8192 ";
system_cmd += L" --max-height 8192 ";
system_cmd += L" --max-size 8192 ";
std::wstringstream ss;
ss << tolerance;
system_cmd += ss.str();
system_cmd += L" ";
WCHAR ImagePathCanonicalizeQuote[MAX_PATH];
ForcePathQuoteSpaces( ImagePathCanonicalizeQuote, in_path );
system_cmd += ImagePathCanonicalizeQuote;
WCHAR tempPath[MAX_PATH];
GetTempPath( MAX_PATH, tempPath );
WCHAR outCanonicalize[MAX_PATH];
PathCombine( outCanonicalize, tempPath, L"aemovie_temp_texturepacker_sheet.xml" );
//PathCanonicalize( outCanonicalize, L"%TEMP%/temp_texturepacker_sheet.xml" );
//PathUnquoteSpaces( outCanonicalize );
system_cmd += L" --data ";
system_cmd += outCanonicalize;
system_cmd += L" --format xml ";
system_cmd += L" --quiet ";
STARTUPINFO lpStartupInfo;
ZeroMemory( &lpStartupInfo, sizeof( STARTUPINFOW ) );
lpStartupInfo.cb = sizeof( lpStartupInfo );
PROCESS_INFORMATION lpProcessInformation;
ZeroMemory( &lpProcessInformation, sizeof( PROCESS_INFORMATION ) );
WCHAR lpCommandLine[32768];
wcscpy_s( lpCommandLine, system_cmd.c_str() );
WCHAR TexturePathCanonicalizeQuote[MAX_PATH];
ForcePathQuoteSpaces( TexturePathCanonicalizeQuote, texturepacker_path );
PathUnquoteSpaces( TexturePathCanonicalizeQuote );
if( CreateProcess( TexturePathCanonicalizeQuote
, lpCommandLine
, NULL
, NULL
, FALSE
, CREATE_NO_WINDOW
, NULL
, NULL
, &lpStartupInfo
, &lpProcessInformation ) == FALSE )
{
message_error( "invalid CreateProcess %ls %ls"
, TexturePathCanonicalizeQuote
, lpCommandLine
);
return 0;
}
CloseHandle( lpProcessInformation.hThread );
WaitForSingleObject( lpProcessInformation.hProcess, INFINITE );
DWORD exit_code;
GetExitCodeProcess( lpProcessInformation.hProcess, &exit_code );
CloseHandle( lpProcessInformation.hProcess );
if( exit_code != 0 )
{
message_error( "invalid Process %ls exit_code %d"
, TexturePathCanonicalizeQuote
, exit_code
);
return 0;
}
FILE * f = _wfopen( outCanonicalize, L"rb" );
if( f == NULL )
{
message_error( "invalid _wfopen %ls"
, outCanonicalize
);
return 0;
}
fseek( f, 0, SEEK_END );
int f_size = ftell( f );
rewind( f );
std::vector<char> v_buffer( f_size );
char * mf_buffer = &v_buffer[0];
fread( mf_buffer, 1, f_size, f );
fclose( f );
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_buffer( mf_buffer, f_size );
pugi::xml_node xml_sprite = doc.first_element_by_path( "TextureAtlas/sprite" );
pugi::xml_attribute xml_sprite_x = xml_sprite.attribute( "x" );
pugi::xml_attribute xml_sprite_y = xml_sprite.attribute( "y" );
pugi::xml_attribute xml_sprite_w = xml_sprite.attribute( "w" );
pugi::xml_attribute xml_sprite_h = xml_sprite.attribute( "h" );
pugi::xml_attribute xml_sprite_oX = xml_sprite.attribute( "oX" );
pugi::xml_attribute xml_sprite_oY = xml_sprite.attribute( "oY" );
pugi::xml_attribute xml_sprite_oW = xml_sprite.attribute( "oW" );
pugi::xml_attribute xml_sprite_oH = xml_sprite.attribute( "oH" );
uint32_t x = xml_sprite_x.as_uint();
uint32_t y = xml_sprite_y.as_uint();
uint32_t w = xml_sprite_w.as_uint();
uint32_t h = xml_sprite_h.as_uint();
uint32_t oX = xml_sprite_oX.as_uint();
uint32_t oY = xml_sprite_oY.as_uint();
uint32_t oW = xml_sprite_oW.as_uint();
uint32_t oH = xml_sprite_oH.as_uint();
//TODO
MENGINE_UNUSED( oW );
MENGINE_UNUSED( oH );
pugi::xml_node xml_vertices = doc.first_element_by_path( "TextureAtlas/sprite/vertices" );
const char * vertices = xml_vertices.child_value();
std::stringstream ss_vertices( vertices );
std::vector<float> positions;
for( ;; )
{
int32_t pos_x;
int32_t pos_y;
if( ss_vertices >> pos_x && ss_vertices >> pos_y )
{
pos_x -= x;
pos_y -= y;
pos_x += offset_x;
pos_y += offset_y;
float xf = (float)pos_x;
float yf = (float)pos_y;
positions.push_back( xf );
positions.push_back( yf );
}
else
{
break;
}
}
pugi::xml_node xml_verticesUV = doc.first_element_by_path( "TextureAtlas/sprite/verticesUV" );
const char * verticesUV = xml_verticesUV.child_value();
if( width < 0.f )
{
width = (float)w;
}
if( height < 0.f )
{
height = (float)h;
}
std::stringstream ss_verticesUV( verticesUV );
std::vector<float> uvs;
for( ;; )
{
uint32_t uv_x;
uint32_t uv_y;
if( ss_verticesUV >> uv_x && ss_verticesUV >> uv_y )
{
uv_x -= x;
uv_y -= y;
uv_x += oX;
uv_y += oY;
float xf = (float)uv_x / (float)width;
float yf = (float)uv_y / (float)height;
uvs.push_back( xf );
uvs.push_back( yf );
}
else
{
break;
}
}
pugi::xml_node xml_triangles = doc.first_element_by_path( "TextureAtlas/sprite/triangles" );
const char * triangles = xml_triangles.child_value();
std::stringstream ss_triangles( triangles );
std::vector<uint16_t> indices;
for( ;; )
{
uint16_t index;
if( ss_triangles >> index )
{
indices.push_back( index );
}
else
{
break;
}
}
uint32_t vertex_count = (uint32_t)positions.size() / 2;
uint32_t index_count = (uint32_t)indices.size();
WCHAR infoCanonicalizeQuote[MAX_PATH];
ForcePathQuoteSpaces( infoCanonicalizeQuote, result_path.c_str() );
PathUnquoteSpaces( infoCanonicalizeQuote );
FILE * f_result;
errno_t err = _wfopen_s( &f_result, infoCanonicalizeQuote, L"wt" );
if( err != 0 )
{
message_error( "invalid _wfopen %ls err %d"
, infoCanonicalizeQuote
, err
);
return 0;
}
fprintf_s( f_result, "%u\n", vertex_count );
fprintf_s( f_result, "%u\n", index_count );
fprintf_s( f_result, "" );
for( float v : positions )
{
fprintf_s( f_result, " %12f", v );
}
fprintf_s( f_result, "\n" );
fprintf_s( f_result, "" );
for( float v : uvs )
{
fprintf_s( f_result, " %12f", v );
}
fprintf_s( f_result, "\n" );
fprintf_s( f_result, "" );
for( uint16_t v : indices )
{
fprintf_s( f_result, " %u", v );
}
fprintf_s( f_result, "\n" );
fclose( f_result );
return 0;
}
| 26.276923
| 100
| 0.600468
|
irov
|
1ba5b0848e1117fc5a6059de0d1752ace8e2f181
| 8,204
|
cpp
|
C++
|
Plugins/PLVolumeRenderer/src/ClipPosition/ShaderFunctionClipPositionVolumeTexture.cpp
|
ktotheoz/pixellight
|
43a661e762034054b47766d7e38d94baf22d2038
|
[
"MIT"
] | 83
|
2015-01-08T15:06:14.000Z
|
2021-07-20T17:07:00.000Z
|
Plugins/PLVolumeRenderer/src/ClipPosition/ShaderFunctionClipPositionVolumeTexture.cpp
|
PixelLightFoundation/pixellight
|
43a661e762034054b47766d7e38d94baf22d2038
|
[
"MIT"
] | 19
|
2018-08-24T08:10:13.000Z
|
2018-11-29T06:39:08.000Z
|
Plugins/PLVolumeRenderer/src/ClipPosition/ShaderFunctionClipPositionVolumeTexture.cpp
|
ktotheoz/pixellight
|
43a661e762034054b47766d7e38d94baf22d2038
|
[
"MIT"
] | 40
|
2015-02-25T18:24:34.000Z
|
2021-03-06T09:01:48.000Z
|
/*********************************************************\
* File: ShaderFunctionClipPositionVolumeTexture.cpp *
*
* Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/)
*
* This file is part of PixelLight.
*
* 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.
\*********************************************************/
//[-------------------------------------------------------]
//[ Includes ]
//[-------------------------------------------------------]
#include <PLRenderer/Renderer/Renderer.h>
#include <PLRenderer/Renderer/ProgramWrapper.h>
#include <PLRenderer/Renderer/TextureBuffer3D.h>
#include <PLScene/Visibility/VisNode.h>
#include <PLVolume/Volume.h>
#include <PLVolume/Scene/SNClipVolumeTexture.h>
#include "PLVolumeRenderer/SRPVolume.h"
#include "PLVolumeRenderer/ClipPosition/ShaderFunctionClipPositionVolumeTexture.h"
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
using namespace PLCore;
using namespace PLMath;
using namespace PLRenderer;
using namespace PLScene;
namespace PLVolumeRenderer {
//[-------------------------------------------------------]
//[ RTTI interface ]
//[-------------------------------------------------------]
pl_implement_class(ShaderFunctionClipPositionVolumeTexture)
//[-------------------------------------------------------]
//[ Public functions ]
//[-------------------------------------------------------]
/**
* @brief
* Default constructor
*/
ShaderFunctionClipPositionVolumeTexture::ShaderFunctionClipPositionVolumeTexture()
{
}
/**
* @brief
* Destructor
*/
ShaderFunctionClipPositionVolumeTexture::~ShaderFunctionClipPositionVolumeTexture()
{
}
/**
* @brief
* Sets the clip volume texture parameters
*/
void ShaderFunctionClipPositionVolumeTexture::SetVolumeTexture(Program &cProgram, const VisNode &cVolumeVisNode, const VisNode &cVolumeTextureVisNode, int nIndex)
{
// Get used renderer instance
Renderer &cRenderer = cProgram.GetRenderer();
// Get simplified GPU program wrapper interface
ProgramWrapper &cProgramWrapper = static_cast<ProgramWrapper&>(cProgram);
// Get the clip volume texture scene node
PLVolume::SNClipVolumeTexture *pSNClipVolumeTexture = static_cast<PLVolume::SNClipVolumeTexture*>(cVolumeTextureVisNode.GetSceneNode());
if (!pSNClipVolumeTexture)
return; // Early escape, there's no sense in continuing
// Get the volume resource
PLVolume::Volume *pVolume = pSNClipVolumeTexture->GetVolume();
if (!pVolume)
return; // Early escape, there's no sense in continuing
// Get the renderer texture buffer holding the 3D voxel data
PLRenderer::TextureBuffer *pVolumeTextureBuffer = pVolume->GetVolumeTextureBuffer(cRenderer);
if (!pVolumeTextureBuffer || pVolumeTextureBuffer->GetType() != PLRenderer::Resource::TypeTextureBuffer3D)
return; // Early escape, there's no sense in continuing we only support 3D textures
// Calculate the volume space to clip volume texture space matrix
// Volume space to view space
Matrix4x4 mVolumeSpaceToClipVolumeTextureSpace = cVolumeVisNode.GetWorldViewMatrix();
// View space to clip volume texture space
mVolumeSpaceToClipVolumeTextureSpace = cVolumeTextureVisNode.GetWorldViewMatrix().GetInverted()*mVolumeSpaceToClipVolumeTextureSpace;
// Set the volume space to clip volume texture space matrix
cProgramWrapper.Set((nIndex < 0) ? "VolumeSpaceToClipVolumeTextureSpace_x_" : (String("VolumeSpaceToCliVvolumeTextureSpace_") + nIndex + '_'), mVolumeSpaceToClipVolumeTextureSpace);
// Set invert clipping
cProgramWrapper.Set((nIndex < 0) ? "InvertClipping_x_" : (String("InvertClipping_") + nIndex + '_'), (cVolumeTextureVisNode.GetSceneNode()->GetFlags() & PLVolume::SNClip::InvertClipping) != 0);
{ // Set clip volume texture map
const int nTextureUnit = cProgramWrapper.Set((nIndex < 0) ? "ClipVolumeTexture_x_" : (String("ClipVolumeTexture_") + nIndex + '_'), pVolumeTextureBuffer);
if (nTextureUnit >= 0) {
// Setup texture addressing by using clamp
// -> Clamp: Last valid value is reused for out-of-bound access
// -> "stretched color" instead of color being set to border color which is black by default
cRenderer.SetSamplerState(nTextureUnit, Sampler::AddressU, TextureAddressing::Clamp);
cRenderer.SetSamplerState(nTextureUnit, Sampler::AddressV, TextureAddressing::Clamp);
cRenderer.SetSamplerState(nTextureUnit, Sampler::AddressW, TextureAddressing::Clamp);
// No need to perform any texture filtering in here
cRenderer.SetSamplerState(nTextureUnit, Sampler::MagFilter, TextureFiltering::None);
cRenderer.SetSamplerState(nTextureUnit, Sampler::MinFilter, TextureFiltering::None);
cRenderer.SetSamplerState(nTextureUnit, Sampler::MipFilter, TextureFiltering::None);
}
}
// Set clip threshold, everything above will be clipped
cProgramWrapper.Set((nIndex < 0) ? "ClipThreshold_x_" : (String("ClipThreshold_") + nIndex + '_'), pSNClipVolumeTexture->ClipThreshold.Get());
}
//[-------------------------------------------------------]
//[ Public virtual ShaderFunctionClipPosition functions ]
//[-------------------------------------------------------]
void ShaderFunctionClipPositionVolumeTexture::SetVolumeTextures(Program &cProgram, const VisNode &cVolumeVisNode, const Array<const VisNode*> &lstClipVolumeTextures)
{
// None-template version
// We only know a single clip volume texture, ignore the rest
if (lstClipVolumeTextures.GetNumOfElements())
SetVolumeTexture(cProgram, cVolumeVisNode, *lstClipVolumeTextures[0], -1);
}
//[-------------------------------------------------------]
//[ Public virtual ShaderFunction functions ]
//[-------------------------------------------------------]
String ShaderFunctionClipPositionVolumeTexture::GetSourceCode(const String &sShaderLanguage, ESourceCodeType nSourceCodeType)
{
// Check requested shader language
if (sShaderLanguage == GLSL) {
#include "VolumeTexture_GLSL.h"
// Return the requested source code
switch (nSourceCodeType) {
case FragmentShaderBody:
return sSourceCode_Fragment;
case FragmentShaderTemplate:
return sSourceCode_Fragment_Template;
case VertexShaderHeader:
case VertexShaderBody:
case VertexShaderTemplate:
case FragmentShaderHeader:
// Nothing to do in here
break;
}
} else if (sShaderLanguage == Cg) {
#include "VolumeTexture_Cg.h"
// Return the requested source code
switch (nSourceCodeType) {
case FragmentShaderBody:
return sSourceCode_Fragment;
case FragmentShaderTemplate:
return sSourceCode_Fragment_Template;
case VertexShaderHeader:
case VertexShaderBody:
case VertexShaderTemplate:
case FragmentShaderHeader:
// Nothing to do in here
break;
}
}
// Error!
return "";
}
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
} // PLVolumeRenderer
| 41.02
| 194
| 0.661141
|
ktotheoz
|
1ba5d57d5b0151da2290bb7370698ca12d15ec09
| 14,827
|
hpp
|
C++
|
src/cpu/jit_avx512_common_conv_kernel.hpp
|
scale-snu/mkldnn-bn-restructuring
|
97fdb4f17119008baf452f1cbee5b91b6a366d79
|
[
"Apache-2.0"
] | 1
|
2021-09-14T08:09:29.000Z
|
2021-09-14T08:09:29.000Z
|
src/cpu/jit_avx512_common_conv_kernel.hpp
|
scale-snu/mkldnn-bn-restructuring
|
97fdb4f17119008baf452f1cbee5b91b6a366d79
|
[
"Apache-2.0"
] | null | null | null |
src/cpu/jit_avx512_common_conv_kernel.hpp
|
scale-snu/mkldnn-bn-restructuring
|
97fdb4f17119008baf452f1cbee5b91b6a366d79
|
[
"Apache-2.0"
] | null | null | null |
/*******************************************************************************
* Copyright 2016-2017 Intel Corporation
*
* 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 JIT_AVX512_COMMON_CONV_KERNEL_F32_HPP
#define JIT_AVX512_COMMON_CONV_KERNEL_F32_HPP
#include "c_types_map.hpp"
#include "cpu_memory.hpp"
#include "jit_generator.hpp"
#include "jit_primitive_conf.hpp"
namespace mkldnn {
namespace impl {
namespace cpu {
struct jit_avx512_common_conv_fwd_kernel : public jit_generator {
jit_avx512_common_conv_fwd_kernel(jit_conv_conf_t ajcp,
const primitive_attr_t &attr) : jcp(ajcp), attr_(attr)
{
generate();
jit_ker = (void (*)(jit_conv_call_s *))getCode();
}
static bool post_ops_ok(jit_conv_conf_t &jcp,
const primitive_attr_t &attr);
static status_t init_conf(jit_conv_conf_t &jcp,
const convolution_desc_t &cd,
cpu_memory_t::pd_t &src_pd,
cpu_memory_t::pd_t &weights_pd,
cpu_memory_t::pd_t &dst_pd,
cpu_memory_t::pd_t &bias_pd,
const primitive_attr_t &attr,
bool with_relu = false,
float relu_negative_slope = 0.);
jit_conv_conf_t jcp;
const primitive_attr_t &attr_;
void (*jit_ker)(jit_conv_call_s *);
private:
using reg64_t = const Xbyak::Reg64;
enum {
typesize = sizeof(float),
ker_reg_base_idx = 28,
};
reg64_t param = abi_param1;
// We rearrange registers without conflicts for BatchNorm fusion.
reg64_t reg_inp = r9;
reg64_t reg_inp_tmp = r12;
reg64_t reg_ker = r9;
reg64_t reg_ker_tmp = r12;
reg64_t reg_out = r10;
reg64_t reg_inp_prf = r11;
reg64_t reg_ker_prf = r12;
reg64_t reg_out_prf = r13;
reg64_t aux_reg_inp = r14;
reg64_t aux_reg_ker = r15;
reg64_t aux_reg_inp_prf = rsi;
reg64_t aux_reg_ker_prf = rdx;
reg64_t reg_channel = rsi;
reg64_t reg_bias = rdx;
reg64_t reg_kj = rax;
reg64_t reg_relu_ns = rax;
reg64_t reg_oi = rbx;
reg64_t reg_kh = abi_not_param1;
reg64_t reg_tmp = rbp;
reg64_t reg_ic_loop = rdx;
reg64_t reg_inp_loop = rsi;
reg64_t reg_init_flag = r13;
reg64_t reg_bias_ptr = param;
reg64_t aux_reg_ic = r12;
reg64_t reg_binp = rax;
reg64_t reg_bout = r11;
reg64_t aux1_reg_inp = rbx;
reg64_t aux_reg_out = abi_not_param1;
int stack_space_needed = 112;
int ker = 0;
int norm_flags = 16;
int inp = 32;
int prev_var = 48;
int prev_src = 64;
int scale_shift = 80;
int oh_second_flags = 96;
reg64_t reg_norm_flags_tmp = r12;
reg64_t reg_norm_flags = r8;
reg64_t reg_oh_second_flags_tmp = r12;
reg64_t reg_oh_second_flags = r9;
using mask_t = const Xbyak::Opmask;
mask_t vmask = k7;
reg64_t reg_prev_mean_tmp = r12;
reg64_t reg_prev_var_tmp = r12;
reg64_t reg_prev_src = r9;
reg64_t aux_reg_prev_src = r8;
reg64_t reg_prev_src_tmp = r12;
reg64_t reg_scale_shift_tmp = r12;
inline Xbyak::Zmm zmm_ker(int i_ic) {
assert(i_ic < 4);
return Xbyak::Zmm(ker_reg_base_idx + i_ic);
}
inline Xbyak::Zmm zmm_out(int i_ur, int i_oc) {
int idx = i_ur + i_oc * jcp.ur_w;
assert(idx < ker_reg_base_idx);
return Xbyak::Zmm(idx);
}
Xbyak::Reg64 imm_addr64 = r15;
Xbyak::Xmm xmm_relu_ns = Xbyak::Xmm(30);
Xbyak::Zmm zmm_relu_ns = Xbyak::Zmm(30);
Xbyak::Zmm zmm_zero = Xbyak::Zmm(31);
Xbyak::Zmm vone = Xbyak::Zmm(20);
Xbyak::Zmm veps = Xbyak::Zmm(21);
Xbyak::Zmm z = Xbyak::Zmm(22);
Xbyak::Zmm zmm_zero2 = Xbyak::Zmm(23);
Xbyak::Zmm zmean = Xbyak::Zmm(24);
Xbyak::Zmm zsqrtvar = Xbyak::Zmm(25);
Xbyak::Zmm zgamma = Xbyak::Zmm(26);
Xbyak::Zmm zbeta = Xbyak::Zmm(27);
int chan_data_offt;
inline void prepare_output(int ur_w);
inline void store_output(int ur_w);
inline void compute_loop_fma(int ur_w, int pad_l, int pad_r);
inline void compute_loop_fma_OC_FIRST(int ur_w, int pad_l, int pad_r);
inline void compute_loop_4vnni(int ur_w, int pad_l, int pad_r);
inline void compute_loop_4fma(int ur_w, int pad_l, int pad_r);
inline void compute_loop_4fma_1st(int ur_w, int pad_l, int pad_r);
inline void compute_loop(int ur_w, int pad_l, int pad_r);
void generate();
inline void vadd(Xbyak::Zmm zmm, reg64_t reg, int offset) {
if (jcp.ver == ver_4vnni)
vpaddd(zmm, zmm, EVEX_compress_addr(reg, offset));
else
vaddps(zmm, zmm, EVEX_compress_addr(reg, offset));
}
inline void vcmp(Xbyak::Opmask kmask,
Xbyak::Zmm zmm_src1, Xbyak::Zmm zmm_src2, const unsigned char cmp) {
if (jcp.ver == ver_4vnni)
vpcmpd(kmask, zmm_src1, zmm_src2, cmp);
else
vcmpps(kmask, zmm_src1, zmm_src2, cmp);
}
inline void vmul(Xbyak::Zmm zmm_dst, Xbyak::Opmask kmask,
Xbyak::Zmm zmm_src1, Xbyak::Zmm zmm_src2) {
if (jcp.ver == ver_4vnni)
vpmulld(zmm_dst | kmask, zmm_src1, zmm_src2);
else
vmulps(zmm_dst | kmask, zmm_src1, zmm_src2);
}
inline int get_output_offset(int oi, int n_oc_block) {
return jcp.typesize_out
* (n_oc_block * jcp.oh * jcp.ow + oi) * jcp.oc_block;
}
inline int get_input_offset(int ki, int ic, int oi, int pad_l) {
int scale = (jcp.ver == ver_4vnni) ? 2 : 1;
int iw_str = !jcp.is_1stconv ? jcp.ic_block : 1;
int ic_str = !jcp.is_1stconv ? 1 : jcp.iw * jcp.ih;
return jcp.typesize_in
* ((ki + oi * jcp.stride_w - pad_l) * iw_str + scale * ic * ic_str);
}
inline int get_kernel_offset(int ki,int ic,int n_oc_block,int ker_number) {
int scale = (jcp.ver == ver_4vnni) ? 2 : 1;
return jcp.typesize_in * jcp.oc_block
* (n_oc_block * jcp.nb_ic * jcp.ic_block * jcp.kh * jcp.kw
+ (ic + ker_number) * scale + ki * jcp.ic_block);
}
inline int get_ow_start(int ki, int pad_l) {
return nstl::max(0, (pad_l - ki + jcp.stride_w - 1) / jcp.stride_w);
}
inline int get_ow_end(int ur_w, int ki, int pad_r) {
return ur_w - nstl::max(0,
(ki + pad_r - (jcp.kw - 1) + jcp.stride_w - 1) / jcp.stride_w);
}
};
struct jit_avx512_common_conv_bwd_data_kernel_f32: public jit_generator {
jit_avx512_common_conv_bwd_data_kernel_f32(jit_conv_conf_t ajcp): jcp(ajcp)
{
generate();
jit_ker = (void (*)(jit_conv_call_s *))getCode();
}
static status_t init_conf(jit_conv_conf_t &jcp,
const convolution_desc_t &cd,
const memory_desc_wrapper &diff_src_d,
const memory_desc_wrapper &weights_d,
const memory_desc_wrapper &diff_dst_d);
jit_conv_conf_t jcp;
void (*jit_ker)(jit_conv_call_s *);
private:
using reg64_t = const Xbyak::Reg64;
enum {
typesize = sizeof(float),
ker_reg_base_idx = 28,
};
// We rearrange registers without conflicts for BatchNorm fusion.
reg64_t param = abi_param1;
reg64_t reg_dst_tmp = r8;
reg64_t reg_dst = r9;
reg64_t reg_ker_tmp = r8;
reg64_t reg_ker = r9;
reg64_t reg_src = r10;
reg64_t reg_dst_prf_tmp = r8;
reg64_t reg_dst_prf = r9;
reg64_t reg_ker_prf_tmp = r8;
reg64_t reg_ker_prf = r9;
reg64_t reg_src_prf = r13;
reg64_t aux_reg_dst = r14;
reg64_t aux_reg_ker = r15;
reg64_t aux_reg_dst_prf = rsi;
reg64_t aux_reg_ker_prf = rdx;
reg64_t reg_kj = rax;
reg64_t reg_oi = rbx;
reg64_t reg_kh = abi_not_param1;
reg64_t reg_channel_tmp = r8;
reg64_t reg_channel = r9;
reg64_t reg_tmp = rbp;
reg64_t reg_flag_oc_last_tmp = r8;
reg64_t reg_flag_oc_last = r9;
reg64_t reg_flag_last_tmp = r8;
reg64_t reg_flag_last = r9;
reg64_t reg_coff_tmp = r8;
reg64_t reg_coff = rsi;
reg64_t reg_rbuf1_tmp = r8;
reg64_t reg_rbuf1 = r11;
reg64_t reg_rbuf2_tmp = r8;
reg64_t reg_rbuf2 = r12;
reg64_t reg_bn_src_tmp = r8;
reg64_t reg_bn_src = r9;
reg64_t reg_relu_src_tmp = r8;
reg64_t reg_relu_src = r9;
reg64_t reg_mean_tmp = r8;
reg64_t reg_mean = r9;
reg64_t reg_rbuf1_base_tmp = r8;
reg64_t reg_rbuf1_base = r15;
reg64_t reg_rbuf2_base_tmp = r8;
reg64_t reg_rbuf2_base = r13;
reg64_t reg_diff_gamma_tmp = r8;
reg64_t reg_diff_gamma = rbx;
reg64_t reg_diff_beta_tmp = r8;
reg64_t reg_diff_beta = r10;
reg64_t reg_coff_max_tmp = r8;
reg64_t reg_coff_max = rdx;
reg64_t reg_nthr_tmp = r8;
reg64_t reg_nthr = r12;
reg64_t reg_ithr_tmp = r8;
reg64_t reg_ithr = rbp;
reg64_t reg_chan_size_tmp = r8;
reg64_t reg_chan_size = r15;
reg64_t reg_var_tmp = r8;
reg64_t reg_var = r8;
reg64_t reg_base_coff_tmp = r8;
reg64_t reg_base_coff = rbp;
reg64_t reg_barrier_tmp = r8;
reg64_t reg_barrier = rax;
reg64_t reg_roff = r14;
reg64_t reg_ctr = rsi;
reg64_t reg_one_tmp =r8;
reg64_t reg_eps_tmp =r8;
int flag_oc_last = 0;
int coff = 16;
int rbuf1 = 32;
int rbuf2 = 48;
int bn_src = 64;
int relu_src = 80;
int mean = 96;
int dst = 112;
int ker = 128;
int dst_prf = 144;
int ker_prf = 160;
int channel = 172;
int rbuf1_base = 192;
int rbuf2_base = 208;
int diff_gamma = 224;
int diff_beta = 240;
int coff_max = 256;
int nthr = 272;
int ithr = 288;
int chan_size = 304;
int var = 320;
int base_coff = 336;
int barrier = 352;
int roff = 368;
int ctr = 338;
int one = 400;
int eps = 416;
int flag_last = 432;
int stack_space_needed = 448;
Xbyak::Zmm zbn_src = Xbyak::Zmm(21);
Xbyak::Zmm zrelu_src = Xbyak::Zmm(22);
Xbyak::Zmm zmean = Xbyak::Zmm(23);
Xbyak::Zmm zd_beta = Xbyak::Zmm(24);
Xbyak::Zmm zd_gamma = Xbyak::Zmm(25);
Xbyak::Zmm ztmp = Xbyak::Zmm(26);
Xbyak::Zmm zmm_zero = Xbyak::Zmm(27);
Xbyak::Zmm vone = Xbyak::Zmm(25);
Xbyak::Zmm veps = Xbyak::Zmm(26);
Xbyak::Zmm zsqrtvar = Xbyak::Zmm(27);
using mask_t = const Xbyak::Opmask;
mask_t vmask = k7;
inline Xbyak::Zmm zmm_ker(int i_ic) {
assert(i_ic < 4);
return Xbyak::Zmm(ker_reg_base_idx + i_ic);
}
inline Xbyak::Zmm zmm_out(int i_ur, int i_oc) {
int idx = i_ur + i_oc * jcp.ur_w;
assert(idx < ker_reg_base_idx);
return Xbyak::Zmm(idx);
}
inline void vadd(Xbyak::Zmm zmm, reg64_t reg, int offset) {
if (jcp.ver == ver_4vnni)
vpaddd(zmm, zmm, EVEX_compress_addr(reg, offset));
else
vaddps(zmm, zmm, EVEX_compress_addr(reg, offset));
}
inline void prepare_output(int ur_w);
inline void store_output(int ur_w);
inline void compute_loop_4fma(int ur_w, int l_overflow, int r_overflow);
inline void compute_loop_4vnni(int ur_w, int l_overflow, int r_overflow);
inline void compute_loop_fma(int ur_w, int l_overflow, int r_overflow);
inline void compute_loop(int ur_w, int l_overflow, int r_overflow);
void generate();
inline int get_iw_start(int ki, int l_overflow)
{
int r_pad = jcp.stride_w * (jcp.ow - 1) + jcp.kw - jcp.iw - jcp.l_pad;
int k_max = jcp.kw - 1 - (jcp.iw - 1 + r_pad) % jcp.stride_w
- l_overflow * jcp.stride_w;
int res = ki - k_max;
while (res < 0)
res += jcp.stride_w;
return res;
}
inline int get_iw_end(int ur_w, int ki, int r_overflow)
{
if (ur_w == jcp.ur_w_tail) {
int r_pad = nstl::min(0, jcp.stride_w * (jcp.ow - 1) + jcp.kw
- jcp.iw - jcp.l_pad);
ur_w += r_pad;
}
int k_min = (ur_w - 1 + jcp.l_pad) % jcp.stride_w + r_overflow
* jcp.stride_w;
int res = k_min - ki;
while (res < 0)
res += jcp.stride_w;
return ur_w - res;
}
};
struct jit_avx512_common_conv_bwd_weights_kernel_f32 : public jit_generator {
jit_avx512_common_conv_bwd_weights_kernel_f32(jit_conv_conf_t ajcp)
: jcp(ajcp)
{
generate();
jit_ker = (void (*)(jit_conv_call_s *))getCode();
}
static status_t init_conf(jit_conv_conf_t &jcp,
const convolution_desc_t &cd, cpu_memory_t::pd_t &src_pd,
cpu_memory_t::pd_t &diff_weights_pd,
cpu_memory_t::pd_t &diff_bias_pd, cpu_memory_t::pd_t &diff_dst_pd);
jit_conv_conf_t jcp;
void (*jit_ker)(jit_conv_call_s *);
private:
using reg64_t = const Xbyak::Reg64;
enum {typesize = sizeof(float)};
static const int max_ur_w;
reg64_t param = abi_param1;
reg64_t reg_input = rax;
reg64_t reg_kernel = rdx;
reg64_t reg_output = rsi;
reg64_t b_ic = abi_not_param1;
reg64_t kj = r8;
reg64_t reg_kh = r9;
reg64_t reg_ur_w_trips = r10;
reg64_t reg_oj = r15;
reg64_t reg_ih_count = rbx;
reg64_t reg_tmp = r14;
inline void maybe_zero_kernel();
inline void compute_oh_step_unroll_ow_icblock(int ic_block_step,
int max_ur_w);
inline void oh_step_comeback_pointers();
inline void compute_oh_step_unroll_ow(int ic_block_step, int max_ur_w);
inline void compute_ic_block_step(int ur_w,
int pad_l, int pad_r, int ic_block_step,
int input_offset, int kernel_offset, int output_offset,
bool input_wraparound = false);
inline void compute_ic_block_step_fma(int ur_w,
int pad_l, int pad_r, int ic_block_step,
int input_offset, int kernel_offset, int output_offset,
bool input_wraparound);
inline void compute_ic_block_step_4fma(int ur_w,
int pad_l, int pad_r, int ic_block_step,
int input_offset, int kernel_offset, int output_offset,
bool input_wraparound);
inline void compute_oh_step_common(int ic_block_step, int max_ur_w);
inline void compute_oh_step_disp();
inline void compute_oh_loop_common();
inline bool compute_full_spat_loop();
inline bool flat_4ops_compute();
inline void compute_loop();
void generate();
};
}
}
}
#endif
| 30.697723
| 80
| 0.636811
|
scale-snu
|
1ba78291d259f1cc831ed6a2cabdb63975f30d21
| 1,329
|
cpp
|
C++
|
Source/XsollaWebBrowser/Private/XsollaWebBrowserModule.cpp
|
xsolla/store-ue4-sdk
|
e25440e9d0b82663929ee7f49807e9b6bb09606b
|
[
"Apache-2.0"
] | 14
|
2019-08-28T19:49:07.000Z
|
2021-12-04T14:34:18.000Z
|
Source/XsollaWebBrowser/Private/XsollaWebBrowserModule.cpp
|
xsolla/inventory-ue4-sdk
|
bbe8fbc7384c0c34992145329a4dbd61aa3ae362
|
[
"Apache-2.0"
] | 34
|
2019-08-17T08:23:18.000Z
|
2021-12-08T08:25:14.000Z
|
Source/XsollaWebBrowser/Private/XsollaWebBrowserModule.cpp
|
xsolla/store-ue4-sdk
|
e25440e9d0b82663929ee7f49807e9b6bb09606b
|
[
"Apache-2.0"
] | 12
|
2019-09-25T15:14:58.000Z
|
2022-03-21T09:27:58.000Z
|
// Copyright 2021 Xsolla Inc. All Rights Reserved.
#include "XsollaWebBrowserModule.h"
#include "XsollaWebBrowserAssetManager.h"
#include "IWebBrowserSingleton.h"
#include "Materials/Material.h"
#include "Modules/ModuleManager.h"
#include "WebBrowserModule.h"
const FName FXsollaWebBrowserModule::ModuleName = "XsollaWebBrowser";
void FXsollaWebBrowserModule::StartupModule()
{
if (WebBrowserAssetMgr == nullptr)
{
WebBrowserAssetMgr = NewObject<UXsollaWebBrowserAssetManager>((UObject*)GetTransientPackage(), NAME_None, RF_Transient | RF_Public);
WebBrowserAssetMgr->LoadDefaultMaterials();
FWebBrowserInitSettings WebBrowserInitSettings;
WebBrowserInitSettings.ProductVersion = TEXT("Mozilla/5.0 (Linux; Android 10; Redmi Note 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36");
IWebBrowserModule::Get().CustomInitialize(WebBrowserInitSettings);
IWebBrowserSingleton* WebBrowserSingleton = IWebBrowserModule::Get().GetSingleton();
if (WebBrowserSingleton)
{
WebBrowserSingleton->SetDefaultMaterial(WebBrowserAssetMgr->GetDefaultMaterial());
WebBrowserSingleton->SetDefaultTranslucentMaterial(WebBrowserAssetMgr->GetDefaultTranslucentMaterial());
}
}
}
void FXsollaWebBrowserModule::ShutdownModule()
{
}
IMPLEMENT_MODULE(FXsollaWebBrowserModule, XsollaWebBrowser);
| 34.076923
| 169
| 0.808126
|
xsolla
|
1ba82d595eb3f402ab79c250719d172cc84101b0
| 3,696
|
cpp
|
C++
|
csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/InferenceTestCapi.cpp
|
wintersteiger/onnxruntime
|
071a0c2522dd2af2b1936d608ef7182be6cfa883
|
[
"MIT"
] | 2
|
2019-11-18T14:04:42.000Z
|
2019-12-04T12:49:01.000Z
|
csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/InferenceTestCapi.cpp
|
wintersteiger/onnxruntime
|
071a0c2522dd2af2b1936d608ef7182be6cfa883
|
[
"MIT"
] | null | null | null |
csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/InferenceTestCapi.cpp
|
wintersteiger/onnxruntime
|
071a0c2522dd2af2b1936d608ef7182be6cfa883
|
[
"MIT"
] | null | null | null |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
#include "CppUnitTest.h"
#include <assert.h>
#include <onnxruntime_c_api.h>
wchar_t* GetWideString(const char* c) {
const size_t cSize = strlen(c) + 1;
wchar_t* wc = new wchar_t[cSize];
mbstowcs(wc, c, cSize);
return wc;
}
#define ORT_ABORT_ON_ERROR(expr) \
{ \
OrtStatus* onnx_status = (expr); \
if (onnx_status != NULL) { \
const char* msg = OrtGetErrorMessage(onnx_status); \
fprintf(stderr, "%s\n", msg); \
OrtReleaseStatus(onnx_status); \
wchar_t* wmsg = GetWideString(msg); \
Assert::Fail(L"Failed on ORT_ABORT_ON_ERROR"); \
free(wmsg); \
} \
}
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTest1
{
TEST_CLASS(UnitTest1)
{
public:
int run_inference(OrtSession* session) {
size_t input_height = 224;
size_t input_width = 224;
float* model_input = (float *) malloc (sizeof (float) * 224 * 224 * 3);
size_t model_input_ele_count = 224 * 224 * 3;
// initialize to values between 0.0 and 1.0
for (unsigned int i = 0; i < model_input_ele_count; i++)
model_input[i] = (float)i / (float)(model_input_ele_count + 1);
OrtMemoryInfo* allocator_info;
ORT_ABORT_ON_ERROR(OrtCreateCpuAllocatorInfo(OrtArenaAllocator, OrtMemTypeDefault, &allocator_info));
const size_t input_shape[] = { 1, 3, 224, 224 };
const size_t input_shape_len = sizeof(input_shape) / sizeof(input_shape[0]);
const size_t model_input_len = model_input_ele_count * sizeof(float);
OrtValue* input_tensor = NULL;
ORT_ABORT_ON_ERROR(OrtCreateTensorWithDataAsOrtValue(allocator_info, model_input, model_input_len, input_shape, input_shape_len, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT, &input_tensor));
assert(input_tensor != NULL);
assert(OrtIsTensor(input_tensor));
OrtReleaseMemoryInfo(allocator_info);
const char* input_names[] = { "data_0" };
const char* output_names[] = { "softmaxout_1" };
OrtValue* output_tensor = NULL;
ORT_ABORT_ON_ERROR(OrtRun(session, NULL, input_names, (const OrtValue* const*)&input_tensor, 1, output_names, 1, &output_tensor));
assert(output_tensor != NULL);
assert(OrtIsTensor(output_tensor));
OrtReleaseValue(output_tensor);
OrtReleaseValue(input_tensor);
free(model_input);
return 0;
}
int test()
{
const wchar_t * model_path = L"squeezenet.onnx";
OrtEnv* env;
ORT_ABORT_ON_ERROR(OrtCreateEnv(ORT_LOGGING_LEVEL_WARNING, "test", &env));
OrtSessionOptions* session_option = OrtCreateSessionOptions();
OrtSession* session;
OrtSetSessionThreadPoolSize(session_option, 1);
ORT_ABORT_ON_ERROR(OrtCreateSession(env, model_path, session_option, &session));
OrtReleaseSessionOptions(session_option);
int result = run_inference(session);
OrtReleaseSession(session);
OrtReleaseEnv(env);
}
TEST_METHOD(TestMethod1)
{
int res = test();
Assert::AreEqual(res, 0);
}
};
}
| 38.905263
| 194
| 0.578193
|
wintersteiger
|
1bb70a7e6bccea9f5e2e401a1ecc9c9d92f17777
| 831
|
cp
|
C++
|
examples/trivial.cp
|
wxzh/CP
|
6ae36c7929cecc40a9ae15eed991ea1ddf7e8fe1
|
[
"BSD-3-Clause"
] | 11
|
2021-07-02T10:58:45.000Z
|
2022-02-10T02:36:17.000Z
|
examples/trivial.cp
|
wxzh/CP
|
6ae36c7929cecc40a9ae15eed991ea1ddf7e8fe1
|
[
"BSD-3-Clause"
] | null | null | null |
examples/trivial.cp
|
wxzh/CP
|
6ae36c7929cecc40a9ae15eed991ea1ddf7e8fe1
|
[
"BSD-3-Clause"
] | null | null | null |
--> "((4 + 3) - 3) = 4"
-- Examples in "The Expression Problem, Trivially!"
type IEval = {eval : Int};
lit (x : Int) = trait [self : IEval] => {
eval = x
};
add (e1 : IEval) (e2 : IEval) = trait => {
eval = e1.eval + e2.eval
};
sub (e1 : IEval) (e2 : IEval) = trait => {
eval = e1.eval - e2.eval
};
type IPrint = IEval & { print : String };
litP (x : Int) = trait [self : IPrint] inherits lit x => {
print = x.toString
};
addP (e1 : IPrint) (e2 : IPrint) = trait [self : IPrint] inherits add e1 e2 => {
print = "(" ++ e1.print ++ " + " ++ e2.print ++ ")"
};
subP (e1 : IPrint) (e2 : IPrint) = trait [self : IPrint] inherits sub e1 e2 => {
print = "(" ++ e1.print ++ " - " ++ e2.print ++ ")"
};
l1 = new litP 4;
l2 = new litP 3;
l3 = new addP l1 l2;
e = new subP l3 l2;
e.print ++ " = " ++ e.eval.toString
| 20.775
| 80
| 0.527076
|
wxzh
|
1bb94a4cbd40142becfef75ba634c24b9daa8d6f
| 11,244
|
hpp
|
C++
|
include/termox/widget/size_policy.hpp
|
a-n-t-h-o-n-y/MCurses
|
c9184a0fefbdc4eb9a044f815ee2270e6b8f202c
|
[
"MIT"
] | 284
|
2017-11-07T10:06:48.000Z
|
2021-01-12T15:32:51.000Z
|
include/termox/widget/size_policy.hpp
|
a-n-t-h-o-n-y/MCurses
|
c9184a0fefbdc4eb9a044f815ee2270e6b8f202c
|
[
"MIT"
] | 38
|
2018-01-14T12:34:54.000Z
|
2020-09-26T15:32:43.000Z
|
include/termox/widget/size_policy.hpp
|
a-n-t-h-o-n-y/MCurses
|
c9184a0fefbdc4eb9a044f815ee2270e6b8f202c
|
[
"MIT"
] | 31
|
2017-11-30T11:22:21.000Z
|
2020-11-03T05:27:47.000Z
|
#ifndef TERMOX_WIDGET_SIZE_POLICY_HPP
#define TERMOX_WIDGET_SIZE_POLICY_HPP
#include <limits>
#include <utility>
#include <signals_light/signal.hpp>
namespace ox {
/// Defines how a Layout should resize a Widget in one length Dimension.
class Size_policy {
private:
struct Data {
int hint = 0;
int min = 0;
int max = maximum_max;
double stretch = 1.;
bool can_ignore_min = true;
} data_;
public:
/// Emitted on any changes to the Size_policy.
sl::Signal<void()> policy_updated;
/// Largest possible value for max().
static auto constexpr maximum_max =
std::numeric_limits<decltype(data_.max)>::max();
public:
explicit Size_policy(int hint = 0,
int min = 0,
int max = maximum_max,
double stretch = 1.,
bool can_ignore_min = true);
/// Does not copy the Signal, so no slots are connected on copy init.
Size_policy(Size_policy const& x);
/// Does not move the Signal, so no slots are connected on move init.
Size_policy(Size_policy&& x);
/// Specifically does not copy the Signal, so Widget is still notified.
auto operator=(Size_policy const& x) -> Size_policy&;
/// Specifically does not copy the Signal, so Widget is still notified.
auto operator=(Size_policy&& x) -> Size_policy&;
friend auto operator==(Size_policy const& a, Size_policy const& b) -> bool;
friend auto operator!=(Size_policy const& a, Size_policy const& b) -> bool;
public:
/// Set the size hint, used as the initial value in calculations.
void hint(int value);
/// Return the size hint currently being used.
[[nodiscard]] auto hint() const -> int;
/// Set the minimum length that the owning Widget should be.
void min(int value);
/// Return the minimum length currently set.
[[nodiscard]] auto min() const -> int;
/// Set the maximum length/height that the owning Widget can be.
void max(int value);
/// Return the maximum length currently set.
[[nodiscard]] auto max() const -> int;
/// Set the stretch value, used to divide up space between sibling Widgets.
/** A ratio of stretch over siblings' stretch sum is used to give space. */
void stretch(double value);
/// Return the stretch value currently being used.
[[nodiscard]] auto stretch() const -> double;
/// Set if min can be ignored for the last displayed widget in a layout.
void can_ignore_min(bool enable);
/// Return if min can be ignored for the last displayed widget in a layout.
[[nodiscard]] auto can_ignore_min() const -> bool;
public:
/* _Helper Methods_ */
/// Fixed: \p hint is the only acceptable size.
[[nodiscard]] static auto fixed(int hint) -> Size_policy;
/// Minimum: \p hint is the minimum acceptable size, may be larger.
[[nodiscard]] static auto minimum(int hint) -> Size_policy;
/// Maximum: \p hint is the maximum acceptable size, may be smaller.
[[nodiscard]] static auto maximum(int hint) -> Size_policy;
/// Preferred: \p hint is preferred, though it can be any size.
[[nodiscard]] static auto preferred(int hint) -> Size_policy;
/// Expanding: \p hint is preferred, but it will expand to use extra space.
[[nodiscard]] static auto expanding(int hint) -> Size_policy;
/// Minimum Expanding: \p hint is minimum, it will expand into unused space.
[[nodiscard]] static auto minimum_expanding(int hint) -> Size_policy;
/// Ignored: Stretch is the only consideration.
[[nodiscard]] static auto ignored() -> Size_policy;
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Fixed_height : Widget_t {
template <typename... Args>
explicit Fixed_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::fixed(Hint);
}
explicit Fixed_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::fixed(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Fixed_width : Widget_t {
template <typename... Args>
explicit Fixed_width(Args&&... args) : Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::fixed(Hint);
}
explicit Fixed_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::fixed(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Minimum_height : Widget_t {
template <typename... Args>
explicit Minimum_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::minimum(Hint);
}
explicit Minimum_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::minimum(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Minimum_width : Widget_t {
template <typename... Args>
explicit Minimum_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::minimum(Hint);
}
explicit Minimum_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::minimum(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Maximum_height : Widget_t {
template <typename... Args>
explicit Maximum_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::maximum(Hint);
}
explicit Maximum_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::maximum(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Maximum_width : Widget_t {
template <typename... Args>
explicit Maximum_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::maximum(Hint);
}
explicit Maximum_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::maximum(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Preferred_height : Widget_t {
template <typename... Args>
explicit Preferred_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::preferred(Hint);
}
explicit Preferred_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::preferred(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Preferred_width : Widget_t {
template <typename... Args>
explicit Preferred_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::preferred(Hint);
}
explicit Preferred_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::preferred(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Expanding_height : Widget_t {
template <typename... Args>
explicit Expanding_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::expanding(Hint);
}
explicit Expanding_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::expanding(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Expanding_width : Widget_t {
template <typename... Args>
explicit Expanding_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::expanding(Hint);
}
explicit Expanding_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::expanding(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <int Hint, typename Widget_t>
struct Minimum_expanding_height : Widget_t {
template <typename... Args>
explicit Minimum_expanding_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::minimum_expanding(Hint);
}
explicit Minimum_expanding_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::minimum_expanding(Hint);
}
};
/// Wrapper type to set the width Size_policy at construction.
template <int Hint, typename Widget_t>
struct Minimum_expanding_width : Widget_t {
template <typename... Args>
explicit Minimum_expanding_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::minimum_expanding(Hint);
}
explicit Minimum_expanding_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::minimum_expanding(Hint);
}
};
/// Wrapper type to set the height Size_policy at construction.
template <typename Widget_t>
struct Ignored_height : Widget_t {
template <typename... Args>
explicit Ignored_height(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->height_policy = Size_policy::ignored();
}
explicit Ignored_height(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->height_policy = Size_policy::ignored();
}
};
/// Wrapper type to set the width Size_policy at construction.
template <typename Widget_t>
struct Ignored_width : Widget_t {
template <typename... Args>
explicit Ignored_width(Args&&... args)
: Widget_t{std::forward<Args>(args)...}
{
this->width_policy = Size_policy::ignored();
}
explicit Ignored_width(typename Widget_t::Parameters parameters)
: Widget_t{std::move(parameters)}
{
this->width_policy = Size_policy::ignored();
}
};
/// Return true if all members make sense in relation to eachother.
[[nodiscard]] auto is_valid(Size_policy const& p) -> bool;
} // namespace ox
#endif // TERMOX_WIDGET_SIZE_POLICY_HPP
| 32.217765
| 80
| 0.661864
|
a-n-t-h-o-n-y
|
1bb99b1e04b0d005b50d84b310cc0de09776e3ba
| 744
|
hpp
|
C++
|
meta/include/mgs/meta/concepts/semiregular.hpp
|
theodelrieu/mgs
|
965a95e3d539447cc482e915f9c44b3439168a4e
|
[
"BSL-1.0"
] | 24
|
2020-07-01T13:45:50.000Z
|
2021-11-04T19:54:47.000Z
|
meta/include/mgs/meta/concepts/semiregular.hpp
|
theodelrieu/mgs
|
965a95e3d539447cc482e915f9c44b3439168a4e
|
[
"BSL-1.0"
] | null | null | null |
meta/include/mgs/meta/concepts/semiregular.hpp
|
theodelrieu/mgs
|
965a95e3d539447cc482e915f9c44b3439168a4e
|
[
"BSL-1.0"
] | null | null | null |
#pragma once
#include <tuple>
#include <type_traits>
#include <mgs/meta/concepts/copyable.hpp>
#include <mgs/meta/concepts/default_constructible.hpp>
namespace mgs
{
namespace meta
{
template <typename T>
struct is_semiregular
{
using requirements = std::tuple<is_copyable<T>, is_default_constructible<T>>;
static constexpr auto const value =
is_copyable<T>::value && is_default_constructible<T>::value;
static constexpr int trigger_static_asserts()
{
static_assert(value, "T does not model meta::semiregular");
return 1;
}
};
template <typename T>
constexpr auto is_semiregular_v = is_semiregular<T>::value;
template <typename T, typename = std::enable_if_t<is_semiregular<T>::value>>
using semiregular = T;
}
}
| 21.257143
| 79
| 0.744624
|
theodelrieu
|
1bbd809ee611e01edbe1295f0f4754ea82585d00
| 22,392
|
cpp
|
C++
|
util/noise/fast_noise_2.cpp
|
Gamerfiend/godot_voxel
|
89762f43764f45d7a1e703ef9e4e750ecc0b0e88
|
[
"MIT"
] | null | null | null |
util/noise/fast_noise_2.cpp
|
Gamerfiend/godot_voxel
|
89762f43764f45d7a1e703ef9e4e750ecc0b0e88
|
[
"MIT"
] | null | null | null |
util/noise/fast_noise_2.cpp
|
Gamerfiend/godot_voxel
|
89762f43764f45d7a1e703ef9e4e750ecc0b0e88
|
[
"MIT"
] | 1
|
2021-11-09T14:18:03.000Z
|
2021-11-09T14:18:03.000Z
|
#include "fast_noise_2.h"
#include "../math/funcs.h"
#include <core/io/image.h>
using namespace zylann;
FastNoise2::FastNoise2() {
// Setup default
update_generator();
}
void FastNoise2::set_encoded_node_tree(String data) {
if (data != _last_set_encoded_node_tree) {
_last_set_encoded_node_tree = data;
emit_changed();
}
}
bool FastNoise2::is_valid() const {
return _generator.get() != nullptr;
}
String FastNoise2::get_encoded_node_tree() const {
// There is no way to get back an encoded node tree from `FastNoise::SmartNode<>`
return _last_set_encoded_node_tree;
}
FastNoise2::SIMDLevel FastNoise2::get_simd_level() const {
ERR_FAIL_COND_V(!is_valid(), SIMD_NULL);
return SIMDLevel(_generator->GetSIMDLevel());
}
String FastNoise2::get_simd_level_name(SIMDLevel level) {
switch (level) {
case SIMD_NULL:
return "Null";
case SIMD_SCALAR:
return "Scalar";
case SIMD_SSE:
return "SSE";
case SIMD_SSE2:
return "SSE2";
case SIMD_SSE3:
return "SSE3";
case SIMD_SSE41:
return "SSE41";
case SIMD_SSE42:
return "SSE42";
case SIMD_AVX:
return "AVX";
case SIMD_AVX2:
return "AVX2";
case SIMD_AVX512:
return "AVX512";
case SIMD_NEON:
return "NEON";
default:
ERR_PRINT(String("Unknown SIMD level {0}").format(varray(level)));
return "Error";
}
}
void FastNoise2::set_seed(int seed) {
if (_seed == seed) {
return;
}
_seed = seed;
emit_changed();
}
int FastNoise2::get_seed() const {
return _seed;
}
void FastNoise2::set_noise_type(NoiseType type) {
if (_noise_type == type) {
return;
}
_noise_type = type;
emit_changed();
}
FastNoise2::NoiseType FastNoise2::get_noise_type() const {
return _noise_type;
}
void FastNoise2::set_period(float p) {
if (p < 0.0001f) {
p = 0.0001f;
}
if (_period == p) {
return;
}
_period = p;
emit_changed();
}
float FastNoise2::get_period() const {
return _period;
}
void FastNoise2::set_fractal_octaves(int octaves) {
ERR_FAIL_COND(octaves <= 0);
if (octaves > MAX_OCTAVES) {
octaves = MAX_OCTAVES;
}
if (_fractal_octaves == octaves) {
return;
}
_fractal_octaves = octaves;
emit_changed();
}
void FastNoise2::set_fractal_type(FractalType type) {
if (_fractal_type == type) {
return;
}
_fractal_type = type;
emit_changed();
}
FastNoise2::FractalType FastNoise2::get_fractal_type() const {
return _fractal_type;
}
int FastNoise2::get_fractal_octaves() const {
return _fractal_octaves;
}
void FastNoise2::set_fractal_lacunarity(float lacunarity) {
if (_fractal_lacunarity == lacunarity) {
return;
}
_fractal_lacunarity = lacunarity;
emit_changed();
}
float FastNoise2::get_fractal_lacunarity() const {
return _fractal_lacunarity;
}
void FastNoise2::set_fractal_gain(float gain) {
if (_fractal_gain == gain) {
return;
}
_fractal_gain = gain;
emit_changed();
}
float FastNoise2::get_fractal_gain() const {
return _fractal_gain;
}
void FastNoise2::set_fractal_ping_pong_strength(float s) {
if (_fractal_ping_pong_strength == s) {
return;
}
_fractal_ping_pong_strength = s;
emit_changed();
}
float FastNoise2::get_fractal_ping_pong_strength() const {
return _fractal_ping_pong_strength;
}
void FastNoise2::set_terrace_enabled(bool enable) {
if (enable == _terrace_enabled) {
return;
}
_terrace_enabled = enable;
emit_changed();
}
bool FastNoise2::is_terrace_enabled() const {
return _terrace_enabled;
}
void FastNoise2::set_terrace_multiplier(float m) {
const float clamped_multiplier = math::max(m, 0.f);
if (clamped_multiplier == _terrace_multiplier) {
return;
}
_terrace_multiplier = clamped_multiplier;
emit_changed();
}
float FastNoise2::get_terrace_multiplier() const {
return _terrace_multiplier;
}
void FastNoise2::set_terrace_smoothness(float s) {
const float clamped_smoothness = math::max(s, 0.f);
if (_terrace_smoothness == clamped_smoothness) {
return;
}
_terrace_smoothness = clamped_smoothness;
emit_changed();
}
float FastNoise2::get_terrace_smoothness() const {
return _terrace_smoothness;
}
void FastNoise2::set_remap_enabled(bool enabled) {
if (enabled != _remap_enabled) {
_remap_enabled = enabled;
emit_changed();
}
}
bool FastNoise2::is_remap_enabled() const {
return _remap_enabled;
}
void FastNoise2::set_remap_input_min(float min_value) {
if (min_value != _remap_src_min) {
_remap_src_min = min_value;
emit_changed();
}
}
float FastNoise2::get_remap_input_min() const {
return _remap_src_min;
}
void FastNoise2::set_remap_input_max(float max_value) {
if (max_value != _remap_src_max) {
_remap_src_max = max_value;
emit_changed();
}
}
float FastNoise2::get_remap_input_max() const {
return _remap_src_max;
}
void FastNoise2::set_remap_output_min(float min_value) {
if (min_value != _remap_dst_min) {
_remap_dst_min = min_value;
emit_changed();
}
}
float FastNoise2::get_remap_output_min() const {
return _remap_dst_min;
}
void FastNoise2::set_remap_output_max(float max_value) {
if (max_value != _remap_dst_max) {
_remap_dst_max = max_value;
emit_changed();
}
}
float FastNoise2::get_remap_output_max() const {
return _remap_dst_max;
}
void FastNoise2::set_cellular_distance_function(CellularDistanceFunction cdf) {
if (cdf == _cellular_distance_function) {
return;
}
_cellular_distance_function = cdf;
emit_changed();
}
FastNoise2::CellularDistanceFunction FastNoise2::get_cellular_distance_function() const {
return _cellular_distance_function;
}
void FastNoise2::set_cellular_return_type(CellularReturnType rt) {
if (_cellular_return_type == rt) {
return;
}
_cellular_return_type = rt;
emit_changed();
}
FastNoise2::CellularReturnType FastNoise2::get_cellular_return_type() const {
return _cellular_return_type;
}
void FastNoise2::set_cellular_jitter(float jitter) {
jitter = math::clamp(jitter, 0.f, 1.f);
if (_cellular_jitter == jitter) {
return;
}
_cellular_jitter = jitter;
emit_changed();
}
float FastNoise2::get_cellular_jitter() const {
return _cellular_jitter;
}
float FastNoise2::get_noise_2d_single(Vector2 pos) const {
ERR_FAIL_COND_V(!is_valid(), 0.0);
return _generator->GenSingle2D(pos.x, pos.y, _seed);
}
float FastNoise2::get_noise_3d_single(Vector3 pos) const {
ERR_FAIL_COND_V(!is_valid(), 0.0);
return _generator->GenSingle3D(pos.x, pos.y, pos.z, _seed);
}
void FastNoise2::get_noise_2d_series(Span<const float> src_x, Span<const float> src_y, Span<float> dst) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(src_x.size() != src_y.size() || src_x.size() != dst.size());
_generator->GenPositionArray2D(dst.data(), dst.size(), src_x.data(), src_y.data(), 0, 0, _seed);
}
void FastNoise2::get_noise_3d_series(
Span<const float> src_x, Span<const float> src_y, Span<const float> src_z, Span<float> dst) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(src_x.size() != src_y.size() || src_x.size() != src_z.size() || src_x.size() != dst.size());
_generator->GenPositionArray3D(dst.data(), dst.size(), src_x.data(), src_y.data(), src_z.data(), 0, 0, 0, _seed);
}
void FastNoise2::get_noise_2d_grid(Vector2 origin, Vector2i size, Span<float> dst) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(size.x < 0 || size.y < 0);
ERR_FAIL_COND(dst.size() != size.x * size.y);
_generator->GenUniformGrid2D(dst.data(), origin.x, origin.y, size.x, size.y, 1.f, _seed);
}
void FastNoise2::get_noise_3d_grid(Vector3 origin, Vector3i size, Span<float> dst) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(!math::is_valid_size(size));
ERR_FAIL_COND(dst.size() != size.x * size.y * size.z);
_generator->GenUniformGrid3D(dst.data(), origin.x, origin.y, origin.z, size.x, size.y, size.z, 1.f, _seed);
}
void FastNoise2::get_noise_2d_grid_tileable(Vector2i size, Span<float> dst) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(size.x < 0 || size.y < 0);
ERR_FAIL_COND(dst.size() != size.x * size.y);
_generator->GenTileable2D(dst.data(), size.x, size.y, 1.f, _seed);
}
void FastNoise2::generate_image(Ref<Image> image, bool tileable) const {
ERR_FAIL_COND(!is_valid());
ERR_FAIL_COND(image.is_null());
std::vector<float> buffer;
buffer.resize(image->get_width() * image->get_height());
if (tileable) {
get_noise_2d_grid_tileable(Vector2i(image->get_width(), image->get_height()), to_span(buffer));
} else {
get_noise_2d_grid(Vector2(), Vector2i(image->get_width(), image->get_height()), to_span(buffer));
}
unsigned int i = 0;
for (int y = 0; y < image->get_height(); ++y) {
for (int x = 0; x < image->get_width(); ++x) {
#ifdef DEBUG_ENABLED
CRASH_COND(i >= buffer.size());
#endif
// Assuming -1..1 output. Some noise types can have different range though.
const float n = buffer[i] * 0.5f + 0.5f;
++i;
image->set_pixel(x, y, Color(n, n, n));
}
}
}
void FastNoise2::update_generator() {
if (_noise_type == TYPE_ENCODED_NODE_TREE) {
CharString cs = _last_set_encoded_node_tree.utf8();
_generator = FastNoise::NewFromEncodedNodeTree(cs.get_data());
ERR_FAIL_COND(!is_valid());
// TODO Maybe apply period modifier here?
// NoiseTool assumes we scale input coordinates so typical noise made in there has period 1...
return;
}
FastNoise::SmartNode<FastNoise::Generator> noise_node;
switch (_noise_type) {
case TYPE_OPEN_SIMPLEX_2:
noise_node = FastNoise::New<FastNoise::OpenSimplex2>();
break;
case TYPE_SIMPLEX:
noise_node = FastNoise::New<FastNoise::Simplex>();
break;
case TYPE_PERLIN:
noise_node = FastNoise::New<FastNoise::Perlin>();
break;
case TYPE_VALUE:
noise_node = FastNoise::New<FastNoise::Value>();
break;
case TYPE_CELLULAR: {
FastNoise::SmartNode<FastNoise::CellularDistance> cd = FastNoise::New<FastNoise::CellularDistance>();
cd->SetDistanceFunction(FastNoise::DistanceFunction(_cellular_distance_function));
cd->SetReturnType(FastNoise::CellularDistance::ReturnType(_cellular_return_type));
cd->SetJitterModifier(_cellular_jitter);
noise_node = cd;
} break;
default:
ERR_PRINT(String("Unknown noise type {0}").format(varray(_noise_type)));
return;
}
ERR_FAIL_COND(noise_node.get() == nullptr);
FastNoise::SmartNode<> generator_node = noise_node;
if (_period != 1.f) {
FastNoise::SmartNode<FastNoise::DomainScale> scale_node = FastNoise::New<FastNoise::DomainScale>();
scale_node->SetScale(1.f / _period);
scale_node->SetSource(generator_node);
generator_node = scale_node;
}
FastNoise::SmartNode<FastNoise::Fractal<>> fractal_node;
switch (_fractal_type) {
case FRACTAL_NONE:
break;
case FRACTAL_FBM:
fractal_node = FastNoise::New<FastNoise::FractalFBm>();
break;
case FRACTAL_PING_PONG: {
FastNoise::SmartNode<FastNoise::FractalPingPong> pp_node = FastNoise::New<FastNoise::FractalPingPong>();
pp_node->SetPingPongStrength(_fractal_ping_pong_strength);
fractal_node = pp_node;
} break;
case FRACTAL_RIDGED:
fractal_node = FastNoise::New<FastNoise::FractalRidged>();
break;
default:
ERR_PRINT(String("Unknown fractal type {0}").format(varray(_fractal_type)));
return;
}
if (fractal_node) {
fractal_node->SetGain(_fractal_gain);
fractal_node->SetLacunarity(_fractal_lacunarity);
fractal_node->SetOctaveCount(_fractal_octaves);
//fractal_node->SetWeightedStrength(_fractal_weighted_strength);
fractal_node->SetSource(generator_node);
generator_node = fractal_node;
}
if (_terrace_enabled) {
FastNoise::SmartNode<FastNoise::Terrace> terrace_node = FastNoise::New<FastNoise::Terrace>();
terrace_node->SetMultiplier(_terrace_multiplier);
terrace_node->SetSmoothness(_terrace_smoothness);
terrace_node->SetSource(generator_node);
generator_node = terrace_node;
}
if (_remap_enabled) {
FastNoise::SmartNode<FastNoise::Remap> remap_node = FastNoise::New<FastNoise::Remap>();
remap_node->SetRemap(_remap_src_min, _remap_src_max, _remap_dst_min, _remap_dst_max);
remap_node->SetSource(generator_node);
generator_node = remap_node;
}
ERR_FAIL_COND(generator_node.get() == nullptr);
_generator = generator_node;
}
zylann::math::Interval FastNoise2::get_estimated_output_range() const {
// TODO Optimize: better range analysis on FastNoise2
// Most noises should have known bounds like FastNoiseLite, but the node-graph nature of this library
// can make it difficult to calculate. Would be nice if the library could provide that out of the box.
if (is_remap_enabled()) {
return zylann::math::Interval(get_remap_output_min(), get_remap_output_max());
} else {
return zylann::math::Interval(-1.f, 1.f);
}
}
String FastNoise2::_b_get_simd_level_name(SIMDLevel level) {
return get_simd_level_name(level);
}
void FastNoise2::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_noise_type", "type"), &FastNoise2::set_noise_type);
ClassDB::bind_method(D_METHOD("get_noise_type"), &FastNoise2::get_noise_type);
ClassDB::bind_method(D_METHOD("set_seed", "seed"), &FastNoise2::set_seed);
ClassDB::bind_method(D_METHOD("get_seed"), &FastNoise2::get_seed);
ClassDB::bind_method(D_METHOD("set_period", "period"), &FastNoise2::set_period);
ClassDB::bind_method(D_METHOD("get_period"), &FastNoise2::get_period);
// ClassDB::bind_method(D_METHOD("set_warp_noise", "gradient_noise"), &FastNoise2::set_warp_noise);
// ClassDB::bind_method(D_METHOD("get_warp_noise"), &FastNoise2::get_warp_noise);
ClassDB::bind_method(D_METHOD("set_fractal_type", "type"), &FastNoise2::set_fractal_type);
ClassDB::bind_method(D_METHOD("get_fractal_type"), &FastNoise2::get_fractal_type);
ClassDB::bind_method(D_METHOD("set_fractal_octaves", "octaves"), &FastNoise2::set_fractal_octaves);
ClassDB::bind_method(D_METHOD("get_fractal_octaves"), &FastNoise2::get_fractal_octaves);
ClassDB::bind_method(D_METHOD("set_fractal_lacunarity", "lacunarity"), &FastNoise2::set_fractal_lacunarity);
ClassDB::bind_method(D_METHOD("get_fractal_lacunarity"), &FastNoise2::get_fractal_lacunarity);
ClassDB::bind_method(D_METHOD("set_fractal_gain", "gain"), &FastNoise2::set_fractal_gain);
ClassDB::bind_method(D_METHOD("get_fractal_gain"), &FastNoise2::get_fractal_gain);
ClassDB::bind_method(
D_METHOD("set_fractal_ping_pong_strength", "strength"), &FastNoise2::set_fractal_ping_pong_strength);
ClassDB::bind_method(D_METHOD("get_fractal_ping_pong_strength"), &FastNoise2::get_fractal_ping_pong_strength);
// ClassDB::bind_method(
// D_METHOD("set_fractal_weighted_strength", "strength"), &FastNoise2::set_fractal_weighted_strength);
// ClassDB::bind_method(D_METHOD("get_fractal_weighted_strength"), &FastNoise2::get_fractal_weighted_strength);
ClassDB::bind_method(D_METHOD("set_cellular_distance_function", "cell_distance_func"),
&FastNoise2::set_cellular_distance_function);
ClassDB::bind_method(D_METHOD("get_cellular_distance_function"), &FastNoise2::get_cellular_distance_function);
ClassDB::bind_method(D_METHOD("set_cellular_return_type", "return_type"), &FastNoise2::set_cellular_return_type);
ClassDB::bind_method(D_METHOD("get_cellular_return_type"), &FastNoise2::get_cellular_return_type);
ClassDB::bind_method(D_METHOD("set_cellular_jitter", "return_type"), &FastNoise2::set_cellular_jitter);
ClassDB::bind_method(D_METHOD("get_cellular_jitter"), &FastNoise2::get_cellular_jitter);
// ClassDB::bind_method(D_METHOD("set_rotation_type_3d", "type"), &FastNoiseLite::set_rotation_type_3d);
// ClassDB::bind_method(D_METHOD("get_rotation_type_3d"), &FastNoiseLite::get_rotation_type_3d);
ClassDB::bind_method(D_METHOD("set_terrace_enabled", "enabled"), &FastNoise2::set_terrace_enabled);
ClassDB::bind_method(D_METHOD("is_terrace_enabled"), &FastNoise2::is_terrace_enabled);
ClassDB::bind_method(D_METHOD("set_terrace_multiplier", "multiplier"), &FastNoise2::set_terrace_multiplier);
ClassDB::bind_method(D_METHOD("get_terrace_multiplier"), &FastNoise2::get_terrace_multiplier);
ClassDB::bind_method(D_METHOD("set_terrace_smoothness", "smoothness"), &FastNoise2::set_terrace_smoothness);
ClassDB::bind_method(D_METHOD("get_terrace_smoothness"), &FastNoise2::get_terrace_smoothness);
ClassDB::bind_method(D_METHOD("set_remap_enabled", "enabled"), &FastNoise2::set_remap_enabled);
ClassDB::bind_method(D_METHOD("is_remap_enabled"), &FastNoise2::is_remap_enabled);
ClassDB::bind_method(D_METHOD("set_remap_input_min", "min_value"), &FastNoise2::set_remap_input_min);
ClassDB::bind_method(D_METHOD("get_remap_input_min"), &FastNoise2::get_remap_input_min);
ClassDB::bind_method(D_METHOD("set_remap_input_max", "max_value"), &FastNoise2::set_remap_input_max);
ClassDB::bind_method(D_METHOD("get_remap_input_max"), &FastNoise2::get_remap_input_max);
ClassDB::bind_method(D_METHOD("set_remap_output_min", "min_value"), &FastNoise2::set_remap_output_min);
ClassDB::bind_method(D_METHOD("get_remap_output_min"), &FastNoise2::get_remap_output_min);
ClassDB::bind_method(D_METHOD("set_remap_output_max", "max_value"), &FastNoise2::set_remap_output_max);
ClassDB::bind_method(D_METHOD("get_remap_output_max"), &FastNoise2::get_remap_output_max);
ClassDB::bind_method(D_METHOD("set_encoded_node_tree", "code"), &FastNoise2::set_encoded_node_tree);
ClassDB::bind_method(D_METHOD("get_encoded_node_tree"), &FastNoise2::get_encoded_node_tree);
ClassDB::bind_method(D_METHOD("get_noise_2d_single", "pos"), &FastNoise2::get_noise_2d_single);
ClassDB::bind_method(D_METHOD("get_noise_3d_single", "pos"), &FastNoise2::get_noise_3d_single);
ClassDB::bind_method(D_METHOD("generate_image", "image", "tileable"), &FastNoise2::generate_image);
ClassDB::bind_method(D_METHOD("get_simd_level_name", "level"), &FastNoise2::_b_get_simd_level_name);
// ClassDB::bind_method(D_METHOD("_on_warp_noise_changed"), &FastNoiseLite::_on_warp_noise_changed);
ADD_PROPERTY(PropertyInfo(Variant::INT, "noise_type", PROPERTY_HINT_ENUM, NOISE_TYPE_HINT_STRING), "set_noise_type",
"get_noise_type");
ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "period", PROPERTY_HINT_RANGE, "0.0001,10000.0,0.1,exp"), "set_period",
"get_period");
// ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "warp_noise", PROPERTY_HINT_RESOURCE_TYPE, "FastNoiseLiteGradient"),
// "set_warp_noise", "get_warp_noise");
ADD_GROUP("Fractal", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fractal_type", PROPERTY_HINT_ENUM, FRACTAL_TYPE_HINT_STRING),
"set_fractal_type", "get_fractal_type");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fractal_octaves", PROPERTY_HINT_RANGE, vformat("1,%d,1", MAX_OCTAVES)),
"set_fractal_octaves", "get_fractal_octaves");
ADD_PROPERTY(
PropertyInfo(Variant::FLOAT, "fractal_lacunarity"), "set_fractal_lacunarity", "get_fractal_lacunarity");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fractal_gain"), "set_fractal_gain", "get_fractal_gain");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fractal_ping_pong_strength"), "set_fractal_ping_pong_strength",
"get_fractal_ping_pong_strength");
// ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fractal_weighted_strength"), "set_fractal_weighted_strength",
// "get_fractal_weighted_strength");
ADD_GROUP("Cellular", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cellular_distance_function", PROPERTY_HINT_ENUM,
CELLULAR_DISTANCE_FUNCTION_HINT_STRING),
"set_cellular_distance_function", "get_cellular_distance_function");
ADD_PROPERTY(
PropertyInfo(Variant::INT, "cellular_return_type", PROPERTY_HINT_ENUM, CELLULAR_RETURN_TYPE_HINT_STRING),
"set_cellular_return_type", "get_cellular_return_type");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cellular_jitter", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"),
"set_cellular_jitter", "get_cellular_jitter");
ADD_GROUP("Terrace", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "terrace_enabled"), "set_terrace_enabled", "is_terrace_enabled");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "terrace_multiplier", PROPERTY_HINT_RANGE, "0.0,100.0,0.1"),
"set_terrace_multiplier", "get_terrace_multiplier");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "terrace_smoothness", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"),
"set_terrace_smoothness", "get_terrace_smoothness");
ADD_GROUP("Remap", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "remap_enabled"), "set_remap_enabled", "is_remap_enabled");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "remap_input_min"), "set_remap_input_min", "get_remap_input_min");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "remap_input_max"), "set_remap_input_max", "get_remap_input_max");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "remap_output_min"), "set_remap_output_min", "get_remap_output_min");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "remap_output_max"), "set_remap_output_max", "get_remap_output_max");
ADD_GROUP("Advanced", "");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "encoded_node_tree"), "set_encoded_node_tree", "get_encoded_node_tree");
// ADD_PROPERTY(
// PropertyInfo(Variant::INT, "rotation_type_3d", PROPERTY_HINT_ENUM, "None,ImproveXYPlanes,ImproveXZPlanes"),
// "set_rotation_type_3d", "get_rotation_type_3d");
BIND_ENUM_CONSTANT(TYPE_OPEN_SIMPLEX_2);
BIND_ENUM_CONSTANT(TYPE_SIMPLEX);
BIND_ENUM_CONSTANT(TYPE_PERLIN);
BIND_ENUM_CONSTANT(TYPE_VALUE);
BIND_ENUM_CONSTANT(TYPE_CELLULAR);
BIND_ENUM_CONSTANT(TYPE_ENCODED_NODE_TREE);
BIND_ENUM_CONSTANT(FRACTAL_NONE);
BIND_ENUM_CONSTANT(FRACTAL_FBM);
BIND_ENUM_CONSTANT(FRACTAL_RIDGED);
BIND_ENUM_CONSTANT(FRACTAL_PING_PONG);
// BIND_ENUM_CONSTANT(ROTATION_3D_NONE);
// BIND_ENUM_CONSTANT(ROTATION_3D_IMPROVE_XY_PLANES);
// BIND_ENUM_CONSTANT(ROTATION_3D_IMPROVE_XZ_PLANES);
BIND_ENUM_CONSTANT(CELLULAR_DISTANCE_EUCLIDEAN);
BIND_ENUM_CONSTANT(CELLULAR_DISTANCE_EUCLIDEAN_SQ);
BIND_ENUM_CONSTANT(CELLULAR_DISTANCE_MANHATTAN);
BIND_ENUM_CONSTANT(CELLULAR_DISTANCE_HYBRID);
BIND_ENUM_CONSTANT(CELLULAR_DISTANCE_MAX_AXIS);
BIND_ENUM_CONSTANT(CELLULAR_RETURN_INDEX_0);
BIND_ENUM_CONSTANT(CELLULAR_RETURN_INDEX_0_ADD_1);
BIND_ENUM_CONSTANT(CELLULAR_RETURN_INDEX_0_SUB_1);
BIND_ENUM_CONSTANT(CELLULAR_RETURN_INDEX_0_MUL_1);
BIND_ENUM_CONSTANT(CELLULAR_RETURN_INDEX_0_DIV_1);
BIND_ENUM_CONSTANT(SIMD_NULL);
BIND_ENUM_CONSTANT(SIMD_SCALAR);
BIND_ENUM_CONSTANT(SIMD_SSE);
BIND_ENUM_CONSTANT(SIMD_SSE2);
BIND_ENUM_CONSTANT(SIMD_SSE3);
BIND_ENUM_CONSTANT(SIMD_SSSE3);
BIND_ENUM_CONSTANT(SIMD_SSE41);
BIND_ENUM_CONSTANT(SIMD_SSE42);
BIND_ENUM_CONSTANT(SIMD_AVX);
BIND_ENUM_CONSTANT(SIMD_AVX2);
BIND_ENUM_CONSTANT(SIMD_AVX512);
BIND_ENUM_CONSTANT(SIMD_NEON);
}
| 33.222552
| 117
| 0.764871
|
Gamerfiend
|
1bc2169b0fae36fcbf038021ccf31bd8e0caad24
| 1,338
|
cpp
|
C++
|
k-concatenation.cpp
|
sagar-sam/codechef-solutions
|
ea414d17435f0cfbc84b0c6b172ead0b22f32a23
|
[
"MIT"
] | null | null | null |
k-concatenation.cpp
|
sagar-sam/codechef-solutions
|
ea414d17435f0cfbc84b0c6b172ead0b22f32a23
|
[
"MIT"
] | null | null | null |
k-concatenation.cpp
|
sagar-sam/codechef-solutions
|
ea414d17435f0cfbc84b0c6b172ead0b22f32a23
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
long long int maxSubArraySum(vector<long long int> a, int size)
{
long long int max_so = INT_MIN, max_here = 0;
for (int i = 0; i < size; i++)
{
max_here = max_here + a[i];
if (max_so < max_here)
max_so = max_here;
if (max_here < 0)
max_here = 0;
}
return max_so;
}
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n,k;
scanf("%d%d",&n,&k);
vector<long long int> vec(n);
long long int sum=0;
for(int i=0;i<n;i++)
{
scanf("%lld",&vec[i]);
sum+=vec[i];
}
if(k==1)
{
long long int ans=maxSubArraySum(vec,n);
printf("%lld\n",ans);
continue;
}
for(int i=0;i<n;i++)
{
vec.push_back(vec[i]);
}
long long int ind=-1;
long long int max_so = INT_MIN, max_here = 0;
for (int i = 0; i < 2*n; i++)
{
max_here = max_here + vec[i];
if (max_so < max_here)
{
ind=i;
max_so = max_here;
}
if (max_here < 0)
max_here = 0;
}
// return max_so;
// long long int sub=maxSubArraySum(vec,2*n);
long long int ans=max_so;
if(sum>0)
{
if(ind<n)
ans=ans+(k-1)*sum;
else if(ind>=n)
ans=ans+(k-2)*sum;
}
printf("%lld\n",ans);
}
}
| 16.936709
| 63
| 0.508221
|
sagar-sam
|
1bc44872ad4dbb28db93baf55b78b9654d0d8727
| 1,502
|
cpp
|
C++
|
core/src/special/StubModule.cpp
|
azuki-monster/megamol
|
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
|
[
"BSD-3-Clause"
] | 2
|
2020-10-16T10:15:37.000Z
|
2021-01-21T13:06:00.000Z
|
core/src/special/StubModule.cpp
|
azuki-monster/megamol
|
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
|
[
"BSD-3-Clause"
] | null | null | null |
core/src/special/StubModule.cpp
|
azuki-monster/megamol
|
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
|
[
"BSD-3-Clause"
] | 1
|
2021-01-28T01:19:54.000Z
|
2021-01-28T01:19:54.000Z
|
/*
* StubModule.cpp
* Copyright (C) 2017 by MegaMol Team
* All rights reserved. Alle Rechte vorbehalten.
*/
#include "stdafx.h"
#include "mmcore/special/StubModule.h"
#include "mmcore/CoreInstance.h"
#include "mmcore/factories/CallAutoDescription.h"
using namespace megamol;
using namespace megamol::core;
special::StubModule::StubModule(void) : Module(),
inSlot("inSlot", "Inbound call"),
outSlot("outSlot", "Outbound call") {
}
special::StubModule::~StubModule(void) {
this->Release();
}
bool special::StubModule::create(void) {
for (auto cd : this->GetCoreInstance()->GetCallDescriptionManager()) {
this->inSlot.SetCompatibleCall(cd);
for (unsigned int idx = 0; idx < cd->FunctionCount(); idx++) {
this->outSlot.SetCallback(cd->ClassName(), cd->FunctionName(idx), &StubModule::stub);
}
}
this->MakeSlotAvailable(&this->inSlot);
this->MakeSlotAvailable(&this->outSlot);
return true;
}
void special::StubModule::release(void) {
}
bool megamol::core::special::StubModule::stub(Call& c) {
auto call = this->inSlot.CallAs<Call>();
for (auto cd : this->GetCoreInstance()->GetCallDescriptionManager()) {
if (cd->IsDescribing(call)) {
for (unsigned int idx = 0; idx < cd->FunctionCount(); idx++) {
try {
this->inSlot.Call(idx);
} catch (...) {
return false;
}
}
}
}
return true;
}
| 23.107692
| 97
| 0.607856
|
azuki-monster
|
1bc56930af11b6dbcfa066e65d385182c33ea84a
| 8,253
|
cpp
|
C++
|
examples/main.cpp
|
mgienger/ESLib
|
aee404104c99b95e2070b632ff2d8210f5cc6941
|
[
"BSD-3-Clause"
] | 6
|
2018-12-18T19:30:58.000Z
|
2021-03-11T15:52:14.000Z
|
examples/main.cpp
|
mgienger/ESLib
|
aee404104c99b95e2070b632ff2d8210f5cc6941
|
[
"BSD-3-Clause"
] | 3
|
2019-03-29T21:11:28.000Z
|
2019-08-15T19:45:27.000Z
|
examples/main.cpp
|
mgienger/ESLib
|
aee404104c99b95e2070b632ff2d8210f5cc6941
|
[
"BSD-3-Clause"
] | 2
|
2019-01-24T16:07:12.000Z
|
2020-07-15T18:39:33.000Z
|
/*******************************************************************************
Copyright (c) 2017, Honda Research Institute Europe GmbH.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#include "EventRegistry.h"
#include "EventQueue.h"
#include "EventSystem.h"
#include "test_subscriptiononly.h"
#include <iostream>
using namespace std;
void event1_handler1(const std::string& strArg)
{
cout << "event1_handler1 got " << strArg << endl;
}
void string_stealer(std::string&& strArg)
{
std::string stolen(std::move(strArg));
cout << "string_stealer got " << stolen << endl;
cout << "=> Arg is now " << strArg << endl;
}
void event1_handler2(std::string strArg)
{
cout << "event1_handler2 got " << strArg << endl;
}
void event1_handler_temp(std::string strArg)
{
cout << "event1_handler_temp got " << strArg << endl;
}
void event2_handler1(int intArg)
{
cout << "event2_handler1 got " << intArg << endl;
}
struct Foo
{
void event2_handler2(int intArg)
{
cout << "event2_handler2 got " << intArg << endl;
}
void const_handler(int intArg) const {
cout << "const_handler got " << intArg << endl;
}
void const_arg_handler(const std::string& strArg) {
cout << "const_arg_handler got " << strArg << endl;
}
};
struct Parent {
virtual ~Parent() = default;
virtual void inherited_handler(int intArg) {
cout << classname() << " got " << intArg << endl;
}
virtual const char* classname() const {
return "Parent";
}
void overloaded_handler(std::string strArg) {
cout << "overloaded_handler(string) got " << strArg << endl;
}
void overloaded_handler(int intArg) {
cout << "overloaded_handler(int) got " << intArg << endl;
}
};
struct Child : public Parent {
virtual const char* classname() const {
return "Child";
}
};
void event3_handler1(int intArg, double doubleArg)
{
cout << "event3_handler1 got " << intArg << " and " << doubleArg << endl;
}
void const_pointer_handler(const char* str) {
cout << "const_pointer_handler got " << str << endl;
}
void pointer_handler(char* str) {
cout << "pointer_handler got " << str << endl;
}
bool returning_handler(int param) {
cout << "returning_handler got " << param << endl;
return true;
}
int main()
{
size_t nErrors = 0;
// create event system
ES::EventRegistry es;
// register events
auto event1 = es.registerEvent<std::string>("event1");
event1->addSubscriber(event1_handler1);
event1->addSubscriber(string_stealer);
event1->addSubscriber(event1_handler2);
cout << event1->getHandlerCount() << endl;
event1->call("A text");
// try getting handler list
auto event1ref2 = es.getSubscribers<std::string>("event1");
event1ref2->call("A text 2");
auto event2 = es.registerEvent<int>("event2");
event2->addSubscriber(event2_handler1);
Foo foo;
event2->addSubscriber(&Foo::event2_handler2, &foo);
event2->addSubscriber(&Foo::const_handler, const_cast<const Foo*>(&foo));
event1->addSubscriber(&Foo::const_arg_handler, &foo);
auto event3 = es.registerEvent<int, double>("event3");
event3->addSubscriber(event3_handler1);
event3->call(3, 3.5);
// with return value
event2->addSubscriber(returning_handler, ES::ignore_result);
// event queue
{
ES::EventQueue queue;
queue.enqueue<std::string>(event1, "Hello");
queue.enqueue(event2, 42);
queue.enqueue<std::string>(event1, "World");
// fire them
// queue.process();
cout << "=== First queued event ===" << endl;
queue.processOne();
cout << "=== Second queued event ===" << endl;
queue.processOne();
cout << "=== Third queued event ===" << endl;
queue.processOne();
cout << "Has more events: " << boolalpha << queue.processOne() << endl;
queue.enqueue<std::string>(event1, "Unhandled");
}
// test subscriber handles
ES::SubscriptionHandle handle = event1->addSubscriber(event1_handler_temp);
event1->call("With temp");
cout << "Subscribed before release: " << boolalpha << handle.isSubscribed() << endl;
release_subscription(handle);
cout << "Subscribed after release: " << boolalpha << handle.isSubscribed() << endl;
event1->call("Without temp");
// the same with subscription
{
ES::ScopedSubscription subs = event1->addSubscriber(event1_handler_temp);
event1->call("With temp");
}
event1->call("Without temp");
{
// Test stuff with event system
cout << endl;
ES::EventSystem es;
es.registerEvent<int>("TestEvent");
Parent parent;
es.subscribe("TestEvent", &Parent::inherited_handler, &parent);
es.subscribe<int>("TestEvent", &Parent::overloaded_handler, &parent);
Child child;
es.subscribe("TestEvent", &Parent::inherited_handler, &child);
es.subscribe("TestEvent", event2_handler1);
// test lambda with capture param
es.subscribe("TestEvent", [child](int param){
cout << "Lambda capturing "<< child.classname() <<" got " << param << endl;
});
// test constness
es.registerEvent<std::string>("StrEvent");
try {
es.subscribe("StrEvent", event1_handler1);
} catch (std::exception& ex) {
nErrors++;
cout << "Error adding StrEvent handler: " << ex.what() << endl;
}
es.subscribe<std::string>("StrEvent", &Parent::overloaded_handler, &parent);
es.publish<std::string>("StrEvent", "Test");
es.registerEvent<char*>("ConstEvent");
es.subscribe<char*>("ConstEvent", const_pointer_handler);
es.subscribe("ConstEvent", pointer_handler);
char nonConstChar[6] = "Hello";
es.publish("ConstEvent", nonConstChar);
es.publish("TestEvent", 1);
es.process();
// test processing single event
es.publish("TestEvent", 1);
es.publish<std::string>("StrEvent", "Str1");
es.publish("TestEvent", 2);
es.publish<std::string>("StrEvent", "Str2");
es.processNamed("StrEvent");
es.process();
}
// Test stuff with arg parsing
cout << endl;
size_t paramCount = event3->getParametersParser()->getParameterCount();
cout << "Param count: " << paramCount << endl;
if (paramCount != 2)
{
nErrors++;
}
bool isInt = (event3->getParametersParser()->getParameterType(0) == ES::ParameterType::INT);
cout << "Param #1 type is int: " << isInt << endl;
if (!isInt)
{
nErrors++;
}
// test with parsed args
event3->getParametersParser()->callEvent({"10", "2.5"});
auto event4 = es.registerEvent<bool>("event4");
event4->addSubscriber([](bool arg) {cout << "Boolean value: " << boolalpha << arg << endl;});
event4->getParametersParser()->callEvent({"True"});
event4->getParametersParser()->callEvent({"fAlSe"});
es.print(cout);
cout << endl << "Test revealed " << nErrors << " errors" << endl;
return 0;
}
| 28.167235
| 95
| 0.662305
|
mgienger
|
1bc7f1a5e3bf3a4caff23f962427d01b0817adf6
| 458
|
hh
|
C++
|
src/common/geometry/hyperbolic/plane.hh
|
danieldeankon/hypertrace
|
d58a6ea28af45b875c477df4065667e9b4b88a49
|
[
"MIT"
] | null | null | null |
src/common/geometry/hyperbolic/plane.hh
|
danieldeankon/hypertrace
|
d58a6ea28af45b875c477df4065667e9b4b88a49
|
[
"MIT"
] | null | null | null |
src/common/geometry/hyperbolic/plane.hh
|
danieldeankon/hypertrace
|
d58a6ea28af45b875c477df4065667e9b4b88a49
|
[
"MIT"
] | null | null | null |
#pragma once
#include <algebra/quaternion.hh>
#include <object.hh>
#include <material.hh>
#include "ray.hh"
#define HYPLANE_TILING_NONE 0
#define HYPLANE_TILING_PENTAGONAL 1
#define HYPLANE_TILING_PENTASTAR 2
bool hyplane_hit(
const Object *plane, ObjectHit *cache,
PathInfo *path, HyRay ray
);
void hyplane_bounce(
const Object *plane, const ObjectHit *cache,
quaternion *hit_dir, quaternion *normal,
Material *material
);
| 18.32
| 48
| 0.733624
|
danieldeankon
|
1bd265e68b13112210d9ff7960e5d4dd56674dd0
| 1,623
|
cpp
|
C++
|
codeforces/175b.plane-of-tanks-pro/175b.cpp
|
KayvanMazaheri/acm
|
aeb05074bc9b9c92f35b6a741183da09a08af85d
|
[
"MIT"
] | 3
|
2018-01-19T14:09:23.000Z
|
2018-02-01T00:40:55.000Z
|
codeforces/175b.plane-of-tanks-pro/175b.cpp
|
KayvanMazaheri/acm
|
aeb05074bc9b9c92f35b6a741183da09a08af85d
|
[
"MIT"
] | null | null | null |
codeforces/175b.plane-of-tanks-pro/175b.cpp
|
KayvanMazaheri/acm
|
aeb05074bc9b9c92f35b6a741183da09a08af85d
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <algorithm>
#include <vector>
#define X first
#define Y second
#define EPS ((double)1e-8)
using namespace std;
struct player
{
string name;
int point;
int better, not_worse;
};
vector <player> vec;
vector <pair <string, string> > result;
int is_in_vec(string name)
{
for(int i=0; i<vec.size(); i++)
if (vec[i].name == name)
return i;
return -1;
}
int main()
{
int n;
cin >> n;
for(int i=0; i<n; i++)
{
string name;
int point;
cin >> name >> point;
if (is_in_vec(name) == -1)
{
player buff;
buff.name = name;
buff.point = point;
buff.not_worse = 0;
buff.better = 0;
vec.push_back(buff);
}
else
vec[is_in_vec(name)].point = max (point, vec[is_in_vec(name)].point);
}
n = vec.size();
for(int i=0; i<n; i++)
for(int j=0; j<n; j++)
((vec[j].point > vec[i].point)? vec[i].better : vec[i].not_worse ) ++;
for(int i=0; i<n; i++)
{
//swap(vec[i].not_worse, vec[i].better);
pair <string, string> buff;
buff.Y = vec[i].name ;
if (50 * n < 100 * vec[i].better)
buff.X = "noob";
else if ((50 * n <= 100 * vec[i].not_worse)&&(20 * n < 100 * vec[i].better))
buff.X = "random";
else if ((80 * n <= 100 * vec[i].not_worse)&&(10 * n < 100 * vec[i].better))
buff.X = "average";
else if ((90 * n <= 100 * vec[i].not_worse)&&(1 * n < 100 * vec[i].better))
buff.X = "hardcore";
else if (99 * n <= 100 * vec[i].not_worse)
buff.X = "pro";
result.push_back(buff);
}
sort (result.begin(), result.end());
cout << n << endl;
for(int i=0; i<n; i++)
cout << result[i].Y << " " << result[i].X << endl;
cout << endl;
}
| 20.544304
| 78
| 0.566852
|
KayvanMazaheri
|
1bd3e07889fae7cc84ce637319a07484723a3b68
| 1,017
|
hh
|
C++
|
src/server.hh
|
fusion32/kaplar
|
c85fc3cfd020b4c7892f9987239cb48eaf1a04a5
|
[
"MIT"
] | null | null | null |
src/server.hh
|
fusion32/kaplar
|
c85fc3cfd020b4c7892f9987239cb48eaf1a04a5
|
[
"MIT"
] | null | null | null |
src/server.hh
|
fusion32/kaplar
|
c85fc3cfd020b4c7892f9987239cb48eaf1a04a5
|
[
"MIT"
] | 2
|
2018-08-20T00:59:07.000Z
|
2018-08-20T00:59:18.000Z
|
#ifndef KAPLAR_SERVER_HH_
#define KAPLAR_SERVER_HH_ 1
#include "common.hh"
// ----------------------------------------------------------------
// Server
// ----------------------------------------------------------------
enum ConnectionStatus : u32 {
CONNECTION_STATUS_ALIVE = 0,
CONNECTION_STATUS_CLOSING,
};
typedef void (*OnAccept)(void *userdata, u32 index);
typedef void (*OnDrop)(void *userdata, u32 index);
typedef void (*OnRead)(void *userdata, u32 index, u8 *data, i32 datalen);
typedef void (*RequestOutput)(void *userdata, u32 index, u8 **output, i32 *output_len);
typedef void (*RequestStatus)(void *userdata, u32 index, ConnectionStatus *out_status);
struct ServerParams{
u16 port;
u16 max_connections;
u16 readbuf_size;
OnAccept on_accept;
OnDrop on_drop;
OnRead on_read;
RequestOutput request_output;
RequestStatus request_status;
};
struct Server;
Server *server_init(MemArena *arena, ServerParams *params);
void server_poll(Server *server, void *userdata);
#endif // KAPLAR_SERVER_HH_
| 29.057143
| 87
| 0.668633
|
fusion32
|
1bd94d73ac682aa309d74778f64f754b9b2f7e96
| 1,875
|
cpp
|
C++
|
DinoLasers/UIButton.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
DinoLasers/UIButton.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
DinoLasers/UIButton.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
#include "UIButton.h"
UIButton::UIButton(String name, vector3 c1, vector3 c2) : UI(name)
{
color1 = c1;
color2 = c2;
paddX = 0;
paddY = 0;
invisiblePadY = 0;
isInside = false;
}
UIButton::~UIButton()
{
}
void UIButton::Update(float dt) {
//&& x < (paddX + UI::GetName().length()) * TEXT_SIZE && y < (paddY + 3) * TEXT_SIZE
//&& y > paddY * TEXT_SIZE
int x = sf::Mouse::getPosition().x - SystemSingleton::GetInstance()->GetWindowX();
int y = sf::Mouse::getPosition().y - SystemSingleton::GetInstance()->GetWindowY();
//std::cout << x << " " << paddX * TEXT_SIZE << " " << ((paddX + UI::GetName().length() * 3)) << "\n";
//std::cout << y << " " << (paddY * 3 * TEXT_SIZE) << " " << ((paddY + 1) * 3 * TEXT_SIZE) << "\n\n";
//x > (paddX + UI::GetName().length())* TEXT_SIZE && x < (paddX + UI::GetName().length() * 3) * TEXT_SIZE
if (y > ((paddY - 1 + invisiblePadY) * 3 * TEXT_SIZE) && y < ((paddY + invisiblePadY) * 3 * TEXT_SIZE) && x >(paddX + UI::GetName().length())* TEXT_SIZE && x < (paddX + UI::GetName().length() * 3) * TEXT_SIZE) {
isInside = true;
} else {
isInside = false;
}
}
bool UIButton::IsPressed(){
if (isInside) {
return sf::Mouse::isButtonPressed(sf::Mouse::Button::Left);
}
return false;
}
void UIButton::Render() {
String padding = "";
for (int y = 0; y < paddY; y++) {
padding += "\n";
}
for (int x = 0; x < paddX; x++) {
padding += " ";
}
//MeshManagerSingleton::GetInstance()->AddLineToRenderList(vector3(paddX * TEXT_SIZE, paddY * TEXT_SIZE, 0.0f), vector3((paddX + UI::GetName().size()) * TEXT_SIZE, (paddY + 1) * TEXT_SIZE, 0.0f));
MeshManagerSingleton::GetInstance()->PrintLine(padding+UI::GetName() , isInside?color2:color1);
}
void UIButton::SetPaddingX(uint pX) { paddX = pX; }
void UIButton::SetPaddingY(uint pY) { paddY = pY; }
void UIButton::SetInvisiblePaddingY(uint pY) { invisiblePadY = pY; }
| 32.327586
| 212
| 0.609067
|
QRayarch
|
1be347460691edb89bcfb1828ef9927d59a3cd21
| 4,052
|
cpp
|
C++
|
src/main.cpp
|
Bolukan/AOC2019
|
d91f8ba22cb5f4a08528e6087b15d87170f9f267
|
[
"MIT"
] | null | null | null |
src/main.cpp
|
Bolukan/AOC2019
|
d91f8ba22cb5f4a08528e6087b15d87170f9f267
|
[
"MIT"
] | null | null | null |
src/main.cpp
|
Bolukan/AOC2019
|
d91f8ba22cb5f4a08528e6087b15d87170f9f267
|
[
"MIT"
] | null | null | null |
#include <Arduino.h>
// WiFi
#include <ESP8266WiFi.h>
#include "secrets.h"
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <FS.h>
#include <dayAOC201901.h>
#define APP_NAME "Advent of Code 2019"
#define FILENAME "/input201901"
// wifi
#ifndef SECRETS_H
#define SECRETS_H
const char WIFI_SSID[] = "*** WIFI SSID ***";
const char WIFI_PASSWORD[] = "*** WIFI PASSWORD ***";
#endif
// ************************************ FUNCTION *******************************
// *********************************** WIFI **********************************
// More events: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h
void onSTAConnected(WiFiEventStationModeConnected e /*String ssid, uint8 bssid[6], uint8 channel*/)
{
Serial.printf("WiFi Connected: SSID %s @ BSSID %.2X:%.2X:%.2X:%.2X:%.2X:%.2X Channel %d\n",
e.ssid.c_str(), e.bssid[0], e.bssid[1], e.bssid[2], e.bssid[3], e.bssid[4], e.bssid[5], e.channel);
}
void onSTADisconnected(WiFiEventStationModeDisconnected e /*String ssid, uint8 bssid[6], WiFiDisconnectReason reason*/)
{
Serial.printf("WiFi Disconnected: SSID %s BSSID %.2X:%.2X:%.2X:%.2X:%.2X:%.2X Reason %d\n",
e.ssid.c_str(), e.bssid[0], e.bssid[1], e.bssid[2], e.bssid[3], e.bssid[4], e.bssid[5], e.reason);
// Reason: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiType.h
}
void onSTAGotIP(WiFiEventStationModeGotIP e /*IPAddress ip, IPAddress mask, IPAddress gw*/)
{
Serial.printf("WiFi GotIP: localIP %s SubnetMask %s GatewayIP %s\n",
e.ip.toString().c_str(), e.mask.toString().c_str(), e.gw.toString().c_str());
}
void SetupWiFi()
{
static WiFiEventHandler e1, e2, e4;
// WiFi events
e1 = WiFi.onStationModeConnected(onSTAConnected);
e2 = WiFi.onStationModeDisconnected(onSTADisconnected);
e4 = WiFi.onStationModeGotIP(onSTAGotIP);
WiFi.mode(WIFI_STA);
WiFi.setAutoConnect(false); // do not automatically connect on power on to the last used access point
WiFi.setAutoReconnect(true); // attempt to reconnect to an access point in case it is disconnected
WiFi.persistent(false); // Store no SSID/PASSWORD in flash
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
}
// *********************************** OTA ***********************************
void OTAonStart()
{
String type;
if (ArduinoOTA.getCommand() == U_FLASH)
{
type = "sketch";
}
else
{ // U_SPIFFS
type = "filesystem";
}
// NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
Serial.println("OTA Start. Type: " + type);
}
void OTAonEnd()
{
Serial.println("\nOTA End");
}
void OTAonProgress(unsigned int progress, unsigned int total)
{
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
};
void OTAonError(ota_error_t error)
{
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR)
{
Serial.println("Auth Failed");
}
else if (error == OTA_BEGIN_ERROR)
{
Serial.println("Begin Failed");
}
else if (error == OTA_CONNECT_ERROR)
{
Serial.println("Connect Failed");
}
else if (error == OTA_RECEIVE_ERROR)
{
Serial.println("Receive Failed");
}
else if (error == OTA_END_ERROR)
{
Serial.println("End Failed");
}
};
void SetupOTA()
{
char hostname[12];
sprintf(hostname, "esp-%06x", ESP.getChipId());
ArduinoOTA.setHostname(hostname);
ArduinoOTA.onStart(OTAonStart);
ArduinoOTA.onEnd(OTAonEnd);
ArduinoOTA.onProgress(OTAonProgress);
ArduinoOTA.onError(OTAonError);
ArduinoOTA.begin();
}
// *********************************** ... ***********************************
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println(APP_NAME);
SetupWiFi();
SetupOTA();
DayAOC201901 day(FILENAME);
day.Part1();
day.Part2();
}
void loop()
{
ArduinoOTA.handle();
}
| 27.753425
| 120
| 0.606367
|
Bolukan
|
1be4982b0eadd62cf3383db7ab05562de1ffb1a1
| 857
|
hpp
|
C++
|
tsplp/src/SeparationAlgorithms.hpp
|
sebrockm/mtsp-vrp
|
28955855d253f51fcb9397a0b22c6774f66f8d55
|
[
"MIT"
] | null | null | null |
tsplp/src/SeparationAlgorithms.hpp
|
sebrockm/mtsp-vrp
|
28955855d253f51fcb9397a0b22c6774f66f8d55
|
[
"MIT"
] | null | null | null |
tsplp/src/SeparationAlgorithms.hpp
|
sebrockm/mtsp-vrp
|
28955855d253f51fcb9397a0b22c6774f66f8d55
|
[
"MIT"
] | null | null | null |
#pragma once
#include <optional>
#include <xtensor/xtensor.hpp>
namespace tsplp
{
class LinearConstraint;
class Model;
class Variable;
class WeightManager;
}
namespace tsplp::graph
{
class PiSigmaSupportGraph;
class Separator
{
private:
const xt::xtensor<Variable, 3>& m_variables;
const WeightManager& m_weightManager;
const Model& m_model;
std::unique_ptr<PiSigmaSupportGraph> m_spSupportGraph;
public:
Separator(const xt::xtensor<Variable, 3>& variables, const WeightManager& weightManager, const Model& model);
~Separator() noexcept;
std::optional<LinearConstraint> Ucut() const;
std::optional<LinearConstraint> Pi() const;
std::optional<LinearConstraint> Sigma() const;
std::optional<LinearConstraint> PiSigma() const;
};
}
| 22.552632
| 117
| 0.673279
|
sebrockm
|
1be9fb8cdf4ef9e9008a81d432a2df01e0cc1b24
| 1,909
|
hpp
|
C++
|
test/common/mocks_provider.hpp
|
modern-cpp-examples/match3
|
bb1f4de11db9e92b6ebdf80f1afe9245e6f86b7e
|
[
"BSL-1.0"
] | 166
|
2016-04-27T19:01:00.000Z
|
2022-03-27T02:16:55.000Z
|
test/common/mocks_provider.hpp
|
Fuyutsubaki/match3
|
bb1f4de11db9e92b6ebdf80f1afe9245e6f86b7e
|
[
"BSL-1.0"
] | 4
|
2016-05-19T07:47:38.000Z
|
2018-03-22T04:33:00.000Z
|
test/common/mocks_provider.hpp
|
Fuyutsubaki/match3
|
bb1f4de11db9e92b6ebdf80f1afe9245e6f86b7e
|
[
"BSL-1.0"
] | 17
|
2016-05-18T21:17:39.000Z
|
2022-03-20T22:37:14.000Z
|
//
// Copyright (c) 2016 Krzysztof Jusiak (krzysztof at jusiak dot net)
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include <boost/di.hpp>
#include <type_traits>
#include "fakeit.hpp"
namespace di = boost::di;
template <class T>
auto& mock(bool reset = true) {
using namespace fakeit;
static Mock<T> mock;
if (reset) {
mock.Reset();
}
When(Dtor(mock)).AlwaysDo([] {});
return mock;
}
struct mocks_provider : di::config {
struct mock_provider {
template <class...>
struct is_creatable {
static constexpr auto value = true;
};
template <class T, class... TArgs>
auto get(const di::type_traits::direct&, const di::type_traits::heap&,
TArgs&&... args) {
return new T(static_cast<TArgs&&>(args)...);
}
template <class T, class... TArgs>
std::enable_if_t<!std::is_polymorphic<T>::value, T*> get(
const di::type_traits::uniform&, const di::type_traits::heap&,
TArgs&&... args) {
return new T{static_cast<TArgs&&>(args)...};
}
template <class T, class... TArgs>
std::enable_if_t<std::is_polymorphic<T>::value, T*> get(
const di::type_traits::uniform&, const di::type_traits::heap&,
TArgs&&...) {
return &mock<T>(false).get();
}
template <class T, class... TArgs>
auto get(const di::type_traits::direct&, const di::type_traits::stack&,
TArgs&&... args) const noexcept {
return T(static_cast<TArgs&&>(args)...);
}
template <class T, class... TArgs>
auto get(const di::type_traits::uniform&, const di::type_traits::stack&,
TArgs&&... args) const noexcept {
return T{static_cast<TArgs&&>(args)...};
}
};
public:
static auto provider(...) noexcept { return mock_provider{}; }
};
| 27.666667
| 76
| 0.618125
|
modern-cpp-examples
|
1bebc60678a7df62e258a4a942cda60163b19e37
| 344
|
hpp
|
C++
|
src/AI/AiCommand.hpp
|
LazyFalcon/TechDemo-v4
|
7b865e20beb7f04fde6e7df66be30f555e0aef5a
|
[
"MIT"
] | null | null | null |
src/AI/AiCommand.hpp
|
LazyFalcon/TechDemo-v4
|
7b865e20beb7f04fde6e7df66be30f555e0aef5a
|
[
"MIT"
] | null | null | null |
src/AI/AiCommand.hpp
|
LazyFalcon/TechDemo-v4
|
7b865e20beb7f04fde6e7df66be30f555e0aef5a
|
[
"MIT"
] | null | null | null |
#pragma once
enum CommandType
{
MoveTo,
Attack
};
struct AiCommand
{
CommandType type;
bool suspendOther;
bool queue;
void* payload;
template<typename T>
T& get() {
return *reinterpret_cast<T*>(payload);
}
};
struct MoveCommand
{
glm::vec4 position;
std::optional<glm::vec4> direction;
};
| 13.230769
| 46
| 0.619186
|
LazyFalcon
|
1bed0766c3c232027c11a0df8ffd1e1746b92b59
| 6,647
|
cpp
|
C++
|
examples/2-show-carriers/2-show-carriers.cpp
|
particle-iot/CellularHelper
|
c395735a7d47ab4750adc6b58ca40fec6dfc9e64
|
[
"MIT"
] | 2
|
2020-04-28T13:24:03.000Z
|
2020-05-22T14:40:46.000Z
|
examples/2-show-carriers/2-show-carriers.cpp
|
particle-iot/CellularHelper
|
c395735a7d47ab4750adc6b58ca40fec6dfc9e64
|
[
"MIT"
] | null | null | null |
examples/2-show-carriers/2-show-carriers.cpp
|
particle-iot/CellularHelper
|
c395735a7d47ab4750adc6b58ca40fec6dfc9e64
|
[
"MIT"
] | 1
|
2022-01-05T16:48:29.000Z
|
2022-01-05T16:48:29.000Z
|
#include "Particle.h"
#include "CellularHelper.h"
// STARTUP(cellular_credentials_set("epc.tmobile.com", "", "", NULL));
SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler;
const unsigned long STARTUP_WAIT_TIME_MS = 4000;
const unsigned long MODEM_ON_WAIT_TIME_MS = 4000;
// Forward declarations
void cellularScan();
void buttonHandler(system_event_t event, int data);
enum State {
STARTUP_WAIT_STATE,
MODEM_ON_STATE,
MODEM_ON_WAIT_STATE,
RUN_TEST_STATE,
COPS_STATE,
DONE_STATE,
IDLE_WAIT_STATE
};
State state = STARTUP_WAIT_STATE;
unsigned long stateTime = 0;
bool buttonClicked = false;
CellularHelperEnvironmentResponseStatic<32> envResp;
void setup() {
Serial.begin(9600);
System.on(button_click, buttonHandler);
}
void loop() {
switch(state) {
case STARTUP_WAIT_STATE:
// This delay is to give you time to connect to the serial port
if (millis() - stateTime >= STARTUP_WAIT_TIME_MS) {
stateTime = millis();
state = MODEM_ON_STATE;
}
break;
case MODEM_ON_STATE:
buttonClicked = false;
Serial.println("turning on modem...");
Cellular.on();
state = MODEM_ON_WAIT_STATE;
stateTime = millis();
break;
case MODEM_ON_WAIT_STATE:
// In system threaded mode you need to wait a little while after turning on the
// cellular mode before it will respond. That's what MODEM_ON_WAIT_TIME_MS is for.
if (millis() - stateTime >= MODEM_ON_WAIT_TIME_MS) {
state = RUN_TEST_STATE;
stateTime = millis();
break;
}
break;
case RUN_TEST_STATE:
cellularScan();
state = DONE_STATE;
break;
case COPS_STATE:
break;
case DONE_STATE:
Serial.println("tests complete!");
Serial.println("press the MODE button to repeat test");
buttonClicked = false;
state = IDLE_WAIT_STATE;
break;
case IDLE_WAIT_STATE:
if (buttonClicked) {
buttonClicked = false;
state = RUN_TEST_STATE;
}
break;
}
}
class OperatorName {
public:
int mcc;
int mnc;
String name;
};
class CellularHelperCOPNResponse : public CellularHelperCommonResponse {
public:
CellularHelperCOPNResponse();
void requestOperator(CellularHelperEnvironmentCellData *data);
void requestOperator(int mcc, int mnc);
void checkOperator(char *buf);
const char *getOperatorName(int mcc, int mnc) const;
virtual int parse(int type, const char *buf, int len);
// Maximum number of operator names that can be looked up
static const size_t MAX_OPERATORS = 16;
private:
size_t numOperators;
OperatorName operators[MAX_OPERATORS];
};
CellularHelperCOPNResponse copnResp;
CellularHelperCOPNResponse::CellularHelperCOPNResponse() : numOperators(0) {
}
void CellularHelperCOPNResponse::requestOperator(CellularHelperEnvironmentCellData *data) {
if (data && data->isValid(true)) {
requestOperator(data->mcc, data->mnc);
}
}
void CellularHelperCOPNResponse::requestOperator(int mcc, int mnc) {
for(size_t ii = 0; ii < numOperators; ii++) {
if (operators[ii].mcc == mcc && operators[ii].mnc == mnc) {
// Already requested
return;
}
}
if (numOperators < MAX_OPERATORS) {
// There is room to request another
operators[numOperators].mcc = mcc;
operators[numOperators].mnc = mnc;
numOperators++;
}
}
const char *CellularHelperCOPNResponse::getOperatorName(int mcc, int mnc) const {
for(size_t ii = 0; ii < numOperators; ii++) {
if (operators[ii].mcc == mcc && operators[ii].mnc == mnc) {
return operators[ii].name.c_str();
}
}
return "unknown";
}
void CellularHelperCOPNResponse::checkOperator(char *buf) {
if (buf[0] == '"') {
char *numStart = &buf[1];
char *numEnd = strchr(numStart, '"');
if (numEnd && ((numEnd - numStart) == 6)) {
char temp[4];
temp[3] = 0;
strncpy(temp, numStart, 3);
int mcc = atoi(temp);
strncpy(temp, numStart + 3, 3);
int mnc = atoi(temp);
*numEnd = 0;
char *nameStart = strchr(numEnd + 1, '"');
if (nameStart) {
nameStart++;
char *nameEnd = strchr(nameStart, '"');
if (nameEnd) {
*nameEnd = 0;
// Log.info("mcc=%d mnc=%d name=%s", mcc, mnc, nameStart);
for(size_t ii = 0; ii < numOperators; ii++) {
if (operators[ii].mcc == mcc && operators[ii].mnc == mnc) {
operators[ii].name = String(nameStart);
}
}
}
}
}
}
}
int CellularHelperCOPNResponse::parse(int type, const char *buf, int len) {
if (enableDebug) {
logCellularDebug(type, buf, len);
}
if (type == TYPE_PLUS) {
// Copy to temporary string to make processing easier
char *copy = (char *) malloc(len + 1);
if (copy) {
strncpy(copy, buf, len);
copy[len] = 0;
/*
0000018684 [app] INFO: +COPN: "901012","MCP Maritime Com"\r\n
0000018694 [app] INFO: cellular response type=TYPE_PLUS len=28
0000018694 [app] INFO: \r\n
0000018695 [app] INFO: +COPN: "901021","Seanet"\r\n
0000018705 [app] INFO: cellular response type=TYPE_ERROR len=39
0000018705 [app] INFO: \r\n
*
*/
char *start = strstr(copy, "\n+COPN: ");
if (start) {
start += 8; // length of COPN string
char *end = strchr(start, '\r');
if (end) {
*end = 0;
checkOperator(start);
}
}
free(copy);
}
}
return WAIT;
}
void printCellData(CellularHelperEnvironmentCellData *data) {
const char *whichG = data->isUMTS ? "3G" : "2G";
// Log.info("mcc=%d mnc=%d", data->mcc, data->mnc);
const char *operatorName = copnResp.getOperatorName(data->mcc, data->mnc);
Serial.printlnf("%s %s %s %d bars (%03d%03d)", whichG, operatorName, data->getBandString().c_str(), data->getBars(), data->mcc, data->mnc);
}
void cellularScan() {
Log.info("starting cellular scan...");
// envResp.enableDebug = true;
envResp.clear();
// Command may take up to 3 minutes to execute!
envResp.resp = Cellular.command(CellularHelperClass::responseCallback, (void *)&envResp, 360000, "AT+COPS=5\r\n");
if (envResp.resp == RESP_OK) {
envResp.logResponse();
copnResp.requestOperator(&envResp.service);
if (envResp.neighbors) {
for(size_t ii = 0; ii < envResp.numNeighbors; ii++) {
copnResp.requestOperator(&envResp.neighbors[ii]);
}
}
}
Log.info("looking up operator names...");
copnResp.enableDebug = false;
copnResp.resp = Cellular.command(CellularHelperClass::responseCallback, (void *)&copnResp, 120000, "AT+COPN\r\n");
Log.info("results...");
printCellData(&envResp.service);
if (envResp.neighbors) {
for(size_t ii = 0; ii < envResp.numNeighbors; ii++) {
if (envResp.neighbors[ii].isValid(true /* ignoreCI */)) {
printCellData(&envResp.neighbors[ii]);
}
}
}
}
void buttonHandler(system_event_t event, int param) {
// int clicks = system_button_clicks(param);
buttonClicked = true;
}
| 23.824373
| 140
| 0.680307
|
particle-iot
|
1beee6b9375aa78b60825afe6ce08e2b9e610a0c
| 8,716
|
cpp
|
C++
|
src/tool/cppwinrt/test/out_params.cpp
|
stephenatwork/xlang
|
0747c3b362c02a9736b3a4ca1bd3e005b4f52279
|
[
"MIT"
] | 1
|
2020-01-20T07:56:28.000Z
|
2020-01-20T07:56:28.000Z
|
test/test/out_params.cpp
|
shinsetsu/cppwinrt
|
ae0378373d2318d91448b8697a91d5b65a1fb2e5
|
[
"MIT"
] | null | null | null |
test/test/out_params.cpp
|
shinsetsu/cppwinrt
|
ae0378373d2318d91448b8697a91d5b65a1fb2e5
|
[
"MIT"
] | null | null | null |
#include "pch.h"
#include "winrt/test_component.h"
using namespace winrt;
using namespace Windows::Foundation;
using namespace test_component;
namespace
{
struct Stringable : implements<Stringable, IStringable>
{
hstring ToString()
{
return L"Stringable";
}
};
}
TEST_CASE("out_params")
{
Class object;
{
int value;
object.OutInt32(value);
REQUIRE(value == 123);
}
{
hstring value = L"replace";
object.OutString(value);
REQUIRE(value == L"123");
}
{
IInspectable value = make<Stringable>();
object.OutObject(value);
REQUIRE(value.as<IStringable>().ToString() == L"123");
}
{
IStringable value = make<Stringable>();
object.OutStringable(value);
REQUIRE(value.ToString() == L"123");
}
{
Struct value{ L"First", L"Second" };
object.OutStruct(value);
REQUIRE(value.First == L"1");
REQUIRE(value.Second == L"2");
}
{
Signed value;
object.OutEnum(value);
REQUIRE(value == Signed::First);
}
{
com_array<int32_t> value(10);
object.OutInt32Array(value);
REQUIRE(value.size() == 3);
REQUIRE(value[0] == 1);
REQUIRE(value[1] == 2);
REQUIRE(value[2] == 3);
}
{
com_array<hstring> value(10);
object.OutStringArray(value);
REQUIRE(value.size() == 3);
REQUIRE(value[0] == L"1");
REQUIRE(value[1] == L"2");
REQUIRE(value[2] == L"3");
}
{
com_array<IInspectable> value(10);
object.OutObjectArray(value);
REQUIRE(value.size() == 3);
REQUIRE(value[0].as<IStringable>().ToString() == L"1");
REQUIRE(value[1].as<IStringable>().ToString() == L"2");
REQUIRE(value[2].as<IStringable>().ToString() == L"3");
}
{
com_array<IStringable> value(10);
object.OutStringableArray(value);
REQUIRE(value.size() == 3);
REQUIRE(value[0].ToString() == L"1");
REQUIRE(value[1].ToString() == L"2");
REQUIRE(value[2].ToString() == L"3");
}
{
com_array<Struct> value(10);
object.OutStructArray(value);
REQUIRE(value.size() == 2);
REQUIRE(value[0].First == L"1");
REQUIRE(value[0].Second == L"2");
REQUIRE(value[1].First == L"10");
REQUIRE(value[1].Second == L"20");
}
{
com_array<Signed> value(10);
object.OutEnumArray(value);
REQUIRE(value.size() == 2);
REQUIRE(value[0] == Signed::First);
REQUIRE(value[1] == Signed::Second);
}
{
std::array<int32_t, 4> value{ 0xCC, 0xCC, 0xCC, 0xCC };
object.RefInt32Array(value);
REQUIRE(value[0] == 1);
REQUIRE(value[1] == 2);
REQUIRE(value[2] == 3);
REQUIRE(value[3] == 0xCC);
}
{
std::array<hstring, 4> value{ L"r1", L"r2", L"r3", L"r4" };
object.RefStringArray(value);
REQUIRE(value[0] == L"1");
REQUIRE(value[1] == L"2");
REQUIRE(value[2] == L"3");
REQUIRE(value[3] == L"");
}
{
std::array<IInspectable, 4> value{ make<Stringable>(), make<Stringable>(), make<Stringable>(), make<Stringable>() };
object.RefObjectArray(value);
REQUIRE(value[0].as<IStringable>().ToString() == L"1");
REQUIRE(value[1].as<IStringable>().ToString() == L"2");
REQUIRE(value[2].as<IStringable>().ToString() == L"3");
REQUIRE(value[3] == nullptr);
}
{
std::array<IStringable, 4> value{ make<Stringable>(), make<Stringable>(), make<Stringable>(), make<Stringable>() };
object.RefStringableArray(value);
REQUIRE(value[0].ToString() == L"1");
REQUIRE(value[1].ToString() == L"2");
REQUIRE(value[2].ToString() == L"3");
REQUIRE(value[3] == nullptr);
}
{
std::array<Struct, 3> value{ {L"First", L"Second"} };
object.RefStructArray(value);
REQUIRE(value[0].First == L"1");
REQUIRE(value[0].Second == L"2");
REQUIRE(value[1].First == L"3");
REQUIRE(value[1].Second == L"4");
REQUIRE(value[2].First == L"");
REQUIRE(value[2].Second == L"");
}
{
std::array<Signed, 3> value{};
object.RefEnumArray(value);
REQUIRE(value.size() == 3);
REQUIRE(value[0] == Signed::First);
REQUIRE(value[1] == Signed::Second);
REQUIRE(value[2] == static_cast<Signed>(0));
}
object.Fail(true);
{
int value = 0xCC;
REQUIRE_THROWS_AS(object.OutInt32(value), hresult_invalid_argument);
REQUIRE(value == 0xCC);
}
{
hstring value = L"replace";
REQUIRE_THROWS_AS(object.OutString(value), hresult_invalid_argument);
REQUIRE(value == L"");
}
{
IInspectable value = make<Stringable>();
REQUIRE_THROWS_AS(object.OutObject(value), hresult_invalid_argument);
REQUIRE(value == nullptr);
}
{
IStringable value = make<Stringable>();
REQUIRE_THROWS_AS(object.OutStringable(value), hresult_invalid_argument);
REQUIRE(value == nullptr);
}
{
Struct value{ L"First", L"Second" };
REQUIRE_THROWS_AS(object.OutStruct(value), hresult_invalid_argument);
REQUIRE(value.First == L"");
REQUIRE(value.Second == L"");
}
{
Signed value = static_cast<Signed>(0xCC);
REQUIRE_THROWS_AS(object.OutEnum(value), hresult_invalid_argument);
REQUIRE(static_cast<int32_t>(value) == 0xCC);
}
{
com_array<int32_t> value(10);
REQUIRE_THROWS_AS(object.OutInt32Array(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
com_array<hstring> value(10);
REQUIRE_THROWS_AS(object.OutStringArray(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
com_array<IInspectable> value(10);
REQUIRE_THROWS_AS(object.OutObjectArray(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
com_array<IStringable> value(10);
REQUIRE_THROWS_AS(object.OutStringableArray(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
com_array<Struct> value(10);
REQUIRE_THROWS_AS(object.OutStructArray(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
com_array<Signed> value(10);
REQUIRE_THROWS_AS(object.OutEnumArray(value), hresult_invalid_argument);
REQUIRE(value.size() == 0);
}
{
std::array<int32_t, 4> value{ 0xCC, 0xCC, 0xCC, 0xCC };
REQUIRE_THROWS_AS(object.RefInt32Array(value), hresult_invalid_argument);
REQUIRE(value[0] == 0xCC);
REQUIRE(value[1] == 0xCC);
REQUIRE(value[2] == 0xCC);
REQUIRE(value[3] == 0xCC);
}
{
std::array<hstring, 4> value{ L"r1", L"r2", L"r3", L"r4" };
REQUIRE_THROWS_AS(object.RefStringArray(value), hresult_invalid_argument);
REQUIRE(value[0] == L"");
REQUIRE(value[1] == L"");
REQUIRE(value[2] == L"");
REQUIRE(value[3] == L"");
}
{
std::array<IInspectable, 4> value{ make<Stringable>(), make<Stringable>(), make<Stringable>(), make<Stringable>() };
REQUIRE_THROWS_AS(object.RefObjectArray(value), hresult_invalid_argument);
REQUIRE(value[0] == nullptr);
REQUIRE(value[1] == nullptr);
REQUIRE(value[2] == nullptr);
REQUIRE(value[3] == nullptr);
}
{
std::array<IStringable, 4> value{ make<Stringable>(), make<Stringable>(), make<Stringable>(), make<Stringable>() };
REQUIRE_THROWS_AS(object.RefStringableArray(value), hresult_invalid_argument);
REQUIRE(value[0] == nullptr);
REQUIRE(value[1] == nullptr);
REQUIRE(value[2] == nullptr);
REQUIRE(value[3] == nullptr);
}
{
std::array<Struct, 3> value{ {L"First", L"Second"} };
REQUIRE_THROWS_AS(object.RefStructArray(value), hresult_invalid_argument);
REQUIRE(value[0].First == L"");
REQUIRE(value[0].Second == L"");
REQUIRE(value[1].First == L"");
REQUIRE(value[1].Second == L"");
REQUIRE(value[2].First == L"");
REQUIRE(value[2].Second == L"");
}
{
std::array<Signed, 2> value{ static_cast<Signed>(0xCC), static_cast<Signed>(0xCC) };
REQUIRE_THROWS_AS(object.RefEnumArray(value), hresult_invalid_argument);
REQUIRE(value[0] == static_cast<Signed>(0xCC));
REQUIRE(value[1] == static_cast<Signed>(0xCC));
}
}
| 32.401487
| 124
| 0.564938
|
stephenatwork
|
1bf120fc2ff9cfcfe93e00048eb1e5579619dfbe
| 46,365
|
cpp
|
C++
|
packages/nextclade_cli/src/cli.cpp
|
bigshr/nextclade
|
ddffb03e851a68a8d5a7260250a54cc0657da79b
|
[
"MIT"
] | 108
|
2020-09-29T14:06:08.000Z
|
2022-03-19T03:07:35.000Z
|
packages/nextclade_cli/src/cli.cpp
|
bigshr/nextclade
|
ddffb03e851a68a8d5a7260250a54cc0657da79b
|
[
"MIT"
] | 500
|
2020-09-15T09:45:10.000Z
|
2022-03-30T04:28:38.000Z
|
packages/nextclade_cli/src/cli.cpp
|
bigshr/nextclade
|
ddffb03e851a68a8d5a7260250a54cc0657da79b
|
[
"MIT"
] | 55
|
2020-10-13T11:40:47.000Z
|
2022-02-27T04:35:12.000Z
|
#include <fmt/format.h>
#include <nextalign/nextalign.h>
#include <nextclade/nextclade.h>
#include <tbb/concurrent_vector.h>
#include <tbb/global_control.h>
#include <tbb/parallel_pipeline.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <cxxopts.hpp>
#include <fstream>
#include "Logger.h"
#include "description.h"
#include "filesystem.h"
struct CliParams {
int jobs{};
std::string verbosity;
bool verbose{};
bool silent{};
bool inOrder{};
std::string inputFasta;
std::string inputRootSeq;
std::string inputTree;
std::string inputQcConfig;
std::optional<std::string> inputGeneMap;
std::optional<std::string> inputPcrPrimers;
std::optional<std::string> outputJson;
std::optional<std::string> outputCsv;
std::optional<std::string> outputTsv;
std::optional<std::string> outputTree;
std::optional<std::string> genes;
std::optional<std::string> outputDir;
std::optional<std::string> outputBasename;
std::optional<std::string> outputFasta;
std::optional<std::string> outputInsertions;
std::optional<std::string> outputErrors;
bool writeReference{};
};
struct Paths {
fs::path outputFasta;
fs::path outputInsertions;
fs::path outputErrors;
std::map<std::string, fs::path> outputGenes;
};
class ErrorCliOptionInvalidValue : public ErrorFatal {
public:
explicit ErrorCliOptionInvalidValue(const std::string &message) : ErrorFatal(message) {}
};
class ErrorIoUnableToWrite : public ErrorFatal {
public:
explicit ErrorIoUnableToWrite(const std::string &message) : ErrorFatal(message) {}
};
template<typename Result>
Result getParamRequired(const cxxopts::ParseResult &cxxOptsParsed, const std::string &name) {
if (!cxxOptsParsed.count(name)) {
throw ErrorCliOptionInvalidValue(fmt::format("Error: argument `--{:s}` is required\n\n", name));
}
return cxxOptsParsed[name].as<Result>();
}
template<typename Result>
std::optional<Result> getParamOptional(const cxxopts::ParseResult &cxxOptsParsed, const std::string &name) {
if (!cxxOptsParsed.count(name)) {
return {};
}
return cxxOptsParsed[name].as<Result>();
}
template<typename ValueType>
ValueType noopValidator([[maybe_unused]] const std::string &name, ValueType value) {
return value;
}
int ensureNonNegative(const std::string &name, int value) {
if (value >= 0) {
return value;
}
throw ErrorCliOptionInvalidValue(
fmt::format("Error: argument `--{:s}` should be non-negative, but got {:d}", name, value));
}
int ensurePositive(const std::string &name, int value) {
if (value > 0) {
return value;
}
throw ErrorCliOptionInvalidValue(
fmt::format("Error: argument `--{:s}` should be positive, but got {:d}", name, value));
}
template<typename Result>
Result getParamRequiredDefaulted(const cxxopts::ParseResult &cxxOptsParsed, const std::string &name,
const std::function<Result(const std::string &, Result)> &validator = &noopValidator<Result>) {
const auto &value = cxxOptsParsed[name].as<Result>();
return validator(name, value);
}
NextalignOptions validateOptions(const cxxopts::ParseResult &cxxOptsParsed) {
NextalignOptions options = getDefaultOptions();
// clang-format off
options.alignment.minimalLength = getParamRequiredDefaulted<int>(cxxOptsParsed, "min-length", ensureNonNegative);
options.alignment.penaltyGapExtend = getParamRequiredDefaulted<int>(cxxOptsParsed, "penalty-gap-extend", ensureNonNegative);
options.alignment.penaltyGapOpen = getParamRequiredDefaulted<int>(cxxOptsParsed, "penalty-gap-open", ensurePositive);
options.alignment.penaltyGapOpenInFrame = getParamRequiredDefaulted<int>(cxxOptsParsed, "penalty-gap-open-in-frame", ensurePositive);
options.alignment.penaltyGapOpenOutOfFrame = getParamRequiredDefaulted<int>(cxxOptsParsed, "penalty-gap-open-out-of-frame", ensurePositive);
options.alignment.penaltyMismatch = getParamRequiredDefaulted<int>(cxxOptsParsed, "penalty-mismatch", ensurePositive);
options.alignment.scoreMatch = getParamRequiredDefaulted<int>(cxxOptsParsed, "score-match", ensurePositive);
options.alignment.maxIndel = getParamRequiredDefaulted<int>(cxxOptsParsed, "max-indel", ensureNonNegative);
options.seedNuc.seedLength = getParamRequiredDefaulted<int>(cxxOptsParsed, "nuc-seed-length", ensurePositive);
options.seedNuc.minSeeds = getParamRequiredDefaulted<int>(cxxOptsParsed, "nuc-min-seeds", ensurePositive);
options.seedNuc.seedSpacing = getParamRequiredDefaulted<int>(cxxOptsParsed, "nuc-seed-spacing", ensureNonNegative);
options.seedNuc.mismatchesAllowed = getParamRequiredDefaulted<int>(cxxOptsParsed, "nuc-mismatches-allowed", ensureNonNegative);
options.seedAa.seedLength = getParamRequiredDefaulted<int>(cxxOptsParsed, "aa-seed-length", ensurePositive);
options.seedAa.minSeeds = getParamRequiredDefaulted<int>(cxxOptsParsed, "aa-min-seeds", ensurePositive);
options.seedAa.seedSpacing = getParamRequiredDefaulted<int>(cxxOptsParsed, "aa-seed-spacing", ensureNonNegative);
options.seedAa.mismatchesAllowed = getParamRequiredDefaulted<int>(cxxOptsParsed, "aa-mismatches-allowed", ensureNonNegative);
// clang-format on
return options;
}
std::tuple<CliParams, NextalignOptions> parseCommandLine(int argc,
char *argv[]) {// NOLINT(cppcoreguidelines-avoid-c-arrays)
const std::string versionNextalign = NEXTALIGN_VERSION;
const std::string versionShort = PROJECT_VERSION;
const std::string versionDetailed =
fmt::format("nextclade {:s}\nbased on libnextclade {:s}\nbased on libnexalign {:s}", PROJECT_VERSION,
Nextclade::getVersion(), NEXTALIGN_VERSION);
cxxopts::Options cxxOpts("nextclade", fmt::format("{:s}\n\n{:s}\n", versionDetailed, PROJECT_DESCRIPTION));
// clang-format off
cxxOpts.add_options()
(
"h,help",
"(optional, boolean) Show this help"
)
(
"v,version",
"(optional, boolean) Show version"
)
(
"version-detailed",
"(optional, boolean) Show detailed version"
)
(
"verbosity",
fmt::format("(optional, string) Set minimum verbosity level of console output."
" Possible values are (from least verbose to most verbose): {}."
" Default: 'warn' (only errors and warnings are shown).",
Logger::getVerbosityLevels()),
cxxopts::value<std::string>()->default_value(Logger::getVerbosityDefaultLevel()),
"VERBOSITY"
)
(
"verbose",
"(optional, boolean) Increase verbosity of the console output. Same as --verbosity=info."
)
(
"silent",
"(optional, boolean) Disable console output entirely. --verbosity=silent."
)
(
"j,jobs",
"(optional, integer) Number of CPU threads used by the algorithm. If not specified or if a non-positive value specified, the algorithm will use all the available threads.",
cxxopts::value<int>()->default_value(std::to_string(0)),
"JOBS"
)
(
"in-order",
"(optional, boolean) Force parallel processing in-order. With this flag the program will wait for results from the previous sequences to be written to the output files before writing the results of the next sequences, preserving the same order as in the input file. Due to variable sequence processing times, this might introduce unnecessary waiting times, but ensures that the resulting sequences are written in the same order as they occur in the inputs (except for sequences which have errors). By default, without this flag, processing might happen out of order, which is faster, due to the elimination of waiting, but might also lead to results written out of order - the order of results is not specified and depends on thread scheduling and processing times of individual sequences. This option is only relevant when `--jobs` is greater than 1. Note: the sequences which trigger errors during processing will be omitted from outputs, regardless of this flag."
)
(
"i,input-fasta",
"(required, string) Path to a .fasta or a .txt file with input sequences. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/feat/nextclade-cpp/data/sars-cov-2/sequences.fasta", cxxopts::value<std::string>(),
"IN_FASTA"
)
(
"r,input-root-seq",
"Path to a .fasta or a .txt file containing root sequence. Must contain only 1 sequence. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/master/data/sars-cov-2/reference.fasta",
cxxopts::value<std::string>(),
"IN_ROOT_SEQ"
)
(
"a,input-tree",
"(required, string) Path to Auspice JSON v2 file containing reference tree. See https://nextstrain.org/docs/bioinformatics/data-formats. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/master/data/sars-cov-2/tree.json",
cxxopts::value<std::string>(),
"IN_TREE"
)
(
"q,input-qc-config",
"(required, string) Path to a JSON file containing configuration of Quality Control rules. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/feat/nextclade-cpp/data/sars-cov-2/qc.json",
cxxopts::value<std::string>(),
"IN_QC_CONF"
)
(
"genes",
"(optional, string) Comma-separated list of names of genes to use. This defines which peptides will be written into outputs, and which genes will be taken into account during codon-aware alignment and aminoacid mutations detection. Must only contain gene names present in the gene map. If this flag is not supplied or its value is an empty string, then all genes found in the gene map will be used. Requires `--input-gene-map` to be specified. Example for SARS-CoV-2: E,M,N,ORF1a,ORF1b,ORF3a,ORF6,ORF7a,ORF7b,ORF8,ORF9b,S",
cxxopts::value<std::string>(),
"GENES"
)
(
"g,input-gene-map",
R"((optional, string) Path to a .gff file containing gene map. Gene map (sometimes also called "gene annotations") is used to find gene regions. If not supplied, sequences will not be translated, peptides will not be emitted, aminoacid mutations will not be detected and nucleotide sequence alignment will not be informed by codon boundaries. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/master/data/sars-cov-2/genemap.gff)",
cxxopts::value<std::string>(),
"IN_GENE_MAP"
)
(
"p,input-pcr-primers",
"(optional, string) Path to a CSV file containing a list of custom PCR primer sites. These are used to report mutations in these sites. See an example for SARS-CoV-2 at: https://github.com/nextstrain/nextclade/blob/master/data/sars-cov-2/primers.csv",
cxxopts::value<std::string>(),
"IN_PCR_PRIMERS"
)
(
"o,output-json",
"(optional, string) Path to output JSON results file",
cxxopts::value<std::string>(),
"OUT_JSON"
)
(
"c,output-csv",
"(optional, string) Path to output CSV results file",
cxxopts::value<std::string>(),
"OUT_CSV"
)
(
"t,output-tsv",
"(optional, string) Path to output TSV results file",
cxxopts::value<std::string>(),
"OUT_TSV"
)
(
"T,output-tree",
"(optional, string) Path to output Auspice JSON V2 results file. If the three is not needed, omitting this flag reduces processing time and memory consumption. For file format description see: https://nextstrain.org/docs/bioinformatics/data-formats",
cxxopts::value<std::string>(),
"OUT_TREE"
)
(
"d,output-dir",
"(optional, string) Write output files to this directory. The base filename can be set using `--output-basename` flag. The paths can be overridden on a per-file basis using `--output-*` flags. If the required directory tree does not exist, it will be created.",
cxxopts::value<std::string>(),
"OUTPUT_DIR"
)
(
"n,output-basename",
"(optional, string) Set the base filename to use for output files. To be used together with `--output-dir` flag. By default uses the filename of the sequences file (provided with `--sequences`). The paths can be overridden on a per-file basis using `--output-*` flags.",
cxxopts::value<std::string>(),
"OUTPUT_BASENAME"
)
(
"include-reference",
"(optional, boolean) Whether to include aligned reference nucleotide sequence into output nucleotide sequence fasta file and reference peptides into output peptide files.",
cxxopts::value<bool>(),
"WRITE_REF"
)
(
"output-fasta",
"(optional, string) Path to output aligned sequences in FASTA format (overrides paths given with `--output-dir` and `--output-basename`). If the required directory tree does not exist, it will be created.",
cxxopts::value<std::string>(),
"OUTPUT_FASTA"
)
(
"I,output-insertions",
"(optional, string) Path to output stripped insertions data in CSV format (overrides paths given with `--output-dir` and `--output-basename`). If the required directory tree does not exist, it will be created.",
cxxopts::value<std::string>(),
"OUTPUT_INSERTIONS"
)
(
"E,output-errors",
"(optional, string) Path to output errors and warnings occurred during processing, in CSV format (overrides paths given with `--output-dir` and `--output-basename`). If the required directory tree does not exist, it will be created.",
cxxopts::value<std::string>(),
"OUTPUT_ERRORS"
)
(
"min-length",
"(optional, integer, non-negative) Minimum length of nucleotide sequence to consider for alignment. If a sequence is shorter than that, alignment will not be attempted and a warning will be emitted. When adjusting this parameter, note that alignment of short sequences can be unreliable.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.minimalLength)),
"MIN_LENGTH"
)
(
"penalty-gap-extend",
"(optional, integer, non-negative) Penalty for extending a gap. If zero, all gaps regardless of length incur the same penalty.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.penaltyGapExtend)),
"PENALTY_GAP_EXTEND"
)
(
"penalty-gap-open",
"(optional, integer, positive) Penalty for opening of a gap. A higher penalty results in fewer gaps and more mismatches. Should be less than `--penalty-gap-open-in-frame` to avoid gaps in genes.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.penaltyGapOpen)),
"PENALTY_GAP_OPEN"
)
(
"penalty-gap-open-in-frame",
"(optional, integer, positive) As `--penalty-gap-open`, but for opening gaps at the beginning of a codon. Should be greater than `--penalty-gap-open` and less than `--penalty-gap-open-out-of-frame`, to avoid gaps in genes, but favor gaps that align with codons.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.penaltyGapOpenInFrame)),
"PENALTY_GAP_OPEN_IN_FRAME"
)
(
"penalty-gap-open-out-of-frame",
"(optional, integer, positive) As `--penalty-gap-open`, but for opening gaps in the body of a codon. Should be greater than `--penalty-gap-open-in-frame` to favor gaps that align with codons.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.penaltyGapOpenOutOfFrame)),
"PENALTY_GAP_OPEN_OUT_OF_FRAME"
)
(
"penalty-mismatch",
"(optional, integer, positive) Penalty for aligned nucleotides or aminoacids that differ in state during alignment. Note that this is redundantly parameterized with `--score-match`.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.penaltyMismatch)),
"PENALTY_MISMATCH"
)
(
"score-match",
"(optional, integer, positive) Score for encouraging aligned nucleotides or aminoacids with matching state.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.scoreMatch)),
"SCORE_MATCH"
)
(
"max-indel",
"(optional, integer, non-negative) Maximum length of insertions or deletions allowed to proceed with alignment. Alignments with long indels are slow to compute and require substantial memory in the current implementation. Alignment of sequences with indels longer that this value, will not be attempted and a warning will be emitted.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().alignment.maxIndel)),
"MAX_INDEL"
)
(
"nuc-seed-length",
"(optional, integer, positive) Seed length for nucleotide alignment. Seeds should be long enough to be unique, but short enough to match with high probability.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedNuc.seedLength)),
"NUC_SEED_LENGTH"
)
(
"nuc-min-seeds",
"(optional, integer, positive) Minimum number of seeds to search for during nucleotide alignment. Relevant for short sequences. In long sequences, the number of seeds is determined by `--nuc-seed-spacing`. Should be a positive integer.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedNuc.minSeeds)),
"NUC_MIN_SEEDS"
)
(
"nuc-seed-spacing",
"(optional, integer, non-negative) Spacing between seeds during nucleotide alignment.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedNuc.seedSpacing)),
"NUC_SEED_SPACING"
)
(
"nuc-mismatches-allowed",
"(optional, integer, non-negative) Maximum number of mismatching nucleotides allowed for a seed to be considered a match.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedNuc.mismatchesAllowed)),
"NUC_MISMATCHES_ALLOWED"
)
(
"aa-seed-length",
"(optional, integer, positive) Seed length for aminoacid alignment.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedAa.seedLength)),
"AA_SEED_LENGTH"
)
(
"aa-min-seeds",
"(optional, integer, positive) Minimum number of seeds to search for during aminoacid alignment. Relevant for short sequences. In long sequences, the number of seeds is determined by `--aa-seed-spacing`.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedAa.minSeeds)),
"AA_MIN_SEEDS"
)
(
"aa-seed-spacing",
"(optional, integer, non-negative) Spacing between seeds during aminoacid alignment.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedAa.seedSpacing)),
"AA_SEED_SPACING"
)
(
"aa-mismatches-allowed",
"(optional, integer, non-negative) Maximum number of mismatching aminoacids allowed for a seed to be considered a match.",
cxxopts::value<int>()->default_value(std::to_string(getDefaultOptions().seedAa.mismatchesAllowed)),
"AA_MISMATCHES_ALLOWED"
)
;
// clang-format on
try {
const auto cxxOptsParsed = cxxOpts.parse(argc, argv);
if (cxxOptsParsed.count("help") > 0) {
fmt::print("{:s}\n", cxxOpts.help());
std::exit(0);
}
if (cxxOptsParsed.count("version") > 0) {
fmt::print("{:s}\n", versionShort);
std::exit(0);
}
if (cxxOptsParsed.count("version-detailed") > 0) {
fmt::print("{:s}\n", versionDetailed);
std::exit(0);
}
CliParams cliParams;
cliParams.jobs = getParamRequiredDefaulted<int>(cxxOptsParsed, "jobs");
cliParams.inOrder = getParamRequiredDefaulted<bool>(cxxOptsParsed, "in-order");
cliParams.verbosity = getParamRequiredDefaulted<std::string>(cxxOptsParsed, "verbosity");
cliParams.verbose = getParamRequiredDefaulted<bool>(cxxOptsParsed, "verbose");
cliParams.silent = getParamRequiredDefaulted<bool>(cxxOptsParsed, "silent");
cliParams.outputDir = getParamOptional<std::string>(cxxOptsParsed, "output-dir");
cliParams.outputBasename = getParamOptional<std::string>(cxxOptsParsed, "output-basename");
cliParams.outputFasta = getParamOptional<std::string>(cxxOptsParsed, "output-fasta");
cliParams.writeReference = getParamRequiredDefaulted<bool>(cxxOptsParsed, "include-reference");
cliParams.outputInsertions = getParamOptional<std::string>(cxxOptsParsed, "output-insertions");
cliParams.outputErrors = getParamOptional<std::string>(cxxOptsParsed, "output-errors");
cliParams.inputFasta = getParamRequired<std::string>(cxxOptsParsed, "input-fasta");
cliParams.inputRootSeq = getParamRequired<std::string>(cxxOptsParsed, "input-root-seq");
cliParams.inputTree = getParamRequired<std::string>(cxxOptsParsed, "input-tree");
cliParams.inputQcConfig = getParamRequired<std::string>(cxxOptsParsed, "input-qc-config");
cliParams.genes = getParamOptional<std::string>(cxxOptsParsed, "genes");
cliParams.inputGeneMap = getParamOptional<std::string>(cxxOptsParsed, "input-gene-map");
cliParams.inputPcrPrimers = getParamOptional<std::string>(cxxOptsParsed, "input-pcr-primers");
cliParams.outputJson = getParamOptional<std::string>(cxxOptsParsed, "output-json");
cliParams.outputCsv = getParamOptional<std::string>(cxxOptsParsed, "output-csv");
cliParams.outputTsv = getParamOptional<std::string>(cxxOptsParsed, "output-tsv");
cliParams.outputTree = getParamOptional<std::string>(cxxOptsParsed, "output-tree");
if (bool(cliParams.genes) && !bool(cliParams.inputGeneMap)) {
throw ErrorCliOptionInvalidValue("Parameter `--genes` requires parameter `--input-gene-map` to be specified.");
}
NextalignOptions options = validateOptions(cxxOptsParsed);
return std::make_tuple(cliParams, options);
} catch (const cxxopts::OptionSpecException &e) {
fmt::print(stderr, "Error: OptionSpecException: {:s}\n\n", e.what());
fmt::print(stderr, "{:s}\n", cxxOpts.help());
std::exit(1);
} catch (const cxxopts::OptionParseException &e) {
fmt::print(stderr, "Error: OptionParseException: {:s}\n\n", e.what());
fmt::print(stderr, "{:s}\n", cxxOpts.help());
std::exit(1);
} catch (const ErrorCliOptionInvalidValue &e) {
fmt::print(stderr, "Error: ErrorCliOptionInvalidValue: {:s}\n\n", e.what());
fmt::print(stderr, "{:s}\n", cxxOpts.help());
std::exit(1);
} catch (const std::exception &e) {
fmt::print(stderr, "Error: {:s}\n\n", e.what());
fmt::print(stderr, "{:s}\n", cxxOpts.help());
std::exit(1);
}
}
class ErrorFastaReader : public ErrorFatal {
public:
explicit ErrorFastaReader(const std::string &message) : ErrorFatal(message) {}
};
struct ReferenceSequenceData {
const NucleotideSequence seq;
const std::string name;
const int length;
};
ReferenceSequenceData parseRefFastaFile(const std::string &filename) {
std::ifstream file(filename);
if (!file.good()) {
throw ErrorFastaReader(fmt::format("Error: unable to read \"{:s}\"\n", filename));
}
const auto refSeqs = parseSequences(file, filename);
if (refSeqs.size() != 1) {
throw ErrorFastaReader(
fmt::format("Error: {:d} sequences found in reference sequence file, expected 1", refSeqs.size()));
}
const auto &refSeq = refSeqs.front();
const auto &seq = toNucleotideSequence(refSeq.seq);
const auto length = static_cast<int>(seq.size());
return {.seq = seq, .name = refSeq.seqName, .length = length};
}
class ErrorGffReader : public ErrorFatal {
public:
explicit ErrorGffReader(const std::string &message) : ErrorFatal(message) {}
};
GeneMap parseGeneMapGffFile(const std::string &filename) {
std::ifstream file(filename);
if (!file.good()) {
throw ErrorGffReader(fmt::format("Error: unable to read \"{:s}\"\n", filename));
}
auto geneMap = parseGeneMapGff(file, filename);
if (geneMap.empty()) {
throw ErrorGffReader(fmt::format("Error: gene map is empty"));
}
return geneMap;
}
std::set<std::string> parseGenes(const std::string &genesString) {
std::vector<std::string> genes;
if (!genesString.empty()) {
boost::algorithm::split(genes, genesString, boost::is_any_of(","));
}
for (auto &gene : genes) {
gene = boost::trim_copy(gene);
}
auto result = std::set<std::string>{genes.cbegin(), genes.cend()};
return result;
}
class ErrorGeneMapValidationFailure : public ErrorFatal {
public:
explicit ErrorGeneMapValidationFailure(const std::string &message) : ErrorFatal(message) {}
};
void validateGenes(const std::set<std::string> &genes, const GeneMap &geneMap) {
for (const auto &gene : genes) {
const auto &it = geneMap.find(gene);
if (it == geneMap.end()) {
throw ErrorGeneMapValidationFailure(fmt::format("Error: gene \"{}\" is not in gene map\n", gene));
}
}
}
GeneMap filterGeneMap(const std::set<std::string> &genes, const GeneMap &geneMap) {
GeneMap result;
for (const auto &gene : genes) {
const auto &it = geneMap.find(gene);
if (it != geneMap.end()) {
result.insert(*it);
}
}
return result;
}
std::string formatCliParams(const CliParams &cliParams) {
fmt::memory_buffer buf;
fmt::format_to(buf, "\nParameters:\n");
fmt::format_to(buf, "{:<20s}{:<}\n", "Jobs", cliParams.jobs);
fmt::format_to(buf, "{:<20s}{:<}\n", "In order", cliParams.inOrder ? "yes" : "no");
fmt::format_to(buf, "{:<20s}{:<}\n", "Include reference", cliParams.writeReference ? "yes" : "no");
fmt::format_to(buf, "{:<20s}{:<}\n", "Verbose", cliParams.verbose ? "yes" : "no");
fmt::format_to(buf, "\nInput Files:\n");
fmt::format_to(buf, "{:<20s}{:<}\n", "Reference sequence", cliParams.inputRootSeq);
fmt::format_to(buf, "{:<20s}{:<}\n", "Sequences FASTA", cliParams.inputFasta);
fmt::format_to(buf, "{:<20s}{:<}\n", "Gene map", cliParams.inputGeneMap.value_or("Disabled"));
fmt::format_to(buf, "{:<20s}{:<}\n", "PCR primers", cliParams.inputPcrPrimers.value_or("Disabled"));
fmt::format_to(buf, "{:<20s}{:<}\n", "QC configuration", cliParams.inputQcConfig);
if (cliParams.genes) {
fmt::format_to(buf, "{:<20s}{:<}\n", "Genes to translate", *cliParams.genes);
}
return fmt::to_string(buf);
}
Paths getPaths(const CliParams &cliParams, const std::set<std::string> &genes) {
fs::path sequencesPath = cliParams.inputFasta;
auto outDir = fs::canonical(fs::current_path());
if (cliParams.outputDir) {
outDir = *cliParams.outputDir;
}
if (!outDir.is_absolute()) {
outDir = fs::current_path() / outDir;
}
auto baseName = sequencesPath.stem();
if (cliParams.outputBasename) {
baseName = *cliParams.outputBasename;
}
auto outputFasta = outDir / baseName;
outputFasta += ".aligned.fasta";
if (cliParams.outputFasta) {
outputFasta = *cliParams.outputFasta;
}
auto outputInsertions = outDir / baseName;
outputInsertions += ".insertions.csv";
if (cliParams.outputInsertions) {
outputInsertions = *cliParams.outputInsertions;
}
auto outputErrors = outDir / baseName;
outputErrors += ".errors.csv";
if (cliParams.outputErrors) {
outputErrors = *cliParams.outputErrors;
}
std::map<std::string, fs::path> outputGenes;
for (const auto &gene : genes) {
auto outputGene = outDir / baseName;
outputGene += fmt::format(".gene.{:s}.fasta", gene);
outputGenes.emplace(gene, outputGene);
}
return {
.outputFasta = outputFasta,
.outputInsertions = outputInsertions,
.outputErrors = outputErrors,
.outputGenes = outputGenes,
};
}
std::string formatPaths(const Paths &paths) {
fmt::memory_buffer buf;
fmt::format_to(buf, "\nOutput files:\n");
fmt::format_to(buf, "{:>30s}: \"{:<s}\"\n", "Aligned sequences", paths.outputFasta.string());
fmt::format_to(buf, "{:>30s}: \"{:<s}\"\n", "Stripped insertions", paths.outputInsertions.string());
for (const auto &[geneName, outputGenePath] : paths.outputGenes) {
fmt::memory_buffer bufGene;
fmt::format_to(bufGene, "{:s} {:>10s}", "Translated genes", geneName);
fmt::format_to(buf, "{:>30s}: \"{:<s}\"\n", fmt::to_string(bufGene), outputGenePath.string());
}
return fmt::to_string(buf);
}
std::string formatRef(const ReferenceSequenceData &refData, bool shouldWriteReference) {
return fmt::format("\nReference sequence:\n name: \"{:s}\"\n Length: {:d}\n Write: {:s}\n", refData.name,
refData.length, shouldWriteReference ? "yes" : "no");
}
std::string formatGeneMap(const GeneMap &geneMap, const std::set<std::string> &genes) {
constexpr const auto TABLE_WIDTH = 86;
fmt::memory_buffer buf;
fmt::format_to(buf, "\nGene map:\n");
fmt::format_to(buf, "{:s}\n", std::string(TABLE_WIDTH, '-'));
fmt::format_to(buf, "| {:8s} | {:16s} | {:8s} | {:8s} | {:8s} | {:8s} | {:8s} |\n", "Selected", " Gene Name",
" Start", " End", " Length", " Frame", " Strand");
fmt::format_to(buf, "{:s}\n", std::string(TABLE_WIDTH, '-'));
for (const auto &[geneName, gene] : geneMap) {
const auto selected = std::find(genes.cbegin(), genes.cend(), geneName) != genes.cend();
const std::string selectedStr = selected ? " yes" : " ";
fmt::format_to(buf, "| {:8s} | {:16s} | {:8d} | {:8d} | {:8d} | {:8d} | {:8s} |\n", selectedStr, geneName,
gene.start + 1, gene.end, gene.length, gene.frame + 1, gene.strand);
}
fmt::format_to(buf, "{:s}\n", std::string(TABLE_WIDTH, '-'));
return fmt::to_string(buf);
}
namespace Nextclade {
struct AlgorithmOutput {
int index;
std::string seqName;
bool hasError;
NextcladeResult result;
std::exception_ptr error;
};
}// namespace Nextclade
/**
* Runs nextclade algorithm in a parallel pipeline
*/
void run(
/* in */ int parallelism,
/* in */ bool inOrder,
/* inout */ std::unique_ptr<FastaStream> &inputFastaStream,
/* in */ const ReferenceSequenceData &refData,
/* in */ const Nextclade::QcConfig &qcRulesConfig,
/* in */ const std::string &treeString,
/* in */ const std::vector<Nextclade::PcrPrimer> &pcrPrimers,
/* in */ const GeneMap &geneMap,
/* in */ const NextalignOptions &nextalignOptions,
/* out */ std::unique_ptr<std::ostream> &outputJsonStream,
/* out */ std::unique_ptr<std::ostream> &outputCsvStream,
/* out */ std::unique_ptr<std::ostream> &outputTsvStream,
/* out */ std::unique_ptr<std::ostream> &outputTreeStream,
/* out */ std::ostream &outputFastaStream,
/* out */ std::ostream &outputInsertionsStream,
/* out */ std::ostream &outputErrorsFile,
/* out */ std::map<std::string, std::ofstream> &outputGeneStreams,
/* in */ bool shouldWriteReference,
/* out */ Logger &logger) {
tbb::task_group_context context;
const auto ioFiltersMode = inOrder ? tbb::filter_mode::serial_in_order : tbb::filter_mode::serial_out_of_order;
const auto &ref = refData.seq;
const auto &refName = refData.name;
std::optional<Nextclade::CsvWriter> csv;
if (outputCsvStream) {
csv.emplace(Nextclade::CsvWriter(*outputCsvStream, Nextclade::CsvWriterOptions{.delimiter = ';'}));
}
std::optional<Nextclade::CsvWriter> tsv;
if (outputTsvStream) {
tsv.emplace(Nextclade::CsvWriter(*outputTsvStream, Nextclade::CsvWriterOptions{.delimiter = '\t'}));
}
const Nextclade::NextcladeOptions options = {
.ref = ref,
.treeString = treeString,
.pcrPrimers = pcrPrimers,
.geneMap = geneMap,
.qcRulesConfig = qcRulesConfig,
.nextalignOptions = nextalignOptions,
};
Nextclade::NextcladeAlgorithm nextclade{options};
// TODO(perf): consider using a thread-safe queue instead of a vector,
// or restructuring code to avoid concurrent access entirely
tbb::concurrent_vector<Nextclade::AnalysisResult> resultsConcurrent;
/** Input filter is a serial input filter function, which accepts an input stream,
* reads and parses the contents of it, and returns parsed sequences */
const auto inputFilter = tbb::make_filter<void, AlgorithmInput>(ioFiltersMode,//
[&inputFastaStream](tbb::flow_control &fc) -> AlgorithmInput {
if (!inputFastaStream->good()) {
fc.stop();
return {};
}
return inputFastaStream->next();
});
/** A set of parallel transform filter functions, each accepts a parsed sequence from the input filter,
* runs nextclade algorithm sequentially and returns its result.
* The number of filters is determined by the `--jobs` CLI argument */
const auto transformFilters =
tbb::make_filter<AlgorithmInput, Nextclade::AlgorithmOutput>(tbb::filter_mode::parallel,//
[&nextclade](const AlgorithmInput &input) -> Nextclade::AlgorithmOutput {
const auto &seqName = input.seqName;
try {
const auto seq = toNucleotideSequence(input.seq);
const auto result = nextclade.run(seqName, seq);
return {.index = input.index, .seqName = seqName, .hasError = false, .result = result, .error = nullptr};
} catch (const std::exception &e) {
const auto &error = std::current_exception();
return {.index = input.index, .seqName = seqName, .hasError = true, .result = {}, .error = error};
}
});
// HACK: prevent aligned ref and ref genes from being written multiple times
// TODO: hoist ref sequence transforms - process and write results only once, outside of main loop
bool refsHaveBeenWritten = !shouldWriteReference;
/** Output filter is a serial ordered filter function which accepts the results from transform filters,
* one at a time, displays and writes them to output streams */
const auto outputFilter = tbb::make_filter<Nextclade::AlgorithmOutput, void>(ioFiltersMode,//
[&refName, &outputFastaStream, &outputInsertionsStream, &outputErrorsFile, &outputGeneStreams, &csv, &tsv,
&refsHaveBeenWritten, &logger, &resultsConcurrent, &outputJsonStream,
&outputTreeStream](const Nextclade::AlgorithmOutput &output) {
const auto index = output.index;
const auto &seqName = output.seqName;
const auto &refAligned = output.result.ref;
const auto &queryAligned = output.result.query;
const auto &queryPeptides = output.result.queryPeptides;
const auto &refPeptides = output.result.refPeptides;
const auto &insertions = output.result.analysisResult.insertions;
const auto &warnings = output.result.warnings;
const auto &result = output.result;
logger.info("| {:5d} | {:40s} | {:7d} | {:7d} | {:7d} | {:7d} |",//
index, seqName, result.analysisResult.alignmentScore, result.analysisResult.alignmentStart,
result.analysisResult.alignmentEnd, result.analysisResult.totalInsertions//
);
const auto &error = output.error;
if (error) {
try {
std::rethrow_exception(error);
} catch (const std::exception &e) {
const std::string &errorMessage = e.what();
logger.warn("Warning: In sequence \"{:s}\": {:s}. Note that this sequence will be excluded from results.",
seqName, errorMessage);
outputErrorsFile << fmt::format("\"{:s}\",\"{:s}\",\"{:s}\",\"{:s}\"\n", seqName, e.what(), "", "<<ALL>>");
if (csv) {
csv->addErrorRow(seqName, errorMessage);
}
if (tsv) {
tsv->addErrorRow(seqName, errorMessage);
}
return;
}
} else {
std::vector<std::string> warningsCombined;
std::vector<std::string> failedGeneNames;
for (const auto &warning : warnings.global) {
logger.warn("Warning: in sequence \"{:s}\": {:s}", seqName, warning);
warningsCombined.push_back(warning);
}
for (const auto &warning : warnings.inGenes) {
logger.warn("Warning: in sequence \"{:s}\": {:s}", seqName, warning.message);
warningsCombined.push_back(warning.message);
failedGeneNames.push_back(warning.geneName);
}
auto warningsJoined = boost::join(warningsCombined, ";");
boost::replace_all(warningsJoined, R"(")", R"("")");// escape double quotes
auto failedGeneNamesJoined = boost::join(failedGeneNames, ";");
boost::replace_all(failedGeneNamesJoined, R"(")", R"("")");// escape double quotes
outputErrorsFile << fmt::format("\"{:s}\",\"{:s}\",\"{:s}\",\"{:s}\"\n", seqName, "", warningsJoined,
failedGeneNamesJoined);
// TODO: hoist ref sequence transforms - process and write results only once, outside of main loop
if (!refsHaveBeenWritten) {
outputFastaStream << fmt::format(">{:s}\n{:s}\n", refName, refAligned);
outputFastaStream.flush();
for (const auto &peptide : refPeptides) {
outputGeneStreams[peptide.name] << fmt::format(">{:s}\n{:s}\n", refName, peptide.seq);
outputGeneStreams[peptide.name].flush();
}
refsHaveBeenWritten = true;
}
outputFastaStream << fmt::format(">{:s}\n{:s}\n", seqName, queryAligned);
for (const auto &peptide : queryPeptides) {
outputGeneStreams[peptide.name] << fmt::format(">{:s}\n{:s}\n", seqName, peptide.seq);
}
outputInsertionsStream << fmt::format("\"{:s}\",\"{:s}\"\n", seqName, Nextclade::formatInsertions(insertions));
if (outputJsonStream || outputTreeStream) {
resultsConcurrent.push_back(output.result.analysisResult);
}
if (csv) {
csv->addRow(output.result.analysisResult);
}
if (tsv) {
tsv->addRow(output.result.analysisResult);
}
}
});
try {
tbb::parallel_pipeline(parallelism, inputFilter & transformFilters & outputFilter, context);
} catch (const std::exception &e) {
logger.error("Error: when running the internal parallel pipeline: {:s}", e.what());
}
if (outputJsonStream || outputTreeStream) {
// TODO: try to avoid copy here
std::vector<Nextclade::AnalysisResult> results{resultsConcurrent.cbegin(), resultsConcurrent.cend()};
if (outputJsonStream) {
*outputJsonStream << serializeResults(results);
}
if (outputTreeStream) {
const auto &tree = nextclade.finalize(results);
(*outputTreeStream) << tree.serialize();
}
}
}
std::string readFile(const std::string &filepath) {
std::ifstream stream(filepath);
if (!stream.good()) {
throw std::runtime_error(fmt::format("Error: unable to read \"{:s}\"", filepath));
}
std::stringstream buffer;
buffer << stream.rdbuf();
return buffer.str();
}
/**
* Opens a file stream given filepath and creates target directory tree if does not exist
*/
void openOutputFile(const std::string &filepath, std::ofstream &stream) {
const auto outputJsonParent = fs::path(filepath).parent_path();
if (!outputJsonParent.empty()) {
fs::create_directories(outputJsonParent);
}
stream.open(filepath);
if (!stream.is_open()) {
throw ErrorIoUnableToWrite(fmt::format("Error: unable to write \"{:s}\": {:s}", filepath, strerror(errno)));
}
}
/**
* Opens a file stream, if the given optional filepath contains value, returns nullptr otherwise
*/
std::unique_ptr<std::ostream> openOutputFileMaybe(const std::optional<std::string> &filepath) {
if (!filepath) {
return nullptr;
}
const auto outputJsonParent = fs::path(*filepath).parent_path();
if (!outputJsonParent.empty()) {
fs::create_directories(outputJsonParent);
}
auto stream = std::make_unique<std::ofstream>(*filepath);
if (!stream->is_open()) {
throw ErrorIoUnableToWrite(fmt::format("Error: unable to write \"{:s}\": {:s}", *filepath, strerror(errno)));
}
return stream;
}
int main(int argc, char *argv[]) {
Logger logger{Logger::Options{.linePrefix = "Nextclade", .verbosity = Logger::Verbosity::warn}};
try {
const auto [cliParams, options] = parseCommandLine(argc, argv);
auto verbosity = Logger::convertVerbosity(cliParams.verbosity);
if (cliParams.verbose) {
verbosity = Logger::Verbosity::info;
}
if (cliParams.silent) {
verbosity = Logger::Verbosity::silent;
}
logger.setVerbosity(verbosity);
logger.info(formatCliParams(cliParams));
const auto refData = parseRefFastaFile(cliParams.inputRootSeq);
const auto shouldWriteReference = cliParams.writeReference;
logger.info(formatRef(refData, shouldWriteReference));
GeneMap geneMap;
std::set<std::string> genes;
if (cliParams.inputGeneMap) {
geneMap = parseGeneMapGffFile(*cliParams.inputGeneMap);
if (!cliParams.genes || cliParams.genes->empty()) {
// If `--genes` are omitted or empty, use all genes in the gene map
std::transform(geneMap.cbegin(), geneMap.cend(), std::inserter(genes, genes.end()),
[](const auto &it) { return it.first; });
} else {
genes = parseGenes(*cliParams.genes);
}
validateGenes(genes, geneMap);
const GeneMap geneMapFull = geneMap;
geneMap = filterGeneMap(genes, geneMap);
logger.info(formatGeneMap(geneMapFull, genes));
}
if (!genes.empty()) {
// penaltyGapOpenOutOfFrame > penaltyGapOpenInFrame > penaltyGapOpen
const auto isInFrameGreater = options.alignment.penaltyGapOpenInFrame > options.alignment.penaltyGapOpen;
const auto isOutOfFrameEvenGreater =
options.alignment.penaltyGapOpenOutOfFrame > options.alignment.penaltyGapOpenInFrame;
if (!(isInFrameGreater && isOutOfFrameEvenGreater)) {
throw ErrorCliOptionInvalidValue(
fmt::format("Should verify the condition `--penalty-gap-open-out-of-frame` > `--penalty-gap-open-in-frame` > "
"`--penalty-gap-open`, but got {:d} > {:d} > {:d}, which is false",
options.alignment.penaltyGapOpenOutOfFrame, options.alignment.penaltyGapOpenInFrame,
options.alignment.penaltyGapOpen));
}
}
std::ifstream fastaFile(cliParams.inputFasta);
auto inputFastaStream = makeFastaStream(fastaFile, cliParams.inputFasta);
if (!fastaFile.good()) {
logger.error("Error: unable to read \"{:s}\"", cliParams.inputFasta);
std::exit(1);
}
const auto qcJsonString = readFile(cliParams.inputQcConfig);
const auto qcRulesConfig = Nextclade::parseQcConfig(qcJsonString);
if (!Nextclade::isQcConfigVersionRecent(qcRulesConfig)) {
logger.warn(
"The version of QC configuration file \"{:s}\" (`\"schemaVersion\": \"{:s}\"`) is older than the QC "
"configuration version expected by Nextclade ({:s}). "
"You might be missing out on new features. It is recommended to download the latest QC configuration file.",
cliParams.inputQcConfig, qcRulesConfig.schemaVersion, Nextclade::getQcConfigJsonSchemaVersion());
}
const auto treeString = readFile(cliParams.inputTree);
std::vector<Nextclade::PcrPrimer> pcrPrimers;
if (cliParams.inputPcrPrimers) {
const auto pcrPrimersCsvString = readFile(*cliParams.inputPcrPrimers);
std::vector<std::string> warnings;
pcrPrimers =
Nextclade::parseAndConvertPcrPrimersCsv(pcrPrimersCsvString, *cliParams.inputPcrPrimers, refData.seq, warnings);
}
const auto paths = getPaths(cliParams, genes);
logger.info(formatPaths(paths));
auto outputJsonStream = openOutputFileMaybe(cliParams.outputJson);
auto outputCsvStream = openOutputFileMaybe(cliParams.outputCsv);
auto outputTsvStream = openOutputFileMaybe(cliParams.outputTsv);
auto outputTreeStream = openOutputFileMaybe(cliParams.outputTree);
std::ofstream outputFastaStream;
openOutputFile(paths.outputFasta, outputFastaStream);
std::ofstream outputInsertionsStream;
openOutputFile(paths.outputInsertions, outputInsertionsStream);
outputInsertionsStream << "seqName,insertions\n";
std::ofstream outputErrorsFile(paths.outputErrors);
if (!outputErrorsFile.good()) {
throw ErrorIoUnableToWrite(fmt::format("Error: unable to write \"{:s}\"", paths.outputErrors.string()));
}
outputErrorsFile << "seqName,errors,warnings,failedGenes\n";
std::map<std::string, std::ofstream> outputGeneStreams;
for (const auto &[geneName, outputGenePath] : paths.outputGenes) {
auto result = outputGeneStreams.emplace(std::make_pair(geneName, std::ofstream{}));
auto &outputGeneFile = result.first->second;
openOutputFile(outputGenePath, outputGeneFile);
}
int parallelism = static_cast<int>(std::thread::hardware_concurrency());
if (cliParams.jobs > 0) {
tbb::global_control globalControl{tbb::global_control::max_allowed_parallelism,
static_cast<size_t>(cliParams.jobs)};
parallelism = cliParams.jobs;
}
bool inOrder = cliParams.inOrder;
logger.info("\nParallelism: {:d}\n", parallelism);
if (!cliParams.inputGeneMap) {
logger.warn(
"Warning: Parameter `--input-gene-map` was not specified. Without a gene map sequences will not be "
"translated, there will be no peptides in output files, aminoacid mutations will not be detected and "
"nucleotide sequence alignment will not be informed by codon boundaries.");
} else if (geneMap.empty()) {
logger.warn(
"Warning: Provided gene map is empty. Sequences will not be translated, there will be no peptides in output "
"files, aminoacid mutations will not be detected and nucleotide sequence alignment will not be informed by "
"codon boundaries.");
}
constexpr const auto TABLE_WIDTH = 92;
logger.info("\nSequences:");
logger.info("{:s}", std::string(TABLE_WIDTH, '-'));
logger.info("| {:5s} | {:40s} | {:7s} | {:7s} | {:7s} | {:7s} |",//
"Index", "Seq. name", "A.score", "A.start", "A.end", "Insert." //
);
logger.info("{:s}\n", std::string(TABLE_WIDTH, '-'));
try {
run(parallelism, inOrder, inputFastaStream, refData, qcRulesConfig, treeString, pcrPrimers, geneMap, options,
outputJsonStream, outputCsvStream, outputTsvStream, outputTreeStream, outputFastaStream, outputInsertionsStream,
outputErrorsFile, outputGeneStreams, shouldWriteReference, logger);
} catch (const std::exception &e) {
logger.error("Error: {:>16s} |", e.what());
}
logger.info("{:s}", std::string(TABLE_WIDTH, '-'));
} catch (const std::exception &e) {
logger.error("Error: {:s}", e.what());
std::exit(1);
}
}
| 41.286732
| 972
| 0.684503
|
bigshr
|
1bf297ab1e3d6b7600df40296ff54278fe627dad
| 168
|
cpp
|
C++
|
code/Instructions/ZeroRegInstr/ZeroRegInstr.cpp
|
LLDevLab/LLDevCompiler
|
f73f13d38069ab5b571fb136e068eb06387caf4c
|
[
"BSD-3-Clause"
] | 5
|
2019-10-22T18:37:43.000Z
|
2020-12-09T14:00:03.000Z
|
code/Instructions/ZeroRegInstr/ZeroRegInstr.cpp
|
LLDevLab/LLDevCompiler
|
f73f13d38069ab5b571fb136e068eb06387caf4c
|
[
"BSD-3-Clause"
] | 1
|
2020-03-29T15:30:45.000Z
|
2020-03-29T15:30:45.000Z
|
code/Instructions/ZeroRegInstr/ZeroRegInstr.cpp
|
LLDevLab/LLDevCompiler
|
f73f13d38069ab5b571fb136e068eb06387caf4c
|
[
"BSD-3-Clause"
] | 1
|
2019-12-23T06:51:45.000Z
|
2019-12-23T06:51:45.000Z
|
#include "ZeroRegInstr.h"
ZeroRegInstr::ZeroRegInstr(token_pos pos) : Instruction(pos)
{
}
NONTERMINALS ZeroRegInstr::GetInstructionType()
{
return ZERO_REG_INSTR;
}
| 16.8
| 60
| 0.785714
|
LLDevLab
|
1bfe12517e51e14adf9670811267d0c6da4d2bf8
| 16,774
|
cpp
|
C++
|
src/context.cpp
|
ShaderKitty/geodesuka
|
1578f2fe3e5a7102d2e314406c89a48132a71675
|
[
"MIT"
] | 3
|
2021-08-07T15:11:35.000Z
|
2021-11-17T18:59:45.000Z
|
src/context.cpp
|
ShaderKitty/geodesuka
|
1578f2fe3e5a7102d2e314406c89a48132a71675
|
[
"MIT"
] | null | null | null |
src/context.cpp
|
ShaderKitty/geodesuka
|
1578f2fe3e5a7102d2e314406c89a48132a71675
|
[
"MIT"
] | null | null | null |
#include <geodesuka/engine.h>
#include <geodesuka/core/gcl/context.h>
#include <cstdlib>
#include <climits>
#include <GLFW/glfw3.h>
namespace geodesuka::core::gcl {
context::context(engine* aEngine, device* aDevice, uint32_t aExtensionCount, const char** aExtensionList) {
// List of operations.
// Check for support of required extensions requested i
// 1: Check for extensions.
// 2: Queue Create Info.
// 3: Create Logical Device.
this->Engine = aEngine;
this->Device = aDevice;
if ((this->Engine == nullptr) || (this->Device == nullptr)) return;
VkResult Result = VkResult::VK_SUCCESS;
// If -1, then the option is not supported by the device.
this->QFI[0] = this->Device->qfi(device::qfs::TRANSFER);
this->QFI[1] = this->Device->qfi(device::qfs::COMPUTE);
this->QFI[2] = this->Device->qfi(device::qfs::GRAPHICS);
this->QFI[3] = this->Device->qfi(device::qfs::PRESENT);
// Register this with context.h
this->Support = 0;
if (this->QFI[0] >= 0) {
this->Support |= device::qfs::TRANSFER;
}
if (this->QFI[1] >= 0) {
this->Support |= device::qfs::COMPUTE;
}
if (this->QFI[2] >= 0) {
this->Support |= device::qfs::GRAPHICS;
}
if (this->QFI[3] >= 0) {
this->Support |= device::qfs::PRESENT;
}
// UQFI set to -1, as default. Do not use.
this->UQFI[0] = -1;
this->UQFI[1] = -1;
this->UQFI[2] = -1;
this->UQFI[3] = -1;
for (int i = 0; i < 4; i++) {
if (this->QFI[i] == -1) continue;
if (this->UQFICount == 0) {
this->UQFI[this->UQFICount] = this->QFI[i];
this->UQFICount += 1;
}
bool AlreadyExists = false;
for (size_t j = 0; j < this->UQFICount; j++) {
if (this->QFI[i] == this->UQFI[j]) {
AlreadyExists = true;
break;
}
}
if (!AlreadyExists) {
this->UQFI[this->UQFICount] = this->QFI[i];
this->UQFICount += 1;
}
}
// With UQFI found, generate queues for selected indices.
uint32_t QueueFamilyCount = 0;
const VkQueueFamilyProperties *QueueFamilyProperty = this->Device->get_queue_families(&QueueFamilyCount);
this->QueueCount = 0;
for (int i = 0; i < this->UQFICount; i++) {
this->QueueCount += QueueFamilyProperty[this->UQFI[i]].queueCount;
}
this->QueueFamilyPriority = (float**)malloc(this->UQFICount * sizeof(float*));
if (this->QueueFamilyPriority != NULL) {
for (int i = 0; i < this->UQFICount; i++) {
this->QueueFamilyPriority[i] = (float*)malloc(QueueFamilyProperty[this->UQFI[i]].queueCount * sizeof(float));
if (this->QueueFamilyPriority[i] != NULL) {
for (uint32_t j = 0; j < QueueFamilyProperty[this->UQFI[i]].queueCount; j++) {
this->QueueFamilyPriority[i][j] = 1.0f;
}
}
}
}
this->QueueCreateInfo = (VkDeviceQueueCreateInfo*)malloc(this->UQFICount * sizeof(VkDeviceQueueCreateInfo));
this->Queue = new queue[this->QueueCount];
// Check for allocation failure.
bool Allocated = true;
Allocated = (this->QueueFamilyPriority != NULL) && (this->QueueCreateInfo != NULL) && (this->Queue != nullptr);
if (Allocated) {
for (int i = 0; i < this->UQFICount; i++) {
Allocated = Allocated && (this->QueueFamilyPriority[i] != NULL);
}
}
// Fail condition
if (!Allocated) {
delete[] this->Queue; this->Queue = nullptr;
free(this->QueueCreateInfo); this->QueueCreateInfo = NULL;
if (this->QueueFamilyPriority != NULL) {
for (int i = 0; i < this->UQFICount; i++) {
free(this->QueueFamilyPriority[i]); this->QueueFamilyPriority = NULL;
}
}
free(this->QueueFamilyPriority); this->QueueFamilyPriority = NULL;
return;
}
// Loads all create info.
for (int i = 0; i < this->UQFICount; i++) {
this->QueueCreateInfo[i].sType = VkStructureType::VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
this->QueueCreateInfo[i].pNext = NULL;
this->QueueCreateInfo[i].flags = 0;
this->QueueCreateInfo[i].queueFamilyIndex = this->UQFI[i];
this->QueueCreateInfo[i].queueCount = QueueFamilyProperty[this->UQFI[i]].queueCount;
this->QueueCreateInfo[i].pQueuePriorities = this->QueueFamilyPriority[i];
}
// Load VkDevice Create Info.
this->CreateInfo.sType = VkStructureType::VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
this->CreateInfo.pNext = NULL;
this->CreateInfo.flags = 0;
this->CreateInfo.queueCreateInfoCount = this->UQFICount;
this->CreateInfo.pQueueCreateInfos = this->QueueCreateInfo;
this->CreateInfo.enabledLayerCount = 0;
this->CreateInfo.ppEnabledLayerNames = NULL;
if (this->Device->is_extension_list_supported(aExtensionCount, aExtensionList)) {
this->CreateInfo.enabledExtensionCount = aExtensionCount;
this->CreateInfo.ppEnabledExtensionNames = aExtensionList;
}
else {
this->CreateInfo.enabledExtensionCount = 0;
this->CreateInfo.ppEnabledExtensionNames = NULL;
}
this->CreateInfo.pEnabledFeatures = &this->Device->Features;
Result = vkCreateDevice(this->Device->handle(), &this->CreateInfo, NULL, &this->Handle);
// Now get queues from device.
size_t QueueArrayOffset = 0;
for (int i = 0; i < this->UQFICount; i++) {
for (uint32_t j = 0; j < QueueFamilyProperty[this->UQFI[i]].queueCount; j++) {
size_t Index = j + QueueArrayOffset;
this->Queue[Index].i = this->UQFI[i];
this->Queue[Index].j = j;
vkGetDeviceQueue(this->Handle, this->UQFI[i], j, &this->Queue[Index].Handle);
}
QueueArrayOffset += QueueFamilyProperty[this->UQFI[i]].queueCount;
}
for (int i = 0; i < 3; i++) {
this->PoolCreateInfo[i].sType = VkStructureType::VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
this->PoolCreateInfo[i].pNext = NULL;
}
// VK_COMMAND_POOL_CREATE_TRANSIENT_BIT
// Will be used for one time submits and short lived command buffers.
// This will be useful in object construction and uploading.
// VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
// Allows individual command buffers to be reset.
// One time submit pool
// Transfer operations.
this->PoolCreateInfo[0].flags = VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_TRANSIENT_BIT | VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
this->PoolCreateInfo[0].queueFamilyIndex = this->qfi(device::qfs::TRANSFER);
// Compute operations.
this->PoolCreateInfo[1].flags = VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_TRANSIENT_BIT | VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
this->PoolCreateInfo[1].queueFamilyIndex = this->qfi(device::qfs::COMPUTE);
// Graphics operations.
this->PoolCreateInfo[2].flags = VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_TRANSIENT_BIT | VkCommandPoolCreateFlagBits::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
this->PoolCreateInfo[2].queueFamilyIndex = this->qfi(device::qfs::GRAPHICS);
for (int i = 0; i < 3; i++) {
if (this->QFI[i] != -1) {
Result = vkCreateCommandPool(this->Handle, &this->PoolCreateInfo[i], NULL, &this->Pool[i]);
}
else {
this->Pool[i] = VK_NULL_HANDLE;
}
this->CommandBufferCount[i] = 0;
this->CommandBuffer[i] = NULL;
}
this->Engine->submit(this);
}
context::~context() {
// lock so context can be safely removed from engine instance.
this->Mutex.lock();
this->Engine->remove(this);
// Clear all command buffers and pools.
for (int i = 0; i < 3; i++) {
if (this->CommandBufferCount[i] > 0) {
vkFreeCommandBuffers(this->Handle, this->Pool[i], this->CommandBufferCount[i], this->CommandBuffer[i]);
}
free(this->CommandBuffer[i]); this->CommandBuffer[i] = NULL;
this->CommandBufferCount[i] = 0;
vkDestroyCommandPool(this->Handle, this->Pool[i], NULL);
this->Pool[i] = VK_NULL_HANDLE;
}
delete[] this->Queue; this->Queue = nullptr;
this->QueueCount = 0;
vkDestroyDevice(this->Handle, NULL); this->Handle = VK_NULL_HANDLE;
free(this->QueueCreateInfo); this->QueueCreateInfo = NULL;
if (this->QueueFamilyPriority != NULL) {
for (int i = 0; i < this->UQFICount; i++) {
free(this->QueueFamilyPriority[i]); this->QueueFamilyPriority[i] = NULL;
}
}
free(this->QueueFamilyPriority); this->QueueFamilyPriority = NULL;
for (int i = 0; i < 4; i++) {
this->QFI[i] = -1;
this->UQFI[i] = -1;
}
this->UQFICount = 0;
this->Support = 0;
this->Engine = nullptr;
this->Device = nullptr;
this->Mutex.unlock();
}
int context::qfi(device::qfs aQFS) {
switch (aQFS) {
default : return -1;
case device::qfs::TRANSFER : return this->QFI[0];
case device::qfs::COMPUTE : return this->QFI[1];
case device::qfs::GRAPHICS : return this->QFI[2];
case device::qfs::PRESENT : return this->QFI[3];
}
return 0;
}
bool context::available(device::qfs aQFS) {
return (this->qfi(aQFS) != -1);
}
VkCommandBuffer context::create(device::qfs aQFS) {
VkCommandBuffer temp = VK_NULL_HANDLE;
this->create(aQFS, 1, &temp);
return temp;
}
VkResult context::create(device::qfs aQFS, uint32_t aCommandBufferCount, VkCommandBuffer* aCommandBuffer) {
VkResult Result = VkResult::VK_INCOMPLETE;
if ((this->qfi(aQFS) < 0) || (aCommandBufferCount == 0) || (aCommandBuffer == NULL)) return Result;
int i;
switch (aQFS) {
default: return Result;
case device::qfs::TRANSFER: i = 0; break;
case device::qfs::COMPUTE: i = 1; break;
case device::qfs::GRAPHICS: i = 2; break;
}
// Pool is invalid.
if (this->Pool[i] == VK_NULL_HANDLE) return Result;
VkCommandBufferAllocateInfo AllocateInfo{};
AllocateInfo.sType = VkStructureType::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
AllocateInfo.pNext = NULL;
AllocateInfo.commandPool = this->Pool[i];
AllocateInfo.level = VkCommandBufferLevel::VK_COMMAND_BUFFER_LEVEL_PRIMARY;
AllocateInfo.commandBufferCount = aCommandBufferCount;
this->Mutex.lock();
// Check if allocation is succesful.
Result = vkAllocateCommandBuffers(this->Handle, &AllocateInfo, aCommandBuffer);
if (Result != VkResult::VK_SUCCESS) {
this->Mutex.unlock();
return Result;
}
// alloc/realloc command buffer memory pool.
void* nptr = NULL;
if (this->CommandBuffer[i] == NULL) {
nptr = malloc(aCommandBufferCount * sizeof(VkCommandBuffer));
}
else {
nptr = realloc(this->CommandBuffer[i], (aCommandBufferCount + this->CommandBufferCount[i]) * sizeof(VkCommandBuffer));
}
// Out of host memory.
if (nptr == NULL) {
Result = VkResult::VK_ERROR_OUT_OF_HOST_MEMORY;
vkFreeCommandBuffers(this->Handle, this->Pool[i], aCommandBufferCount, aCommandBuffer);
for (size_t j = 0; j < aCommandBufferCount; j++) {
aCommandBuffer[j] = VK_NULL_HANDLE;
}
this->Mutex.unlock();
return Result;
}
// Copy new pointer over.
this->CommandBuffer[i] = (VkCommandBuffer*)nptr;
// Store new command buffers.
std::memcpy(&(this->CommandBuffer[i][this->CommandBufferCount[i]]), aCommandBuffer, aCommandBufferCount * sizeof(VkCommandBuffer));
//for (int j = this->CommandBufferCount[i]; j < aCommandBufferCount + this->CommandBufferCount[i]; j++) {
// this->CommandBuffer[i][j] = aCommandBuffer[j - this->CommandBufferCount[i]];
//}
// Account for new buffer count.
this->CommandBufferCount[i] += aCommandBufferCount;
this->Mutex.unlock();
return Result;
}
void context::destroy(device::qfs aQFS, VkCommandBuffer& aCommandBuffer) {
this->destroy(aQFS, 1, &aCommandBuffer);
}
void context::destroy(device::qfs aQFS, uint32_t aCommandBufferCount, VkCommandBuffer* aCommandBuffer) {
if ((this->qfi(aQFS) < 0) || (aCommandBufferCount == 0) || (aCommandBuffer == NULL)) return;
// Takes a list of aggregated command buffers and cross references them
// with already created command buffers.
int Index;
switch (aQFS) {
default: return;
case device::qfs::TRANSFER: Index = 0; break;
case device::qfs::COMPUTE: Index = 1; break;
case device::qfs::GRAPHICS: Index = 2; break;
}
if (this->Pool[Index] == VK_NULL_HANDLE) return;
// Match
int MatchCount = 0;
VkCommandBuffer* MatchBuffer = NULL;
VkCommandBuffer* NewBuffer = NULL;
this->Mutex.lock();
// Count number of matches.
for (uint32_t i = 0; i < this->CommandBufferCount[Index]; i++) {
for (uint32_t j = 0; j < aCommandBufferCount; j++) {
if (this->CommandBuffer[Index][i] == aCommandBuffer[j]) {
MatchCount += 1;
}
}
}
// No command buffers matched.
if (MatchCount == 0) {
this->Mutex.unlock();
return;
}
// Clears all command buffer with family in question.
if (MatchCount == this->CommandBufferCount[Index]) {
for (uint32_t i = 0; i < this->CommandBufferCount[Index]; i++) {
for (uint32_t j = 0; j < aCommandBufferCount; j++) {
if (this->CommandBuffer[Index][i] == aCommandBuffer[j]) {
aCommandBuffer[j] = VK_NULL_HANDLE;
}
}
}
vkFreeCommandBuffers(this->Handle, this->Pool[Index], aCommandBufferCount, aCommandBuffer);
free(this->CommandBuffer[Index]);
this->CommandBuffer[Index] = NULL;
this->CommandBufferCount[Index] = 0;
this->Mutex.unlock();
return;
}
MatchBuffer = (VkCommandBuffer*)malloc(MatchCount * sizeof(VkCommandBuffer));
NewBuffer = (VkCommandBuffer*)malloc((this->CommandBufferCount[Index] - MatchCount) * sizeof(VkCommandBuffer));
// Memory allocation failure.
if ((MatchBuffer == NULL) || (NewBuffer == NULL)) {
free(MatchBuffer);
MatchBuffer = NULL;
free(NewBuffer);
NewBuffer = NULL;
this->Mutex.unlock();
return;
}
int m = 0;
int n = 0;
// Iterate through pre existing buffers and compare.
for (uint32_t i = 0; i < this->CommandBufferCount[Index]; i++) {
bool isFound = false;
int FoundIndex = -1;
// Compare to proposed buffers.
for (uint32_t j = 0; j < aCommandBufferCount; j++) {
if (this->CommandBuffer[Index][i] == aCommandBuffer[j]) {
isFound = true;
FoundIndex = j;
break;
}
}
if (isFound) {
// If match, move to MatchBuffer;
MatchBuffer[m] = aCommandBuffer[FoundIndex];
aCommandBuffer[FoundIndex] = VK_NULL_HANDLE;
m += 1;
}
else {
NewBuffer[n] = this->CommandBuffer[Index][i];
n += 1;
}
}
vkFreeCommandBuffers(this->Handle, this->Pool[Index], MatchCount, MatchBuffer);
free(MatchBuffer);
MatchBuffer = NULL;
free(this->CommandBuffer[Index]);
this->CommandBuffer[Index] = NewBuffer;
this->CommandBufferCount[Index] = this->CommandBufferCount[Index] - MatchCount;
this->Mutex.unlock();
return;
}
VkResult context::submit(device::qfs aQFS, uint32_t aSubmissionCount, VkSubmitInfo* aSubmission, VkFence aFence) {
VkResult Result = VkResult::VK_INCOMPLETE;
if ((aSubmissionCount < 1) || (aSubmission == NULL) || (this->qfi(aQFS) == -1)) return Result;
// When placing an execution submission, thread must find
// and available queue to submit to.
uint32_t QueueFamilyCount = 0;
const VkQueueFamilyProperties* QueueFamilyProperty = this->Device->get_queue_families(&QueueFamilyCount);
int lQFI = this->qfi(aQFS);
int Offset = 0;
int lQueueCount = 0;
for (int i = 0; i < this->UQFICount; i++) {
if (this->UQFI[i] == lQFI) {
lQueueCount = QueueFamilyProperty[this->UQFI[i]].queueCount;
break;
}
Offset += QueueFamilyProperty[this->UQFI[i]].queueCount;
}
int i = 0;
while (true) {
int Index = i + Offset;
if (this->Queue[Index].Mutex.try_lock()) {
Result = vkQueueSubmit(this->Queue[Index].Handle, aSubmissionCount, aSubmission, aFence);
this->Queue[Index].Mutex.unlock();
break;
}
i += 1;
if (i == lQueueCount) {
i = 0;
}
}
return Result;
}
VkResult context::present(VkPresentInfoKHR* aPresentation) {
VkResult Result = VkResult::VK_INCOMPLETE;
if ((aPresentation == NULL) || (this->qfi(device::qfs::PRESENT) == -1)) return Result;
uint32_t QueueFamilyCount = 0;
const VkQueueFamilyProperties* QueueFamilyProperty = this->Device->get_queue_families(&QueueFamilyCount);
int lQFI = this->qfi(device::qfs::PRESENT);
int Offset = 0;
int lQueueCount = 0;
for (int i = 0; i < this->UQFICount; i++) {
if (this->UQFI[i] == lQFI) {
lQueueCount = QueueFamilyProperty[this->UQFI[i]].queueCount;
break;
}
Offset += QueueFamilyProperty[this->UQFI[i]].queueCount;
}
int i = 0;
while (true) {
int Index = i + Offset;
if (this->Queue[Index].Mutex.try_lock()) {
Result = vkQueuePresentKHR(this->Queue[Index].Handle, aPresentation);
this->Queue[Index].Mutex.unlock();
break;
}
i += 1;
if (i == lQueueCount) {
i = 0;
}
}
return Result;
}
VkInstance context::inst() {
return this->Device->inst();
}
device* context::parent() {
return this->Device;
}
VkDevice context::handle() {
return this->Handle;
}
context::queue::queue() {
this->i = 0;
this->j = 0;
this->Handle = VK_NULL_HANDLE;
}
}
| 31.768939
| 182
| 0.670442
|
ShaderKitty
|
4001eb3c7bd2196ab1f7e6840bcae7bf762de7e6
| 587
|
cpp
|
C++
|
VGP242/02_HelloDirectX/TestState.cpp
|
TheJimmyGod/JimmyGod_Engine
|
b9752c6fbd9db17dc23f03330b5e4537bdcadf8e
|
[
"MIT"
] | null | null | null |
VGP242/02_HelloDirectX/TestState.cpp
|
TheJimmyGod/JimmyGod_Engine
|
b9752c6fbd9db17dc23f03330b5e4537bdcadf8e
|
[
"MIT"
] | null | null | null |
VGP242/02_HelloDirectX/TestState.cpp
|
TheJimmyGod/JimmyGod_Engine
|
b9752c6fbd9db17dc23f03330b5e4537bdcadf8e
|
[
"MIT"
] | null | null | null |
#include "TestState.h"
using namespace JimmyGod::Input;
using namespace JimmyGod::Graphics;
void RedState::Initialize()
{
GraphicsSystem::Get()->SetClearColor(Colors::Red);
}
void RedState::Update(float deltaTime)
{
if (InputSystem::Get()->IsKeyPressed(KeyCode::SPACE))
JimmyGod::MainApp().ChangeState("BlueState");
}
void BlueState::Initialize()
{
GraphicsSystem::Get()->SetClearColor(Colors::Blue);
}
void BlueState::Update(float deltaTime)
{
if (InputSystem::Get()->IsKeyPressed(KeyCode::SPACE))
JimmyGod::MainApp().ChangeState("RedState");
}
| 20.964286
| 55
| 0.701874
|
TheJimmyGod
|
40097bbe2ad5f27fcbf7571e80c39d1b31db7630
| 3,628
|
cpp
|
C++
|
src/DetectorConstruction.cpp
|
tgblackburn/dreamt
|
71adf27ad276dc1c949831c28a510c256b18e86c
|
[
"MIT"
] | 1
|
2021-02-08T12:37:59.000Z
|
2021-02-08T12:37:59.000Z
|
src/DetectorConstruction.cpp
|
tgblackburn/dreamt
|
71adf27ad276dc1c949831c28a510c256b18e86c
|
[
"MIT"
] | null | null | null |
src/DetectorConstruction.cpp
|
tgblackburn/dreamt
|
71adf27ad276dc1c949831c28a510c256b18e86c
|
[
"MIT"
] | null | null | null |
#include <DetectorConstruction.hpp>
#include <G4NistManager.hh>
#include <G4Material.hh>
#include <G4Box.hh>
#include <G4LogicalVolume.hh>
#include <G4VPhysicalVolume.hh>
#include <G4PVPlacement.hh>
using namespace CLHEP;
static G4Material *PPMI (void);
DetectorConstruction::DetectorConstruction (const G4String &materialName, G4double thickness)
{
fMaterialName = materialName;
fThickness = thickness;
}
DetectorConstruction::~DetectorConstruction ()
{
}
G4VPhysicalVolume *DetectorConstruction::Construct()
{
G4NistManager *nist = G4NistManager::Instance();
G4Material *material = NULL;
if (fMaterialName == "PPMI")
material = PPMI();
else
material = nist->FindOrBuildMaterial (fMaterialName);
if (!material)
G4cerr << "Material " << fMaterialName << " not found." << G4endl;
G4Material *vacuum = new G4Material ("intergalactic", // name
1, // atomic number
1.008 * g/mole, // mass per mole
1.0e-25 * g/cm3, // mass density
kStateGas,
2.73 * kelvin, // temperature
3.0e-18 * pascal); // pressure
// Start by making the world.
G4Box *worldBox = new G4Box ("worldBox", 0.1*m, 0.1*m, 0.1*m);
G4LogicalVolume *logicWorld = new G4LogicalVolume (worldBox, vacuum, "world");
G4VPhysicalVolume *physWorld = new G4PVPlacement (0, // no rotation
G4ThreeVector(), // at origin
logicWorld, // which logical vol
"world", // name of above
0, // no mother volume
false, // not used!
0); // copy ID
// Make targets etc
if (material)
{
G4Box *foilBox = new G4Box ("foilBox", 0.5 * fThickness, 0.08*m, 0.08*m);
G4LogicalVolume *logicFoil = new G4LogicalVolume (foilBox, material, "foil");
G4VPhysicalVolume *physFoil = new G4PVPlacement (0,
G4ThreeVector(),
logicFoil,
"foil",
logicWorld, // world is mother
false,
0);
G4cout << "Loaded foil of " << fMaterialName << ", thickness " << fThickness/CLHEP::um << " microns." << G4endl;
G4cout << material << G4endl;
}
return physWorld;
}
G4Material *PPMI (void)
{
G4Element *hydrogen = new G4Element ("Hydrogen", "H", 1.0, 1.01*g/mole);
G4Element *carbon = new G4Element ("Carbon", "C", 6.0, 12.01*g/mole);
G4Element *nitrogen = new G4Element ("Nitrogen", "N", 7.0, 14.01*g/mole);
G4Element *oxygen = new G4Element ("Oxygen", "O", 8.0, 16.01*g/mole);
G4Material *PPMI = new G4Material ("Polypyromellitimide", 1.4*g/cm3, 4);
PPMI->AddElement (carbon, 22);
PPMI->AddElement (hydrogen, 10);
PPMI->AddElement (nitrogen, 2);
PPMI->AddElement (oxygen, 5);
return PPMI;
}
/*
G4Material *makeKapton (void)
{
G4String name, symbol;
G4double a, z;
G4double density;
G4int nel, ncomponents;
// define Elements
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
// Kapton Dupont de Nemur (density: 1.396-1.430, get middle )
density = 1.413*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=4);
Kapton->AddElement(elO,5);
Kapton->AddElement(elC,22);
Kapton->AddElement(elN,2);
Kapton->AddElement(elH,10);
return Kapton;
}
*/
| 27.694656
| 116
| 0.615215
|
tgblackburn
|
400f599213347756100576bd82cf44058f69d32c
| 2,567
|
cpp
|
C++
|
src/math/perlin.cpp
|
minalear/Kingdom
|
b4f7f235d37764ffa0ba6d1a42a7d7b9b1f83d5a
|
[
"MIT"
] | null | null | null |
src/math/perlin.cpp
|
minalear/Kingdom
|
b4f7f235d37764ffa0ba6d1a42a7d7b9b1f83d5a
|
[
"MIT"
] | null | null | null |
src/math/perlin.cpp
|
minalear/Kingdom
|
b4f7f235d37764ffa0ba6d1a42a7d7b9b1f83d5a
|
[
"MIT"
] | null | null | null |
#include "perlin.h"
#include <cmath>
#include <random>
#include <algorithm>
#include <numeric>
#include "func.h"
Perlin::Perlin() {
// initalize permutation vector
p = {
151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,
8,99,37,240,21,10,23,190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,
35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,
134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,
55,46,245,40,244,102,143,54, 65,25,63,161,1,216,80,73,209,76,132,187,208, 89,
18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,
250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,
189,28,42,223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167,
43,172,9,129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,
97,228,251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,
107,49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180 };
// duplicate the permutation
p.insert(p.end(), p.begin(), p.end());
}
Perlin::Perlin(uint32_t seed) {
SetNewSeed(seed);
}
float Perlin::fade(float t) {
return t * t * t * (t * (t * 6 - 15) + 10);
}
float Perlin::grad(int hash, float x, float y, float z) {
int h = hash & 15;
float u = h < 8 ? x : y, v = h < 4 ? y : h == 12 || h == 14 ? x : z;
return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
}
float Perlin::Noise(float x, float y, float z) const {
int X = (int)floor(x) & 255;
int Y = (int)floor(y) & 255;
int Z = (int)floor(z) & 255;
x -= floor(x);
y -= floor(y);
z -= floor(z);
float u = fade(x);
float v = fade(y);
float w = fade(z);
int A = p[X] + Y;
int AA = p[A] + Z;
int AB = p[A + 1] + Z;
int B = p[X + 1] + Y;
int BA = p[B] + Z;
int BB = p[B + 1] + Z;
float res = lerp(w, lerp(v, lerp(u, grad(p[AA], x, y, z), grad(p[BA], x-1, y, z)), lerp(u, grad(p[AB], x, y-1, z), grad(p[BB], x-1, y-1, z))), lerp(v, lerp(u, grad(p[AA+1], x, y, z-1), grad(p[BA+1], x-1, y, z-1)), lerp(u, grad(p[AB+1], x, y-1, z-1), grad(p[BB+1], x-1, y-1, z-1))));
return (res + 1.f) / 2.f;
}
void Perlin::SetNewSeed(uint32_t seed) {
p.clear();
p.resize(256);
std::iota(p.begin(), p.end(), 0);
std::default_random_engine engine(seed);
std::shuffle(p.begin(), p.end(), engine);
p.insert(p.end(), p.begin(), p.end());
}
| 34.226667
| 284
| 0.574211
|
minalear
|
401171c9a255897b243d6e2816efd5b19a918089
| 3,500
|
cpp
|
C++
|
tests/class/methods.test.cpp
|
pshoben/reflang
|
bf3532bbd8e18d43ac538d44d13c37ee6fbc6a35
|
[
"MIT"
] | 263
|
2016-12-31T22:17:16.000Z
|
2022-03-25T06:28:27.000Z
|
tests/class/methods.test.cpp
|
pshoben/reflang
|
bf3532bbd8e18d43ac538d44d13c37ee6fbc6a35
|
[
"MIT"
] | 2
|
2018-04-06T15:09:38.000Z
|
2022-03-21T07:23:51.000Z
|
tests/class/methods.test.cpp
|
pshoben/reflang
|
bf3532bbd8e18d43ac538d44d13c37ee6fbc6a35
|
[
"MIT"
] | 27
|
2017-01-01T00:06:43.000Z
|
2022-01-10T14:32:33.000Z
|
#include "methods.src.hpp"
#include "methods.gen.hpp"
#define CATCH_CONFIG_MAIN
#include "tests/catch.hpp"
using namespace reflang;
using namespace std;
// MyClass method implementations
int global_int = 0;
void MyClass::Method0() { ++global_int; }
void MyClass::Method1(bool b, int i)
{
if (b)
{
global_int = i;
}
}
bool MyClass::RMethod0() { ++global_int; return true; }
bool MyClass::RMethod1(bool b, int i) { global_int = i; return b; }
void MyClass::VirtualMethod() { ++global_int; }
void MyClass::ConstMethod() const { ++global_int; }
void MyClass::MethodWithClassArg(ComplexArgument arg) { global_int = arg.i; }
void MyClass::MethodWithPointerArg(int* p) { global_int = *p; }
void MyClass::MethodWithConstReferenceArg0(const int& i) { global_int = i; }
void MyClass::MethodWithConstReferenceArg1(const ComplexArgument& arg) { global_int = arg.i; }
TEST_CASE("simple-methods")
{
MyClass c;
Method<decltype(&MyClass::Method0), &MyClass::Method0> m0;
global_int = 0;
Object result = m0(c);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 1);
Method<decltype(&MyClass::Method1), &MyClass::Method1> m1;
global_int = 0;
result = m1(c, false, 100);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 0);
result = m1(c, true, 100);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 100);
}
TEST_CASE("return-value-methods")
{
MyClass c;
Method<decltype(&MyClass::RMethod0), &MyClass::RMethod0> rm0;
global_int = 0;
Object result = rm0(c);
REQUIRE(result.GetT<bool>() == true);
REQUIRE(global_int == 1);
Method<decltype(&MyClass::RMethod1), &MyClass::RMethod1> rm1;
global_int = 0;
result = rm1(c, true, 100);
REQUIRE(result.GetT<bool>() == true);
REQUIRE(global_int == 100);
result = rm1(c, false, 200);
REQUIRE(result.GetT<bool>() == false);
REQUIRE(global_int == 200);
}
TEST_CASE("virtual-method")
{
MyClass c;
Method<decltype(&MyClass::VirtualMethod), &MyClass::VirtualMethod> vm;
global_int = 0;
Object result = vm(c);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 1);
}
TEST_CASE("const-method")
{
MyClass c;
Method<decltype(&MyClass::ConstMethod), &MyClass::ConstMethod> cm;
global_int = 0;
Object result = cm(c);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 1);
}
TEST_CASE("class-argument")
{
MyClass c;
Method<decltype(&MyClass::MethodWithClassArg), &MyClass::MethodWithClassArg> carg;
global_int = 0;
Object result = carg(c, ComplexArgument{ 123 });
REQUIRE(result.IsVoid());
REQUIRE(global_int == 123);
}
TEST_CASE("pointer-argument")
{
MyClass c;
Method<decltype(&MyClass::MethodWithPointerArg), &MyClass::MethodWithPointerArg> pm;
global_int = 0;
int i = 123;
Object result = pm(c, &i);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 123);
}
TEST_CASE("const-ref-argument")
{
MyClass c;
Method<decltype(&MyClass::MethodWithConstReferenceArg0), &MyClass::MethodWithConstReferenceArg0> cr0;
global_int = 0;
Object result = cr0(c, 123);
REQUIRE(result.IsVoid());
REQUIRE(global_int == 123);
Method<decltype(&MyClass::MethodWithConstReferenceArg1), &MyClass::MethodWithConstReferenceArg1> cr1;
global_int = 0;
result = cr1(c, ComplexArgument{ 456 });
REQUIRE(result.IsVoid());
REQUIRE(global_int == 456);
}
TEST_CASE("get-method")
{
MyClass c;
Class<MyClass> metadata;
REQUIRE(metadata.GetMethod("non-existing").empty());
auto methods = metadata.GetMethod("Method0");
REQUIRE(methods.size() == 1);
global_int = 0;
auto& method = *(methods[0].get());
method(c);
REQUIRE(global_int == 1);
}
| 24.137931
| 102
| 0.705143
|
pshoben
|
40155b03f24c2a388f9880b5d5b236795592c817
| 3,508
|
hpp
|
C++
|
src/Elliptic/BoundaryConditions/Tags/BoundaryFields.hpp
|
nilsvu/spectre
|
1455b9a8d7e92db8ad600c66f54795c29c3052ee
|
[
"MIT"
] | 117
|
2017-04-08T22:52:48.000Z
|
2022-03-25T07:23:36.000Z
|
src/Elliptic/BoundaryConditions/Tags/BoundaryFields.hpp
|
GitHimanshuc/spectre
|
4de4033ba36547113293fe4dbdd77591485a4aee
|
[
"MIT"
] | 3,177
|
2017-04-07T21:10:18.000Z
|
2022-03-31T23:55:59.000Z
|
src/Elliptic/BoundaryConditions/Tags/BoundaryFields.hpp
|
geoffrey4444/spectre
|
9350d61830b360e2d5b273fdd176dcc841dbefb0
|
[
"MIT"
] | 85
|
2017-04-07T19:36:13.000Z
|
2022-03-01T10:21:00.000Z
|
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include "DataStructures/DataBox/PrefixHelpers.hpp"
#include "DataStructures/DataBox/Prefixes.hpp"
#include "DataStructures/DataBox/Tag.hpp"
#include "DataStructures/DataVector.hpp"
#include "DataStructures/SliceVariables.hpp"
#include "Domain/Structure/Element.hpp"
#include "Domain/Structure/IndexToSliceAt.hpp"
#include "Domain/Tags.hpp"
#include "Domain/Tags/FaceNormal.hpp"
#include "Domain/Tags/Faces.hpp"
#include "NumericalAlgorithms/DiscontinuousGalerkin/NormalDotFlux.hpp"
#include "NumericalAlgorithms/Spectral/Mesh.hpp"
#include "Utilities/ErrorHandling/Assert.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/TMPL.hpp"
namespace elliptic::Tags {
/// The `FieldsTag` on external boundaries
template <size_t Dim, typename FieldsTag>
struct BoundaryFieldsCompute : db::ComputeTag,
domain::Tags::Faces<Dim, FieldsTag> {
using base = domain::Tags::Faces<Dim, FieldsTag>;
using return_type = typename base::type;
using argument_tags = tmpl::list<FieldsTag, domain::Tags::Mesh<Dim>,
domain::Tags::Element<Dim>>;
static void function(const gsl::not_null<return_type*> vars_on_face,
const typename FieldsTag::type& vars,
const Mesh<Dim>& mesh, const Element<Dim>& element) {
ASSERT(mesh.quadrature(0) == Spectral::Quadrature::GaussLobatto,
"Slicing fields to the boundary currently supports only "
"Gauss-Lobatto grids. Add support to "
"'elliptic::Tags::BoundaryFieldsCompute'.");
for (const auto& direction : element.external_boundaries()) {
data_on_slice(make_not_null(&((*vars_on_face)[direction])), vars,
mesh.extents(), direction.dimension(),
index_to_slice_at(mesh.extents(), direction));
}
}
};
/// The `::Tags::NormalDotFlux<FieldsTag>` on external boundaries
template <size_t Dim, typename FieldsTag, typename FluxesTag>
struct BoundaryFluxesCompute
: db::ComputeTag,
domain::Tags::Faces<
Dim, db::add_tag_prefix<::Tags::NormalDotFlux, FieldsTag>> {
using base =
domain::Tags::Faces<Dim,
db::add_tag_prefix<::Tags::NormalDotFlux, FieldsTag>>;
using return_type = typename base::type;
using argument_tags =
tmpl::list<FluxesTag,
domain::Tags::Faces<Dim, domain::Tags::FaceNormal<Dim>>,
domain::Tags::Mesh<Dim>, domain::Tags::Element<Dim>>;
static void function(
const gsl::not_null<return_type*> normal_dot_fluxes,
const typename FluxesTag::type& fluxes,
const DirectionMap<Dim, tnsr::i<DataVector, Dim>>& face_normals,
const Mesh<Dim>& mesh, const Element<Dim>& element) {
ASSERT(mesh.quadrature(0) == Spectral::Quadrature::GaussLobatto,
"Slicing fluxes to the boundary currently supports only "
"Gauss-Lobatto grids. Add support to "
"'elliptic::Tags::BoundaryFluxesCompute'.");
for (const auto& direction : element.external_boundaries()) {
const auto fluxes_on_face =
data_on_slice(fluxes, mesh.extents(), direction.dimension(),
index_to_slice_at(mesh.extents(), direction));
normal_dot_flux(make_not_null(&((*normal_dot_fluxes)[direction])),
face_normals.at(direction), fluxes_on_face);
}
}
};
} // namespace elliptic::Tags
| 42.26506
| 80
| 0.673318
|
nilsvu
|
40199d1578252878431d6e1524ed70d951155d49
| 4,359
|
cpp
|
C++
|
yellow/w2_02_01_func_test.cpp
|
avptin/coursera-c-plus-plus
|
18146f023998a073ee8e34315789d049b7fa0d7c
|
[
"MIT"
] | null | null | null |
yellow/w2_02_01_func_test.cpp
|
avptin/coursera-c-plus-plus
|
18146f023998a073ee8e34315789d049b7fa0d7c
|
[
"MIT"
] | null | null | null |
yellow/w2_02_01_func_test.cpp
|
avptin/coursera-c-plus-plus
|
18146f023998a073ee8e34315789d049b7fa0d7c
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, const vector<T>& s) {
os << "{";
bool first = true;
for (const auto& x : s) {
if (!first) {
os << ", ";
}
first = false;
os << x;
}
return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& s) {
os << "{";
bool first = true;
for (const auto& x : s) {
if (!first) {
os << ", ";
}
first = false;
os << x;
}
return os << "}";
}
template <class K, class V>
ostream& operator<<(ostream& os, const map<K, V>& m) {
os << "{";
bool first = true;
for (const auto& kv : m) {
if (!first) {
os << ", ";
}
first = false;
os << kv.first << ": " << kv.second;
}
return os << "}";
}
template <class T, class U>
void AssertEqual(const T& t, const U& u, const string& hint = {}) {
if (t != u) {
ostringstream os;
os << "Assertion failed: " << t << " != " << u;
if (!hint.empty()) {
os << " hint: " << hint;
}
throw runtime_error(os.str());
}
}
void Assert(bool b, const string& hint) { AssertEqual(b, true, hint); }
class TestRunner {
public:
template <class TestFunc>
void RunTest(TestFunc func, const string& test_name) {
try {
func();
cerr << test_name << " OK" << endl;
} catch (exception& e) {
++fail_count;
cerr << test_name << " fail: " << e.what() << endl;
} catch (...) {
++fail_count;
cerr << "Unknown exception caught" << endl;
}
}
~TestRunner() {
if (fail_count > 0) {
cerr << fail_count << " unit tests failed. Terminate" << endl;
exit(1);
}
}
private:
int fail_count = 0;
};
/*
// 4x^2 + 3 = 0
// a = 4, b = 0, c = 3
int GetDistinctRealRootCount(double A, double B, double C) {
// найдём дискриминант
double D = B * B - 4 * A * C;
int result = 0;
// если A равно нулю, то уравнение линейное: Bx + C = 0
if (A == 0) {
// Bx = -C => x = -C / B
if (B != 0) {
// cout << -C / B << endl;
result = 1;
}
// если B равно нулю, корней нет
} else if (D == 0) { // случай с нулевым дискриминантом
// корень ровно один
// cout << -B / (2 * A) << endl;
result = 1;
} else if (D > 0) { // в случае с положительным дискриминантом корня два
double r1 = (-B + sqrt(D)) / (2 * A);
double r2 = (-B - sqrt(D)) / (2 * A);
// cout << r1 << " " << r2 << endl;
result = (r1 != r2) ? 2 : 1;
}
return result;
}
*/
void TestFunction(void) {
// double D = B * B - 4 * A * C;
// D = 0
AssertEqual(GetDistinctRealRootCount(2, 4, 2), 1,
"a = 2, b = 4, where c = 2 has 1 real root(s).");
AssertEqual(GetDistinctRealRootCount(-2, 4, -2), 1,
"a = -2, b = 4, where c = -2 has 1 real root(s).");
// D < 0
AssertEqual(GetDistinctRealRootCount(4, 2, 2), 0,
"a = 4, b = 2, where c = 2 has 0 real root(s).");
// D > 0
AssertEqual(GetDistinctRealRootCount(4, 1, 0), 2,
"a = 4, b = 1, where c = 0 has 2 real root(s).");
AssertEqual(GetDistinctRealRootCount(4, 4, 0), 2,
"a = 4, b = 4, where c = 0 has 2 real root(s).");
AssertEqual(GetDistinctRealRootCount(0, 2, 1), 1,
"a = 0, b = 2, where c = 1 has 1 real root(s).");
AssertEqual(GetDistinctRealRootCount(0, 2, 10000), 1,
"a = 0, b = 2, where c = 10000 has 1 real root(s).");
AssertEqual(GetDistinctRealRootCount(4, 0, 3), 0,
"a = 4, b = 0, where c = 3 has 0 real root(s).");
AssertEqual(GetDistinctRealRootCount(-4, 0, 36), 2,
"a = -4, b = 0, where c = 36 has 2 real root(s).");
AssertEqual(GetDistinctRealRootCount(-4, 0, -36), 0,
"a = -4, b = 0, where c = -36 has 0 real root(s).");
AssertEqual(GetDistinctRealRootCount(0, 0, 1), 0,
"a = 0, b = 0, where c = 1 has 0 real roots.");
AssertEqual(GetDistinctRealRootCount(0, 0, -10), 0,
"a = 0, b = 0, where c = -10 has 0 real roots.");
AssertEqual(GetDistinctRealRootCount(0, 0, 189238910), 0,
"a = 0, b = 0, where c = 189238910 has 0 real roots.");
}
int main() {
TestRunner runner;
runner.RunTest(TestFunction, "TestFunction");
return 0;
}
| 25.196532
| 75
| 0.523056
|
avptin
|
401c69831c8bcc90efbd102bd8ad4130c6dc0e6f
| 751
|
cpp
|
C++
|
Source/CurlFunctions.cpp
|
Mizugola/MeltingSagaUpdater
|
b9ebd8b4db39574526fff2703077ee4f76e9a65d
|
[
"MIT"
] | null | null | null |
Source/CurlFunctions.cpp
|
Mizugola/MeltingSagaUpdater
|
b9ebd8b4db39574526fff2703077ee4f76e9a65d
|
[
"MIT"
] | null | null | null |
Source/CurlFunctions.cpp
|
Mizugola/MeltingSagaUpdater
|
b9ebd8b4db39574526fff2703077ee4f76e9a65d
|
[
"MIT"
] | null | null | null |
#include "CurlFunctions.hpp"
namespace fn
{
namespace Curl
{
size_t write_data(void * ptr, size_t size, size_t nmemb, FILE * stream)
{
size_t written = fwrite(ptr, size, nmemb, stream);
return written;
}
void downloadFile(const std::string& link, const std::string& file)
{
CURL *curl;
FILE *fp;
CURLcode res;
const char* url = link.c_str();
const char* outfilename = file.c_str();
curl = curl_easy_init();
if (curl) {
fopen_s(&fp, outfilename, "wb");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
fclose(fp);
}
}
}
}
| 22.757576
| 73
| 0.667111
|
Mizugola
|
401cbd8ebf8b328b95d6358951d0f90c6c27305d
| 310
|
cpp
|
C++
|
2-Structural/08.Composite/src/Composite/Add.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | 21
|
2017-11-08T11:32:48.000Z
|
2021-03-29T08:58:04.000Z
|
2-Structural/08.Composite/src/Composite/Add.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | null | null | null |
2-Structural/08.Composite/src/Composite/Add.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | 8
|
2017-11-26T13:57:50.000Z
|
2021-08-23T06:52:57.000Z
|
#include "Composite/Add.h"
namespace GoF {
namespace Composite {
Add::Add(IOperand * left, IOperand * right)
: Expression(left, right)
{ }
double Add::calculate()
{
return leftOperand->calculate() + rightOperand->calculate();
}
}
}
| 16.315789
| 72
| 0.532258
|
gfa99
|
401e7eb777810b37ec4e0b40ce29181b149c08eb
| 9,504
|
cpp
|
C++
|
GTE/Samples/Graphics/BlendedTerrain/BlendedTerrainWindow3.cpp
|
lakinwecker/GeometricTools
|
cff3e3fcb52d714afe0b6789839c460437c10b27
|
[
"BSL-1.0"
] | null | null | null |
GTE/Samples/Graphics/BlendedTerrain/BlendedTerrainWindow3.cpp
|
lakinwecker/GeometricTools
|
cff3e3fcb52d714afe0b6789839c460437c10b27
|
[
"BSL-1.0"
] | 1
|
2022-03-18T00:34:13.000Z
|
2022-03-18T00:34:13.000Z
|
GTE/Samples/Graphics/BlendedTerrain/BlendedTerrainWindow3.cpp
|
lakinwecker/GeometricTools
|
cff3e3fcb52d714afe0b6789839c460437c10b27
|
[
"BSL-1.0"
] | 1
|
2022-03-17T21:54:55.000Z
|
2022-03-17T21:54:55.000Z
|
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.0.2022.01.06
#include "BlendedTerrainWindow3.h"
#include <Applications/WICFileIO.h>
#include <random>
BlendedTerrainWindow3::BlendedTerrainWindow3(Parameters& parameters)
:
Window3(parameters),
mFlowDelta(0.00002f),
mPowerDelta(1.125f),
mZAngle(0.0f),
mZDeltaAngle(0.00002f)
{
if (!SetEnvironment() || !CreateTerrain())
{
parameters.created = false;
return;
}
mWireState = std::make_shared<RasterizerState>();
mWireState->fill = RasterizerState::Fill::WIREFRAME;
CreateSkyDome();
InitializeCamera(60.0f, GetAspectRatio(), 0.01f, 100.0f, 0.005f, 0.002f,
{ 0.0f, -7.0f, 1.5f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f });
mPVWMatrices.Update();
}
void BlendedTerrainWindow3::OnIdle()
{
mTimer.Measure();
if (mCameraRig.Move())
{
mPVWMatrices.Update();
}
Update();
mEngine->ClearBuffers();
mEngine->Draw(mTerrain);
mEngine->Draw(mSkyDome);
mEngine->Draw(8, GetYSize() - 8, { 0.0f, 0.0f, 0.0f, 1.0f }, mTimer.GetFPS());
mEngine->DisplayColorBuffer(0);
mTimer.UpdateFrameCount();
}
bool BlendedTerrainWindow3::OnCharPress(uint8_t key, int32_t x, int32_t y)
{
switch (key)
{
case 'w':
case 'W':
if (mEngine->GetRasterizerState() == mWireState)
{
mEngine->SetDefaultRasterizerState();
}
else
{
mEngine->SetRasterizerState(mWireState);
}
return true;
case 'p':
case 'P':
mTerrainEffect->SetPowerFactor(mTerrainEffect->GetPowerFactor() * mPowerDelta);
mEngine->Update(mTerrainEffect->GetPowerFactorConstant());
return true;
case 'm':
case 'M':
mTerrainEffect->SetPowerFactor(mTerrainEffect->GetPowerFactor() / mPowerDelta);
mEngine->Update(mTerrainEffect->GetPowerFactorConstant());
return true;
}
return Window3::OnCharPress(key, x, y);
}
bool BlendedTerrainWindow3::SetEnvironment()
{
std::string path = GetGTEPath();
if (path == "")
{
return false;
}
mEnvironment.Insert(path + "/Samples/Graphics/BlendedTerrain/Shaders/");
mEnvironment.Insert(path + "/Samples/Data/");
std::vector<std::string> inputs =
{
"BTHeightField.png",
"BTGrass.png",
"BTStone.png",
"BTCloud.png",
"SkyDome.png",
"SkyDome.txt"
};
for (auto const& input : inputs)
{
if (mEnvironment.GetPath(input) == "")
{
LogError("Cannot find file " + input);
return false;
}
}
return true;
}
bool BlendedTerrainWindow3::CreateTerrain()
{
// Load the height field for vertex displacement.
std::string heightFile = mEnvironment.GetPath("BTHeightField.png");
// Create the visual effect.
bool created = false;
mTerrainEffect = std::make_shared<BlendedTerrainEffect>(mEngine,
mProgramFactory, mEnvironment, created);
if (!created)
{
LogError("Failed to create the terrain effect.");
return false;
}
// Create the vertex buffer for terrain.
uint32_t const numSamples0 = 64, numSamples1 = 64;
uint32_t const numVertices = numSamples0 * numSamples1;
struct TerrainVertex
{
Vector3<float> position;
Vector2<float> tcoord0;
float tcoord1;
Vector2<float> tcoord2;
};
VertexFormat vformat;
vformat.Bind(VASemantic::POSITION, DF_R32G32B32_FLOAT, 0);
vformat.Bind(VASemantic::TEXCOORD, DF_R32G32_FLOAT, 0);
vformat.Bind(VASemantic::TEXCOORD, DF_R32_FLOAT, 1);
vformat.Bind(VASemantic::TEXCOORD, DF_R32G32_FLOAT, 2);
auto vbuffer = std::make_shared<VertexBuffer>(vformat, numVertices);
// Generate the geometry for a flat height field.
TerrainVertex* vertex = vbuffer->Get<TerrainVertex>();
float const extent0 = 8.0f, extent1 = 8.0f;
float const inv0 = 1.0f / (static_cast<float>(numSamples0) - 1.0f);
float const inv1 = 1.0f / (static_cast<float>(numSamples1) - 1.0f);
Vector3<float> position{};
Vector2<float> tcoord{};
uint32_t i, i0, i1;
for (i1 = 0, i = 0; i1 < numSamples1; ++i1)
{
tcoord[1] = i1 * inv1;
position[1] = (2.0f * tcoord[1] - 1.0f) * extent1;
for (i0 = 0; i0 < numSamples0; ++i0, ++i)
{
tcoord[0] = i0 * inv0;
position[0] = (2.0f * tcoord[0] - 1.0f) * extent0;
vertex[i].position = position;
vertex[i].tcoord0 = tcoord;
vertex[i].tcoord1 = 0.0f;
vertex[i].tcoord2 = tcoord;
}
}
// Use a Mersenne twister engine for random numbers.
std::mt19937 mte;
std::uniform_real_distribution<float> symrnd(-1.0f, 1.0f);
// Set the heights based on a precomputed height field. The image is
// known to be 64x64, which matches numSamples0 and numSamples1. It is
// also gray scale, so we use only the red channel.
auto texture = WICFileIO::Load(heightFile, false);
uint8_t* image = texture->Get<uint8_t>();
for (i = 0; i < numVertices; i++)
{
float height = static_cast<float>(image[4 * i]) / 255.0f;
float perturb = 0.05f * symrnd(mte);
vertex[i].position[2] = 3.0f * height + perturb;
vertex[i].tcoord0 *= 8.0f;
vertex[i].tcoord1 = height;
}
// Generate the index array for a regular grid of squares, each square a
// pair of triangles.
uint32_t const numTriangles = 2 * (numSamples0 - 1) * (numSamples1 - 1);
auto ibuffer = std::make_shared<IndexBuffer>(IP_TRIMESH, numTriangles, sizeof(uint32_t));
uint32_t* indices = ibuffer->Get<uint32_t>();
for (i1 = 0, i = 0; i1 < numSamples1 - 1; ++i1)
{
for (i0 = 0; i0 < numSamples0 - 1; ++i0)
{
int32_t v0 = i0 + numSamples0 * i1;
int32_t v1 = v0 + 1;
int32_t v2 = v1 + numSamples0;
int32_t v3 = v0 + numSamples0;
*indices++ = v0;
*indices++ = v1;
*indices++ = v2;
*indices++ = v0;
*indices++ = v2;
*indices++ = v3;
}
}
// Create the visual object.
mTerrain = std::make_shared<Visual>(vbuffer, ibuffer, mTerrainEffect);
mPVWMatrices.Subscribe(mTerrain->worldTransform, mTerrainEffect->GetPVWMatrixConstant());
mTrackBall.Attach(mTerrain);
return true;
}
void BlendedTerrainWindow3::CreateSkyDome()
{
// Load the vertices and indices from file for the sky dome trimesh.
std::string name = mEnvironment.GetPath("SkyDome.txt");
std::ifstream inFile(name.c_str());
uint32_t numVertices, numIndices, i;
inFile >> numVertices;
inFile >> numIndices;
struct SkyDomeVertex
{
Vector3<float> position;
Vector2<float> tcoord;
};
VertexFormat vformat;
vformat.Bind(VASemantic::POSITION, DF_R32G32B32_FLOAT, 0);
vformat.Bind(VASemantic::TEXCOORD, DF_R32G32_FLOAT, 0);
auto vbuffer = std::make_shared<VertexBuffer>(vformat, numVertices);
auto* vertices = vbuffer->Get<SkyDomeVertex>();
for (i = 0; i < numVertices; ++i)
{
inFile >> vertices[i].position[0];
inFile >> vertices[i].position[1];
inFile >> vertices[i].position[2];
inFile >> vertices[i].tcoord[0];
inFile >> vertices[i].tcoord[1];
}
int32_t const numTriangles = numIndices / 3;
auto ibuffer = std::make_shared<IndexBuffer>(IP_TRIMESH, numTriangles, sizeof(uint32_t));
auto* indices = ibuffer->Get<int32_t>();
for (i = 0; i < numIndices; ++i, ++indices)
{
inFile >> *indices;
}
inFile.close();
// Load the sky texture.
name = mEnvironment.GetPath("SkyDome.png");
auto sky = WICFileIO::Load(name, true);
sky->AutogenerateMipmaps();
// Create the visual effect.
mSkyDomeEffect = std::make_shared<Texture2Effect>(mProgramFactory, sky,
SamplerState::Filter::MIN_L_MAG_L_MIP_L, SamplerState::Mode::WRAP, SamplerState::Mode::WRAP);
// Create the visual object.
mSkyDome = std::make_shared<Visual>(vbuffer, ibuffer, mSkyDomeEffect);
// The sky dome needs to be translated and scaled for this sample.
mSkyDome->localTransform.SetUniformScale(7.9f);
mSkyDome->localTransform.SetTranslation(0.0f, 0.0f, -0.1f);
mSkyDome->Update();
mPVWMatrices.Subscribe(mSkyDome->worldTransform, mSkyDomeEffect->GetPVWMatrixConstant());
mTrackBall.Attach(mSkyDome);
}
void BlendedTerrainWindow3::Update()
{
// Animate the cloud layer.
Vector2<float> flowDirection = mTerrainEffect->GetFlowDirection();
flowDirection[0] += mFlowDelta;
if (0.0f > flowDirection[0])
{
flowDirection[0] += 1.0f;
}
else if (1.0f < flowDirection[0])
{
flowDirection[0] -= 1.0f;
}
mTerrainEffect->SetFlowDirection(flowDirection);
mEngine->Update(mTerrainEffect->GetFlowDirectionConstant());
// Rotate the sky dome.
mZAngle -= mZDeltaAngle;
if (mZAngle < (float)-GTE_C_TWO_PI)
{
mZAngle += (float)GTE_C_TWO_PI;
}
mSkyDome->localTransform.SetRotation(
AxisAngle<4, float>({ 0.0f, 0.0f, 1.0f, 0.0f }, -mZAngle));
mSkyDome->Update();
mPVWMatrices.Update();
}
| 30.658065
| 101
| 0.622475
|
lakinwecker
|
40218141af0f7035e669f3a22d1ab9faa558bfa3
| 821
|
hpp
|
C++
|
third-party/include/tao/json/jaxn/is_identifier.hpp
|
ludchieng/IMAC-Lihowar
|
e5f551ab9958fa7d8fa4cbe07d0aa3555842b4fb
|
[
"BSL-1.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2
|
2020-03-09T06:24:46.000Z
|
2022-02-04T23:09:23.000Z
|
third-party/include/tao/json/jaxn/is_identifier.hpp
|
ludchieng/IMAC-Lihowar
|
e5f551ab9958fa7d8fa4cbe07d0aa3555842b4fb
|
[
"BSL-1.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null |
third-party/include/tao/json/jaxn/is_identifier.hpp
|
ludchieng/IMAC-Lihowar
|
e5f551ab9958fa7d8fa4cbe07d0aa3555842b4fb
|
[
"BSL-1.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2
|
2020-09-07T03:04:36.000Z
|
2022-02-04T23:09:24.000Z
|
// Copyright (c) 2017-2018 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/
#ifndef TAO_JSON_JAXN_IS_IDENTIFIER_HPP
#define TAO_JSON_JAXN_IS_IDENTIFIER_HPP
#include <cctype>
#include "../external/string_view.hpp"
namespace tao
{
namespace json
{
namespace jaxn
{
inline bool is_identifier( const tao::string_view v ) noexcept
{
if( v.empty() || std::isdigit( v[ 0 ] ) ) { // NOLINT
return false;
}
for( const auto c : v ) {
if( !std::isalnum( c ) && c != '_' ) { // NOLINT
return false;
}
}
return true;
}
} // namespace jaxn
} // namespace json
} // namespace tao
#endif
| 22.189189
| 74
| 0.538368
|
ludchieng
|
4023760fa55783ed4c72fceb095545d788e03167
| 1,774
|
cpp
|
C++
|
CMDResponse/TestMain.cpp
|
ahidaka/CMDResponse
|
939c28717f277aff1fb8894c9713e9ec9b8035b4
|
[
"MIT"
] | null | null | null |
CMDResponse/TestMain.cpp
|
ahidaka/CMDResponse
|
939c28717f277aff1fb8894c9713e9ec9b8035b4
|
[
"MIT"
] | null | null | null |
CMDResponse/TestMain.cpp
|
ahidaka/CMDResponse
|
939c28717f277aff1fb8894c9713e9ec9b8035b4
|
[
"MIT"
] | null | null | null |
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
//
// Defines
//
#define BUFFER_SIZE (4 * 1024 * 1024) // 4MB
#define COMMAND_TIMEOUT (100) //dwMilliseconds
DWORD CMDResponse(PCTSTR* cmdline, PSTR buf, DWORD size, DWORD timeout);
//
// Test Main
//
INT _tmain
(
INT argc, _TCHAR* argv[]
)
{
HANDLE hBuffer;
PSTR buffer;
TCHAR cmdline[] = _T("tasklist");
BOOL result;
printf("Start...\n");
hBuffer = HeapCreate(NULL, 0, 0);
if (hBuffer == NULL) {
fprintf(stderr, "Cannot create handle\n");
return(1);
}
buffer = (PSTR)HeapAlloc(
hBuffer,
HEAP_ZERO_MEMORY,
BUFFER_SIZE
);
if (buffer == NULL) {
fprintf(stderr, "Cannot allocate buffer, size=%d\n", BUFFER_SIZE);
return(1);
}
result = CMDResponse(
(PCTSTR*)cmdline,
buffer,
BUFFER_SIZE,
COMMAND_TIMEOUT
);
if (result == 0) {
fprintf(stderr, "CMDResponse error\n");
return(1);
}
printf("CMDResponse:<<%s>> length:%d\n", buffer, result);
#if _OUTPUT_DEBUG_
for (INT i = 0; i < 32; i++) {
printf(" %02X", (BYTE)buffer[i]);
}
printf("\n");
#endif
//
// Output to file
//
DWORD writtenSize = 0;
HANDLE h = CreateFile(
L"C:\\Windows\\Temp\\OutFile.txt",
GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL
);
if (h == INVALID_HANDLE_VALUE) {
fprintf(stderr, "CreateFile error!\n");
return(1);
}
if (WriteFile(h, buffer, result, &writtenSize, NULL) == 0) {
fprintf(stderr, "WriteFile error!\n");
return(1);
}
CloseHandle(h);
printf("End.\n");
return(0);
}
| 18.479167
| 74
| 0.543405
|
ahidaka
|
402729069d1c25e64a45384682bf48eb1bfb83bf
| 4,076
|
hpp
|
C++
|
src/main/include/control/ElevatorController.hpp
|
MattSa952073/PubSubLub
|
a20bd82d72f3d5a1599234d638afd578259f3553
|
[
"BSD-2-Clause"
] | null | null | null |
src/main/include/control/ElevatorController.hpp
|
MattSa952073/PubSubLub
|
a20bd82d72f3d5a1599234d638afd578259f3553
|
[
"BSD-2-Clause"
] | null | null | null |
src/main/include/control/ElevatorController.hpp
|
MattSa952073/PubSubLub
|
a20bd82d72f3d5a1599234d638afd578259f3553
|
[
"BSD-2-Clause"
] | null | null | null |
// Copyright (c) 2018-2019 FRC Team 3512. All Rights Reserved.
#pragma once
#include <Eigen/Core>
#include <frc/controller/StateSpaceController.h>
#include <frc/controller/StateSpaceObserver.h>
#include <frc/controller/StateSpacePlant.h>
#include "Constants.hpp"
#include "control/ElevatorClimbCoeffs.hpp"
#include "control/ElevatorCoeffs.hpp"
#include "control/TrapezoidalMotionProfile.hpp"
#include "logging/CsvLogger.hpp"
namespace frc3512 {
class ElevatorController {
public:
// State tolerances in meters and meters/sec respectively.
static constexpr double kPositionTolerance = 0.05;
static constexpr double kVelocityTolerance = 2.0;
ElevatorController();
ElevatorController(const ElevatorController&) = delete;
ElevatorController& operator=(const ElevatorController&) = delete;
void Enable();
void Disable();
void SetScoringIndex();
void SetClimbingIndex();
void SetGoal(double goal);
/**
* Sets the references.
*
* @param position Position of the carriage in meters.
* @param velocity Velocity of the carriage in meters per second.
*/
void SetReferences(units::meter_t position,
units::meters_per_second_t velocity);
bool AtReferences() const;
bool AtGoal() const;
/**
* Sets the current encoder measurement.
*
* @param measuredPosition Position of the carriage in meters.
*/
void SetMeasuredPosition(double measuredPosition);
/**
* Returns the control loop calculated voltage.
*/
double ControllerVoltage() const;
/**
* Returns the estimated position.
*/
double EstimatedPosition() const;
/**
* Returns the estimated velocity.
*/
double EstimatedVelocity() const;
/**
* Returns the error between the position reference and the position
* estimate.
*/
double PositionError() const;
/**
* Returns the error between the velocity reference and the velocity
* estimate.
*/
double VelocityError() const;
/**
* Returns the current reference set by the profile
*/
double PositionReference();
/**
* Executes the control loop for a cycle.
*/
void Update();
/**
* Resets any internal state.
*/
void Reset();
void SetClimbingProfile();
void SetScoringProfile();
private:
// The current sensor measurement.
Eigen::Matrix<double, 1, 1> m_Y;
TrapezoidalMotionProfile::State m_goal;
TrapezoidalMotionProfile::Constraints scoringConstraints{
Constants::Elevator::kMaxV, Constants::Elevator::kMaxA};
TrapezoidalMotionProfile::Constraints climbingConstraints{
Constants::Elevator::kClimbMaxV, Constants::Elevator::kClimbMaxA};
TrapezoidalMotionProfile::Constraints m_activeConstraints =
scoringConstraints;
TrapezoidalMotionProfile m_positionProfile{scoringConstraints,
{0_m, 0_mps}};
TrapezoidalMotionProfile::State m_profiledReference;
frc::StateSpacePlant<2, 1, 1> m_plant = [&] {
frc::StateSpacePlant<2, 1, 1> plant{MakeElevatorPlantCoeffs()};
plant.AddCoefficients(MakeElevatorClimbPlantCoeffs());
return plant;
}();
frc::StateSpaceController<2, 1, 1> m_controller = [&] {
frc::StateSpaceController<2, 1, 1> controller{
MakeElevatorControllerCoeffs(), m_plant};
controller.AddCoefficients(MakeElevatorClimbControllerCoeffs());
return controller;
}();
frc::StateSpaceObserver<2, 1, 1> m_observer = [&] {
frc::StateSpaceObserver<2, 1, 1> observer{MakeElevatorObserverCoeffs(),
m_plant};
observer.AddCoefficients(MakeElevatorClimbObserverCoeffs());
return observer;
}();
Eigen::Matrix<double, 2, 1> m_nextR;
bool m_atReferences = false;
CsvLogger elevatorLogger{"/home/lvuser/Elevator.csv",
"Time,EstPos,PosRef,Voltage"};
};
} // namespace frc3512
| 27.355705
| 79
| 0.660206
|
MattSa952073
|
402c90a52d070ea28b238e903f82e1a2d75acb51
| 4,900
|
cpp
|
C++
|
qtparallelogram.cpp
|
tilast/courseWork
|
e6e76a46c0525f9c8425fda59b30107b709d8e92
|
[
"MIT"
] | 4
|
2018-03-09T10:18:14.000Z
|
2020-11-14T08:07:39.000Z
|
qtparallelogram.cpp
|
tilast/courseWork
|
e6e76a46c0525f9c8425fda59b30107b709d8e92
|
[
"MIT"
] | 1
|
2016-12-06T06:54:27.000Z
|
2016-12-06T06:54:27.000Z
|
qtparallelogram.cpp
|
tilast/courseWork
|
e6e76a46c0525f9c8425fda59b30107b709d8e92
|
[
"MIT"
] | 2
|
2016-11-23T10:41:25.000Z
|
2021-12-09T16:28:55.000Z
|
#include "qtparallelogram.h"
#include <QDebug>
QtParallelogram::QtParallelogram(const Point2D& p1, const Point2D& p2, const float& cp) : Parallelogram(p1, p2, cp) {
}
QtParallelogram::QtParallelogram(const Point2D& p1, const Point2D& p2) : Parallelogram(p1, p2) {
setControlPoint(25.);
}
void QtParallelogram::draw(QPainter &painter) const {
Point2D tl = Parallelogram::center - Parallelogram::size * 0.5;
Color p = getStyle().lineColor;
Color f = getStyle().fillColor;
if (isSelected()) f.alpha = 0.5;
painter.setPen(QColor(p.red * 255, p.green * 255, p.blue * 255, p.alpha * 255));
painter.setBrush(QBrush(QColor(f.red * 255, f.green * 255, f.blue * 255, f.alpha * 255)));
Point2D a;
a.x = tl.x + Parallelogram::controlPoint;
a.y = tl.y;
Point2D br = Parallelogram::center + Parallelogram::size * 0.5;
br.x += Parallelogram::controlPoint;
Point2D b;
b.x = br.x;
b.y = tl.y;
Point2D c;
c.x = br.x - Parallelogram::controlPoint;
c.y = br.y;
Point2D d;
d.x = tl.x;
d.y = br.y;
QPointF points[4] = {
QPointF(a.x, a.y),
QPointF(b.x, b.y),
QPointF(c.x, c.y),
QPointF(d.x, d.y)
};
painter.drawPolygon(points, 4);
if(selected) {
painter.setBrush(QBrush(QColor(255, 180, 120)));
painter.drawEllipse(QPoint(tl.x, tl.y), 2, 2);
painter.drawEllipse(QPoint(c.x, c.y), 2, 2);
painter.drawEllipse(QPoint(a.x, a.y), 2, 2);
}
}
bool QtParallelogram::isTopLeft(Point2D pressedPoint, Point2D epsilon) const {
Point2D tl = Parallelogram::center - Parallelogram::size * 0.5;
Point2D minTL = tl - epsilon;
Point2D maxTL = tl + epsilon;
return ((pressedPoint.x > minTL.x) && (pressedPoint.y > minTL.y) && (pressedPoint.x < maxTL.x) && (pressedPoint.y < maxTL.y));
}
bool QtParallelogram::isTopRight(Point2D pressedPoint, Point2D epsilon) const {
return false;
}
void QtParallelogram::reflect() {
Parallelogram::reflect();
}
bool QtParallelogram::isBottomLeft(Point2D pressedPoint, Point2D epsilon) const {
return false;
}
bool QtParallelogram::isControlPoint(Point2D pressedPoint, Point2D epsilon) const {
Point2D tl = Parallelogram::center - Parallelogram::size * 0.5;
Point2D cp;
cp.x = tl.x + Parallelogram::controlPoint;
cp.y = tl.y;
Point2D minCP = cp - epsilon;
Point2D maxCP = cp + epsilon;
return ((pressedPoint.x > minCP.x) && (pressedPoint.y > minCP.y) && (pressedPoint.x < maxCP.x) && (pressedPoint.y < maxCP.y));
}
bool QtParallelogram::isBottomRight(Point2D pressedPoint, Point2D epsilon) const {
Point2D br = Parallelogram::center + Parallelogram::size * 0.5;
Point2D minBR = br - epsilon;
Point2D maxBR = br + epsilon;
return ((pressedPoint.x > minBR.x) && (pressedPoint.y > minBR.y) && (pressedPoint.x < maxBR.x) && (pressedPoint.y < maxBR.y));
}
void QtParallelogram::select(bool sel) {
QtShape2D::select(sel);
}
bool QtParallelogram::isSelected() const {
return QtShape2D::isSelected();
}
DrawStyle& QtParallelogram::getStyle() {
return Parallelogram::getStyle();
}
const DrawStyle& QtParallelogram::getStyle() const {
return Parallelogram::getStyle();
}
Point2D QtParallelogram::getCenter() const {
return Parallelogram::getCenter();
}
Point2D QtParallelogram::getSize() const {
return Parallelogram::getSize();
}
void QtParallelogram::setBounds(const Point2D& p1, const Point2D& p2) {
Parallelogram::setBounds(p1, p2);
}
void QtParallelogram::setControlPoint(const float& cp) {
Parallelogram::setControlPoint(cp);
}
void QtParallelogram::move(const Point2D& destination) {
Parallelogram::move(destination);
}
void QtParallelogram::resize(const Point2D& destination, short t) {
Parallelogram::resize(destination, t);
}
bool QtParallelogram::belongs(const Point2D& p) {
return Parallelogram::belongs(p);
}
void QtParallelogram::setType() {
Parallelogram::setType();
}
int QtParallelogram::getType() {
return Parallelogram::getType();
}
QString QtParallelogram::svgElementCode() const {
Point2D tl = Parallelogram::center - Parallelogram::size * 0.5;
Point2D a;
a.x = tl.x + Parallelogram::controlPoint;
a.y = tl.y;
Point2D br = Parallelogram::center + Parallelogram::size * 0.5;
br.x += Parallelogram::controlPoint;
Point2D b;
b.x = br.x;
b.y = tl.y;
Point2D c;
c.x = br.x - Parallelogram::controlPoint;
c.y = br.y;
Point2D d;
d.x = tl.x;
d.y = br.y;
return QString("<polygon points=\"%1,%2 %3,%4 %5,%6 %7,%8\" style=\"fill:rgb(%9, %10, %11)\" abki=\"parallelogram\" />")
.arg(a.x).arg(a.y)
.arg(b.x).arg(b.y)
.arg(c.x).arg(c.y)
.arg(d.x).arg(d.y)
.arg(getStyle().fillColor.red*255).arg(getStyle().fillColor.green*255).arg(getStyle().fillColor.blue*255);
}
| 30.06135
| 130
| 0.650612
|
tilast
|
403247304ccdf8d64e3b9eab32551817bba28c6b
| 356
|
cpp
|
C++
|
CodeForces-Contest/155/A.cpp
|
Tech-Intellegent/CodeForces-Solution
|
2f291a38b80b8ff2a2595b2e526716468ff26bf8
|
[
"MIT"
] | 1
|
2022-01-23T07:18:07.000Z
|
2022-01-23T07:18:07.000Z
|
CodeForces-Contest/155/A.cpp
|
Tech-Intellegent/CodeForces-Solution
|
2f291a38b80b8ff2a2595b2e526716468ff26bf8
|
[
"MIT"
] | null | null | null |
CodeForces-Contest/155/A.cpp
|
Tech-Intellegent/CodeForces-Solution
|
2f291a38b80b8ff2a2595b2e526716468ff26bf8
|
[
"MIT"
] | 1
|
2022-02-05T11:53:04.000Z
|
2022-02-05T11:53:04.000Z
|
#include <iostream>
using namespace std;
int main() {
int n,a;
cin>>n>>a;
int min = a, max = a, ans = 0;
for(int i = 1; i<n; i++){
int num;
cin>>num;
if(num>max){
ans++;
max = num;
}
if(num<min){
ans++;
min = num;
}
}
cout<<ans<<endl;
}
| 17.8
| 34
| 0.370787
|
Tech-Intellegent
|
40332982e39299e23497c74992500aea4d87277e
| 1,185
|
cpp
|
C++
|
leetcode/Algorithms/valid-parentheses.cpp
|
Doarakko/competitive-programming
|
5ae78c501664af08a3f16c81dbd54c68310adec8
|
[
"MIT"
] | 1
|
2017-07-11T16:47:29.000Z
|
2017-07-11T16:47:29.000Z
|
leetcode/Algorithms/valid-parentheses.cpp
|
Doarakko/Competitive-Programming
|
10642a4bd7266c828dd2fc6e311284e86bdf2968
|
[
"MIT"
] | 1
|
2021-02-07T09:10:26.000Z
|
2021-02-07T09:10:26.000Z
|
leetcode/Algorithms/valid-parentheses.cpp
|
Doarakko/Competitive-Programming
|
10642a4bd7266c828dd2fc6e311284e86bdf2968
|
[
"MIT"
] | null | null | null |
class Solution
{
public:
bool isValid(string s)
{
stack<char> v;
for (int i = 0; i < s.length(); i++)
{
switch (s[i])
{
case '(':
case '[':
case '{':
v.push(s[i]);
break;
case ']':
if (v.size() == 0 || v.top() != '[')
{
return false;
}
else
{
v.pop();
}
break;
case '}':
if (v.size() == 0 || v.top() != '{')
{
return false;
}
else
{
v.pop();
}
break;
case ')':
if (v.size() == 0 || v.top() != '(')
{
return false;
}
else
{
v.pop();
}
break;
}
}
if (v.size() == 0)
{
return true;
}
return false;
}
};
| 21.944444
| 52
| 0.206751
|
Doarakko
|
403551d98ffbfdc5f494910a4346be0ff61501c8
| 418
|
hpp
|
C++
|
src/SivComponent/Utils.hpp
|
mak1a/SivComponent
|
1043cde67a5dc14f2d4e0128aecfee7f54ed7002
|
[
"MIT"
] | 1
|
2021-01-24T08:55:59.000Z
|
2021-01-24T08:55:59.000Z
|
src/SivComponent/Utils.hpp
|
mak1a/SivComponent
|
1043cde67a5dc14f2d4e0128aecfee7f54ed7002
|
[
"MIT"
] | 2
|
2021-01-24T06:12:12.000Z
|
2021-01-24T14:37:10.000Z
|
src/SivComponent/Utils.hpp
|
mak1a/SivComponent
|
1043cde67a5dc14f2d4e0128aecfee7f54ed7002
|
[
"MIT"
] | null | null | null |
#pragma once
#define NO_USING_S3D
#include <Siv3D.hpp>
#include "../ComponentEngine/ComponentEngine.hpp"
namespace ComponentEngine::Siv
{
class MouseChase : public ComponentEngine::AttachableComponent
{
void Start() override {}
void Update() override
{
this->gameobject.lock()->SetWorldPosition(s3d::Cursor::Pos());
}
};
} // namespace ComponentEngine::Siv
| 22
| 74
| 0.65311
|
mak1a
|
40387aae864c8cca2621ee11224839ee155a0ffa
| 93,724
|
cpp
|
C++
|
selfdrive/locationd/models/generated/live.cpp
|
lth1436/nirotest
|
390b8d92493ff50827eaa1987bac07101d257dd9
|
[
"MIT"
] | null | null | null |
selfdrive/locationd/models/generated/live.cpp
|
lth1436/nirotest
|
390b8d92493ff50827eaa1987bac07101d257dd9
|
[
"MIT"
] | null | null | null |
selfdrive/locationd/models/generated/live.cpp
|
lth1436/nirotest
|
390b8d92493ff50827eaa1987bac07101d257dd9
|
[
"MIT"
] | null | null | null |
extern "C" {
#include <math.h>
/******************************************************************************
* Code generated with sympy 1.4 *
* *
* See http://www.sympy.org/ for more information. *
* *
* This file is part of 'ekf' *
******************************************************************************/
void err_fun(double *nom_x, double *delta_x, double *out_1870969132376137805) {
out_1870969132376137805[0] = delta_x[0] + nom_x[0];
out_1870969132376137805[1] = delta_x[1] + nom_x[1];
out_1870969132376137805[2] = delta_x[2] + nom_x[2];
out_1870969132376137805[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3];
out_1870969132376137805[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4];
out_1870969132376137805[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5];
out_1870969132376137805[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6];
out_1870969132376137805[7] = delta_x[6] + nom_x[7];
out_1870969132376137805[8] = delta_x[7] + nom_x[8];
out_1870969132376137805[9] = delta_x[8] + nom_x[9];
out_1870969132376137805[10] = delta_x[9] + nom_x[10];
out_1870969132376137805[11] = delta_x[10] + nom_x[11];
out_1870969132376137805[12] = delta_x[11] + nom_x[12];
out_1870969132376137805[13] = delta_x[12] + nom_x[13];
out_1870969132376137805[14] = delta_x[13] + nom_x[14];
out_1870969132376137805[15] = delta_x[14] + nom_x[15];
out_1870969132376137805[16] = delta_x[15] + nom_x[16];
out_1870969132376137805[17] = delta_x[16] + nom_x[17];
out_1870969132376137805[18] = delta_x[17] + nom_x[18];
out_1870969132376137805[19] = delta_x[18] + nom_x[19];
out_1870969132376137805[20] = delta_x[19] + nom_x[20];
out_1870969132376137805[21] = delta_x[20] + nom_x[21];
out_1870969132376137805[22] = delta_x[21] + nom_x[22];
}
void inv_err_fun(double *nom_x, double *true_x, double *out_3802553487131977071) {
out_3802553487131977071[0] = -nom_x[0] + true_x[0];
out_3802553487131977071[1] = -nom_x[1] + true_x[1];
out_3802553487131977071[2] = -nom_x[2] + true_x[2];
out_3802553487131977071[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5];
out_3802553487131977071[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4];
out_3802553487131977071[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3];
out_3802553487131977071[6] = -nom_x[7] + true_x[7];
out_3802553487131977071[7] = -nom_x[8] + true_x[8];
out_3802553487131977071[8] = -nom_x[9] + true_x[9];
out_3802553487131977071[9] = -nom_x[10] + true_x[10];
out_3802553487131977071[10] = -nom_x[11] + true_x[11];
out_3802553487131977071[11] = -nom_x[12] + true_x[12];
out_3802553487131977071[12] = -nom_x[13] + true_x[13];
out_3802553487131977071[13] = -nom_x[14] + true_x[14];
out_3802553487131977071[14] = -nom_x[15] + true_x[15];
out_3802553487131977071[15] = -nom_x[16] + true_x[16];
out_3802553487131977071[16] = -nom_x[17] + true_x[17];
out_3802553487131977071[17] = -nom_x[18] + true_x[18];
out_3802553487131977071[18] = -nom_x[19] + true_x[19];
out_3802553487131977071[19] = -nom_x[20] + true_x[20];
out_3802553487131977071[20] = -nom_x[21] + true_x[21];
out_3802553487131977071[21] = -nom_x[22] + true_x[22];
}
void H_mod_fun(double *state, double *out_3762111176001179456) {
out_3762111176001179456[0] = 1.0;
out_3762111176001179456[1] = 0.0;
out_3762111176001179456[2] = 0.0;
out_3762111176001179456[3] = 0.0;
out_3762111176001179456[4] = 0.0;
out_3762111176001179456[5] = 0.0;
out_3762111176001179456[6] = 0.0;
out_3762111176001179456[7] = 0.0;
out_3762111176001179456[8] = 0.0;
out_3762111176001179456[9] = 0.0;
out_3762111176001179456[10] = 0.0;
out_3762111176001179456[11] = 0.0;
out_3762111176001179456[12] = 0.0;
out_3762111176001179456[13] = 0.0;
out_3762111176001179456[14] = 0.0;
out_3762111176001179456[15] = 0.0;
out_3762111176001179456[16] = 0.0;
out_3762111176001179456[17] = 0.0;
out_3762111176001179456[18] = 0.0;
out_3762111176001179456[19] = 0.0;
out_3762111176001179456[20] = 0.0;
out_3762111176001179456[21] = 0.0;
out_3762111176001179456[22] = 0.0;
out_3762111176001179456[23] = 1.0;
out_3762111176001179456[24] = 0.0;
out_3762111176001179456[25] = 0.0;
out_3762111176001179456[26] = 0.0;
out_3762111176001179456[27] = 0.0;
out_3762111176001179456[28] = 0.0;
out_3762111176001179456[29] = 0.0;
out_3762111176001179456[30] = 0.0;
out_3762111176001179456[31] = 0.0;
out_3762111176001179456[32] = 0.0;
out_3762111176001179456[33] = 0.0;
out_3762111176001179456[34] = 0.0;
out_3762111176001179456[35] = 0.0;
out_3762111176001179456[36] = 0.0;
out_3762111176001179456[37] = 0.0;
out_3762111176001179456[38] = 0.0;
out_3762111176001179456[39] = 0.0;
out_3762111176001179456[40] = 0.0;
out_3762111176001179456[41] = 0.0;
out_3762111176001179456[42] = 0.0;
out_3762111176001179456[43] = 0.0;
out_3762111176001179456[44] = 0.0;
out_3762111176001179456[45] = 0.0;
out_3762111176001179456[46] = 1.0;
out_3762111176001179456[47] = 0.0;
out_3762111176001179456[48] = 0.0;
out_3762111176001179456[49] = 0.0;
out_3762111176001179456[50] = 0.0;
out_3762111176001179456[51] = 0.0;
out_3762111176001179456[52] = 0.0;
out_3762111176001179456[53] = 0.0;
out_3762111176001179456[54] = 0.0;
out_3762111176001179456[55] = 0.0;
out_3762111176001179456[56] = 0.0;
out_3762111176001179456[57] = 0.0;
out_3762111176001179456[58] = 0.0;
out_3762111176001179456[59] = 0.0;
out_3762111176001179456[60] = 0.0;
out_3762111176001179456[61] = 0.0;
out_3762111176001179456[62] = 0.0;
out_3762111176001179456[63] = 0.0;
out_3762111176001179456[64] = 0.0;
out_3762111176001179456[65] = 0.0;
out_3762111176001179456[66] = 0.0;
out_3762111176001179456[67] = 0.0;
out_3762111176001179456[68] = 0.0;
out_3762111176001179456[69] = -0.5*state[4];
out_3762111176001179456[70] = -0.5*state[5];
out_3762111176001179456[71] = -0.5*state[6];
out_3762111176001179456[72] = 0.0;
out_3762111176001179456[73] = 0.0;
out_3762111176001179456[74] = 0.0;
out_3762111176001179456[75] = 0.0;
out_3762111176001179456[76] = 0.0;
out_3762111176001179456[77] = 0.0;
out_3762111176001179456[78] = 0.0;
out_3762111176001179456[79] = 0.0;
out_3762111176001179456[80] = 0.0;
out_3762111176001179456[81] = 0.0;
out_3762111176001179456[82] = 0.0;
out_3762111176001179456[83] = 0.0;
out_3762111176001179456[84] = 0.0;
out_3762111176001179456[85] = 0.0;
out_3762111176001179456[86] = 0.0;
out_3762111176001179456[87] = 0.0;
out_3762111176001179456[88] = 0.0;
out_3762111176001179456[89] = 0.0;
out_3762111176001179456[90] = 0.0;
out_3762111176001179456[91] = 0.5*state[3];
out_3762111176001179456[92] = 0.5*state[6];
out_3762111176001179456[93] = -0.5*state[5];
out_3762111176001179456[94] = 0.0;
out_3762111176001179456[95] = 0.0;
out_3762111176001179456[96] = 0.0;
out_3762111176001179456[97] = 0.0;
out_3762111176001179456[98] = 0.0;
out_3762111176001179456[99] = 0.0;
out_3762111176001179456[100] = 0.0;
out_3762111176001179456[101] = 0.0;
out_3762111176001179456[102] = 0.0;
out_3762111176001179456[103] = 0.0;
out_3762111176001179456[104] = 0.0;
out_3762111176001179456[105] = 0.0;
out_3762111176001179456[106] = 0.0;
out_3762111176001179456[107] = 0.0;
out_3762111176001179456[108] = 0.0;
out_3762111176001179456[109] = 0.0;
out_3762111176001179456[110] = 0.0;
out_3762111176001179456[111] = 0.0;
out_3762111176001179456[112] = 0.0;
out_3762111176001179456[113] = -0.5*state[6];
out_3762111176001179456[114] = 0.5*state[3];
out_3762111176001179456[115] = 0.5*state[4];
out_3762111176001179456[116] = 0.0;
out_3762111176001179456[117] = 0.0;
out_3762111176001179456[118] = 0.0;
out_3762111176001179456[119] = 0.0;
out_3762111176001179456[120] = 0.0;
out_3762111176001179456[121] = 0.0;
out_3762111176001179456[122] = 0.0;
out_3762111176001179456[123] = 0.0;
out_3762111176001179456[124] = 0.0;
out_3762111176001179456[125] = 0.0;
out_3762111176001179456[126] = 0.0;
out_3762111176001179456[127] = 0.0;
out_3762111176001179456[128] = 0.0;
out_3762111176001179456[129] = 0.0;
out_3762111176001179456[130] = 0.0;
out_3762111176001179456[131] = 0.0;
out_3762111176001179456[132] = 0.0;
out_3762111176001179456[133] = 0.0;
out_3762111176001179456[134] = 0.0;
out_3762111176001179456[135] = 0.5*state[5];
out_3762111176001179456[136] = -0.5*state[4];
out_3762111176001179456[137] = 0.5*state[3];
out_3762111176001179456[138] = 0.0;
out_3762111176001179456[139] = 0.0;
out_3762111176001179456[140] = 0.0;
out_3762111176001179456[141] = 0.0;
out_3762111176001179456[142] = 0.0;
out_3762111176001179456[143] = 0.0;
out_3762111176001179456[144] = 0.0;
out_3762111176001179456[145] = 0.0;
out_3762111176001179456[146] = 0.0;
out_3762111176001179456[147] = 0.0;
out_3762111176001179456[148] = 0.0;
out_3762111176001179456[149] = 0.0;
out_3762111176001179456[150] = 0.0;
out_3762111176001179456[151] = 0.0;
out_3762111176001179456[152] = 0.0;
out_3762111176001179456[153] = 0.0;
out_3762111176001179456[154] = 0.0;
out_3762111176001179456[155] = 0.0;
out_3762111176001179456[156] = 0.0;
out_3762111176001179456[157] = 0.0;
out_3762111176001179456[158] = 0.0;
out_3762111176001179456[159] = 0.0;
out_3762111176001179456[160] = 1.0;
out_3762111176001179456[161] = 0.0;
out_3762111176001179456[162] = 0.0;
out_3762111176001179456[163] = 0.0;
out_3762111176001179456[164] = 0.0;
out_3762111176001179456[165] = 0.0;
out_3762111176001179456[166] = 0.0;
out_3762111176001179456[167] = 0.0;
out_3762111176001179456[168] = 0.0;
out_3762111176001179456[169] = 0.0;
out_3762111176001179456[170] = 0.0;
out_3762111176001179456[171] = 0.0;
out_3762111176001179456[172] = 0.0;
out_3762111176001179456[173] = 0.0;
out_3762111176001179456[174] = 0.0;
out_3762111176001179456[175] = 0.0;
out_3762111176001179456[176] = 0.0;
out_3762111176001179456[177] = 0.0;
out_3762111176001179456[178] = 0.0;
out_3762111176001179456[179] = 0.0;
out_3762111176001179456[180] = 0.0;
out_3762111176001179456[181] = 0.0;
out_3762111176001179456[182] = 0.0;
out_3762111176001179456[183] = 1.0;
out_3762111176001179456[184] = 0.0;
out_3762111176001179456[185] = 0.0;
out_3762111176001179456[186] = 0.0;
out_3762111176001179456[187] = 0.0;
out_3762111176001179456[188] = 0.0;
out_3762111176001179456[189] = 0.0;
out_3762111176001179456[190] = 0.0;
out_3762111176001179456[191] = 0.0;
out_3762111176001179456[192] = 0.0;
out_3762111176001179456[193] = 0.0;
out_3762111176001179456[194] = 0.0;
out_3762111176001179456[195] = 0.0;
out_3762111176001179456[196] = 0.0;
out_3762111176001179456[197] = 0.0;
out_3762111176001179456[198] = 0.0;
out_3762111176001179456[199] = 0.0;
out_3762111176001179456[200] = 0.0;
out_3762111176001179456[201] = 0.0;
out_3762111176001179456[202] = 0.0;
out_3762111176001179456[203] = 0.0;
out_3762111176001179456[204] = 0.0;
out_3762111176001179456[205] = 0.0;
out_3762111176001179456[206] = 1.0;
out_3762111176001179456[207] = 0.0;
out_3762111176001179456[208] = 0.0;
out_3762111176001179456[209] = 0.0;
out_3762111176001179456[210] = 0.0;
out_3762111176001179456[211] = 0.0;
out_3762111176001179456[212] = 0.0;
out_3762111176001179456[213] = 0.0;
out_3762111176001179456[214] = 0.0;
out_3762111176001179456[215] = 0.0;
out_3762111176001179456[216] = 0.0;
out_3762111176001179456[217] = 0.0;
out_3762111176001179456[218] = 0.0;
out_3762111176001179456[219] = 0.0;
out_3762111176001179456[220] = 0.0;
out_3762111176001179456[221] = 0.0;
out_3762111176001179456[222] = 0.0;
out_3762111176001179456[223] = 0.0;
out_3762111176001179456[224] = 0.0;
out_3762111176001179456[225] = 0.0;
out_3762111176001179456[226] = 0.0;
out_3762111176001179456[227] = 0.0;
out_3762111176001179456[228] = 0.0;
out_3762111176001179456[229] = 1.0;
out_3762111176001179456[230] = 0.0;
out_3762111176001179456[231] = 0.0;
out_3762111176001179456[232] = 0.0;
out_3762111176001179456[233] = 0.0;
out_3762111176001179456[234] = 0.0;
out_3762111176001179456[235] = 0.0;
out_3762111176001179456[236] = 0.0;
out_3762111176001179456[237] = 0.0;
out_3762111176001179456[238] = 0.0;
out_3762111176001179456[239] = 0.0;
out_3762111176001179456[240] = 0.0;
out_3762111176001179456[241] = 0.0;
out_3762111176001179456[242] = 0.0;
out_3762111176001179456[243] = 0.0;
out_3762111176001179456[244] = 0.0;
out_3762111176001179456[245] = 0.0;
out_3762111176001179456[246] = 0.0;
out_3762111176001179456[247] = 0.0;
out_3762111176001179456[248] = 0.0;
out_3762111176001179456[249] = 0.0;
out_3762111176001179456[250] = 0.0;
out_3762111176001179456[251] = 0.0;
out_3762111176001179456[252] = 1.0;
out_3762111176001179456[253] = 0.0;
out_3762111176001179456[254] = 0.0;
out_3762111176001179456[255] = 0.0;
out_3762111176001179456[256] = 0.0;
out_3762111176001179456[257] = 0.0;
out_3762111176001179456[258] = 0.0;
out_3762111176001179456[259] = 0.0;
out_3762111176001179456[260] = 0.0;
out_3762111176001179456[261] = 0.0;
out_3762111176001179456[262] = 0.0;
out_3762111176001179456[263] = 0.0;
out_3762111176001179456[264] = 0.0;
out_3762111176001179456[265] = 0.0;
out_3762111176001179456[266] = 0.0;
out_3762111176001179456[267] = 0.0;
out_3762111176001179456[268] = 0.0;
out_3762111176001179456[269] = 0.0;
out_3762111176001179456[270] = 0.0;
out_3762111176001179456[271] = 0.0;
out_3762111176001179456[272] = 0.0;
out_3762111176001179456[273] = 0.0;
out_3762111176001179456[274] = 0.0;
out_3762111176001179456[275] = 1.0;
out_3762111176001179456[276] = 0.0;
out_3762111176001179456[277] = 0.0;
out_3762111176001179456[278] = 0.0;
out_3762111176001179456[279] = 0.0;
out_3762111176001179456[280] = 0.0;
out_3762111176001179456[281] = 0.0;
out_3762111176001179456[282] = 0.0;
out_3762111176001179456[283] = 0.0;
out_3762111176001179456[284] = 0.0;
out_3762111176001179456[285] = 0.0;
out_3762111176001179456[286] = 0.0;
out_3762111176001179456[287] = 0.0;
out_3762111176001179456[288] = 0.0;
out_3762111176001179456[289] = 0.0;
out_3762111176001179456[290] = 0.0;
out_3762111176001179456[291] = 0.0;
out_3762111176001179456[292] = 0.0;
out_3762111176001179456[293] = 0.0;
out_3762111176001179456[294] = 0.0;
out_3762111176001179456[295] = 0.0;
out_3762111176001179456[296] = 0.0;
out_3762111176001179456[297] = 0.0;
out_3762111176001179456[298] = 1.0;
out_3762111176001179456[299] = 0.0;
out_3762111176001179456[300] = 0.0;
out_3762111176001179456[301] = 0.0;
out_3762111176001179456[302] = 0.0;
out_3762111176001179456[303] = 0.0;
out_3762111176001179456[304] = 0.0;
out_3762111176001179456[305] = 0.0;
out_3762111176001179456[306] = 0.0;
out_3762111176001179456[307] = 0.0;
out_3762111176001179456[308] = 0.0;
out_3762111176001179456[309] = 0.0;
out_3762111176001179456[310] = 0.0;
out_3762111176001179456[311] = 0.0;
out_3762111176001179456[312] = 0.0;
out_3762111176001179456[313] = 0.0;
out_3762111176001179456[314] = 0.0;
out_3762111176001179456[315] = 0.0;
out_3762111176001179456[316] = 0.0;
out_3762111176001179456[317] = 0.0;
out_3762111176001179456[318] = 0.0;
out_3762111176001179456[319] = 0.0;
out_3762111176001179456[320] = 0.0;
out_3762111176001179456[321] = 1.0;
out_3762111176001179456[322] = 0.0;
out_3762111176001179456[323] = 0.0;
out_3762111176001179456[324] = 0.0;
out_3762111176001179456[325] = 0.0;
out_3762111176001179456[326] = 0.0;
out_3762111176001179456[327] = 0.0;
out_3762111176001179456[328] = 0.0;
out_3762111176001179456[329] = 0.0;
out_3762111176001179456[330] = 0.0;
out_3762111176001179456[331] = 0.0;
out_3762111176001179456[332] = 0.0;
out_3762111176001179456[333] = 0.0;
out_3762111176001179456[334] = 0.0;
out_3762111176001179456[335] = 0.0;
out_3762111176001179456[336] = 0.0;
out_3762111176001179456[337] = 0.0;
out_3762111176001179456[338] = 0.0;
out_3762111176001179456[339] = 0.0;
out_3762111176001179456[340] = 0.0;
out_3762111176001179456[341] = 0.0;
out_3762111176001179456[342] = 0.0;
out_3762111176001179456[343] = 0.0;
out_3762111176001179456[344] = 1.0;
out_3762111176001179456[345] = 0.0;
out_3762111176001179456[346] = 0.0;
out_3762111176001179456[347] = 0.0;
out_3762111176001179456[348] = 0.0;
out_3762111176001179456[349] = 0.0;
out_3762111176001179456[350] = 0.0;
out_3762111176001179456[351] = 0.0;
out_3762111176001179456[352] = 0.0;
out_3762111176001179456[353] = 0.0;
out_3762111176001179456[354] = 0.0;
out_3762111176001179456[355] = 0.0;
out_3762111176001179456[356] = 0.0;
out_3762111176001179456[357] = 0.0;
out_3762111176001179456[358] = 0.0;
out_3762111176001179456[359] = 0.0;
out_3762111176001179456[360] = 0.0;
out_3762111176001179456[361] = 0.0;
out_3762111176001179456[362] = 0.0;
out_3762111176001179456[363] = 0.0;
out_3762111176001179456[364] = 0.0;
out_3762111176001179456[365] = 0.0;
out_3762111176001179456[366] = 0.0;
out_3762111176001179456[367] = 1.0;
out_3762111176001179456[368] = 0.0;
out_3762111176001179456[369] = 0.0;
out_3762111176001179456[370] = 0.0;
out_3762111176001179456[371] = 0.0;
out_3762111176001179456[372] = 0.0;
out_3762111176001179456[373] = 0.0;
out_3762111176001179456[374] = 0.0;
out_3762111176001179456[375] = 0.0;
out_3762111176001179456[376] = 0.0;
out_3762111176001179456[377] = 0.0;
out_3762111176001179456[378] = 0.0;
out_3762111176001179456[379] = 0.0;
out_3762111176001179456[380] = 0.0;
out_3762111176001179456[381] = 0.0;
out_3762111176001179456[382] = 0.0;
out_3762111176001179456[383] = 0.0;
out_3762111176001179456[384] = 0.0;
out_3762111176001179456[385] = 0.0;
out_3762111176001179456[386] = 0.0;
out_3762111176001179456[387] = 0.0;
out_3762111176001179456[388] = 0.0;
out_3762111176001179456[389] = 0.0;
out_3762111176001179456[390] = 1.0;
out_3762111176001179456[391] = 0.0;
out_3762111176001179456[392] = 0.0;
out_3762111176001179456[393] = 0.0;
out_3762111176001179456[394] = 0.0;
out_3762111176001179456[395] = 0.0;
out_3762111176001179456[396] = 0.0;
out_3762111176001179456[397] = 0.0;
out_3762111176001179456[398] = 0.0;
out_3762111176001179456[399] = 0.0;
out_3762111176001179456[400] = 0.0;
out_3762111176001179456[401] = 0.0;
out_3762111176001179456[402] = 0.0;
out_3762111176001179456[403] = 0.0;
out_3762111176001179456[404] = 0.0;
out_3762111176001179456[405] = 0.0;
out_3762111176001179456[406] = 0.0;
out_3762111176001179456[407] = 0.0;
out_3762111176001179456[408] = 0.0;
out_3762111176001179456[409] = 0.0;
out_3762111176001179456[410] = 0.0;
out_3762111176001179456[411] = 0.0;
out_3762111176001179456[412] = 0.0;
out_3762111176001179456[413] = 1.0;
out_3762111176001179456[414] = 0.0;
out_3762111176001179456[415] = 0.0;
out_3762111176001179456[416] = 0.0;
out_3762111176001179456[417] = 0.0;
out_3762111176001179456[418] = 0.0;
out_3762111176001179456[419] = 0.0;
out_3762111176001179456[420] = 0.0;
out_3762111176001179456[421] = 0.0;
out_3762111176001179456[422] = 0.0;
out_3762111176001179456[423] = 0.0;
out_3762111176001179456[424] = 0.0;
out_3762111176001179456[425] = 0.0;
out_3762111176001179456[426] = 0.0;
out_3762111176001179456[427] = 0.0;
out_3762111176001179456[428] = 0.0;
out_3762111176001179456[429] = 0.0;
out_3762111176001179456[430] = 0.0;
out_3762111176001179456[431] = 0.0;
out_3762111176001179456[432] = 0.0;
out_3762111176001179456[433] = 0.0;
out_3762111176001179456[434] = 0.0;
out_3762111176001179456[435] = 0.0;
out_3762111176001179456[436] = 1.0;
out_3762111176001179456[437] = 0.0;
out_3762111176001179456[438] = 0.0;
out_3762111176001179456[439] = 0.0;
out_3762111176001179456[440] = 0.0;
out_3762111176001179456[441] = 0.0;
out_3762111176001179456[442] = 0.0;
out_3762111176001179456[443] = 0.0;
out_3762111176001179456[444] = 0.0;
out_3762111176001179456[445] = 0.0;
out_3762111176001179456[446] = 0.0;
out_3762111176001179456[447] = 0.0;
out_3762111176001179456[448] = 0.0;
out_3762111176001179456[449] = 0.0;
out_3762111176001179456[450] = 0.0;
out_3762111176001179456[451] = 0.0;
out_3762111176001179456[452] = 0.0;
out_3762111176001179456[453] = 0.0;
out_3762111176001179456[454] = 0.0;
out_3762111176001179456[455] = 0.0;
out_3762111176001179456[456] = 0.0;
out_3762111176001179456[457] = 0.0;
out_3762111176001179456[458] = 0.0;
out_3762111176001179456[459] = 1.0;
out_3762111176001179456[460] = 0.0;
out_3762111176001179456[461] = 0.0;
out_3762111176001179456[462] = 0.0;
out_3762111176001179456[463] = 0.0;
out_3762111176001179456[464] = 0.0;
out_3762111176001179456[465] = 0.0;
out_3762111176001179456[466] = 0.0;
out_3762111176001179456[467] = 0.0;
out_3762111176001179456[468] = 0.0;
out_3762111176001179456[469] = 0.0;
out_3762111176001179456[470] = 0.0;
out_3762111176001179456[471] = 0.0;
out_3762111176001179456[472] = 0.0;
out_3762111176001179456[473] = 0.0;
out_3762111176001179456[474] = 0.0;
out_3762111176001179456[475] = 0.0;
out_3762111176001179456[476] = 0.0;
out_3762111176001179456[477] = 0.0;
out_3762111176001179456[478] = 0.0;
out_3762111176001179456[479] = 0.0;
out_3762111176001179456[480] = 0.0;
out_3762111176001179456[481] = 0.0;
out_3762111176001179456[482] = 1.0;
out_3762111176001179456[483] = 0.0;
out_3762111176001179456[484] = 0.0;
out_3762111176001179456[485] = 0.0;
out_3762111176001179456[486] = 0.0;
out_3762111176001179456[487] = 0.0;
out_3762111176001179456[488] = 0.0;
out_3762111176001179456[489] = 0.0;
out_3762111176001179456[490] = 0.0;
out_3762111176001179456[491] = 0.0;
out_3762111176001179456[492] = 0.0;
out_3762111176001179456[493] = 0.0;
out_3762111176001179456[494] = 0.0;
out_3762111176001179456[495] = 0.0;
out_3762111176001179456[496] = 0.0;
out_3762111176001179456[497] = 0.0;
out_3762111176001179456[498] = 0.0;
out_3762111176001179456[499] = 0.0;
out_3762111176001179456[500] = 0.0;
out_3762111176001179456[501] = 0.0;
out_3762111176001179456[502] = 0.0;
out_3762111176001179456[503] = 0.0;
out_3762111176001179456[504] = 0.0;
out_3762111176001179456[505] = 1.0;
}
void f_fun(double *state, double dt, double *out_2480536562585758481) {
out_2480536562585758481[0] = dt*state[7] + state[0];
out_2480536562585758481[1] = dt*state[8] + state[1];
out_2480536562585758481[2] = dt*state[9] + state[2];
out_2480536562585758481[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3];
out_2480536562585758481[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4];
out_2480536562585758481[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5];
out_2480536562585758481[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6];
out_2480536562585758481[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[19] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[18] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[7];
out_2480536562585758481[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[19] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[18]) + state[8];
out_2480536562585758481[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[17] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[19]) + state[9];
out_2480536562585758481[10] = state[10];
out_2480536562585758481[11] = state[11];
out_2480536562585758481[12] = state[12];
out_2480536562585758481[13] = state[13];
out_2480536562585758481[14] = state[14];
out_2480536562585758481[15] = state[15];
out_2480536562585758481[16] = state[16];
out_2480536562585758481[17] = state[17];
out_2480536562585758481[18] = state[18];
out_2480536562585758481[19] = state[19];
out_2480536562585758481[20] = state[20];
out_2480536562585758481[21] = state[21];
out_2480536562585758481[22] = state[22];
}
void F_fun(double *state, double dt, double *out_1425722008230317098) {
out_1425722008230317098[0] = 1;
out_1425722008230317098[1] = 0;
out_1425722008230317098[2] = 0;
out_1425722008230317098[3] = 0;
out_1425722008230317098[4] = 0;
out_1425722008230317098[5] = 0;
out_1425722008230317098[6] = dt;
out_1425722008230317098[7] = 0;
out_1425722008230317098[8] = 0;
out_1425722008230317098[9] = 0;
out_1425722008230317098[10] = 0;
out_1425722008230317098[11] = 0;
out_1425722008230317098[12] = 0;
out_1425722008230317098[13] = 0;
out_1425722008230317098[14] = 0;
out_1425722008230317098[15] = 0;
out_1425722008230317098[16] = 0;
out_1425722008230317098[17] = 0;
out_1425722008230317098[18] = 0;
out_1425722008230317098[19] = 0;
out_1425722008230317098[20] = 0;
out_1425722008230317098[21] = 0;
out_1425722008230317098[22] = 0;
out_1425722008230317098[23] = 1;
out_1425722008230317098[24] = 0;
out_1425722008230317098[25] = 0;
out_1425722008230317098[26] = 0;
out_1425722008230317098[27] = 0;
out_1425722008230317098[28] = 0;
out_1425722008230317098[29] = dt;
out_1425722008230317098[30] = 0;
out_1425722008230317098[31] = 0;
out_1425722008230317098[32] = 0;
out_1425722008230317098[33] = 0;
out_1425722008230317098[34] = 0;
out_1425722008230317098[35] = 0;
out_1425722008230317098[36] = 0;
out_1425722008230317098[37] = 0;
out_1425722008230317098[38] = 0;
out_1425722008230317098[39] = 0;
out_1425722008230317098[40] = 0;
out_1425722008230317098[41] = 0;
out_1425722008230317098[42] = 0;
out_1425722008230317098[43] = 0;
out_1425722008230317098[44] = 0;
out_1425722008230317098[45] = 0;
out_1425722008230317098[46] = 1;
out_1425722008230317098[47] = 0;
out_1425722008230317098[48] = 0;
out_1425722008230317098[49] = 0;
out_1425722008230317098[50] = 0;
out_1425722008230317098[51] = 0;
out_1425722008230317098[52] = dt;
out_1425722008230317098[53] = 0;
out_1425722008230317098[54] = 0;
out_1425722008230317098[55] = 0;
out_1425722008230317098[56] = 0;
out_1425722008230317098[57] = 0;
out_1425722008230317098[58] = 0;
out_1425722008230317098[59] = 0;
out_1425722008230317098[60] = 0;
out_1425722008230317098[61] = 0;
out_1425722008230317098[62] = 0;
out_1425722008230317098[63] = 0;
out_1425722008230317098[64] = 0;
out_1425722008230317098[65] = 0;
out_1425722008230317098[66] = 0;
out_1425722008230317098[67] = 0;
out_1425722008230317098[68] = 0;
out_1425722008230317098[69] = 1;
out_1425722008230317098[70] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
out_1425722008230317098[71] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]);
out_1425722008230317098[72] = 0;
out_1425722008230317098[73] = 0;
out_1425722008230317098[74] = 0;
out_1425722008230317098[75] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
out_1425722008230317098[76] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
out_1425722008230317098[77] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
out_1425722008230317098[78] = 0;
out_1425722008230317098[79] = 0;
out_1425722008230317098[80] = 0;
out_1425722008230317098[81] = 0;
out_1425722008230317098[82] = 0;
out_1425722008230317098[83] = 0;
out_1425722008230317098[84] = 0;
out_1425722008230317098[85] = 0;
out_1425722008230317098[86] = 0;
out_1425722008230317098[87] = 0;
out_1425722008230317098[88] = 0;
out_1425722008230317098[89] = 0;
out_1425722008230317098[90] = 0;
out_1425722008230317098[91] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
out_1425722008230317098[92] = 1;
out_1425722008230317098[93] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]);
out_1425722008230317098[94] = 0;
out_1425722008230317098[95] = 0;
out_1425722008230317098[96] = 0;
out_1425722008230317098[97] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
out_1425722008230317098[98] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
out_1425722008230317098[99] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
out_1425722008230317098[100] = 0;
out_1425722008230317098[101] = 0;
out_1425722008230317098[102] = 0;
out_1425722008230317098[103] = 0;
out_1425722008230317098[104] = 0;
out_1425722008230317098[105] = 0;
out_1425722008230317098[106] = 0;
out_1425722008230317098[107] = 0;
out_1425722008230317098[108] = 0;
out_1425722008230317098[109] = 0;
out_1425722008230317098[110] = 0;
out_1425722008230317098[111] = 0;
out_1425722008230317098[112] = 0;
out_1425722008230317098[113] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]);
out_1425722008230317098[114] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]);
out_1425722008230317098[115] = 1;
out_1425722008230317098[116] = 0;
out_1425722008230317098[117] = 0;
out_1425722008230317098[118] = 0;
out_1425722008230317098[119] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
out_1425722008230317098[120] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
out_1425722008230317098[121] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
out_1425722008230317098[122] = 0;
out_1425722008230317098[123] = 0;
out_1425722008230317098[124] = 0;
out_1425722008230317098[125] = 0;
out_1425722008230317098[126] = 0;
out_1425722008230317098[127] = 0;
out_1425722008230317098[128] = 0;
out_1425722008230317098[129] = 0;
out_1425722008230317098[130] = 0;
out_1425722008230317098[131] = 0;
out_1425722008230317098[132] = 0;
out_1425722008230317098[133] = 0;
out_1425722008230317098[134] = 0;
out_1425722008230317098[135] = 0;
out_1425722008230317098[136] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[17] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[19]);
out_1425722008230317098[137] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[19] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]);
out_1425722008230317098[138] = 1;
out_1425722008230317098[139] = 0;
out_1425722008230317098[140] = 0;
out_1425722008230317098[141] = 0;
out_1425722008230317098[142] = 0;
out_1425722008230317098[143] = 0;
out_1425722008230317098[144] = 0;
out_1425722008230317098[145] = 0;
out_1425722008230317098[146] = 0;
out_1425722008230317098[147] = 0;
out_1425722008230317098[148] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
out_1425722008230317098[149] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
out_1425722008230317098[150] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
out_1425722008230317098[151] = 0;
out_1425722008230317098[152] = 0;
out_1425722008230317098[153] = 0;
out_1425722008230317098[154] = 0;
out_1425722008230317098[155] = 0;
out_1425722008230317098[156] = 0;
out_1425722008230317098[157] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[18] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[17] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[19]);
out_1425722008230317098[158] = 0;
out_1425722008230317098[159] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[19] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[18] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[17]);
out_1425722008230317098[160] = 0;
out_1425722008230317098[161] = 1;
out_1425722008230317098[162] = 0;
out_1425722008230317098[163] = 0;
out_1425722008230317098[164] = 0;
out_1425722008230317098[165] = 0;
out_1425722008230317098[166] = 0;
out_1425722008230317098[167] = 0;
out_1425722008230317098[168] = 0;
out_1425722008230317098[169] = 0;
out_1425722008230317098[170] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
out_1425722008230317098[171] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
out_1425722008230317098[172] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
out_1425722008230317098[173] = 0;
out_1425722008230317098[174] = 0;
out_1425722008230317098[175] = 0;
out_1425722008230317098[176] = 0;
out_1425722008230317098[177] = 0;
out_1425722008230317098[178] = 0;
out_1425722008230317098[179] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[19] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[18]);
out_1425722008230317098[180] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[19] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[18] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[17]);
out_1425722008230317098[181] = 0;
out_1425722008230317098[182] = 0;
out_1425722008230317098[183] = 0;
out_1425722008230317098[184] = 1;
out_1425722008230317098[185] = 0;
out_1425722008230317098[186] = 0;
out_1425722008230317098[187] = 0;
out_1425722008230317098[188] = 0;
out_1425722008230317098[189] = 0;
out_1425722008230317098[190] = 0;
out_1425722008230317098[191] = 0;
out_1425722008230317098[192] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
out_1425722008230317098[193] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
out_1425722008230317098[194] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
out_1425722008230317098[195] = 0;
out_1425722008230317098[196] = 0;
out_1425722008230317098[197] = 0;
out_1425722008230317098[198] = 0;
out_1425722008230317098[199] = 0;
out_1425722008230317098[200] = 0;
out_1425722008230317098[201] = 0;
out_1425722008230317098[202] = 0;
out_1425722008230317098[203] = 0;
out_1425722008230317098[204] = 0;
out_1425722008230317098[205] = 0;
out_1425722008230317098[206] = 0;
out_1425722008230317098[207] = 1;
out_1425722008230317098[208] = 0;
out_1425722008230317098[209] = 0;
out_1425722008230317098[210] = 0;
out_1425722008230317098[211] = 0;
out_1425722008230317098[212] = 0;
out_1425722008230317098[213] = 0;
out_1425722008230317098[214] = 0;
out_1425722008230317098[215] = 0;
out_1425722008230317098[216] = 0;
out_1425722008230317098[217] = 0;
out_1425722008230317098[218] = 0;
out_1425722008230317098[219] = 0;
out_1425722008230317098[220] = 0;
out_1425722008230317098[221] = 0;
out_1425722008230317098[222] = 0;
out_1425722008230317098[223] = 0;
out_1425722008230317098[224] = 0;
out_1425722008230317098[225] = 0;
out_1425722008230317098[226] = 0;
out_1425722008230317098[227] = 0;
out_1425722008230317098[228] = 0;
out_1425722008230317098[229] = 0;
out_1425722008230317098[230] = 1;
out_1425722008230317098[231] = 0;
out_1425722008230317098[232] = 0;
out_1425722008230317098[233] = 0;
out_1425722008230317098[234] = 0;
out_1425722008230317098[235] = 0;
out_1425722008230317098[236] = 0;
out_1425722008230317098[237] = 0;
out_1425722008230317098[238] = 0;
out_1425722008230317098[239] = 0;
out_1425722008230317098[240] = 0;
out_1425722008230317098[241] = 0;
out_1425722008230317098[242] = 0;
out_1425722008230317098[243] = 0;
out_1425722008230317098[244] = 0;
out_1425722008230317098[245] = 0;
out_1425722008230317098[246] = 0;
out_1425722008230317098[247] = 0;
out_1425722008230317098[248] = 0;
out_1425722008230317098[249] = 0;
out_1425722008230317098[250] = 0;
out_1425722008230317098[251] = 0;
out_1425722008230317098[252] = 0;
out_1425722008230317098[253] = 1;
out_1425722008230317098[254] = 0;
out_1425722008230317098[255] = 0;
out_1425722008230317098[256] = 0;
out_1425722008230317098[257] = 0;
out_1425722008230317098[258] = 0;
out_1425722008230317098[259] = 0;
out_1425722008230317098[260] = 0;
out_1425722008230317098[261] = 0;
out_1425722008230317098[262] = 0;
out_1425722008230317098[263] = 0;
out_1425722008230317098[264] = 0;
out_1425722008230317098[265] = 0;
out_1425722008230317098[266] = 0;
out_1425722008230317098[267] = 0;
out_1425722008230317098[268] = 0;
out_1425722008230317098[269] = 0;
out_1425722008230317098[270] = 0;
out_1425722008230317098[271] = 0;
out_1425722008230317098[272] = 0;
out_1425722008230317098[273] = 0;
out_1425722008230317098[274] = 0;
out_1425722008230317098[275] = 0;
out_1425722008230317098[276] = 1;
out_1425722008230317098[277] = 0;
out_1425722008230317098[278] = 0;
out_1425722008230317098[279] = 0;
out_1425722008230317098[280] = 0;
out_1425722008230317098[281] = 0;
out_1425722008230317098[282] = 0;
out_1425722008230317098[283] = 0;
out_1425722008230317098[284] = 0;
out_1425722008230317098[285] = 0;
out_1425722008230317098[286] = 0;
out_1425722008230317098[287] = 0;
out_1425722008230317098[288] = 0;
out_1425722008230317098[289] = 0;
out_1425722008230317098[290] = 0;
out_1425722008230317098[291] = 0;
out_1425722008230317098[292] = 0;
out_1425722008230317098[293] = 0;
out_1425722008230317098[294] = 0;
out_1425722008230317098[295] = 0;
out_1425722008230317098[296] = 0;
out_1425722008230317098[297] = 0;
out_1425722008230317098[298] = 0;
out_1425722008230317098[299] = 1;
out_1425722008230317098[300] = 0;
out_1425722008230317098[301] = 0;
out_1425722008230317098[302] = 0;
out_1425722008230317098[303] = 0;
out_1425722008230317098[304] = 0;
out_1425722008230317098[305] = 0;
out_1425722008230317098[306] = 0;
out_1425722008230317098[307] = 0;
out_1425722008230317098[308] = 0;
out_1425722008230317098[309] = 0;
out_1425722008230317098[310] = 0;
out_1425722008230317098[311] = 0;
out_1425722008230317098[312] = 0;
out_1425722008230317098[313] = 0;
out_1425722008230317098[314] = 0;
out_1425722008230317098[315] = 0;
out_1425722008230317098[316] = 0;
out_1425722008230317098[317] = 0;
out_1425722008230317098[318] = 0;
out_1425722008230317098[319] = 0;
out_1425722008230317098[320] = 0;
out_1425722008230317098[321] = 0;
out_1425722008230317098[322] = 1;
out_1425722008230317098[323] = 0;
out_1425722008230317098[324] = 0;
out_1425722008230317098[325] = 0;
out_1425722008230317098[326] = 0;
out_1425722008230317098[327] = 0;
out_1425722008230317098[328] = 0;
out_1425722008230317098[329] = 0;
out_1425722008230317098[330] = 0;
out_1425722008230317098[331] = 0;
out_1425722008230317098[332] = 0;
out_1425722008230317098[333] = 0;
out_1425722008230317098[334] = 0;
out_1425722008230317098[335] = 0;
out_1425722008230317098[336] = 0;
out_1425722008230317098[337] = 0;
out_1425722008230317098[338] = 0;
out_1425722008230317098[339] = 0;
out_1425722008230317098[340] = 0;
out_1425722008230317098[341] = 0;
out_1425722008230317098[342] = 0;
out_1425722008230317098[343] = 0;
out_1425722008230317098[344] = 0;
out_1425722008230317098[345] = 1;
out_1425722008230317098[346] = 0;
out_1425722008230317098[347] = 0;
out_1425722008230317098[348] = 0;
out_1425722008230317098[349] = 0;
out_1425722008230317098[350] = 0;
out_1425722008230317098[351] = 0;
out_1425722008230317098[352] = 0;
out_1425722008230317098[353] = 0;
out_1425722008230317098[354] = 0;
out_1425722008230317098[355] = 0;
out_1425722008230317098[356] = 0;
out_1425722008230317098[357] = 0;
out_1425722008230317098[358] = 0;
out_1425722008230317098[359] = 0;
out_1425722008230317098[360] = 0;
out_1425722008230317098[361] = 0;
out_1425722008230317098[362] = 0;
out_1425722008230317098[363] = 0;
out_1425722008230317098[364] = 0;
out_1425722008230317098[365] = 0;
out_1425722008230317098[366] = 0;
out_1425722008230317098[367] = 0;
out_1425722008230317098[368] = 1;
out_1425722008230317098[369] = 0;
out_1425722008230317098[370] = 0;
out_1425722008230317098[371] = 0;
out_1425722008230317098[372] = 0;
out_1425722008230317098[373] = 0;
out_1425722008230317098[374] = 0;
out_1425722008230317098[375] = 0;
out_1425722008230317098[376] = 0;
out_1425722008230317098[377] = 0;
out_1425722008230317098[378] = 0;
out_1425722008230317098[379] = 0;
out_1425722008230317098[380] = 0;
out_1425722008230317098[381] = 0;
out_1425722008230317098[382] = 0;
out_1425722008230317098[383] = 0;
out_1425722008230317098[384] = 0;
out_1425722008230317098[385] = 0;
out_1425722008230317098[386] = 0;
out_1425722008230317098[387] = 0;
out_1425722008230317098[388] = 0;
out_1425722008230317098[389] = 0;
out_1425722008230317098[390] = 0;
out_1425722008230317098[391] = 1;
out_1425722008230317098[392] = 0;
out_1425722008230317098[393] = 0;
out_1425722008230317098[394] = 0;
out_1425722008230317098[395] = 0;
out_1425722008230317098[396] = 0;
out_1425722008230317098[397] = 0;
out_1425722008230317098[398] = 0;
out_1425722008230317098[399] = 0;
out_1425722008230317098[400] = 0;
out_1425722008230317098[401] = 0;
out_1425722008230317098[402] = 0;
out_1425722008230317098[403] = 0;
out_1425722008230317098[404] = 0;
out_1425722008230317098[405] = 0;
out_1425722008230317098[406] = 0;
out_1425722008230317098[407] = 0;
out_1425722008230317098[408] = 0;
out_1425722008230317098[409] = 0;
out_1425722008230317098[410] = 0;
out_1425722008230317098[411] = 0;
out_1425722008230317098[412] = 0;
out_1425722008230317098[413] = 0;
out_1425722008230317098[414] = 1;
out_1425722008230317098[415] = 0;
out_1425722008230317098[416] = 0;
out_1425722008230317098[417] = 0;
out_1425722008230317098[418] = 0;
out_1425722008230317098[419] = 0;
out_1425722008230317098[420] = 0;
out_1425722008230317098[421] = 0;
out_1425722008230317098[422] = 0;
out_1425722008230317098[423] = 0;
out_1425722008230317098[424] = 0;
out_1425722008230317098[425] = 0;
out_1425722008230317098[426] = 0;
out_1425722008230317098[427] = 0;
out_1425722008230317098[428] = 0;
out_1425722008230317098[429] = 0;
out_1425722008230317098[430] = 0;
out_1425722008230317098[431] = 0;
out_1425722008230317098[432] = 0;
out_1425722008230317098[433] = 0;
out_1425722008230317098[434] = 0;
out_1425722008230317098[435] = 0;
out_1425722008230317098[436] = 0;
out_1425722008230317098[437] = 1;
out_1425722008230317098[438] = 0;
out_1425722008230317098[439] = 0;
out_1425722008230317098[440] = 0;
out_1425722008230317098[441] = 0;
out_1425722008230317098[442] = 0;
out_1425722008230317098[443] = 0;
out_1425722008230317098[444] = 0;
out_1425722008230317098[445] = 0;
out_1425722008230317098[446] = 0;
out_1425722008230317098[447] = 0;
out_1425722008230317098[448] = 0;
out_1425722008230317098[449] = 0;
out_1425722008230317098[450] = 0;
out_1425722008230317098[451] = 0;
out_1425722008230317098[452] = 0;
out_1425722008230317098[453] = 0;
out_1425722008230317098[454] = 0;
out_1425722008230317098[455] = 0;
out_1425722008230317098[456] = 0;
out_1425722008230317098[457] = 0;
out_1425722008230317098[458] = 0;
out_1425722008230317098[459] = 0;
out_1425722008230317098[460] = 1;
out_1425722008230317098[461] = 0;
out_1425722008230317098[462] = 0;
out_1425722008230317098[463] = 0;
out_1425722008230317098[464] = 0;
out_1425722008230317098[465] = 0;
out_1425722008230317098[466] = 0;
out_1425722008230317098[467] = 0;
out_1425722008230317098[468] = 0;
out_1425722008230317098[469] = 0;
out_1425722008230317098[470] = 0;
out_1425722008230317098[471] = 0;
out_1425722008230317098[472] = 0;
out_1425722008230317098[473] = 0;
out_1425722008230317098[474] = 0;
out_1425722008230317098[475] = 0;
out_1425722008230317098[476] = 0;
out_1425722008230317098[477] = 0;
out_1425722008230317098[478] = 0;
out_1425722008230317098[479] = 0;
out_1425722008230317098[480] = 0;
out_1425722008230317098[481] = 0;
out_1425722008230317098[482] = 0;
out_1425722008230317098[483] = 1;
}
void h_3(double *state, double *unused, double *out_580480245261766277) {
out_580480245261766277[0] = sqrt(pow(state[7], 2) + pow(state[8], 2) + pow(state[9], 2) + 9.9999999999999995e-7)*state[16];
}
void H_3(double *state, double *unused, double *out_8039239072597041883) {
out_8039239072597041883[0] = 0;
out_8039239072597041883[1] = 0;
out_8039239072597041883[2] = 0;
out_8039239072597041883[3] = 0;
out_8039239072597041883[4] = 0;
out_8039239072597041883[5] = 0;
out_8039239072597041883[6] = 0;
out_8039239072597041883[7] = state[7]*state[16]/sqrt(pow(state[7], 2) + pow(state[8], 2) + pow(state[9], 2) + 9.9999999999999995e-7);
out_8039239072597041883[8] = state[8]*state[16]/sqrt(pow(state[7], 2) + pow(state[8], 2) + pow(state[9], 2) + 9.9999999999999995e-7);
out_8039239072597041883[9] = state[9]*state[16]/sqrt(pow(state[7], 2) + pow(state[8], 2) + pow(state[9], 2) + 9.9999999999999995e-7);
out_8039239072597041883[10] = 0;
out_8039239072597041883[11] = 0;
out_8039239072597041883[12] = 0;
out_8039239072597041883[13] = 0;
out_8039239072597041883[14] = 0;
out_8039239072597041883[15] = 0;
out_8039239072597041883[16] = sqrt(pow(state[7], 2) + pow(state[8], 2) + pow(state[9], 2) + 9.9999999999999995e-7);
out_8039239072597041883[17] = 0;
out_8039239072597041883[18] = 0;
out_8039239072597041883[19] = 0;
out_8039239072597041883[20] = 0;
out_8039239072597041883[21] = 0;
out_8039239072597041883[22] = 0;
}
void h_4(double *state, double *unused, double *out_4245608367930427789) {
out_4245608367930427789[0] = state[10] + state[13];
out_4245608367930427789[1] = state[11] + state[14];
out_4245608367930427789[2] = state[12] + state[15];
}
void H_4(double *state, double *unused, double *out_7691622073353942749) {
out_7691622073353942749[0] = 0;
out_7691622073353942749[1] = 0;
out_7691622073353942749[2] = 0;
out_7691622073353942749[3] = 0;
out_7691622073353942749[4] = 0;
out_7691622073353942749[5] = 0;
out_7691622073353942749[6] = 0;
out_7691622073353942749[7] = 0;
out_7691622073353942749[8] = 0;
out_7691622073353942749[9] = 0;
out_7691622073353942749[10] = 1;
out_7691622073353942749[11] = 0;
out_7691622073353942749[12] = 0;
out_7691622073353942749[13] = 1;
out_7691622073353942749[14] = 0;
out_7691622073353942749[15] = 0;
out_7691622073353942749[16] = 0;
out_7691622073353942749[17] = 0;
out_7691622073353942749[18] = 0;
out_7691622073353942749[19] = 0;
out_7691622073353942749[20] = 0;
out_7691622073353942749[21] = 0;
out_7691622073353942749[22] = 0;
out_7691622073353942749[23] = 0;
out_7691622073353942749[24] = 0;
out_7691622073353942749[25] = 0;
out_7691622073353942749[26] = 0;
out_7691622073353942749[27] = 0;
out_7691622073353942749[28] = 0;
out_7691622073353942749[29] = 0;
out_7691622073353942749[30] = 0;
out_7691622073353942749[31] = 0;
out_7691622073353942749[32] = 0;
out_7691622073353942749[33] = 0;
out_7691622073353942749[34] = 1;
out_7691622073353942749[35] = 0;
out_7691622073353942749[36] = 0;
out_7691622073353942749[37] = 1;
out_7691622073353942749[38] = 0;
out_7691622073353942749[39] = 0;
out_7691622073353942749[40] = 0;
out_7691622073353942749[41] = 0;
out_7691622073353942749[42] = 0;
out_7691622073353942749[43] = 0;
out_7691622073353942749[44] = 0;
out_7691622073353942749[45] = 0;
out_7691622073353942749[46] = 0;
out_7691622073353942749[47] = 0;
out_7691622073353942749[48] = 0;
out_7691622073353942749[49] = 0;
out_7691622073353942749[50] = 0;
out_7691622073353942749[51] = 0;
out_7691622073353942749[52] = 0;
out_7691622073353942749[53] = 0;
out_7691622073353942749[54] = 0;
out_7691622073353942749[55] = 0;
out_7691622073353942749[56] = 0;
out_7691622073353942749[57] = 0;
out_7691622073353942749[58] = 1;
out_7691622073353942749[59] = 0;
out_7691622073353942749[60] = 0;
out_7691622073353942749[61] = 1;
out_7691622073353942749[62] = 0;
out_7691622073353942749[63] = 0;
out_7691622073353942749[64] = 0;
out_7691622073353942749[65] = 0;
out_7691622073353942749[66] = 0;
out_7691622073353942749[67] = 0;
out_7691622073353942749[68] = 0;
}
void h_9(double *state, double *unused, double *out_6350337263133992527) {
out_6350337263133992527[0] = state[10];
out_6350337263133992527[1] = state[11];
out_6350337263133992527[2] = state[12];
}
void H_9(double *state, double *unused, double *out_2203357074039413582) {
out_2203357074039413582[0] = 0;
out_2203357074039413582[1] = 0;
out_2203357074039413582[2] = 0;
out_2203357074039413582[3] = 0;
out_2203357074039413582[4] = 0;
out_2203357074039413582[5] = 0;
out_2203357074039413582[6] = 0;
out_2203357074039413582[7] = 0;
out_2203357074039413582[8] = 0;
out_2203357074039413582[9] = 0;
out_2203357074039413582[10] = 1;
out_2203357074039413582[11] = 0;
out_2203357074039413582[12] = 0;
out_2203357074039413582[13] = 0;
out_2203357074039413582[14] = 0;
out_2203357074039413582[15] = 0;
out_2203357074039413582[16] = 0;
out_2203357074039413582[17] = 0;
out_2203357074039413582[18] = 0;
out_2203357074039413582[19] = 0;
out_2203357074039413582[20] = 0;
out_2203357074039413582[21] = 0;
out_2203357074039413582[22] = 0;
out_2203357074039413582[23] = 0;
out_2203357074039413582[24] = 0;
out_2203357074039413582[25] = 0;
out_2203357074039413582[26] = 0;
out_2203357074039413582[27] = 0;
out_2203357074039413582[28] = 0;
out_2203357074039413582[29] = 0;
out_2203357074039413582[30] = 0;
out_2203357074039413582[31] = 0;
out_2203357074039413582[32] = 0;
out_2203357074039413582[33] = 0;
out_2203357074039413582[34] = 1;
out_2203357074039413582[35] = 0;
out_2203357074039413582[36] = 0;
out_2203357074039413582[37] = 0;
out_2203357074039413582[38] = 0;
out_2203357074039413582[39] = 0;
out_2203357074039413582[40] = 0;
out_2203357074039413582[41] = 0;
out_2203357074039413582[42] = 0;
out_2203357074039413582[43] = 0;
out_2203357074039413582[44] = 0;
out_2203357074039413582[45] = 0;
out_2203357074039413582[46] = 0;
out_2203357074039413582[47] = 0;
out_2203357074039413582[48] = 0;
out_2203357074039413582[49] = 0;
out_2203357074039413582[50] = 0;
out_2203357074039413582[51] = 0;
out_2203357074039413582[52] = 0;
out_2203357074039413582[53] = 0;
out_2203357074039413582[54] = 0;
out_2203357074039413582[55] = 0;
out_2203357074039413582[56] = 0;
out_2203357074039413582[57] = 0;
out_2203357074039413582[58] = 1;
out_2203357074039413582[59] = 0;
out_2203357074039413582[60] = 0;
out_2203357074039413582[61] = 0;
out_2203357074039413582[62] = 0;
out_2203357074039413582[63] = 0;
out_2203357074039413582[64] = 0;
out_2203357074039413582[65] = 0;
out_2203357074039413582[66] = 0;
out_2203357074039413582[67] = 0;
out_2203357074039413582[68] = 0;
}
void h_10(double *state, double *unused, double *out_5883173185422846693) {
out_5883173185422846693[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[17];
out_5883173185422846693[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[18];
out_5883173185422846693[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[19];
}
void H_10(double *state, double *unused, double *out_6275558625866197697) {
out_6275558625866197697[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
out_6275558625866197697[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
out_6275558625866197697[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2];
out_6275558625866197697[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
out_6275558625866197697[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
out_6275558625866197697[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
out_6275558625866197697[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
out_6275558625866197697[7] = 0;
out_6275558625866197697[8] = 0;
out_6275558625866197697[9] = 0;
out_6275558625866197697[10] = 0;
out_6275558625866197697[11] = 0;
out_6275558625866197697[12] = 0;
out_6275558625866197697[13] = 0;
out_6275558625866197697[14] = 0;
out_6275558625866197697[15] = 0;
out_6275558625866197697[16] = 0;
out_6275558625866197697[17] = 1;
out_6275558625866197697[18] = 0;
out_6275558625866197697[19] = 0;
out_6275558625866197697[20] = 0;
out_6275558625866197697[21] = 0;
out_6275558625866197697[22] = 0;
out_6275558625866197697[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
out_6275558625866197697[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
out_6275558625866197697[25] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2];
out_6275558625866197697[26] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
out_6275558625866197697[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
out_6275558625866197697[28] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
out_6275558625866197697[29] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
out_6275558625866197697[30] = 0;
out_6275558625866197697[31] = 0;
out_6275558625866197697[32] = 0;
out_6275558625866197697[33] = 0;
out_6275558625866197697[34] = 0;
out_6275558625866197697[35] = 0;
out_6275558625866197697[36] = 0;
out_6275558625866197697[37] = 0;
out_6275558625866197697[38] = 0;
out_6275558625866197697[39] = 0;
out_6275558625866197697[40] = 0;
out_6275558625866197697[41] = 1;
out_6275558625866197697[42] = 0;
out_6275558625866197697[43] = 0;
out_6275558625866197697[44] = 0;
out_6275558625866197697[45] = 0;
out_6275558625866197697[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2];
out_6275558625866197697[47] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2];
out_6275558625866197697[48] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
out_6275558625866197697[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
out_6275558625866197697[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
out_6275558625866197697[51] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
out_6275558625866197697[52] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
out_6275558625866197697[53] = 0;
out_6275558625866197697[54] = 0;
out_6275558625866197697[55] = 0;
out_6275558625866197697[56] = 0;
out_6275558625866197697[57] = 0;
out_6275558625866197697[58] = 0;
out_6275558625866197697[59] = 0;
out_6275558625866197697[60] = 0;
out_6275558625866197697[61] = 0;
out_6275558625866197697[62] = 0;
out_6275558625866197697[63] = 0;
out_6275558625866197697[64] = 0;
out_6275558625866197697[65] = 1;
out_6275558625866197697[66] = 0;
out_6275558625866197697[67] = 0;
out_6275558625866197697[68] = 0;
}
void h_12(double *state, double *unused, double *out_1029741073182827027) {
out_1029741073182827027[0] = state[0];
out_1029741073182827027[1] = state[1];
out_1029741073182827027[2] = state[2];
}
void H_12(double *state, double *unused, double *out_3005095031555557250) {
out_3005095031555557250[0] = 1;
out_3005095031555557250[1] = 0;
out_3005095031555557250[2] = 0;
out_3005095031555557250[3] = 0;
out_3005095031555557250[4] = 0;
out_3005095031555557250[5] = 0;
out_3005095031555557250[6] = 0;
out_3005095031555557250[7] = 0;
out_3005095031555557250[8] = 0;
out_3005095031555557250[9] = 0;
out_3005095031555557250[10] = 0;
out_3005095031555557250[11] = 0;
out_3005095031555557250[12] = 0;
out_3005095031555557250[13] = 0;
out_3005095031555557250[14] = 0;
out_3005095031555557250[15] = 0;
out_3005095031555557250[16] = 0;
out_3005095031555557250[17] = 0;
out_3005095031555557250[18] = 0;
out_3005095031555557250[19] = 0;
out_3005095031555557250[20] = 0;
out_3005095031555557250[21] = 0;
out_3005095031555557250[22] = 0;
out_3005095031555557250[23] = 0;
out_3005095031555557250[24] = 1;
out_3005095031555557250[25] = 0;
out_3005095031555557250[26] = 0;
out_3005095031555557250[27] = 0;
out_3005095031555557250[28] = 0;
out_3005095031555557250[29] = 0;
out_3005095031555557250[30] = 0;
out_3005095031555557250[31] = 0;
out_3005095031555557250[32] = 0;
out_3005095031555557250[33] = 0;
out_3005095031555557250[34] = 0;
out_3005095031555557250[35] = 0;
out_3005095031555557250[36] = 0;
out_3005095031555557250[37] = 0;
out_3005095031555557250[38] = 0;
out_3005095031555557250[39] = 0;
out_3005095031555557250[40] = 0;
out_3005095031555557250[41] = 0;
out_3005095031555557250[42] = 0;
out_3005095031555557250[43] = 0;
out_3005095031555557250[44] = 0;
out_3005095031555557250[45] = 0;
out_3005095031555557250[46] = 0;
out_3005095031555557250[47] = 0;
out_3005095031555557250[48] = 1;
out_3005095031555557250[49] = 0;
out_3005095031555557250[50] = 0;
out_3005095031555557250[51] = 0;
out_3005095031555557250[52] = 0;
out_3005095031555557250[53] = 0;
out_3005095031555557250[54] = 0;
out_3005095031555557250[55] = 0;
out_3005095031555557250[56] = 0;
out_3005095031555557250[57] = 0;
out_3005095031555557250[58] = 0;
out_3005095031555557250[59] = 0;
out_3005095031555557250[60] = 0;
out_3005095031555557250[61] = 0;
out_3005095031555557250[62] = 0;
out_3005095031555557250[63] = 0;
out_3005095031555557250[64] = 0;
out_3005095031555557250[65] = 0;
out_3005095031555557250[66] = 0;
out_3005095031555557250[67] = 0;
out_3005095031555557250[68] = 0;
}
void h_31(double *state, double *unused, double *out_6461370520649494816) {
out_6461370520649494816[0] = state[7];
out_6461370520649494816[1] = state[8];
out_6461370520649494816[2] = state[9];
}
void H_31(double *state, double *unused, double *out_5474853234853266326) {
out_5474853234853266326[0] = 0;
out_5474853234853266326[1] = 0;
out_5474853234853266326[2] = 0;
out_5474853234853266326[3] = 0;
out_5474853234853266326[4] = 0;
out_5474853234853266326[5] = 0;
out_5474853234853266326[6] = 0;
out_5474853234853266326[7] = 1;
out_5474853234853266326[8] = 0;
out_5474853234853266326[9] = 0;
out_5474853234853266326[10] = 0;
out_5474853234853266326[11] = 0;
out_5474853234853266326[12] = 0;
out_5474853234853266326[13] = 0;
out_5474853234853266326[14] = 0;
out_5474853234853266326[15] = 0;
out_5474853234853266326[16] = 0;
out_5474853234853266326[17] = 0;
out_5474853234853266326[18] = 0;
out_5474853234853266326[19] = 0;
out_5474853234853266326[20] = 0;
out_5474853234853266326[21] = 0;
out_5474853234853266326[22] = 0;
out_5474853234853266326[23] = 0;
out_5474853234853266326[24] = 0;
out_5474853234853266326[25] = 0;
out_5474853234853266326[26] = 0;
out_5474853234853266326[27] = 0;
out_5474853234853266326[28] = 0;
out_5474853234853266326[29] = 0;
out_5474853234853266326[30] = 0;
out_5474853234853266326[31] = 1;
out_5474853234853266326[32] = 0;
out_5474853234853266326[33] = 0;
out_5474853234853266326[34] = 0;
out_5474853234853266326[35] = 0;
out_5474853234853266326[36] = 0;
out_5474853234853266326[37] = 0;
out_5474853234853266326[38] = 0;
out_5474853234853266326[39] = 0;
out_5474853234853266326[40] = 0;
out_5474853234853266326[41] = 0;
out_5474853234853266326[42] = 0;
out_5474853234853266326[43] = 0;
out_5474853234853266326[44] = 0;
out_5474853234853266326[45] = 0;
out_5474853234853266326[46] = 0;
out_5474853234853266326[47] = 0;
out_5474853234853266326[48] = 0;
out_5474853234853266326[49] = 0;
out_5474853234853266326[50] = 0;
out_5474853234853266326[51] = 0;
out_5474853234853266326[52] = 0;
out_5474853234853266326[53] = 0;
out_5474853234853266326[54] = 0;
out_5474853234853266326[55] = 1;
out_5474853234853266326[56] = 0;
out_5474853234853266326[57] = 0;
out_5474853234853266326[58] = 0;
out_5474853234853266326[59] = 0;
out_5474853234853266326[60] = 0;
out_5474853234853266326[61] = 0;
out_5474853234853266326[62] = 0;
out_5474853234853266326[63] = 0;
out_5474853234853266326[64] = 0;
out_5474853234853266326[65] = 0;
out_5474853234853266326[66] = 0;
out_5474853234853266326[67] = 0;
out_5474853234853266326[68] = 0;
}
void h_32(double *state, double *unused, double *out_2101340024716927954) {
out_2101340024716927954[0] = state[3];
out_2101340024716927954[1] = state[4];
out_2101340024716927954[2] = state[5];
out_2101340024716927954[3] = state[6];
}
void H_32(double *state, double *unused, double *out_4491552036411005924) {
out_4491552036411005924[0] = 0;
out_4491552036411005924[1] = 0;
out_4491552036411005924[2] = 0;
out_4491552036411005924[3] = 1;
out_4491552036411005924[4] = 0;
out_4491552036411005924[5] = 0;
out_4491552036411005924[6] = 0;
out_4491552036411005924[7] = 0;
out_4491552036411005924[8] = 0;
out_4491552036411005924[9] = 0;
out_4491552036411005924[10] = 0;
out_4491552036411005924[11] = 0;
out_4491552036411005924[12] = 0;
out_4491552036411005924[13] = 0;
out_4491552036411005924[14] = 0;
out_4491552036411005924[15] = 0;
out_4491552036411005924[16] = 0;
out_4491552036411005924[17] = 0;
out_4491552036411005924[18] = 0;
out_4491552036411005924[19] = 0;
out_4491552036411005924[20] = 0;
out_4491552036411005924[21] = 0;
out_4491552036411005924[22] = 0;
out_4491552036411005924[23] = 0;
out_4491552036411005924[24] = 0;
out_4491552036411005924[25] = 0;
out_4491552036411005924[26] = 0;
out_4491552036411005924[27] = 1;
out_4491552036411005924[28] = 0;
out_4491552036411005924[29] = 0;
out_4491552036411005924[30] = 0;
out_4491552036411005924[31] = 0;
out_4491552036411005924[32] = 0;
out_4491552036411005924[33] = 0;
out_4491552036411005924[34] = 0;
out_4491552036411005924[35] = 0;
out_4491552036411005924[36] = 0;
out_4491552036411005924[37] = 0;
out_4491552036411005924[38] = 0;
out_4491552036411005924[39] = 0;
out_4491552036411005924[40] = 0;
out_4491552036411005924[41] = 0;
out_4491552036411005924[42] = 0;
out_4491552036411005924[43] = 0;
out_4491552036411005924[44] = 0;
out_4491552036411005924[45] = 0;
out_4491552036411005924[46] = 0;
out_4491552036411005924[47] = 0;
out_4491552036411005924[48] = 0;
out_4491552036411005924[49] = 0;
out_4491552036411005924[50] = 0;
out_4491552036411005924[51] = 1;
out_4491552036411005924[52] = 0;
out_4491552036411005924[53] = 0;
out_4491552036411005924[54] = 0;
out_4491552036411005924[55] = 0;
out_4491552036411005924[56] = 0;
out_4491552036411005924[57] = 0;
out_4491552036411005924[58] = 0;
out_4491552036411005924[59] = 0;
out_4491552036411005924[60] = 0;
out_4491552036411005924[61] = 0;
out_4491552036411005924[62] = 0;
out_4491552036411005924[63] = 0;
out_4491552036411005924[64] = 0;
out_4491552036411005924[65] = 0;
out_4491552036411005924[66] = 0;
out_4491552036411005924[67] = 0;
out_4491552036411005924[68] = 0;
out_4491552036411005924[69] = 0;
out_4491552036411005924[70] = 0;
out_4491552036411005924[71] = 0;
out_4491552036411005924[72] = 0;
out_4491552036411005924[73] = 0;
out_4491552036411005924[74] = 0;
out_4491552036411005924[75] = 1;
out_4491552036411005924[76] = 0;
out_4491552036411005924[77] = 0;
out_4491552036411005924[78] = 0;
out_4491552036411005924[79] = 0;
out_4491552036411005924[80] = 0;
out_4491552036411005924[81] = 0;
out_4491552036411005924[82] = 0;
out_4491552036411005924[83] = 0;
out_4491552036411005924[84] = 0;
out_4491552036411005924[85] = 0;
out_4491552036411005924[86] = 0;
out_4491552036411005924[87] = 0;
out_4491552036411005924[88] = 0;
out_4491552036411005924[89] = 0;
out_4491552036411005924[90] = 0;
out_4491552036411005924[91] = 0;
}
void h_13(double *state, double *unused, double *out_2424738802151988478) {
out_2424738802151988478[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7];
out_2424738802151988478[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8];
out_2424738802151988478[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9];
}
void H_13(double *state, double *unused, double *out_8550083838302739916) {
out_8550083838302739916[0] = 0;
out_8550083838302739916[1] = 0;
out_8550083838302739916[2] = 0;
out_8550083838302739916[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
out_8550083838302739916[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
out_8550083838302739916[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7];
out_8550083838302739916[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
out_8550083838302739916[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2);
out_8550083838302739916[8] = 2*state[3]*state[6] + 2*state[4]*state[5];
out_8550083838302739916[9] = -2*state[3]*state[5] + 2*state[4]*state[6];
out_8550083838302739916[10] = 0;
out_8550083838302739916[11] = 0;
out_8550083838302739916[12] = 0;
out_8550083838302739916[13] = 0;
out_8550083838302739916[14] = 0;
out_8550083838302739916[15] = 0;
out_8550083838302739916[16] = 0;
out_8550083838302739916[17] = 0;
out_8550083838302739916[18] = 0;
out_8550083838302739916[19] = 0;
out_8550083838302739916[20] = 0;
out_8550083838302739916[21] = 0;
out_8550083838302739916[22] = 0;
out_8550083838302739916[23] = 0;
out_8550083838302739916[24] = 0;
out_8550083838302739916[25] = 0;
out_8550083838302739916[26] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
out_8550083838302739916[27] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
out_8550083838302739916[28] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
out_8550083838302739916[29] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8];
out_8550083838302739916[30] = -2*state[3]*state[6] + 2*state[4]*state[5];
out_8550083838302739916[31] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2);
out_8550083838302739916[32] = 2*state[3]*state[4] + 2*state[5]*state[6];
out_8550083838302739916[33] = 0;
out_8550083838302739916[34] = 0;
out_8550083838302739916[35] = 0;
out_8550083838302739916[36] = 0;
out_8550083838302739916[37] = 0;
out_8550083838302739916[38] = 0;
out_8550083838302739916[39] = 0;
out_8550083838302739916[40] = 0;
out_8550083838302739916[41] = 0;
out_8550083838302739916[42] = 0;
out_8550083838302739916[43] = 0;
out_8550083838302739916[44] = 0;
out_8550083838302739916[45] = 0;
out_8550083838302739916[46] = 0;
out_8550083838302739916[47] = 0;
out_8550083838302739916[48] = 0;
out_8550083838302739916[49] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
out_8550083838302739916[50] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7];
out_8550083838302739916[51] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
out_8550083838302739916[52] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
out_8550083838302739916[53] = 2*state[3]*state[5] + 2*state[4]*state[6];
out_8550083838302739916[54] = -2*state[3]*state[4] + 2*state[5]*state[6];
out_8550083838302739916[55] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2);
out_8550083838302739916[56] = 0;
out_8550083838302739916[57] = 0;
out_8550083838302739916[58] = 0;
out_8550083838302739916[59] = 0;
out_8550083838302739916[60] = 0;
out_8550083838302739916[61] = 0;
out_8550083838302739916[62] = 0;
out_8550083838302739916[63] = 0;
out_8550083838302739916[64] = 0;
out_8550083838302739916[65] = 0;
out_8550083838302739916[66] = 0;
out_8550083838302739916[67] = 0;
out_8550083838302739916[68] = 0;
}
void h_14(double *state, double *unused, double *out_6350337263133992527) {
out_6350337263133992527[0] = state[10];
out_6350337263133992527[1] = state[11];
out_6350337263133992527[2] = state[12];
}
void H_14(double *state, double *unused, double *out_2203357074039413582) {
out_2203357074039413582[0] = 0;
out_2203357074039413582[1] = 0;
out_2203357074039413582[2] = 0;
out_2203357074039413582[3] = 0;
out_2203357074039413582[4] = 0;
out_2203357074039413582[5] = 0;
out_2203357074039413582[6] = 0;
out_2203357074039413582[7] = 0;
out_2203357074039413582[8] = 0;
out_2203357074039413582[9] = 0;
out_2203357074039413582[10] = 1;
out_2203357074039413582[11] = 0;
out_2203357074039413582[12] = 0;
out_2203357074039413582[13] = 0;
out_2203357074039413582[14] = 0;
out_2203357074039413582[15] = 0;
out_2203357074039413582[16] = 0;
out_2203357074039413582[17] = 0;
out_2203357074039413582[18] = 0;
out_2203357074039413582[19] = 0;
out_2203357074039413582[20] = 0;
out_2203357074039413582[21] = 0;
out_2203357074039413582[22] = 0;
out_2203357074039413582[23] = 0;
out_2203357074039413582[24] = 0;
out_2203357074039413582[25] = 0;
out_2203357074039413582[26] = 0;
out_2203357074039413582[27] = 0;
out_2203357074039413582[28] = 0;
out_2203357074039413582[29] = 0;
out_2203357074039413582[30] = 0;
out_2203357074039413582[31] = 0;
out_2203357074039413582[32] = 0;
out_2203357074039413582[33] = 0;
out_2203357074039413582[34] = 1;
out_2203357074039413582[35] = 0;
out_2203357074039413582[36] = 0;
out_2203357074039413582[37] = 0;
out_2203357074039413582[38] = 0;
out_2203357074039413582[39] = 0;
out_2203357074039413582[40] = 0;
out_2203357074039413582[41] = 0;
out_2203357074039413582[42] = 0;
out_2203357074039413582[43] = 0;
out_2203357074039413582[44] = 0;
out_2203357074039413582[45] = 0;
out_2203357074039413582[46] = 0;
out_2203357074039413582[47] = 0;
out_2203357074039413582[48] = 0;
out_2203357074039413582[49] = 0;
out_2203357074039413582[50] = 0;
out_2203357074039413582[51] = 0;
out_2203357074039413582[52] = 0;
out_2203357074039413582[53] = 0;
out_2203357074039413582[54] = 0;
out_2203357074039413582[55] = 0;
out_2203357074039413582[56] = 0;
out_2203357074039413582[57] = 0;
out_2203357074039413582[58] = 1;
out_2203357074039413582[59] = 0;
out_2203357074039413582[60] = 0;
out_2203357074039413582[61] = 0;
out_2203357074039413582[62] = 0;
out_2203357074039413582[63] = 0;
out_2203357074039413582[64] = 0;
out_2203357074039413582[65] = 0;
out_2203357074039413582[66] = 0;
out_2203357074039413582[67] = 0;
out_2203357074039413582[68] = 0;
}
void h_19(double *state, double *unused, double *out_5874493945137936551) {
out_5874493945137936551[0] = state[20];
out_5874493945137936551[1] = state[21];
out_5874493945137936551[2] = state[22];
}
void H_19(double *state, double *unused, double *out_6160069650627068086) {
out_6160069650627068086[0] = 0;
out_6160069650627068086[1] = 0;
out_6160069650627068086[2] = 0;
out_6160069650627068086[3] = 0;
out_6160069650627068086[4] = 0;
out_6160069650627068086[5] = 0;
out_6160069650627068086[6] = 0;
out_6160069650627068086[7] = 0;
out_6160069650627068086[8] = 0;
out_6160069650627068086[9] = 0;
out_6160069650627068086[10] = 0;
out_6160069650627068086[11] = 0;
out_6160069650627068086[12] = 0;
out_6160069650627068086[13] = 0;
out_6160069650627068086[14] = 0;
out_6160069650627068086[15] = 0;
out_6160069650627068086[16] = 0;
out_6160069650627068086[17] = 0;
out_6160069650627068086[18] = 0;
out_6160069650627068086[19] = 0;
out_6160069650627068086[20] = 1;
out_6160069650627068086[21] = 0;
out_6160069650627068086[22] = 0;
out_6160069650627068086[23] = 0;
out_6160069650627068086[24] = 0;
out_6160069650627068086[25] = 0;
out_6160069650627068086[26] = 0;
out_6160069650627068086[27] = 0;
out_6160069650627068086[28] = 0;
out_6160069650627068086[29] = 0;
out_6160069650627068086[30] = 0;
out_6160069650627068086[31] = 0;
out_6160069650627068086[32] = 0;
out_6160069650627068086[33] = 0;
out_6160069650627068086[34] = 0;
out_6160069650627068086[35] = 0;
out_6160069650627068086[36] = 0;
out_6160069650627068086[37] = 0;
out_6160069650627068086[38] = 0;
out_6160069650627068086[39] = 0;
out_6160069650627068086[40] = 0;
out_6160069650627068086[41] = 0;
out_6160069650627068086[42] = 0;
out_6160069650627068086[43] = 0;
out_6160069650627068086[44] = 1;
out_6160069650627068086[45] = 0;
out_6160069650627068086[46] = 0;
out_6160069650627068086[47] = 0;
out_6160069650627068086[48] = 0;
out_6160069650627068086[49] = 0;
out_6160069650627068086[50] = 0;
out_6160069650627068086[51] = 0;
out_6160069650627068086[52] = 0;
out_6160069650627068086[53] = 0;
out_6160069650627068086[54] = 0;
out_6160069650627068086[55] = 0;
out_6160069650627068086[56] = 0;
out_6160069650627068086[57] = 0;
out_6160069650627068086[58] = 0;
out_6160069650627068086[59] = 0;
out_6160069650627068086[60] = 0;
out_6160069650627068086[61] = 0;
out_6160069650627068086[62] = 0;
out_6160069650627068086[63] = 0;
out_6160069650627068086[64] = 0;
out_6160069650627068086[65] = 0;
out_6160069650627068086[66] = 0;
out_6160069650627068086[67] = 0;
out_6160069650627068086[68] = 1;
}
}
extern "C"{
#define DIM 23
#define EDIM 22
#define MEDIM 22
typedef void (*Hfun)(double *, double *, double *);
void predict(double *x, double *P, double *Q, double dt);
const static double MAHA_THRESH_3 = 3.841459;
void update_3(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_4 = 7.814728;
void update_4(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_9 = 7.814728;
void update_9(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_10 = 7.814728;
void update_10(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_12 = 7.814728;
void update_12(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_31 = 7.814728;
void update_31(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_32 = 9.487729;
void update_32(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_13 = 7.814728;
void update_13(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_14 = 7.814728;
void update_14(double *, double *, double *, double *, double *);
const static double MAHA_THRESH_19 = 7.814728;
void update_19(double *, double *, double *, double *, double *);
}
#include <eigen3/Eigen/Dense>
#include <iostream>
typedef Eigen::Matrix<double, DIM, DIM, Eigen::RowMajor> DDM;
typedef Eigen::Matrix<double, EDIM, EDIM, Eigen::RowMajor> EEM;
typedef Eigen::Matrix<double, DIM, EDIM, Eigen::RowMajor> DEM;
void predict(double *in_x, double *in_P, double *in_Q, double dt) {
typedef Eigen::Matrix<double, MEDIM, MEDIM, Eigen::RowMajor> RRM;
double nx[DIM] = {0};
double in_F[EDIM*EDIM] = {0};
// functions from sympy
f_fun(in_x, dt, nx);
F_fun(in_x, dt, in_F);
EEM F(in_F);
EEM P(in_P);
EEM Q(in_Q);
RRM F_main = F.topLeftCorner(MEDIM, MEDIM);
P.topLeftCorner(MEDIM, MEDIM) = (F_main * P.topLeftCorner(MEDIM, MEDIM)) * F_main.transpose();
P.topRightCorner(MEDIM, EDIM - MEDIM) = F_main * P.topRightCorner(MEDIM, EDIM - MEDIM);
P.bottomLeftCorner(EDIM - MEDIM, MEDIM) = P.bottomLeftCorner(EDIM - MEDIM, MEDIM) * F_main.transpose();
P = P + dt*Q;
// copy out state
memcpy(in_x, nx, DIM * sizeof(double));
memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
}
// note: extra_args dim only correct when null space projecting
// otherwise 1
template <int ZDIM, int EADIM, bool MAHA_TEST>
void update(double *in_x, double *in_P, Hfun h_fun, Hfun H_fun, Hfun Hea_fun, double *in_z, double *in_R, double *in_ea, double MAHA_THRESHOLD) {
typedef Eigen::Matrix<double, ZDIM, ZDIM, Eigen::RowMajor> ZZM;
typedef Eigen::Matrix<double, ZDIM, DIM, Eigen::RowMajor> ZDM;
typedef Eigen::Matrix<double, Eigen::Dynamic, EDIM, Eigen::RowMajor> XEM;
//typedef Eigen::Matrix<double, EDIM, ZDIM, Eigen::RowMajor> EZM;
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> X1M;
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> XXM;
double in_hx[ZDIM] = {0};
double in_H[ZDIM * DIM] = {0};
double in_H_mod[EDIM * DIM] = {0};
double delta_x[EDIM] = {0};
double x_new[DIM] = {0};
// state x, P
Eigen::Matrix<double, ZDIM, 1> z(in_z);
EEM P(in_P);
ZZM pre_R(in_R);
// functions from sympy
h_fun(in_x, in_ea, in_hx);
H_fun(in_x, in_ea, in_H);
ZDM pre_H(in_H);
// get y (y = z - hx)
Eigen::Matrix<double, ZDIM, 1> pre_y(in_hx); pre_y = z - pre_y;
X1M y; XXM H; XXM R;
if (Hea_fun){
typedef Eigen::Matrix<double, ZDIM, EADIM, Eigen::RowMajor> ZAM;
double in_Hea[ZDIM * EADIM] = {0};
Hea_fun(in_x, in_ea, in_Hea);
ZAM Hea(in_Hea);
XXM A = Hea.transpose().fullPivLu().kernel();
y = A.transpose() * pre_y;
H = A.transpose() * pre_H;
R = A.transpose() * pre_R * A;
} else {
y = pre_y;
H = pre_H;
R = pre_R;
}
// get modified H
H_mod_fun(in_x, in_H_mod);
DEM H_mod(in_H_mod);
XEM H_err = H * H_mod;
// Do mahalobis distance test
if (MAHA_TEST){
XXM a = (H_err * P * H_err.transpose() + R).inverse();
double maha_dist = y.transpose() * a * y;
if (maha_dist > MAHA_THRESHOLD){
R = 1.0e16 * R;
}
}
// Outlier resilient weighting
double weight = 1;//(1.5)/(1 + y.squaredNorm()/R.sum());
// kalman gains and I_KH
XXM S = ((H_err * P) * H_err.transpose()) + R/weight;
XEM KT = S.fullPivLu().solve(H_err * P.transpose());
//EZM K = KT.transpose(); TODO: WHY DOES THIS NOT COMPILE?
//EZM K = S.fullPivLu().solve(H_err * P.transpose()).transpose();
//std::cout << "Here is the matrix rot:\n" << K << std::endl;
EEM I_KH = Eigen::Matrix<double, EDIM, EDIM>::Identity() - (KT.transpose() * H_err);
// update state by injecting dx
Eigen::Matrix<double, EDIM, 1> dx(delta_x);
dx = (KT.transpose() * y);
memcpy(delta_x, dx.data(), EDIM * sizeof(double));
err_fun(in_x, delta_x, x_new);
Eigen::Matrix<double, DIM, 1> x(x_new);
// update cov
P = ((I_KH * P) * I_KH.transpose()) + ((KT.transpose() * R) * KT);
// copy out state
memcpy(in_x, x.data(), DIM * sizeof(double));
memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
memcpy(in_z, y.data(), y.rows() * sizeof(double));
}
extern "C"{
void update_3(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<1,3,0>(in_x, in_P, h_3, H_3, NULL, in_z, in_R, in_ea, MAHA_THRESH_3);
}
void update_4(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_4, H_4, NULL, in_z, in_R, in_ea, MAHA_THRESH_4);
}
void update_9(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_9, H_9, NULL, in_z, in_R, in_ea, MAHA_THRESH_9);
}
void update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_10, H_10, NULL, in_z, in_R, in_ea, MAHA_THRESH_10);
}
void update_12(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_12, H_12, NULL, in_z, in_R, in_ea, MAHA_THRESH_12);
}
void update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_31, H_31, NULL, in_z, in_R, in_ea, MAHA_THRESH_31);
}
void update_32(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<4,3,0>(in_x, in_P, h_32, H_32, NULL, in_z, in_R, in_ea, MAHA_THRESH_32);
}
void update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_13, H_13, NULL, in_z, in_R, in_ea, MAHA_THRESH_13);
}
void update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_14, H_14, NULL, in_z, in_R, in_ea, MAHA_THRESH_14);
}
void update_19(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<3,3,0>(in_x, in_P, h_19, H_19, NULL, in_z, in_R, in_ea, MAHA_THRESH_19);
}
}
| 46.582505
| 673
| 0.686761
|
lth1436
|
4039979957516c4bc1245e7b61baf93ccd66128f
| 964
|
cpp
|
C++
|
Interviewbit/TwoPointers/intersection_of_sorted_arrays.cpp
|
nullpointxr/HackerRankSolutions
|
052c9ab66bfd66268b81d8e7888c3d7504ab988f
|
[
"Apache-2.0"
] | 1
|
2020-10-25T16:12:09.000Z
|
2020-10-25T16:12:09.000Z
|
Interviewbit/TwoPointers/intersection_of_sorted_arrays.cpp
|
abhishek-sankar/Competitive-Coding-Solutions
|
052c9ab66bfd66268b81d8e7888c3d7504ab988f
|
[
"Apache-2.0"
] | 3
|
2020-11-12T05:44:24.000Z
|
2021-04-05T08:09:01.000Z
|
Interviewbit/TwoPointers/intersection_of_sorted_arrays.cpp
|
nullpointxr/HackerRankSolutions
|
052c9ab66bfd66268b81d8e7888c3d7504ab988f
|
[
"Apache-2.0"
] | null | null | null |
/*
https://www.interviewbit.com/problems/intersection-of-sorted-arrays/
Intersection Of Sorted Arrays
Asked in: Facebook, Google
Find the intersection of two sorted arrays.
OR in other words,
Given 2 sorted arrays, find all the elements which occur in both the arrays.
Example :
Input :
A : [1 2 3 3 4 5 6]
B : [3 3 5]
Output : [3 3 5]
Input :
A : [1 2 3 3 4 5 6]
B : [3 5]
Output : [3 5]
NOTE : For the purpose of this problem ( as also conveyed by the sample case ), assume that elements that appear more than once in both arrays should be included multiple times in the final output.
*/
vector<int> Solution::intersect(const vector<int> &A, const vector<int> &B) {
vector<int>res;
for(int i=0, j=0;i<A.size() && j<B.size();){
if(A[i]==B[j]){
res.push_back(A[i]);
i++;
j++;
}else if(A[i]<B[j]){
i++;
}else{
j++;
}
}
return res;
}
| 26.054054
| 199
| 0.5861
|
nullpointxr
|
403ff2e3015c718a5d5239b0c203464b263dea44
| 1,550
|
cpp
|
C++
|
vkconfig_core/layer_state.cpp
|
dorian-apanel-intel/VulkanTools
|
ff6d769f160def2176d6325d8bbee78215ea3c09
|
[
"Apache-2.0"
] | 579
|
2016-02-16T14:24:33.000Z
|
2022-03-30T01:15:29.000Z
|
vkconfig_core/layer_state.cpp
|
dorian-apanel-intel/VulkanTools
|
ff6d769f160def2176d6325d8bbee78215ea3c09
|
[
"Apache-2.0"
] | 1,064
|
2016-02-18T00:27:10.000Z
|
2022-03-31T18:17:08.000Z
|
vkconfig_core/layer_state.cpp
|
dorian-apanel-intel/VulkanTools
|
ff6d769f160def2176d6325d8bbee78215ea3c09
|
[
"Apache-2.0"
] | 200
|
2016-02-16T19:57:40.000Z
|
2022-03-10T22:30:59.000Z
|
/*
* Copyright (c) 2020-2021 Valve Corporation
* Copyright (c) 2020-2021 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Authors:
* - Christophe Riccio <christophe@lunarg.com>
*/
#include "layer_state.h"
#include "util.h"
#include <cstring>
#include <cassert>
const char* GetToken(LayerState state) {
static const char* table[] = {
"APPLICATION_CONTROLLED", // LAYER_STATE_APPLICATION_CONTROLLED
"OVERRIDDEN", // LAYER_STATE_OVERRIDDEN
"EXCLUDED" // LAYER_STATE_EXCLUDED
};
static_assert(countof(table) == LAYER_STATE_COUNT, "The tranlation table size doesn't match the enum number of elements");
return table[state];
}
LayerState GetLayerState(const char* token) {
for (std::size_t i = 0, n = LAYER_STATE_COUNT; i < n; ++i) {
const LayerState layer_state = static_cast<LayerState>(i);
if (std::strcmp(GetToken(layer_state), token) == 0) return layer_state;
}
assert(0);
return static_cast<LayerState>(-1);
}
| 32.291667
| 126
| 0.689032
|
dorian-apanel-intel
|
4043aa0a05715467a56bc3de351a54e62952f628
| 3,855
|
cpp
|
C++
|
WaveletTree/WaveletTree/WaveletNode.cpp
|
Vaan5/Bioinformatics---Construction-of-a-binary-wavelet-tree-using-RRR-structure
|
12b8c0a293d521204c97580a6b0ab2654bffac8b
|
[
"MIT"
] | null | null | null |
WaveletTree/WaveletTree/WaveletNode.cpp
|
Vaan5/Bioinformatics---Construction-of-a-binary-wavelet-tree-using-RRR-structure
|
12b8c0a293d521204c97580a6b0ab2654bffac8b
|
[
"MIT"
] | null | null | null |
WaveletTree/WaveletTree/WaveletNode.cpp
|
Vaan5/Bioinformatics---Construction-of-a-binary-wavelet-tree-using-RRR-structure
|
12b8c0a293d521204c97580a6b0ab2654bffac8b
|
[
"MIT"
] | 4
|
2016-07-24T18:23:06.000Z
|
2019-04-11T12:37:22.000Z
|
#include "WaveletNode.h"
// Returns left child node
WaveletNode* WaveletNode::getLeftChild() const {
return this->leftChild;
}
// Returns right child node
WaveletNode* WaveletNode::getRightChild() const {
return this->rightChild;
}
// Returns parent node
WaveletNode* WaveletNode::getParent() const {
return this->parent;
}
// Creates a new wavelet tree node
// content_ content to be stored in the node
// parent_ parent node in the wavelet tree
// start_ first index of the alphabet subset stored in the node
// end_ last index of the alphabet subset stored in the node
// alphabetIndices_ symbol -> index alphabet mapping calculated when constructing the wavelet tree
// isLeftChild_ flag to know if the current node is a left child
// visualOutput file handler used to generate graphviz data
WaveletNode::WaveletNode(string content_, WaveletNode *parent_, uint8_t start_, uint8_t end_, alphabet &alphabetIndices_, bool isLeftChild_, FILE* visualOutput) : parent(parent_), start(start_), end(end_), isLeftChild(isLeftChild_) {
this->id = idGenerator++;
if (visualOutput != NULL) {
if (this->parent != NULL) {
fprintf(visualOutput, "\t%d -> %d;\n", this->parent->id, this->id);
}
fprintf(visualOutput, "\t%d [ label = \"%s\\n", this->id, content_.c_str());
}
// Alphabet subrange division
// start and end are inclusive indices
// Current node children will get alphabet intervals [start, threshold] and [threshold + 1, end]
this->threshold = (uint8_t)(start / 2. + end / 2.);
uint64_t zeroIndex = 0;
uint64_t oneIndex = 0;
uint64_t contentSize = content_.length();
// Substring from original string that contains only the 0 encoded content part
char* contentZeroes = (char*)malloc(sizeof(char) * (contentSize + 1));
// Substring from original string that contains only the 1 encoded content part
char* contentOnes = (char*)malloc(sizeof(char) * (contentSize + 1));
// Create binary string for RRR input
for (uint64_t i = 0; i < contentSize; i++) {
char c = content_[i];
if (alphabetIndices_[c] <= threshold) {
contentZeroes[zeroIndex] = c;
zeroIndex++;
content_[i] = '0';
}
else {
contentOnes[oneIndex] = c;
oneIndex++;
content_[i] = '1';
}
}
if (visualOutput != NULL) {
fprintf(visualOutput, "%s\"];\n", content_.c_str());
}
// Create RRR
this->content = new RRR(content_);
// Denote the end of substrings
contentOnes[oneIndex] = '\0';
contentZeroes[zeroIndex] = '\0';
// Create children only if content has more than two characters
if ((this->end - this->start) > 1) {
this->leftChild = new WaveletNode((string)contentZeroes, this, this->start, this->threshold, alphabetIndices_, true, visualOutput);
free(contentZeroes);
if (this->threshold + 1 != this->end) this->rightChild = new WaveletNode((string)contentOnes, this, this->threshold + 1, this->end, alphabetIndices_, false, visualOutput);
free(contentOnes);
} else {
// Free aliocated memory
free(contentOnes);
free(contentZeroes);
}
}
// Free memory
WaveletNode::~WaveletNode() {
delete this->leftChild;
delete this->rightChild;
delete this->content;
}
// Returns RRR in which the content is stored
RRR* WaveletNode::getContent() const {
return content;
}
// Returns threshold used to define left and right child alhpabet subsets
uint8_t WaveletNode::getThreshold() {
return this->threshold;
}
// Returns true if the current child is it's parent's left child,
// false otherwise
bool WaveletNode::getIsLeftChild() {
return this->isLeftChild;
}
// Returns first index of the node's alphabet subset
uint8_t WaveletNode::getStart() {
return this->start;
}
// Returns last index of the node's alphabet subset
uint8_t WaveletNode::getEnd() {
return this->end;
}
// Identifier counter used for naming nodes when creating graphviz data
int WaveletNode::idGenerator = 0;
| 31.341463
| 233
| 0.71284
|
Vaan5
|
4048c247364a45f2e4e348bdb1c93cac1b919d6b
| 12,497
|
cpp
|
C++
|
src/tdme/tools/shared/controller/EntityBaseSubScreenController.cpp
|
mahula/tdme2
|
0f74d35ae5d2cd33b1a410c09f0d45f250ca7a64
|
[
"BSD-3-Clause"
] | null | null | null |
src/tdme/tools/shared/controller/EntityBaseSubScreenController.cpp
|
mahula/tdme2
|
0f74d35ae5d2cd33b1a410c09f0d45f250ca7a64
|
[
"BSD-3-Clause"
] | null | null | null |
src/tdme/tools/shared/controller/EntityBaseSubScreenController.cpp
|
mahula/tdme2
|
0f74d35ae5d2cd33b1a410c09f0d45f250ca7a64
|
[
"BSD-3-Clause"
] | null | null | null |
#include <tdme/tools/shared/controller/EntityBaseSubScreenController.h>
#include <map>
#include <string>
#include <vector>
#include <tdme/gui/GUIParser.h>
#include <tdme/gui/events/Action.h>
#include <tdme/gui/events/GUIActionListener_Type.h>
#include <tdme/gui/nodes/GUIElementNode.h>
#include <tdme/gui/nodes/GUINode.h>
#include <tdme/gui/nodes/GUINodeController.h>
#include <tdme/gui/nodes/GUIParentNode.h>
#include <tdme/gui/nodes/GUIScreenNode.h>
#include <tdme/tools/shared/controller/InfoDialogScreenController.h>
#include <tdme/tools/shared/model/LevelEditorEntity.h>
#include <tdme/tools/shared/model/LevelPropertyPresets.h>
#include <tdme/tools/shared/model/PropertyModelClass.h>
#include <tdme/tools/shared/views/EntityBaseView.h>
#include <tdme/tools/shared/views/PopUps.h>
#include <tdme/utils/Console.h>
#include <tdme/utils/Exception.h>
#include <tdme/utils/MutableString.h>
using std::map;
using std::vector;
using std::string;
using tdme::tools::shared::controller::EntityBaseSubScreenController;
using tdme::gui::GUIParser;
using tdme::gui::events::Action;
using tdme::gui::events::GUIActionListener_Type;
using tdme::gui::nodes::GUIElementNode;
using tdme::gui::nodes::GUINode;
using tdme::gui::nodes::GUINodeController;
using tdme::gui::nodes::GUIParentNode;
using tdme::gui::nodes::GUIScreenNode;
using tdme::tools::shared::controller::InfoDialogScreenController;
using tdme::tools::shared::model::LevelEditorEntity;
using tdme::tools::shared::model::LevelPropertyPresets;
using tdme::tools::shared::model::PropertyModelClass;
using tdme::tools::shared::views::EntityBaseView;
using tdme::tools::shared::views::PopUps;
using tdme::utils::MutableString;
using tdme::utils::Console;
using tdme::utils::Exception;
MutableString EntityBaseSubScreenController::TEXT_EMPTY = MutableString("");
EntityBaseSubScreenController::EntityBaseSubScreenController(PopUps* popUps, Action* onSetEntityDataAction)
{
this->view = new EntityBaseView(this);
this->popUps = popUps;
this->onSetEntityDataAction = onSetEntityDataAction;
value = new MutableString();
}
EntityBaseSubScreenController::~EntityBaseSubScreenController() {
delete view;
delete onSetEntityDataAction;
}
void EntityBaseSubScreenController::initialize(GUIScreenNode* screenNode)
{
try {
entityName = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_name"));
entityDescription = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_description"));
entityApply = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("button_entity_apply"));
entityPropertyName = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_property_name"));
entityPropertyValue = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_property_value"));
entityPropertySave = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("button_entity_properties_save"));
entityPropertyAdd = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("button_entity_properties_add"));
entityPropertyRemove = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("button_entity_properties_remove"));
entityPropertiesList = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_properties_listbox"));
entityPropertyPresetApply = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("button_entity_properties_presetapply"));
entityPropertiesPresets = dynamic_cast< GUIElementNode* >(screenNode->getNodeById("entity_properties_presets"));
} catch (Exception& exception) {
Console::print(string("EntityBaseSubScreenController::initialize(): An error occurred: "));
Console::println(string(exception.what()));
}
setEntityPresetIds(LevelPropertyPresets::getInstance()->getObjectPropertiesPresets());
}
void EntityBaseSubScreenController::setEntityData(const string& name, const string& description)
{
entityName->getController()->setDisabled(false);
entityName->getController()->setValue(name);
entityDescription->getController()->setDisabled(false);
entityDescription->getController()->setValue(description);
entityApply->getController()->setDisabled(false);
}
void EntityBaseSubScreenController::unsetEntityData()
{
entityName->getController()->setValue(TEXT_EMPTY);
entityName->getController()->setDisabled(true);
entityDescription->getController()->setValue(TEXT_EMPTY);
entityDescription->getController()->setDisabled(true);
entityApply->getController()->setDisabled(true);
}
void EntityBaseSubScreenController::onEntityDataApply(LevelEditorEntity* model)
{
if (model == nullptr)
return;
view->setEntityData(model, entityName->getController()->getValue().getString(), entityDescription->getController()->getValue().getString());
onSetEntityDataAction->performAction();
}
void EntityBaseSubScreenController::setEntityPresetIds(const map<string, vector<PropertyModelClass*>>& entityPresetIds)
{
auto entityPropertiesPresetsInnerNode = dynamic_cast< GUIParentNode* >((entityPropertiesPresets->getScreenNode()->getNodeById(entityPropertiesPresets->getId() + "_inner")));
auto idx = 0;
string entityPropertiesPresetsInnerNodeSubNodesXML = "";
entityPropertiesPresetsInnerNodeSubNodesXML =
entityPropertiesPresetsInnerNodeSubNodesXML +
"<scrollarea-vertical id=\"" +
entityPropertiesPresets->getId() +
"_inner_scrollarea\" width=\"100%\" height=\"100\">\n";
for (auto it: entityPresetIds) {
auto entityPresetId = it.first;
entityPropertiesPresetsInnerNodeSubNodesXML =
entityPropertiesPresetsInnerNodeSubNodesXML + "<dropdown-option text=\"" +
GUIParser::escapeQuotes(entityPresetId) +
"\" value=\"" +
GUIParser::escapeQuotes(entityPresetId) +
"\" " +
(idx == 0 ? "selected=\"true\" " : "") +
" />\n";
idx++;
}
entityPropertiesPresetsInnerNodeSubNodesXML = entityPropertiesPresetsInnerNodeSubNodesXML + "</scrollarea-vertical>";
try {
entityPropertiesPresetsInnerNode->replaceSubNodes(entityPropertiesPresetsInnerNodeSubNodesXML, true);
} catch (Exception& exception) {
Console::print(string("EntityBaseSubScreenController::setEntityPresetIds(): An error occurred: "));
Console::println(string(exception.what()));
}
}
void EntityBaseSubScreenController::setEntityProperties(LevelEditorEntity* entity, const string& presetId, const string& selectedName)
{
entityPropertiesPresets->getController()->setDisabled(false);
entityPropertyPresetApply->getController()->setDisabled(false);
entityPropertiesList->getController()->setDisabled(false);
entityPropertyAdd->getController()->setDisabled(false);
entityPropertyRemove->getController()->setDisabled(false);
entityPropertySave->getController()->setDisabled(true);
entityPropertyName->getController()->setDisabled(true);
entityPropertyValue->getController()->setDisabled(true);
entityPropertiesPresets->getController()->setValue(presetId.length() > 0 ? value->set(presetId) : value->set("none"));
auto entityPropertiesListBoxInnerNode = dynamic_cast< GUIParentNode* >((entityPropertiesList->getScreenNode()->getNodeById(entityPropertiesList->getId() + "_inner")));
auto idx = 1;
string entityPropertiesListBoxSubNodesXML = "";
entityPropertiesListBoxSubNodesXML =
entityPropertiesListBoxSubNodesXML +
"<scrollarea-vertical id=\"" +
entityPropertiesList->getId() +
"_inner_scrollarea\" width=\"100%\" height=\"100%\">\n";
for (auto i = 0; i < entity->getPropertyCount(); i++) {
PropertyModelClass* entityProperty = entity->getPropertyByIndex(i);
entityPropertiesListBoxSubNodesXML =
entityPropertiesListBoxSubNodesXML +
"<selectbox-option text=\"" +
GUIParser::escapeQuotes(entityProperty->getName()) +
": " +
GUIParser::escapeQuotes(entityProperty->getValue()) +
"\" value=\"" +
GUIParser::escapeQuotes(entityProperty->getName()) +
"\" " +
(selectedName.length() > 0 && entityProperty->getName() == selectedName ? "selected=\"true\" " : "") +
"/>\n";
}
entityPropertiesListBoxSubNodesXML = entityPropertiesListBoxSubNodesXML + "</scrollarea-vertical>\n";
try {
entityPropertiesListBoxInnerNode->replaceSubNodes(entityPropertiesListBoxSubNodesXML, false);
} catch (Exception& exception) {
Console::print(string("EntityBaseSubScreenController::setEntityProperties(): An error occurred: "));
Console::println(string(exception.what()));
}
onEntityPropertiesSelectionChanged(entity);
}
void EntityBaseSubScreenController::unsetEntityProperties()
{
auto modelPropertiesListBoxInnerNode = dynamic_cast< GUIParentNode* >((entityPropertiesList->getScreenNode()->getNodeById(entityPropertiesList->getId() + "_inner")));
modelPropertiesListBoxInnerNode->clearSubNodes();
entityPropertiesPresets->getController()->setValue(value->set("none"));
entityPropertiesPresets->getController()->setDisabled(true);
entityPropertyPresetApply->getController()->setDisabled(true);
entityPropertiesList->getController()->setDisabled(true);
entityPropertyAdd->getController()->setDisabled(true);
entityPropertyRemove->getController()->setDisabled(true);
entityPropertySave->getController()->setDisabled(true);
entityPropertyName->getController()->setValue(TEXT_EMPTY);
entityPropertyName->getController()->setDisabled(true);
entityPropertyValue->getController()->setValue(TEXT_EMPTY);
entityPropertyValue->getController()->setDisabled(true);
}
void EntityBaseSubScreenController::onEntityPropertySave(LevelEditorEntity* entity)
{
if (view->entityPropertySave(
entity,
entityPropertiesList->getController()->getValue().getString(),
entityPropertyName->getController()->getValue().getString(),
entityPropertyValue->getController()->getValue().getString()) == false) {
showErrorPopUp("Warning", "Saving entity property failed");
}
}
void EntityBaseSubScreenController::onEntityPropertyAdd(LevelEditorEntity* entity)
{
if (view->entityPropertyAdd(entity) == false) {
showErrorPopUp("Warning", "Adding new entity property failed");
}
}
void EntityBaseSubScreenController::onEntityPropertyRemove(LevelEditorEntity* entity)
{
if (view->entityPropertyRemove(entity, entityPropertiesList->getController()->getValue().getString()) == false) {
showErrorPopUp("Warning", "Removing entity property failed");
}
}
void EntityBaseSubScreenController::showErrorPopUp(const string& caption, const string& message)
{
popUps->getInfoDialogScreenController()->show(caption, message);
}
void EntityBaseSubScreenController::onEntityPropertyPresetApply(LevelEditorEntity* model)
{
view->entityPropertiesPreset(model, entityPropertiesPresets->getController()->getValue().getString());
}
void EntityBaseSubScreenController::onEntityPropertiesSelectionChanged(LevelEditorEntity* entity)
{
entityPropertyName->getController()->setDisabled(true);
entityPropertyName->getController()->setValue(TEXT_EMPTY);
entityPropertyValue->getController()->setDisabled(true);
entityPropertyValue->getController()->setValue(TEXT_EMPTY);
entityPropertySave->getController()->setDisabled(true);
entityPropertyRemove->getController()->setDisabled(true);
auto entityProperty = entity->getProperty(entityPropertiesList->getController()->getValue().getString());
if (entityProperty != nullptr) {
entityPropertyName->getController()->setValue(value->set(entityProperty->getName()));
entityPropertyValue->getController()->setValue(value->set(entityProperty->getValue()));
entityPropertyName->getController()->setDisabled(false);
entityPropertyValue->getController()->setDisabled(false);
entityPropertySave->getController()->setDisabled(false);
entityPropertyRemove->getController()->setDisabled(false);
}
}
void EntityBaseSubScreenController::onValueChanged(GUIElementNode* node, LevelEditorEntity* model)
{
if (node == entityPropertiesList) {
onEntityPropertiesSelectionChanged(model);
} else {
}
}
void EntityBaseSubScreenController::onActionPerformed(GUIActionListener_Type* type, GUIElementNode* node, LevelEditorEntity* entity)
{
{
auto v = type;
if (v == GUIActionListener_Type::PERFORMED)
{
if (node->getId().compare("button_entity_apply") == 0) {
onEntityDataApply(entity);
} else
if (node->getId().compare("button_entity_properties_presetapply") == 0) {
onEntityPropertyPresetApply(entity);
} else
if (node->getId().compare("button_entity_properties_add") == 0) {
onEntityPropertyAdd(entity);
} else
if (node->getId().compare("button_entity_properties_remove") == 0) {
onEntityPropertyRemove(entity);
} else
if (node->getId().compare("button_entity_properties_save") == 0) {
onEntityPropertySave(entity);
}
}
}
}
| 43.242215
| 174
| 0.780427
|
mahula
|
404edbd4d2e23e6b8928d59b59bff36c9954a535
| 39,012
|
cpp
|
C++
|
base/Windows/mkasm/mkasm.cpp
|
sphinxlogic/Singularity-RDK-2.0
|
2968c3b920a5383f7360e3e489aa772f964a7c42
|
[
"MIT"
] | null | null | null |
base/Windows/mkasm/mkasm.cpp
|
sphinxlogic/Singularity-RDK-2.0
|
2968c3b920a5383f7360e3e489aa772f964a7c42
|
[
"MIT"
] | null | null | null |
base/Windows/mkasm/mkasm.cpp
|
sphinxlogic/Singularity-RDK-2.0
|
2968c3b920a5383f7360e3e489aa772f964a7c42
|
[
"MIT"
] | null | null | null |
//////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research
// Copyright (C) Microsoft Corporation
//
// File: mkasm.cpp
//
// Contents: Converts binary files into .asm or .cs files.
//
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <winlean.h>
#include <assert.h>
//////////////////////////////////////////////////////////////////////////////
//
enum {
TARGET_BASE = 0x60000,
TARGET_RANGE = 0x10000,
};
BOOL fAsm = TRUE;
BOOL fCpp = FALSE;
BOOL fManaged = FALSE;
BOOL fCompress = FALSE;
BOOL fList = FALSE;
BOOL fAllow64 = FALSE;
CHAR szByteByteVTable[] = "?_vtable@ClassVector_ClassVector_uint8@@2UClass_System_VTable@@A";
// struct Class_System_VTable ClassVector_ClassVector_uint8::_vtable
CHAR szByteByteSuffix[] = "@@2PAUClassVector_ClassVector_uint8@@A";
// ?c_Content@Class_Microsoft_Singularity_Shell_Slides@@2PAUClassVector_ClassVector_uint8@@A
// struct ClassVector_ClassVector_uint8 * Class_Microsoft_Singularity_Shell_Slides::c_Content
CHAR szByteVTable[] = "?_vtable@ClassVector_uint8@@2UClass_System_VTable@@A";
// struct Class_System_VTable ClassVector_uint8::_vtable
CHAR szByteSuffix[] = "@@2PAUClassVector_uint8@@A";
// ?c_Content@Class_Microsoft_Singularity_Shell_Slides@@2PAUClassVector_ClassVector_uint8@@A
// struct ClassVector_ClassVector_uint8 * Class_Microsoft_Singularity_Shell_Slides::c_Content
//////////////////////////////////////////////////////////////////////////////
class CFileInfo
{
public:
CFileInfo()
{
m_pszFile = NULL;
m_pNext = NULL;
m_cbInput = 0;
m_cbOutput = 0;
}
BOOL SetFileName(PCSTR pszFile)
{
m_pszFile = pszFile;
return TRUE;
}
BOOL SetFileAndSize()
{
HANDLE hFile = CreateFile(m_pszFile,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL);
if (hFile == INVALID_HANDLE_VALUE) {
return FALSE;
}
m_cbInput = GetFileSize(hFile, NULL);
CloseHandle(hFile);
if (m_cbInput == 0xffffffff) {
m_cbInput = 0;
return FALSE;
}
m_cbOutput = m_cbInput;
return TRUE;
}
BOOL SetOutputSize(UINT32 cbOutput)
{
m_cbOutput = cbOutput;
return TRUE;
}
CFileInfo * m_pNext;
PCSTR m_pszFile;
UINT32 m_cbInput;
UINT32 m_cbOutput;
};
//////////////////////////////////////////////////////////////////// CFileMap.
//
class CFileMap
{
public:
CFileMap();
~CFileMap();
public:
BOOL Load(PCSTR pszFile);
PBYTE Seek(UINT32 cbPos);
UINT32 Size();
VOID Close();
protected:
PBYTE m_pbData;
UINT32 m_cbData;
};
CFileMap::CFileMap()
{
m_pbData = NULL;
m_cbData = 0;
}
CFileMap::~CFileMap()
{
Close();
}
VOID CFileMap::Close()
{
if (m_pbData) {
UnmapViewOfFile(m_pbData);
m_pbData = NULL;
}
m_cbData = 0;
}
UINT32 CFileMap::Size()
{
return m_cbData;
}
PBYTE CFileMap::Seek(UINT32 cbPos)
{
if (m_pbData && cbPos <= m_cbData) {
return m_pbData + cbPos;
}
return NULL;
}
BOOL CFileMap::Load(PCSTR pszFile)
{
Close();
HANDLE hFile = CreateFile(pszFile,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL);
if (hFile == INVALID_HANDLE_VALUE) {
return FALSE;
}
ULONG cbInFileData = GetFileSize(hFile, NULL);
if (cbInFileData == 0xffffffff) {
CloseHandle(hFile);
return FALSE;
}
HANDLE hInFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
CloseHandle(hFile);
if (hInFileMap == NULL) {
return FALSE;
}
m_pbData = (PBYTE)MapViewOfFile(hInFileMap, FILE_MAP_COPY, 0, 0, 0);
CloseHandle(hInFileMap);
if (m_pbData == NULL) {
return FALSE;
}
m_cbData = cbInFileData;
return TRUE;
}
//////////////////////////////////////////////////////////////////// CFileOut.
//
class CFileOut
{
public:
CFileOut();
~CFileOut();
public:
BOOL Create(PCSTR pszFile);
BOOL IsOpen();
BOOL Write(PBYTE pbData, UINT32 cbData);
BOOL Print(PCSTR pszMsg, ...);
BOOL VPrint(PCSTR pszMsg, va_list args);
BOOL Delete();
VOID Close();
protected:
HANDLE m_hFile;
CHAR m_szFile[MAX_PATH];
CHAR m_szBuffer[4096];
INT m_cbBuffer;
};
CFileOut::CFileOut()
{
m_hFile = INVALID_HANDLE_VALUE;
m_szFile[0] = '\0';
m_cbBuffer = 0;
}
CFileOut::~CFileOut()
{
Close();
}
VOID CFileOut::Close()
{
if (m_hFile != INVALID_HANDLE_VALUE) {
if (m_cbBuffer) {
Write((PBYTE)m_szBuffer, m_cbBuffer);
m_cbBuffer = 0;
}
CloseHandle(m_hFile);
m_hFile = INVALID_HANDLE_VALUE;
}
}
BOOL CFileOut::IsOpen()
{
return (m_hFile != INVALID_HANDLE_VALUE);
}
BOOL CFileOut::Write(PBYTE pbData, UINT32 cbData)
{
if (m_hFile == INVALID_HANDLE_VALUE) {
return FALSE;
}
DWORD dwWrote = 0;
if (!WriteFile(m_hFile, pbData, cbData, &dwWrote, NULL) || dwWrote != cbData) {
return FALSE;
}
return TRUE;
}
BOOL CFileOut::VPrint(PCSTR pszMsg, va_list args)
{
if (m_hFile == INVALID_HANDLE_VALUE) {
return FALSE;
}
INT cbUsed = m_cbBuffer;
INT cbData;
cbData = _vsnprintf(m_szBuffer + cbUsed, sizeof(m_szBuffer)-cbUsed-1, pszMsg, args);
m_cbBuffer += cbData;
if (m_szBuffer[m_cbBuffer - 1] == '\n' ||
m_szBuffer[m_cbBuffer - 1] == '\r') {
cbData = m_cbBuffer;
m_cbBuffer = 0;
return Write((PBYTE)m_szBuffer, cbData);
}
return TRUE;
}
BOOL CFileOut::Print(PCSTR pszMsg, ...)
{
BOOL f;
va_list args;
va_start(args, pszMsg);
f = VPrint(pszMsg, args);
va_end(args);
return f;
}
BOOL CFileOut::Delete()
{
if (m_hFile != INVALID_HANDLE_VALUE) {
Close();
return DeleteFile(m_szFile);
}
return FALSE;
}
BOOL CFileOut::Create(PCSTR pszFile)
{
Close();
m_szFile[0] = '\0';
m_hFile = CreateFile(pszFile,
GENERIC_WRITE,
0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (m_hFile == INVALID_HANDLE_VALUE) {
return FALSE;
}
strcpy(m_szFile, pszFile);
m_cbBuffer = 0;
return TRUE;
}
//
//////////////////////////////////////////////////////////////////////////////
class COutput
{
protected:
UINT m_nOffset;
CFileOut *m_pfOutput;
public:
COutput(CFileOut *pfOutput)
{
m_pfOutput = pfOutput;
m_nOffset = 0;
}
BOOL VPrint(PCSTR pszMsg, va_list args)
{
return m_pfOutput->VPrint(pszMsg, args);
}
BOOL Print(PCSTR pszMsg, ...)
{
BOOL f;
va_list args;
va_start(args, pszMsg);
f = m_pfOutput->VPrint(pszMsg, args);
va_end(args);
return f;
}
virtual void Dump(PBYTE pbData, UINT cbData) = 0;
virtual void Finish()
{
if ((m_nOffset % 16) != 0) {
m_pfOutput->Print("\n");
}
m_nOffset = 0;
}
UINT Size()
{
return m_nOffset;
}
};
class CAsmOutput : public COutput
{
public:
CAsmOutput(CFileOut *pfOutput)
: COutput(pfOutput)
{
}
void Dump(PBYTE pbData, UINT cbData)
{
PBYTE pbEnd = pbData + cbData;
for (; pbData < pbEnd; pbData++, m_nOffset++) {
switch (m_nOffset % 16) {
case 0:
Print(" uint8 %03xh", *pbData);
break;
default:
Print(",%03xh", *pbData);
break;
case 15:
Print(",%03xh\n", *pbData);
break;
}
}
}
};
class CSharpOutput : public COutput
{
public:
CSharpOutput(CFileOut *pfOutput)
: COutput(pfOutput)
{
}
void Dump(PBYTE pbData, UINT cbData)
{
PBYTE pbEnd = pbData + cbData;
for (; pbData < pbEnd; pbData++, m_nOffset++) {
switch (m_nOffset % 16) {
case 0:
Print(" 0x%02x,", *pbData);
break;
default:
Print("0x%02x,", *pbData);
break;
case 15:
Print("0x%02x,\n", *pbData);
break;
}
}
}
};
//////////////////////////////////////////////////////////////////////////////
//
UINT DumpBmp(const char *pszFile, COutput *output, PBYTE pbData, UINT cbData)
{
#pragma pack(2)
struct BITMAPFILEHEADER {
UINT16 bfType;
UINT32 bfSize;
UINT16 bfReserved1;
UINT16 bfReserved2;
UINT32 bfOffBits;
};
struct BITMAPINFOHEADER {
UINT32 biSize;
UINT32 biWidth;
UINT32 biHeight;
UINT16 biPlanes;
UINT16 biBitCount;
UINT32 biCompression;
UINT32 biSizeImage;
UINT32 biXPelsPerMeter;
UINT32 biYPelsPerMeter;
UINT32 biClrUsed;
UINT32 biClrImportant;
};
#pragma pack()
BITMAPFILEHEADER *pbmf = (BITMAPFILEHEADER *)pbData;
BITMAPINFOHEADER *pbmi = (BITMAPINFOHEADER *)(pbmf + 1);
if (pbmf->bfType != 'MB') {
fprintf(stderr, "Can't convert non-BMP files to BMP compression.\n");
return 0;
}
UINT cbDumped = 0;
INT16 nValue;
UINT cbScanLine = (((pbmi->biWidth * pbmi->biBitCount) + 31) & ~31) / 8;
PBYTE pbLine = pbData + pbmf->bfOffBits;
//PBYTE pbOut = pbData + pbmf->bfOffBits;
pbmi->biCompression |= 0xff000000;
if (output != NULL) {
output->Dump(pbData, pbmf->bfOffBits);
}
cbDumped += pbmf->bfOffBits;
for (UINT i = 0; i < pbmi->biHeight; i++) {
PBYTE pbIn = pbLine;
PBYTE pbRaw = pbIn;
PBYTE pbEnd = pbLine + cbScanLine;
while (pbIn < pbEnd) {
if (pbIn + 6 < pbEnd &&
pbIn[3] == pbIn[0] &&
pbIn[4] == pbIn[1] &&
pbIn[5] == pbIn[2]) {
PBYTE pbBase = pbIn;
pbIn += 3;
while (pbIn + 3 <= pbEnd &&
pbIn[0] == pbBase[0] &&
pbIn[1] == pbBase[1] &&
pbIn[2] == pbBase[2]) {
pbIn += 3;
}
if (pbBase > pbRaw) {
nValue = (INT16)(pbBase - pbRaw);
if (output != NULL) {
output->Dump((PBYTE)&nValue, sizeof(nValue));
output->Dump(pbRaw, pbBase - pbRaw);
}
cbDumped += sizeof(nValue);
cbDumped += pbBase - pbRaw;
}
nValue = (INT16)(-((pbIn - pbBase) / 3));
if (output != NULL) {
output->Dump((PBYTE)&nValue, sizeof(nValue));
output->Dump(pbBase, 3);
}
cbDumped += sizeof(nValue);
cbDumped += 3;
pbRaw = pbIn;
}
else {
pbIn++;
}
}
if (pbEnd > pbRaw) {
nValue = (INT16)(pbEnd - pbRaw);
if (output != NULL) {
output->Dump((PBYTE)&nValue, sizeof(nValue));
output->Dump(pbRaw, pbEnd - pbRaw);
}
cbDumped += sizeof(nValue);
cbDumped += pbEnd - pbRaw;
}
pbLine += cbScanLine;
}
if (output != NULL) {
printf(" %s from %8d to %8d bytes\n", pszFile, cbData, cbDumped);
if (output->Size() != cbDumped) {
fprintf(stderr, "Failure in compression: %d reported, %d written\n",
cbDumped, output->Size());
}
output->Finish();
}
return cbDumped;
}
char *find_contents64(CFileMap *pfFile,
PIMAGE_NT_HEADERS64 ppe,
UINT32 *pcbEntry,
UINT32 *pcbBase,
UINT32 *pcbSize,
PBYTE *ppbData)
{
PIMAGE_SECTION_HEADER psec;
fprintf(stderr,"Processing a 64-bit image.\n");
psec = IMAGE_FIRST_SECTION(ppe);
if (ppe->FileHeader.NumberOfSections != 1) {
fprintf(stderr, "Warning: More than one section (.pdata)\n");
}
if (ppe->OptionalHeader.SizeOfInitializedData != 0) {
fprintf(stderr, "Image has initialized data outside of text section.\n");
}
if (ppe->OptionalHeader.SizeOfUninitializedData != 0) {
return "Image has uninitialized data outside of text section.";
}
if (psec->PointerToRawData == 0) {
return "Image has no text content.";
}
if (pfFile->Seek(psec->PointerToRawData) == NULL) {
return "Image text section is invalid.";
}
*pcbEntry =(UINT32) ppe->OptionalHeader.ImageBase + ppe->OptionalHeader.AddressOfEntryPoint;
*pcbBase = (UINT32) ppe->OptionalHeader.ImageBase;
*pcbSize = ppe->OptionalHeader.SizeOfImage;
*ppbData = pfFile->Seek(0);
return NULL;
}
char *find_contents32(CFileMap *pfFile,
PIMAGE_NT_HEADERS ppe,
UINT32 *pcbEntry,
UINT32 *pcbBase,
UINT32 *pcbSize,
PBYTE *ppbData)
{
PIMAGE_SECTION_HEADER psec;
psec = IMAGE_FIRST_SECTION(ppe);
if (ppe->FileHeader.NumberOfSections != 1) {
return "Image has more than one sections.";
}
if (ppe->OptionalHeader.SizeOfInitializedData != 0) {
return "Image has initialized data outside of text section.";
}
if (ppe->OptionalHeader.SizeOfUninitializedData != 0) {
return "Image has uninitialized data outside of text section.";
}
if (psec->PointerToRawData == 0) {
return "Image has no text content.";
}
if (pfFile->Seek(psec->PointerToRawData) == NULL) {
return "Image text section is invalid.";
}
*pcbEntry = ppe->OptionalHeader.ImageBase + ppe->OptionalHeader.AddressOfEntryPoint;
*pcbBase = ppe->OptionalHeader.ImageBase;
*pcbSize = ppe->OptionalHeader.SizeOfImage;
*ppbData = pfFile->Seek(0);
return NULL;
}
char *find_contents(CFileMap *pfFile,
UINT32 *pcbEntry,
UINT32 *pcbBase,
UINT32 *pcbSize,
PBYTE *ppbData)
{
PIMAGE_DOS_HEADER pdos;
PIMAGE_NT_HEADERS ppe;
//PIMAGE_NT_HEADERS64 ppe64;
*pcbEntry = 0;
*pcbBase = 0;
*pcbSize = 0;
*ppbData = NULL;
// Read in the PE image header
//
pdos = (PIMAGE_DOS_HEADER)pfFile->Seek(0);
if (pdos == NULL || pdos->e_magic != IMAGE_DOS_SIGNATURE) {
return "Image doesn't have MZ signature.";
}
ppe = (PIMAGE_NT_HEADERS)pfFile->Seek(pdos->e_lfanew);
if (ppe == NULL || ppe->Signature != IMAGE_NT_SIGNATURE) {
return "Image doesn't have PE signature.";
}
if (ppe->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64) {
if (fAllow64) {
return find_contents64(pfFile, (PIMAGE_NT_HEADERS64) ppe, pcbEntry, pcbBase, pcbSize, ppbData);
}
else {
return "Image is 64-bit. Use /64 option";
}
}
else return find_contents32(pfFile, ppe, pcbEntry, pcbBase, pcbSize, ppbData);
}
BOOL dump_pe(COutput *pOutput, CFileMap *pInput, PCSTR pszRoot)
{
UINT32 cbEntry = 0;
UINT32 cbBase = 0;
UINT32 cbSize = 0;
PBYTE pbData = NULL;
char *error = find_contents(pInput, &cbEntry, &cbBase, &cbSize, &pbData);
if (error != NULL) {
fprintf(stderr, "Failed: %s\n", error);
return FALSE;
}
if (cbEntry < cbBase || cbEntry >= cbBase + cbSize) {
fprintf(stderr, "Failed: Image entry point is not in text section.");
return FALSE;
}
if (cbBase < TARGET_BASE || cbBase > TARGET_BASE + TARGET_RANGE) {
fprintf(stderr, "Failed: Image is not based at 0x%x.\n", TARGET_BASE);
return FALSE;
}
printf("Total text section: %d bytes\n", cbSize);
// Write .asm data.
//
pOutput->Print("%s_ent EQU 0%08xh\n", pszRoot, cbEntry);
pOutput->Print("%s_dst EQU 0%08xh\n", pszRoot, cbBase);
pOutput->Print("%s_siz EQU 0%08xh\n", pszRoot, cbSize);
pOutput->Print("%s_dat ", pszRoot);
pOutput->Dump(pbData, cbSize);
pOutput->Finish();
pOutput->Print("\n");
return TRUE;
}
BOOL blob_to_asm(COutput *pOutput, CFileMap *pInput)
{
// Copy the rest of the image.
//
pOutput->Dump(pInput->Seek(0), pInput->Size());
pOutput->Finish();
return TRUE;
}
int CompareName(PCSTR psz1, PCSTR psz2)
{
for (;;) {
CHAR c1 = *psz1;
CHAR c2 = *psz2;
if (c1 >= 'A' && c1 <= 'Z') {
c1 = c1 - 'A' + 'a';
}
if (c2 >= 'A' && c2 <= 'Z') {
c2 = c2 - 'A' + 'a';
}
if ((c1 >= '0' && c1 <= '9') && (c2 >= '0' && c2 <= '9')) {
for (c1 = 0; *psz1 >= '0' && *psz1 <= '9'; psz1++) {
c1 = c1 * 10 + (*psz1 - '0');
}
psz1--;
for (c2 = 0; *psz2 >= '0' && *psz2 <= '9'; psz2++) {
c2 = c2 * 10 + (*psz2 - '0');
}
psz2--;
}
if (c1 != c2) {
return c1 - c2;
}
if (c1 == 0 && c2 == 0) {
return 0;
}
psz1++;
psz2++;
}
}
PCHAR AppendToName(PCHAR pszDst, PCSTR pszSrc)
{
while (*pszSrc) {
if (*pszSrc == '.') {
*pszDst++ = '_';
pszSrc++;
}
else {
*pszDst++ = *pszSrc++;
}
}
return pszDst;
}
void AsmName(PCHAR pszAsmName, PCSTR pszNamespace, PCSTR pszClass, PCSTR pszField)
{
pszAsmName = AppendToName(pszAsmName, "?c_");
pszAsmName = AppendToName(pszAsmName, pszField);
pszAsmName = AppendToName(pszAsmName, "@Class_");
pszAsmName = AppendToName(pszAsmName, pszNamespace);
pszAsmName = AppendToName(pszAsmName, "_");
pszAsmName = AppendToName(pszAsmName, pszClass);
*pszAsmName = '\0';
}
void CppClassName(PCHAR pszCppClassName, PCSTR pszNamespace, PCSTR pszClass)
{
pszCppClassName = AppendToName(pszCppClassName, "Class_");
pszCppClassName = AppendToName(pszCppClassName, pszNamespace);
pszCppClassName = AppendToName(pszCppClassName, "_");
pszCppClassName = AppendToName(pszCppClassName, pszClass);
*pszCppClassName = '\0';
}
int __cdecl main(int argc, char **argv)
{
BOOL fNeedHelp = FALSE;
BOOL fFlattenPE = TRUE;
PCSTR pszRoot = "asm";
CFileOut cfOutput;
CFileInfo rFiles[512];
CFileInfo *pFiles = NULL;
UINT cFiles = 0;
CHAR szField[256] = "";
CHAR szClass[512] = "";
CHAR szNamespace[512] = "";
CHAR szAsmName[1024];
CHAR szCppClassName[1024];
for (int arg = 1; arg < argc; arg++) {
if (argv[arg][0] == '-' || argv[arg][0] == '/') {
char *argn = argv[arg]+1; // Argument name
char *argp = argn; // Argument parameter
while (*argp && *argp != ':')
argp++;
if (*argp == ':')
*argp++ = '\0';
switch (argn[0]) {
case 'a': // ASM Format
case 'A':
fAsm = TRUE;
break;
case 'b': // Binary Blob
case 'B':
fFlattenPE = FALSE;
fManaged = TRUE;
break;
case 'c': // C# Class
case 'C':
strcpy(szClass, argp);
fManaged = TRUE;
break;
case 'f': // C# Field
case 'F':
strcpy(szField, argp);
fManaged = TRUE;
break;
case 'l': // List of files
case 'L':
fManaged = TRUE;
fList = TRUE;
break;
case 'm': // C# Format
case 'M':
fAsm = FALSE;
break;
case 'n': // C# Namespace
case 'N':
strcpy(szNamespace, argp);
fManaged = TRUE;
break;
case 'o': // Output file.
case 'O':
if (!cfOutput.Create(argp)) {
fprintf(stderr, "Could not open output file: %s\n", argp);
}
break;
case 'p': // Cpp Format
case 'P':
fCpp = TRUE;
fAsm = FALSE;
break;
case 'r': // Set Label Root
case 'R':
pszRoot = argp;
break;
case 'x': // Compress BMP
case 'X': //
fCompress = TRUE;
fManaged = TRUE;
break;
case '6': // 64-bit PE
fAllow64 = TRUE;
break;
case 'h': // Help
case 'H':
case '?':
fNeedHelp = TRUE;
break;
default:
printf("Unknown argument: %s\n", argv[arg]);
fNeedHelp = TRUE;
break;
}
}
else {
// Save the input files away in sorted linked list.
CFileInfo *pNew = &rFiles[cFiles++];
CFileInfo **ppHead = &pFiles;
pNew->SetFileName(argv[arg]);
while (*ppHead != NULL && CompareName(pNew->m_pszFile, (*ppHead)->m_pszFile) > 0) {
ppHead = &(*ppHead)->m_pNext;
}
pNew->m_pNext = *ppHead;
*ppHead = pNew;
}
}
if (argc == 1) {
fNeedHelp = TRUE;
}
if (!fNeedHelp && !cfOutput.IsOpen()) {
fprintf(stderr, "No output file specified.\n");
fNeedHelp = TRUE;
}
if (!fNeedHelp && pFiles == NULL) {
fprintf(stderr, "No output file specified.\n");
fNeedHelp = TRUE;
}
if (!fNeedHelp && fManaged &&
(szField[0] == '\0' || szClass[0] == '\0')) {
fprintf(stderr, "No field or class name specified for target.\n");
fNeedHelp = TRUE;
}
if (fNeedHelp) {
printf(
"Usage:\n"
" mkasm /o:output [options] inputs\n"
"Options:\n"
" /o:output -- Specify output file.\n"
" /r:root -- Set root label [defaults to `asm'].\n"
" /b -- Treat file as binary blob (not PE file).\n"
" /a -- Output ASM format (default for PE).\n"
" /m -- Output C# format (default for blob).\n"
" /c:class -- Set C# class.\n"
" /n:namespace -- Set C# namespace.\n"
" /f:field -- Set C# field.\n"
" /x -- Use bizarre compression for BMP files.\n"
" /l -- Output contents in an array (list).\n"
" /64 -- manipulate 64-bit PE files."
" /h or /? -- Display this help screen.\n"
"Summary:\n"
" Copies the contents of the input files into the output file\n"
" in .asm format. Specific conversions exists for PE and BMP files.\n"
);
return 2;
}
//////////////////////////////////////////////////////////////////////////
//
// At this point, we have input file(s), output file, and set of desired
// conversions. Time to process the output.
//
BOOL fAbort = false;
COutput *pOutput = NULL;
CAsmOutput asmOutput(&cfOutput);
CSharpOutput sharpOutput(&cfOutput);
AsmName(szAsmName, szNamespace, szClass, szField);
CppClassName(szCppClassName, szNamespace, szClass);
if (fAsm) {
pOutput = &asmOutput;
}
else {
pOutput = &sharpOutput;
}
ULONG cbFiles = 0;
UINT cFile = 0;
for (CFileInfo *pFile = pFiles; pFile != NULL; pFile = pFile->m_pNext) {
if (!pFile->SetFileAndSize()) {
fprintf(stderr, "Unable to open %s, error = %d\n",
pFile->m_pszFile,
GetLastError());
goto abort;
}
if (fCompress) {
CFileMap cfInput;
printf(".");
if (!cfInput.Load(pFile->m_pszFile)) {
fprintf(stderr, "Could not open input file: %s\n", pFile->m_pszFile);
goto abort;
}
pFile->SetOutputSize(DumpBmp(pFile->m_pszFile, NULL, cfInput.Seek(0), cfInput.Size()));
cfInput.Close();
}
cFile++;
cbFiles += pFile->m_cbOutput;
}
//public: static struct ClassVector_ClassVector_uint8 *
// Class_Microsoft_Singularity_Shell_Slides::c_Content;
//" (?c_Content@Class_Microsoft_Singularity_Shell_Slides@@2PAUClassVector_ClassVector_uint8@@A
if (!fFlattenPE) {
if (fAsm) {
cfOutput.Print("externdef %s:NEAR\n", szByteVTable);
if (fList) {
cfOutput.Print("externdef %s:NEAR\n", szByteByteVTable);
}
else {
cfOutput.Print("align 4\n");
cfOutput.Print(" BARTOK_OBJECT_HEADER {} \n");
cfOutput.Print("%s%s_0 UINT32 %s\n",
szAsmName, szByteSuffix, szByteVTable);
cfOutput.Print(" UINT32 %d\n", cbFiles);
}
}
else if (fCpp) {
if (fList) {
cFile = 0;
for (CFileInfo *pFile = pFiles; pFile != NULL; pFile = pFile->m_pNext) {
cfOutput.Print("struct Vector_%s_%s_0_%d {\n",
szCppClassName, szField, cFile);
cfOutput.Print(" uintptr headerwords[HDRWORDCOUNT];\n");
cfOutput.Print(" union {\n");
cfOutput.Print(" struct {\n");
cfOutput.Print(" Class_System_VTable * vtable;\n");
cfOutput.Print(" uint32 length;\n");
cfOutput.Print(" uint8 data[%d];\n",
pFile->m_cbOutput);
cfOutput.Print(" };\n");
cfOutput.Print(" ClassVector_uint8 object;\n");
cfOutput.Print(" };\n");
cfOutput.Print("};\n");
cFile++;
}
cfOutput.Print("struct Vector_%s_%s_0 {\n",
szCppClassName, szField);
cfOutput.Print(" uintptr headerwords[HDRWORDCOUNT];\n");
cfOutput.Print(" union {\n");
cfOutput.Print(" struct {\n");
cfOutput.Print(" Class_System_VTable * vtable;\n");
cfOutput.Print(" uint32 length;\n");
cfOutput.Print(" ClassVector_uint8 * data[%d];\n", cFiles);
cfOutput.Print(" };\n");
cfOutput.Print(" ClassVector_ClassVector_uint8 object;\n");
cfOutput.Print(" };\n");
cfOutput.Print("};\n");
cfOutput.Print("struct %s {\n", szCppClassName);
cfOutput.Print(" private:\n");
for (UINT i = 0; i < cFiles; i++) {
cfOutput.Print(" static Vector_%s_%s_0_%d c_%s_0_%d;\n",
szCppClassName, szField, i,
szField, i);
}
cfOutput.Print(" static Vector_%s_%s_0 c_%s_0;\n",
szCppClassName, szField, szField);
cfOutput.Print(" public:\n");
cfOutput.Print(" static ClassVector_ClassVector_uint8 * c_%s;\n", szField);
cfOutput.Print("};\n");
cfOutput.Print("\n");
cfOutput.Print("ClassVector_ClassVector_uint8 * %s::c_%s = &%s::c_%s_0.object;\n",
szCppClassName, szField,
szCppClassName, szField);
cfOutput.Print("\n");
cfOutput.Print("Vector_%s_%s_0 %s::c_%s_0 = {\n",
szCppClassName, szField,
szCppClassName, szField);
cfOutput.Print(" {},\n");
cfOutput.Print(" (Class_System_VTable *)&ClassVector_ClassVector_uint8::_vtable,\n");
cfOutput.Print(" %d,\n", cFiles);
cfOutput.Print(" {\n");
for (UINT i = 0; i < cFiles; i++) {
cfOutput.Print(" &%s::c_%s_0_%d.object,\n",
szCppClassName, szField, i);
}
cfOutput.Print(" },\n");
cfOutput.Print("};\n");
cfOutput.Print("\n");
}
else {
cfOutput.Print("struct Vector_%s_%s_0 {\n",
szCppClassName, szField);
cfOutput.Print(" uintptr headerwords[HDRWORDCOUNT];\n");
cfOutput.Print(" union { \n");
cfOutput.Print(" struct {\n");
cfOutput.Print(" Class_System_VTable * vtable;\n");
cfOutput.Print(" uint32 length;\n");
cfOutput.Print(" uint8 data[%d];\n",
cbFiles);
cfOutput.Print(" };\n");
cfOutput.Print(" ClassVector_uint8 object;\n");
cfOutput.Print(" };\n");
cfOutput.Print("};\n");
cfOutput.Print("struct %s {\n", szCppClassName);
cfOutput.Print(" private:\n");
cfOutput.Print(" static Vector_%s_%s_0 c_%s_0;\n",
szCppClassName, szField, szField);
cfOutput.Print(" public:\n");
cfOutput.Print(" static ClassVector_uint8 * c_%s;\n", szField);
cfOutput.Print("};\n");
cfOutput.Print("\n");
cfOutput.Print("ClassVector_uint8 * %s::c_%s = &%s::c_%s_0.object;\n",
szCppClassName, szField,
szCppClassName, szField);
cfOutput.Print("\n");
cfOutput.Print("Vector_%s_%s_0 %s::c_%s_0 = {\n",
szCppClassName, szField,
szCppClassName, szField);
cfOutput.Print(" {},\n");
cfOutput.Print(" (Class_System_VTable *)&ClassVector_uint8::_vtable,\n");
cfOutput.Print(" %d,\n", cbFiles);
cfOutput.Print(" {\n");
}
}
else {
if (szNamespace) {
cfOutput.Print("namespace %s {\n", szNamespace);
}
cfOutput.Print(" public class %s {\n", szClass);
if (fList) {
cfOutput.Print(" public static readonly byte[][] %s = {\n", szField);
}
else {
cfOutput.Print(" public static readonly byte[] %s = {\n", szField);
}
}
}
cFile = 0;
for (CFileInfo *pFile = pFiles; pFile != NULL; pFile = pFile->m_pNext) {
CFileMap cfInput;
printf(".");
if (!cfInput.Load(pFile->m_pszFile)) {
fprintf(stderr, "Could not open input file: %s\n", pFile->m_pszFile);
goto abort;
}
if (fFlattenPE) {
// Flatten PE file
if (!dump_pe(pOutput, &cfInput, pszRoot)) {
goto abort;
}
}
else {
if (fAsm) {
if (fList) {
cfOutput.Print("\n");
cfOutput.Print("align 4\n");
cfOutput.Print(" BARTOK_OBJECT_HEADER {} \n");
cfOutput.Print("%s%s_0_%d UINT32 %s\n",
szAsmName,
szByteSuffix,
cFile,
szByteVTable);
cfOutput.Print(" UINT32 %d\n", cfInput.Size());
}
}
else if (fCpp) {
if (fList) {
cfOutput.Print("Vector_%s_%s_0_%d %s::c_%s_0_%d = {\n",
szCppClassName, szField, cFile,
szCppClassName, szField, cFile);
cfOutput.Print(" {},\n");
cfOutput.Print(" (Class_System_VTable *)&ClassVector_uint8::_vtable,\n");
cfOutput.Print(" %d,\n", cfInput.Size());
cfOutput.Print(" {\n");
}
}
else {
if (fList) {
cfOutput.Print(" new byte[] {\n");
}
}
if (fCompress) {
if (!DumpBmp(pFile->m_pszFile, pOutput, cfInput.Seek(0), cfInput.Size())) {
goto abort;
}
}
else {
pOutput->Dump(cfInput.Seek(0), cfInput.Size());
pOutput->Finish();
}
if (fAsm) {
}
else if (fCpp) {
if (fList) {
cfOutput.Print(" },\n");
cfOutput.Print("};\n");
cfOutput.Print("\n");
}
}
else {
if (fList) {
cfOutput.Print(" },\n");
}
}
}
cfInput.Close();
cFile++;
}
if (!fFlattenPE) {
if (fAsm) {
if (fList) {
// create list array at end.
cfOutput.Print("\n");
cfOutput.Print("align 4\n");
cfOutput.Print(" BARTOK_OBJECT_HEADER {} \n");
cfOutput.Print("public %s%s\n",
szAsmName,
szByteByteSuffix);
cfOutput.Print("%s%s_0 UINT32 %s\n",
szAsmName,
szByteByteSuffix,
szByteByteVTable);
cfOutput.Print(" UINT32 %d\n", cFiles);
for (UINT i = 0; i < cFiles; i++) {
cfOutput.Print(" UINT32 %s%s_0_%d\n",
szAsmName,
szByteSuffix,
i);
}
cfOutput.Print("\n");
cfOutput.Print("align 4\n");
cfOutput.Print("public %s%s\n",
szAsmName,
szByteByteSuffix);
cfOutput.Print("%s%s UINT32 %s%s_0\n",
szAsmName,
szByteByteSuffix,
szAsmName,
szByteByteSuffix);
}
else {
cfOutput.Print("\n");
cfOutput.Print("align 4\n");
cfOutput.Print("public %s%s\n",
szAsmName,
szByteSuffix);
cfOutput.Print("%s%s UINT32 %s%s_0\n",
szAsmName,
szByteSuffix,
szAsmName,
szByteSuffix);
}
}
else if (fCpp) {
if (!fList) {
cfOutput.Print(" },\n");
cfOutput.Print("};\n");
cfOutput.Print("\n");
}
}
else
{
cfOutput.Print(" };\n");
cfOutput.Print(" }\n");
cfOutput.Print("}\n");
}
}
if (fAbort) {
abort:
cfOutput.Delete();
return 1;
}
cfOutput.Close();
return 0;
}
//
///////////////////////////////////////////////////////////////// End of File.
| 30.839526
| 108
| 0.442069
|
sphinxlogic
|
405396e66314ec1ed90f2cb15bc897c67975492d
| 149
|
cpp
|
C++
|
src/rigidbody_contact.cpp
|
robdan7/Impact
|
75dfce522b569bbd2f4dfb549aa78d2196c8e793
|
[
"MIT"
] | null | null | null |
src/rigidbody_contact.cpp
|
robdan7/Impact
|
75dfce522b569bbd2f4dfb549aa78d2196c8e793
|
[
"MIT"
] | null | null | null |
src/rigidbody_contact.cpp
|
robdan7/Impact
|
75dfce522b569bbd2f4dfb549aa78d2196c8e793
|
[
"MIT"
] | null | null | null |
//
// Created by Robin on 2021-05-31.
//
#include "rigidbody_contact.h"
namespace Impact {
void Rigidbody_contact::resolve_impulse() {
}
}
| 13.545455
| 47
| 0.671141
|
robdan7
|
4053dab3cc966705393d1a380ea57d96ef730e04
| 10,505
|
cpp
|
C++
|
Core/Src/usb/usb.cpp
|
shima-529/BareMetalUSB_STM32F042
|
887b2bc9d377bf17ce7585efd0c954f5d285fbef
|
[
"MIT"
] | 1
|
2021-05-21T02:53:37.000Z
|
2021-05-21T02:53:37.000Z
|
Core/Src/usb/usb.cpp
|
shima-529/BareMetalUSB_STM32F042
|
887b2bc9d377bf17ce7585efd0c954f5d285fbef
|
[
"MIT"
] | null | null | null |
Core/Src/usb/usb.cpp
|
shima-529/BareMetalUSB_STM32F042
|
887b2bc9d377bf17ce7585efd0c954f5d285fbef
|
[
"MIT"
] | 1
|
2021-09-20T02:43:15.000Z
|
2021-09-20T02:43:15.000Z
|
#include <usb/usb.hpp>
#include "stm32f0xx.h"
#include <algorithm>
#include <cstdio>
#include <usb/utils.hpp>
#include <usb_desc/usb_desc_struct.h>
#include <usb_desc/usb_desc.h>
#include <usb/usb_struct.h>
#define printf(...)
/* Pointer Notation
* - type = uintptr_t : This is an pointer for PMA.
* Local offset of PMA is stored.
* - type = void * or others
* : This is an pointer for main memory.
*/
// External Descriptors {{{
// }}}
alignas(2) static uint8_t line_coding_info[7];
// Some macros {{{
enum USBSetupPacketRequest {
GET_STATUS = 0, CLEAR_FEATURE = 1, SET_FEATURE = 3,
SET_ADDRESS = 5, GET_DESCRIPTOR = 6, SET_DESCRIPTOR = 7,
GET_CONFIGURATION = 8, SET_CONFIGURATION = 9,
GET_INTERFACE = 10, SET_INTERFACE = 11, SYNCH_FRAME = 12,
CDC_SET_LINECODING = 0x20,
CDC_GET_LINECODING = 0x21,
CDC_SET_CONTROLLINESTATE = 0x22,
CDC_SEND_BREAK = 0x23,
CDC_SERIALSTATE = 0xA1
};
enum USBDescriptorType {
DEVICE = 1, CONFIGURATION = 2, STRING = 3, INTERFACE = 4,
ENDPOINT = 5, DEVICE_QUALIFIER = 6,
OTHER_SPEED_CONFIGURATION = 7, INTERFACE_POWER = 8,
};
enum USBHIDDescriptorType {
HID_REPORT = 0x22,
};
// }}}
PMAInfo pma_allocation_info;
USBEndpointInfo ep_info[4];
static USB_EP0Info ep0_data;
static USB_InitType init;
// Init global Funcs {{{
void usb_init(USB_InitType init) {
RCC->APB1ENR |= RCC_APB1ENR_USBEN;
USB->CNTR &= ~USB_CNTR_PDWN;
for(volatile int i=0; i<100; i++); // wait for voltage to be stable
USB->CNTR &= ~USB_CNTR_FRES;
USB->BCDR |= USB_BCDR_DPPU; // pull-up DP so as to notify the connection to the host
USB->CNTR = USB_CNTR_RESETM; // enable reset interrupt
NVIC_SetPriority(USB_IRQn, 0); // Highest Priority
NVIC_EnableIRQ(USB_IRQn);
::init = init;
}
// }}}
// Fundamental xfer/recv Funcs {{{
static void usb_ep_set_status(int endp, uint16_t status, uint16_t mask) {
const auto reg = USB_EPnR(endp);
USB_EPnR(endp) = (reg & (USB_EPREG_MASK | mask)) ^ status;
}
void usb_ep_send(int ep_num, uint16_t addr, uint16_t size) {
ep_info[ep_num].pb_ptr->addr_tx = addr;
ep_info[ep_num].pb_ptr->count_tx = size;
usb_ep_set_status(ep_num, USB_EP_TX_VALID, USB_EPTX_STAT);
}
void usb_ep_receive(int ep_num, uint16_t addr, uint16_t size) {
if( ep_info[ep_num].pb_ptr->addr_rx == 0 ) {
ep_info[ep_num].pb_ptr->addr_rx = addr;
if( size > 62 ) {
ep_info[ep_num].pb_ptr->count_rx = ((size / 32) - 1) << 10;
ep_info[ep_num].pb_ptr->count_rx |= 1 << 15;
}else{
ep_info[ep_num].pb_ptr->count_rx = size << 10;
}
}
usb_ep_set_status(ep_num, USB_EP_RX_VALID, USB_EPRX_STAT);
}
// }}}
static void search_and_set_descriptor(uint16_t wValue) { // {{{
const auto desc_type = (wValue >> 8) & 0xFF;
auto& xfer_info = ep_info[0].xfer_info;
auto& offsets = pma_allocation_info.offsets;
switch( desc_type ) {
case DEVICE:
{
const auto len = init.dep.dev_desc->bLength;
if( offsets.device_desc == 0 ) {
offsets.device_desc = Utils::alloc(len);
Utils::pma_in(offsets.device_desc, init.dep.dev_desc, len);
}
xfer_info.ptr = offsets.device_desc;
xfer_info.whole_length = len;
break;
}
case CONFIGURATION:
{
const auto len = init.dep.conf_desc[2] | (init.dep.conf_desc[3] << 8);
if( offsets.config_desc == 0 ) {
offsets.config_desc = Utils::alloc(len);
Utils::pma_in(offsets.config_desc, init.dep.conf_desc, len);
}
xfer_info.ptr = offsets.config_desc;
xfer_info.whole_length = len;
break;
}
case STRING:
{
const auto desc_no = wValue & 0xFF;
const auto len = string_desc[desc_no].bLength;
if( offsets.string_desc[desc_no] == 0 ) {
offsets.string_desc[desc_no] = Utils::alloc(len);
Utils::pma_in(offsets.string_desc[desc_no], &string_desc[desc_no], len);
}
xfer_info.ptr = offsets.string_desc[desc_no];
xfer_info.whole_length = len;
break;
}
case HID_REPORT:
{
const auto index = ep0_data.last_setup.wIndex;
const auto len = init.dep.hid_report_desc_length[index];
if( offsets.report_desc[index] == 0 ) {
offsets.report_desc[index] = Utils::alloc(len);
Utils::pma_in(offsets.report_desc[index], init.dep.hid_report_desc[index], len);
}
xfer_info.ptr = offsets.report_desc[index];
xfer_info.whole_length = len;
break;
}
default:
break;
}
xfer_info.completed_length = 0;
} // }}}
static uint16_t linecoding_adddr;
// EP0 Handler/Preparer {{{
static void usb_ep0_handle_setup() {
static uint16_t device_state = 0;
static uint16_t state_addr = 0;
static uint8_t controllin_state = 0;
const auto& ep = ep_info[0];
auto& xfer_info = const_cast<decltype(ep_info[0])&>(ep).xfer_info;
const auto& last_setup = ep0_data.last_setup;
if( last_setup.bRequest == GET_DESCRIPTOR ) {
search_and_set_descriptor(last_setup.wValue);
usb_ep_send(0, xfer_info.ptr, std::min({last_setup.wLength, ep.packet_size, xfer_info.whole_length}));
}
if( last_setup.bRequest == GET_CONFIGURATION ) {
if( state_addr == 0 ) {
state_addr = Utils::alloc(1);
}
Utils::pma_in(state_addr, &device_state, 1);
xfer_info.ptr = state_addr;
xfer_info.whole_length = 1;
usb_ep_send(0, xfer_info.ptr, xfer_info.whole_length);
}
if( last_setup.bRequest == SET_CONFIGURATION ) {
device_state = last_setup.wValue;
}
if( last_setup.bRequest == CDC_SET_CONTROLLINESTATE ) {
controllin_state = last_setup.wValue;
(void)controllin_state;
}
if( last_setup.bRequest == CDC_SET_LINECODING ) {
if( linecoding_adddr == 0 ) {
linecoding_adddr = Utils::alloc(7);
}
usb_ep_receive(0, linecoding_adddr, 7);
}
}
static void usb_ep0_handle_status() {
if( ep0_data.last_setup.bRequest == SET_ADDRESS ) {
USB->DADDR = USB_DADDR_EF | (ep0_data.last_setup.wValue & 0x7F);
}
if( ep0_data.last_setup.bRequest == CDC_SET_LINECODING ) {
Utils::pma_out(line_coding_info, linecoding_adddr, 7);
printf("BaudRate: %d\n", line_coding_info[0] + (line_coding_info[1] << 8) + (line_coding_info[2] << 16) + (line_coding_info[3] << 24));
printf("bCharFormat: %d\n", line_coding_info[4]);
printf("bParityType: %d\n", line_coding_info[5]);
printf("bDataBits: %d\n", line_coding_info[6]);
}
}
static void usb_ep0_prepare_for_setup() {
if( pma_allocation_info.offsets.setup_packet == 0 ) {
pma_allocation_info.offsets.setup_packet = Utils::alloc(64);
}
usb_ep_receive(0, pma_allocation_info.offsets.setup_packet, sizeof(USBSetupPacket));
}
static void usb_ep0_prepare_for_next_in() {
// Now data is left to be xferred.
// This means the last IN transaction is completed but the data length is not enough.
auto& xfer_info = ep_info[0].xfer_info;
xfer_info.completed_length += ep_info[0].pb_ptr->count_tx;
const auto next_pos = xfer_info.completed_length + xfer_info.ptr;
usb_ep_send(0, next_pos, xfer_info.whole_length - ep_info[0].packet_size);
}
static void usb_ep0_prepare_for_status() {
if( ep0_data.fsm == EP_fsm::STATUS_OUT ) {
usb_ep_receive(0, ep_info[0].recv_info.ptr, 0);
}
if( ep0_data.fsm == EP_fsm::STATUS_IN ) {
usb_ep_send(0, ep_info[0].xfer_info.ptr, 0);
}
}
static void usb_ep0_handle_current_transaction() {
const auto now_state = ep0_data.fsm;
switch(now_state) {
case EP_fsm::SETUP:
usb_ep0_handle_setup();
break;
case EP_fsm::STATUS_IN:
case EP_fsm::STATUS_OUT:
usb_ep0_handle_status();
break;
default:
break;
}
}
static void usb_ep0_prepare_for_next_transaction() {
const auto next_state = ep0_data.fsm;
switch(next_state) {
case EP_fsm::REPETITIVE_IN:
usb_ep0_prepare_for_next_in();
break;
case EP_fsm::STATUS_IN:
case EP_fsm::STATUS_OUT:
usb_ep0_prepare_for_status();
break;
case EP_fsm::SETUP:
usb_ep0_prepare_for_setup();
break;
default:
break;
}
}
// }}}
static EP_fsm next_state_ep0() { // {{{
const auto& ep = ep_info[0];
const auto& last_setup = ep0_data.last_setup;
switch(ep0_data.fsm) {
case EP_fsm::SETUP:
if( last_setup.bmRequestType & 0x80 ) {
return (last_setup.wLength != 0) ? EP_fsm::IN : EP_fsm::STATUS_IN;
}else{
return (last_setup.wLength != 0) ? EP_fsm::OUT : EP_fsm::STATUS_IN;
}
break;
case EP_fsm::IN:
case EP_fsm::REPETITIVE_IN:
{
const auto& xfer_info = ep.xfer_info;
const bool cond = (ep_info[0].pb_ptr->count_tx == ep_info[0].packet_size);
const auto length_to_be_xferred = cond ? xfer_info.whole_length - xfer_info.completed_length : 0;
if( length_to_be_xferred > ep.packet_size ) {
return EP_fsm::REPETITIVE_IN;
}
return EP_fsm::STATUS_OUT;
break;
}
case EP_fsm::OUT:
return EP_fsm::STATUS_IN;
break;
default:
break;
}
return EP_fsm::SETUP;
} // }}}
extern "C" void USB_IRQHandler() {
auto flag = USB->ISTR;
if( flag & USB_ISTR_RESET ) {
printf("\nRESET\n");
USB->ISTR &= ~USB_ISTR_RESET;
USB->CNTR |= USB_CNTR_CTRM | USB_CNTR_RESETM;
pma_allocation_info = {};
USB->BTABLE = Utils::alloc(sizeof(PacketBuffer) * (init.nEndpoints + 1));
USB->DADDR = USB_DADDR_EF; // enable the functionality
// initialize EP0
ep0_data.fsm = EP_fsm::RESET;
ep_info[0].packet_size = 64;
ep_info[0].pb_ptr = reinterpret_cast<PacketBuffer *>(static_cast<uintptr_t>(USB->BTABLE) + USB_PMAADDR);
ep_info[0].pb_ptr->addr_rx = 0;
USB->EP0R = USB_EP_CONTROL;
usb_ep0_prepare_for_setup();
// Other EPs
for(int i = 0; i < init.nEndpoints; i++) {
const int ep_num = i + 1;
init.ep[i].init(ep_num);
}
}
while( (flag = USB->ISTR) & USB_ISTR_CTR ) {
const auto ep_num = flag & USB_ISTR_EP_ID;
const auto epreg = USB_EPnR(ep_num);
if( ep_num == 0 ) {
if( epreg & USB_EP_CTR_RX ) {
// DIR == 1 : IRQ by SETUP transaction. CTR_RX is set.
USB->EP0R = epreg & ~USB_EP_CTR_RX & USB_EPREG_MASK;
if( epreg & USB_EP_SETUP ) {
ep0_data.fsm = EP_fsm::SETUP;
Utils::pma_out(&ep0_data.last_setup, pma_allocation_info.offsets.setup_packet, sizeof(USBSetupPacket));
Utils::Dump::setup_packet();
}
Utils::Dump::fsm();
usb_ep0_handle_current_transaction();
}
if( epreg & USB_EP_CTR_TX ) {
// DIR = 0 : IRQ by IN direction. CTR_TX is set.
USB->EP0R = epreg & ~USB_EP_CTR_TX & USB_EPREG_MASK;
Utils::Dump::fsm();
usb_ep0_handle_current_transaction();
}
ep0_data.fsm = next_state_ep0();
usb_ep0_prepare_for_next_transaction();
}else{
if( epreg & USB_EP_CTR_TX ) {
USB_EPnR(ep_num) = epreg & ~USB_EP_CTR_TX & USB_EPREG_MASK;
init.ep[ep_num - 1].tx_handler(ep_num);
}
if( epreg & USB_EP_CTR_RX ) {
USB_EPnR(ep_num) = epreg & ~USB_EP_CTR_RX & USB_EPREG_MASK;
init.ep[ep_num - 1].rx_handler(ep_num);
}
}
}
}
| 29.928775
| 137
| 0.698239
|
shima-529
|
405494e075dbe462812254669e3c19340ed25e4e
| 8,368
|
cpp
|
C++
|
main/source/textrep/TRFactory.cpp
|
fmoraw/NS
|
6c3ae93ca7f929f24da4b8f2d14ea0602184cf08
|
[
"Unlicense"
] | 27
|
2015-01-05T19:25:14.000Z
|
2022-03-20T00:34:34.000Z
|
main/source/textrep/TRFactory.cpp
|
fmoraw/NS
|
6c3ae93ca7f929f24da4b8f2d14ea0602184cf08
|
[
"Unlicense"
] | 9
|
2015-01-14T06:51:46.000Z
|
2021-03-19T12:07:18.000Z
|
main/source/textrep/TRFactory.cpp
|
fmoraw/NS
|
6c3ae93ca7f929f24da4b8f2d14ea0602184cf08
|
[
"Unlicense"
] | 5
|
2015-01-11T10:31:24.000Z
|
2021-01-06T01:32:58.000Z
|
//======== (C) Copyright 2002 Charles G. Cleveland All rights reserved. =========
//
// The copyright to the contents herein is the property of Charles G. Cleveland.
// The contents may be used and/or copied only with the written permission of
// Charles G. Cleveland, or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied.
//
// Purpose:
//
// $Workfile: TRFactory.cpp $
// $Date: 2002/08/16 02:28:25 $
//
//-------------------------------------------------------------------------------
// $Log: TRFactory.cpp,v $
// Revision 1.6 2002/08/16 02:28:25 Flayra
// - Added document headers
//
//===============================================================================
#include "TRTag.h"
#include "TRTagValuePair.h"
#include "TRDescription.h"
#include "TRFactory.h"
#include "../util/STLUtil.h"
const int maxLineLength = 256;
bool TRFactory::ReadDescriptions(const string& inRelativePathFilename, TRDescriptionList& outDescriptionList)
{
bool theSuccess = false;
bool theDescriptionRead = false;
// Open file specified by relative path name
fstream infile;
infile.open(inRelativePathFilename.c_str(), ios::in);
if(infile.is_open())
{
do
{
// Try to read the next description in
TRDescription theNextDescription;
theDescriptionRead = ReadDescription(infile, theNextDescription);
// add it to the description list
if(theDescriptionRead)
{
// Function is successful if at least one description was found
outDescriptionList.push_back(theNextDescription);
theSuccess = true;
}
} while(theDescriptionRead);
infile.close();
}
return theSuccess;
}
bool TRFactory::WriteDescriptions(const string& inRelativePathFilename, const TRDescriptionList& inDescriptionList, const string& inHeader)
{
bool theSuccess = false;
// Open the file for output
fstream theOutfile;
theOutfile.open(inRelativePathFilename.c_str(), ios::out);
if(theOutfile.is_open())
{
// Optional: write header
theOutfile << inHeader << std::endl;
//theOutfile << "; Generated by Half-life. Do not edit unless you know what you are doing! " << std::endl;
//theOutfile << std::endl;
// For each description
TRDescriptionList::const_iterator theIter;
for(theIter = inDescriptionList.begin(); theIter != inDescriptionList.end(); theIter++)
{
// Write out that description
const TRDescription& theDesc = *theIter;
TRFactory::WriteDescription(theOutfile, theDesc);
// Write out a blank line to make them look nice and separated
theOutfile << std::endl;
}
theOutfile.close();
theSuccess = true;
}
return theSuccess;
}
// TODO: Add case-insensitivity
bool TRFactory::ReadDescription(fstream& infile, TRDescription& outDescription)
{
bool theSuccess = false;
string currentLine;
bool blockStarted = false;
// for every line in the file
while(!infile.eof())
{
if(readAndTrimNextLine(infile, currentLine))
{
// If line isn't a comment
if(!lineIsAComment(currentLine))
{
// If we haven't started, is line of format: start <type> <name>? If so, set started and set those tags.
if(!blockStarted)
{
blockStarted = readStartBlockLine(currentLine, outDescription);
}
// If we have started
else
{
// Is line an end? If so, this function is over
if(readEndBlockLine(currentLine))
{
break;
}
// else is line of tag = property format? If so, add it as pair
else
{
// If not, print error and proceed
if(readTagAndValueLine(currentLine, outDescription))
{
// Once we have read at least one tag-value pair, considered this a success
theSuccess = true;
}
else
{
//printf("Error reading line of length %d: %s\n", currentLine.length(), currentLine.c_str());
}
}
}
}
}
}
return theSuccess;
}
bool TRFactory::WriteDescription(fstream& outfile, const TRDescription& inDescription)
{
bool theSuccess = true;
// Write out the start block
outfile << "start" << " " << inDescription.GetType() << " " << inDescription.GetName() << std::endl;
// Write out the property tags
TRDescription::const_iterator theIter;
for(theIter = inDescription.begin(); theIter != inDescription.end(); theIter++)
{
outfile << " " << theIter->first << " = " << theIter->second << std:: endl;
}
// Write out the end block.
outfile << "end" << std::endl;
return theSuccess;
}
bool TRFactory::readAndTrimNextLine(istream& inStream, string& outString)
{
char theLine[maxLineLength];
bool theSuccess = false;
inStream.getline(theLine, maxLineLength);
outString = string(theLine);
trimWhitespace(outString);
// Return false if the line is empty when we're done
if(outString.length() > 1)
{
theSuccess = true;
}
return theSuccess;
}
// Trim whitespace from string
void TRFactory::trimWhitespace(string& inString)
{
// find first character that isn't a tab or space and save that offset
//int firstNonWSChar = 0;
//int i= 0;
//int stringLength = inString.length();
//while(i != (stringLength - 1) && ())
//{
//}
// find last character that isn't a tab or space and save that offset
// Build a new string representing string without whitespace
// Set new string equal to inString
}
bool TRFactory::charIsWhiteSpace(char inChar)
{
bool theSuccess = false;
if((inChar == ' ') || (inChar == '\t'))
{
theSuccess = true;
}
return theSuccess;
}
// Is the string a comment?
bool TRFactory::lineIsAComment(const string& inString)
{
bool theLineIsAComment = false;
//replaced loop with actual string functions... KGP
size_t index = inString.find_first_not_of(" \t");
if( index != string::npos && (inString.at(index) == '\'' || inString.at(index) == ';') )
{ theLineIsAComment = true; }
return theLineIsAComment;
}
// Read start block
// Set the name and type of the description
// Returns false if invalid format
bool TRFactory::readStartBlockLine(const string& inString, TRDescription& outDescription)
{
bool theSuccess = false;
char theType[maxLineLength];
char theName[maxLineLength];
memset(theType, ' ', maxLineLength);
memset(theName, ' ', maxLineLength);
// Read three tokens. There should be "start" <type> <name>
if(sscanf(inString.c_str(), "start %s %s", theType, theName) == 2)
{
outDescription.SetName(theName);
outDescription.SetType(theType);
theSuccess = true;
}
return theSuccess;
}
// Read end block
bool TRFactory::readEndBlockLine(const string& inString)
{
bool theSuccess = false;
// There are some CRLF issues on Linux, hence this bit
if(inString.length() >= 3)
{
string theString = inString.substr(0,3);
if(theString == "end")
{
theSuccess = true;
}
else
{
//printf("TRFactory::readEndBlockLine() failed, found (%s)\n", theString.c_str());
}
}
return theSuccess;
}
bool TRFactory::readTagAndValueLine(const string& inString, TRDescription& outDescription)
{
bool theSuccess = false;
char theTag[maxLineLength];
char theValue[maxLineLength];
// Zero them out
memset(theTag, ' ', maxLineLength);
memset(theValue, ' ', maxLineLength);
if((sscanf(inString.c_str(), "%s = %s", theTag, theValue)) == 2)
{
// Add it
TRTagValuePair thePair(theTag, theValue);
outDescription.AddPair(thePair);
theSuccess = true;
}
return theSuccess;
}
| 28.462585
| 140
| 0.593212
|
fmoraw
|
405f147bc84b989e1287d8938de4ba8c380de392
| 10,954
|
cc
|
C++
|
src/CBLDatabase.cc
|
stcleezy/couchbase-lite-C
|
6e04658b023b48908ff1e0d89197e830df22c178
|
[
"Apache-2.0"
] | null | null | null |
src/CBLDatabase.cc
|
stcleezy/couchbase-lite-C
|
6e04658b023b48908ff1e0d89197e830df22c178
|
[
"Apache-2.0"
] | null | null | null |
src/CBLDatabase.cc
|
stcleezy/couchbase-lite-C
|
6e04658b023b48908ff1e0d89197e830df22c178
|
[
"Apache-2.0"
] | null | null | null |
//
// CBLDatabase.cc
//
// Copyright © 2018 Couchbase. 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 "CBLDatabase_Internal.hh"
#include "CBLPrivate.h"
#include "Internal.hh"
#include "Util.hh"
#include "PlatformCompat.hh"
#include <sys/stat.h>
#ifndef CMAKE
#include <unistd.h>
#endif
using namespace std;
using namespace fleece;
using namespace cbl_internal;
static constexpr CBLDatabaseFlags kDefaultFlags = kC4DB_Create;
// Default location for databases: the current directory
static const char* defaultDbDir() {
static const string kDir = cbl_getcwd(nullptr, 0);
return kDir.c_str();
}
static slice effectiveDir(const char *inDirectory) {
return slice(inDirectory ? inDirectory : defaultDbDir());
}
static C4DatabaseConfig2 asC4Config(const CBLDatabaseConfiguration *config) {
C4DatabaseConfig2 c4Config = {};
if (config) {
c4Config.parentDirectory = effectiveDir(config->directory);
if (config->flags & kCBLDatabase_Create)
c4Config.flags |= kC4DB_Create;
if (config->flags & kCBLDatabase_ReadOnly)
c4Config.flags |= kC4DB_ReadOnly;
if (config->flags & kCBLDatabase_NoUpgrade)
c4Config.flags |= kC4DB_NoUpgrade;
c4Config.encryptionKey.algorithm = static_cast<C4EncryptionAlgorithm>(
config->encryptionKey.algorithm);
static_assert(sizeof(CBLEncryptionKey::bytes) == sizeof(C4EncryptionKey::bytes),
"C4EncryptionKey and CBLEncryptionKey size do not match");
memcpy(c4Config.encryptionKey.bytes, config->encryptionKey.bytes,
sizeof(CBLEncryptionKey::bytes));
} else {
c4Config.parentDirectory = effectiveDir(nullptr);
c4Config.flags = kDefaultFlags;
}
return c4Config;
}
// For use only by CBLLocalEndpoint
C4Database* CBLDatabase::_getC4Database() const {
return use<C4Database*>([](C4Database *c4db) {
return c4db;
});
}
#pragma mark - STATIC "METHODS":
bool CBL_DatabaseExists(const char *name, const char *inDirectory) CBLAPI {
return c4db_exists(slice(name), effectiveDir(inDirectory));
}
bool CBL_CopyDatabase(const char* fromPath,
const char* toName,
const CBLDatabaseConfiguration *config,
CBLError* outError) CBLAPI
{
C4DatabaseConfig2 c4config = asC4Config(config);
return c4db_copyNamed(slice(fromPath), slice(toName), &c4config, internal(outError));
}
bool CBL_DeleteDatabase(const char *name,
const char *inDirectory,
CBLError* outError) CBLAPI
{
return c4db_deleteNamed(slice(name), effectiveDir(inDirectory), internal(outError));
}
#pragma mark - LIFECYCLE & OPERATIONS:
CBLDatabase* CBLDatabase_Open(const char *name,
const CBLDatabaseConfiguration *config,
CBLError *outError) CBLAPI
{
C4DatabaseConfig2 c4config = asC4Config(config);
C4Database *c4db = c4db_openNamed(slice(name), &c4config, internal(outError));
if (!c4db)
return nullptr;
c4db_startHousekeeping(c4db);
return retain(new CBLDatabase(c4db, name,
c4config.parentDirectory,
(config ? config->flags : kDefaultFlags)));
}
bool CBLDatabase_Close(CBLDatabase* db, CBLError* outError) CBLAPI {
if (!db)
return true;
return db->use<bool>([=](C4Database *c4db) {
return c4db_close(c4db, internal(outError));
});
}
bool CBLDatabase_BeginBatch(CBLDatabase* db, CBLError* outError) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_beginTransaction(c4db, internal(outError));
});
}
bool CBLDatabase_EndBatch(CBLDatabase* db, CBLError* outError) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_endTransaction(c4db, true, internal(outError));
});
}
bool CBLDatabase_Compact(CBLDatabase* db, CBLError* outError) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_compact(c4db, internal(outError));
});
}
bool CBLDatabase_Delete(CBLDatabase* db, CBLError* outError) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_delete(c4db, internal(outError));
});
}
CBLTimestamp CBLDatabase_NextDocExpiration(CBLDatabase* db) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_nextDocExpiration(c4db);
});
}
int64_t CBLDatabase_PurgeExpiredDocuments(CBLDatabase* db, CBLError* outError) CBLAPI {
return db->use<bool>([=](C4Database *c4db) {
return c4db_purgeExpiredDocs(c4db, internal(outError));
});
}
#pragma mark - ACCESSORS:
const char* CBLDatabase_Name(const CBLDatabase* db) CBLAPI {
return db->name.c_str();
}
const char* CBLDatabase_Path(const CBLDatabase* db) CBLAPI {
return db->path.c_str();
}
const CBLDatabaseConfiguration CBLDatabase_Config(const CBLDatabase* db) CBLAPI {
const char *dir = db->dir.empty() ? nullptr : db->dir.c_str();
return {dir, db->flags};
}
uint64_t CBLDatabase_Count(const CBLDatabase* db) CBLAPI {
return db->use<uint64_t>([](C4Database *c4db) {
return c4db_getDocumentCount(c4db);
});
}
uint64_t CBLDatabase_LastSequence(const CBLDatabase* db) CBLAPI {
return db->use<uint64_t>([](C4Database *c4db) {
return c4db_getLastSequence(c4db);
});
}
#pragma mark - NOTIFICATIONS:
void CBLDatabase_BufferNotifications(CBLDatabase *db,
CBLNotificationsReadyCallback callback,
void *context) CBLAPI
{
db->bufferNotifications(callback, context);
}
void CBLDatabase_SendNotifications(CBLDatabase *db) CBLAPI {
db->sendNotifications();
}
#pragma mark - DATABASE CHANGE LISTENERS:
CBLListenerToken* CBLDatabase::addListener(CBLDatabaseChangeListener listener, void *context) {
return use<CBLListenerToken*>([=](C4Database *c4db) {
auto token = _listeners.add(listener, context);
if (!_observer) {
_observer = c4dbobs_create(c4db,
[](C4DatabaseObserver* observer, void *context) {
((CBLDatabase*)context)->databaseChanged();
},
this);
}
return token;
});
}
void CBLDatabase::databaseChanged() {
notify(bind(&CBLDatabase::callDBListeners, this));
}
void CBLDatabase::callDBListeners() {
static const uint32_t kMaxChanges = 100;
while (true) {
C4DatabaseChange c4changes[kMaxChanges];
bool external;
uint32_t nChanges = c4dbobs_getChanges(_observer, c4changes, kMaxChanges, &external);
if (nChanges == 0)
break;
// Convert docID slices to C strings:
const char* docIDs[kMaxChanges];
size_t bufSize = 0;
for (uint32_t i = 0; i < nChanges; ++i)
bufSize += c4changes[i].docID.size + 1;
char *buf = new char[bufSize], *next = buf;
for (uint32_t i = 0; i < nChanges; ++i) {
docIDs[i] = next;
memcpy(next, (const char*)c4changes[i].docID.buf, c4changes[i].docID.size);
next += c4changes[i].docID.size;
*(next++) = '\0';
}
assert(next - buf == bufSize);
// Call the listener(s):
_listeners.call(this, nChanges, docIDs);
delete [] buf;
}
}
CBLListenerToken* CBLDatabase_AddChangeListener(const CBLDatabase* constdb _cbl_nonnull,
CBLDatabaseChangeListener listener _cbl_nonnull,
void *context) CBLAPI
{
return const_cast<CBLDatabase*>(constdb)->addListener(listener, context);
}
#pragma mark - DOCUMENT LISTENERS:
namespace cbl_internal {
// Custom subclass of CBLListenerToken for document listeners.
// (It implements the ListenerToken<> template so that it will work with Listeners<>.)
template<>
class ListenerToken<CBLDocumentChangeListener> : public CBLListenerToken {
public:
ListenerToken(CBLDatabase *db, const char *docID, CBLDocumentChangeListener callback, void *context)
:CBLListenerToken((const void*)callback, context)
,_db(db)
,_docID(docID)
{
db->use([&](C4Database *c4db) {
_c4obs = c4docobs_create(c4db,
slice(docID),
[](C4DocumentObserver* observer, C4String docID,
C4SequenceNumber sequence, void *context)
{
((ListenerToken*)context)->docChanged();
},
this);
});
}
~ListenerToken() {
_db->use([&](C4Database *c4db) {
c4docobs_free(_c4obs);
});
}
CBLDocumentChangeListener callback() const {
return (CBLDocumentChangeListener)_callback.load();
}
// this is called indirectly by CBLDatabase::sendNotifications
void call(const CBLDatabase*, const char*) {
auto cb = callback();
if (cb)
cb(_context, _db, _docID.c_str());
}
private:
void docChanged() {
_db->notify(this, nullptr, nullptr);
}
CBLDatabase* _db;
string _docID;
C4DocumentObserver* _c4obs {nullptr};
};
}
CBLListenerToken* CBLDatabase::addDocListener(const char* docID _cbl_nonnull,
CBLDocumentChangeListener listener, void *context)
{
auto token = new ListenerToken<CBLDocumentChangeListener>(this, docID, listener, context);
_docListeners.add(token);
return token;
}
CBLListenerToken* CBLDatabase_AddDocumentChangeListener(const CBLDatabase* db _cbl_nonnull,
const char* docID _cbl_nonnull,
CBLDocumentChangeListener listener _cbl_nonnull,
void *context) CBLAPI
{
return const_cast<CBLDatabase*>(db)->addDocListener(docID, listener, context);
}
| 31.750725
| 108
| 0.619682
|
stcleezy
|
406130ac2ca4d5508ff7001c1e25b488fdaae54c
| 387
|
cpp
|
C++
|
snippets/control_flow/sequential.cpp
|
raakasf/moderncpp
|
2f8495c90e717e73303191e6f6aef37212448a46
|
[
"MIT"
] | 334
|
2020-08-29T16:41:02.000Z
|
2022-03-28T06:26:28.000Z
|
snippets/control_flow/sequential.cpp
|
raakasf/moderncpp
|
2f8495c90e717e73303191e6f6aef37212448a46
|
[
"MIT"
] | 4
|
2021-02-06T21:18:20.000Z
|
2022-03-16T17:10:44.000Z
|
snippets/control_flow/sequential.cpp
|
raakasf/moderncpp
|
2f8495c90e717e73303191e6f6aef37212448a46
|
[
"MIT"
] | 33
|
2020-08-31T11:36:44.000Z
|
2022-03-31T07:07:20.000Z
|
#include <iostream>
int main() {
using namespace std;
double l = 4;
double area = l * l;
cout << "Area: " << area << endl;
double height = 1.90;
double weight = 90;
cout << "BMI: " << weight / (height * height) << endl;
int a = 4;
int b = 7;
int fx = (b * b * b + a * b) - 2 * b + a % b;
cout << "f(x) = " << fx << endl;
return 0;
}
| 17.590909
| 58
| 0.45478
|
raakasf
|
406132820a828ab682116a0cdf4caa22570a6602
| 23,688
|
cc
|
C++
|
selfdrive/can/dbc_out/toyota_prius_2010_pt.cc
|
ziggysnorkel/openpilot
|
695859fb49976c2ef0a6a4a73d30d5cef2ad1945
|
[
"MIT"
] | 1
|
2021-03-05T18:09:52.000Z
|
2021-03-05T18:09:52.000Z
|
selfdrive/can/dbc_out/toyota_prius_2010_pt.cc
|
ziggysnorkel/openpilot
|
695859fb49976c2ef0a6a4a73d30d5cef2ad1945
|
[
"MIT"
] | null | null | null |
selfdrive/can/dbc_out/toyota_prius_2010_pt.cc
|
ziggysnorkel/openpilot
|
695859fb49976c2ef0a6a4a73d30d5cef2ad1945
|
[
"MIT"
] | null | null | null |
#include <cstdint>
#include "common.h"
namespace {
const Signal sigs_36[] = {
{
.name = "YAW_RATE",
.b1 = 6,
.b2 = 10,
.bo = 48,
.is_signed = false,
.factor = 1,
.offset = -512.0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEERING_TORQUE",
.b1 = 22,
.b2 = 10,
.bo = 32,
.is_signed = false,
.factor = 1,
.offset = -512.0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "ACCEL_Y",
.b1 = 38,
.b2 = 10,
.bo = 16,
.is_signed = false,
.factor = 1,
.offset = -512.0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_37[] = {
{
.name = "STEER_ANGLE",
.b1 = 4,
.b2 = 12,
.bo = 48,
.is_signed = true,
.factor = 1.5,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEER_RATE",
.b1 = 36,
.b2 = 12,
.bo = 16,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEER_FRACTION",
.b1 = 32,
.b2 = 4,
.bo = 28,
.is_signed = true,
.factor = 0.1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_166[] = {
{
.name = "BRAKE_AMOUNT",
.b1 = 0,
.b2 = 8,
.bo = 56,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "BRAKE_PEDAL",
.b1 = 16,
.b2 = 8,
.bo = 40,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_170[] = {
{
.name = "WHEEL_SPEED_FR",
.b1 = 0,
.b2 = 16,
.bo = 48,
.is_signed = false,
.factor = 0.0062,
.offset = -67.67,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "WHEEL_SPEED_FL",
.b1 = 16,
.b2 = 16,
.bo = 32,
.is_signed = false,
.factor = 0.0062,
.offset = -67.67,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "WHEEL_SPEED_RR",
.b1 = 32,
.b2 = 16,
.bo = 16,
.is_signed = false,
.factor = 0.0062,
.offset = -67.67,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "WHEEL_SPEED_RL",
.b1 = 48,
.b2 = 16,
.bo = 0,
.is_signed = false,
.factor = 0.0062,
.offset = -67.67,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_180[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "ENCODER",
.b1 = 32,
.b2 = 8,
.bo = 24,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SPEED",
.b1 = 40,
.b2 = 16,
.bo = 8,
.is_signed = false,
.factor = 0.0062,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_295[] = {
{
.name = "COUNTER",
.b1 = 48,
.b2 = 8,
.bo = 8,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "CAR_MOVEMENT",
.b1 = 32,
.b2 = 8,
.bo = 24,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "GEAR",
.b1 = 40,
.b2 = 4,
.bo = 20,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_452[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "ENGINE_RPM",
.b1 = 0,
.b2 = 16,
.bo = 48,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_466[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "GAS_RELEASED",
.b1 = 3,
.b2 = 1,
.bo = 60,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "ACCEL_NET",
.b1 = 16,
.b2 = 16,
.bo = 32,
.is_signed = true,
.factor = 0.001,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "CRUISE_STATE",
.b1 = 48,
.b2 = 4,
.bo = 12,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_467[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "LOW_SPEED_LOCKOUT",
.b1 = 9,
.b2 = 2,
.bo = 53,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "MAIN_ON",
.b1 = 8,
.b2 = 1,
.bo = 55,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SET_SPEED",
.b1 = 16,
.b2 = 8,
.bo = 40,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_550[] = {
{
.name = "BRAKE_PRESSURE",
.b1 = 7,
.b2 = 9,
.bo = 48,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "BRAKE_POSITION",
.b1 = 23,
.b2 = 9,
.bo = 32,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "BRAKE_PRESSED",
.b1 = 34,
.b2 = 1,
.bo = 29,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_552[] = {
{
.name = "ACCEL_X",
.b1 = 1,
.b2 = 15,
.bo = 48,
.is_signed = true,
.factor = 0.001,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "ACCEL_Z",
.b1 = 17,
.b2 = 15,
.bo = 32,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_560[] = {
{
.name = "BRAKE_LIGHTS",
.b1 = 29,
.b2 = 1,
.bo = 34,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_581[] = {
{
.name = "GAS_PEDAL",
.b1 = 16,
.b2 = 8,
.bo = 40,
.is_signed = false,
.factor = 0.005,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_608[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "STEER_OVERRIDE",
.b1 = 7,
.b2 = 1,
.bo = 56,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEER_TORQUE_DRIVER",
.b1 = 8,
.b2 = 16,
.bo = 40,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEER_TORQUE_EPS",
.b1 = 40,
.b2 = 16,
.bo = 8,
.is_signed = true,
.factor = 0.66,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_610[] = {
{
.name = "CHECKSUM",
.b1 = 32,
.b2 = 8,
.bo = 24,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "STATE",
.b1 = 4,
.b2 = 4,
.bo = 56,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LKA_STATE",
.b1 = 24,
.b2 = 8,
.bo = 32,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_614[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "ANGLE",
.b1 = 4,
.b2 = 12,
.bo = 48,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STATE",
.b1 = 0,
.b2 = 4,
.bo = 60,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SET_ME_X10",
.b1 = 16,
.b2 = 8,
.bo = 40,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "DIRECTION_CMD",
.b1 = 33,
.b2 = 2,
.bo = 29,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SET_ME_X00",
.b1 = 48,
.b2 = 8,
.bo = 8,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_740[] = {
{
.name = "COUNTER",
.b1 = 1,
.b2 = 6,
.bo = 57,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "CHECKSUM",
.b1 = 32,
.b2 = 8,
.bo = 24,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "STEER_REQUEST",
.b1 = 7,
.b2 = 1,
.bo = 56,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SET_ME_1",
.b1 = 0,
.b2 = 1,
.bo = 63,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "STEER_TORQUE_CMD",
.b1 = 8,
.b2 = 16,
.bo = 40,
.is_signed = true,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LKA_STATE",
.b1 = 24,
.b2 = 8,
.bo = 32,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_742[] = {
{
.name = "CHECKSUM",
.b1 = 56,
.b2 = 8,
.bo = 0,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::TOYOTA_CHECKSUM,
},
{
.name = "LEAD_LONG_DIST",
.b1 = 0,
.b2 = 13,
.bo = 51,
.is_signed = false,
.factor = 0.05,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LEAD_REL_SPEED",
.b1 = 16,
.b2 = 12,
.bo = 36,
.is_signed = true,
.factor = 0.025,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_835[] = {
{
.name = "ACCEL_CMD",
.b1 = 0,
.b2 = 16,
.bo = 48,
.is_signed = true,
.factor = 0.001,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_921[] = {
{
.name = "MAIN_ON",
.b1 = 3,
.b2 = 1,
.bo = 60,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "CRUISE_CONTROL_STATE",
.b1 = 12,
.b2 = 4,
.bo = 48,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "UI_SET_SPEED",
.b1 = 24,
.b2 = 8,
.bo = 32,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_951[] = {
{
.name = "TC_DISABLED",
.b1 = 10,
.b2 = 1,
.bo = 53,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_1042[] = {
{
.name = "BARRIERS",
.b1 = 6,
.b2 = 2,
.bo = 56,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "RIGHT_LINE",
.b1 = 4,
.b2 = 2,
.bo = 58,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LEFT_LINE",
.b1 = 2,
.b2 = 2,
.bo = 60,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SET_ME_1",
.b1 = 0,
.b2 = 2,
.bo = 62,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LDA_ALERT",
.b1 = 14,
.b2 = 2,
.bo = 48,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "TWO_BEEPS",
.b1 = 11,
.b2 = 1,
.bo = 52,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "ADJUSTING_CAMERA",
.b1 = 10,
.b2 = 1,
.bo = 53,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "LDA_MALFUNCTION",
.b1 = 8,
.b2 = 1,
.bo = 55,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_1553[] = {
{
.name = "UNITS",
.b1 = 29,
.b2 = 2,
.bo = 33,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_1556[] = {
{
.name = "TURN_SIGNALS",
.b1 = 26,
.b2 = 2,
.bo = 36,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Signal sigs_1568[] = {
{
.name = "DOOR_OPEN_RL",
.b1 = 45,
.b2 = 1,
.bo = 18,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "DOOR_OPEN_RR",
.b1 = 44,
.b2 = 1,
.bo = 19,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "DOOR_OPEN_FR",
.b1 = 43,
.b2 = 1,
.bo = 20,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "DOOR_OPEN_FL",
.b1 = 42,
.b2 = 1,
.bo = 21,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
{
.name = "SEATBELT_DRIVER_UNLATCHED",
.b1 = 57,
.b2 = 1,
.bo = 6,
.is_signed = false,
.factor = 1,
.offset = 0,
.is_little_endian = false,
.type = SignalType::DEFAULT,
},
};
const Msg msgs[] = {
{
.name = "KINEMATICS",
.address = 0x24,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_36),
.sigs = sigs_36,
},
{
.name = "STEER_ANGLE_SENSOR",
.address = 0x25,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_37),
.sigs = sigs_37,
},
{
.name = "BRAKE",
.address = 0xA6,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_166),
.sigs = sigs_166,
},
{
.name = "WHEEL_SPEEDS",
.address = 0xAA,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_170),
.sigs = sigs_170,
},
{
.name = "SPEED",
.address = 0xB4,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_180),
.sigs = sigs_180,
},
{
.name = "GEAR_PACKET",
.address = 0x127,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_295),
.sigs = sigs_295,
},
{
.name = "POWERTRAIN",
.address = 0x1C4,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_452),
.sigs = sigs_452,
},
{
.name = "PCM_CRUISE",
.address = 0x1D2,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_466),
.sigs = sigs_466,
},
{
.name = "PCM_CRUISE_2",
.address = 0x1D3,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_467),
.sigs = sigs_467,
},
{
.name = "BRAKE_MODULE",
.address = 0x226,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_550),
.sigs = sigs_550,
},
{
.name = "ACCELEROMETER",
.address = 0x228,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_552),
.sigs = sigs_552,
},
{
.name = "BRAKE_MODULE2",
.address = 0x230,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_560),
.sigs = sigs_560,
},
{
.name = "GAS_PEDAL",
.address = 0x245,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_581),
.sigs = sigs_581,
},
{
.name = "STEER_TORQUE_SENSOR",
.address = 0x260,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_608),
.sigs = sigs_608,
},
{
.name = "EPS_STATUS",
.address = 0x262,
.size = 5,
.num_sigs = ARRAYSIZE(sigs_610),
.sigs = sigs_610,
},
{
.name = "STEERING_IPAS",
.address = 0x266,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_614),
.sigs = sigs_614,
},
{
.name = "STEERING_LKA",
.address = 0x2E4,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_740),
.sigs = sigs_740,
},
{
.name = "LEAD_INFO",
.address = 0x2E6,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_742),
.sigs = sigs_742,
},
{
.name = "ACC_CONTROL",
.address = 0x343,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_835),
.sigs = sigs_835,
},
{
.name = "PCM_CRUISE_SM",
.address = 0x399,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_921),
.sigs = sigs_921,
},
{
.name = "ESP_CONTROL",
.address = 0x3B7,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_951),
.sigs = sigs_951,
},
{
.name = "LKAS_HUD",
.address = 0x412,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_1042),
.sigs = sigs_1042,
},
{
.name = "UI_SEETING",
.address = 0x611,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_1553),
.sigs = sigs_1553,
},
{
.name = "STEERING_LEVERS",
.address = 0x614,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_1556),
.sigs = sigs_1556,
},
{
.name = "SEATS_DOORS",
.address = 0x620,
.size = 8,
.num_sigs = ARRAYSIZE(sigs_1568),
.sigs = sigs_1568,
},
};
const Val vals[] = {
{
.name = "GEAR",
.address = 0x127,
.def_val = "0 P 1 R 2 N 3 D 4 B",
.sigs = sigs_295,
},
{
.name = "CRUISE_STATE",
.address = 0x1D2,
.def_val = "8 ACTIVE 7 STANDSTILL 1 OFF",
.sigs = sigs_466,
},
{
.name = "LOW_SPEED_LOCKOUT",
.address = 0x1D3,
.def_val = "2 LOW_SPEED_LOCKED 1 OK",
.sigs = sigs_467,
},
{
.name = "STATE",
.address = 0x262,
.def_val = "5 OVERRIDE 3 ENABLED 1 DISABLED",
.sigs = sigs_610,
},
{
.name = "LKA_STATE",
.address = 0x262,
.def_val = "50 TEMPORARY_FAULT",
.sigs = sigs_610,
},
{
.name = "STATE",
.address = 0x266,
.def_val = "3 ENABLED 1 DISABLED",
.sigs = sigs_614,
},
{
.name = "DIRECTION_CMD",
.address = 0x266,
.def_val = "3 RIGHT 2 CENTER 1 LEFT",
.sigs = sigs_614,
},
{
.name = "CRUISE_CONTROL_STATE",
.address = 0x399,
.def_val = "2 DISABLED 11 HOLD 10 HOLD_WAITING_USER_CMD 6 ENABLED 5 FAULTED",
.sigs = sigs_921,
},
{
.name = "LDA_ALERT",
.address = 0x412,
.def_val = "3 HOLD_WITH_CONTINUOUS_BEEP 2 LDA_UNAVAILABLE 1 HOLD 0 NONE",
.sigs = sigs_1042,
},
{
.name = "LEFT_LINE",
.address = 0x412,
.def_val = "3 ORANGE 2 DOUBLE 1 SOLID 0 NONE",
.sigs = sigs_1042,
},
{
.name = "BARRIERS",
.address = 0x412,
.def_val = "3 BOTH 2 RIGHT 1 LEFT 0 NONE",
.sigs = sigs_1042,
},
{
.name = "RIGHT_LINE",
.address = 0x412,
.def_val = "3 ORANGE 2 DOUBLE 1 SOLID 0 NONE",
.sigs = sigs_1042,
},
{
.name = "UNITS",
.address = 0x611,
.def_val = "1 KM 2 MILES",
.sigs = sigs_1553,
},
{
.name = "TURN_SIGNALS",
.address = 0x614,
.def_val = "3 NONE 2 RIGHT 1 LEFT",
.sigs = sigs_1556,
},
};
}
const DBC toyota_prius_2010_pt = {
.name = "toyota_prius_2010_pt",
.num_msgs = ARRAYSIZE(msgs),
.msgs = msgs,
.vals = vals,
.num_vals = ARRAYSIZE(vals),
};
dbc_init(toyota_prius_2010_pt)
| 19.889169
| 83
| 0.461964
|
ziggysnorkel
|
4065f9f510ff5bbb5952a42f437f1e1cb3ed9ada
| 1,938
|
cpp
|
C++
|
src/dropbox/sharing/SharingAclUpdatePolicy.cpp
|
slashdotted/dropboxQt
|
63d43fa882cec8fb980a2aab2464a2d7260b8089
|
[
"MIT"
] | 17
|
2016-12-03T09:12:29.000Z
|
2020-06-20T22:08:44.000Z
|
src/dropbox/sharing/SharingAclUpdatePolicy.cpp
|
slashdotted/dropboxQt
|
63d43fa882cec8fb980a2aab2464a2d7260b8089
|
[
"MIT"
] | 8
|
2017-01-05T17:50:16.000Z
|
2021-08-06T18:56:29.000Z
|
src/dropbox/sharing/SharingAclUpdatePolicy.cpp
|
slashdotted/dropboxQt
|
63d43fa882cec8fb980a2aab2464a2d7260b8089
|
[
"MIT"
] | 8
|
2017-09-13T17:28:40.000Z
|
2020-07-27T00:41:44.000Z
|
/**********************************************************
DO NOT EDIT
This file was generated from stone specification "sharing"
Part of "Ardi - the organizer" project.
osoft4ardi@gmail.com
www.prokarpaty.net
***********************************************************/
#include "dropbox/sharing/SharingAclUpdatePolicy.h"
namespace dropboxQt{
namespace sharing{
///AclUpdatePolicy
AclUpdatePolicy::operator QJsonObject()const{
QJsonObject js;
this->toJson(js, "");
return js;
}
void AclUpdatePolicy::toJson(QJsonObject& js, QString name)const{
switch(m_tag){
case AclUpdatePolicy_OWNER:{
if(!name.isEmpty())
js[name] = QString("owner");
}break;
case AclUpdatePolicy_EDITORS:{
if(!name.isEmpty())
js[name] = QString("editors");
}break;
case AclUpdatePolicy_OTHER:{
if(!name.isEmpty())
js[name] = QString("other");
}break;
}//switch
}
void AclUpdatePolicy::fromJson(const QJsonObject& js){
QString s = js[".tag"].toString();
if(s.compare("owner") == 0){
m_tag = AclUpdatePolicy_OWNER;
}
else if(s.compare("editors") == 0){
m_tag = AclUpdatePolicy_EDITORS;
}
else if(s.compare("other") == 0){
m_tag = AclUpdatePolicy_OTHER;
}
}
QString AclUpdatePolicy::toString(bool multiline)const
{
QJsonObject js;
toJson(js, "AclUpdatePolicy");
QJsonDocument doc(js);
QString s(doc.toJson(multiline ? QJsonDocument::Indented : QJsonDocument::Compact));
return s;
}
std::unique_ptr<AclUpdatePolicy> AclUpdatePolicy::factory::create(const QByteArray& data)
{
QJsonDocument doc = QJsonDocument::fromJson(data);
QJsonObject js = doc.object();
std::unique_ptr<AclUpdatePolicy> rv = std::unique_ptr<AclUpdatePolicy>(new AclUpdatePolicy);
rv->fromJson(js);
return rv;
}
}//sharing
}//dropboxQt
| 24.846154
| 96
| 0.605779
|
slashdotted
|
406bab3d3a7444fed20e33b4f4cb0bb410f999ae
| 923
|
cpp
|
C++
|
test/unit/math/prim/scal/meta/scalar_seq_view_test.cpp
|
PhilClemson/math
|
fffe604a7ead4525be2551eb81578c5f351e5c87
|
[
"BSD-3-Clause"
] | 1
|
2019-09-06T15:53:17.000Z
|
2019-09-06T15:53:17.000Z
|
test/unit/math/prim/scal/meta/scalar_seq_view_test.cpp
|
PhilClemson/math
|
fffe604a7ead4525be2551eb81578c5f351e5c87
|
[
"BSD-3-Clause"
] | 8
|
2019-01-17T18:51:16.000Z
|
2019-01-17T18:51:39.000Z
|
archive/math/test/unit/math/prim/scal/meta/scalar_seq_view_test.cpp
|
alashworth/stan-monorepo
|
75596bc1f860ededd7b3e9ae9002aea97ee1cd46
|
[
"BSD-3-Clause"
] | null | null | null |
#include <stan/math/prim/scal.hpp>
#include <gtest/gtest.h>
#include <vector>
TEST(MetaTraits, ScalarSeqViewDouble) {
using stan::scalar_seq_view;
double d = 10;
scalar_seq_view<double> sv(d);
EXPECT_FLOAT_EQ(d, sv[0]);
EXPECT_FLOAT_EQ(d, sv[12]);
const double d_const = 10;
scalar_seq_view<const double> sv_const(d_const);
EXPECT_FLOAT_EQ(d_const, sv_const[0]);
EXPECT_FLOAT_EQ(d_const, sv_const[12]);
const double& d_const_ref = 10;
scalar_seq_view<const double&> sv_const_ref(d_const);
EXPECT_FLOAT_EQ(d_const_ref, sv_const_ref[0]);
EXPECT_FLOAT_EQ(d_const_ref, sv_const_ref[12]);
EXPECT_EQ(1, sv.size());
double* d_point;
d_point = static_cast<double*>(malloc(sizeof(double) * 2));
d_point[0] = 69.0;
d_point[1] = 420.0;
scalar_seq_view<decltype(d_point)> d_point_v(d_point);
EXPECT_FLOAT_EQ(69.0, d_point_v[0]);
EXPECT_FLOAT_EQ(420.0, d_point_v[1]);
free(d_point);
}
| 26.371429
| 61
| 0.722644
|
PhilClemson
|
406cd461b7e7b316544d849aa2ae1d3a30cc688d
| 580
|
cpp
|
C++
|
Core/src/latest/entry/main.cpp
|
CJBuchel/CJ-Vision
|
60fad66b807c6082fdcf01df9972b42dfc5c5ecc
|
[
"MIT"
] | 1
|
2020-09-07T09:15:15.000Z
|
2020-09-07T09:15:15.000Z
|
Core/src/latest/entry/main.cpp
|
CJBuchel/CJ-Vision
|
60fad66b807c6082fdcf01df9972b42dfc5c5ecc
|
[
"MIT"
] | null | null | null |
Core/src/latest/entry/main.cpp
|
CJBuchel/CJ-Vision
|
60fad66b807c6082fdcf01df9972b42dfc5c5ecc
|
[
"MIT"
] | 1
|
2020-09-02T02:02:11.000Z
|
2020-09-02T02:02:11.000Z
|
#include "CJ_Vision.h"
extern CJ::Application *CJ::createApplication();
int main(int argc, char **argv) {
std::cout << "Test" << std::endl;
/**
* @TODO:
* Create startup procedures + loggers and handlers
*/
CJ::Log::init("[CJ-Vision Client Startup]");
/**
* Create Application, supports only one
*/
auto app = CJ::createApplication();
CJ::Log::setClientName("[Runtime - " + app->getName() + "]");
/**
* Super loop runner
*/
app->run();
CJ::Log::setClientName("[Killtime - " + app->getName() + "]");
/**
* App cleanup
*/
delete app;
return 0;
}
| 18.125
| 63
| 0.596552
|
CJBuchel
|
406dd3dafc850c3200b3fae6450422b7a48b9522
| 3,987
|
cc
|
C++
|
src/Modules/Legacy/Converters/ConvertBundleToField.cc
|
Haydelj/SCIRun
|
f7ee04d85349b946224dbff183438663e54b9413
|
[
"MIT"
] | 92
|
2015-02-09T22:42:11.000Z
|
2022-03-25T09:14:50.000Z
|
src/Modules/Legacy/Converters/ConvertBundleToField.cc
|
Haydelj/SCIRun
|
f7ee04d85349b946224dbff183438663e54b9413
|
[
"MIT"
] | 1,618
|
2015-01-05T19:39:13.000Z
|
2022-03-27T20:28:45.000Z
|
src/Modules/Legacy/Converters/ConvertBundleToField.cc
|
Haydelj/SCIRun
|
f7ee04d85349b946224dbff183438663e54b9413
|
[
"MIT"
] | 64
|
2015-02-20T17:51:23.000Z
|
2021-11-19T07:08:08.000Z
|
/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2020 Scientific Computing and Imaging Institute,
University of Utah.
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.
*/
// File: ConvertBundleToField.cc
// Author: Fangxiang Jiao
// Date: March 25 2010
#include <Core/Datatypes/Bundle.h>
#include <Core/Datatypes/Field.h>
#include <Core/Datatypes/FieldInformation.h>
#include <Core/Algorithms/Converter/ConvertBundleToField.h>
#include <Core/Algorithms/Fields/ConvertMeshType/ConvertMeshToPointCloudMesh.h>
#include <Dataflow/Network/Module.h>
#include <Dataflow/Network/Ports/BundlePort.h>
#include <Dataflow/Network/Ports/FieldPort.h>
using namespace SCIRun;
class ConvertBundleToField : public Module {
public:
ConvertBundleToField(GuiContext*);
virtual ~ConvertBundleToField() {}
virtual void execute();
private:
GuiInt guiclear_;
GuiDouble guitolerance_;
GuiInt guimergenodes_;
GuiInt guiforcepointcloud_;
GuiInt guimatchval_;
GuiInt guimeshonly_;
SCIRunAlgo::ConvertBundleToFieldAlgo algo_;
SCIRunAlgo::ConvertMeshToPointCloudMeshAlgo calgo_;
};
DECLARE_MAKER(ConvertBundleToField)
ConvertBundleToField::ConvertBundleToField(GuiContext* ctx)
: Module("ConvertBundleToField", ctx, Source, "Converters", "SCIRun"),
guiclear_(get_ctx()->subVar("clear", false), 0),
guitolerance_(get_ctx()->subVar("tolerance"), 0.0001),
guimergenodes_(get_ctx()->subVar("force-nodemerge"), 1),
guiforcepointcloud_(get_ctx()->subVar("force-pointcloud"), 0),
guimatchval_(get_ctx()->subVar("matchval"), 0),
guimeshonly_(get_ctx()->subVar("meshonly"), 0)
{
algo_.set_progress_reporter(this);
calgo_.set_progress_reporter(this);
}
void ConvertBundleToField::execute()
{
// Define input handle:
BundleHandle handle;
// Get data from input port:
if (!(get_input_handle("bundle", handle, true)))
{
return;
}
if (inputs_changed_ || !oport_cached("Output") )
{
update_state(Executing);
// Some stuff for old power apps
if (guiclear_.get())
{
guiclear_.set(0);
// Sending 0 does not clear caches.
FieldInformation fi("PointCloudMesh", 0, "double");
FieldHandle fhandle = CreateField(fi);
send_output_handle("Output", fhandle);
return;
}
FieldHandle output;
algo_.set_scalar("tolerance", guitolerance_.get());
algo_.set_bool("merge_nodes", guimergenodes_.get());
algo_.set_bool("match_node_values", guimatchval_.get());
algo_.set_bool("make_no_data", guimeshonly_.get());
if (! ( algo_.run(handle, output) ))
return;
// This option is here to be compatible with the old GatherFields module:
// This is a separate algorithm now
if (guiforcepointcloud_.get())
{
if(! ( calgo_.run(output, output) ))
return;
}
// send new output if there is any:
send_output_handle("Output", output);
}
}
| 30.906977
| 79
| 0.722097
|
Haydelj
|
40725f5f3de94a17cf68ecfde61e0b369377a5b7
| 3,807
|
cpp
|
C++
|
Reflection/Utilities/DefaultRegistration.cpp
|
dnv-opensource/Reflection
|
27effb850e9f0cc6acc2d48630ee6aa5d75fa000
|
[
"BSL-1.0"
] | null | null | null |
Reflection/Utilities/DefaultRegistration.cpp
|
dnv-opensource/Reflection
|
27effb850e9f0cc6acc2d48630ee6aa5d75fa000
|
[
"BSL-1.0"
] | null | null | null |
Reflection/Utilities/DefaultRegistration.cpp
|
dnv-opensource/Reflection
|
27effb850e9f0cc6acc2d48630ee6aa5d75fa000
|
[
"BSL-1.0"
] | null | null | null |
// Copyright (c) 2021 DNV AS
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include "DefaultRegistration.h"
#include "Reflection/Classes/Class.h"
#include <sstream>
#include <float.h>
#include "Reflection/TypeLibraries/TypeNotCaseSensitive.h"
#include "Reflection/TypeLibraries/TypeWithGlobalMemberRegistration.h"
#include "Reflection/TypeLibraries/Type.h"
#include "Reflection/Attributes/ParserAttribute.h"
#include "Formatting/ToString.h"
#include "ConstructibleItem.h"
#include "MemberItem.h"
#include "boost\lexical_cast.hpp"
#include "boost\optional.hpp"
namespace DNVS {namespace MoFa {namespace Reflection {namespace Utilities {
template<typename T>
struct FundamentalParser {
public:
boost::optional<T> operator()(const std::string& text, const Formatting::FormattingService& service) const
{
return boost::lexical_cast<T>(text);
}
};
template<>
struct FundamentalParser<double> {
public:
boost::optional<double> operator()(const std::string& text, const Formatting::FormattingService& service) const
{
if (text == "NaN")
{
return std::numeric_limits<double>::quiet_NaN();
}
else if (text == "+Infinity")
{
return std::numeric_limits<double>::infinity();
}
else if (text == "-Infinity")
{
return -std::numeric_limits<double>::infinity();
}
else {
return boost::lexical_cast<double>(text);
}
}
};
template<>
struct FundamentalParser<bool> {
public:
boost::optional<bool> operator()(const std::string& text, const Formatting::FormattingService& service) const
{
if (text == "true")
return true;
else
return false;
}
};
template<typename T>
void ReflectFundamental(TypeLibraries::TypeLibraryPointer typeLibrary)
{
using namespace Classes;
Class<T> cls(typeLibrary, "");
cls.AddAttribute<ParserAttribute>(FundamentalParser<T>());
cls.Operator(This.Const == This.Const);
cls.Operator(This.Const != This.Const);
cls.Operator(This.Const < This.Const);
cls.Operator(This.Const > This.Const);
cls.Operator(This.Const <= This.Const);
cls.Operator(This.Const >= This.Const);
RegisterToStringFunction(cls);
}
void DefaultRegistration::Reflect(TypeLibraries::TypeLibraryPointer typeLibrary)
{
ReflectFundamental<unsigned char>(typeLibrary);
ReflectFundamental<signed char>(typeLibrary);
ReflectFundamental<unsigned short>(typeLibrary);
ReflectFundamental<signed short>(typeLibrary);
ReflectFundamental<unsigned int>(typeLibrary);
ReflectFundamental<signed int>(typeLibrary);
ReflectFundamental<unsigned long>(typeLibrary);
ReflectFundamental<signed long>(typeLibrary);
ReflectFundamental<unsigned __int64>(typeLibrary);
ReflectFundamental<signed __int64>(typeLibrary);
ReflectFundamental<char>(typeLibrary);
ReflectFundamental<bool>(typeLibrary);
ReflectFundamental<float>(typeLibrary);
ReflectFundamental<double>(typeLibrary);
Reflection::Reflect<TypeLibraries::Type>(typeLibrary);
Reflection::Reflect<TypeLibraries::TypeWithGlobalMemberRegistration>(typeLibrary);
Reflection::Reflect<TypeLibraries::TypeNotCaseSensitive>(typeLibrary);
Reflection::Reflect<ConstructibleItem>(typeLibrary);
Reflection::Reflect<MemberItem>(typeLibrary);
}
}}}}
| 35.25
| 119
| 0.653533
|
dnv-opensource
|
4072b0d7454a535a65f813f01c31f2bc1c6a4ffa
| 3,734
|
cpp
|
C++
|
src/conv/step/g-step/Shape_Representation.cpp
|
behollis/brlcad-svn-rev65072-gsoc2015
|
c2e49d80e0776ea6da4358a345a04f56e0088b90
|
[
"BSD-4-Clause",
"BSD-3-Clause"
] | 35
|
2015-03-11T11:51:48.000Z
|
2021-07-25T16:04:49.000Z
|
src/conv/step/g-step/Shape_Representation.cpp
|
CloudComputer/brlcad
|
05952aafa27ee9df17cd900f5d8f8217ed2194af
|
[
"BSD-4-Clause",
"BSD-3-Clause"
] | null | null | null |
src/conv/step/g-step/Shape_Representation.cpp
|
CloudComputer/brlcad
|
05952aafa27ee9df17cd900f5d8f8217ed2194af
|
[
"BSD-4-Clause",
"BSD-3-Clause"
] | 19
|
2016-05-04T08:39:37.000Z
|
2021-12-07T12:45:54.000Z
|
/* S H A P E _ R E P R E S E N T A T I O N . C P P
* BRL-CAD
*
* Copyright (c) 2013-2014 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** @file Shape_Representation.cpp
*
*/
#include "AP_Common.h"
#include "Shape_Representation.h"
SdaiRepresentation *
Add_Shape_Representation(AP203_Contents *sc, SdaiRepresentation_context *context)
{
SdaiShape_representation *shape_rep = (SdaiShape_representation *)sc->registry->ObjCreate("SHAPE_REPRESENTATION");
sc->instance_list->Append((STEPentity *)shape_rep, completeSE);
shape_rep->name_("''");
shape_rep->context_of_items_(context);
EntityAggregate *axis_items = shape_rep->items_();
/* create an axis */
SdaiAxis2_placement_3d *axis3d = (SdaiAxis2_placement_3d *)sc->registry->ObjCreate("AXIS2_PLACEMENT_3D");
sc->instance_list->Append((STEPentity *)axis3d, completeSE);
axis3d->name_("''");
/* set the axis origin */
SdaiCartesian_point *origin= (SdaiCartesian_point *)sc->registry->ObjCreate("CARTESIAN_POINT");
sc->instance_list->Append((STEPentity *)origin, completeSE);
RealNode *xnode = new RealNode();
xnode->value = 0.0;
RealNode *ynode= new RealNode();
ynode->value = 0.0;
RealNode *znode= new RealNode();
znode->value = 0.0;
origin->coordinates_()->AddNode(xnode);
origin->coordinates_()->AddNode(ynode);
origin->coordinates_()->AddNode(znode);
origin->name_("''");
axis3d->location_(origin);
/* set the axis up direction (i-vector) */
SdaiDirection *axis = (SdaiDirection *)sc->registry->ObjCreate("DIRECTION");
sc->instance_list->Append((STEPentity *)axis, completeSE);
RealNode *axis_xnode = new RealNode();
axis_xnode->value = 0.0;
RealNode *axis_ynode= new RealNode();
axis_ynode->value = 0.0;
RealNode *axis_znode= new RealNode();
axis_znode->value = 1.0;
axis->direction_ratios_()->AddNode(axis_xnode);
axis->direction_ratios_()->AddNode(axis_ynode);
axis->direction_ratios_()->AddNode(axis_znode);
axis->name_("''");
axis3d->axis_(axis);
/* add the axis front direction (j-vector) */
SdaiDirection *ref_dir = (SdaiDirection *)sc->registry->ObjCreate("DIRECTION");
sc->instance_list->Append((STEPentity *)ref_dir, completeSE);
RealNode *ref_dir_xnode = new RealNode();
ref_dir_xnode->value = 1.0;
RealNode *ref_dir_ynode= new RealNode();
ref_dir_ynode->value = 0.0;
RealNode *ref_dir_znode= new RealNode();
ref_dir_znode->value = 0.0;
ref_dir->direction_ratios_()->AddNode(ref_dir_xnode);
ref_dir->direction_ratios_()->AddNode(ref_dir_ynode);
ref_dir->direction_ratios_()->AddNode(ref_dir_znode);
ref_dir->name_("''");
axis3d->ref_direction_(ref_dir);
/* add the axis to the shape definition */
axis_items->AddNode(new EntityNode((SDAI_Application_instance *)axis3d));
return (SdaiRepresentation *)shape_rep;
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8
| 33.945455
| 118
| 0.696036
|
behollis
|
40745804ff968472e9dfd25ce7167fe36acc6855
| 52
|
hpp
|
C++
|
src/boost_function_types_parameter_types.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 10
|
2018-03-17T00:58:42.000Z
|
2021-07-06T02:48:49.000Z
|
src/boost_function_types_parameter_types.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 2
|
2021-03-26T15:17:35.000Z
|
2021-05-20T23:55:08.000Z
|
src/boost_function_types_parameter_types.hpp
|
miathedev/BoostForArduino
|
919621dcd0c157094bed4df752b583ba6ea6409e
|
[
"BSL-1.0"
] | 4
|
2019-05-28T21:06:37.000Z
|
2021-07-06T03:06:52.000Z
|
#include <boost/function_types/parameter_types.hpp>
| 26
| 51
| 0.846154
|
miathedev
|
40796cedda6f3533ccca96115cfe18a10f5d1b02
| 153
|
cpp
|
C++
|
lib/src/block.cpp
|
caseymcc/client
|
0db6e9b6a66828d2c6faf8ce9db173f541221f70
|
[
"MIT"
] | 1
|
2021-06-08T14:56:47.000Z
|
2021-06-08T14:56:47.000Z
|
lib/src/block.cpp
|
caseymcc/client
|
0db6e9b6a66828d2c6faf8ce9db173f541221f70
|
[
"MIT"
] | null | null | null |
lib/src/block.cpp
|
caseymcc/client
|
0db6e9b6a66828d2c6faf8ce9db173f541221f70
|
[
"MIT"
] | null | null | null |
#include "block.h"
namespace konstructs {
Block::Block(const Vector3i position, const BlockData data):
position(position), data(data) {}
};
| 21.857143
| 64
| 0.686275
|
caseymcc
|
40798ac56ef00f3eea109ba54670750e4318300a
| 127
|
hpp
|
C++
|
NWNXLib/API/Mac/API/unknown_std__vectorTemplatedvoidPtrstd__allocatorTemplatedvoidPtr.hpp
|
Qowyn/unified
|
149d0b7670a9d156e64555fe0bd7715423db4c2a
|
[
"MIT"
] | null | null | null |
NWNXLib/API/Mac/API/unknown_std__vectorTemplatedvoidPtrstd__allocatorTemplatedvoidPtr.hpp
|
Qowyn/unified
|
149d0b7670a9d156e64555fe0bd7715423db4c2a
|
[
"MIT"
] | null | null | null |
NWNXLib/API/Mac/API/unknown_std__vectorTemplatedvoidPtrstd__allocatorTemplatedvoidPtr.hpp
|
Qowyn/unified
|
149d0b7670a9d156e64555fe0bd7715423db4c2a
|
[
"MIT"
] | null | null | null |
#pragma once
namespace NWNXLib {
namespace API {
class std__vectorTemplatedvoidPtrstd__allocatorTemplatedvoidPtr { };
}
}
| 10.583333
| 68
| 0.787402
|
Qowyn
|
407b3d4bdc100f16c790cc3ac0e301cc9b728f0e
| 2,484
|
cpp
|
C++
|
tianhe/schedule_restricts_test.cpp
|
VastRock-Huang/GraphPi
|
a780bd73743c8535b1e36da210558b0dc81ff0d4
|
[
"MIT"
] | 22
|
2020-10-07T06:53:49.000Z
|
2022-03-18T14:00:55.000Z
|
tianhe/schedule_restricts_test.cpp
|
VastRock-Huang/GraphPi
|
a780bd73743c8535b1e36da210558b0dc81ff0d4
|
[
"MIT"
] | null | null | null |
tianhe/schedule_restricts_test.cpp
|
VastRock-Huang/GraphPi
|
a780bd73743c8535b1e36da210558b0dc81ff0d4
|
[
"MIT"
] | 5
|
2020-11-19T20:53:28.000Z
|
2021-11-28T17:42:29.000Z
|
#include <../include/graph.h>
#include <../include/dataloader.h>
#include "../include/pattern.h"
#include "../include/schedule.h"
#include "../include/common.h"
#include "../include/motif_generator.h"
#include <assert.h>
#include <iostream>
#include <string>
#include <algorithm>
void test_pattern(Graph* g, const Pattern &pattern, int performance_modeling_type, int restricts_type, bool use_in_exclusion_optimize = false) {
long long tri_cnt = 7515023;
int thread_num = 24;
double t1,t2;
bool is_pattern_valid;
Schedule schedule(pattern, is_pattern_valid, performance_modeling_type, restricts_type, use_in_exclusion_optimize, g->v_cnt, g->e_cnt, tri_cnt);
assert(is_pattern_valid);
if(schedule.get_multiplicity() == 1) return;
t1 = get_wall_time();
long long ans = g->pattern_matching(schedule, thread_num);
t2 = get_wall_time();
printf("ans %lld,%.6lf\n", ans, t2 - t1);
schedule.print_schedule();
const auto& pairs = schedule.restrict_pair;
printf("%d ",pairs.size());
for(auto& p : pairs)
printf("(%d,%d)",p.first,p.second);
puts("");
fflush(stdout);
}
int main(int argc,char *argv[]) {
Graph *g;
DataLoader D;
std::string type = "Patents";
std::string path = "/home/zms/patents_input";
DataType my_type;
if(type == "Patents") my_type = DataType::Patents;
else {
printf("invalid DataType!\n");
}
assert(D.load_data(g,my_type,path.c_str())==true);
printf("Load data success!\n");
fflush(stdout);
Pattern p(atoi(argv[1]), argv[2]);
test_pattern(g, p, 1, 1, true);
test_pattern(g, p, 1, 1);
test_pattern(g, p, 1, 2);
test_pattern(g, p, 2, 1);
test_pattern(g, p, 2, 2);
/*
int rank = atoi(argv[1]);
for(int size = 3; size < 7; ++size) {
MotifGenerator mg(size);
std::vector<Pattern> patterns = mg.generate();
int len = patterns.size();
for(int i = rank; i < patterns.size(); i += 20) {
Pattern& p = patterns[i];
test_pattern(g, p, 1, 1);
test_pattern(g, p, 1, 2);
test_pattern(g, p, 2, 1);
test_pattern(g, p, 2, 2);
}
}
*/
/*
Pattern p(6);
p.add_edge(0, 1);
p.add_edge(0, 2);
p.add_edge(0, 3);
p.add_edge(1, 4);
p.add_edge(1, 5);
test_pattern(g, p, 1, 1);
test_pattern(g, p, 1, 2);
test_pattern(g, p, 2, 1);
test_pattern(g, p, 2, 2);
*/
delete g;
}
| 26.709677
| 148
| 0.596216
|
VastRock-Huang
|
408238d04fe8683e3500c9fc1001102d086fec87
| 1,966
|
cpp
|
C++
|
Tests/UnitTests/DFNs/FeaturesDescription2D/OrbDescriptor.cpp
|
H2020-InFuse/cdff
|
e55fd48f9a909d0c274c3dfa4fe2704bc5071542
|
[
"BSD-2-Clause"
] | 7
|
2019-02-26T15:09:50.000Z
|
2021-09-30T07:39:01.000Z
|
Tests/UnitTests/DFNs/FeaturesDescription2D/OrbDescriptor.cpp
|
H2020-InFuse/cdff
|
e55fd48f9a909d0c274c3dfa4fe2704bc5071542
|
[
"BSD-2-Clause"
] | null | null | null |
Tests/UnitTests/DFNs/FeaturesDescription2D/OrbDescriptor.cpp
|
H2020-InFuse/cdff
|
e55fd48f9a909d0c274c3dfa4fe2704bc5071542
|
[
"BSD-2-Clause"
] | 1
|
2020-12-06T12:09:05.000Z
|
2020-12-06T12:09:05.000Z
|
/* --------------------------------------------------------------------------
*
* (C) Copyright …
*
* ---------------------------------------------------------------------------
*/
/*!
* @file OrbDescriptor.cpp
* @date 21/02/2018
* @author Alessandro Bianco
*/
/*!
* @addtogroup DFNsTest
*
* Testing application for the DFN OrbDescriptor.
*
*
* @{
*/
/* --------------------------------------------------------------------------
*
* Includes
*
* --------------------------------------------------------------------------
*/
#include <catch.hpp>
#include <FeaturesDescription2D/OrbDescriptor.hpp>
#include <Converters/MatToFrameConverter.hpp>
using namespace CDFF::DFN::FeaturesDescription2D;
using namespace Converters;
using namespace FrameWrapper;
using namespace VisualPointFeatureVector2DWrapper;
/* --------------------------------------------------------------------------
*
* Test Cases
*
* --------------------------------------------------------------------------
*/
TEST_CASE( "Call to process (ORB descriptor)", "[process]" )
{
// Prepare input data
cv::Mat inputImage(500, 500, CV_8UC3, cv::Scalar(100, 100, 100));
FrameConstPtr inputFrame = MatToFrameConverter().Convert(inputImage);
VisualPointFeatureVector2DConstPtr inputFeatures = NewVisualPointFeatureVector2D();
// Instantiate DFN
OrbDescriptor* orb = new OrbDescriptor;
// Send input data to DFN
orb->frameInput(*inputFrame);
orb->featuresInput(*inputFeatures);
// Run DFN
orb->process();
// Query output data from DFN
const VisualPointFeatureVector2D& output = orb->featuresOutput();
// Cleanup
delete inputFeatures;
delete orb;
}
TEST_CASE( "Call to configure (ORB descriptor)", "[configure]" )
{
// Instantiate DFN
OrbDescriptor* orb = new OrbDescriptor;
// Setup DFN
orb->setConfigurationFile("../tests/ConfigurationFiles/DFNs/FeaturesDescription2D/OrbDescriptor_Conf1.yaml");
orb->configure();
// Cleanup
delete orb;
}
/** @} */
| 23.686747
| 110
| 0.54883
|
H2020-InFuse
|
4085eccdaf120d1a66b2af366ba4b999347f78c8
| 124
|
hxx
|
C++
|
src/Providers/UNIXProviders/CompositeExtent/UNIX_CompositeExtent_ZOS.hxx
|
brunolauze/openpegasus-providers-old
|
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
|
[
"MIT"
] | 1
|
2020-10-12T09:00:09.000Z
|
2020-10-12T09:00:09.000Z
|
src/Providers/UNIXProviders/CompositeExtent/UNIX_CompositeExtent_ZOS.hxx
|
brunolauze/openpegasus-providers-old
|
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
|
[
"MIT"
] | null | null | null |
src/Providers/UNIXProviders/CompositeExtent/UNIX_CompositeExtent_ZOS.hxx
|
brunolauze/openpegasus-providers-old
|
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
|
[
"MIT"
] | null | null | null |
#ifdef PEGASUS_OS_ZOS
#ifndef __UNIX_COMPOSITEEXTENT_PRIVATE_H
#define __UNIX_COMPOSITEEXTENT_PRIVATE_H
#endif
#endif
| 10.333333
| 40
| 0.846774
|
brunolauze
|
408878463094c8bea9d4f8db70ba10373a2e7de6
| 12,839
|
cxx
|
C++
|
STEER/ESD/AliESDVZERO.cxx
|
AllaMaevskaya/AliRoot
|
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
|
[
"BSD-3-Clause"
] | 52
|
2016-12-11T13:04:01.000Z
|
2022-03-11T11:49:35.000Z
|
STEER/ESD/AliESDVZERO.cxx
|
AllaMaevskaya/AliRoot
|
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
|
[
"BSD-3-Clause"
] | 1,388
|
2016-11-01T10:27:36.000Z
|
2022-03-30T15:26:09.000Z
|
STEER/ESD/AliESDVZERO.cxx
|
AllaMaevskaya/AliRoot
|
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
|
[
"BSD-3-Clause"
] | 275
|
2016-06-21T20:24:05.000Z
|
2022-03-31T13:06:19.000Z
|
/**************************************************************************
* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
//-------------------------------------------------------------------------
// Container class for ESD VZERO data
// Author: Brigitte Cheynis & Cvetan Cheshkov
//-------------------------------------------------------------------------
#include "AliESDVZERO.h"
#include "AliLog.h"
ClassImp(AliESDVZERO)
//__________________________________________________________________________
AliESDVZERO::AliESDVZERO()
:AliVVZERO(),
fBBtriggerV0A(0),
fBGtriggerV0A(0),
fBBtriggerV0C(0),
fBGtriggerV0C(0),
fV0ATime(-1024),
fV0CTime(-1024),
fV0ATimeError(0),
fV0CTimeError(0),
fV0ADecision(kV0Invalid),
fV0CDecision(kV0Invalid),
fTriggerChargeA(0),
fTriggerChargeC(0),
fTriggerBits(0)
{
// Default constructor
for(Int_t j=0; j<64; j++){
fMultiplicity[j] = 0.0;
fAdc[j] = 0.0;
fTime[j] = 0.0;
fWidth[j] = 0.0;
fBBFlag[j]= kFALSE;
fBGFlag[j]= kFALSE;
for(Int_t k = 0; k < 21; ++k) fIsBB[j][k] = fIsBG[j][k] = kFALSE;
}
}
//__________________________________________________________________________
AliESDVZERO::AliESDVZERO(const AliESDVZERO &o)
:AliVVZERO(o),
fBBtriggerV0A(o.fBBtriggerV0A),
fBGtriggerV0A(o.fBGtriggerV0A),
fBBtriggerV0C(o.fBBtriggerV0C),
fBGtriggerV0C(o.fBGtriggerV0C),
fV0ATime(o.fV0ATime),
fV0CTime(o.fV0CTime),
fV0ATimeError(o.fV0ATimeError),
fV0CTimeError(o.fV0CTimeError),
fV0ADecision(o.fV0ADecision),
fV0CDecision(o.fV0CDecision),
fTriggerChargeA(o.fTriggerChargeA),
fTriggerChargeC(o.fTriggerChargeC),
fTriggerBits(o.fTriggerBits)
{
// Default constructor
for(Int_t j=0; j<64; j++) {
fMultiplicity[j] = o.fMultiplicity[j];
fAdc[j] = o.fAdc[j];
fTime[j] = o.fTime[j];
fWidth[j] = o.fWidth[j];
fBBFlag[j] = o.fBBFlag[j];
fBGFlag[j] = o.fBGFlag[j];
for(Int_t k = 0; k < 21; ++k) {
fIsBB[j][k] = o.fIsBB[j][k];
fIsBG[j][k] = o.fIsBG[j][k];
}
}
}
//__________________________________________________________________________
AliESDVZERO::AliESDVZERO(UInt_t BBtriggerV0A, UInt_t BGtriggerV0A,
UInt_t BBtriggerV0C, UInt_t BGtriggerV0C,
Float_t *Multiplicity, Float_t *Adc,
Float_t *Time, Float_t *Width, Bool_t *BBFlag, Bool_t *BGFlag)
:AliVVZERO(),
fBBtriggerV0A(BBtriggerV0A),
fBGtriggerV0A(BGtriggerV0A),
fBBtriggerV0C(BBtriggerV0C),
fBGtriggerV0C(BGtriggerV0C),
fV0ATime(-1024),
fV0CTime(-1024),
fV0ATimeError(0),
fV0CTimeError(0),
fV0ADecision(kV0Invalid),
fV0CDecision(kV0Invalid),
fTriggerChargeA(0),
fTriggerChargeC(0),
fTriggerBits(0)
{
// Constructor
for(Int_t j=0; j<64; j++) {
fMultiplicity[j] = Multiplicity[j];
fAdc[j] = Adc[j];
fTime[j] = Time[j];
fWidth[j] = Width[j];
fBBFlag[j] = BBFlag[j];
fBGFlag[j] = BGFlag[j];
for(Int_t k = 0; k < 21; ++k) fIsBB[j][k] = fIsBG[j][k] = kFALSE;
}
}
//__________________________________________________________________________
AliESDVZERO& AliESDVZERO::operator=(const AliESDVZERO& o)
{
if(this==&o) return *this;
AliVVZERO::operator=(o);
// Assignment operator
fBBtriggerV0A=o.fBBtriggerV0A;
fBGtriggerV0A=o.fBGtriggerV0A;
fBBtriggerV0C=o.fBBtriggerV0C;
fBGtriggerV0C=o.fBGtriggerV0C;
fV0ATime = o.fV0ATime;
fV0CTime = o.fV0CTime;
fV0ATimeError = o.fV0ATimeError;
fV0CTimeError = o.fV0CTimeError;
fV0ADecision = o.fV0ADecision;
fV0CDecision = o.fV0CDecision;
fTriggerChargeA = o.fTriggerChargeA;
fTriggerChargeC = o.fTriggerChargeC;
fTriggerBits = o.fTriggerBits;
for(Int_t j=0; j<64; j++) {
fMultiplicity[j] = o.fMultiplicity[j];
fAdc[j] = o.fAdc[j];
fTime[j] = o.fTime[j];
fWidth[j] = o.fWidth[j];
fBBFlag[j] = o.fBBFlag[j];
fBGFlag[j] = o.fBGFlag[j];
for(Int_t k = 0; k < 21; ++k) {
fIsBB[j][k] = o.fIsBB[j][k];
fIsBG[j][k] = o.fIsBG[j][k];
}
}
return *this;
}
//______________________________________________________________________________
void AliESDVZERO::Copy(TObject &obj) const {
// this overwrites the virtual TOBject::Copy()
// to allow run time copying without casting
// in AliESDEvent
if(this==&obj)return;
AliESDVZERO *robj = dynamic_cast<AliESDVZERO*>(&obj);
if(!robj)return; // not an AliESDVZERO
*robj = *this;
}
//__________________________________________________________________________
Short_t AliESDVZERO::GetNbPMV0A() const
{
// Returns the number of
// fired PM in V0A
Short_t n=0;
for(Int_t i=32;i<64;i++)
if (fMultiplicity[i]>0) n++;
return n;
}
//__________________________________________________________________________
Short_t AliESDVZERO::GetNbPMV0C() const
{
// Returns the number of
// fired PM in V0C
Short_t n=0;
for(Int_t i=0;i<32;i++)
if (fMultiplicity[i]>0) n++;
return n;
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMTotV0A() const
{
// returns total multiplicity
// in V0A
Float_t mul=0.0;
for(Int_t i=32;i<64;i++)
mul+= fMultiplicity[i];
return mul;
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMTotV0C() const
{
// returns total multiplicity
// in V0C
Float_t mul=0.0;
for(Int_t i=0;i<32;i++)
mul+= fMultiplicity[i];
return mul;
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMRingV0A(Int_t ring) const
{
// returns multiplicity in a
// given ring of V0A
if (OutOfRange(ring, "AliESDVZERO:::GetMRingV0A",4)) return -1;
Float_t mul =0.0;
if (ring == 0) for(Int_t i=32;i<40;i++) mul += fMultiplicity[i];
if (ring == 1) for(Int_t i=40;i<48;i++) mul += fMultiplicity[i];
if (ring == 2) for(Int_t i=48;i<56;i++) mul += fMultiplicity[i];
if (ring == 3) for(Int_t i=56;i<64;i++) mul += fMultiplicity[i];
return mul ;
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMRingV0C(Int_t ring) const
{
// returns multiplicity in a
// given ring of V0C
if (OutOfRange(ring, "AliESDVZERO:::GetMRingV0C",4)) return -1;
Float_t mul =0.0;
if (ring == 0) for(Int_t i=0;i<8;i++) mul += fMultiplicity[i];
if (ring == 1) for(Int_t i=8;i<16;i++) mul += fMultiplicity[i];
if (ring == 2) for(Int_t i=16;i<24;i++) mul += fMultiplicity[i];
if (ring == 3) for(Int_t i=24;i<32;i++) mul += fMultiplicity[i];
return mul ;
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMultiplicity(Int_t i) const
{
// returns multiplicity in a
// given cell of V0
if (OutOfRange(i, "AliESDVZERO::GetMultiplicity:",64)) return -1;
return fMultiplicity[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMultiplicityV0A(Int_t i) const
{
// returns multiplicity in a
// given cell of V0A
if (OutOfRange(i, "AliESDVZERO::GetMultiplicityV0A:",32)) return -1;
return fMultiplicity[32+i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetMultiplicityV0C(Int_t i) const
{
// returns multiplicity in a
// given cell of V0C
if (OutOfRange(i, "AliESDVZERO::GetMultiplicityV0C:",32)) return -1;
return fMultiplicity[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetAdc(Int_t i) const
{
// returns ADC charge in a
// given cell of V0
if (OutOfRange(i, "AliESDVZERO::GetAdc:",64)) return -1;
return fAdc[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetAdcV0A(Int_t i) const
{
// returns ADC charge in a
// given cell of V0A
if (OutOfRange(i, "AliESDVZERO::GetAdcV0A:",32)) return -1;
return fAdc[32+i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetAdcV0C(Int_t i) const
{
// returns ADC charge in a
// given cell of V0C
if (OutOfRange(i, "AliESDVZERO::GetAdcV0C:",32)) return -1;
return fAdc[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetTime(Int_t i) const
{
// returns leading time measured by TDC
// in a given cell of V0
if (OutOfRange(i, "AliESDVZERO::GetTime:",64)) return -1;
return fTime[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetTimeV0A(Int_t i) const
{
// returns leading time measured by TDC
// in a given cell of V0A
if (OutOfRange(i, "AliESDVZERO::GetTimeV0A:",32)) return -1;
return fTime[32+i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetTimeV0C(Int_t i) const
{
// returns leading time measured by TDC
// in a given cell of V0C
if (OutOfRange(i, "AliESDVZERO::GetTimeV0C:",32)) return -1;
return fTime[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetWidth(Int_t i) const
{
// returns time signal width
// in a given cell of V0
if (OutOfRange(i, "AliESDVZERO::GetWidth:",64)) return -1;
return fWidth[i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetWidthV0A(Int_t i) const
{
// returns time signal width
// in a given cell of V0A
if (OutOfRange(i, "AliESDVZERO::GetWidthV0A:",32)) return -1;
return fWidth[32+i];
}
//__________________________________________________________________________
Float_t AliESDVZERO::GetWidthV0C(Int_t i) const
{
// returns time signal width
// in a given cell of V0C
if (OutOfRange(i, "AliESDVZERO::GetWidthV0C:",32)) return -1;
return fWidth[i];
}
//__________________________________________________________________________
Bool_t AliESDVZERO::BBTriggerV0A(Int_t i) const
{
// returns offline beam-beam flags in V0A
// one bit per cell
if (OutOfRange(i, "AliESDVZERO:::BBTriggerV0A",32)) return kFALSE;
UInt_t test = 1;
return ( fBBtriggerV0A & (test << i) ? kTRUE : kFALSE );
}
//__________________________________________________________________________
Bool_t AliESDVZERO::BGTriggerV0A(Int_t i) const
{
// returns offline beam-gas flags in V0A
// one bit per cell
if (OutOfRange(i, "AliESDVZERO:::BGTriggerV0A",32)) return kFALSE;
UInt_t test = 1;
return ( fBGtriggerV0A & (test << i) ? kTRUE : kFALSE );
}
//__________________________________________________________________________
Bool_t AliESDVZERO::BBTriggerV0C(Int_t i) const
{
// returns offline beam-beam flags in V0C
// one bit per cell
if (OutOfRange(i, "AliESDVZERO:::BBTriggerV0C",32)) return kFALSE;
UInt_t test = 1;
return ( fBBtriggerV0C & (test << i) ? kTRUE : kFALSE );
}
//__________________________________________________________________________
Bool_t AliESDVZERO::BGTriggerV0C(Int_t i) const
{
// returns offline beam-gasflags in V0C
// one bit per cell
if (OutOfRange(i, "AliESDVZERO:::BGTriggerV0C",32)) return kFALSE;
UInt_t test = 1;
return ( fBGtriggerV0C & (test << i) ? kTRUE : kFALSE );
}
//__________________________________________________________________________
Bool_t AliESDVZERO::GetBBFlag(Int_t i) const
{
// returns online beam-beam flag in V0
// one boolean per cell
if (OutOfRange(i, "AliESDVZERO::GetBBFlag:",64)) return kFALSE;
return fBBFlag[i];
}
//__________________________________________________________________________
Bool_t AliESDVZERO::GetBGFlag(Int_t i) const
{
// returns online beam-gas flag in V0
// one boolean per cell
if (OutOfRange(i, "AliESDVZERO::GetBGFlag:",64)) return kFALSE;
return fBGFlag[i];
}
| 30.352246
| 80
| 0.684789
|
AllaMaevskaya
|
40898156dac49bb300c78244296291376d978c1e
| 4,093
|
cpp
|
C++
|
raytracer/catch/arealights.cpp
|
tobiasmarciszko/qt_raytracer_challenge
|
188bf38211e30cb0655577a101c82f6ee8ae2ab8
|
[
"MIT"
] | 24
|
2019-06-29T07:44:24.000Z
|
2021-05-27T11:11:49.000Z
|
raytracer/catch/arealights.cpp
|
tobiasmarciszko/qt_raytracer_challenge
|
188bf38211e30cb0655577a101c82f6ee8ae2ab8
|
[
"MIT"
] | 1
|
2020-12-02T22:54:02.000Z
|
2021-01-29T08:47:32.000Z
|
raytracer/catch/arealights.cpp
|
tobiasmarciszko/qt_raytracer_challenge
|
188bf38211e30cb0655577a101c82f6ee8ae2ab8
|
[
"MIT"
] | 7
|
2020-01-29T15:01:19.000Z
|
2021-05-28T02:34:34.000Z
|
#include "catch.hpp"
#include "worlds.h"
#include "point.h"
#include "engine.h"
#include "equal.h"
using namespace Raytracer::Engine;
TEST_CASE("is_shadow tests for occlusion between two points")
{
const World w = Worlds::default_world();
const Point light_position{-10, -10, -10};
const std::vector<std::tuple<Point, bool>> data{
{Point{-10, -10, 10}, false},
{Point{10, 10, 10}, true},
{Point{-20, -20, -20}, false},
{Point{-5, -5, -5}, false}
};
for (const auto& [point, result]: data) {
const auto r = is_shadowed(w, light_position, point);
REQUIRE(r == result);
}
}
TEST_CASE("Point lights evaluate the light intensity at a given point")
{
const World w = Worlds::default_world();
const PointLight *light = dynamic_cast<PointLight *>(w.lights.front().get());
const std::vector<std::tuple<Point, float>> data{
{Point{0, 1.0001, 0}, 1.0},
{Point{-1.0001, 0, 0}, 1.0},
{Point{0, 0, -1.0001}, 1.0},
{Point{0, 0, 1.0001}, 0.0},
{Point{1.0001, 0, 0}, 0.0},
{Point{0, -1.0001, 0}, 0.0},
{Point{0, 0, 0}, 0.0}
};
for (const auto& [point, result]: data) {
const float intensity = intensity_at(*light, point, w);
REQUIRE(intensity == result);
}
}
TEST_CASE("lighting() uses light intensity to attenuate color")
{
World w = Worlds::default_world();
w.lights.front() = std::make_unique<PointLight>(PointLight(Point{0, 0, -10}, Color{1, 1, 1}));
w.shapes.front()->material.ambient = 0.1;
w.shapes.front()->material.diffuse = 0.9;
w.shapes.front()->material.specular = 0;
w.shapes.front()->material.color = Color{1, 1, 1};
const Point pt{0, 0, -1};
const Vector eyev{0, 0, -1};
const Vector normalv{0, 0, -1};
auto res = lighting(w.shapes.front()->material, w.shapes.front().get(), *w.lights.front().get(), pt, eyev, normalv, 1.0);
REQUIRE(res == Color{1.0, 1.0, 1.0});
res = lighting(w.shapes.front()->material, w.shapes.front().get(), *w.lights.front().get(), pt, eyev, normalv, 0.5);
REQUIRE(res == Color{0.55, 0.55, 0.55});
res = lighting(w.shapes.front()->material, w.shapes.front().get(), *w.lights.front().get(), pt, eyev, normalv, 0.0);
REQUIRE(res == Color{0.1, 0.1, 0.1});
}
TEST_CASE("Creating an area light")
{
const Point corner{0, 0, 0};
const Vector v1{2, 0, 0};
const Vector v2{0, 0, 1};
const AreaLight light = AreaLight(corner, v1, 4, v2, 2, Color{1, 1, 1});
REQUIRE(light.corner == corner);
REQUIRE(light.uvec == Vector{0.5, 0, 0});
REQUIRE(light.usteps == 4);
REQUIRE(light.vvec == Vector{0, 0, 0.5});
REQUIRE(light.vsteps == 2);
REQUIRE(light.samples == 8);
// REQUIRE(light.position == Point{1, 0, 0.5});
}
TEST_CASE("Finding a single point on an area light")
{
const Point corner{0, 0, 0};
const Vector v1{2, 0, 0};
const Vector v2{0, 0, 1};
const AreaLight light = AreaLight{corner, v1, 4, v2, 2, Color{1, 1, 1}};
const std::vector<std::tuple<float, float, Point>> data{
{0, 0, Point{0.25, 0, 0.25}},
{1, 0, Point{0.75, 0, 0.25}},
{0, 1, Point{0.25, 0, 0.75}},
{2, 0, Point{1.25, 0, 0.25}},
{3, 1, Point{1.75, 0, 0.75}}
};
for (const auto& [u, v, result]: data) {
const auto pt = point_on_light(light, u, v);
REQUIRE(pt == result);
}
}
TEST_CASE("The area light intensity function")
{
const World w = Worlds::default_world();
const Point corner{-0.5, -0.5, -5};
const Vector v1{1, 0, 0};
const Vector v2{0, 1, 0};
const AreaLight light = AreaLight{corner, v1, 2, v2, 2, Color{1, 1, 1}};
const std::vector<std::tuple<Point, float>> data{
{Point{0, 0, 2}, 0.0},
{Point{1, -1, 2}, 0.25},
{Point{1.5, 0, 2}, 0.5},
{Point{1.25, 1.25, 3}, 0.75},
{Point{0, 0, -2}, 1.0}
};
for (const auto& [point, result]: data) {
const auto intensity = intensity_at(light, point, w);
REQUIRE(equal(intensity, result));
}
}
| 30.544776
| 125
| 0.569753
|
tobiasmarciszko
|
408aa3a9ff4085098c60438365f02f64ef55bd27
| 657
|
cpp
|
C++
|
November/Homeworks/Homework 3/4/4/4.cpp
|
MrMirhan/Algorithm-Class-221-HomeWorks
|
3198fce11a0fd4ea10b576b418cec3a35ffcff2e
|
[
"MIT"
] | 1
|
2020-11-19T09:15:09.000Z
|
2020-11-19T09:15:09.000Z
|
November/Homeworks/Homework 3/4/4/4.cpp
|
MrMirhan/Algorithm-Class-221-HomeWorks
|
3198fce11a0fd4ea10b576b418cec3a35ffcff2e
|
[
"MIT"
] | null | null | null |
November/Homeworks/Homework 3/4/4/4.cpp
|
MrMirhan/Algorithm-Class-221-HomeWorks
|
3198fce11a0fd4ea10b576b418cec3a35ffcff2e
|
[
"MIT"
] | 2
|
2020-11-12T17:37:28.000Z
|
2020-11-21T14:48:49.000Z
|
#include <iostream>
using namespace std;
int main()
{
int arr[12] = { 4, 11, 16, -2, 65, -5, 12, 1, 123, 54, 10, 0 };
int size = sizeof(arr) / sizeof(arr[0]);
for (int i = 0; i < size; i++) {
int min = arr[i];
int minAll = i;
for (int n = i; n < size; n++) {
if (arr[n] < min) {
min = arr[n];
minAll = n;
}
}
int x = arr[minAll];
arr[minAll] = arr[i] ;
arr[i] = x;
}
for (int x = 0; x < size; x++) {
if(x == (size - 1)) {
cout << arr[x];
} else cout << arr[x] << ", ";
}
}
| 19.323529
| 67
| 0.360731
|
MrMirhan
|
408c1df277703a403d5ee121e71f990090a2642b
| 812
|
cc
|
C++
|
dictionary.cc
|
jkotlinski/htdk
|
e1a626fce61112c151e9a63cc176bc67a5a92a91
|
[
"MIT"
] | 2
|
2016-07-23T18:32:29.000Z
|
2017-10-24T06:33:37.000Z
|
dictionary.cc
|
jkotlinski/htdk
|
e1a626fce61112c151e9a63cc176bc67a5a92a91
|
[
"MIT"
] | null | null | null |
dictionary.cc
|
jkotlinski/htdk
|
e1a626fce61112c151e9a63cc176bc67a5a92a91
|
[
"MIT"
] | null | null | null |
#include "dictionary.h"
#include <cassert>
void Dictionary::addWord(const std::string& word) {
if (addedWords.find(word) != addedWords.end()) {
fprintf(stderr, "Redefining word '%s' is not allowed\n", word.c_str());
exit(1);
}
addedWords.insert(word);
auto missingIt = missingWords.find(word);
if (missingIt != missingWords.end()) {
missingWords.erase(missingIt);
}
}
void Dictionary::markAsUsed(const std::string& word) {
if (addedWords.find(word) == addedWords.end()) {
missingWords.insert(word);
}
}
const char* Dictionary::getMissingWord() const {
if (missingWords.empty()) {
return nullptr;
}
return missingWords.begin()->c_str();
}
void Dictionary::popMissingWord() {
missingWords.erase(missingWords.begin());
}
| 23.882353
| 79
| 0.641626
|
jkotlinski
|
408c893a4b5af700c9aa9386a9101d51db7bc1eb
| 8,019
|
cpp
|
C++
|
drowaudio-Utility/plugins/Gate/src/DRowAudioEditorComponent.cpp
|
34Audiovisual/Progetti_JUCE
|
d22d91d342939a8463823d7a7ec528bd2228e5f7
|
[
"MIT"
] | 92
|
2015-02-25T12:28:58.000Z
|
2022-02-15T17:24:24.000Z
|
drowaudio-Utility/plugins/Gate/src/DRowAudioEditorComponent.cpp
|
34Audiovisual/Progetti_JUCE
|
d22d91d342939a8463823d7a7ec528bd2228e5f7
|
[
"MIT"
] | 8
|
2015-05-03T18:36:49.000Z
|
2018-02-06T15:50:32.000Z
|
drowaudio-Utility/plugins/Gate/src/DRowAudioEditorComponent.cpp
|
34Audiovisual/Progetti_JUCE
|
d22d91d342939a8463823d7a7ec528bd2228e5f7
|
[
"MIT"
] | 34
|
2015-01-02T13:34:49.000Z
|
2021-05-23T20:37:49.000Z
|
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified 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.
JUCE 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 JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "DRowAudioEditorComponent.h"
//==============================================================================
DRowAudioEditorComponent::DRowAudioEditorComponent (DRowAudioFilter* const ownerFilter)
: AudioProcessorEditor (ownerFilter),
noButtons(3)
{
customLookAndFeel = new dRowLookAndFeel;
setLookAndFeel(customLookAndFeel);
// customLookAndFeel->setColour(Label::textColourId, (Colours::black).withBrightness(0.9f));
addAndMakeVisible( comboBox = new ComboBox(T("comboBox")) );
for (int i = 0; i < noParams; i++)
{
sliders.add( new Slider(String(T("param")) << String(i)) );
addAndMakeVisible( sliders[i]);
String labelName = ownerFilter->getParameterName(i);
(new Label(String(T("Label")) << String(i), labelName))->attachToComponent(sliders[i], true);
sliders[i]->addListener (this);
sliders[i]->setRange (ownerFilter->getParameterMin(i), ownerFilter->getParameterMax(i), ownerFilter->getParameterStep(i));
sliders[i]->setSkewFactor(ownerFilter->getParameterSkewFactor(i));
sliders[i]->setTextBoxStyle(Slider::TextBoxRight, false, 70, 20);
sliders[i]->setValue (ownerFilter->getScaledParameter(i), false);
ownerFilter->getParameterPointer(i)->setupSlider(*sliders[i]);
}
for ( int i = 0; i < noButtons; i++ )
{
buttons.add(new TextButton(String(T("Button ")) << String(i)));
addAndMakeVisible(buttons[i]);
}
buttons[0]->setButtonText(T("Monitor"));
buttons[0]->setClickingTogglesState(true);
buttons[0]->addButtonListener(this);
buttons[1]->setButtonText(T("Use RMS"));
buttons[1]->setClickingTogglesState(true);
buttons[1]->addButtonListener(this);
buttons[2]->setButtonText(parameterNames[FILTER]);
buttons[2]->setClickingTogglesState(true);
buttons[2]->addButtonListener(this);
// set up the meters
addAndMakeVisible(meterLeft = new MeterComponent(&ownerFilter->RMSLeft, &ownerFilter->peakLeft, &ownerFilter->getCallbackLock()));
addAndMakeVisible(meterRight = new MeterComponent(&ownerFilter->RMSRight, &ownerFilter->peakRight, &ownerFilter->getCallbackLock()));
addAndMakeVisible( ownerFilter->waveformDisplayPre );
addAndMakeVisible( ownerFilter->waveformDisplayPost );
addAndMakeVisible(incLabel = new Label(T("incLabel"), T("0.0")));
addAndMakeVisible(currentLabel = new Label(T("currentLabel"), T("0.0")));
// set our component's initial size to be the last one that was stored in the filter's settings
setSize (400, 500);
// register ourselves with the filter - it will use its ChangeBroadcaster base
// class to tell us when something has changed, and this will call our changeListenerCallback()
// method.
ownerFilter->addChangeListener (this);
// start the timer to update the meters
startTimer(50);
}
DRowAudioEditorComponent::~DRowAudioEditorComponent()
{
getFilter()->removeChangeListener (this);
sliders.clear();
buttons.clear();
deleteAllChildren();
}
//==============================================================================
void DRowAudioEditorComponent::paint (Graphics& g)
{
// just clear the window
g.fillAll (Colour::greyLevel (0.9f));
g.setColour(Colours::red);
g.setFont(30);
g.drawFittedText(T("dRowAudio: Gate"),
getWidth()/2 - (getWidth()/2), 5,
getWidth(), getHeight(),
Justification::centredTop,
1);
}
void DRowAudioEditorComponent::resized()
{
comboBox->setBounds (getWidth()/2 - 100, 40,
200, 20);
for (int i = 0; i < noParams; i++)
sliders[i]->setBounds (70, 70 + (30*i), getWidth()-140, 20);
// meterLeft->setBounds(getWidth()-65, 70, 25, 290);
// meterRight->setBounds(getWidth()-35, 70, 25, 290);
for ( int i = 0; i < noButtons; i++ )
buttons[i]->setBounds( 10 + (i * ((getWidth()-20)/noButtons) + ((noButtons-1)*5)), 370,
((getWidth()-20)/noButtons)-(((noButtons-1)*5)), 20);
getFilter()->waveformDisplayPre->setBounds(10, buttons[0]->getBottom()+10,
getWidth()-20, (getHeight()-buttons[0]->getBottom()-20)*0.5-1);
getFilter()->waveformDisplayPost->setBounds(10, getFilter()->waveformDisplayPre->getBottom()+2,
getWidth()-20, (getHeight()-buttons[0]->getBottom()-20)*0.5-1);
incLabel->setBounds(5, 5, 100, 20);
currentLabel->setBounds(5, 25, 100, 20);
}
//==============================================================================
void DRowAudioEditorComponent::sliderValueChanged (Slider* changedSlider)
{
DRowAudioFilter* currentFilter = getFilter();
for (int i = 0; i < noParams; i++)
if ( changedSlider == sliders[i] )
currentFilter->setScaledParameterNotifyingHost (i, (float) sliders[i]->getValue());
if (changedSlider == sliders[9]) {
currentFilter->waveformDisplayPre->setHorizontalZoom(sliders[9]->getValue());
currentFilter->waveformDisplayPost->setHorizontalZoom(sliders[9]->getValue());
}
}
void DRowAudioEditorComponent::buttonClicked(Button* clickedButton)
{
DRowAudioFilter* currentFilter = getFilter();
if (clickedButton == buttons[0])
{
if(clickedButton->getToggleState())
currentFilter->setScaledParameterNotifyingHost(MONITOR, 1.0);
else
currentFilter->setScaledParameterNotifyingHost(MONITOR, 0.0);
}
if (clickedButton == buttons[2])
{
if(clickedButton->getToggleState())
currentFilter->setScaledParameterNotifyingHost(FILTER, 1.0);
else
currentFilter->setScaledParameterNotifyingHost(FILTER, 0.0);
}
}
void DRowAudioEditorComponent::changeListenerCallback (void* source)
{
// this is the filter telling us that it's changed, so we'll update our
// display of the time, midi message, etc.
updateParametersFromFilter();
}
//==============================================================================
void DRowAudioEditorComponent::updateParametersFromFilter()
{
DRowAudioFilter* const filter = getFilter();
float tempParamVals[noParams];
// we use this lock to make sure the processBlock() method isn't writing to the
// lastMidiMessage variable while we're trying to read it, but be extra-careful to
// only hold the lock for a minimum amount of time..
filter->getCallbackLock().enter();
for(int i = 0; i < noParams; i++)
tempParamVals[i] = filter->getScaledParameter (i);
// ..release the lock ASAP
filter->getCallbackLock().exit();
for(int i = 0; i < noParams; i++)
sliders[i]->setValue (tempParamVals[i], false);
}
void DRowAudioEditorComponent::timerCallback()
{
incLabel->setText(String(getFilter()->RMSLeft), false);
currentLabel->setText(String(getFilter()->RMSRight), false);
currentLabel->setText(String(getFilter()->RMSRight), false);
currentLabel->setColour(Label::backgroundColourId, Colours::black.withBrightness(getFilter()->RMSRight));
}
| 35.959641
| 134
| 0.658187
|
34Audiovisual
|
408f510d8b8c8139501a7bedd41c3947572ee85c
| 2,338
|
cpp
|
C++
|
fbmeshd/tests/SocketTest.cpp
|
yuyanduan/fbmeshd
|
56650c4bab7d4ab15d3f1a853d17fa12f83f43f2
|
[
"MIT"
] | 36
|
2019-10-03T22:33:51.000Z
|
2020-11-04T15:04:29.000Z
|
fbmeshd/tests/SocketTest.cpp
|
yuyanduan/fbmeshd
|
56650c4bab7d4ab15d3f1a853d17fa12f83f43f2
|
[
"MIT"
] | 3
|
2019-10-31T01:27:26.000Z
|
2020-10-06T17:35:50.000Z
|
fbmeshd/tests/SocketTest.cpp
|
yuyanduan/fbmeshd
|
56650c4bab7d4ab15d3f1a853d17fa12f83f43f2
|
[
"MIT"
] | 15
|
2019-10-30T15:57:09.000Z
|
2020-11-11T06:34:59.000Z
|
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <fbmeshd/gateway-connectivity-monitor/Socket.h>
#include <folly/Subprocess.h>
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include <sys/types.h>
#include <unistd.h>
using namespace fbmeshd;
class SocketTest : public ::testing::Test {
protected:
static constexpr auto testInterface{"lo"};
static const folly::SocketAddress testAddress;
static constexpr std::chrono::seconds testInterval{1};
};
const folly::SocketAddress SocketTest::testAddress{"127.0.0.1", 1337};
constexpr std::chrono::seconds SocketTest::testInterval;
TEST_F(SocketTest, ConnectFailure) {
Socket socket;
Socket::Result result{
socket.connect(testInterface, testAddress, testInterval)};
EXPECT_FALSE(result.success);
EXPECT_EQ(
getuid() != 0 ? "setsockopt_bindtodevice" : "err_non_zero",
result.errorMsg);
}
void
waitUntilListening(const folly::SocketAddress& key) {
std::string stdOut{};
do {
folly::Subprocess ss{{"/usr/sbin/ss", std::string{"-tanpl"}},
folly::Subprocess::Options().pipeStdout()};
stdOut = ss.communicate().first;
EXPECT_EQ(0, ss.wait().exitStatus());
} while (stdOut.find(key.describe()) == std::string::npos);
}
TEST_F(SocketTest, ConnectSuccess) {
folly::Subprocess proc{{"/bin/nc",
"-l",
testAddress.getAddressStr(),
folly::to<std::string>(testAddress.getPort())}};
waitUntilListening(testAddress);
{
Socket socket;
Socket::Result result{
socket.connect(testInterface, testAddress, testInterval)};
// This test is really only interesting when run as root. But this makes it
// so it will at least pass otherwise.
if (getuid() == 0) {
EXPECT_TRUE(result.success);
EXPECT_EQ("", result.errorMsg);
} else {
proc.terminate();
}
}
auto status = proc.wait();
EXPECT_TRUE(getuid() != 0 || status.exitStatus() == 0);
}
int
main(int argc, char** argv) {
::google::InitGoogleLogging(argv[0]);
::testing::InitGoogleTest(&argc, argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);
return RUN_ALL_TESTS();
}
| 28.168675
| 79
| 0.662104
|
yuyanduan
|
40949e5ca30bd9b376b54abeb3aaf939bafb2add
| 1,023
|
cpp
|
C++
|
Source/JavascriptEditor/JavascriptCommandlet.cpp
|
ninemcom/Unreal.js-core
|
9b7bf774c570be95f4d9f687557164c872bb2307
|
[
"BSD-3-Clause"
] | 1
|
2019-07-24T13:20:45.000Z
|
2019-07-24T13:20:45.000Z
|
Source/JavascriptEditor/JavascriptCommandlet.cpp
|
ninemcom/Unreal.js-core
|
9b7bf774c570be95f4d9f687557164c872bb2307
|
[
"BSD-3-Clause"
] | null | null | null |
Source/JavascriptEditor/JavascriptCommandlet.cpp
|
ninemcom/Unreal.js-core
|
9b7bf774c570be95f4d9f687557164c872bb2307
|
[
"BSD-3-Clause"
] | null | null | null |
#include "JavascriptCommandlet.h"
#include "JavascriptIsolate.h"
#include "JavascriptContext.h"
UJavascriptCommandlet::UJavascriptCommandlet(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{}
int32 UJavascriptCommandlet::Main(const FString& Params)
{
bool bSuccess = true;
#if !UE_BUILD_SHIPPING
const TCHAR* ParamStr = *Params;
ParseCommandLine(ParamStr, CmdLineTokens, CmdLineSwitches);
{
auto JavascriptIsolate = NewObject<UJavascriptIsolate>();
JavascriptIsolate->Init(true);
auto JavascriptContext = JavascriptIsolate->CreateContext();
JavascriptContext->Expose(TEXT("Root"), this);
JavascriptContext->AddToRoot();
JavascriptContext->SetContextId(TEXT("Commandlet"));
{
FEditorScriptExecutionGuard ScriptGuard;
if (CmdLineTokens.Num())
{
JavascriptContext->RunFile(CmdLineTokens[0]);
}
}
JavascriptContext->JavascriptContext.Reset();
JavascriptContext->RemoveFromRoot();
}
#else
bSuccess = false;
#endif
return bSuccess ? 0 : 1;
}
| 22.23913
| 89
| 0.753666
|
ninemcom
|
40951a20330f7180bc20457151a94c4f6c9b460c
| 289
|
cpp
|
C++
|
examples/polar_plots/polarplot/polarplot_6.cpp
|
solosuper/matplotplusplus
|
87ff5728b14ad904bc6acaa2bf010c1a03c6cb4a
|
[
"MIT"
] | 2,709
|
2020-08-29T01:25:40.000Z
|
2022-03-31T18:35:25.000Z
|
examples/polar_plots/polarplot/polarplot_6.cpp
|
p-ranav/matplotplusplus
|
b45015e2be88e3340b400f82637b603d733d45ce
|
[
"MIT"
] | 124
|
2020-08-29T04:48:17.000Z
|
2022-03-25T15:45:59.000Z
|
examples/polar_plots/polarplot/polarplot_6.cpp
|
p-ranav/matplotplusplus
|
b45015e2be88e3340b400f82637b603d733d45ce
|
[
"MIT"
] | 203
|
2020-08-29T04:16:22.000Z
|
2022-03-30T02:08:36.000Z
|
#include <cmath>
#include <matplot/matplot.h>
int main() {
using namespace matplot;
std::vector<double> theta = linspace(0, 2 * pi, 25);
std::vector<double> rho = transform(theta, [](double t) { return 2 * t; });
polarplot(theta, rho, "r-o");
show();
return 0;
}
| 22.230769
| 79
| 0.598616
|
solosuper
|
409774ca7d7a8642ff69436f7a1ee94894892d47
| 3,978
|
cpp
|
C++
|
src/vk_helpers.cpp
|
AdlanSADOU/Vulkan_Renderer
|
f57fcfbd7d97c42690188724d3b82d02c902072b
|
[
"Unlicense"
] | 1
|
2020-06-10T07:38:05.000Z
|
2020-06-10T07:38:05.000Z
|
src/vk_helpers.cpp
|
AdlanSADOU/Vulkan_Renderer
|
f57fcfbd7d97c42690188724d3b82d02c902072b
|
[
"Unlicense"
] | 3
|
2021-03-17T14:31:12.000Z
|
2021-03-17T14:31:45.000Z
|
src/vk_helpers.cpp
|
AdlanSADOU/Vulkan_Renderer
|
f57fcfbd7d97c42690188724d3b82d02c902072b
|
[
"Unlicense"
] | null | null | null |
#include <vulkan/vulkan.h>
#include "vk_types.h"
uint32_t FindProperties(
const VkPhysicalDeviceMemoryProperties *pMemoryProperties,
uint32_t memoryTypeBitsRequirement,
VkMemoryPropertyFlags requiredProperties)
{
const uint32_t memoryCount = pMemoryProperties->memoryTypeCount;
for (uint32_t memoryIndex = 0; memoryIndex < memoryCount; ++memoryIndex) {
const uint32_t memoryTypeBits = (1 << memoryIndex);
const bool isRequiredMemoryType = memoryTypeBitsRequirement & memoryTypeBits;
const VkMemoryPropertyFlags properties = pMemoryProperties->memoryTypes[memoryIndex].propertyFlags;
const bool hasRequiredProperties = (properties & requiredProperties) == requiredProperties;
if (isRequiredMemoryType && hasRequiredProperties)
return memoryIndex;
}
// failed to find memory type
return -1;
}
bool AllocateBufferMemory(
VkDevice device,
VkPhysicalDevice gpu,
VkBuffer buffer,
VkDeviceMemory *memory)
{
VkMemoryPropertyFlags flags = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
VkMemoryRequirements buffer_memory_requirements;
vkGetBufferMemoryRequirements(device, buffer, &buffer_memory_requirements);
VkPhysicalDeviceMemoryProperties gpu_memory_properties;
vkGetPhysicalDeviceMemoryProperties(gpu, &gpu_memory_properties);
uint32_t memory_type = FindProperties(&gpu_memory_properties, buffer_memory_requirements.memoryTypeBits, flags);
VkMemoryAllocateInfo memory_allocate_info = {
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // VkStructureType sType
nullptr, // const void *pNext
buffer_memory_requirements.size, // VkDeviceSize allocationSize
memory_type // uint32_t memoryTypeIndex
};
if (vkAllocateMemory(device, &memory_allocate_info, nullptr, memory) == VK_SUCCESS)
return true;
return false;
}
void GetDescriptorSetLayoutBinding(
uint32_t binding,
VkDescriptorType descriptorType,
uint32_t descriptorCount,
VkShaderStageFlags stageFlags,
const VkSampler *pImmutableSamplers)
{
// desc_set_layout_bindings.push_back(desc_set_layout_binding_storage_buffer);
}
VkResult CreateDescriptorSetLayout(
VkDevice device,
const VkAllocationCallbacks *allocator,
VkDescriptorSetLayout *set_layout,
const VkDescriptorSetLayoutBinding *bindings,
uint32_t binding_count)
{
VkDescriptorSetLayoutCreateInfo create_info_desc_set_layout = {};
create_info_desc_set_layout.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
create_info_desc_set_layout.pNext = NULL;
create_info_desc_set_layout.flags = 0;
create_info_desc_set_layout.pBindings = bindings;
create_info_desc_set_layout.bindingCount = binding_count;
return vkCreateDescriptorSetLayout(device, &create_info_desc_set_layout, NULL, set_layout);
}
VkResult AllocateDescriptorSets(
VkDevice device,
VkDescriptorPool descriptor_pool,
uint32_t descriptor_set_count,
const VkDescriptorSetLayout *set_layouts,
VkDescriptorSet *descriptor_set)
{
VkDescriptorSetAllocateInfo allocInfo = {};
allocInfo.pNext = NULL;
allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
allocInfo.descriptorPool = descriptor_pool;
allocInfo.descriptorSetCount = descriptor_set_count;
allocInfo.pSetLayouts = set_layouts;
return vkAllocateDescriptorSets(device, &allocInfo, descriptor_set);
}
| 32.876033
| 118
| 0.682755
|
AdlanSADOU
|
4097767cb9f5f40b3d26a9c45b6ca2987265e33c
| 2,271
|
hpp
|
C++
|
stan/math/prim/scal/prob/student_t_log.hpp
|
peterwicksstringfield/math
|
5ce0718ea64f2cca8b2f1e4eeac27a2dc2bd246e
|
[
"BSD-3-Clause"
] | null | null | null |
stan/math/prim/scal/prob/student_t_log.hpp
|
peterwicksstringfield/math
|
5ce0718ea64f2cca8b2f1e4eeac27a2dc2bd246e
|
[
"BSD-3-Clause"
] | null | null | null |
stan/math/prim/scal/prob/student_t_log.hpp
|
peterwicksstringfield/math
|
5ce0718ea64f2cca8b2f1e4eeac27a2dc2bd246e
|
[
"BSD-3-Clause"
] | null | null | null |
#ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_LOG_HPP
#define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_LOG_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/scal/prob/student_t_lpdf.hpp>
namespace stan {
namespace math {
/** \ingroup prob_dists
* The log of the Student-t density for the given y, nu, mean, and
* scale parameter. The scale parameter must be greater
* than 0.
*
* \f{eqnarray*}{
y &\sim& t_{\nu} (\mu, \sigma^2) \\
\log (p (y \, |\, \nu, \mu, \sigma) ) &=& \log \left( \frac{\Gamma((\nu + 1)
/2)}
{\Gamma(\nu/2)\sqrt{\nu \pi} \sigma} \left( 1 + \frac{1}{\nu} (\frac{y -
\mu}{\sigma})^2 \right)^{-(\nu + 1)/2} \right) \\
&=& \log( \Gamma( (\nu+1)/2 )) - \log (\Gamma (\nu/2) - \frac{1}{2} \log(\nu
\pi) - \log(\sigma)
-\frac{\nu + 1}{2} \log (1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2)
\f}
*
* @deprecated use <code>student_t_lpdf</code>
*
* @param y A scalar variable.
* @param nu Degrees of freedom.
* @param mu The mean of the Student-t distribution.
* @param sigma The scale parameter of the Student-t distribution.
* @return The log of the Student-t density at y.
* @throw std::domain_error if sigma is not greater than 0.
* @throw std::domain_error if nu is not greater than 0.
* @tparam T_y Type of scalar.
* @tparam T_dof Type of degrees of freedom.
* @tparam T_loc Type of location.
* @tparam T_scale Type of scale.
*/
template <bool propto, typename T_y, typename T_dof, typename T_loc,
typename T_scale>
return_type_t<T_y, T_dof, T_loc, T_scale> student_t_log(const T_y& y,
const T_dof& nu,
const T_loc& mu,
const T_scale& sigma) {
return student_t_lpdf<propto, T_y, T_dof, T_loc, T_scale>(y, nu, mu, sigma);
}
/** \ingroup prob_dists
* @deprecated use <code>student_t_lpdf</code>
*/
template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
inline return_type_t<T_y, T_dof, T_loc, T_scale> student_t_log(
const T_y& y, const T_dof& nu, const T_loc& mu, const T_scale& sigma) {
return student_t_lpdf<T_y, T_dof, T_loc, T_scale>(y, nu, mu, sigma);
}
} // namespace math
} // namespace stan
#endif
| 37.229508
| 79
| 0.621312
|
peterwicksstringfield
|
409b96050ff311b99e2a59dd6532ddc4768b927e
| 3,937
|
cpp
|
C++
|
tests/simple_worker.cpp
|
SiddiqSoft/basic-worker
|
30ece197c9f5605d2e81f921e466ad8ccfcdcf25
|
[
"BSD-3-Clause"
] | null | null | null |
tests/simple_worker.cpp
|
SiddiqSoft/basic-worker
|
30ece197c9f5605d2e81f921e466ad8ccfcdcf25
|
[
"BSD-3-Clause"
] | 3
|
2021-09-18T15:29:01.000Z
|
2021-10-06T05:25:13.000Z
|
tests/simple_worker.cpp
|
SiddiqSoft/basic-worker
|
30ece197c9f5605d2e81f921e466ad8ccfcdcf25
|
[
"BSD-3-Clause"
] | 1
|
2021-10-05T22:30:34.000Z
|
2021-10-05T22:30:34.000Z
|
/*
asynchrony-lib
Add asynchrony to your apps
BSD 3-Clause License
Copyright (c) 2021, Siddiq Software LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "gtest/gtest.h"
#include <iostream>
#include <format>
#include <string>
#include <thread>
#include "nlohmann/json.hpp"
#include "../src/simple_worker.hpp"
TEST(simple_worker, test1)
{
bool passTest {false};
siddiqsoft::simple_worker<nlohmann::json> worker {[&](auto&& item) {
std::cerr << std::format("Got object: {}\n", item.dump());
passTest = true;
}};
worker.queue({{"hello", "world"}});
// This is important otherwise the destructor will kill the thread before it has a chance to process anything!
std::this_thread::sleep_for(std::chrono::seconds(1));
EXPECT_TRUE(passTest);
std::cerr << nlohmann::json(worker).dump() << std::endl;
}
TEST(simple_worker, test2)
{
bool passTest {false};
siddiqsoft::simple_worker<std::shared_ptr<nlohmann::json>> worker {[&](auto&& item) {
std::cerr << std::format("Got object: {}\n", item->dump());
passTest = true;
}};
worker.queue(std::make_shared<nlohmann::json>(nlohmann::json {{"hello", "world"}}));
// This is important otherwise the destructor will kill the thread before it has a chance to process anything!
std::this_thread::sleep_for(std::chrono::seconds(1));
EXPECT_TRUE(passTest);
}
TEST(simple_worker, test3)
{
bool passTest {false};
struct nonCopyableObject
{
std::string Data {};
nonCopyableObject(const std::string& s)
: Data(s)
{
}
nonCopyableObject(nonCopyableObject&) = delete;
nonCopyableObject& operator=(nonCopyableObject&) = delete;
// Move constructors
nonCopyableObject(nonCopyableObject&&) = default;
nonCopyableObject& operator=(nonCopyableObject&&) = default;
};
siddiqsoft::simple_worker<nonCopyableObject> worker {[&](auto&& item) {
std::cerr << std::format("Got object: {}\n", item.Data);
passTest = true;
}};
worker.queue(nonCopyableObject {"Hello world!"});
// This is important otherwise the destructor will kill the thread before it has a chance to process anything!
std::this_thread::sleep_for(std::chrono::seconds(1));
EXPECT_TRUE(passTest);
}
| 34.234783
| 114
| 0.679705
|
SiddiqSoft
|
409c6fc47b25f7f8d9ea799cc925d017f66ca751
| 4,360
|
cpp
|
C++
|
src/AST/StmtNode.cpp
|
linvs/test
|
9d9390e94ecebd1e3098167c553c86a2cddca289
|
[
"MIT"
] | 428
|
2020-06-12T06:48:38.000Z
|
2022-02-15T00:43:19.000Z
|
src/AST/StmtNode.cpp
|
linvs/test
|
9d9390e94ecebd1e3098167c553c86a2cddca289
|
[
"MIT"
] | null | null | null |
src/AST/StmtNode.cpp
|
linvs/test
|
9d9390e94ecebd1e3098167c553c86a2cddca289
|
[
"MIT"
] | 18
|
2020-06-15T02:49:30.000Z
|
2021-09-08T04:39:13.000Z
|
#include "AST/StmtNode.h"
#include "AST/DeclNode.h"
#include "Sema/ASTVisitor.h"
ExprStmtNode::ExprStmtNode(const SharedPtr<ExprNode> &expr) : expr(expr) {}
void ExprStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<ExprStmtNode>(shared_from_this()));
}
void ExprStmtNode::bindChildrenInversely() {
expr->parent = shared_from_this();
}
CompoundStmtNode::CompoundStmtNode(const SharedPtrVector<StmtNode> &childStmts) : childStmts(childStmts) {}
bool CompoundStmtNode::isEmpty() const {
return childStmts.empty();
}
void CompoundStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<CompoundStmtNode>(shared_from_this()));
}
void CompoundStmtNode::bindChildrenInversely() {
auto self = shared_from_this();
for (const SharedPtr<StmtNode> &stmt: childStmts) {
stmt->parent = self;
}
}
void VarDeclStmtNode::pushVarDecl(const SharedPtr<VarDeclNode> &varDecl) {
childVarDecls.push_back(varDecl);
}
void VarDeclStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<VarDeclStmtNode>(shared_from_this()));
}
void VarDeclStmtNode::bindChildrenInversely() {
auto self = shared_from_this();
for (const SharedPtr<VarDeclNode> &varDecl: childVarDecls) {
varDecl->parent = self;
}
}
FunctionDeclStmtNode::FunctionDeclStmtNode(
const SharedPtr<FunctionDeclNode> &childFunctionDecl
) : childFunctionDecl(childFunctionDecl) {}
void FunctionDeclStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<FunctionDeclStmtNode>(shared_from_this()));
}
void FunctionDeclStmtNode::bindChildrenInversely() {
childFunctionDecl->parent = shared_from_this();
}
IfStmtNode::IfStmtNode(
const SharedPtr<ExprNode> &condition,
const SharedPtr<StmtNode> &thenStmt,
const SharedPtr<StmtNode> &elseStmt
) : condition(condition), thenBody(thenStmt), elseBody(elseStmt) {}
void IfStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<IfStmtNode>(shared_from_this()));
}
void IfStmtNode::bindChildrenInversely() {
auto self = shared_from_this();
condition->parent = thenBody->parent = self;
if (elseBody) {
elseBody->parent = self;
}
}
WhileStmtNode::WhileStmtNode(
const SharedPtr<ExprNode> &condition,
const SharedPtr<StmtNode> &body
) : condition(condition), body(body) {}
void WhileStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<WhileStmtNode>(shared_from_this()));
}
void WhileStmtNode::bindChildrenInversely() {
condition->parent = body->parent = shared_from_this();
}
ForStmtNode::ForStmtNode(
const SharedPtr<VarDeclStmtNode> &forInitVarDecls,
const SharedPtrVector<ExprNode> &forInitExprList,
const SharedPtr<ExprNode> &forCondition,
const SharedPtrVector<ExprNode> &forUpdate,
const SharedPtr<StmtNode> &body
) : initVarStmt(forInitVarDecls),
initExprs(forInitExprList),
condition(forCondition),
updates(forUpdate), body(body) {}
void ForStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<ForStmtNode>(shared_from_this()));
}
void ForStmtNode::bindChildrenInversely() {
auto self = shared_from_this();
if (initVarStmt) {
initVarStmt->parent = self;
}
for (const SharedPtr<ExprNode> &forInitExpr: initExprs) {
forInitExpr->parent = self;
}
if (condition) {
condition->parent = self;
}
for (const SharedPtr<ExprNode> &forUpdateItem: updates) {
forUpdateItem->parent = self;
}
body->parent = self;
}
void ContinueStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<ContinueStmtNode>(shared_from_this()));
}
void BreakStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<BreakStmtNode>(shared_from_this()));
}
ReturnStmtNode::ReturnStmtNode(const SharedPtr<ExprNode> &argument) : returnExpr(argument) {}
void ReturnStmtNode::accept(const SharedPtr<ASTVisitor> &visitor) {
visitor->visit(staticPtrCast<ReturnStmtNode>(shared_from_this()));
}
void ReturnStmtNode::bindChildrenInversely() {
if (returnExpr) {
returnExpr->parent = shared_from_this();
}
}
| 30.704225
| 107
| 0.726606
|
linvs
|
40a05189a81660446ad282b9ee0261b8a2c6dd69
| 456
|
cpp
|
C++
|
Entrenamiento/A/268.cpp
|
snat-s/competitiva
|
a743f323e1bedec4709416ef684a0c6a15e42e00
|
[
"MIT"
] | null | null | null |
Entrenamiento/A/268.cpp
|
snat-s/competitiva
|
a743f323e1bedec4709416ef684a0c6a15e42e00
|
[
"MIT"
] | null | null | null |
Entrenamiento/A/268.cpp
|
snat-s/competitiva
|
a743f323e1bedec4709416ef684a0c6a15e42e00
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <utility>
int main(void)
{
int n = 0, answer = 0;
std::cin >> n;
std::pair<int, int> teams[n];
for (int i = 0; i < n; ++i) {
std::cin >> teams[i].first >> teams[i].second;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if(teams[i].first == teams[j].second || teams[i].first == teams[j].second && i != j) {
answer++;
}
}
}
std::cout << answer << "\n";
return 0;
}
| 19
| 92
| 0.475877
|
snat-s
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.