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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a0f3f3b75f368223a128d49a347759e4e33df816 | 1,438 | cpp | C++ | Chapter_04/Source/Chapter_04/BarricksUnit.cpp | CoolHandNick80/Unreal-Engine-4.x-Scripting-with-C-Cookbook---Second-edition | 4ceb7a6f61cb9e1301def08a4a0aa1759c0659be | [
"MIT"
] | 1 | 2020-10-26T10:11:26.000Z | 2020-10-26T10:11:26.000Z | Chapter_04/Source/Chapter_04/BarricksUnit.cpp | CoolHandNick80/Unreal-Engine-4.x-Scripting-with-C-Cookbook---Second-edition | 4ceb7a6f61cb9e1301def08a4a0aa1759c0659be | [
"MIT"
] | null | null | null | Chapter_04/Source/Chapter_04/BarricksUnit.cpp | CoolHandNick80/Unreal-Engine-4.x-Scripting-with-C-Cookbook---Second-edition | 4ceb7a6f61cb9e1301def08a4a0aa1759c0659be | [
"MIT"
] | 1 | 2020-10-26T10:11:36.000Z | 2020-10-26T10:11:36.000Z | // Fill out your copyright notice in the Description page of Project Settings.
#include "BarricksUnit.h"
#include "Particles/ParticleSystemComponent.h"
// Sets default values
ABarricksUnit::ABarricksUnit()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
SpawnPoint = CreateDefaultSubobject<UParticleSystemComponent>("SpawnPoint");
auto ParticleSystem = ConstructorHelpers::FObjectFinder<UParticleSystem>(TEXT("ParticleSystem'/Engine/Tutorial/SubEditors/TutorialAssets/TutorialParticleSystem.TutorialParticleSystem'"));
if (ParticleSystem.Object != nullptr)
{
SpawnPoint->SetTemplate(ParticleSystem.Object);
}
SpawnPoint->SetRelativeScale3D(FVector(0.5, 0.5, 0.5));
SpawnCollisionHandlingMethod = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
}
// Called when the game starts or when spawned
void ABarricksUnit::BeginPlay()
{
Super::BeginPlay();
SpawnPoint->AttachTo(RootComponent);
}
// Called every frame
void ABarricksUnit::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
SetActorLocation(GetActorLocation() + FVector(10, 0, 0));
}
// Called to bind functionality to input
void ABarricksUnit::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}
| 27.653846 | 192 | 0.749652 | CoolHandNick80 |
a0f4e25382743a924359a066604f26bc2d114b41 | 158 | cpp | C++ | examples/access-via-this-under-construction.cpp | dawidpilarski/LifetimePresentation | 56d59295b5ace86015072e65bccb3310cc5a435e | [
"BSD-3-Clause"
] | null | null | null | examples/access-via-this-under-construction.cpp | dawidpilarski/LifetimePresentation | 56d59295b5ace86015072e65bccb3310cc5a435e | [
"BSD-3-Clause"
] | null | null | null | examples/access-via-this-under-construction.cpp | dawidpilarski/LifetimePresentation | 56d59295b5ace86015072e65bccb3310cc5a435e | [
"BSD-3-Clause"
] | null | null | null | struct C {
int c;
C() : c(0) { no_opt(); }
};
const C cobj;
void no_opt() {
int i = cobj.c * 100; //unspecified value
std::cout << i << std::endl;
} | 15.8 | 43 | 0.525316 | dawidpilarski |
a0f5a62ecf0c44be91f23e92204d834d6c8bfae8 | 5,122 | cpp | C++ | src/saiga/vision/camera/KittiDataset.cpp | SimonMederer/saiga | ff167e60c50b1cead4d19eb5ab2e93acce8c42a3 | [
"MIT"
] | null | null | null | src/saiga/vision/camera/KittiDataset.cpp | SimonMederer/saiga | ff167e60c50b1cead4d19eb5ab2e93acce8c42a3 | [
"MIT"
] | null | null | null | src/saiga/vision/camera/KittiDataset.cpp | SimonMederer/saiga | ff167e60c50b1cead4d19eb5ab2e93acce8c42a3 | [
"MIT"
] | null | null | null | /**
* Copyright (c) 2017 Darius Rückert
* Licensed under the MIT License.
* See LICENSE file for more information.
*/
#include "KittiDataset.h"
#include "saiga/core/util/ProgressBar.h"
#include "saiga/core/util/easylogging++.h"
#include "saiga/core/util/file.h"
#include "saiga/core/util/fileChecker.h"
#include "saiga/core/util/tostring.h"
#include "saiga/vision/camera/TimestampMatcher.h"
#include <filesystem>
namespace Saiga
{
KittiDataset::KittiDataset(const DatasetParameters& params_) : DatasetCameraBase<StereoFrameData>(params_)
{
// Kitti was recorded with 10 fps
intrinsics.fps = 10;
VLOG(1) << "Loading KittiDataset Stereo Dataset: " << params.dir;
auto leftImageDir = params.dir + "/image_0";
auto rightImageDir = params.dir + "/image_1";
auto calibFile = params.dir + "/calib.txt";
auto timesFile = params.dir + "/times.txt";
auto groundtruthFile = params.groundTruth;
SAIGA_ASSERT(std::filesystem::exists(leftImageDir));
SAIGA_ASSERT(std::filesystem::exists(rightImageDir));
SAIGA_ASSERT(std::filesystem::exists(calibFile));
SAIGA_ASSERT(std::filesystem::exists(timesFile));
{
// load calibration matrices
// They are stored like this:
// P0: a00, a01, a02, ...
auto lines = File::loadFileStringArray(calibFile);
std::vector<Eigen::Matrix<double, 3, 4>> matrices;
StringViewParser parser(" ");
for (auto l : lines)
{
if (l.empty()) continue;
parser.set(l);
// parse the "P0"
parser.next();
Eigen::Matrix<double, 3, 4> m;
for (int i = 0; i < 12; ++i)
{
auto sv = parser.next();
SAIGA_ASSERT(!sv.empty());
m(i / 4, i % 4) = to_double(sv);
}
// std::cout << m << std::endl << std::endl;
matrices.push_back(m);
}
SAIGA_ASSERT(matrices.size() == 4);
// Extract K and bf
// Distortion is 0
Mat3 K1 = matrices[0].block<3, 3>(0, 0);
Mat3 K2 = matrices[1].block<3, 3>(0, 0);
double bf = -matrices[1](0, 3);
intrinsics.model.K = K1;
intrinsics.rightModel.K = K2;
intrinsics.bf = bf;
}
std::cout << intrinsics << std::endl;
std::vector<double> timestamps;
{
// load timestamps
auto lines = File::loadFileStringArray(timesFile);
for (auto l : lines)
{
if (l.empty()) continue;
timestamps.push_back(Saiga::to_double(l));
}
std::cout << "got " << timestamps.size() << " timestamps" << std::endl;
}
std::vector<SE3> groundTruth;
if (std::filesystem::exists(params.groundTruth))
{
// load ground truth
std::cout << "loading ground truth " << std::endl;
auto lines = File::loadFileStringArray(params.groundTruth);
StringViewParser parser(" ");
for (auto l : lines)
{
if (l.empty()) continue;
parser.set(l);
Eigen::Matrix<double, 3, 4> m;
for (int i = 0; i < 12; ++i)
{
auto sv = parser.next();
SAIGA_ASSERT(!sv.empty());
m(i / 4, i % 4) = to_double(sv);
}
// std::cout << m << std::endl << std::endl;
// matrices.push_back(m);
Mat4 m4 = Mat4::Identity();
m4.block<3, 4>(0, 0) = m;
groundTruth.push_back(SE3::fitToSE3(m4));
}
SAIGA_ASSERT(groundTruth.size() == timestamps.size());
}
{
// load left and right images
// frames.resize(N);
int N = timestamps.size();
if (params.maxFrames == -1)
{
params.maxFrames = N;
}
params.maxFrames = std::min(N - params.startFrame, params.maxFrames);
frames.resize(params.maxFrames);
N = params.maxFrames;
SyncedConsoleProgressBar loadingBar(std::cout, "Loading " + to_string(N) + " images ", N);
#pragma omp parallel for if (params.multiThreadedLoad)
for (int id = 0; id < params.maxFrames; ++id)
{
auto& frame = frames[id];
int i = id + params.startFrame;
std::string leftFile = leftImageDir + "/" + leadingZeroString(i, 6) + ".png";
std::string rightFile = rightImageDir + "/" + leadingZeroString(i, 6) + ".png";
frame.grayImg.load(leftFile);
frame.grayImg2.load(rightFile);
SAIGA_ASSERT(frame.grayImg);
SAIGA_ASSERT(frame.grayImg2);
if (!groundTruth.empty()) frame.groundTruth = groundTruth[i];
frame.timeStamp = timestamps[i];
loadingBar.addProgress(1);
}
auto firstFrame = frames.front();
intrinsics.imageSize = firstFrame.grayImg.dimensions();
intrinsics.rightImageSize = firstFrame.grayImg2.dimensions();
}
}
} // namespace Saiga
| 28.614525 | 106 | 0.544319 | SimonMederer |
a0f6a90104d0eea3dff399517fc88b84b3914b4c | 9,116 | cpp | C++ | WebKit2-7606.2.104.1.1/WebKit2-7606.2.104.1.1/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp | mlcldh/appleWebKit2 | 39cc42a4710c9319c8da269621844493ab2ccdd6 | [
"MIT"
] | 1 | 2021-05-27T07:29:31.000Z | 2021-05-27T07:29:31.000Z | WebKit2-7606.2.104.1.1/WebKit2-7606.2.104.1.1/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp | mlcldh/appleWebKit2 | 39cc42a4710c9319c8da269621844493ab2ccdd6 | [
"MIT"
] | null | null | null | WebKit2-7606.2.104.1.1/WebKit2-7606.2.104.1.1/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp | mlcldh/appleWebKit2 | 39cc42a4710c9319c8da269621844493ab2ccdd6 | [
"MIT"
] | null | null | null | /*
* This file is part of the WebKit open source project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "WebKitDOMUIEvent.h"
#include <WebCore/CSSImportRule.h>
#include "DOMObjectCache.h"
#include <WebCore/Document.h>
#include <WebCore/ExceptionCode.h>
#include <WebCore/JSMainThreadExecState.h>
#include <WebCore/KeyboardEvent.h>
#include "WebKitDOMDOMWindowPrivate.h"
#include "WebKitDOMEventPrivate.h"
#include "WebKitDOMPrivate.h"
#include "WebKitDOMUIEventPrivate.h"
#include "ConvertToUTF8String.h"
#include <wtf/GetPtr.h>
#include <wtf/RefPtr.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
namespace WebKit {
WebKitDOMUIEvent* kit(WebCore::UIEvent* obj)
{
return WEBKIT_DOM_UI_EVENT(kit(static_cast<WebCore::Event*>(obj)));
}
WebCore::UIEvent* core(WebKitDOMUIEvent* request)
{
return request ? static_cast<WebCore::UIEvent*>(WEBKIT_DOM_OBJECT(request)->coreObject) : 0;
}
WebKitDOMUIEvent* wrapUIEvent(WebCore::UIEvent* coreObject)
{
ASSERT(coreObject);
return WEBKIT_DOM_UI_EVENT(g_object_new(WEBKIT_DOM_TYPE_UI_EVENT, "core-object", coreObject, nullptr));
}
} // namespace WebKit
G_DEFINE_TYPE(WebKitDOMUIEvent, webkit_dom_ui_event, WEBKIT_DOM_TYPE_EVENT)
enum {
DOM_UI_EVENT_PROP_0,
DOM_UI_EVENT_PROP_VIEW,
DOM_UI_EVENT_PROP_DETAIL,
DOM_UI_EVENT_PROP_KEY_CODE,
DOM_UI_EVENT_PROP_CHAR_CODE,
DOM_UI_EVENT_PROP_LAYER_X,
DOM_UI_EVENT_PROP_LAYER_Y,
DOM_UI_EVENT_PROP_PAGE_X,
DOM_UI_EVENT_PROP_PAGE_Y,
};
static void webkit_dom_ui_event_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
{
WebKitDOMUIEvent* self = WEBKIT_DOM_UI_EVENT(object);
switch (propertyId) {
case DOM_UI_EVENT_PROP_VIEW:
g_value_set_object(value, webkit_dom_ui_event_get_view(self));
break;
case DOM_UI_EVENT_PROP_DETAIL:
g_value_set_long(value, webkit_dom_ui_event_get_detail(self));
break;
case DOM_UI_EVENT_PROP_KEY_CODE:
g_value_set_long(value, webkit_dom_ui_event_get_key_code(self));
break;
case DOM_UI_EVENT_PROP_CHAR_CODE:
g_value_set_long(value, webkit_dom_ui_event_get_char_code(self));
break;
case DOM_UI_EVENT_PROP_LAYER_X:
g_value_set_long(value, webkit_dom_ui_event_get_layer_x(self));
break;
case DOM_UI_EVENT_PROP_LAYER_Y:
g_value_set_long(value, webkit_dom_ui_event_get_layer_y(self));
break;
case DOM_UI_EVENT_PROP_PAGE_X:
g_value_set_long(value, webkit_dom_ui_event_get_page_x(self));
break;
case DOM_UI_EVENT_PROP_PAGE_Y:
g_value_set_long(value, webkit_dom_ui_event_get_page_y(self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
break;
}
}
static void webkit_dom_ui_event_class_init(WebKitDOMUIEventClass* requestClass)
{
GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
gobjectClass->get_property = webkit_dom_ui_event_get_property;
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_VIEW,
g_param_spec_object(
"view",
"UIEvent:view",
"read-only WebKitDOMDOMWindow* UIEvent:view",
WEBKIT_DOM_TYPE_DOM_WINDOW,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_DETAIL,
g_param_spec_long(
"detail",
"UIEvent:detail",
"read-only glong UIEvent:detail",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_KEY_CODE,
g_param_spec_long(
"key-code",
"UIEvent:key-code",
"read-only glong UIEvent:key-code",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_CHAR_CODE,
g_param_spec_long(
"char-code",
"UIEvent:char-code",
"read-only glong UIEvent:char-code",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_LAYER_X,
g_param_spec_long(
"layer-x",
"UIEvent:layer-x",
"read-only glong UIEvent:layer-x",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_LAYER_Y,
g_param_spec_long(
"layer-y",
"UIEvent:layer-y",
"read-only glong UIEvent:layer-y",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_PAGE_X,
g_param_spec_long(
"page-x",
"UIEvent:page-x",
"read-only glong UIEvent:page-x",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(
gobjectClass,
DOM_UI_EVENT_PROP_PAGE_Y,
g_param_spec_long(
"page-y",
"UIEvent:page-y",
"read-only glong UIEvent:page-y",
G_MINLONG, G_MAXLONG, 0,
WEBKIT_PARAM_READABLE));
}
static void webkit_dom_ui_event_init(WebKitDOMUIEvent* request)
{
UNUSED_PARAM(request);
}
void webkit_dom_ui_event_init_ui_event(WebKitDOMUIEvent* self, const gchar* type, gboolean canBubble, gboolean cancelable, WebKitDOMDOMWindow* view, glong detail)
{
WebCore::JSMainThreadNullState state;
g_return_if_fail(WEBKIT_DOM_IS_UI_EVENT(self));
g_return_if_fail(type);
g_return_if_fail(WEBKIT_DOM_IS_DOM_WINDOW(view));
WebCore::UIEvent* item = WebKit::core(self);
WTF::String convertedType = WTF::String::fromUTF8(type);
item->initUIEvent(convertedType, canBubble, cancelable, WebKit::toWindowProxy(view), detail);
}
WebKitDOMDOMWindow* webkit_dom_ui_event_get_view(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
return WebKit::kit(item->view());
}
glong webkit_dom_ui_event_get_detail(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = item->detail();
return result;
}
glong webkit_dom_ui_event_get_key_code(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = is<WebCore::KeyboardEvent>(*item) ? downcast<WebCore::KeyboardEvent>(*item).keyCode() : 0;
return result;
}
glong webkit_dom_ui_event_get_char_code(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = is<WebCore::KeyboardEvent>(*item) ? downcast<WebCore::KeyboardEvent>(*item).charCode() : 0;
return result;
}
glong webkit_dom_ui_event_get_layer_x(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = item->layerX();
return result;
}
glong webkit_dom_ui_event_get_layer_y(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = item->layerY();
return result;
}
glong webkit_dom_ui_event_get_page_x(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = item->pageX();
return result;
}
glong webkit_dom_ui_event_get_page_y(WebKitDOMUIEvent* self)
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_UI_EVENT(self), 0);
WebCore::UIEvent* item = WebKit::core(self);
glong result = item->pageY();
return result;
}
G_GNUC_END_IGNORE_DEPRECATIONS;
| 32.441281 | 162 | 0.709193 | mlcldh |
a0f935ea1b19f2035a51876111e7b2d8b81018d0 | 2,112 | hpp | C++ | include/linear_algebra/addition_traits_impl.hpp | shogun-toolbox/linger | 953628ef636b7f87f5cdcbc6dd7367a1476ebc39 | [
"BSD-3-Clause"
] | 1 | 2020-04-26T09:45:32.000Z | 2020-04-26T09:45:32.000Z | include/linear_algebra/addition_traits_impl.hpp | shogun-toolbox/linger | 953628ef636b7f87f5cdcbc6dd7367a1476ebc39 | [
"BSD-3-Clause"
] | 2 | 2019-11-12T16:09:31.000Z | 2020-09-09T18:52:43.000Z | include/linear_algebra/addition_traits_impl.hpp | shogun-toolbox/linger | 953628ef636b7f87f5cdcbc6dd7367a1476ebc39 | [
"BSD-3-Clause"
] | 3 | 2019-11-11T15:55:48.000Z | 2020-06-02T20:33:48.000Z | //==================================================================================================
// File: addition_traits_impl.hpp
//
// Summary: This header defines the static member functions of matrix_addition_traits that
// perform the actual arithmetic.
//==================================================================================================
//
#ifndef LINEAR_ALGEBRA_ADDITION_TRAITS_IMPL_HPP_DEFINED
#define LINEAR_ALGEBRA_ADDITION_TRAITS_IMPL_HPP_DEFINED
namespace STD_LA {
//=================================================================================================
// **** ADDITION TRAITS FUNCTION IMPLEMENTATION ****
//==================================================================================================
//
template<class OT, class ET1, class OT1, class ET2, class OT2>
inline auto
matrix_addition_traits<OT, vector<ET1, OT1>, vector<ET2, OT2>>::add
(vector<ET1, OT1> const& v1, vector<ET2, OT2> const& v2) -> result_type
{
PrintOperandTypes<result_type>("addition_traits", v1, v2);
result_type vr;
if constexpr (result_requires_resize(vr))
{
vr.resize(v1.elements());
}
transform(v1.begin(), v1.end(), v2.begin(), vr.begin(), [](auto lhs, auto rhs) { return lhs + rhs; });
return vr;
}
//------
//
template<class OT, class ET1, class OT1, class ET2, class OT2>
inline auto
matrix_addition_traits<OT, matrix<ET1, OT1>, matrix<ET2, OT2>>::add
(matrix<ET1, OT1> const& m1, matrix<ET2, OT2> const& m2) -> result_type
{
PrintOperandTypes<result_type>("addition_traits", m1, m2);
result_type mr{}; //- Braces here to avoid C4701 from MSVC
auto const rows = m1.rows();
auto const columns = m1.columns();
if constexpr (result_requires_resize(mr))
{
mr.resize(rows, columns);
}
for (auto i = 0; i < rows; ++i)
{
for (auto j = 0; j < columns; ++j)
{
mr(i, j) = m1(i, j) + m2(i, j);
}
}
return mr;
}
} //- STD_LA namespace
#endif //- LINEAR_ALGEBRA_ADDITION_TRAITS_IMPL_HPP_DEFINED
| 32 | 106 | 0.516098 | shogun-toolbox |
9d0486e86314187d85d328afb72c6cddbed79843 | 4,663 | cpp | C++ | solid/frame/aio/src/aioerror.cpp | vipalade/solidframe | cff130652127ca9607019b4db508bc67f8bbecff | [
"BSL-1.0"
] | 26 | 2015-08-25T16:07:58.000Z | 2019-07-05T15:21:22.000Z | solid/frame/aio/src/aioerror.cpp | vipalade/solidframe | cff130652127ca9607019b4db508bc67f8bbecff | [
"BSL-1.0"
] | 5 | 2016-10-15T22:55:15.000Z | 2017-09-19T12:41:10.000Z | solid/frame/aio/src/aioerror.cpp | vipalade/solidframe | cff130652127ca9607019b4db508bc67f8bbecff | [
"BSL-1.0"
] | 5 | 2016-09-15T10:34:52.000Z | 2018-10-30T11:46:46.000Z | // solid/frame/aio/src/aioerror.cpp
//
// Copyright (c) 2016 Valentin Palade (vipalade @ gmail . com)
//
// This file is part of SolidFrame framework.
//
// 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 "solid/frame/aio/aioerror.hpp"
#include <sstream>
namespace solid {
namespace frame {
namespace aio {
namespace {
enum {
ErrorResolverDirectE = 1,
ErrorResolverReverseE,
ErrorDatagramShutdownE,
ErrorDatagramSystemE,
ErrorDatagramCreateE,
ErrorDatagramSocketE,
ErrorStreamSystemE,
ErrorStreamSocketE,
ErrorStreamShutdownE,
ErrorTimerCancelE,
ErrorListenerSystemE,
ErrorListenerHangupE,
ErrorSecureContextE,
ErrorSecureSocketE,
ErrorSecureRecvE,
ErrorSecureSendE,
ErrorSecureAcceptE,
ErrorSecureConnectE,
ErrorSecureShutdownE,
};
class ErrorCategory : public ErrorCategoryT {
public:
ErrorCategory() {}
const char* name() const noexcept override
{
return "solid::frame::aio";
}
std::string message(int _ev) const override;
};
const ErrorCategory category;
std::string ErrorCategory::message(int _ev) const
{
std::ostringstream oss;
oss << "(" << name() << ":" << _ev << "): ";
switch (_ev) {
case 0:
oss << "Success";
break;
case ErrorResolverDirectE:
oss << "Resolver: direct";
break;
case ErrorResolverReverseE:
oss << "Resolver: reverse";
break;
case ErrorDatagramShutdownE:
oss << "Datagram: peer shutdown";
break;
case ErrorDatagramSystemE:
oss << "Datagram: system";
break;
case ErrorDatagramCreateE:
oss << "Datagram: socket create";
break;
case ErrorDatagramSocketE:
oss << "Datagram: socket";
break;
case ErrorStreamSystemE:
oss << "Stream: system";
break;
case ErrorStreamSocketE:
oss << "Stream: socket";
break;
case ErrorStreamShutdownE:
oss << "Stream: peer shutdown";
break;
case ErrorTimerCancelE:
oss << "Timer: canceled";
break;
case ErrorListenerSystemE:
oss << "Listener: system";
break;
case ErrorListenerHangupE:
oss << "Listener: Hangup";
break;
case ErrorSecureContextE:
oss << "Secure: context";
break;
case ErrorSecureSocketE:
oss << "Secure: socket";
break;
case ErrorSecureRecvE:
oss << "Secure: recv";
break;
case ErrorSecureSendE:
oss << "Secure: send";
break;
case ErrorSecureAcceptE:
oss << "Secure: accept";
break;
case ErrorSecureConnectE:
oss << "Secure: connect";
break;
case ErrorSecureShutdownE:
oss << "Secure: shutdown";
break;
default:
oss << "Unknown";
break;
}
return oss.str();
}
} //namespace
/*extern*/ const ErrorCodeT error_resolver_direct(ErrorResolverDirectE, category);
/*extern*/ const ErrorCodeT error_resolver_reverse(ErrorResolverReverseE, category);
/*extern*/ const ErrorConditionT error_datagram_shutdown(ErrorDatagramShutdownE, category);
/*extern*/ const ErrorConditionT error_datagram_system(ErrorDatagramSystemE, category);
/*extern*/ const ErrorConditionT error_datagram_create(ErrorDatagramCreateE, category);
/*extern*/ const ErrorConditionT error_datagram_socket(ErrorDatagramSocketE, category);
/*extern*/ const ErrorConditionT error_stream_system(ErrorStreamSystemE, category);
/*extern*/ const ErrorConditionT error_stream_socket(ErrorStreamSocketE, category);
/*extern*/ const ErrorConditionT error_stream_shutdown(ErrorStreamShutdownE, category);
/*extern*/ const ErrorConditionT error_timer_cancel(ErrorTimerCancelE, category);
/*extern*/ const ErrorConditionT error_listener_system(ErrorListenerSystemE, category);
/*extern*/ const ErrorConditionT error_listener_hangup(ErrorListenerHangupE, category);
/*extern*/ const ErrorCodeT error_secure_context(ErrorSecureContextE, category);
/*extern*/ const ErrorCodeT error_secure_socket(ErrorSecureSocketE, category);
/*extern*/ const ErrorCodeT error_secure_recv(ErrorSecureRecvE, category);
/*extern*/ const ErrorCodeT error_secure_send(ErrorSecureSendE, category);
/*extern*/ const ErrorCodeT error_secure_accept(ErrorSecureAcceptE, category);
/*extern*/ const ErrorCodeT error_secure_connect(ErrorSecureConnectE, category);
/*extern*/ const ErrorCodeT error_secure_shutdown(ErrorSecureShutdownE, category);
} //namespace aio
} //namespace frame
} //namespace solid
| 29.512658 | 91 | 0.693759 | vipalade |
9d07f99ee1e5dfbb512cbd22f470000495a773f3 | 131 | hpp | C++ | 75th_RR/cfgFactionClasses.hpp | cptbassbeard/Valhalla | 56868a4567898750526e1d7a66731f23c1b7d18e | [
"CC0-1.0"
] | null | null | null | 75th_RR/cfgFactionClasses.hpp | cptbassbeard/Valhalla | 56868a4567898750526e1d7a66731f23c1b7d18e | [
"CC0-1.0"
] | null | null | null | 75th_RR/cfgFactionClasses.hpp | cptbassbeard/Valhalla | 56868a4567898750526e1d7a66731f23c1b7d18e | [
"CC0-1.0"
] | null | null | null | class CfgFactionClasses
{
class 75th_RR
{
displayName = "75th Ranger Regiment";
priority = 5;
side = 1;
icon = "";
};
}; | 13.1 | 39 | 0.618321 | cptbassbeard |
9d09ab5479200b17fcdfacb91a37167835f67963 | 49,418 | cpp | C++ | Causality/Foregrounds.cpp | ArcEarth/SrInspection | 63c540d1736e323a0f409914e413cb237f03c5c9 | [
"MIT"
] | 3 | 2016-07-13T18:30:33.000Z | 2020-03-31T22:20:34.000Z | Causality/Foregrounds.cpp | ArcEarth/SrInspection | 63c540d1736e323a0f409914e413cb237f03c5c9 | [
"MIT"
] | null | null | null | Causality/Foregrounds.cpp | ArcEarth/SrInspection | 63c540d1736e323a0f409914e413cb237f03c5c9 | [
"MIT"
] | 5 | 2016-01-16T14:25:28.000Z | 2017-06-12T16:15:18.000Z | #include "pch_bullet.h"
#include <iostream>
#include <numeric>
#include "Foregrounds.h"
#include "CausalityApplication.h"
#include "Common\PrimitiveVisualizer.h"
#include "Common\Extern\cpplinq.hpp"
#include <boost\format.hpp>
using namespace Causality;
using namespace DirectX;
using namespace DirectX::Scene;
using namespace std;
using namespace Platform;
using namespace Eigen;
using namespace concurrency;
using namespace DirectX::Visualizers;
extern wstring ResourcesDirectory;
//std::unique_ptr<DirectX::GeometricPrimitive> HandPhysicalModel::s_pCylinder;
//std::unique_ptr<DirectX::GeometricPrimitive> HandPhysicalModel::s_pSphere;
const static wstring SkyBoxTextures[6] = {
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Right.dds"),
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Left.dds"),
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Top.dds"),
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Bottom.dds"),
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Front.dds"),
ResourcesDirectory + wstring(L"Textures\\SkyBox\\GrimmNight\\Back.dds"),
};
//std::unique_ptr<btBroadphaseInterface> pBroadphase = nullptr;
//// Set up the collision configuration and dispatcher
//std::unique_ptr<btDefaultCollisionConfiguration> pCollisionConfiguration = nullptr;
//std::unique_ptr<btCollisionDispatcher> pDispatcher = nullptr;
//// The actual physics solver
//std::unique_ptr<btSequentialImpulseConstraintSolver> pSolver = nullptr;
std::queue<std::unique_ptr<WorldBranch>> WorldBranch::BranchPool;
float ShapeSimiliarity(const Eigen::VectorXf& v1, const Eigen::VectorXf& v2)
{
auto v = v1 - v2;
//dis = sqrt(v.dot(v);
//1.414 - dis;
auto theta = XMScalarACosEst(v1.dot(v2) * XMScalarReciprocalSqrtEst(v1.dot(v1) * v2.dot(v2))); // Difference in angular [0,pi/4]
auto rhlo = abs(sqrt(v1.dot(v1)) - sqrtf(v2.dot(v2))); // Difference in length [0,sqrt(2)]
return 1.0f - 0.5f * (0.3f * rhlo / sqrtf(2.0f) + 0.7f * theta / (XM_PIDIV4));
}
Causality::WorldScene::WorldScene(const std::shared_ptr<DirectX::DeviceResources>& pResouce, const DirectX::ILocatable* pCamera)
: States(pResouce->GetD3DDevice())
, m_pCameraLocation(pCamera)
{
m_HaveHands = false;
m_showTrace = true;
LoadAsync(pResouce->GetD3DDevice());
}
WorldScene::~WorldScene()
{
}
const float fingerRadius = 0.006f;
const float fingerLength = 0.02f;
class XmlModelLoader
{
};
WorldBranch::WorldBranch()
{
pBroadphase.reset(new btDbvtBroadphase());
// Set up the collision configuration and dispatcher
pCollisionConfiguration.reset(new btDefaultCollisionConfiguration());
pDispatcher.reset(new btCollisionDispatcher(pCollisionConfiguration.get()));
// The actual physics solver
pSolver.reset(new btSequentialImpulseConstraintSolver());
// The world.
pDynamicsWorld.reset(new btDiscreteDynamicsWorld(pDispatcher.get(), pBroadphase.get(), pSolver.get(), pCollisionConfiguration.get()));
pDynamicsWorld->setGravity(btVector3(0, -1.0f, 0));
IsEnabled = false;
}
void Causality::WorldScene::LoadAsync(ID3D11Device* pDevice)
{
m_loadingComplete = false;
pBackground = nullptr;
//CD3D11_DEFAULT d;
//CD3D11_RASTERIZER_DESC Desc(d);
//Desc.MultisampleEnable = TRUE;
//ThrowIfFailed(pDevice->CreateRasterizerState(&Desc, &pRSState));
concurrency::task<void> load_models([this, pDevice]() {
{
lock_guard<mutex> guard(m_RenderLock);
WorldBranch::InitializeBranchPool(1);
WorldTree = WorldBranch::DemandCreate("Root");
//std::vector<AffineTransform> subjectTrans(30);
//subjectTrans.resize(20);
//for (size_t i = 0; i < 20; i++)
//{
// subjectTrans[i].Scale = XMVectorReplicate(1.1f + 0.15f * i);// XMMatrixTranslation(0, 0, i*(-150.f));
//}
//WorldTree->Fork(subjectTrans);
WorldTree->Enable(DirectX::AffineTransform::Identity());
}
//m_pFramesPool.reset(new WorldBranchPool);
//m_pFramesPool->Initialize(30);
//{
// lock_guard<mutex> guard(m_RenderLock);
// for (size_t i = 0; i < 30; i++)
// {
// m_StateFrames.push_back(m_pFramesPool->DemandCreate());
// auto pFrame = m_StateFrames.back();
// //pFrame->Initialize();
// pFrame->SubjectTransform.Scale = XMVectorReplicate(1.0f + 0.1f * i);// XMMatrixTranslation(0, 0, i*(-150.f));
// }
// m_StateFrames.front()->Enable(DirectX::AffineTransform::Identity());
//}
auto Directory = App::Current()->GetResourcesDirectory();
auto ModelDirectory = Directory / "Models";
auto TextureDirectory = Directory / "Textures";
auto texDir = TextureDirectory.wstring();
pEffect = std::make_shared<BasicEffect>(pDevice);
pEffect->SetVertexColorEnabled(false);
pEffect->SetTextureEnabled(true);
//pEffect->SetLightingEnabled(true);
pEffect->EnableDefaultLighting();
{
void const* shaderByteCode;
size_t byteCodeLength;
pEffect->GetVertexShaderBytecode(&shaderByteCode, &byteCodeLength);
pInputLayout = CreateInputLayout<VertexPositionNormalTexture>(pDevice, shaderByteCode, byteCodeLength);
}
//pBackground = std::make_unique<SkyDome>(pDevice, SkyBoxTextures);
auto sceneFile = Directory / "Foregrounds.xml";
tinyxml2::XMLDocument sceneDoc;
sceneDoc.LoadFile(sceneFile.string().c_str());
auto scene = sceneDoc.FirstChildElement("scene");
auto node = scene->FirstChildElement();
while (node)
{
if (!strcmp(node->Name(), "obj"))
{
auto path = node->Attribute("src");
if (path != nullptr && strlen(path) != 0)
{
auto pModel = std::make_shared<ShapedGeomrtricModel>();
GeometryModel::CreateFromObjFile(pModel.get(), pDevice, (ModelDirectory / path).wstring(), texDir);
XMFLOAT3 v = pModel->BoundOrientedBox.Extents;
v.y /= v.x;
v.z /= v.x;
m_ModelFeatures[pModel->Name] = Eigen::Vector2f(v.y, v.z);
std::cout << "[Model] f(" << pModel->Name << ") = " << m_ModelFeatures[pModel->Name] << std::endl;
float scale = 1.0f;
float mass = 1.0f;
Vector3 pos;
auto attr = node->Attribute("scale");
if (attr != nullptr)
{
stringstream ss(attr);
ss >> scale;
//model->SetScale(XMVectorReplicate(scale));
}
attr = node->Attribute("position");
if (attr != nullptr)
{
stringstream ss(attr);
char ch;
ss >> pos.x >> ch >> pos.y >> ch >> pos.z;
//model->SetPosition(pos);
}
attr = node->Attribute("mass");
if (attr)
mass = (float) atof(attr);
AddObject(pModel, mass, pos, DirectX::Quaternion::Identity, DirectX::Vector3(scale));
//auto pShape = model->CreateCollisionShape();
//pShape->setLocalScaling(btVector3(scale, scale, scale));
//btVector3 minb, maxb;
//model->InitializePhysics(pDynamicsWorld, pShape, mass, pos, XMQuaternionIdentity());
//model->GetBulletRigid()->setFriction(1.0f);
//{
// std::lock_guard<mutex> guard(m_RenderLock);
// Models.push_back(model);
//}
}
}
else if (!strcmp(node->Name(), "cube"))
{
Vector3 extent(1.0f);
Vector3 pos;
Color color(255, 255, 255, 255);
string name("cube");
float mass = 1.0f;
auto attr = node->Attribute("extent");
if (attr != nullptr)
{
stringstream ss(attr);
char ch;
ss >> extent.x >> ch >> extent.y >> ch >> extent.z;
}
attr = node->Attribute("position");
if (attr != nullptr)
{
stringstream ss(attr);
char ch;
ss >> pos.x >> ch >> pos.y >> ch >> pos.z;
}
attr = node->Attribute("color");
if (attr != nullptr)
{
stringstream ss(attr);
char ch;
ss >> color.x >> ch >> color.y >> ch >> color.z;
if (!ss.eof())
ss >> ch >> color.w;
color = color.ToVector4() / 255;
color.Saturate();
}
attr = node->Attribute("name");
if (attr)
name = attr;
attr = node->Attribute("mass");
if (attr)
mass = (float) atof(attr);
auto pModel = make_shared<CubeModel>(name, extent, (XMVECTOR) color);
XMFLOAT3 v = pModel->BoundOrientedBox.Extents;
v.y /= v.x;
v.z /= v.x;
m_ModelFeatures[pModel->Name] = Eigen::Vector2f(v.y, v.z);
AddObject(pModel, mass, pos, DirectX::Quaternion::Identity, DirectX::Vector3::One);
//auto pShape = pModel->CreateCollisionShape();
//pModel->InitializePhysics(nullptr, pShape, mass, pos);
//pModel->Enable(pDynamicsWorld);
//pModel->GetBulletRigid()->setFriction(1.0f);
//{
// std::lock_guard<mutex> guard(m_RenderLock);
// Models.push_back(pModel);
//}
}
node = node->NextSiblingElement();
}
m_loadingComplete = true;
});
}
void Causality::WorldScene::SetViewIdenpendntCameraPosition(const DirectX::ILocatable * pCamera)
{
m_pCameraLocation = pCamera;
}
void Causality::WorldScene::Render(ID3D11DeviceContext * pContext)
{
if (pBackground)
pBackground->Render(pContext);
{
pContext->IASetInputLayout(pInputLayout.Get());
auto pAWrap = States.AnisotropicWrap();
pContext->PSSetSamplers(0, 1, &pAWrap);
pContext->RSSetState(pRSState.Get());
std::lock_guard<mutex> guard(m_RenderLock);
BoundingOrientedBox modelBox;
using namespace cpplinq;
// Render models
for (const auto& model : Models)
{
auto superposition = ModelStates[model->Name];
for (const auto& state : superposition)
{
auto mat = state.TransformMatrix();
model->LocalMatrix = state.TransformMatrix(); //.first->GetRigidTransformMatrix();
model->Opticity = state.Probability; //state.second;
model->BoundOrientedBox.Transform(modelBox, mat);
// Render if in the view frustum
if (ViewFrutum.Contains(modelBox) != ContainmentType::DISJOINT)
model->Render(pContext, pEffect.get());
}
}
for (const auto& branch : WorldTree->leaves())
{
//Subjects
for (const auto& item : branch.Subjects)
{
if (item.second)
{
item.second->Opticity = branch.Liklyhood();
item.second->Render(pContext, nullptr);
}
}
}
}
g_PrimitiveDrawer.Begin();
Vector3 conners[8];
ViewFrutum.GetCorners(conners);
DrawBox(conners, Colors::Pink);
BoundingOrientedBox obox;
BoundingBox box;
{
//Draw axias
DrawAxis();
//g_PrimitiveDrawer.DrawQuad({ 1.0f,0,1.0f }, { -1.0f,0,1.0f }, { -1.0f,0,-1.0f }, { 1.0f,0,-1.0f }, Colors::Pink);
auto& fh = m_HandDescriptionFeature;
{
std::lock_guard<mutex> guard(m_RenderLock);
auto s = Models.size();
if (m_HaveHands)
std::cout << "Detail Similarity = {";
for (size_t i = 0; i < s; i++)
{
const auto& model = Models[i];
obox = model->GetOrientedBoundingBox();
if (ViewFrutum.Contains(obox) != ContainmentType::DISJOINT)
{
obox.GetCorners(conners);
DrawBox(conners, DirectX::Colors::DarkGreen);
}
if (m_HaveHands)
{
auto fm = m_ModelFeatures[model->Name];
auto similarity = ShapeSimiliarity(fm, fh);
m_ModelDetailSimilarity[model->Name] = similarity;
std::cout << model->Name << ':' << similarity << " , ";
Color c = Color::Lerp({ 1,0,0 }, { 0,1,0 }, similarity);
for (size_t i = 0; i < 8; i++)
{
g_PrimitiveDrawer.DrawSphere(conners[i], 0.005f * similarity, c);
}
}
auto pModel = dynamic_cast<CompositeModel*>(model.get());
XMMATRIX transform = model->GetWorldMatrix();
if (pModel)
{
for (const auto& part : pModel->Parts)
{
part->BoundOrientedBox.Transform(obox, transform);
if (ViewFrutum.Intersects(obox))
{
obox.GetCorners(conners);
DrawBox(conners, DirectX::Colors::Orange);
}
}
}
}
}
if (m_HaveHands)
std::cout << '}' << std::endl;
}
if (m_HaveHands)
{
//for (auto& pRigid : m_HandRigids)
//{
// g_PrimitiveDrawer.DrawSphere(pRigid->GetPosition(), 0.01f, Colors::Pink);
//}
auto pCamera = App::Current()->GetPrimaryCamera();
XMMATRIX leap2world = m_FrameTransform;// XMMatrixScalingFromVector(XMVectorReplicate(0.001f)) * XMMatrixTranslation(0,0,-1.0) * XMMatrixRotationQuaternion(pCamera->GetOrientation()) * XMMatrixTranslationFromVector((XMVECTOR)pCamera->GetPosition());
std::lock_guard<mutex> guard(m_HandFrameMutex);
for (const auto& hand : m_Frame.hands())
{
auto palmPosition = XMVector3Transform(hand.palmPosition().toVector3<Vector3>(), leap2world);
g_PrimitiveDrawer.DrawSphere(palmPosition, 0.02f, Colors::YellowGreen);
//for (const auto& finger : hand.fingers())
//{
// for (size_t i = 0; i < 4; i++)
// {
// const auto & bone = finger.bone((Leap::Bone::Type)i);
// XMVECTOR bJ = XMVector3Transform(bone.prevJoint().toVector3<Vector3>(), leap2world);
// XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
// //if (i == 0)
// // g_PrimitiveDrawer.DrawSphere(bJ, 0.01f, DirectX::Colors::Lime);
// //// The unit of leap is millimeter
// //g_PrimitiveDrawer.DrawSphere(eJ, 0.01f, DirectX::Colors::Lime);
// g_PrimitiveDrawer.DrawLine(bJ, eJ, DirectX::Colors::White);
// }
//}
}
// NOT VALIAD!~!!!!!
//if (m_HandTrace.size() > 0 && m_showTrace)
//{
// std::lock_guard<mutex> guard(m_RenderLock);
// //auto pJoints = m_HandTrace.linearize();
// m_CurrentHandBoundingBox.GetCorners(conners);
// DrawBox(conners, Colors::LimeGreen);
// m_HandTraceBoundingBox.GetCorners(conners);
// DrawBox(conners, Colors::YellowGreen);
// m_HandTraceModel.Primitives.clear();
// for (int i = m_HandTrace.size() - 1; i >= std::max<int>(0, (int) m_HandTrace.size() - TraceLength); i--)
// {
// const auto& h = m_HandTrace[i];
// float radius = (i + 1 - std::max<int>(0, m_HandTrace.size() - TraceLength)) / (std::min<float>(m_HandTrace.size(), TraceLength));
// for (size_t j = 0; j < h.size(); j++)
// {
// //m_HandTraceModel.Primitives.emplace_back(h[j], 0.02f);
// g_PrimitiveDrawer.DrawSphere(h[j], 0.005f * radius, Colors::LimeGreen);
// }
// }
//}
}
g_PrimitiveDrawer.End();
//if (m_HandTrace.size() > 0)
//{
// if (!pBatch)
// {
// pBatch = std::make_unique<PrimitiveBatch<VertexPositionNormal>>(pContext, 204800,40960);
// }
// m_HandTraceModel.SetISO(0.33333f);
// m_HandTraceModel.Update();
// m_HandTraceModel.Tessellate(m_HandTraceVertices, m_HandTraceIndices, 0.005f);
// pBatch->Begin();
// pEffect->SetDiffuseColor(Colors::LimeGreen);
// //pEffect->SetEmissiveColor(Colors::LimeGreen);
// pEffect->SetTextureEnabled(false);
// pEffect->SetWorld(XMMatrixIdentity());
// pEffect->Apply(pContext);
// pBatch->DrawIndexed(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, m_HandTraceIndices.data(), m_HandTraceIndices.size(), m_HandTraceVertices.data(), m_HandTraceVertices.size());
// pBatch->End();
//}
}
void Causality::WorldScene::DrawAxis()
{
g_PrimitiveDrawer.DrawSphere({ 0,0,0,0.02 }, Colors::Red);
g_PrimitiveDrawer.DrawLine({ -5,0,0 }, { 5,0,0 }, Colors::Red);
g_PrimitiveDrawer.DrawLine({ 0,-5,0 }, { 0,5,0 }, Colors::Green);
g_PrimitiveDrawer.DrawLine({ 0,0,-5 }, { 0,0,5 }, Colors::Blue);
g_PrimitiveDrawer.DrawTriangle({ 5.05f,0,0 }, { 4.95,0.05,0 }, { 4.95,-0.05,0 }, Colors::Red);
g_PrimitiveDrawer.DrawTriangle({ 5.05f,0,0 }, { 4.95,-0.05,0 }, { 4.95,0.05,0 }, Colors::Red);
g_PrimitiveDrawer.DrawTriangle({ 5.05f,0,0 }, { 4.95,0,0.05 }, { 4.95,0,-0.05 }, Colors::Red);
g_PrimitiveDrawer.DrawTriangle({ 5.05f,0,0 }, { 4.95,0,-0.05 }, { 4.95,0,0.05 }, Colors::Red);
g_PrimitiveDrawer.DrawTriangle({ 0,5.05f,0 }, { -0.05,4.95,0 }, { 0.05,4.95,0 }, Colors::Green);
g_PrimitiveDrawer.DrawTriangle({ 0,5.05f,0 }, { 0.05,4.95,0 }, { -0.05,4.95,0 }, Colors::Green);
g_PrimitiveDrawer.DrawTriangle({ 0,5.05f,0 }, { 0.0,4.95,-0.05 }, { 0,4.95,0.05 }, Colors::Green);
g_PrimitiveDrawer.DrawTriangle({ 0,5.05f,0 }, { 0.0,4.95,0.05 }, { 0,4.95,-0.05 }, Colors::Green);
g_PrimitiveDrawer.DrawTriangle({ 0,0,5.05f }, { 0.05,0,4.95 }, { -0.05,0,4.95 }, Colors::Blue);
g_PrimitiveDrawer.DrawTriangle({ 0,0,5.05f }, { -0.05,0,4.95 }, { 0.05,0,4.95 }, Colors::Blue);
g_PrimitiveDrawer.DrawTriangle({ 0,0,5.05f }, { 0,0.05,4.95 }, { 0,-0.05,4.95 }, Colors::Blue);
g_PrimitiveDrawer.DrawTriangle({ 0,0,5.05f }, { 0,-0.05,4.95 }, { 0,0.05,4.95 }, Colors::Blue);
}
void Causality::WorldScene::DrawBox(DirectX::SimpleMath::Vector3 conners [], DirectX::CXMVECTOR color)
{
g_PrimitiveDrawer.DrawLine(conners[0], conners[1], color);
g_PrimitiveDrawer.DrawLine(conners[1], conners[2], color);
g_PrimitiveDrawer.DrawLine(conners[2], conners[3], color);
g_PrimitiveDrawer.DrawLine(conners[3], conners[0], color);
g_PrimitiveDrawer.DrawLine(conners[3], conners[7], color);
g_PrimitiveDrawer.DrawLine(conners[2], conners[6], color);
g_PrimitiveDrawer.DrawLine(conners[1], conners[5], color);
g_PrimitiveDrawer.DrawLine(conners[0], conners[4], color);
g_PrimitiveDrawer.DrawLine(conners[4], conners[5], color);
g_PrimitiveDrawer.DrawLine(conners[5], conners[6], color);
g_PrimitiveDrawer.DrawLine(conners[6], conners[7], color);
g_PrimitiveDrawer.DrawLine(conners[7], conners[4], color);
}
void XM_CALLCONV Causality::WorldScene::UpdateViewMatrix(DirectX::FXMMATRIX view, DirectX::CXMMATRIX projection)
{
if (pEffect)
{
pEffect->SetView(view);
pEffect->SetProjection(projection);
}
if (pBackground)
{
pBackground->UpdateViewMatrix(view,projection);
}
g_PrimitiveDrawer.SetView(view);
g_PrimitiveDrawer.SetProjection( projection);
// BoundingFrustum is assumpt Left-Handed
BoundingFrustumExtension::CreateFromMatrixRH(ViewFrutum, projection);
//BoundingFrustum::CreateFromMatrix(ViewFrutum, projection);
// Fix the RH-projection matrix
//XMStoreFloat4((XMFLOAT4*) &ViewFrutum.RightSlope, -XMLoadFloat4((XMFLOAT4*) &ViewFrutum.RightSlope));
//XMStoreFloat2((XMFLOAT2*) &ViewFrutum.Near, -XMLoadFloat2((XMFLOAT2*) &ViewFrutum.Near));
//ViewFrutum.LeftSlope = -ViewFrutum.LeftSlope;
//ViewFrutum.RightSlope = -ViewFrutum.RightSlope;
//ViewFrutum.TopSlope = -ViewFrutum.TopSlope;
//ViewFrutum.BottomSlope = -ViewFrutum.BottomSlope;
//ViewFrutum.Near = -ViewFrutum.Near;
//ViewFrutum.Far = -ViewFrutum.Far;
XMVECTOR det;
auto invView = view;
//invView.r[2] = -invView.r[2];
invView = XMMatrixInverse(&det, invView);
//invView.r[2] = -invView.r[2];
//XMVECTOR temp = invView.r[2];
//invView.r[2] = invView.r[1];
//invView.r[1] = temp;
ViewFrutum.Transform(ViewFrutum,invView);
// Fix the RH-inv-view-matrix to LH-equalulent by swap row-y with row-z
//XMStoreFloat3(&ViewFrutum.Origin, invView.r[3]);
//XMStoreFloat4(&ViewFrutum.Orientation, XMQuaternionRotationMatrix(invView));;
//for (const auto& item : m_HandModels)
//{
// if (item.second)
// item.second->UpdateViewMatrix(view);
//}
}
//void XM_CALLCONV Causality::WorldScene::UpdateProjectionMatrix(DirectX::FXMMATRIX projection)
//{
// if (pEffect)
// pEffect->SetProjection(projection);
// if (pBackground)
// pBackground->UpdateProjectionMatrix(projection);
//
// g_PrimitiveDrawer.SetProjection(projection);
//}
void Causality::WorldScene::UpdateAnimation(StepTimer const & timer)
{
{
lock_guard<mutex> guard(m_RenderLock);
using namespace cpplinq;
using namespace std::placeholders;
float stepTime = (float) timer.GetElapsedSeconds();
WorldTree->Evolution(stepTime, m_Frame, m_FrameTransform);
ModelStates = WorldTree->CaculateSuperposition();
}
if (m_HandTrace.size() > 0)
{
{ // Critia section
std::lock_guard<mutex> guard(m_HandFrameMutex);
const int plotSize = 45;
BoundingOrientedBox::CreateFromPoints(m_CurrentHandBoundingBox, m_HandTrace.back().size(), m_HandTrace.back().data(), sizeof(Vector3));
m_TracePoints.clear();
Color color = Colors::LimeGreen;
for (int i = m_HandTrace.size() - 1; i >= std::max(0, (int) m_HandTrace.size() - plotSize); i--)
{
const auto& h = m_HandTrace[i];
//float radius = (i + 1 - std::max(0U, m_HandTrace.size() - plotSize)) / (std::min<float>(m_HandTrace.size(), plotSize));
for (size_t j = 0; j < h.size(); j++)
{
//g_PrimitiveDrawer.DrawSphere(h[j], 0.005 * radius, color);
m_TracePoints.push_back(h[j]);
}
}
//for (const auto& pModel : Children)
//{
// //btCollisionWorld::RayResultCallback
// auto pRigid = dynamic_cast<PhysicalGeometryModel*>(pModel.get());
// pRigid->GetBulletRigid()->checkCollideWith()
//}
//auto pBat = dynamic_cast<PhysicalGeometryModel*>(Children[0].get());
//pBat->SetPosition(vector_cast<Vector3>(m_Frame.hands().frontmost().palmPosition()));
}
CreateBoundingOrientedBoxFromPoints(m_HandTraceBoundingBox, m_TracePoints.size(), m_TracePoints.data(), sizeof(Vector3));
XMFLOAT3 v = m_HandTraceBoundingBox.Extents;
m_HandDescriptionFeature = Eigen::Vector2f(v.y / v.x, v.z / v.x);
// ASSUMPTION: Extends is sorted from!
//XMMATRIX invTrans = XMMatrixAffineTransformation(g_XMOne / XMVectorReplicate(m_HandTraceBoundingBox.Extents.x), XMVectorZero(), XMQuaternionInverse(XMLoadFloat4(&m_HandTraceBoundingBox.Orientation)), -XMLoadFloat3(&m_HandTraceBoundingBox.Center));
//int sampleCount = std::min<int>(m_TraceSamples.size(), TraceLength)*m_TraceSamples[0].size();
//for (const auto& model : Children)
//{
// auto pModel = dynamic_cast<Model*>(model.get());
// auto inCount = 0;
// if (pModel)
// {
// auto obox = model->GetOrientedBoundingBox();
// XMMATRIX fowTrans = XMMatrixAffineTransformation(XMVectorReplicate(obox.Extents.x), XMVectorZero(), XMQuaternionIdentity(), XMVectorZero());
// fowTrans = invTrans * fowTrans;
// auto pSample = m_TraceSamples.back().data() + m_TraceSamples.back().size()-1;
// for (size_t i = 0; i < sampleCount; i++)
// {
// const auto& point = pSample[-i];
// XMVECTOR p = XMVector3Transform(point, fowTrans);
// int j;
// for ( j = 0; j < pModel->Parts.size(); j++)
// {
// if (pModel->Parts[j].BoundOrientedBox.Contains(p))
// break;
// }
// if (j >= pModel->Parts.size())
// inCount++;
// }
// }
// m_ModelDetailSimilarity[model->Name] = (float) inCount / (float)sampleCount;
//}
}
//if (pGroundRigid)
// pGroundRigid->setLinearVelocity({ 0,-1.0f,0 });
//pDynamicsWorld->stepSimulation(timer.GetElapsedSeconds(), 10);
//for (auto& obj : Children)
//{
// auto s = (rand() % 1000) / 1000.0;
// obj->Rotate(XMQuaternionRotationRollPitchYaw(0, 0.5f * timer.GetElapsedSeconds(), 0));
//}
}
void Causality::WorldScene::OnHandsTracked(const UserHandsEventArgs & e)
{
m_HaveHands = true;
//const auto& hand = e.sender.frame().hands().frontmost();
//size_t i = 0;
//
//XMMATRIX leap2world = e.toWorldTransform;
//for (const auto& finger : hand.fingers())
//{
// XMVECTOR bJ = XMVector3Transform(finger.bone((Leap::Bone::Type)0).prevJoint().toVector3<Vector3>(), leap2world);
// auto pState = m_HandRigids[i]->GetBulletRigid()->getMotionState();
// auto transform = btTransform::getIdentity();
// transform.setOrigin(vector_cast<btVector3>(bJ));
// if (!pState)
// {
// pState = new btDefaultMotionState(transform);
// m_HandRigids[i]->GetBulletRigid()->setMotionState(pState);
// }
// else
// pState->setWorldTransform(transform);
//
// i++;
// for (size_t boneIdx = 0; boneIdx < 4; boneIdx++) // bone idx
// {
// const auto & bone = finger.bone((Leap::Bone::Type)boneIdx);
// XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
// auto pState = m_HandRigids[i]->GetBulletRigid()->getMotionState();
// auto transform = btTransform::getIdentity();
// transform.setOrigin(vector_cast<btVector3>(eJ));
// if (!pState)
// {
// pState = new btDefaultMotionState(transform);
// m_HandRigids[i]->GetBulletRigid()->setMotionState(pState);
// }
// else
// pState->setWorldTransform(transform);
// i++;
// }
//}
m_Frame = e.sender.frame();
for (auto& branch : WorldTree->leaves())
{
for (const auto& hand : m_Frame.hands())
{
auto & subjects = branch.Subjects;
branch.AddSubjectiveObject(hand,e.toWorldTransform);
//if (!subjects[hand.id()])
//{
// subjects[hand.id()].reset(
// new HandPhysicalModel(
// pFrame->pDynamicsWorld,
// hand, e.toWorldTransform,
// pFrame->SubjectTransform)
// );
// //for (const auto& itm : pFrame->Objects)
// //{
// // const auto& pObj = itm.second;
// // if (!pObj->GetBulletRigid()->isStaticOrKinematicObject())
// // {
// // for (const auto& bone : subjects[hand.id()]->Rigids())
// // pObj->GetBulletRigid()->setIgnoreCollisionCheck(bone.get(), false);
// // }
// //}
//}
}
}
//for (size_t j = 0; j < i; j++)
//{
// pDynamicsWorld->addRigidBody(m_HandRigids[j]->GetBulletRigid());
// m_HandRigids[j]->GetBulletRigid()->setGravity({ 0,0,0 });
//}
}
void Causality::WorldScene::OnHandsTrackLost(const UserHandsEventArgs & e)
{
m_Frame = e.sender.frame();
m_FrameTransform = e.toWorldTransform;
if (m_Frame.hands().count() == 0)
{
m_HaveHands = false;
std::lock_guard<mutex> guard(m_HandFrameMutex);
m_HandTrace.clear();
m_TraceSamples.clear();
WorldTree->Collapse();
//for (const auto &pRigid : m_HandRigids)
//{
// pDynamicsWorld->removeRigidBody(pRigid->GetBulletRigid());
//}
}
}
void Causality::WorldScene::OnHandsMove(const UserHandsEventArgs & e)
{
std::lock_guard<mutex> guard(m_HandFrameMutex);
m_Frame = e.sender.frame();
m_FrameTransform = e.toWorldTransform;
XMMATRIX leap2world = m_FrameTransform;
//std::array<DirectX::Vector3, 25> joints;
std::vector<DirectX::BoundingOrientedBox> handBoxes;
float fingerStdev = 0.02f;
std::random_device rd;
std::mt19937 gen(rd());
std::normal_distribution<float> normalDist(0, fingerStdev);
std::uniform_real<float> uniformDist;
// Caculate moving trace
int handIdx = 0;
for (const auto& hand : m_Frame.hands())
{
int fingerIdx = 0; // hand idx
m_HandTrace.emplace_back();
m_TraceSamples.emplace_back();
auto& samples = m_TraceSamples.back();
auto& joints = m_HandTrace.back();
for (const auto& finger : hand.fingers())
{
XMVECTOR bJ = XMVector3Transform(finger.bone((Leap::Bone::Type)0).prevJoint().toVector3<Vector3>(), leap2world);
joints[fingerIdx * 5] = bJ;
for (size_t boneIdx = 0; boneIdx < 4; boneIdx++) // bone idx
{
const auto & bone = finger.bone((Leap::Bone::Type)boneIdx);
XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
joints[fingerIdx * 5 + boneIdx + 1] = eJ;
//auto dir = eJ - bJ;
//float dis = XMVectorGetX(XMVector3Length(dir));
//if (abs(dis) < 0.001)
// continue;
//XMVECTOR rot = XMQuaternionRotationVectorToVector(g_XMIdentityR1, dir);
//bJ = eJ;
//for (size_t k = 0; k < 100; k++) // bone idx
//{
// float x = normalDist(gen);
// float h = uniformDist(gen);
// float z = normalDist(gen);
// XMVECTOR disp = XMVectorSet(x, h*dis, z, 1);
// disp = XMVector3Rotate(disp, rot);
// disp += bJ;
// samples[(fingerIdx * 4 + boneIdx) * 100 + k] = disp;
//}
}
fingerIdx++;
}
handIdx++;
while (m_HandTrace.size() > 60)
{
m_HandTrace.pop_front();
//m_TraceSamples.pop_front();
}
// Cone intersection test section
//Vector3 rayEnd = XMVector3Transform(hand.palmPosition().toVector3<Vector3>(), leap2world);
//Vector3 rayBegin = m_pCameraLocation->GetPosition();
//auto pConeShape = new btConeShape(100, XM_PI / 16 * 100);
//auto pCollisionCone = new btCollisionObject();
//pCollisionCone->setCollisionShape(pConeShape);
//btTransform trans(
// vector_cast<btQuaternion>(XMQuaternionRotationVectorToVector(g_XMIdentityR1, rayEnd - rayBegin)),
// vector_cast<btVector3>(rayBegin));
//pCollisionCone->setWorldTransform(trans);
//class Callback : public btDynamicsWorld::ContactResultCallback
//{
//public:
// const IModelNode* pModel;
// Callback() {}
// void SetModel(const IModelNode* pModel)
// {
// this->pModel = pModel;
// }
// Callback(const IModelNode* pModel)
// : pModel(pModel)
// {
// }
// virtual btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, int index1)
// {
// cout << "point frustrum contact with "<< pModel->Name << endl;
// return 0;
// }
//};
//static map<string, Callback> callbackTable;
//for (const auto& model : Children)
//{
// auto pRigid = dynamic_cast<PhysicalRigid*>(model.get());
// callbackTable[model->Name].SetModel(model.get());
// pDynamicsWorld->contactPairTest(pRigid->GetBulletRigid(), pCollisionCone, callbackTable[model->Name]);
//}
}
//int i = 0;
//const auto& hand = m_Frame.hands().frontmost();
//for (const auto& finger : hand.fingers())
//{
// XMVECTOR bJ = XMVector3Transform(finger.bone((Leap::Bone::Type)0).prevJoint().toVector3<Vector3>(), leap2world);
// auto pState = m_HandRigids[i]->GetBulletRigid()->getMotionState();
// auto transform = btTransform::getIdentity();
// transform.setOrigin(vector_cast<btVector3>(bJ));
// m_HandRigids[i]->GetBulletRigid()->proceedToTransform(transform);
// i++;
// for (size_t boneIdx = 0; boneIdx < 4; boneIdx++) // bone idx
// {
// const auto & bone = finger.bone((Leap::Bone::Type)boneIdx);
// XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
// auto pState = m_HandRigids[i]->GetBulletRigid()->getMotionState();
// auto transform = btTransform::getIdentity();
// transform.setOrigin(vector_cast<btVector3>(eJ));
// m_HandRigids[i]->GetBulletRigid()->proceedToTransform(transform);
// i++;
// }
//}
std::cout << "[Leap] Hands Move." << std::endl;
}
void Causality::WorldScene::OnKeyDown(const KeyboardEventArgs & e)
{
}
void Causality::WorldScene::OnKeyUp(const KeyboardEventArgs & e)
{
if (e.Key == 'T')
m_showTrace = !m_showTrace;
}
void Causality::WorldScene::AddObject(const std::shared_ptr<IModelNode>& pModel, float mass, const DirectX::Vector3 & Position, const DirectX::Quaternion & Orientation, const Vector3 & Scale)
{
lock_guard<mutex> guard(m_RenderLock);
Models.push_back(pModel);
auto pShaped = dynamic_cast<IShaped*>(pModel.get());
auto pShape = pShaped->CreateCollisionShape();
pShape->setLocalScaling(vector_cast<btVector3>(Scale));
WorldTree->AddDynamicObject(pModel->Name, pShape, mass, Position, Orientation);
//for (const auto& pFrame : m_StateFrames)
//{
// auto pObject = std::shared_ptr<PhysicalRigid>(new PhysicalRigid());
// pObject->InitializePhysics(pFrame->pDynamicsWorld, pShape, mass, Position, Orientation);
// pObject->GetBulletRigid()->setFriction(1.0f);
// pObject->GetBulletRigid()->setDamping(0.8, 0.9);
// pObject->GetBulletRigid()->setRestitution(0.0);
// pFrame->Objects[pModel->Name] = pObject;
//}
}
std::pair<DirectX::Vector3, DirectX::Quaternion> XM_CALLCONV CaculateCylinderTransform(FXMVECTOR P1, FXMVECTOR P2)
{
std::pair<DirectX::Vector3, DirectX::Quaternion> trans;
auto center = XMVectorAdd(P1, P2);
center = XMVectorMultiply(center, g_XMOneHalf);
auto dir = XMVectorSubtract(P1, P2);
auto scale = XMVector3Length(dir);
XMVECTOR rot;
if (XMVector4Equal(dir, g_XMZero))
rot = XMQuaternionIdentity();
else
rot = XMQuaternionRotationVectorToVector(g_XMIdentityR1.v, dir);
trans.first = center;
trans.second = rot;
return trans;
}
XMMATRIX Causality::HandPhysicalModel::CaculateLocalMatrix(const Leap::Hand & hand, const DirectX::Matrix4x4 & leapTransform)
{
XMVECTOR palmCenter = hand.palmPosition().toVector3<Vector3>();
return XMMatrixScalingFromCenter(m_InheritTransform.Scale, palmCenter) * ((RigidTransform&) m_InheritTransform).TransformMatrix() * (XMMATRIX) leapTransform;
}
Causality::HandPhysicalModel::HandPhysicalModel
(const std::shared_ptr<btDynamicsWorld> &pWorld,
const Leap::Hand & hand, const DirectX::Matrix4x4 & leapTransform,
const DirectX::AffineTransform &inheritTransform)
: m_Hand(hand)
{
Color.G(0.5f);
Color.B(0.5f);
Id = hand.id();
m_InheritTransform = inheritTransform;
LocalMatrix = CaculateLocalMatrix(hand, leapTransform);
XMMATRIX leap2world = LocalMatrix;
int j = 0;
for (const auto& finger : m_Hand.fingers())
{
for (size_t i = 0; i < 4; i++)
{
const auto & bone = finger.bone((Leap::Bone::Type)i);
XMVECTOR bJ = XMVector3Transform(bone.prevJoint().toVector3<Vector3>(), leap2world);
XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
m_Bones[i + j * 4].first = bJ;
m_Bones[i + j * 4].second = eJ;
// Initalize rigid hand model
auto center = 0.5f * XMVectorAdd(bJ, eJ);
auto dir = XMVectorSubtract(eJ, bJ);
auto height = std::max(XMVectorGetX(XMVector3Length(dir)), fingerLength);
XMVECTOR rot;
if (XMVector4Equal(dir, g_XMZero))
rot = XMQuaternionIdentity();
else
rot = XMQuaternionRotationVectorToVector(g_XMIdentityR1, dir);
shared_ptr<btCapsuleShape> pShape(new btCapsuleShape(fingerRadius, height));
// Scaling in Y axis is encapsled in bJ and eJ
btVector3 scl = vector_cast<btVector3>(m_InheritTransform.Scale);
scl.setY(1.0f);
pShape->setLocalScaling(scl);
m_HandRigids.emplace_back(new PhysicalRigid());
const auto & pRigid = m_HandRigids.back();
//pRigid->GetBulletRigid()->setGravity({ 0,0,0 });
pRigid->InitializePhysics(nullptr, pShape, 0, center, rot);
const auto& body = pRigid->GetBulletRigid();
body->setFriction(1.0f);
body->setRestitution(0.0f);
body->setCollisionFlags(body->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
body->setActivationState(DISABLE_DEACTIVATION);
//body->setAngularFactor(0.0f); // Rotation Along Y not affact
pRigid->Enable(pWorld);
}
}
//for (size_t i = 0; i < m_HandRigids.size(); i++)
//{
// for (size_t j = 0; j < m_HandRigids.size(); j++)
// {
// if (i != j)
// m_HandRigids[i]->GetBulletRigid()->setIgnoreCollisionCheck(m_HandRigids[j]->GetBulletRigid(), true);
// }
//}
}
bool Causality::HandPhysicalModel::Update(const Leap::Frame & frame, const DirectX::Matrix4x4 & leapTransform)
{
m_Hand = frame.hand(Id);
if (m_Hand.isValid())
{
XMMATRIX transform = CaculateLocalMatrix(m_Hand, leapTransform);
LocalMatrix = transform;
Color.R(m_Hand.grabStrength());
LostFrames = 0;
int j = 0;
for (const auto& finger : m_Hand.fingers())
{
for (size_t i = 0; i < 4; i++)
{
const auto & bone = finger.bone((Leap::Bone::Type)i);
XMVECTOR bJ = XMVector3Transform(bone.prevJoint().toVector3<Vector3>(), transform);
XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), transform);
m_Bones[i + j * 4].first = bJ;
m_Bones[i + j * 4].second = eJ;
// Rigid hand model
auto & pRigid = m_HandRigids[i + j * 4];
if (!pRigid->IsEnabled())
pRigid->Enable();
auto center = 0.5f * XMVectorAdd(bJ, eJ);
auto dir = XMVectorSubtract(eJ, bJ);
XMVECTOR rot;
if (XMVector4Equal(dir, g_XMZero))
rot = XMQuaternionIdentity();
else
rot = XMQuaternionRotationVectorToVector(g_XMIdentityR1, dir);
auto trans = btTransform(vector_cast<btQuaternion>(rot), vector_cast<btVector3>(center));
pRigid->GetBulletRigid()->getMotionState()->setWorldTransform(trans);
}
j++;
}
return true;
}
else
{
for (auto& pRigid : m_HandRigids)
{
pRigid->Disable();
}
LostFrames++;
return false;
}
}
// Inherited via IModelNode
void Causality::HandPhysicalModel::Render(ID3D11DeviceContext * pContext, DirectX::IEffect * pEffect)
{
XMMATRIX leap2world = LocalMatrix;
//auto palmPosition = XMVector3Transform(m_Hand.palmPosition().toVector3<Vector3>(), leap2world);
//g_PrimitiveDrawer.DrawSphere(palmPosition, 0.02f, Colors::YellowGreen);
Color.A(Opticity);
XMVECTOR color = Color;
//color = XMVectorSetW(color, Opticity);
//g_PrimitiveDrawer.Begin();
//for (const auto& bone : m_Bones)
//{
// //g_PrimitiveDrawer.DrawSphere(bone.second, fingerRadius, jC);
// g_PrimitiveDrawer.DrawCylinder(bone.first, bone.second, fingerRadius * m_InheritTransform.Scale.x, color);
//}
//g_PrimitiveDrawer.End();
for (const auto& pRigid : m_HandRigids)
{
g_PrimitiveDrawer.DrawCylinder(
pRigid->GetPosition(),
XMVector3Rotate(g_XMIdentityR1, pRigid->GetOrientation()),
dynamic_cast<btCapsuleShape*>(pRigid->GetBulletShape())->getHalfHeight() * 2,
fingerRadius * m_InheritTransform.Scale.x,
color);
}
//for (const auto& finger : m_Hand.fingers())
//{
// for (size_t i = 0; i < 4; i++)
// {
// const auto & bone = finger.bone((Leap::Bone::Type)i);
// XMVECTOR bJ = XMVector3Transform(bone.prevJoint().toVector3<Vector3>(), leap2world);
// XMVECTOR eJ = XMVector3Transform(bone.nextJoint().toVector3<Vector3>(), leap2world);
// //g_PrimitiveDrawer.DrawLine(bJ, eJ, Colors::LimeGreen);
// //g_PrimitiveDrawer.DrawCube(bJ, g_XMOne * 0.03, g_XMIdentityR3, Colors::Red);
// g_PrimitiveDrawer.DrawCylinder(bJ, eJ,0.015f,Colors::LimeGreen);
// //auto center = 0.5f * XMVectorAdd(bJ, eJ);
// //auto dir = XMVectorSubtract(eJ, bJ);
// //auto scale = XMVector3Length(dir);
// //XMVECTOR rot;
// //if (XMVector4LessOrEqual(XMVector3LengthSq(dir), XMVectorReplicate(0.01f)))
// // rot = XMQuaternionIdentity();
// //else
// // rot = XMQuaternionRotationVectorToVector(g_XMIdentityR1, dir);
// //XMMATRIX world = XMMatrixAffineTransformation(scale, g_XMZero, rot, center);
// //s_pCylinder->Draw(world, ViewMatrix, ProjectionMatrix,Colors::LimeGreen);
// }
//}
}
inline void debug_assert(bool condition)
{
#ifdef DEBUG
if (!condition)
{
_CrtDbgBreak();
//std::cout << "assert failed." << std::endl;
}
#endif
}
// normalized feild intensity equalent charge
XMVECTOR XM_CALLCONV FieldSegmentToPoint(FXMVECTOR P, FXMVECTOR L0, FXMVECTOR L1)
{
if (XMVector4NearEqual(L0, L1, XMVectorReplicate(0.001f)))
{
XMVECTOR v = XMVectorAdd(L0, L1);
v = XMVectorMultiply(v, g_XMOneHalf);
v = XMVectorSubtract(v, P);
XMVECTOR d = XMVector3LengthSq(v);
v = XMVector3Normalize(v);
v /= d;
return v;
}
XMVECTOR s = XMVectorSubtract(L1, L0);
XMVECTOR v0 = XMVectorSubtract(L0, P);
XMVECTOR v1 = XMVectorSubtract(L1, P);
XMMATRIX Rot;
Rot.r[1] = XMVector3Normalize(s);
Rot.r[2] = XMVector3Cross(v0, v1);
Rot.r[2] = XMVector3Normalize(Rot.r[2]);
Rot.r[0] = XMVector3Cross(Rot.r[1], Rot.r[2]);
Rot.r[3] = g_XMIdentityR3;
// Rotated to standard question:
// Y
// ^ *y1
// | |
//--o-----|x0----->X
// | |
// | |
// *y0
// Close form solution of the intergral : f(y0,y1) = <-y/(x0*sqrt(x0^2+y^2)),1/sqrt(x0^2+y^2),0> | (y0,y1)
XMVECTOR Ds = XMVector3ReciprocalLength(s);
XMVECTOR Ps = XMVector3Dot(v0, s);
XMVECTOR Y0 = XMVectorMultiply(Ps, Ds);
Ps = XMVector3Dot(v1, s);
XMVECTOR Y1 = XMVectorMultiply(Ps, Ds);
XMVECTOR X0 = XMVector3LengthSq(v1);
Ps = XMVectorMultiply(Y1, Y1);
X0 = XMVectorSubtract(X0, Ps);
//debug_assert(XMVector4GreaterOrEqual(X0, XMVectorZero()));
XMVECTOR R0 = XMVectorMultiplyAdd(Y0, Y0, X0);
XMVECTOR R1 = XMVectorMultiplyAdd(Y1, Y1, X0);
R0 = XMVectorReciprocalSqrt(R0);
R1 = XMVectorReciprocalSqrt(R1);
XMVECTOR Ry = XMVectorSubtract(R1, R0);
R0 = XMVectorMultiply(R0, Y0);
R1 = XMVectorMultiply(R1, Y1);
XMVECTOR Rx = XMVectorSubtract(R0, R1);
X0 = XMVectorReciprocalSqrt(X0);
//debug_assert(!XMVectorGetIntX(XMVectorIsNaN(X0)));
Rx = XMVectorMultiply(Rx, X0);
Rx = XMVectorSelect(Rx, Ry, g_XMSelect0101);
// Field intensity in P centered coordinate
Rx = XMVectorAndInt(Rx, g_XMSelect1100);
Rx = XMVectorMultiply(Rx, Ds);
Rx = XMVector3Transform(Rx, Rot);
//debug_assert(!XMVectorGetIntX(XMVectorIsNaN(Rx)));
return Rx;
}
DirectX::XMVECTOR XM_CALLCONV Causality::HandPhysicalModel::FieldAtPoint(DirectX::FXMVECTOR P)
{
// Palm push force
//XMVECTOR palmP = m_Hand.palmPosition().toVector3<Vector3>();
//XMVECTOR palmN = m_Hand.palmNormal().toVector3<Vector3>();
//auto dis = XMVectorSubtract(P,palmP);
//auto mag = XMVectorReciprocal(XMVector3LengthSq(dis));
//dis = XMVector3Normalize(dis);
//auto fac = XMVector3Dot(dis, palmN);
//mag = XMVectorMultiply(fac, mag);
//return XMVectorMultiply(dis, mag);
XMVECTOR field = XMVectorZero();
for (const auto& bone : m_Bones)
{
XMVECTOR v0 = bone.first;
XMVECTOR v1 = bone.second;
XMVECTOR f = FieldSegmentToPoint(P, v0, v1);
field += f;
//XMVECTOR l = XMVector3LengthSq(XMVectorSubtract(v1,v0));
}
return field;
}
inline Causality::CubeModel::CubeModel(const std::string & name, DirectX::FXMVECTOR extend, DirectX::FXMVECTOR color)
{
Name = name;
m_Color = color;
XMStoreFloat3(&BoundBox.Extents, extend);
XMStoreFloat3(&BoundOrientedBox.Extents, extend);
}
std::shared_ptr<btCollisionShape> Causality::CubeModel::CreateCollisionShape()
{
std::shared_ptr<btCollisionShape> pShape;
pShape.reset(new btBoxShape(vector_cast<btVector3>(BoundBox.Extents)));
return pShape;
}
void Causality::CubeModel::Render(ID3D11DeviceContext * pContext, DirectX::IEffect * pEffect)
{
XMVECTOR extent = XMLoadFloat3(&BoundBox.Extents);
XMMATRIX world = GetWorldMatrix();
//XMVECTOR scale, pos, rot;
XMVECTOR color = m_Color;
color = XMVectorSetW(color, Opticity);
g_PrimitiveDrawer.DrawCube(extent, world, color);
}
// !!!Current don't support dynamic scaling for each state now!!!
inline std::shared_ptr<btCollisionShape> Causality::ShapedGeomrtricModel::CreateCollisionShape()
{
if (!m_pShape)
{
btTransform trans;
std::shared_ptr<btCompoundShape> pShape(new btCompoundShape());
//trans.setOrigin(vector_cast<btVector3>(model->BoundOrientedBox.Center));
//trans.setRotation(vector_cast<btQuaternion>(model->BoundOrientedBox.Orientation));
//pShape->addChildShape(trans, new btBoxShape(vector_cast<btVector3>(model->BoundOrientedBox.Extents)));
for (const auto& part : Parts)
{
trans.setOrigin(vector_cast<btVector3>(part->BoundOrientedBox.Center));
trans.setRotation(vector_cast<btQuaternion>(part->BoundOrientedBox.Orientation));
pShape->addChildShape(trans, new btBoxShape(vector_cast<btVector3>(part->BoundOrientedBox.Extents)));
}
m_pShape = pShape;
return m_pShape;
}
else
{
return m_pShape;
}
}
void Causality::WorldBranch::InitializeBranchPool(int size, bool autoExpandation)
{
for (size_t i = 0; i < 30; i++)
{
BranchPool.emplace(new WorldBranch());
}
}
void Causality::WorldBranch::Reset()
{
for (const auto& pair : Items)
{
pair.second->Disable();
}
Items.clear();
}
void Causality::WorldBranch::Collapse()
{
//using namespace cpplinq;
//using cref = decltype(m_StateFrames)::const_reference;
//auto mlh = from(m_StateFrames)
// >> where([](cref pFrame) {return pFrame->IsEnabled; })
// >> max([](cref pFrame)->float {return pFrame->Liklyhood(); });
//WordBranch master_frame;
////for (auto & pFrame : m_StateFrames)
////{
//// if (pFrame->Liklyhood() < mlh)
//// {
//// pFrame->Disable();
//// m_pFramesPool->Recycle(std::move(pFrame));
//// }
//// else
//// {
//// master_frame = std::move(pFrame);
//// }
////}
//m_StateFrames.clear();
//m_StateFrames.push_back(std::move(master_frame));
}
SuperpositionMap Causality::WorldBranch::CaculateSuperposition()
{
using namespace cpplinq;
SuperpositionMap SuperStates;
auto itr = this->begin();
auto eitr = this->end();
NormalizeLiklyhood(CaculateLiklyhood());
auto pItem = Items.begin();
for (size_t i = 0; i < Items.size(); i++,++pItem)
{
const auto& pModel = pItem->second;
auto& distribution = SuperStates[pItem->first];
//auto& = state.StatesDistribution;
int j = 0;
for (const auto& branch : leaves())
{
if (!branch.IsEnabled)
continue;
auto itrObj = branch.Items.find(pItem->first);
if (itrObj == branch.Items.end())
continue;
auto pNew = itrObj->second;
ProblistiscAffineTransform tNew;
tNew.Translation = pNew->GetPosition();
tNew.Rotation = pNew->GetOrientation();
tNew.Scale = pNew->GetScale();
tNew.Probability = branch.Liklyhood();
auto itr = std::find_if(distribution.begin(), distribution.end(),
[&tNew](std::remove_reference_t<decltype(distribution)>::const_reference trans) -> bool
{
return trans.NearEqual(tNew);
});
if (itr == distribution.end())
{
distribution.push_back(tNew);
}
else
{
itr->Probability += tNew.Probability;
}
j++;
}
}
return SuperStates;
}
void Causality::WorldBranch::InternalEvolution(float timeStep, const Leap::Frame & frame, const DirectX::Matrix4x4 & leapTransform)
{
auto& subjects = Subjects;
BoundingSphere sphere;
//if (!is_leaf()) return;
for (auto itr = subjects.begin(); itr != subjects.end(); )
{
bool result = itr->second->Update(frame, leapTransform);
// Remove hands lost track for 60+ frames
if (!result)
{
if (itr->second->LostFramesCount() > 60)
itr = subjects.erase(itr);
}
else
{
//std::vector<PhysicalRigid*> collideObjects;
//for (auto& item : Items)
//{
// btVector3 c;
// item.second->GetBulletShape()->getBoundingSphere(c, sphere.Radius);
// sphere.Center = vector_cast<Vector3>(sphere.Center);
// if (itr->second->OperatingFrustum().Contains(sphere) != ContainmentType::DISJOINT)
// {
// collideObjects.push_back(item.second.get());
// }
//}
//if (collideObjects.size() > 0)
//{
// Fork(collideObjects);
//}
//const auto &pHand = itr->second;
//for (auto& item : pFrame->Objects)
//{
// const auto& pObj = item.second;
// if (pObj->GetBulletRigid()->isStaticObject())
// continue;
// //pObj->GetBulletShape()->
// auto force = pHand->FieldAtPoint(pObj->GetPosition()) * 0.00001f;
// pObj->GetBulletRigid()->clearForces();
// //vector_cast<btVector3>(force) * 0.01f
// std::cout << item.first << " : " << Vector3(force) << std::endl;
// pObj->GetBulletRigid()->applyCentralForce(vector_cast<btVector3>(force));
// pObj->GetBulletRigid()->activate();
//}
++itr;
}
}
pDynamicsWorld->stepSimulation(timeStep, 10);
}
float Causality::WorldBranch::CaculateLiklyhood()
{
if (is_leaf())
{
if (IsEnabled)
_Liklyhood = 1;
else
_Liklyhood = 0;
return _Liklyhood;
}
else
{
_Liklyhood = 0;
for (auto& branch : children())
{
_Liklyhood += branch.CaculateLiklyhood();
}
return _Liklyhood;
}
}
void Causality::WorldBranch::NormalizeLiklyhood(float total)
{
for (auto& branch : nodes_in_tree())
{
branch._Liklyhood /= total;
}
}
void Causality::WorldBranch::AddSubjectiveObject(const Leap::Hand & hand, const DirectX::Matrix4x4& leapTransform)
{
if (!Subjects[hand.id()])
{
Subjects[hand.id()].reset(
new HandPhysicalModel(
pDynamicsWorld,
hand, leapTransform,
SubjectTransform)
);
//for (const auto& itm : pFrame->Objects)
//{
// const auto& pObj = itm.second;
// if (!pObj->GetBulletRigid()->isStaticOrKinematicObject())
// {
// for (const auto& bone : subjects[hand.id()]->Rigids())
// pObj->GetBulletRigid()->setIgnoreCollisionCheck(bone.get(), false);
// }
//}
}
}
void Causality::WorldBranch::AddDynamicObject(const std::string &name, const std::shared_ptr<btCollisionShape> &pShape, float mass, const DirectX::Vector3 & Position, const DirectX::Quaternion & Orientation)
{
for (auto& branch : nodes_in_tree())
{
auto pObject = std::shared_ptr<PhysicalRigid>(new PhysicalRigid());
pObject->InitializePhysics(branch.pDynamicsWorld, pShape, mass, Position, Orientation);
pObject->GetBulletRigid()->setFriction(1.0f);
pObject->GetBulletRigid()->setDamping(0.8f, 0.9f);
pObject->GetBulletRigid()->setRestitution(0.0);
branch.Items[name] = pObject;
}
}
void Causality::WorldBranch::Evolution(float timeStep, const Leap::Frame & frame, const DirectX::Matrix4x4 & leapTransform)
{
using namespace cpplinq;
vector<reference_wrapper<WorldBranch>> leaves;
//auto levr = this->leaves();
copy(this->leaves_begin(), leaves_end(), back_inserter(leaves));
auto branchEvolution = [timeStep, &frame, &leapTransform](WorldBranch& branch) {
branch.InternalEvolution(timeStep,frame, leapTransform);
};
//auto branchEvolution = std::bind(&WorldBranch::InternalEvolution, placeholders::_1, frame, leapTransform);
if (leaves.size() >= 10)
concurrency::parallel_for_each(leaves.begin(), leaves.end(), branchEvolution);
else
for_each(leaves.begin(), leaves.end(), branchEvolution);
}
void Causality::WorldBranch::Fork(const std::vector<PhysicalRigid*>& focusObjects)
{
//int i = 0;
//for (const auto& obj : focusObjects)
//{
// auto branch = DemandCreate((boost::format("%s/%d") % this->Name % i++).str());
//}
}
void Causality::WorldBranch::Fork(const std::vector<DirectX::AffineTransform>& subjectTransforms)
{
for (int i = subjectTransforms.size() - 1; i >= 0; --i)
{
const auto& trans = subjectTransforms[i];
auto branch = DemandCreate((boost::format("%s/%d") % this->Name % i).str());
branch->Enable(trans);
append_children_front(branch.release());
//branch->SubjectTransform = trans;
}
}
std::unique_ptr<WorldBranch> Causality::WorldBranch::DemandCreate(const string& branchName)
{
if (!BranchPool.empty())
{
auto frame = std::move(BranchPool.front());
BranchPool.pop();
frame->Name = branchName;
return frame;
}
else
return nullptr;
}
void Causality::WorldBranch::Recycle(std::unique_ptr<WorldBranch>&& pFrame)
{
pFrame->Reset();
BranchPool.push(std::move(pFrame));
}
//inline void Causality::SkeletonModel::Render(ID3D11DeviceContext * pContext, DirectX::IEffect * pEffect)
//{
// g_PrimitiveDrawer.DrawCylinder(Joints[0],Joints[1].Position)
//}
| 31.903163 | 251 | 0.68123 | ArcEarth |
9d0a0426a96bc1410fbc389a08ae818d5a5e3071 | 3,796 | cpp | C++ | modules/stitching/perf/perf_estimators.cpp | yo1990/opencv | aef4fab1c8632940d53c694f09466dcd3e72eae2 | [
"BSD-3-Clause"
] | 1 | 2020-05-11T22:26:54.000Z | 2020-05-11T22:26:54.000Z | modules/stitching/perf/perf_estimators.cpp | yo1990/opencv | aef4fab1c8632940d53c694f09466dcd3e72eae2 | [
"BSD-3-Clause"
] | 3 | 2019-08-21T07:13:41.000Z | 2020-06-23T12:35:17.000Z | modules/stitching/perf/perf_estimators.cpp | yo1990/opencv | aef4fab1c8632940d53c694f09466dcd3e72eae2 | [
"BSD-3-Clause"
] | null | null | null | #include "perf_precomp.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/opencv_modules.hpp"
namespace opencv_test
{
using namespace perf;
typedef TestBaseWithParam<tuple<string, string> > bundleAdjuster;
#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE)
#define TEST_DETECTORS testing::Values("surf", "orb")
#else
#define TEST_DETECTORS testing::Values<string>("orb")
#endif
#define WORK_MEGAPIX 0.6
#define AFFINE_FUNCTIONS testing::Values("affinePartial", "affine")
PERF_TEST_P(bundleAdjuster, affine, testing::Combine(TEST_DETECTORS, AFFINE_FUNCTIONS))
{
Mat img1, img1_full = imread(getDataPath("stitching/s1.jpg"));
Mat img2, img2_full = imread(getDataPath("stitching/s2.jpg"));
float scale1 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));
float scale2 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));
resize(img1_full, img1, Size(), scale1, scale1, INTER_LINEAR_EXACT);
resize(img2_full, img2, Size(), scale2, scale2, INTER_LINEAR_EXACT);
string detector = get<0>(GetParam());
string affine_fun = get<1>(GetParam());
Ptr<detail::FeaturesFinder> finder;
Ptr<detail::FeaturesMatcher> matcher;
Ptr<detail::BundleAdjusterBase> bundle_adjuster;
if (detector == "surf")
finder = makePtr<detail::SurfFeaturesFinder>();
else if (detector == "orb")
finder = makePtr<detail::OrbFeaturesFinder>();
if (affine_fun == "affinePartial")
{
matcher = makePtr<detail::AffineBestOf2NearestMatcher>(false);
bundle_adjuster = makePtr<detail::BundleAdjusterAffinePartial>();
}
else if (affine_fun == "affine")
{
matcher = makePtr<detail::AffineBestOf2NearestMatcher>(true);
bundle_adjuster = makePtr<detail::BundleAdjusterAffine>();
}
Ptr<detail::Estimator> estimator = makePtr<detail::AffineBasedEstimator>();
std::vector<Mat> images;
images.push_back(img1), images.push_back(img2);
std::vector<detail::ImageFeatures> features;
std::vector<detail::MatchesInfo> pairwise_matches;
std::vector<detail::CameraParams> cameras;
std::vector<detail::CameraParams> cameras2;
(*finder)(images, features);
(*matcher)(features, pairwise_matches);
if (!(*estimator)(features, pairwise_matches, cameras))
FAIL() << "estimation failed. this should never happen.";
// this is currently required
for (size_t i = 0; i < cameras.size(); ++i)
{
Mat R;
cameras[i].R.convertTo(R, CV_32F);
cameras[i].R = R;
}
cameras2 = cameras;
bool success = true;
while(next())
{
cameras = cameras2; // revert cameras back to original initial guess
startTimer();
success = (*bundle_adjuster)(features, pairwise_matches, cameras);
stopTimer();
}
EXPECT_TRUE(success);
EXPECT_TRUE(cameras.size() == 2);
// fist camera should be just identity
Mat &first = cameras[0].R;
SANITY_CHECK(first, 1e-3, ERROR_ABSOLUTE);
// second camera should be the estimated transform between images
// separate rotation and translation in transform matrix
Mat T_second (cameras[1].R, Range(0, 2), Range(2, 3));
Mat R_second (cameras[1].R, Range(0, 2), Range(0, 2));
Mat h (cameras[1].R, Range(2, 3), Range::all());
SANITY_CHECK(T_second, 5, ERROR_ABSOLUTE); // allow 5 pixels diff in translations
SANITY_CHECK(R_second, .01, ERROR_ABSOLUTE); // rotations must be more precise
// last row should be precisely (0, 0, 1) as it is just added for representation in homogeneous
// coordinates
EXPECT_TRUE(h.type() == CV_32F);
EXPECT_FLOAT_EQ(h.at<float>(0), 0.f);
EXPECT_FLOAT_EQ(h.at<float>(1), 0.f);
EXPECT_FLOAT_EQ(h.at<float>(2), 1.f);
}
} // namespace
| 37.584158 | 99 | 0.68098 | yo1990 |
9d0b0c274542dcd1e6103378377dd038e647afab | 7,035 | cpp | C++ | adapters-stk/test/stk_interface_test/tScatterSpeed_Epetra.cpp | hillyuan/Panzer | 13ece3ea4c145c4d7b6339e3ad6332a501932ea8 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T03:49:50.000Z | 2022-03-22T03:49:50.000Z | adapters-stk/test/stk_interface_test/tScatterSpeed_Epetra.cpp | hillyuan/Panzer | 13ece3ea4c145c4d7b6339e3ad6332a501932ea8 | [
"BSD-3-Clause"
] | null | null | null | adapters-stk/test/stk_interface_test/tScatterSpeed_Epetra.cpp | hillyuan/Panzer | 13ece3ea4c145c4d7b6339e3ad6332a501932ea8 | [
"BSD-3-Clause"
] | null | null | null | // STL includes
#include <iostream>
#include <vector>
#include <set>
// Teuchos includes
#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_RCP.hpp"
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_FancyOStream.hpp"
#include "Teuchos_TimeMonitor.hpp"
#include <Teuchos_oblackholestream.hpp>
// Intrepid2 includes
#include "Intrepid2_HGRAD_QUAD_C1_FEM.hpp"
#include "Intrepid2_HGRAD_QUAD_C2_FEM.hpp"
#include "Intrepid2_HGRAD_HEX_C1_FEM.hpp"
#include "Intrepid2_HGRAD_HEX_C2_FEM.hpp"
// Panzer includes
#include "Panzer_ConnManager.hpp"
#include "Panzer_FieldPattern.hpp"
#include "Panzer_IntrepidFieldPattern.hpp"
#include "Panzer_DOFManager.hpp"
// Panzer_STK includes
#include "Panzer_STK_SquareQuadMeshFactory.hpp"
#include "Panzer_STK_CubeHexMeshFactory.hpp"
#include "Panzer_STKConnManager.hpp"
#include "Epetra_Map.h"
#include "Epetra_CrsMatrix.h"
#include "Epetra_CrsGraph.h"
#include "Epetra_MpiComm.h"
#ifdef HAVE_MPI
#include "mpi.h"
#endif
using Teuchos::RCP;
using Teuchos::rcp;
using Teuchos::ArrayRCP;
using Teuchos::Array;
using Teuchos::ArrayView;
using Teuchos::TimeMonitor;
using Teuchos::Time;
typedef Kokkos::DynRankView<double,PHX::Device> FieldContainer;
typedef Epetra_Map Map;
typedef Epetra_CrsMatrix CrsMatrix;
typedef Epetra_CrsGraph CrsGraph;
//****************************Function Definitions******************************
void newAssembly(Teuchos::FancyOStream &out);
//Will run the generic setup of the DOFManager through the buildGlobalUnknowns
size_t setUp1(RCP<Map> &rowmap,
RCP<Map> &colmap,
RCP<panzer::DOFManager> &my_dofM,
RCP<panzer::ConnManager> &conn);
//I'm not entirely sure on this yet.
void fillMeUp1(std::vector<std::vector<int> > &gids,
std::vector<std::vector<int> > &lids,
std::vector< std::vector<std::vector<double> > > &miniMat,
RCP<panzer::DOFManager> &dofM,
const std::vector<int> &mElem,
const RCP<const Map> &mcmap);
RCP<Time> New_Time = TimeMonitor::getNewCounter("New Assembly Time");
RCP<Time> Old_Time = TimeMonitor::getNewCounter("Old Assembly Time");
int xelem=10;
int yelem=10;
int zelem=10;
int xblocks=1;
int yblocks=1;
int zblocks=1;
//******************************************************************************
int main(int argc,char * argv[])
{
Teuchos::oblackholestream blackhole;
#ifdef HAVE_MPI
Teuchos::GlobalMPISession mpiSession(&argc,&argv, &blackhole);
//Teuchos::GlobalMPISession mpiSession(&argc,&argv, &std::cout);
#else
EPIC_FAIL // Panzer is an MPI only code.
#endif
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
out.setOutputToRootOnly(-1);
out.setShowProcRank(true);
newAssembly(out);
TimeMonitor::summarize();
return 0;
}
//******************************************************************************
// Standard Usage Functions
//******************************************************************************
void newAssembly(Teuchos::FancyOStream& /* out */)
{
RCP<panzer::DOFManager> my_dofM;
RCP<Map> rowmap;
RCP<Map> colmap;
RCP<panzer::ConnManager> conn;
const std::vector<int> & myElements=conn->getElementBlock("eblock-0_0_0");
std::vector<std::vector<int> > gids;
std::vector<std::vector<int> > lids;
std::vector< std::vector<std::vector<double> > >miniMat;
fillMeUp1(gids,lids,miniMat,my_dofM,myElements,colmap);
RCP<CrsGraph> crsgraph = rcp(new CrsGraph(Copy,*rowmap,*colmap,-1));
//Tell the graph where elements will be.
for(size_t e=0;e<myElements.size();++e){
for (size_t i = 0; i < gids[e].size(); ++i) {
crsgraph->InsertGlobalIndices(gids[e][i],gids[e].size(), &gids[e][0]);
}
}
{
crsgraph->FillComplete();
}
RCP<CrsMatrix> crsmat = rcp(new CrsMatrix(Copy,*crsgraph));
//Where the data transfer takes place.
for(std::size_t i=0;i<20;i++) {
Teuchos::TimeMonitor LocalTimer(*New_Time);
for ( size_t e = 0; e < myElements.size(); ++e) {
for (size_t j = 0; j < gids[e].size(); ++j) {
int accid=lids[e][j];
crsmat->SumIntoMyValues(accid,lids[e].size(),&miniMat[e][j][0],&lids[e][0]);
}
}
}
return;
}
size_t setUp1(RCP<Map> &rowmap,
RCP<Map> &colmap,
RCP<panzer::DOFManager> &my_dofM,
RCP<panzer::ConnManager> &conn)
{
RCP<Teuchos::ParameterList> pl = rcp(new Teuchos::ParameterList);
pl->set("X Blocks",xblocks);
pl->set("Y Blocks",yblocks);
pl->set("Z Blocks",zblocks);
pl->set("X Elements",xelem);
pl->set("Y Elements",yelem);
pl->set("Z Elements",zelem);
panzer_stk::CubeHexMeshFactory factory;
factory.setParameterList(pl);
RCP<panzer_stk::STK_Interface> mesh = factory.buildMesh(MPI_COMM_WORLD);
conn = rcp(new panzer_stk::STKConnManager(mesh));
RCP<Intrepid2::Basis<PHX::exec_space,double,double> > basis1 = rcp(new Intrepid2::Basis_HGRAD_HEX_C1_FEM<PHX::exec_space,double,double>);
RCP<const panzer::FieldPattern> pressure_pattern = Teuchos::rcp(new panzer::Intrepid2FieldPattern(basis1));
my_dofM = Teuchos::rcp(new panzer::DOFManager());
my_dofM->setConnManager(conn,MPI_COMM_WORLD);
my_dofM->addField("u", pressure_pattern);
my_dofM->addField("v", pressure_pattern);
my_dofM->addField("w", pressure_pattern);
my_dofM->addField("p", pressure_pattern);
my_dofM->buildGlobalUnknowns();
std::vector<int> owned;
std::vector<int> ownedAndGhosted;
my_dofM->getOwnedIndicesAsInt(owned);
my_dofM->getOwnedAndGhostedIndicesAsInt(ownedAndGhosted);
size_t sz = ownedAndGhosted.size();
Epetra_MpiComm mpiComm(MPI_COMM_WORLD);
//This is taken from Tpetra_Map_def.hpp
//I could probably use a non-member constructor.
rowmap = rcp(new Map(-1,ownedAndGhosted.size(),&ownedAndGhosted[0],0,mpiComm));
colmap = rcp(new Map(-1,ownedAndGhosted.size(),&ownedAndGhosted[0],0,mpiComm));
return sz;
}
void fillMeUp1(std::vector<std::vector<int> > &gids,
std::vector<std::vector<int> > &lids,
std::vector< std::vector<std::vector<double> > > &miniMat,
RCP<panzer::DOFManager> &dofM,
const std::vector<int> &mElem,
const RCP<const Map> &mcmap)
{
for (std::size_t e = 0; e < mElem.size(); ++e) {
std::vector<int> tgids;
dofM->getElementGIDsAsInt(mElem[e], tgids);
std::vector<int> tlids;
for (size_t i = 0; i < tgids.size(); ++i) {
tlids.push_back(mcmap->LID(tgids[i]));
}
std::vector<std::vector<double> > tminiMat;
for (size_t i = 0; i < tgids.size(); ++i) {
std::vector<double> temp(tgids.size());
for (size_t j = 0; j < tgids.size(); ++j) {
//Right now everything is a one. That was just to make sure that the overlapping worked
//correctly. This can literally be set to anything.
double newval=1;
temp[j]=newval;
}
tminiMat.push_back(temp);
temp.clear();
}
gids.push_back(tgids);
lids.push_back(tlids);
miniMat.push_back(tminiMat);
}
}
| 30.855263 | 139 | 0.653021 | hillyuan |
9d0d7e94d62019a219cc2d281bc21e5da19b6856 | 5,179 | cpp | C++ | VulkanEngine/src/internal_buffer.cpp | JorgeVirgos/FinalProject | 5c239f86b126f6eb9625b8d1b36125eb660c298d | [
"MIT"
] | null | null | null | VulkanEngine/src/internal_buffer.cpp | JorgeVirgos/FinalProject | 5c239f86b126f6eb9625b8d1b36125eb660c298d | [
"MIT"
] | null | null | null | VulkanEngine/src/internal_buffer.cpp | JorgeVirgos/FinalProject | 5c239f86b126f6eb9625b8d1b36125eb660c298d | [
"MIT"
] | null | null | null | #include "internal_buffer.h"
#include "render_context.h"
VKE::InternalBuffer& VKE::Buffer::getInternalRsc(VKE::RenderContext* render_ctx) {
return render_ctx->getInternalRsc<VKE::Buffer::internal_class>(*this);
}
VKE::InternalBuffer::InternalBuffer(){
has_been_initialised_ = false;
has_been_allocated_ = false;
render_ctx_ = nullptr;
buffer_ = VK_NULL_HANDLE;
buffer_memory_ = VK_NULL_HANDLE;
uniform_desc_set_ = VK_NULL_HANDLE;
element_count_ = 0;
element_size_ = 0;
buffer_type_ = BufferType_MAX;
}
VKE::InternalBuffer::~InternalBuffer() {
// Already done in the cleanup phase of the RenderContext destruction
//if (has_been_allocated_) {
// vkFreeMemory(render_ctx_->getDevice(), buffer_memory_, nullptr);
//}
//if (has_been_initialised_) {
// vkDestroyBuffer(render_ctx_->getDevice(), buffer_, nullptr);
//}
}
void VKE::InternalBuffer::reset(RenderContext* render_ctx) {
if (has_been_allocated_) {
vkFreeMemory(render_ctx->getDevice(), buffer_memory_, nullptr);
has_been_allocated_ = false;
}
if (has_been_initialised_) {
vkDestroyBuffer(render_ctx->getDevice(), buffer_, nullptr);
has_been_initialised_ = false;
}
in_use_ = false;
render_ctx_ = nullptr;
buffer_ = VK_NULL_HANDLE;
buffer_memory_ = VK_NULL_HANDLE;
uniform_desc_set_ = VK_NULL_HANDLE;
element_count_ = 0;
element_size_ = 0;
buffer_type_ = BufferType_MAX;
mem_properties_ = VkMemoryPropertyFlags();
has_been_initialised_ = false;
has_been_allocated_ = false;
}
void VKE::InternalBuffer::init(RenderContext* render_ctx, uint32 element_size, size_t element_count, BufferType buffer_type) {
if (render_ctx == nullptr) return; //ERROR
if (element_size == 0); //WARN ???
if (element_count == 0); //WARN ???
render_ctx_ = render_ctx;
element_size_ = element_size;
element_count_ = static_cast<uint32>(element_count);
buffer_type_ = buffer_type;
VkBufferUsageFlags buffer_usage;
switch (buffer_type_) {
case(VKE::BufferType_Staging):
mem_properties_ = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
buffer_usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
break;
case(VKE::BufferType_Vertex):
mem_properties_ = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
buffer_usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
break;
case(VKE::BufferType_Index):
mem_properties_ = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
buffer_usage = VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
break;
case(VKE::BufferType_Uniform):
case(VKE::BufferType_ExternalUniform):
mem_properties_ = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
buffer_usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
break;
default:
throw std::runtime_error("VKE::InternalBuffer::init - Invalid / Unsupported BufferType");
}
VkBufferCreateInfo bufferInfo = {};
bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
bufferInfo.size = element_size_ * element_count_;
bufferInfo.usage = buffer_usage;
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
if (vkCreateBuffer(render_ctx_->getDevice(), &bufferInfo, nullptr, &buffer_) != VK_SUCCESS) {
throw std::runtime_error("failed to create vertex buffer!");
}
has_been_initialised_ = true;
}
void VKE::InternalBuffer::uploadData(void* data) {
if (render_ctx_->getDevice() == VK_NULL_HANDLE) return; //ERROR
if (!has_been_initialised_) return; //ERROR
if (!has_been_allocated_) {
VkMemoryRequirements memRequirements = {};
vkGetBufferMemoryRequirements(render_ctx_->getDevice(), buffer_, &memRequirements);
VkMemoryAllocateInfo allocInfo = {};
allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
allocInfo.allocationSize = memRequirements.size;
allocInfo.memoryTypeIndex = render_ctx_->findMemoryType(
memRequirements.memoryTypeBits,
mem_properties_);
if (vkAllocateMemory(render_ctx_->getDevice(), &allocInfo, nullptr, &buffer_memory_) != VK_SUCCESS) {
throw std::runtime_error("failed to allocate vertex buffer memory!");
}
vkBindBufferMemory(render_ctx_->getDevice(), buffer_, buffer_memory_, 0);
if (buffer_type_ == VKE::BufferType_Uniform) {
VkDescriptorSetAllocateInfo alloc_info = render_ctx_->getDescriptorAllocationInfo(VKE::DescriptorType_Matrices);
vkAllocateDescriptorSets(render_ctx_->getDevice(), &alloc_info, &uniform_desc_set_);
render_ctx_->UpdateDescriptor(uniform_desc_set_, VKE::DescriptorType_Matrices, (void*)&buffer_);
}
has_been_allocated_ = true;
}
if (data == nullptr || buffer_type_ == BufferType_Staging) return; // Data to be uploaded later
if (buffer_type_ == BufferType_Uniform || buffer_type_ == BufferType_ExternalUniform) {
void* mapped_data = nullptr;
vkMapMemory(render_ctx_->getDevice(), buffer_memory_, 0, VK_WHOLE_SIZE, 0, &mapped_data);
memcpy(mapped_data, data, element_size_ * element_count_);
vkUnmapMemory(render_ctx_->getDevice(), buffer_memory_);
} else {
render_ctx_->uploadToStaging(data, element_size_ * element_count_);
render_ctx_->copyBuffer(render_ctx_->getStagingBuffer(), *this, element_count_ * element_size_);
render_ctx_->clearStaging();
}
} | 32.36875 | 126 | 0.777949 | JorgeVirgos |
9d0fbd5e941c1d6dbd063972b8c56d822ef1f118 | 18,668 | cpp | C++ | coast/wdbase/Context.cpp | zer0infinity/CuteForCoast | 37d933c5fe2e0ce9a801f51b2aa27c7a18098511 | [
"BSD-3-Clause"
] | null | null | null | coast/wdbase/Context.cpp | zer0infinity/CuteForCoast | 37d933c5fe2e0ce9a801f51b2aa27c7a18098511 | [
"BSD-3-Clause"
] | null | null | null | coast/wdbase/Context.cpp | zer0infinity/CuteForCoast | 37d933c5fe2e0ce9a801f51b2aa27c7a18098511 | [
"BSD-3-Clause"
] | null | null | null | /*
* Copyright (c) 2005, Peter Sommerlad and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#include "Context.h"
#include "Session.h"
#include "Server.h"
#include "Role.h"
#include "Page.h"
#include "LocalizationUtils.h"
#include "LocalizedStrings.h"
#include "Socket.h"
#include <typeinfo>
#include <cstring>
const String Context::DebugStoreSeparator("<!-- separator 54353021345321784456 -->");
Context::Context() :
fSession(0), fSessionStoreGlobal(Anything::ArrayMarker(), coast::storage::Global()), fSessionStoreCurrent(Anything::ArrayMarker(),
coast::storage::Current()), fStackSz(0), fStoreSz(0), fStore(Anything::ArrayMarker()), fRequest(Anything::ArrayMarker()), fSocket(0),
fCopySessionStore(false) {
InitTmpStore();
}
Context::Context(Anything &request) :
fSession(0), fSessionStoreGlobal(Anything::ArrayMarker(), coast::storage::Global()), fSessionStoreCurrent(Anything::ArrayMarker(),
coast::storage::Current()), fStackSz(0), fStoreSz(0), fStore(Anything::ArrayMarker()), fRequest(request), fSocket(0),
fCopySessionStore(false) {
InitTmpStore();
fLanguage = LocalizationUtils::FindLanguageKey(*this, Lookup("Language", "E"));
}
Context::Context(Socket *socket) :
fSession(0), fSessionStoreGlobal(Anything::ArrayMarker(), coast::storage::Global()), fSessionStoreCurrent(Anything::ArrayMarker(),
coast::storage::Current()), fStackSz(0), fStoreSz(0), fStore(Anything::ArrayMarker()), fRequest(Anything::ArrayMarker()), fSocket(
socket), fCopySessionStore(false) {
// the arguments we get for this request
if (fSocket) {
fRequest["ClientInfo"] = fSocket->ClientInfo();
}
InitTmpStore();
fLanguage = LocalizationUtils::FindLanguageKey(*this, Lookup("Language", "E"));
}
Context::Context(const Anything &env, const Anything &query, Server *server, Session *s, Role *role, Page *page) :
fSession(0), // don't initialize because InitSession would interpret it as same session and not increment
// session's ref count while the destructor decrements it. Init(s) does the needed intitialization
// while InitSession handles the refcounting correctly.
fSessionStoreGlobal(Anything::ArrayMarker(), coast::storage::Global()), fSessionStoreCurrent(Anything::ArrayMarker(),
coast::storage::Current()), fStackSz(0), fStoreSz(0), fStore(Anything::ArrayMarker()), fSocket(0),
fCopySessionStore(false) {
InitSession(s);
InitTmpStore();
fRequest["env"] = env;
fRequest["query"] = query;
Push("Server", server);
Push("Role", role);
Push("Page", page);
fLanguage = LocalizationUtils::FindLanguageKey(*this, Lookup("Language", "E"));
}
Context::~Context() {
if (fSession) {
LockSession();
// SOP: should we resynch store again, or should PutInStore take care?
fSession->UnRef();
fSession->fMutex.Unlock();
}
}
void Context::InitSession(Session *s) {
// Make a copy of the session store if fCopySessionStore is on. Reference the session to
// inhibit premature destruction of session object.
StartTrace1(Context.InitSession, String() << (long)(void *)this);
bool sessionIsDifferent = (s != fSession);
ROAnything contextAny;
if (Lookup("Context", contextAny)) {
fCopySessionStore = contextAny["CopySessionStore"].AsBool(false);
}
Trace("CopySessionStore: " << (fCopySessionStore ? "true" : "false"));
Trace("s = " << (long)(void *)s << " fSession = " << (long)(void *)fSession );
Trace("session is " << (sessionIsDifferent ? "" : "not ") << "different");
Session *saveSession = fSession;
if (sessionIsDifferent || fCopySessionStore) {
// first handle pushed session because it might get deleted underway
fSession = s;
if (fSession) {
Trace("new s: About to lock <" << fSession->GetId() << ">");
fSession->fMutex.Lock();
if (sessionIsDifferent) {
fSession->Ref();
Trace("After fSession->Ref() id: [" << fSession->GetId() <<
"] refCount: [" << fSession->GetRefCount() << "]");
}
if (fCopySessionStore) {
fSessionStoreCurrent = fSession->GetStoreGlobal().DeepClone(fSessionStoreCurrent.GetAllocator());
Trace("new s: About to unlock <" << fSession->GetId() << ">");
} else {
fSessionStoreGlobal = fSession->GetStoreGlobal();
}
UnlockSession();
} else {
if (fCopySessionStore) {
fSessionStoreCurrent = Anything(Anything::ArrayMarker(),fSessionStoreCurrent.GetAllocator());
} else {
fSessionStoreGlobal = Anything(Anything::ArrayMarker(),fSessionStoreGlobal.GetAllocator());
}
}
if (saveSession) {
if (sessionIsDifferent) {
// in case the session was used in UnlockSession 'mode', we need to protect the call to UnRef
if (fCopySessionStore) {
Trace("old s: About to lock <" << saveSession->GetId() << ">");
saveSession->fMutex.Lock();
}
saveSession->UnRef();
Trace("After saveSession->UnRef() id: [" << saveSession->GetId() << "] refCount: [" << saveSession->GetRefCount() << "]");
// we need to unlock independently of fUnlockSession value
Trace("old s: About to unlock <" << saveSession->GetId() << ">");
saveSession->fMutex.Unlock();
}
}
// for test cases with no session given, the session store does not survive
}
}
void Context::InitTmpStore() {
Anything tmp = Anything(Anything::ArrayMarker());
Push("tmp", tmp);
}
Session *Context::GetSession() const {
return fSession;
}
const char *Context::GetSessionId() const {
return (fSession) ? fSession->GetId() : 0;
}
void Context::SetServer(Server *server) {
Replace("Server", server);
}
Server *Context::GetServer() const {
return SafeCast(Find("Server"), Server);
}
void Context::SetRole(Role *role) {
Replace("Role", role);
}
Role *Context::GetRole() const {
return SafeCast(Find("Role"), Role);
}
void Context::SetPage(Page *p) {
StatTrace(Context.SetPage, "New Page [" << (p?p->GetName():"null") << "]", coast::storage::Current());
Replace("Page", p);
}
Page *Context::GetPage() const {
return SafeCast(Find("Page"), Page);
}
void Context::SetQuery(const Anything &query) {
fRequest["query"] = query;
}
Anything &Context::GetQuery() {
return fRequest["query"];
}
Anything &Context::GetEnvStore() {
return fRequest["env"];
}
Anything &Context::GetRoleStoreGlobal() {
return GetSessionStore()["RoleStore"];
}
Anything &Context::GetSessionStore() {
StartTrace1(Context.GetSessionStore, "fCopySessionStore: " << ( fCopySessionStore ? "true" : "false") );
return fCopySessionStore ? fSessionStoreCurrent : fSessionStoreGlobal;
}
Anything &Context::GetTmpStore() {
StartTrace(Context.GetTmpStore);
const char *key = "tmp";
long index = -1L;
return IntGetStore(key, index);
}
void Context::CollectLinkState(Anything &a) {
Role *r = GetRole();
if (r) {
r->CollectLinkState(a, *this);
}
}
void Context::DebugStores(const char *msg, std::ostream &reply, bool printAny) {
if (msg) {
reply << "+++++++++++++++++++" << NotNull(msg) << "+++++++++++++++++++++++++\n";
}
Session *s = fSession;
if (s) {
reply << "Session-Nummer: " << s->GetId() << '\n';
reply << "Access-Counter: " << s->GetAccessCounter() << '\n';
reply << "Access-Time: " << s->GetAccessTime() << '\n';
reply << "Ref-Count: " << s->GetRefCount() << '\n';
}
Page *page = GetPage();
if (page) {
String pName;
page->GetName(pName);
reply << "Page: " << pName << '\n';
}
String rName("None");
Role *r = GetRole();
if (r) {
r->GetName(rName);
}
reply << "Role: " << rName << "\n\n";
// show Lookup stack on html page
if (TriggerEnabled(Context.HTMLWDDebug.LookupStack) || printAny) {
reply << "Lookup stack #refs:" << fLookupStack.RefCount() << '\n' << fLookupStack << '\n';
}
// show tmp store on html page
if (TriggerEnabled(Context.HTMLWDDebug.TmpStore) || printAny) {
reply << "Tmp store #refs:" << fStore.RefCount() << '\n' << fStore << '\n';
}
// show session store on html page
if (fSession) {
fSession->HTMLDebugStore(reply);
}
// show request store on html page
if (TriggerEnabled(Context.HTMLWDDebug.EnvStore) || printAny) {
reply << "Request #refs:" << fRequest.RefCount() << '\n' << fRequest << '\n';
}
if (msg) {
reply << "-------------------" << NotNull(msg) << "-------------------------\n";
}
reply.flush();
}
void Context::HTMLDebugStores(std::ostream &reply) {
if (TriggerEnabled(Context.HTMLWDDebug)) {
reply << DebugStoreSeparator;
reply << "<hr>\n<pre>\n";
DebugStores(0, reply);
reply << "</pre>\n";
}
}
Anything &Context::IntGetStore(const char *key, long &index) {
StartTrace1(Context.IntGetStore, "key:<" << NotNull(key) << ">");
TraceAny(fStore, "fStore and size:" << fStoreSz);
index = fStoreSz;
while (index >= 0) {
index = FindIndex(fStore, key, index);
if (index >= 0) {
// matching entry found, check if it is of correct type
if (fStore["Stack"][index].GetType() != AnyObjectType) {
TraceAny(fStore["Stack"][index], "found top element of key [" << key << "] at index:" << index);
return fStore["Stack"][index];
} else {
SYSWARNING("IntGetStore entry at [" << key << "] is not of expected Anything-type!");
}
}
--index;
}
return fEmpty;
}
bool Context::GetStore(const char *key, Anything &result) {
StartTrace1(Context.GetStore, "key:<" << NotNull(key) << ">");
if (key) {
long index = -1;
result = IntGetStore(key, index);
if (index >= 0) {
return true;
}
if (strcmp(key, "Session") == 0) {
result = GetSessionStore();
return true;
}
if (strcmp(key, "Role") == 0) {
result = GetRoleStoreGlobal();
return true;
}
}
Trace("failed");
return false;
}
bool Context::Push(const char *key, LookupInterface *li) {
StartTrace1(Context.Push, "key:<" << NotNull(key) << "> li:&" << (long)li);
if (key && li) {
Trace( "TypeId of given LookupInterface:" << typeid(*li).name());
bool bIsLookupAdapter = ((typeid(*li) == typeid(AnyLookupInterfaceAdapter<Anything> )) || (typeid(*li)
== typeid(AnyLookupInterfaceAdapter<ROAnything> )));
if (bIsLookupAdapter) {
fStore["Keys"].Append(key);
fStore["Stack"].Append((IFAObject *) li);
++fStoreSz;
TraceAny(fStore, "fStore and size:" << fStoreSz);
} else {
fLookupStack["Keys"].Append(key);
fLookupStack["Stack"].Append((IFAObject *) li);
++fStackSz;
TraceAny(fLookupStack, "fLookupStack and size:" << fStackSz);
}
return true;
}
return false;
}
bool Context::Pop(String &key) {
StartTrace(Context.Pop);
if (fStackSz > 0) {
--fStackSz;
key = fLookupStack["Keys"][fStackSz].AsString();
fLookupStack["Stack"].Remove(fStackSz);
fLookupStack["Keys"].Remove(fStackSz);
TraceAny(fLookupStack, "fLookupStack and size:" << fStackSz);
return true;
}
return false;
}
bool Context::Push(const char *key, Anything &store) {
StartTrace1(Context.Push, "key:<" << NotNull(key) << ">");
TraceAny(store, "Store to put:");
if (key && (store.GetType() != AnyNullType)) {
// EnsureArrayImpl is needed to be able to extend existing stack entries by reference
// without this conversion, a problem would arise when a simple value was pushed which got extended by other values
// -> only the simple value would persist
Anything::EnsureArrayImpl(store);
fStore["Keys"].Append(key);
fStore["Stack"].Append(store);
++fStoreSz;
TraceAny(fStore, "fStore and size:" << fStoreSz);
return true;
}
return false;
}
bool Context::PopStore(String &key) {
StartTrace(Context.PopStore);
if (fStoreSz > 1) { // never pop the tmp store at "fStore.tmp:0"
--fStoreSz;
key = fStore["Keys"][fStoreSz].AsString();
fStore["Stack"].Remove(fStoreSz);
fStore["Keys"].Remove(fStoreSz);
TraceAny(fStore, "fStore and size:" << fStoreSz);
return true;
}
return false;
}
void Context::Push(Session *s) {
StartTrace1(Context.Push, "session");
InitSession(s);
}
void Context::PushRequest(const Anything &request) {
StartTrace1(Context.PushRequest, "request");
fRequest = request;
TraceAny(fRequest, "Request: ");
}
LookupInterface *Context::Find(const char *key) const {
StartTrace1(Context.Find, "key:<" << NotNull(key) << ">");
TraceAny(fLookupStack, "fLookupStack and size:" << fStackSz);
long index = FindIndex(fLookupStack, key);
if (index >= 0) {
Trace("found at fLookupStack[Stack][" << index << "]<" << NotNull(key) << ">");
// no Safecast here, because a LookupInterface is not an IFAObject
LookupInterface *li = (LookupInterface *) fLookupStack["Stack"][index].AsIFAObject(0);
return li;
}
Trace("<" << NotNull(key) << "> not found");
return 0;
}
long Context::FindIndex(const Anything &anyStack, const char *key, long lStartIdx) const {
StartTrace1(Context.FindIndex, "key:<" << NotNull(key) << ">");
long result = -1;
if (key) {
long sz = anyStack["Keys"].GetSize();
if (lStartIdx < 0 || lStartIdx > sz) {
lStartIdx = sz;
}
for (long i = lStartIdx; --i >= 0;) {
// if ( anyStack["Keys"][i].AsString().IsEqual(key) )
// another unnice workaround to find some microseconds...
if (strcmp(anyStack["Keys"][i].AsCharPtr(), key) == 0) {
result = i;
break;
}
}
}
return result;
}
long Context::Remove(const char *key) {
StartTrace(Context.Remove);
if (!key) {
return -1;
}
TraceAny(fLookupStack, "fLookupStack and size before:" << fStackSz);
long index = FindIndex(fLookupStack, key);
if (index >= 0) {
fLookupStack["Stack"].Remove(index);
fLookupStack["Keys"].Remove(index);
--fStackSz;
}
TraceAny(fLookupStack, "fLookupStack and size after:" << fStackSz);
return index;
}
void Context::Replace(const char *key, LookupInterface *li) {
StartTrace(Context.Replace);
if (!key || !li) {
return;
}
TraceAny(fLookupStack, "fLookupStack and size before:" << fStackSz);
long index = FindIndex(fLookupStack, key);
if (index >= 0) {
fLookupStack["Stack"][index] = (IFAObject *) li;
} else {
Push(key, li);
}
TraceAny(fLookupStack, "fLookupStack and size after:" << fStackSz);
}
bool Context::DoLookup(const char *key, ROAnything &result, char delim, char indexdelim) const {
StartTrace1(Context.DoLookup, "key:<" << NotNull(key) << ">");
if (LookupStack(key, result, delim, indexdelim) || LookupStores(key, result, delim, indexdelim) || LookupLocalized(key, result, delim,
indexdelim) || LookupObjects(key, result, delim, indexdelim) || LookupRequest(key, result, delim, indexdelim)) {
Trace("found");
return true;
}
Trace("failed");
return false;
}
bool Context::LookupStack(const char *key, ROAnything &result, char delim, char indexdelim) const {
StartTrace1(Context.LookupStack, "key:<" << NotNull(key) << ">");
TraceAny(fStore, "fStore and size:" << fStoreSz);
for (long i = ((ROAnything) fStore)["Stack"].GetSize(); --i >= 0;) {
if (fStore["Stack"][i].GetType() == AnyObjectType) {
LookupInterface *li = (LookupInterface *) fStore["Stack"][i].AsIFAObject(0);
if (li && li->Lookup(key, result, delim, indexdelim)) {
TraceAny(result, "found through LookupInterface at " << fStore["Keys"][i].AsString() << ':' << i << '.' << key );
return true;
}
} else {
if (((ROAnything) fStore)["Stack"][i].LookupPath(result, key, delim, indexdelim)) {
TraceAny(result, "found at " << fStore["Keys"][i].AsString() << ':' << i << '.' << key );
return true;
}
}
}
return false;
}
bool Context::LookupStores(const char *key, ROAnything &result, char delim, char indexdelim) const {
StartTrace1(Context.LookupStores, "key:<" << NotNull(key) << ">");
if (fCopySessionStore) {
if (ROAnything(fSessionStoreCurrent)["RoleStore"].LookupPath(result, key, delim, indexdelim)) {
Trace("found in RoleStore [Current]");
return true;
}
if (ROAnything(fSessionStoreCurrent).LookupPath(result, key, delim, indexdelim)) {
Trace("found in SessionStore [Current]");
return true;
}
} else {
if (ROAnything(fSessionStoreGlobal)["RoleStore"].LookupPath(result, key, delim, indexdelim)) {
Trace("found in RoleStore [Global]");
return true;
}
if (ROAnything(fSessionStoreGlobal).LookupPath(result, key, delim, indexdelim)) {
Trace("found in SessionStore [Global]");
return true;
}
}
Trace("failed");
return false;
}
bool Context::LookupObjects(const char *key, ROAnything &result, char delim, char indexdelim) const {
StartTrace1(Context.LookupObjects, "key:<" << NotNull(key) << ">");
TraceAny(fLookupStack, "fLookupStack and size:" << fStackSz);
for (long i = ((ROAnything) fLookupStack)["Stack"].GetSize(); --i >= 0;) {
if (fLookupStack["Stack"][i].GetType() == AnyObjectType) {
Trace("checking LookupInterface (&" << (long)fLookupStack["Stack"][i].AsIFAObject(0) << ") at " <<
fLookupStack["Keys"][i].AsString() << ':' << i);
LookupInterface *li = (LookupInterface *) fLookupStack["Stack"][i].AsIFAObject(0);
if (li->Lookup(key, result, delim, indexdelim)) {
Trace("value found");
return true;
}
Trace("value not found");
}
}
return false;
}
bool Context::LookupRequest(const char *key, ROAnything &result, char delim, char indexdelim) const {
bool bRet(false);
if (!(bRet = ROAnything(fRequest)["env"].LookupPath(result, key, delim, indexdelim))) {
if (!(bRet = ROAnything(fRequest)["query"].LookupPath(result, key, delim, indexdelim))) {
bRet = ROAnything(fRequest).LookupPath(result, key, delim, indexdelim);
}
} StatTrace(Context.LookupRequest, "key:<" << NotNull(key) << "> " << (bRet ? "" : "not ") << "found", coast::storage::Current());
return bRet;
}
bool Context::LookupLocalized(const char *key, ROAnything &result, char delim, char indexdelim) const {
StartTrace1(Context.LookupLocalized, "key:<" << NotNull(key) << ">");
LocalizedStrings *ls = LocalizedStrings::LocStr();
if (ls && ls->Lookup(key, result, delim, indexdelim)) {
Trace(key << " found in LocalizedStrings");
return true;
}
Trace("failed");
return false;
}
Anything &Context::GetRequest() {
return fRequest;
}
Socket *Context::GetSocket() {
return fSocket;
}
std::iostream *Context::GetStream() {
return fSocket ? fSocket->GetStream() : 0;
}
long Context::GetReadCount() {
return (fSocket) ? fSocket->GetReadCount() : 0;
}
long Context::GetWriteCount() {
return (fSocket) ? fSocket->GetWriteCount() : 0;
}
bool Context::Process(String &token) {
return Action::ExecAction(token, *this, Lookup(token));
}
bool Context::UnlockSession() {
if (fSession && fCopySessionStore && fSession->IsLockedByMe()) {
fSession->fMutex.Unlock();
return true;
}
return false;
}
void Context::LockSession() {
if (fSession && fCopySessionStore) {
fSession->fMutex.Lock();
}
}
| 31.694397 | 136 | 0.662953 | zer0infinity |
9d11c7129658aaf50641bd59e68aa5240983cb0f | 2,819 | cpp | C++ | src/tests/sys/test_fdm_lead.cpp | fe5084/mscsim | 2b0025a9e4bda69b0d83147b1e701375fef437f8 | [
"MIT"
] | 1 | 2020-02-11T08:17:23.000Z | 2020-02-11T08:17:23.000Z | src/tests/sys/test_fdm_lead.cpp | fe5084/mscsim | 2b0025a9e4bda69b0d83147b1e701375fef437f8 | [
"MIT"
] | null | null | null | src/tests/sys/test_fdm_lead.cpp | fe5084/mscsim | 2b0025a9e4bda69b0d83147b1e701375fef437f8 | [
"MIT"
] | null | null | null | #include <iostream>
#include <QString>
#include <QtTest>
#include <fdm/sys/fdm_Lead.h>
////////////////////////////////////////////////////////////////////////////////
#define TIME_STEP 0.1
#define TIME_CONSTANT 0.3
////////////////////////////////////////////////////////////////////////////////
using namespace std;
////////////////////////////////////////////////////////////////////////////////
class LeadTest : public QObject
{
Q_OBJECT
public:
LeadTest();
private:
std::vector< double > _y;
fdm::Lead *_lead;
private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void testUpdate();
};
////////////////////////////////////////////////////////////////////////////////
LeadTest::LeadTest() {}
////////////////////////////////////////////////////////////////////////////////
void LeadTest::initTestCase()
{
_lead = new fdm::Lead( TIME_CONSTANT );
FILE *file = fopen( "../sys/data/test_fdm_lead.bin", "r" );
if ( file )
{
char buffer[4];
while ( fread( buffer, 1, 4, file ) == 4 )
{
float *y = (float*)(buffer);
_y.push_back( *y );
}
fclose( file );
}
else
{
QFAIL( "Cannot open file" );
}
}
////////////////////////////////////////////////////////////////////////////////
void LeadTest::cleanupTestCase()
{
if ( _lead ) delete _lead;
_lead = 0;
}
////////////////////////////////////////////////////////////////////////////////
void LeadTest::testUpdate()
{
double t = 0.0;
double y = 0.0;
double u_prev = 0.0;
double y_prev = 0.0;
for ( unsigned int i = 0; i < _y.size(); i++ )
{
//double u = sin( t );
int steps = 10;
for ( int j = 0; j < steps; j++ )
{
double dt = TIME_STEP / (double)steps;
double tt = t + (double)j * dt;
double u = sin( tt );
_lead->update( u, dt );
y = _lead->getValue();
//std::cout << sin( t ) << " " << sin( tt ) << " y= " << y << std::endl;
if ( 0 )
{
double c1 = 1.0 / TIME_CONSTANT;
double denom = 2.0 + dt * c1;
double ca = dt * c1 / denom;
double cb = ( 2.0 - dt * c1 ) / denom;
y = ( u + u_prev ) * ca + y_prev * cb;
u_prev = u;
y_prev = y;
}
}
cout << y << " " << _y.at( i ) << endl;
QVERIFY2( fabs( y - _y.at( i ) ) < 2.0e-2, "Failure" );
t += TIME_STEP;
}
}
////////////////////////////////////////////////////////////////////////////////
QTEST_APPLESS_MAIN(LeadTest)
////////////////////////////////////////////////////////////////////////////////
#include "test_fdm_lead.moc"
| 21.037313 | 84 | 0.346222 | fe5084 |
9d12c26c9dd7a6697c812fa6a6b0019a8217616a | 824 | cpp | C++ | code/data_structures/src/array/1d/operation/firstDuplicate.cpp | baesparza/dataStructuresAndAlgorithms | 3d6e5938f8c25e8e51e845a6e2e87df723e3fa2b | [
"MIT"
] | 1 | 2020-03-15T05:39:45.000Z | 2020-03-15T05:39:45.000Z | code/data_structures/src/array/1d/operation/firstDuplicate.cpp | baesparza/dataStructuresAndAlgorithms | 3d6e5938f8c25e8e51e845a6e2e87df723e3fa2b | [
"MIT"
] | null | null | null | code/data_structures/src/array/1d/operation/firstDuplicate.cpp | baesparza/dataStructuresAndAlgorithms | 3d6e5938f8c25e8e51e845a6e2e87df723e3fa2b | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <unordered_map>
void print(std::vector<int> &arr) {
std::cout << "Array: {";
for (int j = 0; j < arr.size(); j++) std::cout << arr[j] << ",";
std::cout << "}" << std::endl;
}
int firstDupicate(std::vector<int> a) {
// we create an unordered_map, to check for items with a key "values"; and increase it.
std::unordered_map<int, int> visited ;
// we iterate through the array from 0
for (int i=0; i < a.size(); i++) {
visited[a[i]]++;
// if the value is >= 2 is because it is repeated
if (visited[a[i]] >= 2) {
return a[i];
}
}
return -1;
}
int main() {
std::vector<int> vecA {1776,7,4};
print(vecA);
std::cout << "Result: " << firstDupicate(vecA) << std::endl;
return 0;
}
| 22.27027 | 91 | 0.540049 | baesparza |
9d1593e244d99917a52f7d753a6430ad85377934 | 3,123 | cpp | C++ | src/scheme.cpp | ajacocks/browservice | a4568c8af57d174131290402a248abfea9778109 | [
"MIT"
] | 742 | 2020-06-20T15:01:06.000Z | 2022-03-28T11:23:39.000Z | src/scheme.cpp | ajacocks/browservice | a4568c8af57d174131290402a248abfea9778109 | [
"MIT"
] | 70 | 2020-06-23T00:41:22.000Z | 2022-03-28T04:26:12.000Z | src/scheme.cpp | ajacocks/browservice | a4568c8af57d174131290402a248abfea9778109 | [
"MIT"
] | 25 | 2020-06-21T22:54:00.000Z | 2022-03-12T06:12:01.000Z | #include "scheme.hpp"
#include "bookmarks.hpp"
namespace browservice {
namespace {
class StaticResponseResourceHandler : public CefResourceHandler {
public:
StaticResponseResourceHandler(int status, string statusText, string response) {
status_ = status;
statusText_ = move(statusText);
response_ = move(response);
pos_ = 0;
}
virtual bool Open(
CefRefPtr<CefRequest> request,
bool& handleRequest,
CefRefPtr<CefCallback> callback
) override{
handleRequest = true;
return true;
}
virtual void GetResponseHeaders(
CefRefPtr<CefResponse> response,
int64_t& responseLength,
CefString& redirectUrl
) override{
responseLength = (int64_t)response_.size();
response->SetStatus(status_);
response->SetStatusText(statusText_);
response->SetMimeType("text/html");
response->SetCharset("UTF-8");
}
virtual bool Skip(
int64_t bytesToSkip,
int64_t& bytesSkipped,
CefRefPtr<CefResourceSkipCallback> callback
) override {
int64_t maxSkip = (int64_t)(response_.size() - pos_);
int64_t skipCount = min(bytesToSkip, maxSkip);
REQUIRE(skipCount >= (int64_t)0);
if(skipCount > (int64_t)0) {
bytesSkipped = skipCount;
pos_ += (size_t)skipCount;
return true;
} else {
bytesSkipped = -2;
return false;
}
}
virtual bool Read(
void* dataOut,
int bytesToRead,
int& bytesRead,
CefRefPtr<CefResourceReadCallback> callback
) override {
int64_t maxRead = (int64_t)(response_.size() - pos_);
int readCount = (int)min((int64_t)bytesToRead, maxRead);
REQUIRE(readCount >= 0);
if(readCount > 0) {
bytesRead = readCount;
memcpy(dataOut, response_.data() + pos_, (size_t)readCount);
pos_ += (size_t)readCount;
return true;
} else {
bytesRead = 0;
return false;
}
}
virtual void Cancel() override {
response_.clear();
pos_ = 0;
}
private:
int status_;
string statusText_;
string response_;
size_t pos_;
IMPLEMENT_REFCOUNTING(StaticResponseResourceHandler);
};
}
CefRefPtr<CefResourceHandler> BrowserviceSchemeHandlerFactory::Create(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& scheme_name,
CefRefPtr<CefRequest> request
) {
CEF_REQUIRE_IO_THREAD();
REQUIRE(request);
int status = 404;
string statusText = "Not Found";
string response =
"<!DOCTYPE html>\n<html lang=\"en\"><head><meta charset=\"UTF-8\">"
"<title>404 Not Found</title></head><body><h1>404 Not Found</h1></body></html>\n";
if(request->GetURL() == "browservice:bookmarks") {
status = 200;
statusText = "OK";
response = handleBookmarksRequest(request);
}
return new StaticResponseResourceHandler(status, move(statusText), move(response));
}
}
| 26.466102 | 90 | 0.610631 | ajacocks |
1dd9ac91774a3a9b97470b2ae50168a1e75a4c8a | 1,844 | cc | C++ | testing/variable_storage/OutputTrial.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | testing/variable_storage/OutputTrial.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | testing/variable_storage/OutputTrial.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include "Input_Reader.h"
#include "Cell_Data.h"
#include "Fem_Quadrature.h"
#include "Angular_Quadrature.h"
#include "Quadrule_New.h"
#include "Materials.h"
#include "Intensity_Data.h"
#include "Temperature_Data.h"
#include "Intensity_Moment_Data.h"
#include "Output_Generator.h"
#include "Dark_Arts_Exception.h"
int main(int argc, char** argv)
{
int val = 0;
Input_Reader input_reader;
try
{
input_reader.read_xml(argv[1]);
}
catch(const Dark_Arts_Exception& da_exception )
{
da_exception.message() ;
}
std::cout << "Input File Read" << std::endl;
Quadrule_New quad_fun;
Fem_Quadrature fem_quadrature( input_reader , quad_fun);
Cell_Data cell_data( input_reader );
Angular_Quadrature angular_quadrature( input_reader , quad_fun );
Materials materials( input_reader, fem_quadrature , cell_data, angular_quadrature);
Intensity_Data intensity_old( cell_data, angular_quadrature, fem_quadrature, materials, input_reader);
Temperature_Data temperature_old( fem_quadrature, input_reader, cell_data);
Intensity_Moment_Data phi_ic(cell_data,angular_quadrature, fem_quadrature, intensity_old);
Output_Generator output(angular_quadrature, fem_quadrature, cell_data, input_reader);
try{
output.write_xml( false, 1, temperature_old);
output.write_xml( false, 1, phi_ic);
output.write_xml( false, 1, intensity_old);
output.write_txt( false, 1, phi_ic);
output.write_txt( false, 1, temperature_old);
output.write_txt( false, 1, intensity_old);
}
catch(const Dark_Arts_Exception& da)
{
val = -1;
da.testing_message();
}
// Return 0 if tests passed, somethnig else if failing
return val;
}
| 29.269841 | 105 | 0.707701 | pgmaginot |
1ddcbfb26479e38b4b32149d302543f4415c393b | 8,890 | cpp | C++ | Nacro/SDK/FN_StatsListItemWIdget_functions.cpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 11 | 2021-08-08T23:25:10.000Z | 2022-02-19T23:07:22.000Z | Nacro/SDK/FN_StatsListItemWIdget_functions.cpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 1 | 2022-01-01T22:51:59.000Z | 2022-01-08T16:14:15.000Z | Nacro/SDK/FN_StatsListItemWIdget_functions.cpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 8 | 2021-08-09T13:51:54.000Z | 2022-01-26T20:33:37.000Z | // Fortnite (1.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function StatsListItemWIdget.StatsListItemWIdget_C.SetTextAndBorderHighlight
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// bool bHightlight (Parm, ZeroConstructor, IsPlainOldData)
void UStatsListItemWIdget_C::SetTextAndBorderHighlight(bool bHightlight)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.SetTextAndBorderHighlight");
UStatsListItemWIdget_C_SetTextAndBorderHighlight_Params params;
params.bHightlight = bHightlight;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.GetListItemTooltipWidget
// (Public, HasOutParms, HasDefaults, BlueprintCallable, BlueprintEvent, BlueprintPure)
// Parameters:
// class UWidget* ReturnValue (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
class UWidget* UStatsListItemWIdget_C::GetListItemTooltipWidget()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.GetListItemTooltipWidget");
UStatsListItemWIdget_C_GetListItemTooltipWidget_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
return params.ReturnValue;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.SetStatIcon
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FSlateBrush NewParam (Parm)
void UStatsListItemWIdget_C::SetStatIcon(const struct FSlateBrush& NewParam)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.SetStatIcon");
UStatsListItemWIdget_C_SetStatIcon_Params params;
params.NewParam = NewParam;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateBuffArrows
// (Public, HasDefaults, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FFortDisplayAttribute CurrentAttribute (Parm)
void UStatsListItemWIdget_C::UpdateBuffArrows(const struct FFortDisplayAttribute& CurrentAttribute)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateBuffArrows");
UStatsListItemWIdget_C_UpdateBuffArrows_Params params;
params.CurrentAttribute = CurrentAttribute;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateBasicPairLabel
// (Public, HasDefaults, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FFortDisplayAttribute CurrentAttribute (Parm)
void UStatsListItemWIdget_C::UpdateBasicPairLabel(const struct FFortDisplayAttribute& CurrentAttribute)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateBasicPairLabel");
UStatsListItemWIdget_C_UpdateBasicPairLabel_Params params;
params.CurrentAttribute = CurrentAttribute;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateValueText
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FFortDisplayAttribute CurrentAttribute (Parm)
void UStatsListItemWIdget_C::UpdateValueText(const struct FFortDisplayAttribute& CurrentAttribute)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateValueText");
UStatsListItemWIdget_C_UpdateValueText_Params params;
params.CurrentAttribute = CurrentAttribute;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateType
// (Public, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FFortDisplayAttribute CurrentAttribute (Parm)
void UStatsListItemWIdget_C::UpdateType(const struct FFortDisplayAttribute& CurrentAttribute)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateType");
UStatsListItemWIdget_C_UpdateType_Params params;
params.CurrentAttribute = CurrentAttribute;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateColors
// (Public, HasDefaults, BlueprintCallable, BlueprintEvent)
// Parameters:
// struct FFortDisplayAttribute CurrentAttribute (Parm)
void UStatsListItemWIdget_C::UpdateColors(const struct FFortDisplayAttribute& CurrentAttribute)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.UpdateColors");
UStatsListItemWIdget_C_UpdateColors_Params params;
params.CurrentAttribute = CurrentAttribute;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.Update
// (Public, HasDefaults, BlueprintCallable, BlueprintEvent)
void UStatsListItemWIdget_C::Update()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.Update");
UStatsListItemWIdget_C_Update_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.ValueChanged
// (Event, Public, BlueprintEvent)
// Parameters:
// float* Delta (Parm, ZeroConstructor, IsPlainOldData)
void UStatsListItemWIdget_C::ValueChanged(float* Delta)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.ValueChanged");
UStatsListItemWIdget_C_ValueChanged_Params params;
params.Delta = Delta;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.Construct
// (BlueprintCosmetic, Event, Public, BlueprintEvent)
void UStatsListItemWIdget_C::Construct()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.Construct");
UStatsListItemWIdget_C_Construct_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.PreviewEnded
// (Event, Public, BlueprintEvent)
void UStatsListItemWIdget_C::PreviewEnded()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.PreviewEnded");
UStatsListItemWIdget_C_PreviewEnded_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.PreviewStarted
// (Event, Public, BlueprintEvent)
void UStatsListItemWIdget_C::PreviewStarted()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.PreviewStarted");
UStatsListItemWIdget_C_PreviewStarted_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.DisplayAttributeChanged
// (Event, Public, BlueprintEvent)
void UStatsListItemWIdget_C::DisplayAttributeChanged()
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.DisplayAttributeChanged");
UStatsListItemWIdget_C_DisplayAttributeChanged_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function StatsListItemWIdget.StatsListItemWIdget_C.ExecuteUbergraph_StatsListItemWIdget
// (HasDefaults)
// Parameters:
// int EntryPoint (Parm, ZeroConstructor, IsPlainOldData)
void UStatsListItemWIdget_C::ExecuteUbergraph_StatsListItemWIdget(int EntryPoint)
{
static auto fn = UObject::FindObject<UFunction>("Function StatsListItemWIdget.StatsListItemWIdget_C.ExecuteUbergraph_StatsListItemWIdget");
UStatsListItemWIdget_C_ExecuteUbergraph_StatsListItemWIdget_Params params;
params.EntryPoint = EntryPoint;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| 29.052288 | 140 | 0.771429 | Milxnor |
1de45f91923163182ae96433fab67a0f11027076 | 1,039 | cpp | C++ | spruce/src/system/assets.cpp | gergoszaszvaradi/spruce-engine | 8c6a3d38bc5f120cdfa6dfea0dc2d3b9edd65fcb | [
"MIT"
] | null | null | null | spruce/src/system/assets.cpp | gergoszaszvaradi/spruce-engine | 8c6a3d38bc5f120cdfa6dfea0dc2d3b9edd65fcb | [
"MIT"
] | null | null | null | spruce/src/system/assets.cpp | gergoszaszvaradi/spruce-engine | 8c6a3d38bc5f120cdfa6dfea0dc2d3b9edd65fcb | [
"MIT"
] | null | null | null | #include "sprpch.h"
#include "assets.h"
#include "graphics/texture.h"
#include "graphics/shader.h"
namespace spr {
template<>
std::unordered_map<std::string, Ref<Shader>> AssetManager<Shader>::assets;
std::unordered_map<std::string, Ref<Texture>> AssetManager<Texture>::assets;
template<>
SPR_API static Ref<Shader>& AssetManager<Shader>::Get(const std::string& path)
{
auto it = assets.find(path);
if (it == assets.end()) {
Ref<Shader> shader = Shader::Create();
shader->Bind();
shader->LoadFromFile(path);
return assets.emplace(path, shader).first->second;
}
return it->second;
}
template<>
SPR_API static Ref<Texture>& AssetManager<Texture>::Get(const std::string& path)
{
auto it = assets.find(path);
if (it == assets.end()) {
Ref<Texture> texture = Texture::Create(path);
return assets.emplace(path, texture).first->second;
}
return it->second;
}
} | 28.081081 | 84 | 0.595765 | gergoszaszvaradi |
1de70bc3f4fa01c8da0408e0b97caf8479d3fa09 | 8,894 | cpp | C++ | src/VLightCurveWriter.cpp | GernotMaier/Eventdisplay | b244d65856ddc26ea8ef88af53d2b247e8d5936c | [
"BSD-3-Clause"
] | 11 | 2019-12-10T13:34:46.000Z | 2021-08-24T15:39:35.000Z | src/VLightCurveWriter.cpp | Eventdisplay/Eventdisplay | 01ef380cf53a44f95351960a297a2d4f271a4160 | [
"BSD-3-Clause"
] | 53 | 2019-11-19T13:14:36.000Z | 2022-02-16T14:22:27.000Z | src/VLightCurveWriter.cpp | pivosb/Eventdisplay | 6b299a1d3f77ddb641f98a511a37a5045ddd6b47 | [
"BSD-3-Clause"
] | 3 | 2020-05-07T13:52:46.000Z | 2021-06-25T09:49:21.000Z | /* \class VLightCurveWriter
\brief write / print light curves in different formats
*/
#include "VLightCurveWriter.h"
VLightCurveWriter::VLightCurveWriter()
{
fDebug = false;
}
VLightCurveWriter::VLightCurveWriter( vector< VFluxDataPoint > iDataVector )
{
fDebug = false;
setDataVector( iDataVector );
}
void VLightCurveWriter::setDataVector( vector< VFluxDataPoint > iDataVector )
{
fFluxDataVector = iDataVector;
}
/*
write results (fluxes and upper flux limits per run) into a root file
** very simple function, expand it if needed **
*/
bool VLightCurveWriter::writeDataVectorToRootFile( string i_root_file )
{
TFile fOFILE( i_root_file.c_str(), "RECREATE" );
if( fOFILE.IsZombie() )
{
cout << "VLightCurveWriter::writeResultsToRootFile error opening root file: " << i_root_file << endl;
return false;
}
if( fDebug )
{
cout << "writing data vector to to " << fOFILE.GetName() << endl;
}
int iRun = 0;
double iMJD = 0.;
double iFlux = 0.;
double iFluxE = 0.;
double iSigni = 0.;
double iZe = 0.;
TTree t( "fluxes", "flux calculation results" );
t.Branch( "Run", &iRun, "Run/I" );
t.Branch( "MJD", &iMJD, "MJD/D" );
t.Branch( "Flux", &iFlux, "Flux/D" );
t.Branch( "FluxE", &iFluxE, "FluxE/D" );
t.Branch( "Signi", &iSigni, "Signi/D" );
t.Branch( "Ze", &iZe, "Ze/D" );
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
iRun = fFluxDataVector[i].fRunNumber;
iMJD = fFluxDataVector[i].fMJD;
iFlux = fFluxDataVector[i].fFlux;
iFluxE = fFluxDataVector[i].fFluxE;
iSigni = fFluxDataVector[i].fSignificance;
iZe = fFluxDataVector[i].fZe;
t.Fill();
}
t.Write();
fOFILE.Close();
return true;
}
/*
write fluxes to a simple ascii file
*/
bool VLightCurveWriter::writeASCIIt_SimpleLongTable( string ASCIIFile, double iMultiplier )
{
ofstream is;
is.open( ASCIIFile.c_str() );
if( !is )
{
cout << "error opening " << ASCIIFile << endl;
return false;
}
cout << "writing flux data vector to ascii file: " << ASCIIFile << endl;
cout << endl;
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
is << setprecision( 3 ) << fixed << setw( 9 ) << fFluxDataVector[i].fMJD << "\t";
is << setprecision( 3 ) << scientific << fFluxDataVector[i].fFlux* iMultiplier << "\t";
is << setprecision( 3 ) << scientific << fFluxDataVector[i].fFluxCI_lo_1sigma* iMultiplier << "\t";
is << setprecision( 3 ) << scientific << fFluxDataVector[i].fFluxCI_up_1sigma* iMultiplier << endl;
}
is.close();
return true;
}
/*
write results as a simple latex long table
*/
bool VLightCurveWriter::writeTexFormat_SimpleLongTable( string iTexFile, double iMultiplier )
{
ofstream is;
is.open( iTexFile.c_str() );
if( !is )
{
cout << "error opening " << iTexFile << endl;
return false;
}
cout << "writing flux data vector to tex file: " << iTexFile << endl;
cout << endl;
is << "\\documentclass[a4paper]{article}" << endl;
is << "\\usepackage{longtable}" << endl;
is << "\\usepackage{lscape}" << endl;
is << "\\begin{document}" << endl;
is << endl;
is << "\\begin{longtable}{c|c}" << endl;
is << "MJD \\\\" << endl;
is << "Flux \\\\" << endl;
is << "\\hline" << endl;
is << "\\hline" << endl;
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
is << fixed << setw( 11 ) << fFluxDataVector[i].fMJD << " & ";
is << setprecision( 3 ) << scientific << fFluxDataVector[i].fFlux* iMultiplier;
is << "$\\pm$" << setprecision( 3 ) << fFluxDataVector[i].fFluxCI_1sigma* iMultiplier << "\\\\" << endl;
}
is << "\\end{longtable}" << endl;
is << "\\end{document}" << endl;
is.close();
return true;
}
/*
print a row for a typical latex table
*/
void VLightCurveWriter::writeTexFormat_TexTableRow( double iSigmaMinFluxLimits, double iFluxMultiplicator, bool iPrintPhaseValues )
{
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
cout << ( int )fFluxDataVector[i].fMJD_Start << " - " << ( int )fFluxDataVector[i].fMJD_Stop << " & ";
if( fFluxDataVector[i].hasOrbitalPhases() && iPrintPhaseValues )
{
cout << setprecision( 2 ) << fFluxDataVector[i].fOrbitalPhase << " & ";
}
cout << "VERITAS & ";
// observing time in minutes
cout << ( int )( fFluxDataVector[i].fExposure_deadTimeCorrected / 60. ) << " & ";
// mean elevation
cout << setprecision( 1 ) << fixed << 90. - fFluxDataVector[i].fZe << " & ";
// on and off events
cout << ( int )fFluxDataVector[i].fNon << " & ";
cout << ( int )fFluxDataVector[i].fNoff << " & ";
// alpha
cout << setprecision( 2 ) << fixed << fFluxDataVector[i].fAlpha << " & ";
// significance
cout << setprecision( 1 ) << fFluxDataVector[i].fSignificance << " & ";
// flux (with error) or upper flux limit)
if( iSigmaMinFluxLimits != 1 )
{
cout << fixed;
}
else
{
cout << scientific;
}
if( fFluxDataVector[i].fSignificance > iSigmaMinFluxLimits && iSigmaMinFluxLimits > -1.e3 )
{
cout << setprecision( 1 ) << fFluxDataVector[i].fFlux* iFluxMultiplicator << " $\\pm$ (";
cout << fFluxDataVector[i].fFluxCI_up_1sigma* iFluxMultiplicator << ",";
cout << fFluxDataVector[i].fFluxCI_lo_1sigma* iFluxMultiplicator << ")";
}
else if( iSigmaMinFluxLimits < -1.e3 )
{
cout << setprecision( 1 ) << fFluxDataVector[i].fFlux* iFluxMultiplicator << " $\\pm$ (";
cout << fFluxDataVector[i].fFluxCI_up_1sigma* iFluxMultiplicator << ",";
cout << fFluxDataVector[i].fFluxCI_lo_1sigma* iFluxMultiplicator << ")";
cout << " $(< " << fFluxDataVector[i].fUL* iFluxMultiplicator << ")";
}
else
{
cout << " $<$ " << fFluxDataVector[i].fUL* iFluxMultiplicator;
}
cout << " \\\\";
cout << endl;
}
}
/*
write a table for the VERITAS wiki
*/
void VLightCurveWriter::writeWikiFormat()
{
double iMinEnergy_TeV = 0.;
bool iHasOrbitalPhases = false;
if( fFluxDataVector.size() > 0 )
{
iMinEnergy_TeV = fFluxDataVector[0].fMinEnergy_TeV;
iHasOrbitalPhases = fFluxDataVector[0].hasOrbitalPhases();
}
cout << "{| border=\"1\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\"" << endl;
cout << "!MJD" << endl;
if( iHasOrbitalPhases )
{
cout << "!Phase" << endl;
}
cout << "!Observation Time [min]" << endl;
cout << "!Significance <math>\\sigma</math>" << endl;
cout << "!Non" << endl;
cout << "!Noff" << endl;
cout << "!Alpha" << endl;
cout << "!Flux (>" << setprecision( 2 ) << iMinEnergy_TeV << " TeV) [cm^-2 s^-1]" << endl;
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
cout << "|- align=\"center\"" << endl;
cout << "| " << fixed << setprecision( 1 ) << fFluxDataVector[i].fMJD << endl;
if( iHasOrbitalPhases )
{
cout << "| " << setprecision( 2 ) << fFluxDataVector[i].fOrbitalPhase << endl;
}
cout << "| " << setprecision( 1 ) << fFluxDataVector[i].fExposure_deadTimeCorrected / 60. << endl;
cout << "| " << setprecision( 1 ) << fFluxDataVector[i].fSignificance << endl;
cout << "| " << ( int )fFluxDataVector[i].fNon << endl;
cout << "| " << ( int )fFluxDataVector[i].fNoff << endl;
cout << "| " << setprecision( 2 ) << fFluxDataVector[i].fAlpha << endl;
if( fFluxDataVector[i].isSignificantDataPoint() )
{
cout << "| " << setprecision( 1 ) << scientific << fFluxDataVector[i].fFlux;
cout << " (+" << fFluxDataVector[i].fRate_up_1sigma;
cout << " ,-" << fFluxDataVector[i].fRate_lo_1sigma << ")" << endl;
}
else
{
cout << "| " << setprecision( 1 ) << scientific << fFluxDataVector[i].fFluxUL << endl;
}
}
cout << "|}" << fixed << endl;
}
/*
write ligth curve for discrete correlation function (DCF and ZDCF) analysis
*/
void VLightCurveWriter::writeDCFFormat()
{
for( unsigned int i = 0; i < fFluxDataVector.size(); i++ )
{
cout << "DCF\t";
cout << fixed << setprecision( 4 ) << fFluxDataVector[i].fMJD << "\t";
cout << scientific << setprecision( 4 ) << fFluxDataVector[i].fFlux << "\t";
cout << fFluxDataVector[i].fFluxCI_1sigma;
cout << fixed << endl;
}
}
| 31.878136 | 131 | 0.557342 | GernotMaier |
1de7382e867adc85d280d0fe15b2b3b2e6badd67 | 3,447 | hpp | C++ | include/lug/Graphics/Node.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 275 | 2016-10-08T15:33:17.000Z | 2022-03-30T06:11:56.000Z | include/lug/Graphics/Node.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 24 | 2016-09-29T20:51:20.000Z | 2018-05-09T21:41:36.000Z | include/lug/Graphics/Node.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 37 | 2017-02-25T05:03:48.000Z | 2021-05-10T19:06:29.000Z | #pragma once
#include <memory>
#include <vector>
#include <lug/Graphics/Export.hpp>
#include <lug/Math/Matrix.hpp>
#include <lug/Math/Quaternion.hpp>
#include <lug/Math/Vector.hpp>
namespace lug {
namespace Graphics {
class LUG_GRAPHICS_API Node {
public:
enum class TransformSpace : uint8_t {
Local,
Parent,
World
};
public:
Node(const std::string& name);
Node(const Node&) = delete;
Node(Node&&) = delete;
Node& operator=(const Node&) = delete;
Node& operator=(Node&&) = delete;
virtual ~Node() = default;
void setParent(Node *parent);
Node* getParent() const;
const std::string& getName() const;
Node* getNode(const std::string& name);
const Node* getNode(const std::string& name) const;
const Math::Vec3f& getAbsolutePosition();
const Math::Quatf& getAbsoluteRotation();
const Math::Vec3f& getAbsoluteScale();
const Math::Mat4x4f& getTransform();
const std::vector<Node*>& getChildren() const;
void attachChild(Node& child);
void translate(const Math::Vec3f& direction, TransformSpace space = TransformSpace::Local);
void rotate(float angle, const Math::Vec3f& axis, TransformSpace space = TransformSpace::Local);
void rotate(const Math::Quatf& quat, TransformSpace space = TransformSpace::Local);
void scale(const Math::Vec3f& scale);
void setPosition(const Math::Vec3f& position, TransformSpace space = TransformSpace::Local);
void setRotation(float angle, const Math::Vec3f& axis, TransformSpace space = TransformSpace::Local);
void setRotation(const Math::Quatf& rotation, TransformSpace space = TransformSpace::Local);
/**
* @brief Rotates the node according to the direction given in parameter
*
* @param[in] spaceTargetDirection The direction we want the local direction point to (will be normalized), in local space
* @param[in] localDirectionVector The local direction vector
* @param[in] localUpVector The local up vector
* @param[in] space The space, defaults to local
*/
void setDirection(const Math::Vec3f& spaceTargetDirection, const Math::Vec3f& localDirectionVector, const Math::Vec3f& localUpVector, TransformSpace space = TransformSpace::Local);
/**
* @brief Rotates the node in order to look at the target position
*
* @param[in] targetPosition The target position
* @param[in] localDirectionVector The local direction vector
* @param[in] localUpVector The local up vector
* @param[in] space The space, defaults to local
*/
void lookAt(const Math::Vec3f& targetPosition, const Math::Vec3f& localDirectionVector, const Math::Vec3f& localUpVector, TransformSpace space = TransformSpace::Local);
virtual void needUpdate();
private:
void update();
protected:
Node* _parent{nullptr};
std::string _name;
std::vector<Node*> _children;
private:
Math::Vec3f _position{Math::Vec3f(0.0f)};
Math::Quatf _rotation{Math::Quatf::identity()};
Math::Vec3f _scale{Math::Vec3f(1.0f)};
Math::Vec3f _absolutePosition{Math::Vec3f(0.0f)};
Math::Quatf _absoluteRotation{Math::Quatf::identity()};
Math::Vec3f _absoluteScale{Math::Vec3f(1.0f)};
Math::Mat4x4f _transform{Math::Mat4x4f::identity()};
bool _needUpdate{true};
};
#include <lug/Graphics/Node.inl>
} // Graphics
} // lug
| 32.214953 | 184 | 0.680302 | Lugdunum3D |
1de79bcf0ec523a4440cdd50b2845e0cd454843e | 546,113 | cpp | C++ | src/main_4100.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | src/main_4100.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | src/main_4100.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.CAPI/Oculus.Platform.ovrKeyValuePair
#include "Oculus/Platform/CAPI.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.String key_
::StringW& Oculus::Platform::CAPI::ovrKeyValuePair::dyn_key_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::dyn_key_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "key_"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private Oculus.Platform.KeyValuePairType valueType_
::Oculus::Platform::KeyValuePairType& Oculus::Platform::CAPI::ovrKeyValuePair::dyn_valueType_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::dyn_valueType_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "valueType_"))->offset;
return *reinterpret_cast<::Oculus::Platform::KeyValuePairType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.String stringValue_
::StringW& Oculus::Platform::CAPI::ovrKeyValuePair::dyn_stringValue_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::dyn_stringValue_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "stringValue_"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 intValue_
int& Oculus::Platform::CAPI::ovrKeyValuePair::dyn_intValue_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::dyn_intValue_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "intValue_"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Double doubleValue_
double& Oculus::Platform::CAPI::ovrKeyValuePair::dyn_doubleValue_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::dyn_doubleValue_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "doubleValue_"))->offset;
return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.ovrKeyValuePair..ctor
Oculus::Platform::CAPI::ovrKeyValuePair::ovrKeyValuePair(::StringW key, ::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.ovrKeyValuePair..ctor
Oculus::Platform::CAPI::ovrKeyValuePair::ovrKeyValuePair(::StringW key, int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.ovrKeyValuePair..ctor
Oculus::Platform::CAPI::ovrKeyValuePair::ovrKeyValuePair(::StringW key, double value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrKeyValuePair::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.CAPI/Oculus.Platform.ovrMatchmakingCriterion
#include "Oculus/Platform/CAPI_ovrMatchmakingCriterion.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.String key_
::StringW& Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_key_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_key_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "key_"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public Oculus.Platform.MatchmakingCriterionImportance importance_
::Oculus::Platform::MatchmakingCriterionImportance& Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_importance_() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_importance_");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "importance_"))->offset;
return *reinterpret_cast<::Oculus::Platform::MatchmakingCriterionImportance*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.IntPtr parameterArray
::System::IntPtr& Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_parameterArray() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_parameterArray");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "parameterArray"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.UInt32 parameterArrayCount
uint& Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_parameterArrayCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrMatchmakingCriterion::dyn_parameterArrayCount");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "parameterArrayCount"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.ovrMatchmakingCriterion..ctor
Oculus::Platform::CAPI::ovrMatchmakingCriterion::ovrMatchmakingCriterion(::StringW key, ::Oculus::Platform::MatchmakingCriterionImportance importance) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::ovrMatchmakingCriterion::.ctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, ".ctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(importance)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, importance);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: Oculus.Platform.CAPI/Oculus.Platform.FilterCallback
#include "Oculus/Platform/CAPI_FilterCallback.hpp"
// Including type: System.UIntPtr
#include "System/UIntPtr.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.FilterCallback.Invoke
void Oculus::Platform::CAPI::FilterCallback::Invoke(ByRef<::ArrayW<int16_t>> pcmData, ::System::UIntPtr pcmDataLength, int frequency, int numChannels) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::FilterCallback::Invoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pcmData), ::il2cpp_utils::ExtractType(pcmDataLength), ::il2cpp_utils::ExtractType(frequency), ::il2cpp_utils::ExtractType(numChannels)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pcmData), pcmDataLength, frequency, numChannels);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.FilterCallback.BeginInvoke
::System::IAsyncResult* Oculus::Platform::CAPI::FilterCallback::BeginInvoke(ByRef<::ArrayW<int16_t>> pcmData, ::System::UIntPtr pcmDataLength, int frequency, int numChannels, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::FilterCallback::BeginInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pcmData), ::il2cpp_utils::ExtractType(pcmDataLength), ::il2cpp_utils::ExtractType(frequency), ::il2cpp_utils::ExtractType(numChannels), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(object)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pcmData), pcmDataLength, frequency, numChannels, callback, object);
}
// Autogenerated method: Oculus.Platform.CAPI/Oculus.Platform.FilterCallback.EndInvoke
void Oculus::Platform::CAPI::FilterCallback::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CAPI::FilterCallback::EndInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(result)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.Callback
#include "Oculus/Platform/Callback.hpp"
// Including type: Oculus.Platform.Callback/Oculus.Platform.RequestCallback
#include "Oculus/Platform/Callback_RequestCallback.hpp"
// Including type: Oculus.Platform.Callback/Oculus.Platform.RequestCallback`1
#include "Oculus/Platform/Callback_RequestCallback_1.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: Oculus.Platform.Request
#include "Oculus/Platform/Request.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: Oculus.Platform.Message/Oculus.Platform.Callback
#include "Oculus/Platform/Message_Callback.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.Collections.Generic.Dictionary`2<System.UInt64,Oculus.Platform.Request> requestIDsToRequests
::System::Collections::Generic::Dictionary_2<uint64_t, ::Oculus::Platform::Request*>* Oculus::Platform::Callback::_get_requestIDsToRequests() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_requestIDsToRequests");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Collections::Generic::Dictionary_2<uint64_t, ::Oculus::Platform::Request*>*>("Oculus.Platform", "Callback", "requestIDsToRequests")));
}
// Autogenerated static field setter
// Set static field: static private System.Collections.Generic.Dictionary`2<System.UInt64,Oculus.Platform.Request> requestIDsToRequests
void Oculus::Platform::Callback::_set_requestIDsToRequests(::System::Collections::Generic::Dictionary_2<uint64_t, ::Oculus::Platform::Request*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_requestIDsToRequests");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "requestIDsToRequests", value));
}
// Autogenerated static field getter
// Get static field: static private System.Collections.Generic.Dictionary`2<Oculus.Platform.Message/Oculus.Platform.MessageType,Oculus.Platform.Callback/Oculus.Platform.RequestCallback> notificationCallbacks
::System::Collections::Generic::Dictionary_2<::Oculus::Platform::Message::MessageType, ::Oculus::Platform::Callback::RequestCallback*>* Oculus::Platform::Callback::_get_notificationCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_notificationCallbacks");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Collections::Generic::Dictionary_2<::Oculus::Platform::Message::MessageType, ::Oculus::Platform::Callback::RequestCallback*>*>("Oculus.Platform", "Callback", "notificationCallbacks")));
}
// Autogenerated static field setter
// Set static field: static private System.Collections.Generic.Dictionary`2<Oculus.Platform.Message/Oculus.Platform.MessageType,Oculus.Platform.Callback/Oculus.Platform.RequestCallback> notificationCallbacks
void Oculus::Platform::Callback::_set_notificationCallbacks(::System::Collections::Generic::Dictionary_2<::Oculus::Platform::Message::MessageType, ::Oculus::Platform::Callback::RequestCallback*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_notificationCallbacks");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "notificationCallbacks", value));
}
// Autogenerated static field getter
// Get static field: static private System.Boolean hasRegisteredRoomInviteNotificationHandler
bool Oculus::Platform::Callback::_get_hasRegisteredRoomInviteNotificationHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_hasRegisteredRoomInviteNotificationHandler");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("Oculus.Platform", "Callback", "hasRegisteredRoomInviteNotificationHandler"));
}
// Autogenerated static field setter
// Set static field: static private System.Boolean hasRegisteredRoomInviteNotificationHandler
void Oculus::Platform::Callback::_set_hasRegisteredRoomInviteNotificationHandler(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_hasRegisteredRoomInviteNotificationHandler");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "hasRegisteredRoomInviteNotificationHandler", value));
}
// Autogenerated static field getter
// Get static field: static private System.Collections.Generic.List`1<Oculus.Platform.Message> pendingRoomInviteNotifications
::System::Collections::Generic::List_1<::Oculus::Platform::Message*>* Oculus::Platform::Callback::_get_pendingRoomInviteNotifications() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_pendingRoomInviteNotifications");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Collections::Generic::List_1<::Oculus::Platform::Message*>*>("Oculus.Platform", "Callback", "pendingRoomInviteNotifications"));
}
// Autogenerated static field setter
// Set static field: static private System.Collections.Generic.List`1<Oculus.Platform.Message> pendingRoomInviteNotifications
void Oculus::Platform::Callback::_set_pendingRoomInviteNotifications(::System::Collections::Generic::List_1<::Oculus::Platform::Message*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_pendingRoomInviteNotifications");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "pendingRoomInviteNotifications", value));
}
// Autogenerated static field getter
// Get static field: static private System.Boolean hasRegisteredJoinIntentNotificationHandler
bool Oculus::Platform::Callback::_get_hasRegisteredJoinIntentNotificationHandler() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_hasRegisteredJoinIntentNotificationHandler");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("Oculus.Platform", "Callback", "hasRegisteredJoinIntentNotificationHandler"));
}
// Autogenerated static field setter
// Set static field: static private System.Boolean hasRegisteredJoinIntentNotificationHandler
void Oculus::Platform::Callback::_set_hasRegisteredJoinIntentNotificationHandler(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_hasRegisteredJoinIntentNotificationHandler");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "hasRegisteredJoinIntentNotificationHandler", value));
}
// Autogenerated static field getter
// Get static field: static private Oculus.Platform.Message latestPendingJoinIntentNotifications
::Oculus::Platform::Message* Oculus::Platform::Callback::_get_latestPendingJoinIntentNotifications() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_get_latestPendingJoinIntentNotifications");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message*>("Oculus.Platform", "Callback", "latestPendingJoinIntentNotifications"));
}
// Autogenerated static field setter
// Set static field: static private Oculus.Platform.Message latestPendingJoinIntentNotifications
void Oculus::Platform::Callback::_set_latestPendingJoinIntentNotifications(::Oculus::Platform::Message* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::_set_latestPendingJoinIntentNotifications");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Callback", "latestPendingJoinIntentNotifications", value));
}
// Autogenerated method: Oculus.Platform.Callback..cctor
void Oculus::Platform::Callback::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Callback.SetNotificationCallback
void Oculus::Platform::Callback::SetNotificationCallback(::Oculus::Platform::Message::MessageType type, ::Oculus::Platform::Message::Callback* callback) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::SetNotificationCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "SetNotificationCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(callback)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, type, callback);
}
// Autogenerated method: Oculus.Platform.Callback.AddRequest
void Oculus::Platform::Callback::AddRequest(::Oculus::Platform::Request* request) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::AddRequest");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "AddRequest", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(request)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, request);
}
// Autogenerated method: Oculus.Platform.Callback.RunCallbacks
void Oculus::Platform::Callback::RunCallbacks() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::RunCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "RunCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Callback.RunLimitedCallbacks
void Oculus::Platform::Callback::RunLimitedCallbacks(uint limit) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::RunLimitedCallbacks");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "RunLimitedCallbacks", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(limit)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, limit);
}
// Autogenerated method: Oculus.Platform.Callback.OnApplicationQuit
void Oculus::Platform::Callback::OnApplicationQuit() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::OnApplicationQuit");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "OnApplicationQuit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Callback.FlushRoomInviteNotificationQueue
void Oculus::Platform::Callback::FlushRoomInviteNotificationQueue() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::FlushRoomInviteNotificationQueue");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "FlushRoomInviteNotificationQueue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Callback.FlushJoinIntentNotificationQueue
void Oculus::Platform::Callback::FlushJoinIntentNotificationQueue() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::FlushJoinIntentNotificationQueue");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "FlushJoinIntentNotificationQueue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Callback.HandleMessage
void Oculus::Platform::Callback::HandleMessage(::Oculus::Platform::Message* msg) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::HandleMessage");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Callback", "HandleMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(msg)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, msg);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.Callback/Oculus.Platform.RequestCallback
#include "Oculus/Platform/Callback_RequestCallback.hpp"
// Including type: Oculus.Platform.Message/Oculus.Platform.Callback
#include "Oculus/Platform/Message_Callback.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 Oculus.Platform.Message/Oculus.Platform.Callback messageCallback
::Oculus::Platform::Message::Callback*& Oculus::Platform::Callback::RequestCallback::dyn_messageCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::RequestCallback::dyn_messageCallback");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "messageCallback"))->offset;
return *reinterpret_cast<::Oculus::Platform::Message::Callback**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.Callback/Oculus.Platform.RequestCallback.HandleMessage
void Oculus::Platform::Callback::RequestCallback::HandleMessage(::Oculus::Platform::Message* msg) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Callback::RequestCallback::HandleMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HandleMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(msg)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, msg);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.CallbackRunner
#include "Oculus/Platform/CallbackRunner.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 IsPersistantBetweenSceneLoads
bool& Oculus::Platform::CallbackRunner::dyn_IsPersistantBetweenSceneLoads() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::dyn_IsPersistantBetweenSceneLoads");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "IsPersistantBetweenSceneLoads"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.CallbackRunner.ovr_UnityResetTestPlatform
void Oculus::Platform::CallbackRunner::ovr_UnityResetTestPlatform() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::ovr_UnityResetTestPlatform");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "CallbackRunner", "ovr_UnityResetTestPlatform", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.CallbackRunner.Awake
void Oculus::Platform::CallbackRunner::Awake() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::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 method: Oculus.Platform.CallbackRunner.Update
void Oculus::Platform::CallbackRunner::Update() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::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: Oculus.Platform.CallbackRunner.OnDestroy
void Oculus::Platform::CallbackRunner::OnDestroy() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::OnDestroy");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnDestroy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.CallbackRunner.OnApplicationQuit
void Oculus::Platform::CallbackRunner::OnApplicationQuit() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CallbackRunner::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
// Including type: Oculus.Platform.ChallengeCreationType
#include "Oculus/Platform/ChallengeCreationType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A24FC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeCreationType Unknown
::Oculus::Platform::ChallengeCreationType Oculus::Platform::ChallengeCreationType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeCreationType>("Oculus.Platform", "ChallengeCreationType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeCreationType Unknown
void Oculus::Platform::ChallengeCreationType::_set_Unknown(::Oculus::Platform::ChallengeCreationType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeCreationType", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A2534
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeCreationType UserCreated
::Oculus::Platform::ChallengeCreationType Oculus::Platform::ChallengeCreationType::_get_UserCreated() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_get_UserCreated");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeCreationType>("Oculus.Platform", "ChallengeCreationType", "UserCreated"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeCreationType UserCreated
void Oculus::Platform::ChallengeCreationType::_set_UserCreated(::Oculus::Platform::ChallengeCreationType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_set_UserCreated");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeCreationType", "UserCreated", value));
}
// [DescriptionAttribute] Offset: 0x5A256C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeCreationType DeveloperCreated
::Oculus::Platform::ChallengeCreationType Oculus::Platform::ChallengeCreationType::_get_DeveloperCreated() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_get_DeveloperCreated");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeCreationType>("Oculus.Platform", "ChallengeCreationType", "DeveloperCreated"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeCreationType DeveloperCreated
void Oculus::Platform::ChallengeCreationType::_set_DeveloperCreated(::Oculus::Platform::ChallengeCreationType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::_set_DeveloperCreated");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeCreationType", "DeveloperCreated", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::ChallengeCreationType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeCreationType::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: Oculus.Platform.ChallengeOptions
#include "Oculus/Platform/ChallengeOptions.hpp"
// Including type: System.DateTime
#include "System/DateTime.hpp"
// Including type: Oculus.Platform.ChallengeViewerFilter
#include "Oculus/Platform/ChallengeViewerFilter.hpp"
// Including type: Oculus.Platform.ChallengeVisibility
#include "Oculus/Platform/ChallengeVisibility.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.IntPtr Handle
::System::IntPtr& Oculus::Platform::ChallengeOptions::dyn_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::dyn_Handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Handle"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetDescription
void Oculus::Platform::ChallengeOptions::SetDescription(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetDescription");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetDescription", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetEndDate
void Oculus::Platform::ChallengeOptions::SetEndDate(::System::DateTime value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetEndDate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEndDate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetIncludeActiveChallenges
void Oculus::Platform::ChallengeOptions::SetIncludeActiveChallenges(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetIncludeActiveChallenges");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIncludeActiveChallenges", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetIncludeFutureChallenges
void Oculus::Platform::ChallengeOptions::SetIncludeFutureChallenges(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetIncludeFutureChallenges");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIncludeFutureChallenges", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetIncludePastChallenges
void Oculus::Platform::ChallengeOptions::SetIncludePastChallenges(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetIncludePastChallenges");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIncludePastChallenges", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetLeaderboardName
void Oculus::Platform::ChallengeOptions::SetLeaderboardName(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetLeaderboardName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLeaderboardName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetStartDate
void Oculus::Platform::ChallengeOptions::SetStartDate(::System::DateTime value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetStartDate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetStartDate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetTitle
void Oculus::Platform::ChallengeOptions::SetTitle(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetTitle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetTitle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetViewerFilter
void Oculus::Platform::ChallengeOptions::SetViewerFilter(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetViewerFilter");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetViewerFilter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.SetVisibility
void Oculus::Platform::ChallengeOptions::SetVisibility(::Oculus::Platform::ChallengeVisibility value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::SetVisibility");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetVisibility", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.ChallengeOptions.op_Explicit
// ABORTED elsewhere. Oculus::Platform::ChallengeOptions::operator ::System::IntPtr()
// Autogenerated method: Oculus.Platform.ChallengeOptions.Finalize
void Oculus::Platform::ChallengeOptions::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeOptions::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", 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: Oculus.Platform.ChallengeViewerFilter
#include "Oculus/Platform/ChallengeViewerFilter.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A25A4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeViewerFilter Unknown
::Oculus::Platform::ChallengeViewerFilter Oculus::Platform::ChallengeViewerFilter::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeViewerFilter>("Oculus.Platform", "ChallengeViewerFilter", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeViewerFilter Unknown
void Oculus::Platform::ChallengeViewerFilter::_set_Unknown(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeViewerFilter", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A25DC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeViewerFilter AllVisible
::Oculus::Platform::ChallengeViewerFilter Oculus::Platform::ChallengeViewerFilter::_get_AllVisible() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_get_AllVisible");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeViewerFilter>("Oculus.Platform", "ChallengeViewerFilter", "AllVisible"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeViewerFilter AllVisible
void Oculus::Platform::ChallengeViewerFilter::_set_AllVisible(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_set_AllVisible");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeViewerFilter", "AllVisible", value));
}
// [DescriptionAttribute] Offset: 0x5A2614
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeViewerFilter Participating
::Oculus::Platform::ChallengeViewerFilter Oculus::Platform::ChallengeViewerFilter::_get_Participating() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_get_Participating");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeViewerFilter>("Oculus.Platform", "ChallengeViewerFilter", "Participating"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeViewerFilter Participating
void Oculus::Platform::ChallengeViewerFilter::_set_Participating(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_set_Participating");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeViewerFilter", "Participating", value));
}
// [DescriptionAttribute] Offset: 0x5A264C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeViewerFilter Invited
::Oculus::Platform::ChallengeViewerFilter Oculus::Platform::ChallengeViewerFilter::_get_Invited() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_get_Invited");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeViewerFilter>("Oculus.Platform", "ChallengeViewerFilter", "Invited"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeViewerFilter Invited
void Oculus::Platform::ChallengeViewerFilter::_set_Invited(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_set_Invited");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeViewerFilter", "Invited", value));
}
// [DescriptionAttribute] Offset: 0x5A2684
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeViewerFilter ParticipatingOrInvited
::Oculus::Platform::ChallengeViewerFilter Oculus::Platform::ChallengeViewerFilter::_get_ParticipatingOrInvited() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_get_ParticipatingOrInvited");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeViewerFilter>("Oculus.Platform", "ChallengeViewerFilter", "ParticipatingOrInvited"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeViewerFilter ParticipatingOrInvited
void Oculus::Platform::ChallengeViewerFilter::_set_ParticipatingOrInvited(::Oculus::Platform::ChallengeViewerFilter value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::_set_ParticipatingOrInvited");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeViewerFilter", "ParticipatingOrInvited", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::ChallengeViewerFilter::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeViewerFilter::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: Oculus.Platform.ChallengeVisibility
#include "Oculus/Platform/ChallengeVisibility.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A26BC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeVisibility Unknown
::Oculus::Platform::ChallengeVisibility Oculus::Platform::ChallengeVisibility::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeVisibility>("Oculus.Platform", "ChallengeVisibility", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeVisibility Unknown
void Oculus::Platform::ChallengeVisibility::_set_Unknown(::Oculus::Platform::ChallengeVisibility value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeVisibility", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A26F4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeVisibility InviteOnly
::Oculus::Platform::ChallengeVisibility Oculus::Platform::ChallengeVisibility::_get_InviteOnly() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_get_InviteOnly");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeVisibility>("Oculus.Platform", "ChallengeVisibility", "InviteOnly"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeVisibility InviteOnly
void Oculus::Platform::ChallengeVisibility::_set_InviteOnly(::Oculus::Platform::ChallengeVisibility value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_set_InviteOnly");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeVisibility", "InviteOnly", value));
}
// [DescriptionAttribute] Offset: 0x5A272C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeVisibility Public
::Oculus::Platform::ChallengeVisibility Oculus::Platform::ChallengeVisibility::_get_Public() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_get_Public");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeVisibility>("Oculus.Platform", "ChallengeVisibility", "Public"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeVisibility Public
void Oculus::Platform::ChallengeVisibility::_set_Public(::Oculus::Platform::ChallengeVisibility value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_set_Public");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeVisibility", "Public", value));
}
// [DescriptionAttribute] Offset: 0x5A2764
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.ChallengeVisibility Private
::Oculus::Platform::ChallengeVisibility Oculus::Platform::ChallengeVisibility::_get_Private() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_get_Private");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::ChallengeVisibility>("Oculus.Platform", "ChallengeVisibility", "Private"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.ChallengeVisibility Private
void Oculus::Platform::ChallengeVisibility::_set_Private(::Oculus::Platform::ChallengeVisibility value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::_set_Private");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "ChallengeVisibility", "Private", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::ChallengeVisibility::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::ChallengeVisibility::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: Oculus.Platform.CloudStorageDataStatus
#include "Oculus/Platform/CloudStorageDataStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A279C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus Unknown
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus Unknown
void Oculus::Platform::CloudStorageDataStatus::_set_Unknown(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A27D4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus InSync
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_InSync() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_InSync");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "InSync"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus InSync
void Oculus::Platform::CloudStorageDataStatus::_set_InSync(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_InSync");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "InSync", value));
}
// [DescriptionAttribute] Offset: 0x5A280C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus NeedsDownload
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_NeedsDownload() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_NeedsDownload");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "NeedsDownload"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus NeedsDownload
void Oculus::Platform::CloudStorageDataStatus::_set_NeedsDownload(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_NeedsDownload");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "NeedsDownload", value));
}
// [DescriptionAttribute] Offset: 0x5A2844
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus RemoteDownloading
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_RemoteDownloading() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_RemoteDownloading");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "RemoteDownloading"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus RemoteDownloading
void Oculus::Platform::CloudStorageDataStatus::_set_RemoteDownloading(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_RemoteDownloading");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "RemoteDownloading", value));
}
// [DescriptionAttribute] Offset: 0x5A287C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus NeedsUpload
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_NeedsUpload() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_NeedsUpload");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "NeedsUpload"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus NeedsUpload
void Oculus::Platform::CloudStorageDataStatus::_set_NeedsUpload(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_NeedsUpload");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "NeedsUpload", value));
}
// [DescriptionAttribute] Offset: 0x5A28B4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus LocalUploading
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_LocalUploading() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_LocalUploading");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "LocalUploading"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus LocalUploading
void Oculus::Platform::CloudStorageDataStatus::_set_LocalUploading(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_LocalUploading");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "LocalUploading", value));
}
// [DescriptionAttribute] Offset: 0x5A28EC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageDataStatus InConflict
::Oculus::Platform::CloudStorageDataStatus Oculus::Platform::CloudStorageDataStatus::_get_InConflict() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_get_InConflict");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageDataStatus>("Oculus.Platform", "CloudStorageDataStatus", "InConflict"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageDataStatus InConflict
void Oculus::Platform::CloudStorageDataStatus::_set_InConflict(::Oculus::Platform::CloudStorageDataStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::_set_InConflict");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageDataStatus", "InConflict", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::CloudStorageDataStatus::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageDataStatus::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: Oculus.Platform.CloudStorageUpdateStatus
#include "Oculus/Platform/CloudStorageUpdateStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2924
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageUpdateStatus Unknown
::Oculus::Platform::CloudStorageUpdateStatus Oculus::Platform::CloudStorageUpdateStatus::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageUpdateStatus>("Oculus.Platform", "CloudStorageUpdateStatus", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageUpdateStatus Unknown
void Oculus::Platform::CloudStorageUpdateStatus::_set_Unknown(::Oculus::Platform::CloudStorageUpdateStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageUpdateStatus", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A295C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageUpdateStatus Ok
::Oculus::Platform::CloudStorageUpdateStatus Oculus::Platform::CloudStorageUpdateStatus::_get_Ok() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_get_Ok");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageUpdateStatus>("Oculus.Platform", "CloudStorageUpdateStatus", "Ok"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageUpdateStatus Ok
void Oculus::Platform::CloudStorageUpdateStatus::_set_Ok(::Oculus::Platform::CloudStorageUpdateStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_set_Ok");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageUpdateStatus", "Ok", value));
}
// [DescriptionAttribute] Offset: 0x5A2994
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageUpdateStatus BetterVersionStored
::Oculus::Platform::CloudStorageUpdateStatus Oculus::Platform::CloudStorageUpdateStatus::_get_BetterVersionStored() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_get_BetterVersionStored");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageUpdateStatus>("Oculus.Platform", "CloudStorageUpdateStatus", "BetterVersionStored"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageUpdateStatus BetterVersionStored
void Oculus::Platform::CloudStorageUpdateStatus::_set_BetterVersionStored(::Oculus::Platform::CloudStorageUpdateStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_set_BetterVersionStored");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageUpdateStatus", "BetterVersionStored", value));
}
// [DescriptionAttribute] Offset: 0x5A29CC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.CloudStorageUpdateStatus ManualMergeRequired
::Oculus::Platform::CloudStorageUpdateStatus Oculus::Platform::CloudStorageUpdateStatus::_get_ManualMergeRequired() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_get_ManualMergeRequired");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::CloudStorageUpdateStatus>("Oculus.Platform", "CloudStorageUpdateStatus", "ManualMergeRequired"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.CloudStorageUpdateStatus ManualMergeRequired
void Oculus::Platform::CloudStorageUpdateStatus::_set_ManualMergeRequired(::Oculus::Platform::CloudStorageUpdateStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::_set_ManualMergeRequired");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "CloudStorageUpdateStatus", "ManualMergeRequired", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::CloudStorageUpdateStatus::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::CloudStorageUpdateStatus::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: Oculus.Platform.GroupPresenceOptions
#include "Oculus/Platform/GroupPresenceOptions.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.IntPtr Handle
::System::IntPtr& Oculus::Platform::GroupPresenceOptions::dyn_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::dyn_Handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Handle"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.SetDestinationApiName
void Oculus::Platform::GroupPresenceOptions::SetDestinationApiName(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::SetDestinationApiName");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetDestinationApiName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.SetIsJoinable
void Oculus::Platform::GroupPresenceOptions::SetIsJoinable(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::SetIsJoinable");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIsJoinable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.SetLobbySessionId
void Oculus::Platform::GroupPresenceOptions::SetLobbySessionId(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::SetLobbySessionId");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLobbySessionId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.SetMatchSessionId
void Oculus::Platform::GroupPresenceOptions::SetMatchSessionId(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::SetMatchSessionId");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetMatchSessionId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.op_Explicit
// ABORTED elsewhere. Oculus::Platform::GroupPresenceOptions::operator ::System::IntPtr()
// Autogenerated method: Oculus.Platform.GroupPresenceOptions.Finalize
void Oculus::Platform::GroupPresenceOptions::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::GroupPresenceOptions::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", 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: Oculus.Platform.IMicrophone
#include "Oculus/Platform/IMicrophone.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.IMicrophone.Start
void Oculus::Platform::IMicrophone::Start() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IMicrophone::Start");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.IMicrophone.Stop
void Oculus::Platform::IMicrophone::Stop() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IMicrophone::Stop");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Stop", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.IMicrophone.Update
::ArrayW<float> Oculus::Platform::IMicrophone::Update() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IMicrophone::Update");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<float>, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.IVoipPCMSource
#include "Oculus/Platform/IVoipPCMSource.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.IVoipPCMSource.GetPCM
int Oculus::Platform::IVoipPCMSource::GetPCM(::ArrayW<float> dest, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IVoipPCMSource::GetPCM");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPCM", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(dest), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, dest, length);
}
// Autogenerated method: Oculus.Platform.IVoipPCMSource.SetSenderID
void Oculus::Platform::IVoipPCMSource::SetSenderID(uint64_t senderID) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IVoipPCMSource::SetSenderID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetSenderID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(senderID)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, senderID);
}
// Autogenerated method: Oculus.Platform.IVoipPCMSource.Update
void Oculus::Platform::IVoipPCMSource::Update() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IVoipPCMSource::Update");
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: Oculus.Platform.IVoipPCMSource.PeekSizeElements
int Oculus::Platform::IVoipPCMSource::PeekSizeElements() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::IVoipPCMSource::PeekSizeElements");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PeekSizeElements", 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: Oculus.Platform.InviteOptions
#include "Oculus/Platform/InviteOptions.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.IntPtr Handle
::System::IntPtr& Oculus::Platform::InviteOptions::dyn_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::InviteOptions::dyn_Handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Handle"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.InviteOptions.AddSuggestedUser
void Oculus::Platform::InviteOptions::AddSuggestedUser(uint64_t userID) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::InviteOptions::AddSuggestedUser");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddSuggestedUser", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(userID)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, userID);
}
// Autogenerated method: Oculus.Platform.InviteOptions.ClearSuggestedUsers
void Oculus::Platform::InviteOptions::ClearSuggestedUsers() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::InviteOptions::ClearSuggestedUsers");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearSuggestedUsers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.InviteOptions.op_Explicit
// ABORTED elsewhere. Oculus::Platform::InviteOptions::operator ::System::IntPtr()
// Autogenerated method: Oculus.Platform.InviteOptions.Finalize
void Oculus::Platform::InviteOptions::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::InviteOptions::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", 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: Oculus.Platform.KeyValuePairType
#include "Oculus/Platform/KeyValuePairType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2A04
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.KeyValuePairType String
::Oculus::Platform::KeyValuePairType Oculus::Platform::KeyValuePairType::_get_String() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_get_String");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::KeyValuePairType>("Oculus.Platform", "KeyValuePairType", "String"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.KeyValuePairType String
void Oculus::Platform::KeyValuePairType::_set_String(::Oculus::Platform::KeyValuePairType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_set_String");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "KeyValuePairType", "String", value));
}
// [DescriptionAttribute] Offset: 0x5A2A3C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.KeyValuePairType Int
::Oculus::Platform::KeyValuePairType Oculus::Platform::KeyValuePairType::_get_Int() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_get_Int");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::KeyValuePairType>("Oculus.Platform", "KeyValuePairType", "Int"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.KeyValuePairType Int
void Oculus::Platform::KeyValuePairType::_set_Int(::Oculus::Platform::KeyValuePairType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_set_Int");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "KeyValuePairType", "Int", value));
}
// [DescriptionAttribute] Offset: 0x5A2A74
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.KeyValuePairType Double
::Oculus::Platform::KeyValuePairType Oculus::Platform::KeyValuePairType::_get_Double() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_get_Double");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::KeyValuePairType>("Oculus.Platform", "KeyValuePairType", "Double"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.KeyValuePairType Double
void Oculus::Platform::KeyValuePairType::_set_Double(::Oculus::Platform::KeyValuePairType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_set_Double");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "KeyValuePairType", "Double", value));
}
// [DescriptionAttribute] Offset: 0x5A2AAC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.KeyValuePairType Unknown
::Oculus::Platform::KeyValuePairType Oculus::Platform::KeyValuePairType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::KeyValuePairType>("Oculus.Platform", "KeyValuePairType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.KeyValuePairType Unknown
void Oculus::Platform::KeyValuePairType::_set_Unknown(::Oculus::Platform::KeyValuePairType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "KeyValuePairType", "Unknown", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::KeyValuePairType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::KeyValuePairType::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: Oculus.Platform.LaunchResult
#include "Oculus/Platform/LaunchResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2AE4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult Unknown
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult Unknown
void Oculus::Platform::LaunchResult::_set_Unknown(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A2B1C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult Success
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_Success() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_Success");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "Success"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult Success
void Oculus::Platform::LaunchResult::_set_Success(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_Success");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "Success", value));
}
// [DescriptionAttribute] Offset: 0x5A2B54
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult FailedRoomFull
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_FailedRoomFull() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_FailedRoomFull");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "FailedRoomFull"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult FailedRoomFull
void Oculus::Platform::LaunchResult::_set_FailedRoomFull(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_FailedRoomFull");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "FailedRoomFull", value));
}
// [DescriptionAttribute] Offset: 0x5A2B8C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult FailedGameAlreadyStarted
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_FailedGameAlreadyStarted() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_FailedGameAlreadyStarted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "FailedGameAlreadyStarted"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult FailedGameAlreadyStarted
void Oculus::Platform::LaunchResult::_set_FailedGameAlreadyStarted(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_FailedGameAlreadyStarted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "FailedGameAlreadyStarted", value));
}
// [DescriptionAttribute] Offset: 0x5A2BC4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult FailedRoomNotFound
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_FailedRoomNotFound() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_FailedRoomNotFound");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "FailedRoomNotFound"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult FailedRoomNotFound
void Oculus::Platform::LaunchResult::_set_FailedRoomNotFound(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_FailedRoomNotFound");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "FailedRoomNotFound", value));
}
// [DescriptionAttribute] Offset: 0x5A2BFC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult FailedUserDeclined
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_FailedUserDeclined() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_FailedUserDeclined");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "FailedUserDeclined"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult FailedUserDeclined
void Oculus::Platform::LaunchResult::_set_FailedUserDeclined(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_FailedUserDeclined");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "FailedUserDeclined", value));
}
// [DescriptionAttribute] Offset: 0x5A2C34
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchResult FailedOtherReason
::Oculus::Platform::LaunchResult Oculus::Platform::LaunchResult::_get_FailedOtherReason() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_get_FailedOtherReason");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchResult>("Oculus.Platform", "LaunchResult", "FailedOtherReason"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchResult FailedOtherReason
void Oculus::Platform::LaunchResult::_set_FailedOtherReason(::Oculus::Platform::LaunchResult value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::_set_FailedOtherReason");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchResult", "FailedOtherReason", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LaunchResult::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchResult::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: Oculus.Platform.LaunchType
#include "Oculus/Platform/LaunchType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2C6C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchType Unknown
::Oculus::Platform::LaunchType Oculus::Platform::LaunchType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchType>("Oculus.Platform", "LaunchType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchType Unknown
void Oculus::Platform::LaunchType::_set_Unknown(::Oculus::Platform::LaunchType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchType", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A2CA4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchType Normal
::Oculus::Platform::LaunchType Oculus::Platform::LaunchType::_get_Normal() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_get_Normal");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchType>("Oculus.Platform", "LaunchType", "Normal"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchType Normal
void Oculus::Platform::LaunchType::_set_Normal(::Oculus::Platform::LaunchType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_set_Normal");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchType", "Normal", value));
}
// [DescriptionAttribute] Offset: 0x5A2CDC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchType Invite
::Oculus::Platform::LaunchType Oculus::Platform::LaunchType::_get_Invite() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_get_Invite");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchType>("Oculus.Platform", "LaunchType", "Invite"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchType Invite
void Oculus::Platform::LaunchType::_set_Invite(::Oculus::Platform::LaunchType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_set_Invite");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchType", "Invite", value));
}
// [DescriptionAttribute] Offset: 0x5A2D14
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchType Coordinated
::Oculus::Platform::LaunchType Oculus::Platform::LaunchType::_get_Coordinated() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_get_Coordinated");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchType>("Oculus.Platform", "LaunchType", "Coordinated"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchType Coordinated
void Oculus::Platform::LaunchType::_set_Coordinated(::Oculus::Platform::LaunchType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_set_Coordinated");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchType", "Coordinated", value));
}
// [DescriptionAttribute] Offset: 0x5A2D4C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LaunchType Deeplink
::Oculus::Platform::LaunchType Oculus::Platform::LaunchType::_get_Deeplink() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_get_Deeplink");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LaunchType>("Oculus.Platform", "LaunchType", "Deeplink"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LaunchType Deeplink
void Oculus::Platform::LaunchType::_set_Deeplink(::Oculus::Platform::LaunchType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::_set_Deeplink");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LaunchType", "Deeplink", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LaunchType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LaunchType::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: Oculus.Platform.LeaderboardFilterType
#include "Oculus/Platform/LeaderboardFilterType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2D84
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardFilterType None
::Oculus::Platform::LeaderboardFilterType Oculus::Platform::LeaderboardFilterType::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardFilterType>("Oculus.Platform", "LeaderboardFilterType", "None"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardFilterType None
void Oculus::Platform::LeaderboardFilterType::_set_None(::Oculus::Platform::LeaderboardFilterType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardFilterType", "None", value));
}
// [DescriptionAttribute] Offset: 0x5A2DBC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardFilterType Friends
::Oculus::Platform::LeaderboardFilterType Oculus::Platform::LeaderboardFilterType::_get_Friends() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_get_Friends");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardFilterType>("Oculus.Platform", "LeaderboardFilterType", "Friends"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardFilterType Friends
void Oculus::Platform::LeaderboardFilterType::_set_Friends(::Oculus::Platform::LeaderboardFilterType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_set_Friends");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardFilterType", "Friends", value));
}
// [DescriptionAttribute] Offset: 0x5A2DF4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardFilterType Unknown
::Oculus::Platform::LeaderboardFilterType Oculus::Platform::LeaderboardFilterType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardFilterType>("Oculus.Platform", "LeaderboardFilterType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardFilterType Unknown
void Oculus::Platform::LeaderboardFilterType::_set_Unknown(::Oculus::Platform::LeaderboardFilterType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardFilterType", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A2E2C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardFilterType UserIds
::Oculus::Platform::LeaderboardFilterType Oculus::Platform::LeaderboardFilterType::_get_UserIds() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_get_UserIds");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardFilterType>("Oculus.Platform", "LeaderboardFilterType", "UserIds"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardFilterType UserIds
void Oculus::Platform::LeaderboardFilterType::_set_UserIds(::Oculus::Platform::LeaderboardFilterType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::_set_UserIds");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardFilterType", "UserIds", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LeaderboardFilterType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardFilterType::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: Oculus.Platform.LeaderboardStartAt
#include "Oculus/Platform/LeaderboardStartAt.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2E64
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardStartAt Top
::Oculus::Platform::LeaderboardStartAt Oculus::Platform::LeaderboardStartAt::_get_Top() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_get_Top");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardStartAt>("Oculus.Platform", "LeaderboardStartAt", "Top"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardStartAt Top
void Oculus::Platform::LeaderboardStartAt::_set_Top(::Oculus::Platform::LeaderboardStartAt value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_set_Top");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardStartAt", "Top", value));
}
// [DescriptionAttribute] Offset: 0x5A2E9C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardStartAt CenteredOnViewer
::Oculus::Platform::LeaderboardStartAt Oculus::Platform::LeaderboardStartAt::_get_CenteredOnViewer() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_get_CenteredOnViewer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardStartAt>("Oculus.Platform", "LeaderboardStartAt", "CenteredOnViewer"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardStartAt CenteredOnViewer
void Oculus::Platform::LeaderboardStartAt::_set_CenteredOnViewer(::Oculus::Platform::LeaderboardStartAt value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_set_CenteredOnViewer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardStartAt", "CenteredOnViewer", value));
}
// [DescriptionAttribute] Offset: 0x5A2ED4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardStartAt CenteredOnViewerOrTop
::Oculus::Platform::LeaderboardStartAt Oculus::Platform::LeaderboardStartAt::_get_CenteredOnViewerOrTop() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_get_CenteredOnViewerOrTop");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardStartAt>("Oculus.Platform", "LeaderboardStartAt", "CenteredOnViewerOrTop"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardStartAt CenteredOnViewerOrTop
void Oculus::Platform::LeaderboardStartAt::_set_CenteredOnViewerOrTop(::Oculus::Platform::LeaderboardStartAt value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_set_CenteredOnViewerOrTop");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardStartAt", "CenteredOnViewerOrTop", value));
}
// [DescriptionAttribute] Offset: 0x5A2F0C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LeaderboardStartAt Unknown
::Oculus::Platform::LeaderboardStartAt Oculus::Platform::LeaderboardStartAt::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LeaderboardStartAt>("Oculus.Platform", "LeaderboardStartAt", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LeaderboardStartAt Unknown
void Oculus::Platform::LeaderboardStartAt::_set_Unknown(::Oculus::Platform::LeaderboardStartAt value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LeaderboardStartAt", "Unknown", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LeaderboardStartAt::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LeaderboardStartAt::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: Oculus.Platform.LivestreamingAudience
#include "Oculus/Platform/LivestreamingAudience.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A2F44
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingAudience Unknown
::Oculus::Platform::LivestreamingAudience Oculus::Platform::LivestreamingAudience::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingAudience>("Oculus.Platform", "LivestreamingAudience", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingAudience Unknown
void Oculus::Platform::LivestreamingAudience::_set_Unknown(::Oculus::Platform::LivestreamingAudience value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingAudience", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A2F7C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingAudience Public
::Oculus::Platform::LivestreamingAudience Oculus::Platform::LivestreamingAudience::_get_Public() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_get_Public");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingAudience>("Oculus.Platform", "LivestreamingAudience", "Public"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingAudience Public
void Oculus::Platform::LivestreamingAudience::_set_Public(::Oculus::Platform::LivestreamingAudience value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_set_Public");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingAudience", "Public", value));
}
// [DescriptionAttribute] Offset: 0x5A2FB4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingAudience Friends
::Oculus::Platform::LivestreamingAudience Oculus::Platform::LivestreamingAudience::_get_Friends() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_get_Friends");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingAudience>("Oculus.Platform", "LivestreamingAudience", "Friends"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingAudience Friends
void Oculus::Platform::LivestreamingAudience::_set_Friends(::Oculus::Platform::LivestreamingAudience value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_set_Friends");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingAudience", "Friends", value));
}
// [DescriptionAttribute] Offset: 0x5A2FEC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingAudience OnlyMe
::Oculus::Platform::LivestreamingAudience Oculus::Platform::LivestreamingAudience::_get_OnlyMe() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_get_OnlyMe");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingAudience>("Oculus.Platform", "LivestreamingAudience", "OnlyMe"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingAudience OnlyMe
void Oculus::Platform::LivestreamingAudience::_set_OnlyMe(::Oculus::Platform::LivestreamingAudience value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::_set_OnlyMe");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingAudience", "OnlyMe", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LivestreamingAudience::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingAudience::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: Oculus.Platform.LivestreamingMicrophoneStatus
#include "Oculus/Platform/LivestreamingMicrophoneStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A3024
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingMicrophoneStatus Unknown
::Oculus::Platform::LivestreamingMicrophoneStatus Oculus::Platform::LivestreamingMicrophoneStatus::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingMicrophoneStatus>("Oculus.Platform", "LivestreamingMicrophoneStatus", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingMicrophoneStatus Unknown
void Oculus::Platform::LivestreamingMicrophoneStatus::_set_Unknown(::Oculus::Platform::LivestreamingMicrophoneStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingMicrophoneStatus", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A305C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingMicrophoneStatus MicrophoneOn
::Oculus::Platform::LivestreamingMicrophoneStatus Oculus::Platform::LivestreamingMicrophoneStatus::_get_MicrophoneOn() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_get_MicrophoneOn");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingMicrophoneStatus>("Oculus.Platform", "LivestreamingMicrophoneStatus", "MicrophoneOn"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingMicrophoneStatus MicrophoneOn
void Oculus::Platform::LivestreamingMicrophoneStatus::_set_MicrophoneOn(::Oculus::Platform::LivestreamingMicrophoneStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_set_MicrophoneOn");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingMicrophoneStatus", "MicrophoneOn", value));
}
// [DescriptionAttribute] Offset: 0x5A3094
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingMicrophoneStatus MicrophoneOff
::Oculus::Platform::LivestreamingMicrophoneStatus Oculus::Platform::LivestreamingMicrophoneStatus::_get_MicrophoneOff() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_get_MicrophoneOff");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingMicrophoneStatus>("Oculus.Platform", "LivestreamingMicrophoneStatus", "MicrophoneOff"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingMicrophoneStatus MicrophoneOff
void Oculus::Platform::LivestreamingMicrophoneStatus::_set_MicrophoneOff(::Oculus::Platform::LivestreamingMicrophoneStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::_set_MicrophoneOff");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingMicrophoneStatus", "MicrophoneOff", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LivestreamingMicrophoneStatus::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingMicrophoneStatus::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: Oculus.Platform.LivestreamingStartStatus
#include "Oculus/Platform/LivestreamingStartStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A30CC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus Success
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_Success() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_Success");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "Success"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus Success
void Oculus::Platform::LivestreamingStartStatus::_set_Success(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_Success");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "Success", value));
}
// [DescriptionAttribute] Offset: 0x5A3104
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus Unknown
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus Unknown
void Oculus::Platform::LivestreamingStartStatus::_set_Unknown(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A313C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus NoPackageSet
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_NoPackageSet() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_NoPackageSet");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "NoPackageSet"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus NoPackageSet
void Oculus::Platform::LivestreamingStartStatus::_set_NoPackageSet(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_NoPackageSet");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "NoPackageSet", value));
}
// [DescriptionAttribute] Offset: 0x5A3174
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus NoFbConnect
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_NoFbConnect() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_NoFbConnect");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "NoFbConnect"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus NoFbConnect
void Oculus::Platform::LivestreamingStartStatus::_set_NoFbConnect(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_NoFbConnect");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "NoFbConnect", value));
}
// [DescriptionAttribute] Offset: 0x5A31AC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus NoSessionId
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_NoSessionId() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_NoSessionId");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "NoSessionId"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus NoSessionId
void Oculus::Platform::LivestreamingStartStatus::_set_NoSessionId(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_NoSessionId");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "NoSessionId", value));
}
// [DescriptionAttribute] Offset: 0x5A31E4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.LivestreamingStartStatus MissingParameters
::Oculus::Platform::LivestreamingStartStatus Oculus::Platform::LivestreamingStartStatus::_get_MissingParameters() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_get_MissingParameters");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::LivestreamingStartStatus>("Oculus.Platform", "LivestreamingStartStatus", "MissingParameters"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.LivestreamingStartStatus MissingParameters
void Oculus::Platform::LivestreamingStartStatus::_set_MissingParameters(::Oculus::Platform::LivestreamingStartStatus value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::_set_MissingParameters");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "LivestreamingStartStatus", "MissingParameters", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::LivestreamingStartStatus::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::LivestreamingStartStatus::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: Oculus.Platform.MatchmakingCriterionImportance
#include "Oculus/Platform/MatchmakingCriterionImportance.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A321C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingCriterionImportance Required
::Oculus::Platform::MatchmakingCriterionImportance Oculus::Platform::MatchmakingCriterionImportance::_get_Required() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_get_Required");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingCriterionImportance>("Oculus.Platform", "MatchmakingCriterionImportance", "Required"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingCriterionImportance Required
void Oculus::Platform::MatchmakingCriterionImportance::_set_Required(::Oculus::Platform::MatchmakingCriterionImportance value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_set_Required");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingCriterionImportance", "Required", value));
}
// [DescriptionAttribute] Offset: 0x5A3254
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingCriterionImportance High
::Oculus::Platform::MatchmakingCriterionImportance Oculus::Platform::MatchmakingCriterionImportance::_get_High() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_get_High");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingCriterionImportance>("Oculus.Platform", "MatchmakingCriterionImportance", "High"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingCriterionImportance High
void Oculus::Platform::MatchmakingCriterionImportance::_set_High(::Oculus::Platform::MatchmakingCriterionImportance value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_set_High");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingCriterionImportance", "High", value));
}
// [DescriptionAttribute] Offset: 0x5A328C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingCriterionImportance Medium
::Oculus::Platform::MatchmakingCriterionImportance Oculus::Platform::MatchmakingCriterionImportance::_get_Medium() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_get_Medium");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingCriterionImportance>("Oculus.Platform", "MatchmakingCriterionImportance", "Medium"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingCriterionImportance Medium
void Oculus::Platform::MatchmakingCriterionImportance::_set_Medium(::Oculus::Platform::MatchmakingCriterionImportance value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_set_Medium");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingCriterionImportance", "Medium", value));
}
// [DescriptionAttribute] Offset: 0x5A32C4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingCriterionImportance Low
::Oculus::Platform::MatchmakingCriterionImportance Oculus::Platform::MatchmakingCriterionImportance::_get_Low() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_get_Low");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingCriterionImportance>("Oculus.Platform", "MatchmakingCriterionImportance", "Low"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingCriterionImportance Low
void Oculus::Platform::MatchmakingCriterionImportance::_set_Low(::Oculus::Platform::MatchmakingCriterionImportance value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_set_Low");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingCriterionImportance", "Low", value));
}
// [DescriptionAttribute] Offset: 0x5A32FC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingCriterionImportance Unknown
::Oculus::Platform::MatchmakingCriterionImportance Oculus::Platform::MatchmakingCriterionImportance::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingCriterionImportance>("Oculus.Platform", "MatchmakingCriterionImportance", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingCriterionImportance Unknown
void Oculus::Platform::MatchmakingCriterionImportance::_set_Unknown(::Oculus::Platform::MatchmakingCriterionImportance value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingCriterionImportance", "Unknown", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::MatchmakingCriterionImportance::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingCriterionImportance::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: Oculus.Platform.MatchmakingOptions
#include "Oculus/Platform/MatchmakingOptions.hpp"
// Including type: Oculus.Platform.RoomJoinPolicy
#include "Oculus/Platform/RoomJoinPolicy.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.IntPtr Handle
::System::IntPtr& Oculus::Platform::MatchmakingOptions::dyn_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::dyn_Handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Handle"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetCreateRoomDataStore
void Oculus::Platform::MatchmakingOptions::SetCreateRoomDataStore(::StringW key, ::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetCreateRoomDataStore");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetCreateRoomDataStore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.ClearCreateRoomDataStore
void Oculus::Platform::MatchmakingOptions::ClearCreateRoomDataStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::ClearCreateRoomDataStore");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearCreateRoomDataStore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetCreateRoomJoinPolicy
void Oculus::Platform::MatchmakingOptions::SetCreateRoomJoinPolicy(::Oculus::Platform::RoomJoinPolicy value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetCreateRoomJoinPolicy");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetCreateRoomJoinPolicy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetCreateRoomMaxUsers
void Oculus::Platform::MatchmakingOptions::SetCreateRoomMaxUsers(uint value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetCreateRoomMaxUsers");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetCreateRoomMaxUsers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.AddEnqueueAdditionalUser
void Oculus::Platform::MatchmakingOptions::AddEnqueueAdditionalUser(uint64_t userID) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::AddEnqueueAdditionalUser");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddEnqueueAdditionalUser", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(userID)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, userID);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.ClearEnqueueAdditionalUsers
void Oculus::Platform::MatchmakingOptions::ClearEnqueueAdditionalUsers() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::ClearEnqueueAdditionalUsers");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearEnqueueAdditionalUsers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetEnqueueDataSettings
void Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings(::StringW key, int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEnqueueDataSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetEnqueueDataSettings
void Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings(::StringW key, double value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEnqueueDataSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetEnqueueDataSettings
void Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings(::StringW key, ::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetEnqueueDataSettings");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEnqueueDataSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, key, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.ClearEnqueueDataSettings
void Oculus::Platform::MatchmakingOptions::ClearEnqueueDataSettings() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::ClearEnqueueDataSettings");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ClearEnqueueDataSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetEnqueueIsDebug
void Oculus::Platform::MatchmakingOptions::SetEnqueueIsDebug(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetEnqueueIsDebug");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEnqueueIsDebug", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.SetEnqueueQueryKey
void Oculus::Platform::MatchmakingOptions::SetEnqueueQueryKey(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::SetEnqueueQueryKey");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetEnqueueQueryKey", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: Oculus.Platform.MatchmakingOptions.op_Explicit
// ABORTED elsewhere. Oculus::Platform::MatchmakingOptions::operator ::System::IntPtr()
// Autogenerated method: Oculus.Platform.MatchmakingOptions.Finalize
void Oculus::Platform::MatchmakingOptions::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingOptions::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", 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: Oculus.Platform.MatchmakingStatApproach
#include "Oculus/Platform/MatchmakingStatApproach.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A3334
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingStatApproach Unknown
::Oculus::Platform::MatchmakingStatApproach Oculus::Platform::MatchmakingStatApproach::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingStatApproach>("Oculus.Platform", "MatchmakingStatApproach", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingStatApproach Unknown
void Oculus::Platform::MatchmakingStatApproach::_set_Unknown(::Oculus::Platform::MatchmakingStatApproach value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingStatApproach", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A336C
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingStatApproach Trailing
::Oculus::Platform::MatchmakingStatApproach Oculus::Platform::MatchmakingStatApproach::_get_Trailing() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_get_Trailing");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingStatApproach>("Oculus.Platform", "MatchmakingStatApproach", "Trailing"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingStatApproach Trailing
void Oculus::Platform::MatchmakingStatApproach::_set_Trailing(::Oculus::Platform::MatchmakingStatApproach value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_set_Trailing");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingStatApproach", "Trailing", value));
}
// [DescriptionAttribute] Offset: 0x5A33A4
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MatchmakingStatApproach Swingy
::Oculus::Platform::MatchmakingStatApproach Oculus::Platform::MatchmakingStatApproach::_get_Swingy() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_get_Swingy");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MatchmakingStatApproach>("Oculus.Platform", "MatchmakingStatApproach", "Swingy"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MatchmakingStatApproach Swingy
void Oculus::Platform::MatchmakingStatApproach::_set_Swingy(::Oculus::Platform::MatchmakingStatApproach value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::_set_Swingy");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MatchmakingStatApproach", "Swingy", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::MatchmakingStatApproach::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MatchmakingStatApproach::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: Oculus.Platform.MediaContentType
#include "Oculus/Platform/MediaContentType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// [DescriptionAttribute] Offset: 0x5A33DC
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MediaContentType Unknown
::Oculus::Platform::MediaContentType Oculus::Platform::MediaContentType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MediaContentType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MediaContentType>("Oculus.Platform", "MediaContentType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MediaContentType Unknown
void Oculus::Platform::MediaContentType::_set_Unknown(::Oculus::Platform::MediaContentType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MediaContentType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MediaContentType", "Unknown", value));
}
// [DescriptionAttribute] Offset: 0x5A3414
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.MediaContentType Photo
::Oculus::Platform::MediaContentType Oculus::Platform::MediaContentType::_get_Photo() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MediaContentType::_get_Photo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::MediaContentType>("Oculus.Platform", "MediaContentType", "Photo"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.MediaContentType Photo
void Oculus::Platform::MediaContentType::_set_Photo(::Oculus::Platform::MediaContentType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MediaContentType::_set_Photo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "MediaContentType", "Photo", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& Oculus::Platform::MediaContentType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MediaContentType::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: Oculus.Platform.Message
#include "Oculus/Platform/Message.hpp"
// Including type: Oculus.Platform.Message/Oculus.Platform.Callback
#include "Oculus/Platform/Message_Callback.hpp"
// Including type: Oculus.Platform.Models.Error
#include "Oculus/Platform/Models/Error.hpp"
// Including type: Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler
#include "Oculus/Platform/Message_ExtraMessageTypesHandler.hpp"
// Including type: Oculus.Platform.Models.PingResult
#include "Oculus/Platform/Models/PingResult.hpp"
// Including type: Oculus.Platform.Models.NetworkingPeer
#include "Oculus/Platform/Models/NetworkingPeer.hpp"
// Including type: Oculus.Platform.Models.HttpTransferUpdate
#include "Oculus/Platform/Models/HttpTransferUpdate.hpp"
// Including type: Oculus.Platform.Models.PlatformInitialize
#include "Oculus/Platform/Models/PlatformInitialize.hpp"
// Including type: Oculus.Platform.Models.AbuseReportRecording
#include "Oculus/Platform/Models/AbuseReportRecording.hpp"
// Including type: Oculus.Platform.Models.AchievementDefinitionList
#include "Oculus/Platform/Models/AchievementDefinitionList.hpp"
// Including type: Oculus.Platform.Models.AchievementProgressList
#include "Oculus/Platform/Models/AchievementProgressList.hpp"
// Including type: Oculus.Platform.Models.AchievementUpdate
#include "Oculus/Platform/Models/AchievementUpdate.hpp"
// Including type: Oculus.Platform.Models.ApplicationInviteList
#include "Oculus/Platform/Models/ApplicationInviteList.hpp"
// Including type: Oculus.Platform.Models.ApplicationVersion
#include "Oculus/Platform/Models/ApplicationVersion.hpp"
// Including type: Oculus.Platform.Models.AssetDetails
#include "Oculus/Platform/Models/AssetDetails.hpp"
// Including type: Oculus.Platform.Models.AssetDetailsList
#include "Oculus/Platform/Models/AssetDetailsList.hpp"
// Including type: Oculus.Platform.Models.AssetFileDeleteResult
#include "Oculus/Platform/Models/AssetFileDeleteResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadCancelResult
#include "Oculus/Platform/Models/AssetFileDownloadCancelResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadResult
#include "Oculus/Platform/Models/AssetFileDownloadResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadUpdate
#include "Oculus/Platform/Models/AssetFileDownloadUpdate.hpp"
// Including type: Oculus.Platform.Models.CalApplicationFinalized
#include "Oculus/Platform/Models/CalApplicationFinalized.hpp"
// Including type: Oculus.Platform.Models.CalApplicationProposed
#include "Oculus/Platform/Models/CalApplicationProposed.hpp"
// Including type: Oculus.Platform.Models.CalApplicationSuggestionList
#include "Oculus/Platform/Models/CalApplicationSuggestionList.hpp"
// Including type: Oculus.Platform.Models.Challenge
#include "Oculus/Platform/Models/Challenge.hpp"
// Including type: Oculus.Platform.Models.ChallengeEntryList
#include "Oculus/Platform/Models/ChallengeEntryList.hpp"
// Including type: Oculus.Platform.Models.ChallengeList
#include "Oculus/Platform/Models/ChallengeList.hpp"
// Including type: Oculus.Platform.Models.CloudStorageConflictMetadata
#include "Oculus/Platform/Models/CloudStorageConflictMetadata.hpp"
// Including type: Oculus.Platform.Models.CloudStorageData
#include "Oculus/Platform/Models/CloudStorageData.hpp"
// Including type: Oculus.Platform.Models.CloudStorageMetadata
#include "Oculus/Platform/Models/CloudStorageMetadata.hpp"
// Including type: Oculus.Platform.Models.CloudStorageMetadataList
#include "Oculus/Platform/Models/CloudStorageMetadataList.hpp"
// Including type: Oculus.Platform.Models.CloudStorageUpdateResponse
#include "Oculus/Platform/Models/CloudStorageUpdateResponse.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: Oculus.Platform.Models.DestinationList
#include "Oculus/Platform/Models/DestinationList.hpp"
// Including type: Oculus.Platform.Models.GroupPresenceJoinIntent
#include "Oculus/Platform/Models/GroupPresenceJoinIntent.hpp"
// Including type: Oculus.Platform.Models.GroupPresenceLeaveIntent
#include "Oculus/Platform/Models/GroupPresenceLeaveIntent.hpp"
// Including type: Oculus.Platform.Models.InstalledApplicationList
#include "Oculus/Platform/Models/InstalledApplicationList.hpp"
// Including type: Oculus.Platform.Models.InvitePanelResultInfo
#include "Oculus/Platform/Models/InvitePanelResultInfo.hpp"
// Including type: Oculus.Platform.Models.LaunchBlockFlowResult
#include "Oculus/Platform/Models/LaunchBlockFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchFriendRequestFlowResult
#include "Oculus/Platform/Models/LaunchFriendRequestFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchInvitePanelFlowResult
#include "Oculus/Platform/Models/LaunchInvitePanelFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchReportFlowResult
#include "Oculus/Platform/Models/LaunchReportFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchUnblockFlowResult
#include "Oculus/Platform/Models/LaunchUnblockFlowResult.hpp"
// Including type: Oculus.Platform.Models.LeaderboardEntryList
#include "Oculus/Platform/Models/LeaderboardEntryList.hpp"
// Including type: Oculus.Platform.Models.LeaderboardList
#include "Oculus/Platform/Models/LeaderboardList.hpp"
// Including type: Oculus.Platform.Models.LinkedAccountList
#include "Oculus/Platform/Models/LinkedAccountList.hpp"
// Including type: Oculus.Platform.Models.LivestreamingApplicationStatus
#include "Oculus/Platform/Models/LivestreamingApplicationStatus.hpp"
// Including type: Oculus.Platform.Models.LivestreamingStartResult
#include "Oculus/Platform/Models/LivestreamingStartResult.hpp"
// Including type: Oculus.Platform.Models.LivestreamingStatus
#include "Oculus/Platform/Models/LivestreamingStatus.hpp"
// Including type: Oculus.Platform.Models.LivestreamingVideoStats
#include "Oculus/Platform/Models/LivestreamingVideoStats.hpp"
// Including type: Oculus.Platform.Models.MatchmakingAdminSnapshot
#include "Oculus/Platform/Models/MatchmakingAdminSnapshot.hpp"
// Including type: Oculus.Platform.Models.MatchmakingBrowseResult
#include "Oculus/Platform/Models/MatchmakingBrowseResult.hpp"
// Including type: Oculus.Platform.Models.MatchmakingEnqueueResult
#include "Oculus/Platform/Models/MatchmakingEnqueueResult.hpp"
// Including type: Oculus.Platform.Models.MatchmakingEnqueueResultAndRoom
#include "Oculus/Platform/Models/MatchmakingEnqueueResultAndRoom.hpp"
// Including type: Oculus.Platform.Models.MatchmakingStats
#include "Oculus/Platform/Models/MatchmakingStats.hpp"
// Including type: Oculus.Platform.Models.MicrophoneAvailabilityState
#include "Oculus/Platform/Models/MicrophoneAvailabilityState.hpp"
// Including type: Oculus.Platform.Models.NetSyncConnection
#include "Oculus/Platform/Models/NetSyncConnection.hpp"
// Including type: Oculus.Platform.Models.NetSyncSessionList
#include "Oculus/Platform/Models/NetSyncSessionList.hpp"
// Including type: Oculus.Platform.Models.NetSyncSessionsChangedNotification
#include "Oculus/Platform/Models/NetSyncSessionsChangedNotification.hpp"
// Including type: Oculus.Platform.Models.NetSyncSetSessionPropertyResult
#include "Oculus/Platform/Models/NetSyncSetSessionPropertyResult.hpp"
// Including type: Oculus.Platform.Models.NetSyncVoipAttenuationValueList
#include "Oculus/Platform/Models/NetSyncVoipAttenuationValueList.hpp"
// Including type: Oculus.Platform.Models.OrgScopedID
#include "Oculus/Platform/Models/OrgScopedID.hpp"
// Including type: Oculus.Platform.Models.Party
#include "Oculus/Platform/Models/Party.hpp"
// Including type: Oculus.Platform.Models.PartyID
#include "Oculus/Platform/Models/PartyID.hpp"
// Including type: Oculus.Platform.Models.PartyUpdateNotification
#include "Oculus/Platform/Models/PartyUpdateNotification.hpp"
// Including type: Oculus.Platform.Models.PidList
#include "Oculus/Platform/Models/PidList.hpp"
// Including type: Oculus.Platform.Models.ProductList
#include "Oculus/Platform/Models/ProductList.hpp"
// Including type: Oculus.Platform.Models.Purchase
#include "Oculus/Platform/Models/Purchase.hpp"
// Including type: Oculus.Platform.Models.PurchaseList
#include "Oculus/Platform/Models/PurchaseList.hpp"
// Including type: Oculus.Platform.Models.RejoinDialogResult
#include "Oculus/Platform/Models/RejoinDialogResult.hpp"
// Including type: Oculus.Platform.Models.Room
#include "Oculus/Platform/Models/Room.hpp"
// Including type: Oculus.Platform.Models.RoomInviteNotification
#include "Oculus/Platform/Models/RoomInviteNotification.hpp"
// Including type: Oculus.Platform.Models.RoomInviteNotificationList
#include "Oculus/Platform/Models/RoomInviteNotificationList.hpp"
// Including type: Oculus.Platform.Models.RoomList
#include "Oculus/Platform/Models/RoomList.hpp"
// Including type: Oculus.Platform.Models.SdkAccountList
#include "Oculus/Platform/Models/SdkAccountList.hpp"
// Including type: Oculus.Platform.Models.SendInvitesResult
#include "Oculus/Platform/Models/SendInvitesResult.hpp"
// Including type: Oculus.Platform.Models.ShareMediaResult
#include "Oculus/Platform/Models/ShareMediaResult.hpp"
// Including type: Oculus.Platform.Models.SystemVoipState
#include "Oculus/Platform/Models/SystemVoipState.hpp"
// Including type: Oculus.Platform.Models.User
#include "Oculus/Platform/Models/User.hpp"
// Including type: Oculus.Platform.Models.UserAndRoomList
#include "Oculus/Platform/Models/UserAndRoomList.hpp"
// Including type: Oculus.Platform.Models.UserDataStoreUpdateResponse
#include "Oculus/Platform/Models/UserDataStoreUpdateResponse.hpp"
// Including type: Oculus.Platform.Models.UserList
#include "Oculus/Platform/Models/UserList.hpp"
// Including type: Oculus.Platform.Models.UserProof
#include "Oculus/Platform/Models/UserProof.hpp"
// Including type: Oculus.Platform.Models.UserReportID
#include "Oculus/Platform/Models/UserReportID.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 Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler <HandleExtraMessageTypes>k__BackingField
::Oculus::Platform::Message::ExtraMessageTypesHandler* Oculus::Platform::Message::_get_$HandleExtraMessageTypes$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::_get_$HandleExtraMessageTypes$k__BackingField");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::ExtraMessageTypesHandler*>("Oculus.Platform", "Message", "<HandleExtraMessageTypes>k__BackingField")));
}
// Autogenerated static field setter
// Set static field: static private Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler <HandleExtraMessageTypes>k__BackingField
void Oculus::Platform::Message::_set_$HandleExtraMessageTypes$k__BackingField(::Oculus::Platform::Message::ExtraMessageTypesHandler* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::_set_$HandleExtraMessageTypes$k__BackingField");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message", "<HandleExtraMessageTypes>k__BackingField", value));
}
// Autogenerated instance field getter
// Get instance field: private Oculus.Platform.Message/Oculus.Platform.MessageType type
::Oculus::Platform::Message::MessageType& Oculus::Platform::Message::dyn_type() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::dyn_type");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "type"))->offset;
return *reinterpret_cast<::Oculus::Platform::Message::MessageType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt64 requestID
uint64_t& Oculus::Platform::Message::dyn_requestID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::dyn_requestID");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "requestID"))->offset;
return *reinterpret_cast<uint64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private Oculus.Platform.Models.Error error
::Oculus::Platform::Models::Error*& Oculus::Platform::Message::dyn_error() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::dyn_error");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "error"))->offset;
return *reinterpret_cast<::Oculus::Platform::Models::Error**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: Oculus.Platform.Message.get_Type
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::get_Type() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::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<::Oculus::Platform::Message::MessageType, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.get_IsError
bool Oculus::Platform::Message::get_IsError() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::get_IsError");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsError", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.get_RequestID
uint64_t Oculus::Platform::Message::get_RequestID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::get_RequestID");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RequestID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<uint64_t, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.get_HandleExtraMessageTypes
::Oculus::Platform::Message::ExtraMessageTypesHandler* Oculus::Platform::Message::get_HandleExtraMessageTypes() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::get_HandleExtraMessageTypes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Message", "get_HandleExtraMessageTypes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Message::ExtraMessageTypesHandler*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.set_HandleExtraMessageTypes
void Oculus::Platform::Message::set_HandleExtraMessageTypes(::Oculus::Platform::Message::ExtraMessageTypesHandler* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::set_HandleExtraMessageTypes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Message", "set_HandleExtraMessageTypes", 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: Oculus.Platform.Message.GetError
::Oculus::Platform::Models::Error* Oculus::Platform::Message::GetError() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetError");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetError", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Error*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPingResult
::Oculus::Platform::Models::PingResult* Oculus::Platform::Message::GetPingResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPingResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPingResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PingResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetworkingPeer
::Oculus::Platform::Models::NetworkingPeer* Oculus::Platform::Message::GetNetworkingPeer() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetworkingPeer");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetworkingPeer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetworkingPeer*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetHttpTransferUpdate
::Oculus::Platform::Models::HttpTransferUpdate* Oculus::Platform::Message::GetHttpTransferUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetHttpTransferUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetHttpTransferUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::HttpTransferUpdate*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPlatformInitialize
::Oculus::Platform::Models::PlatformInitialize* Oculus::Platform::Message::GetPlatformInitialize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPlatformInitialize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPlatformInitialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PlatformInitialize*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAbuseReportRecording
::Oculus::Platform::Models::AbuseReportRecording* Oculus::Platform::Message::GetAbuseReportRecording() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAbuseReportRecording");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAbuseReportRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AbuseReportRecording*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAchievementDefinitions
::Oculus::Platform::Models::AchievementDefinitionList* Oculus::Platform::Message::GetAchievementDefinitions() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAchievementDefinitions");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementDefinitions", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementDefinitionList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAchievementProgressList
::Oculus::Platform::Models::AchievementProgressList* Oculus::Platform::Message::GetAchievementProgressList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAchievementProgressList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementProgressList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementProgressList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAchievementUpdate
::Oculus::Platform::Models::AchievementUpdate* Oculus::Platform::Message::GetAchievementUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAchievementUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementUpdate*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetApplicationInviteList
::Oculus::Platform::Models::ApplicationInviteList* Oculus::Platform::Message::GetApplicationInviteList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetApplicationInviteList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetApplicationInviteList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationInviteList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetApplicationVersion
::Oculus::Platform::Models::ApplicationVersion* Oculus::Platform::Message::GetApplicationVersion() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetApplicationVersion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetApplicationVersion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationVersion*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetDetails
::Oculus::Platform::Models::AssetDetails* Oculus::Platform::Message::GetAssetDetails() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetDetails");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetDetails", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetails*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetDetailsList
::Oculus::Platform::Models::AssetDetailsList* Oculus::Platform::Message::GetAssetDetailsList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetDetailsList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetDetailsList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetailsList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetFileDeleteResult
::Oculus::Platform::Models::AssetFileDeleteResult* Oculus::Platform::Message::GetAssetFileDeleteResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetFileDeleteResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDeleteResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDeleteResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetFileDownloadCancelResult
::Oculus::Platform::Models::AssetFileDownloadCancelResult* Oculus::Platform::Message::GetAssetFileDownloadCancelResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetFileDownloadCancelResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadCancelResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadCancelResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetFileDownloadResult
::Oculus::Platform::Models::AssetFileDownloadResult* Oculus::Platform::Message::GetAssetFileDownloadResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetFileDownloadResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetAssetFileDownloadUpdate
::Oculus::Platform::Models::AssetFileDownloadUpdate* Oculus::Platform::Message::GetAssetFileDownloadUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetAssetFileDownloadUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadUpdate*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCalApplicationFinalized
::Oculus::Platform::Models::CalApplicationFinalized* Oculus::Platform::Message::GetCalApplicationFinalized() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCalApplicationFinalized");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationFinalized", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationFinalized*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCalApplicationProposed
::Oculus::Platform::Models::CalApplicationProposed* Oculus::Platform::Message::GetCalApplicationProposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCalApplicationProposed");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationProposed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationProposed*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCalApplicationSuggestionList
::Oculus::Platform::Models::CalApplicationSuggestionList* Oculus::Platform::Message::GetCalApplicationSuggestionList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCalApplicationSuggestionList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationSuggestionList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationSuggestionList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetChallenge
::Oculus::Platform::Models::Challenge* Oculus::Platform::Message::GetChallenge() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetChallenge");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallenge", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Challenge*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetChallengeEntryList
::Oculus::Platform::Models::ChallengeEntryList* Oculus::Platform::Message::GetChallengeEntryList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetChallengeEntryList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallengeEntryList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeEntryList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetChallengeList
::Oculus::Platform::Models::ChallengeList* Oculus::Platform::Message::GetChallengeList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetChallengeList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallengeList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCloudStorageConflictMetadata
::Oculus::Platform::Models::CloudStorageConflictMetadata* Oculus::Platform::Message::GetCloudStorageConflictMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCloudStorageConflictMetadata");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageConflictMetadata", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageConflictMetadata*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCloudStorageData
::Oculus::Platform::Models::CloudStorageData* Oculus::Platform::Message::GetCloudStorageData() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCloudStorageData");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageData", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageData*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCloudStorageMetadata
::Oculus::Platform::Models::CloudStorageMetadata* Oculus::Platform::Message::GetCloudStorageMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCloudStorageMetadata");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageMetadata", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadata*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCloudStorageMetadataList
::Oculus::Platform::Models::CloudStorageMetadataList* Oculus::Platform::Message::GetCloudStorageMetadataList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCloudStorageMetadataList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageMetadataList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadataList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetCloudStorageUpdateResponse
::Oculus::Platform::Models::CloudStorageUpdateResponse* Oculus::Platform::Message::GetCloudStorageUpdateResponse() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetCloudStorageUpdateResponse");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageUpdateResponse", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageUpdateResponse*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetDataStore
::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>* Oculus::Platform::Message::GetDataStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetDataStore");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataStore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetDestinationList
::Oculus::Platform::Models::DestinationList* Oculus::Platform::Message::GetDestinationList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetDestinationList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDestinationList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::DestinationList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetGroupPresenceJoinIntent
::Oculus::Platform::Models::GroupPresenceJoinIntent* Oculus::Platform::Message::GetGroupPresenceJoinIntent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetGroupPresenceJoinIntent");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroupPresenceJoinIntent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceJoinIntent*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetGroupPresenceLeaveIntent
::Oculus::Platform::Models::GroupPresenceLeaveIntent* Oculus::Platform::Message::GetGroupPresenceLeaveIntent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetGroupPresenceLeaveIntent");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroupPresenceLeaveIntent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceLeaveIntent*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetInstalledApplicationList
::Oculus::Platform::Models::InstalledApplicationList* Oculus::Platform::Message::GetInstalledApplicationList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetInstalledApplicationList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetInstalledApplicationList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InstalledApplicationList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetInvitePanelResultInfo
::Oculus::Platform::Models::InvitePanelResultInfo* Oculus::Platform::Message::GetInvitePanelResultInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetInvitePanelResultInfo");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetInvitePanelResultInfo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InvitePanelResultInfo*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLaunchBlockFlowResult
::Oculus::Platform::Models::LaunchBlockFlowResult* Oculus::Platform::Message::GetLaunchBlockFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLaunchBlockFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchBlockFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchBlockFlowResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLaunchFriendRequestFlowResult
::Oculus::Platform::Models::LaunchFriendRequestFlowResult* Oculus::Platform::Message::GetLaunchFriendRequestFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLaunchFriendRequestFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchFriendRequestFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchFriendRequestFlowResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLaunchInvitePanelFlowResult
::Oculus::Platform::Models::LaunchInvitePanelFlowResult* Oculus::Platform::Message::GetLaunchInvitePanelFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLaunchInvitePanelFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchInvitePanelFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchInvitePanelFlowResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLaunchReportFlowResult
::Oculus::Platform::Models::LaunchReportFlowResult* Oculus::Platform::Message::GetLaunchReportFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLaunchReportFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchReportFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchReportFlowResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLaunchUnblockFlowResult
::Oculus::Platform::Models::LaunchUnblockFlowResult* Oculus::Platform::Message::GetLaunchUnblockFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLaunchUnblockFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchUnblockFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchUnblockFlowResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLeaderboardDidUpdate
bool Oculus::Platform::Message::GetLeaderboardDidUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLeaderboardDidUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLeaderboardDidUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLeaderboardEntryList
::Oculus::Platform::Models::LeaderboardEntryList* Oculus::Platform::Message::GetLeaderboardEntryList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLeaderboardEntryList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLeaderboardEntryList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardEntryList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLeaderboardList
::Oculus::Platform::Models::LeaderboardList* Oculus::Platform::Message::GetLeaderboardList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLeaderboardList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLeaderboardList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLinkedAccountList
::Oculus::Platform::Models::LinkedAccountList* Oculus::Platform::Message::GetLinkedAccountList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLinkedAccountList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLinkedAccountList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LinkedAccountList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLivestreamingApplicationStatus
::Oculus::Platform::Models::LivestreamingApplicationStatus* Oculus::Platform::Message::GetLivestreamingApplicationStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLivestreamingApplicationStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingApplicationStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingApplicationStatus*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLivestreamingStartResult
::Oculus::Platform::Models::LivestreamingStartResult* Oculus::Platform::Message::GetLivestreamingStartResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLivestreamingStartResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingStartResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStartResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLivestreamingStatus
::Oculus::Platform::Models::LivestreamingStatus* Oculus::Platform::Message::GetLivestreamingStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLivestreamingStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStatus*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetLivestreamingVideoStats
::Oculus::Platform::Models::LivestreamingVideoStats* Oculus::Platform::Message::GetLivestreamingVideoStats() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetLivestreamingVideoStats");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingVideoStats", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingVideoStats*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMatchmakingAdminSnapshot
::Oculus::Platform::Models::MatchmakingAdminSnapshot* Oculus::Platform::Message::GetMatchmakingAdminSnapshot() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMatchmakingAdminSnapshot");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingAdminSnapshot", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingAdminSnapshot*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMatchmakingBrowseResult
::Oculus::Platform::Models::MatchmakingBrowseResult* Oculus::Platform::Message::GetMatchmakingBrowseResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMatchmakingBrowseResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingBrowseResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingBrowseResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMatchmakingEnqueueResult
::Oculus::Platform::Models::MatchmakingEnqueueResult* Oculus::Platform::Message::GetMatchmakingEnqueueResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMatchmakingEnqueueResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingEnqueueResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMatchmakingEnqueueResultAndRoom
::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom* Oculus::Platform::Message::GetMatchmakingEnqueueResultAndRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMatchmakingEnqueueResultAndRoom");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingEnqueueResultAndRoom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMatchmakingStats
::Oculus::Platform::Models::MatchmakingStats* Oculus::Platform::Message::GetMatchmakingStats() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMatchmakingStats");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingStats", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingStats*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetMicrophoneAvailabilityState
::Oculus::Platform::Models::MicrophoneAvailabilityState* Oculus::Platform::Message::GetMicrophoneAvailabilityState() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetMicrophoneAvailabilityState");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMicrophoneAvailabilityState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MicrophoneAvailabilityState*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetSyncConnection
::Oculus::Platform::Models::NetSyncConnection* Oculus::Platform::Message::GetNetSyncConnection() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetSyncConnection");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncConnection", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncConnection*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetSyncSessionList
::Oculus::Platform::Models::NetSyncSessionList* Oculus::Platform::Message::GetNetSyncSessionList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetSyncSessionList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSessionList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetSyncSessionsChangedNotification
::Oculus::Platform::Models::NetSyncSessionsChangedNotification* Oculus::Platform::Message::GetNetSyncSessionsChangedNotification() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetSyncSessionsChangedNotification");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSessionsChangedNotification", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionsChangedNotification*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetSyncSetSessionPropertyResult
::Oculus::Platform::Models::NetSyncSetSessionPropertyResult* Oculus::Platform::Message::GetNetSyncSetSessionPropertyResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetSyncSetSessionPropertyResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSetSessionPropertyResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSetSessionPropertyResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetNetSyncVoipAttenuationValueList
::Oculus::Platform::Models::NetSyncVoipAttenuationValueList* Oculus::Platform::Message::GetNetSyncVoipAttenuationValueList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetNetSyncVoipAttenuationValueList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncVoipAttenuationValueList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncVoipAttenuationValueList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetOrgScopedID
::Oculus::Platform::Models::OrgScopedID* Oculus::Platform::Message::GetOrgScopedID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetOrgScopedID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetOrgScopedID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::OrgScopedID*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetParty
::Oculus::Platform::Models::Party* Oculus::Platform::Message::GetParty() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetParty");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetParty", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Party*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPartyID
::Oculus::Platform::Models::PartyID* Oculus::Platform::Message::GetPartyID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPartyID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPartyID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyID*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPartyUpdateNotification
::Oculus::Platform::Models::PartyUpdateNotification* Oculus::Platform::Message::GetPartyUpdateNotification() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPartyUpdateNotification");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPartyUpdateNotification", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyUpdateNotification*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPidList
::Oculus::Platform::Models::PidList* Oculus::Platform::Message::GetPidList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPidList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPidList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PidList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetProductList
::Oculus::Platform::Models::ProductList* Oculus::Platform::Message::GetProductList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetProductList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetProductList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ProductList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPurchase
::Oculus::Platform::Models::Purchase* Oculus::Platform::Message::GetPurchase() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPurchase");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPurchase", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Purchase*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetPurchaseList
::Oculus::Platform::Models::PurchaseList* Oculus::Platform::Message::GetPurchaseList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetPurchaseList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPurchaseList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PurchaseList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetRejoinDialogResult
::Oculus::Platform::Models::RejoinDialogResult* Oculus::Platform::Message::GetRejoinDialogResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetRejoinDialogResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRejoinDialogResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RejoinDialogResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetRoom
::Oculus::Platform::Models::Room* Oculus::Platform::Message::GetRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetRoom");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRoom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Room*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetRoomInviteNotification
::Oculus::Platform::Models::RoomInviteNotification* Oculus::Platform::Message::GetRoomInviteNotification() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetRoomInviteNotification");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRoomInviteNotification", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RoomInviteNotification*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetRoomInviteNotificationList
::Oculus::Platform::Models::RoomInviteNotificationList* Oculus::Platform::Message::GetRoomInviteNotificationList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetRoomInviteNotificationList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRoomInviteNotificationList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RoomInviteNotificationList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetRoomList
::Oculus::Platform::Models::RoomList* Oculus::Platform::Message::GetRoomList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetRoomList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRoomList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RoomList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetSdkAccountList
::Oculus::Platform::Models::SdkAccountList* Oculus::Platform::Message::GetSdkAccountList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetSdkAccountList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetSdkAccountList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::SdkAccountList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetSendInvitesResult
::Oculus::Platform::Models::SendInvitesResult* Oculus::Platform::Message::GetSendInvitesResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetSendInvitesResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetSendInvitesResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::SendInvitesResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetShareMediaResult
::Oculus::Platform::Models::ShareMediaResult* Oculus::Platform::Message::GetShareMediaResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetShareMediaResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetShareMediaResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ShareMediaResult*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetString
::StringW Oculus::Platform::Message::GetString() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetString");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetSystemVoipState
::Oculus::Platform::Models::SystemVoipState* Oculus::Platform::Message::GetSystemVoipState() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetSystemVoipState");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetSystemVoipState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::SystemVoipState*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUser
::Oculus::Platform::Models::User* Oculus::Platform::Message::GetUser() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUser");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUser", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::User*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUserAndRoomList
::Oculus::Platform::Models::UserAndRoomList* Oculus::Platform::Message::GetUserAndRoomList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUserAndRoomList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUserAndRoomList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::UserAndRoomList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUserDataStoreUpdateResponse
::Oculus::Platform::Models::UserDataStoreUpdateResponse* Oculus::Platform::Message::GetUserDataStoreUpdateResponse() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUserDataStoreUpdateResponse");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUserDataStoreUpdateResponse", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::UserDataStoreUpdateResponse*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUserList
::Oculus::Platform::Models::UserList* Oculus::Platform::Message::GetUserList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUserList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUserList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::UserList*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUserProof
::Oculus::Platform::Models::UserProof* Oculus::Platform::Message::GetUserProof() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUserProof");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUserProof", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::UserProof*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.GetUserReportID
::Oculus::Platform::Models::UserReportID* Oculus::Platform::Message::GetUserReportID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::GetUserReportID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetUserReportID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::UserReportID*, false>(this, ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.ParseMessageHandle
::Oculus::Platform::Message* Oculus::Platform::Message::ParseMessageHandle(::System::IntPtr messageHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::ParseMessageHandle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Message", "ParseMessageHandle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(messageHandle)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Message*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, messageHandle);
}
// Autogenerated method: Oculus.Platform.Message.PopMessage
::Oculus::Platform::Message* Oculus::Platform::Message::PopMessage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::PopMessage");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("Oculus.Platform", "Message", "PopMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Message*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: Oculus.Platform.Message.Finalize
void Oculus::Platform::Message::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", 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: Oculus.Platform.Message/Oculus.Platform.Callback
#include "Oculus/Platform/Message_Callback.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.Callback.Invoke
void Oculus::Platform::Message::Callback::Invoke(::Oculus::Platform::Message* message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::Callback::Invoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(message)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, message);
}
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.Callback.BeginInvoke
::System::IAsyncResult* Oculus::Platform::Message::Callback::BeginInvoke(::Oculus::Platform::Message* message, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::Callback::BeginInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(message), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(object)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, message, callback, object);
}
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.Callback.EndInvoke
void Oculus::Platform::Message::Callback::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::Callback::EndInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(result)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.Message/Oculus.Platform.MessageType
#include "Oculus/Platform/Message.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 Oculus.Platform.Message/Oculus.Platform.MessageType Unknown
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Unknown
void Oculus::Platform::Message::MessageType::_set_Unknown(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Unknown", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_AddCount
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_AddCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_AddCount");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_AddCount"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_AddCount
void Oculus::Platform::Message::MessageType::_set_Achievements_AddCount(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_AddCount");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_AddCount", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_AddFields
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_AddFields() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_AddFields");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_AddFields"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_AddFields
void Oculus::Platform::Message::MessageType::_set_Achievements_AddFields(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_AddFields");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_AddFields", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetAllDefinitions
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetAllDefinitions() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetAllDefinitions");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetAllDefinitions"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetAllDefinitions
void Oculus::Platform::Message::MessageType::_set_Achievements_GetAllDefinitions(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetAllDefinitions");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetAllDefinitions", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetAllProgress
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetAllProgress() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetAllProgress");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetAllProgress"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetAllProgress
void Oculus::Platform::Message::MessageType::_set_Achievements_GetAllProgress(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetAllProgress");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetAllProgress", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetDefinitionsByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetDefinitionsByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetDefinitionsByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetDefinitionsByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetDefinitionsByName
void Oculus::Platform::Message::MessageType::_set_Achievements_GetDefinitionsByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetDefinitionsByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetDefinitionsByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetNextAchievementDefinitionArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetNextAchievementDefinitionArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetNextAchievementDefinitionArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetNextAchievementDefinitionArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetNextAchievementDefinitionArrayPage
void Oculus::Platform::Message::MessageType::_set_Achievements_GetNextAchievementDefinitionArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetNextAchievementDefinitionArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetNextAchievementDefinitionArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetNextAchievementProgressArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetNextAchievementProgressArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetNextAchievementProgressArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetNextAchievementProgressArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetNextAchievementProgressArrayPage
void Oculus::Platform::Message::MessageType::_set_Achievements_GetNextAchievementProgressArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetNextAchievementProgressArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetNextAchievementProgressArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetProgressByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_GetProgressByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_GetProgressByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_GetProgressByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_GetProgressByName
void Oculus::Platform::Message::MessageType::_set_Achievements_GetProgressByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_GetProgressByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_GetProgressByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_Unlock
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Achievements_Unlock() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Achievements_Unlock");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Achievements_Unlock"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Achievements_Unlock
void Oculus::Platform::Message::MessageType::_set_Achievements_Unlock(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Achievements_Unlock");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Achievements_Unlock", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_GetRegisteredPIDs
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_GetRegisteredPIDs() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_GetRegisteredPIDs");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_GetRegisteredPIDs"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_GetRegisteredPIDs
void Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_GetRegisteredPIDs(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_GetRegisteredPIDs");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_GetRegisteredPIDs", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_GetSessionKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_GetSessionKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_GetSessionKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_GetSessionKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_GetSessionKey
void Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_GetSessionKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_GetSessionKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_GetSessionKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_RegisterSessionKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_RegisterSessionKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_ApplicationLifecycle_RegisterSessionKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_RegisterSessionKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType ApplicationLifecycle_RegisterSessionKey
void Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_RegisterSessionKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_ApplicationLifecycle_RegisterSessionKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "ApplicationLifecycle_RegisterSessionKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Application_GetVersion
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Application_GetVersion() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Application_GetVersion");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Application_GetVersion"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Application_GetVersion
void Oculus::Platform::Message::MessageType::_set_Application_GetVersion(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Application_GetVersion");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Application_GetVersion", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Application_LaunchOtherApp
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Application_LaunchOtherApp() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Application_LaunchOtherApp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Application_LaunchOtherApp"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Application_LaunchOtherApp
void Oculus::Platform::Message::MessageType::_set_Application_LaunchOtherApp(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Application_LaunchOtherApp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Application_LaunchOtherApp", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Delete
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_Delete() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_Delete");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_Delete"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Delete
void Oculus::Platform::Message::MessageType::_set_AssetFile_Delete(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_Delete");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_Delete", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DeleteById
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DeleteById() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DeleteById");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DeleteById"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DeleteById
void Oculus::Platform::Message::MessageType::_set_AssetFile_DeleteById(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DeleteById");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DeleteById", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DeleteByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DeleteByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DeleteByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DeleteByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DeleteByName
void Oculus::Platform::Message::MessageType::_set_AssetFile_DeleteByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DeleteByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DeleteByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Download
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_Download() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_Download");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_Download"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Download
void Oculus::Platform::Message::MessageType::_set_AssetFile_Download(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_Download");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_Download", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadById
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadById() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadById");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadById"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadById
void Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadById(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadById");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadById", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadByName
void Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancel
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancel() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancel"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancel
void Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancel(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancel", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancelById
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancelById() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancelById");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancelById"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancelById
void Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancelById(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancelById");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancelById", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancelByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancelByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_DownloadCancelByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancelByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_DownloadCancelByName
void Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancelByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_DownloadCancelByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_DownloadCancelByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_GetList
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_GetList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_GetList");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_GetList"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_GetList
void Oculus::Platform::Message::MessageType::_set_AssetFile_GetList(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_GetList");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_GetList", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Status
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_Status() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_Status");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_Status"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_Status
void Oculus::Platform::Message::MessageType::_set_AssetFile_Status(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_Status");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_Status", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_StatusById
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_StatusById() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_StatusById");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_StatusById"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_StatusById
void Oculus::Platform::Message::MessageType::_set_AssetFile_StatusById(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_StatusById");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_StatusById", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_StatusByName
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_AssetFile_StatusByName() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_AssetFile_StatusByName");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "AssetFile_StatusByName"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType AssetFile_StatusByName
void Oculus::Platform::Message::MessageType::_set_AssetFile_StatusByName(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_AssetFile_StatusByName");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "AssetFile_StatusByName", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Create
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_Create() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_Create");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_Create"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Create
void Oculus::Platform::Message::MessageType::_set_Challenges_Create(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_Create");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_Create", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_DeclineInvite
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_DeclineInvite() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_DeclineInvite");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_DeclineInvite"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_DeclineInvite
void Oculus::Platform::Message::MessageType::_set_Challenges_DeclineInvite(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_DeclineInvite");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_DeclineInvite", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Delete
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_Delete() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_Delete");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_Delete"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Delete
void Oculus::Platform::Message::MessageType::_set_Challenges_Delete(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_Delete");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_Delete", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Get
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_Get() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_Get");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_Get"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Get
void Oculus::Platform::Message::MessageType::_set_Challenges_Get(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_Get");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_Get", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntries
void Oculus::Platform::Message::MessageType::_set_Challenges_GetEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntriesAfterRank
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetEntriesAfterRank() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetEntriesAfterRank");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetEntriesAfterRank"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntriesAfterRank
void Oculus::Platform::Message::MessageType::_set_Challenges_GetEntriesAfterRank(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetEntriesAfterRank");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetEntriesAfterRank", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntriesByIds
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetEntriesByIds() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetEntriesByIds");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetEntriesByIds"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetEntriesByIds
void Oculus::Platform::Message::MessageType::_set_Challenges_GetEntriesByIds(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetEntriesByIds");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetEntriesByIds", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetList
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetList");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetList"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetList
void Oculus::Platform::Message::MessageType::_set_Challenges_GetList(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetList");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetList", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetNextChallenges
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetNextChallenges() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetNextChallenges");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetNextChallenges"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetNextChallenges
void Oculus::Platform::Message::MessageType::_set_Challenges_GetNextChallenges(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetNextChallenges");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetNextChallenges", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetNextEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetNextEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetNextEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetNextEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetNextEntries
void Oculus::Platform::Message::MessageType::_set_Challenges_GetNextEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetNextEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetNextEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetPreviousChallenges
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetPreviousChallenges() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetPreviousChallenges");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetPreviousChallenges"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetPreviousChallenges
void Oculus::Platform::Message::MessageType::_set_Challenges_GetPreviousChallenges(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetPreviousChallenges");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetPreviousChallenges", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetPreviousEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_GetPreviousEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_GetPreviousEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_GetPreviousEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_GetPreviousEntries
void Oculus::Platform::Message::MessageType::_set_Challenges_GetPreviousEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_GetPreviousEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_GetPreviousEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Join
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_Join() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_Join");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_Join"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Join
void Oculus::Platform::Message::MessageType::_set_Challenges_Join(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_Join");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_Join", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Leave
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_Leave() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_Leave");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_Leave"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_Leave
void Oculus::Platform::Message::MessageType::_set_Challenges_Leave(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_Leave");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_Leave", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_UpdateInfo
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Challenges_UpdateInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Challenges_UpdateInfo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Challenges_UpdateInfo"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Challenges_UpdateInfo
void Oculus::Platform::Message::MessageType::_set_Challenges_UpdateInfo(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Challenges_UpdateInfo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Challenges_UpdateInfo", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage2_GetUserDirectoryPath
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage2_GetUserDirectoryPath() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage2_GetUserDirectoryPath");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage2_GetUserDirectoryPath"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage2_GetUserDirectoryPath
void Oculus::Platform::Message::MessageType::_set_CloudStorage2_GetUserDirectoryPath(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage2_GetUserDirectoryPath");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage2_GetUserDirectoryPath", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Delete
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_Delete() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_Delete");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_Delete"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Delete
void Oculus::Platform::Message::MessageType::_set_CloudStorage_Delete(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_Delete");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_Delete", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_GetNextCloudStorageMetadataArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_GetNextCloudStorageMetadataArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_GetNextCloudStorageMetadataArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_GetNextCloudStorageMetadataArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_GetNextCloudStorageMetadataArrayPage
void Oculus::Platform::Message::MessageType::_set_CloudStorage_GetNextCloudStorageMetadataArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_GetNextCloudStorageMetadataArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_GetNextCloudStorageMetadataArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Load
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_Load() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_Load");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_Load"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Load
void Oculus::Platform::Message::MessageType::_set_CloudStorage_Load(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_Load");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_Load", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadBucketMetadata
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadBucketMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadBucketMetadata");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadBucketMetadata"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadBucketMetadata
void Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadBucketMetadata(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadBucketMetadata");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadBucketMetadata", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadConflictMetadata
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadConflictMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadConflictMetadata");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadConflictMetadata"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadConflictMetadata
void Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadConflictMetadata(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadConflictMetadata");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadConflictMetadata", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadHandle
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadHandle");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadHandle"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadHandle
void Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadHandle(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadHandle");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadHandle", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadMetadata
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_LoadMetadata");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadMetadata"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_LoadMetadata
void Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadMetadata(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_LoadMetadata");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_LoadMetadata", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_ResolveKeepLocal
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_ResolveKeepLocal() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_ResolveKeepLocal");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_ResolveKeepLocal"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_ResolveKeepLocal
void Oculus::Platform::Message::MessageType::_set_CloudStorage_ResolveKeepLocal(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_ResolveKeepLocal");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_ResolveKeepLocal", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_ResolveKeepRemote
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_ResolveKeepRemote() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_ResolveKeepRemote");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_ResolveKeepRemote"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_ResolveKeepRemote
void Oculus::Platform::Message::MessageType::_set_CloudStorage_ResolveKeepRemote(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_ResolveKeepRemote");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_ResolveKeepRemote", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Save
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_CloudStorage_Save() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_CloudStorage_Save");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "CloudStorage_Save"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType CloudStorage_Save
void Oculus::Platform::Message::MessageType::_set_CloudStorage_Save(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_CloudStorage_Save");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "CloudStorage_Save", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Entitlement_GetIsViewerEntitled
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Entitlement_GetIsViewerEntitled() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Entitlement_GetIsViewerEntitled");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Entitlement_GetIsViewerEntitled"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Entitlement_GetIsViewerEntitled
void Oculus::Platform::Message::MessageType::_set_Entitlement_GetIsViewerEntitled(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Entitlement_GetIsViewerEntitled");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Entitlement_GetIsViewerEntitled", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_Clear
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_Clear() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_Clear");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_Clear"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_Clear
void Oculus::Platform::Message::MessageType::_set_GroupPresence_Clear(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_Clear");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_Clear", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetInvitableUsers
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_GetInvitableUsers() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_GetInvitableUsers");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_GetInvitableUsers"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetInvitableUsers
void Oculus::Platform::Message::MessageType::_set_GroupPresence_GetInvitableUsers(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_GetInvitableUsers");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_GetInvitableUsers", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetNextApplicationInviteArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_GetNextApplicationInviteArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_GetNextApplicationInviteArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_GetNextApplicationInviteArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetNextApplicationInviteArrayPage
void Oculus::Platform::Message::MessageType::_set_GroupPresence_GetNextApplicationInviteArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_GetNextApplicationInviteArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_GetNextApplicationInviteArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetSentInvites
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_GetSentInvites() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_GetSentInvites");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_GetSentInvites"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_GetSentInvites
void Oculus::Platform::Message::MessageType::_set_GroupPresence_GetSentInvites(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_GetSentInvites");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_GetSentInvites", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchInvitePanel
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchInvitePanel() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchInvitePanel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchInvitePanel"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchInvitePanel
void Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchInvitePanel(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchInvitePanel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchInvitePanel", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchMultiplayerErrorDialog
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchMultiplayerErrorDialog() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchMultiplayerErrorDialog");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchMultiplayerErrorDialog"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchMultiplayerErrorDialog
void Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchMultiplayerErrorDialog(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchMultiplayerErrorDialog");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchMultiplayerErrorDialog", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchRejoinDialog
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchRejoinDialog() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchRejoinDialog");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchRejoinDialog"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchRejoinDialog
void Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchRejoinDialog(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchRejoinDialog");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchRejoinDialog", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchRosterPanel
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchRosterPanel() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_LaunchRosterPanel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchRosterPanel"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_LaunchRosterPanel
void Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchRosterPanel(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_LaunchRosterPanel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_LaunchRosterPanel", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SendInvites
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_SendInvites() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_SendInvites");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_SendInvites"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SendInvites
void Oculus::Platform::Message::MessageType::_set_GroupPresence_SendInvites(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_SendInvites");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_SendInvites", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_Set
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_Set() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_Set");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_Set"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_Set
void Oculus::Platform::Message::MessageType::_set_GroupPresence_Set(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_Set");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_Set", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetDestination
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_SetDestination() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_SetDestination");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_SetDestination"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetDestination
void Oculus::Platform::Message::MessageType::_set_GroupPresence_SetDestination(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_SetDestination");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_SetDestination", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetIsJoinable
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_SetIsJoinable() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_SetIsJoinable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_SetIsJoinable"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetIsJoinable
void Oculus::Platform::Message::MessageType::_set_GroupPresence_SetIsJoinable(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_SetIsJoinable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_SetIsJoinable", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetLobbySession
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_SetLobbySession() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_SetLobbySession");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_SetLobbySession"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetLobbySession
void Oculus::Platform::Message::MessageType::_set_GroupPresence_SetLobbySession(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_SetLobbySession");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_SetLobbySession", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetMatchSession
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_GroupPresence_SetMatchSession() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_GroupPresence_SetMatchSession");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "GroupPresence_SetMatchSession"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType GroupPresence_SetMatchSession
void Oculus::Platform::Message::MessageType::_set_GroupPresence_SetMatchSession(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_GroupPresence_SetMatchSession");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "GroupPresence_SetMatchSession", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_ConsumePurchase
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_ConsumePurchase() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_ConsumePurchase");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_ConsumePurchase"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_ConsumePurchase
void Oculus::Platform::Message::MessageType::_set_IAP_ConsumePurchase(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_ConsumePurchase");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_ConsumePurchase", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetNextProductArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_GetNextProductArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_GetNextProductArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_GetNextProductArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetNextProductArrayPage
void Oculus::Platform::Message::MessageType::_set_IAP_GetNextProductArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_GetNextProductArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_GetNextProductArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetNextPurchaseArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_GetNextPurchaseArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_GetNextPurchaseArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_GetNextPurchaseArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetNextPurchaseArrayPage
void Oculus::Platform::Message::MessageType::_set_IAP_GetNextPurchaseArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_GetNextPurchaseArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_GetNextPurchaseArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetProductsBySKU
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_GetProductsBySKU() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_GetProductsBySKU");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_GetProductsBySKU"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetProductsBySKU
void Oculus::Platform::Message::MessageType::_set_IAP_GetProductsBySKU(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_GetProductsBySKU");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_GetProductsBySKU", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetViewerPurchases
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_GetViewerPurchases() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_GetViewerPurchases");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_GetViewerPurchases"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetViewerPurchases
void Oculus::Platform::Message::MessageType::_set_IAP_GetViewerPurchases(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_GetViewerPurchases");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_GetViewerPurchases", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetViewerPurchasesDurableCache
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_GetViewerPurchasesDurableCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_GetViewerPurchasesDurableCache");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_GetViewerPurchasesDurableCache"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_GetViewerPurchasesDurableCache
void Oculus::Platform::Message::MessageType::_set_IAP_GetViewerPurchasesDurableCache(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_GetViewerPurchasesDurableCache");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_GetViewerPurchasesDurableCache", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_LaunchCheckoutFlow
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_IAP_LaunchCheckoutFlow() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_IAP_LaunchCheckoutFlow");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "IAP_LaunchCheckoutFlow"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType IAP_LaunchCheckoutFlow
void Oculus::Platform::Message::MessageType::_set_IAP_LaunchCheckoutFlow(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_IAP_LaunchCheckoutFlow");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "IAP_LaunchCheckoutFlow", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType LanguagePack_GetCurrent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_LanguagePack_GetCurrent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_LanguagePack_GetCurrent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "LanguagePack_GetCurrent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType LanguagePack_GetCurrent
void Oculus::Platform::Message::MessageType::_set_LanguagePack_GetCurrent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_LanguagePack_GetCurrent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "LanguagePack_GetCurrent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType LanguagePack_SetCurrent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_LanguagePack_SetCurrent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_LanguagePack_SetCurrent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "LanguagePack_SetCurrent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType LanguagePack_SetCurrent
void Oculus::Platform::Message::MessageType::_set_LanguagePack_SetCurrent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_LanguagePack_SetCurrent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "LanguagePack_SetCurrent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_Get
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_Get() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_Get");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_Get"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_Get
void Oculus::Platform::Message::MessageType::_set_Leaderboard_Get(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_Get");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_Get", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntries
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntriesAfterRank
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntriesAfterRank() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntriesAfterRank");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntriesAfterRank"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntriesAfterRank
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntriesAfterRank(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntriesAfterRank");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntriesAfterRank", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntriesByIds
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntriesByIds() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetEntriesByIds");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntriesByIds"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetEntriesByIds
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntriesByIds(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetEntriesByIds");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetEntriesByIds", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetNextEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetNextEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetNextEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetNextEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetNextEntries
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetNextEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetNextEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetNextEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetNextLeaderboardArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetNextLeaderboardArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetNextLeaderboardArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetNextLeaderboardArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetNextLeaderboardArrayPage
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetNextLeaderboardArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetNextLeaderboardArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetNextLeaderboardArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetPreviousEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_GetPreviousEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_GetPreviousEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_GetPreviousEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_GetPreviousEntries
void Oculus::Platform::Message::MessageType::_set_Leaderboard_GetPreviousEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_GetPreviousEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_GetPreviousEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_WriteEntry
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_WriteEntry() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_WriteEntry");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_WriteEntry"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_WriteEntry
void Oculus::Platform::Message::MessageType::_set_Leaderboard_WriteEntry(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_WriteEntry");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_WriteEntry", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_WriteEntryWithSupplementaryMetric
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Leaderboard_WriteEntryWithSupplementaryMetric() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Leaderboard_WriteEntryWithSupplementaryMetric");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Leaderboard_WriteEntryWithSupplementaryMetric"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Leaderboard_WriteEntryWithSupplementaryMetric
void Oculus::Platform::Message::MessageType::_set_Leaderboard_WriteEntryWithSupplementaryMetric(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Leaderboard_WriteEntryWithSupplementaryMetric");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Leaderboard_WriteEntryWithSupplementaryMetric", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Browse
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Browse() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Browse");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Browse"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Browse
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Browse(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Browse");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Browse", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Browse2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Browse2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Browse2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Browse2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Browse2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Browse2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Browse2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Browse2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Cancel
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Cancel() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Cancel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Cancel"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Cancel
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Cancel(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Cancel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Cancel", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Cancel2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Cancel2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Cancel2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Cancel2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Cancel2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Cancel2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Cancel2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Cancel2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateAndEnqueueRoom
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateAndEnqueueRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateAndEnqueueRoom");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateAndEnqueueRoom"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateAndEnqueueRoom
void Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateAndEnqueueRoom(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateAndEnqueueRoom");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateAndEnqueueRoom", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateAndEnqueueRoom2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateAndEnqueueRoom2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateAndEnqueueRoom2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateAndEnqueueRoom2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateAndEnqueueRoom2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateAndEnqueueRoom2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateAndEnqueueRoom2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateAndEnqueueRoom2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateRoom
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateRoom");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateRoom"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateRoom
void Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateRoom(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateRoom");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateRoom", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateRoom2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateRoom2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_CreateRoom2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateRoom2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_CreateRoom2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateRoom2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_CreateRoom2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_CreateRoom2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Enqueue
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Enqueue() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Enqueue");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Enqueue"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Enqueue
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Enqueue(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Enqueue");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Enqueue", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Enqueue2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_Enqueue2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_Enqueue2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_Enqueue2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_Enqueue2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_Enqueue2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_Enqueue2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_Enqueue2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_EnqueueRoom
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_EnqueueRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_EnqueueRoom");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_EnqueueRoom"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_EnqueueRoom
void Oculus::Platform::Message::MessageType::_set_Matchmaking_EnqueueRoom(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_EnqueueRoom");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_EnqueueRoom", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_EnqueueRoom2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_EnqueueRoom2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_EnqueueRoom2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_EnqueueRoom2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_EnqueueRoom2
void Oculus::Platform::Message::MessageType::_set_Matchmaking_EnqueueRoom2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_EnqueueRoom2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_EnqueueRoom2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_GetAdminSnapshot
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_GetAdminSnapshot() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_GetAdminSnapshot");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_GetAdminSnapshot"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_GetAdminSnapshot
void Oculus::Platform::Message::MessageType::_set_Matchmaking_GetAdminSnapshot(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_GetAdminSnapshot");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_GetAdminSnapshot", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_GetStats
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_GetStats() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_GetStats");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_GetStats"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_GetStats
void Oculus::Platform::Message::MessageType::_set_Matchmaking_GetStats(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_GetStats");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_GetStats", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_JoinRoom
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_JoinRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_JoinRoom");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_JoinRoom"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_JoinRoom
void Oculus::Platform::Message::MessageType::_set_Matchmaking_JoinRoom(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_JoinRoom");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_JoinRoom", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_ReportResultInsecure
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_ReportResultInsecure() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_ReportResultInsecure");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_ReportResultInsecure"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_ReportResultInsecure
void Oculus::Platform::Message::MessageType::_set_Matchmaking_ReportResultInsecure(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_ReportResultInsecure");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_ReportResultInsecure", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_StartMatch
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Matchmaking_StartMatch() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Matchmaking_StartMatch");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Matchmaking_StartMatch"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Matchmaking_StartMatch
void Oculus::Platform::Message::MessageType::_set_Matchmaking_StartMatch(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Matchmaking_StartMatch");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Matchmaking_StartMatch", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Media_ShareToFacebook
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Media_ShareToFacebook() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Media_ShareToFacebook");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Media_ShareToFacebook"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Media_ShareToFacebook
void Oculus::Platform::Message::MessageType::_set_Media_ShareToFacebook(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Media_ShareToFacebook");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Media_ShareToFacebook", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GetNextRoomInviteNotificationArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_GetNextRoomInviteNotificationArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_GetNextRoomInviteNotificationArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_GetNextRoomInviteNotificationArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GetNextRoomInviteNotificationArrayPage
void Oculus::Platform::Message::MessageType::_set_Notification_GetNextRoomInviteNotificationArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_GetNextRoomInviteNotificationArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_GetNextRoomInviteNotificationArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GetRoomInvites
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_GetRoomInvites() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_GetRoomInvites");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_GetRoomInvites"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GetRoomInvites
void Oculus::Platform::Message::MessageType::_set_Notification_GetRoomInvites(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_GetRoomInvites");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_GetRoomInvites", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_MarkAsRead
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_MarkAsRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_MarkAsRead");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_MarkAsRead"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_MarkAsRead
void Oculus::Platform::Message::MessageType::_set_Notification_MarkAsRead(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_MarkAsRead");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_MarkAsRead", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Party_GetCurrent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Party_GetCurrent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Party_GetCurrent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Party_GetCurrent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Party_GetCurrent
void Oculus::Platform::Message::MessageType::_set_Party_GetCurrent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Party_GetCurrent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Party_GetCurrent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_Clear
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_RichPresence_Clear() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_RichPresence_Clear");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "RichPresence_Clear"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_Clear
void Oculus::Platform::Message::MessageType::_set_RichPresence_Clear(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_RichPresence_Clear");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "RichPresence_Clear", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_GetDestinations
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_RichPresence_GetDestinations() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_RichPresence_GetDestinations");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "RichPresence_GetDestinations"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_GetDestinations
void Oculus::Platform::Message::MessageType::_set_RichPresence_GetDestinations(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_RichPresence_GetDestinations");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "RichPresence_GetDestinations", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_GetNextDestinationArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_RichPresence_GetNextDestinationArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_RichPresence_GetNextDestinationArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "RichPresence_GetNextDestinationArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_GetNextDestinationArrayPage
void Oculus::Platform::Message::MessageType::_set_RichPresence_GetNextDestinationArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_RichPresence_GetNextDestinationArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "RichPresence_GetNextDestinationArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_Set
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_RichPresence_Set() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_RichPresence_Set");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "RichPresence_Set"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType RichPresence_Set
void Oculus::Platform::Message::MessageType::_set_RichPresence_Set(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_RichPresence_Set");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "RichPresence_Set", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_CreateAndJoinPrivate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_CreateAndJoinPrivate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_CreateAndJoinPrivate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_CreateAndJoinPrivate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_CreateAndJoinPrivate
void Oculus::Platform::Message::MessageType::_set_Room_CreateAndJoinPrivate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_CreateAndJoinPrivate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_CreateAndJoinPrivate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_CreateAndJoinPrivate2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_CreateAndJoinPrivate2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_CreateAndJoinPrivate2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_CreateAndJoinPrivate2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_CreateAndJoinPrivate2
void Oculus::Platform::Message::MessageType::_set_Room_CreateAndJoinPrivate2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_CreateAndJoinPrivate2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_CreateAndJoinPrivate2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Get
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_Get() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_Get");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_Get"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Get
void Oculus::Platform::Message::MessageType::_set_Room_Get(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_Get");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_Get", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetCurrent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetCurrent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetCurrent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetCurrent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetCurrent
void Oculus::Platform::Message::MessageType::_set_Room_GetCurrent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetCurrent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetCurrent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetCurrentForUser
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetCurrentForUser() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetCurrentForUser");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetCurrentForUser"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetCurrentForUser
void Oculus::Platform::Message::MessageType::_set_Room_GetCurrentForUser(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetCurrentForUser");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetCurrentForUser", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetInvitableUsers
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetInvitableUsers() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetInvitableUsers");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetInvitableUsers"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetInvitableUsers
void Oculus::Platform::Message::MessageType::_set_Room_GetInvitableUsers(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetInvitableUsers");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetInvitableUsers", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetInvitableUsers2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetInvitableUsers2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetInvitableUsers2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetInvitableUsers2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetInvitableUsers2
void Oculus::Platform::Message::MessageType::_set_Room_GetInvitableUsers2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetInvitableUsers2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetInvitableUsers2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetModeratedRooms
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetModeratedRooms() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetModeratedRooms");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetModeratedRooms"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetModeratedRooms
void Oculus::Platform::Message::MessageType::_set_Room_GetModeratedRooms(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetModeratedRooms");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetModeratedRooms", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetNextRoomArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_GetNextRoomArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_GetNextRoomArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_GetNextRoomArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_GetNextRoomArrayPage
void Oculus::Platform::Message::MessageType::_set_Room_GetNextRoomArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_GetNextRoomArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_GetNextRoomArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_InviteUser
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_InviteUser() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_InviteUser");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_InviteUser"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_InviteUser
void Oculus::Platform::Message::MessageType::_set_Room_InviteUser(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_InviteUser");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_InviteUser", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Join
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_Join() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_Join");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_Join"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Join
void Oculus::Platform::Message::MessageType::_set_Room_Join(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_Join");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_Join", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Join2
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_Join2() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_Join2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_Join2"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Join2
void Oculus::Platform::Message::MessageType::_set_Room_Join2(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_Join2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_Join2", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_KickUser
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_KickUser() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_KickUser");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_KickUser"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_KickUser
void Oculus::Platform::Message::MessageType::_set_Room_KickUser(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_KickUser");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_KickUser", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_LaunchInvitableUserFlow
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_LaunchInvitableUserFlow() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_LaunchInvitableUserFlow");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_LaunchInvitableUserFlow"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_LaunchInvitableUserFlow
void Oculus::Platform::Message::MessageType::_set_Room_LaunchInvitableUserFlow(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_LaunchInvitableUserFlow");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_LaunchInvitableUserFlow", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Leave
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_Leave() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_Leave");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_Leave"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_Leave
void Oculus::Platform::Message::MessageType::_set_Room_Leave(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_Leave");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_Leave", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_SetDescription
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_SetDescription() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_SetDescription");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_SetDescription"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_SetDescription
void Oculus::Platform::Message::MessageType::_set_Room_SetDescription(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_SetDescription");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_SetDescription", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateDataStore
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_UpdateDataStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_UpdateDataStore");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_UpdateDataStore"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateDataStore
void Oculus::Platform::Message::MessageType::_set_Room_UpdateDataStore(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_UpdateDataStore");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_UpdateDataStore", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateMembershipLockStatus
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_UpdateMembershipLockStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_UpdateMembershipLockStatus");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_UpdateMembershipLockStatus"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateMembershipLockStatus
void Oculus::Platform::Message::MessageType::_set_Room_UpdateMembershipLockStatus(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_UpdateMembershipLockStatus");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_UpdateMembershipLockStatus", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateOwner
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_UpdateOwner() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_UpdateOwner");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_UpdateOwner"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdateOwner
void Oculus::Platform::Message::MessageType::_set_Room_UpdateOwner(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_UpdateOwner");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_UpdateOwner", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdatePrivateRoomJoinPolicy
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Room_UpdatePrivateRoomJoinPolicy() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Room_UpdatePrivateRoomJoinPolicy");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Room_UpdatePrivateRoomJoinPolicy"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Room_UpdatePrivateRoomJoinPolicy
void Oculus::Platform::Message::MessageType::_set_Room_UpdatePrivateRoomJoinPolicy(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Room_UpdatePrivateRoomJoinPolicy");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Room_UpdatePrivateRoomJoinPolicy", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateDeleteEntryByKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateDeleteEntryByKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateDeleteEntryByKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateDeleteEntryByKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateDeleteEntryByKey
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateDeleteEntryByKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateDeleteEntryByKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateDeleteEntryByKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateGetEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateGetEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateGetEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateGetEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateGetEntries
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateGetEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateGetEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateGetEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateGetEntryByKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateGetEntryByKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateGetEntryByKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateGetEntryByKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateGetEntryByKey
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateGetEntryByKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateGetEntryByKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateGetEntryByKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateWriteEntry
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateWriteEntry() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PrivateWriteEntry");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateWriteEntry"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PrivateWriteEntry
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateWriteEntry(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PrivateWriteEntry");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PrivateWriteEntry", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicDeleteEntryByKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicDeleteEntryByKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicDeleteEntryByKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicDeleteEntryByKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicDeleteEntryByKey
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicDeleteEntryByKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicDeleteEntryByKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicDeleteEntryByKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicGetEntries
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicGetEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicGetEntries");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicGetEntries"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicGetEntries
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicGetEntries(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicGetEntries");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicGetEntries", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicGetEntryByKey
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicGetEntryByKey() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicGetEntryByKey");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicGetEntryByKey"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicGetEntryByKey
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicGetEntryByKey(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicGetEntryByKey");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicGetEntryByKey", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicWriteEntry
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicWriteEntry() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_UserDataStore_PublicWriteEntry");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicWriteEntry"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType UserDataStore_PublicWriteEntry
void Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicWriteEntry(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_UserDataStore_PublicWriteEntry");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "UserDataStore_PublicWriteEntry", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_Get
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_Get() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_Get");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_Get"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_Get
void Oculus::Platform::Message::MessageType::_set_User_Get(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_Get");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_Get", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetAccessToken
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetAccessToken() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetAccessToken");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetAccessToken"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetAccessToken
void Oculus::Platform::Message::MessageType::_set_User_GetAccessToken(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetAccessToken");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetAccessToken", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUser
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUser() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUser");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUser"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUser
void Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUser(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUser");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUser", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserFriends
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserFriends() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserFriends");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserFriends"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserFriends
void Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserFriends(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserFriends");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserFriends", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserFriendsAndRooms
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserFriendsAndRooms() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserFriendsAndRooms");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserFriendsAndRooms"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserFriendsAndRooms
void Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserFriendsAndRooms(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserFriendsAndRooms");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserFriendsAndRooms", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserRecentlyMetUsersAndRooms
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserRecentlyMetUsersAndRooms() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetLoggedInUserRecentlyMetUsersAndRooms");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserRecentlyMetUsersAndRooms"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetLoggedInUserRecentlyMetUsersAndRooms
void Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserRecentlyMetUsersAndRooms(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetLoggedInUserRecentlyMetUsersAndRooms");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetLoggedInUserRecentlyMetUsersAndRooms", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetNextUserAndRoomArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetNextUserAndRoomArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetNextUserAndRoomArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetNextUserAndRoomArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetNextUserAndRoomArrayPage
void Oculus::Platform::Message::MessageType::_set_User_GetNextUserAndRoomArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetNextUserAndRoomArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetNextUserAndRoomArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetNextUserArrayPage
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetNextUserArrayPage() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetNextUserArrayPage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetNextUserArrayPage"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetNextUserArrayPage
void Oculus::Platform::Message::MessageType::_set_User_GetNextUserArrayPage(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetNextUserArrayPage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetNextUserArrayPage", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetOrgScopedID
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetOrgScopedID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetOrgScopedID");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetOrgScopedID"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetOrgScopedID
void Oculus::Platform::Message::MessageType::_set_User_GetOrgScopedID(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetOrgScopedID");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetOrgScopedID", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetSdkAccounts
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetSdkAccounts() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetSdkAccounts");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetSdkAccounts"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetSdkAccounts
void Oculus::Platform::Message::MessageType::_set_User_GetSdkAccounts(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetSdkAccounts");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetSdkAccounts", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetUserProof
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_GetUserProof() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_GetUserProof");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_GetUserProof"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_GetUserProof
void Oculus::Platform::Message::MessageType::_set_User_GetUserProof(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_GetUserProof");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_GetUserProof", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_LaunchFriendRequestFlow
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_User_LaunchFriendRequestFlow() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_User_LaunchFriendRequestFlow");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "User_LaunchFriendRequestFlow"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType User_LaunchFriendRequestFlow
void Oculus::Platform::Message::MessageType::_set_User_LaunchFriendRequestFlow(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_User_LaunchFriendRequestFlow");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "User_LaunchFriendRequestFlow", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Voip_GetMicrophoneAvailability
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Voip_GetMicrophoneAvailability() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Voip_GetMicrophoneAvailability");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Voip_GetMicrophoneAvailability"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Voip_GetMicrophoneAvailability
void Oculus::Platform::Message::MessageType::_set_Voip_GetMicrophoneAvailability(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Voip_GetMicrophoneAvailability");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Voip_GetMicrophoneAvailability", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Voip_SetSystemVoipSuppressed
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Voip_SetSystemVoipSuppressed() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Voip_SetSystemVoipSuppressed");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Voip_SetSystemVoipSuppressed"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Voip_SetSystemVoipSuppressed
void Oculus::Platform::Message::MessageType::_set_Voip_SetSystemVoipSuppressed(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Voip_SetSystemVoipSuppressed");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Voip_SetSystemVoipSuppressed", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_ApplicationLifecycle_LaunchIntentChanged
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_ApplicationLifecycle_LaunchIntentChanged() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_ApplicationLifecycle_LaunchIntentChanged");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_ApplicationLifecycle_LaunchIntentChanged"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_ApplicationLifecycle_LaunchIntentChanged
void Oculus::Platform::Message::MessageType::_set_Notification_ApplicationLifecycle_LaunchIntentChanged(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_ApplicationLifecycle_LaunchIntentChanged");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_ApplicationLifecycle_LaunchIntentChanged", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_AssetFile_DownloadUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_AssetFile_DownloadUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_AssetFile_DownloadUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_AssetFile_DownloadUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_AssetFile_DownloadUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_AssetFile_DownloadUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_AssetFile_DownloadUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_AssetFile_DownloadUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Cal_FinalizeApplication
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Cal_FinalizeApplication() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Cal_FinalizeApplication");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Cal_FinalizeApplication"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Cal_FinalizeApplication
void Oculus::Platform::Message::MessageType::_set_Notification_Cal_FinalizeApplication(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Cal_FinalizeApplication");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Cal_FinalizeApplication", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Cal_ProposeApplication
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Cal_ProposeApplication() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Cal_ProposeApplication");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Cal_ProposeApplication"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Cal_ProposeApplication
void Oculus::Platform::Message::MessageType::_set_Notification_Cal_ProposeApplication(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Cal_ProposeApplication");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Cal_ProposeApplication", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_InvitationsSent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_InvitationsSent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_InvitationsSent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_InvitationsSent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_InvitationsSent
void Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_InvitationsSent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_InvitationsSent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_InvitationsSent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_JoinIntentReceived
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_JoinIntentReceived() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_JoinIntentReceived");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_JoinIntentReceived"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_JoinIntentReceived
void Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_JoinIntentReceived(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_JoinIntentReceived");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_JoinIntentReceived", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_LeaveIntentReceived
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_LeaveIntentReceived() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_GroupPresence_LeaveIntentReceived");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_LeaveIntentReceived"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_GroupPresence_LeaveIntentReceived
void Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_LeaveIntentReceived(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_GroupPresence_LeaveIntentReceived");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_GroupPresence_LeaveIntentReceived", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_HTTP_Transfer
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_HTTP_Transfer() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_HTTP_Transfer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_HTTP_Transfer"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_HTTP_Transfer
void Oculus::Platform::Message::MessageType::_set_Notification_HTTP_Transfer(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_HTTP_Transfer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_HTTP_Transfer", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Livestreaming_StatusChange
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Livestreaming_StatusChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Livestreaming_StatusChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Livestreaming_StatusChange"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Livestreaming_StatusChange
void Oculus::Platform::Message::MessageType::_set_Notification_Livestreaming_StatusChange(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Livestreaming_StatusChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Livestreaming_StatusChange", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Matchmaking_MatchFound
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Matchmaking_MatchFound() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Matchmaking_MatchFound");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Matchmaking_MatchFound"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Matchmaking_MatchFound
void Oculus::Platform::Message::MessageType::_set_Notification_Matchmaking_MatchFound(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Matchmaking_MatchFound");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Matchmaking_MatchFound", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_NetSync_ConnectionStatusChanged
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_NetSync_ConnectionStatusChanged() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_NetSync_ConnectionStatusChanged");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_NetSync_ConnectionStatusChanged"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_NetSync_ConnectionStatusChanged
void Oculus::Platform::Message::MessageType::_set_Notification_NetSync_ConnectionStatusChanged(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_NetSync_ConnectionStatusChanged");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_NetSync_ConnectionStatusChanged", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_NetSync_SessionsChanged
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_NetSync_SessionsChanged() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_NetSync_SessionsChanged");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_NetSync_SessionsChanged"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_NetSync_SessionsChanged
void Oculus::Platform::Message::MessageType::_set_Notification_NetSync_SessionsChanged(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_NetSync_SessionsChanged");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_NetSync_SessionsChanged", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_ConnectionStateChange
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Networking_ConnectionStateChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Networking_ConnectionStateChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Networking_ConnectionStateChange"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_ConnectionStateChange
void Oculus::Platform::Message::MessageType::_set_Notification_Networking_ConnectionStateChange(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Networking_ConnectionStateChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Networking_ConnectionStateChange", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_PeerConnectRequest
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Networking_PeerConnectRequest() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Networking_PeerConnectRequest");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Networking_PeerConnectRequest"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_PeerConnectRequest
void Oculus::Platform::Message::MessageType::_set_Notification_Networking_PeerConnectRequest(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Networking_PeerConnectRequest");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Networking_PeerConnectRequest", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_PingResult
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Networking_PingResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Networking_PingResult");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Networking_PingResult"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Networking_PingResult
void Oculus::Platform::Message::MessageType::_set_Notification_Networking_PingResult(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Networking_PingResult");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Networking_PingResult", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Party_PartyUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Party_PartyUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Party_PartyUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Party_PartyUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Party_PartyUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_Party_PartyUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Party_PartyUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Party_PartyUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_InviteAccepted
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Room_InviteAccepted() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Room_InviteAccepted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Room_InviteAccepted"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_InviteAccepted
void Oculus::Platform::Message::MessageType::_set_Notification_Room_InviteAccepted(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Room_InviteAccepted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Room_InviteAccepted", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_InviteReceived
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Room_InviteReceived() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Room_InviteReceived");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Room_InviteReceived"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_InviteReceived
void Oculus::Platform::Message::MessageType::_set_Notification_Room_InviteReceived(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Room_InviteReceived");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Room_InviteReceived", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_RoomUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Room_RoomUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Room_RoomUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Room_RoomUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Room_RoomUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_Room_RoomUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Room_RoomUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Room_RoomUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Session_InvitationsSent
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Session_InvitationsSent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Session_InvitationsSent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Session_InvitationsSent"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Session_InvitationsSent
void Oculus::Platform::Message::MessageType::_set_Notification_Session_InvitationsSent(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Session_InvitationsSent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Session_InvitationsSent", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_ConnectRequest
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Voip_ConnectRequest() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Voip_ConnectRequest");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Voip_ConnectRequest"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_ConnectRequest
void Oculus::Platform::Message::MessageType::_set_Notification_Voip_ConnectRequest(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Voip_ConnectRequest");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Voip_ConnectRequest", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_MicrophoneAvailabilityStateUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Voip_MicrophoneAvailabilityStateUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Voip_MicrophoneAvailabilityStateUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Voip_MicrophoneAvailabilityStateUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_MicrophoneAvailabilityStateUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_Voip_MicrophoneAvailabilityStateUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Voip_MicrophoneAvailabilityStateUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Voip_MicrophoneAvailabilityStateUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_StateChange
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Voip_StateChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Voip_StateChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Voip_StateChange"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_StateChange
void Oculus::Platform::Message::MessageType::_set_Notification_Voip_StateChange(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Voip_StateChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Voip_StateChange", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_SystemVoipState
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Voip_SystemVoipState() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Voip_SystemVoipState");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Voip_SystemVoipState"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Voip_SystemVoipState
void Oculus::Platform::Message::MessageType::_set_Notification_Voip_SystemVoipState(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Voip_SystemVoipState");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Voip_SystemVoipState", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Vrcamera_GetDataChannelMessageUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Vrcamera_GetDataChannelMessageUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Vrcamera_GetDataChannelMessageUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Vrcamera_GetDataChannelMessageUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Vrcamera_GetDataChannelMessageUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_Vrcamera_GetDataChannelMessageUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Vrcamera_GetDataChannelMessageUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Vrcamera_GetDataChannelMessageUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Vrcamera_GetSurfaceUpdate
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Notification_Vrcamera_GetSurfaceUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Notification_Vrcamera_GetSurfaceUpdate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Notification_Vrcamera_GetSurfaceUpdate"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Notification_Vrcamera_GetSurfaceUpdate
void Oculus::Platform::Message::MessageType::_set_Notification_Vrcamera_GetSurfaceUpdate(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Notification_Vrcamera_GetSurfaceUpdate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Notification_Vrcamera_GetSurfaceUpdate", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeWithAccessToken
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Platform_InitializeWithAccessToken() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Platform_InitializeWithAccessToken");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Platform_InitializeWithAccessToken"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeWithAccessToken
void Oculus::Platform::Message::MessageType::_set_Platform_InitializeWithAccessToken(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Platform_InitializeWithAccessToken");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Platform_InitializeWithAccessToken", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeStandaloneOculus
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Platform_InitializeStandaloneOculus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Platform_InitializeStandaloneOculus");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Platform_InitializeStandaloneOculus"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeStandaloneOculus
void Oculus::Platform::Message::MessageType::_set_Platform_InitializeStandaloneOculus(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Platform_InitializeStandaloneOculus");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Platform_InitializeStandaloneOculus", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeAndroidAsynchronous
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Platform_InitializeAndroidAsynchronous() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Platform_InitializeAndroidAsynchronous");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Platform_InitializeAndroidAsynchronous"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeAndroidAsynchronous
void Oculus::Platform::Message::MessageType::_set_Platform_InitializeAndroidAsynchronous(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Platform_InitializeAndroidAsynchronous");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Platform_InitializeAndroidAsynchronous", value));
}
// Autogenerated static field getter
// Get static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeWindowsAsynchronous
::Oculus::Platform::Message::MessageType Oculus::Platform::Message::MessageType::_get_Platform_InitializeWindowsAsynchronous() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_get_Platform_InitializeWindowsAsynchronous");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Oculus::Platform::Message::MessageType>("Oculus.Platform", "Message/MessageType", "Platform_InitializeWindowsAsynchronous"));
}
// Autogenerated static field setter
// Set static field: static public Oculus.Platform.Message/Oculus.Platform.MessageType Platform_InitializeWindowsAsynchronous
void Oculus::Platform::Message::MessageType::_set_Platform_InitializeWindowsAsynchronous(::Oculus::Platform::Message::MessageType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::_set_Platform_InitializeWindowsAsynchronous");
THROW_UNLESS(il2cpp_utils::SetFieldValue("Oculus.Platform", "Message/MessageType", "Platform_InitializeWindowsAsynchronous", value));
}
// Autogenerated instance field getter
// Get instance field: public System.UInt32 value__
uint& Oculus::Platform::Message::MessageType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::MessageType::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler
#include "Oculus/Platform/Message_ExtraMessageTypesHandler.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: Oculus.Platform.Message/Oculus.Platform.MessageType
#include "Oculus/Platform/Message.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler.Invoke
::Oculus::Platform::Message* Oculus::Platform::Message::ExtraMessageTypesHandler::Invoke(::System::IntPtr messageHandle, ::Oculus::Platform::Message::MessageType message_type) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::ExtraMessageTypesHandler::Invoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(messageHandle), ::il2cpp_utils::ExtractType(message_type)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Message*, false>(this, ___internal__method, messageHandle, message_type);
}
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler.BeginInvoke
::System::IAsyncResult* Oculus::Platform::Message::ExtraMessageTypesHandler::BeginInvoke(::System::IntPtr messageHandle, ::Oculus::Platform::Message::MessageType message_type, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::ExtraMessageTypesHandler::BeginInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(messageHandle), ::il2cpp_utils::ExtractType(message_type), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(object)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, messageHandle, message_type, callback, object);
}
// Autogenerated method: Oculus.Platform.Message/Oculus.Platform.ExtraMessageTypesHandler.EndInvoke
::Oculus::Platform::Message* Oculus::Platform::Message::ExtraMessageTypesHandler::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::Message::ExtraMessageTypesHandler::EndInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(result)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Message*, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAbuseReportRecording
#include "Oculus/Platform/MessageWithAbuseReportRecording.hpp"
// Including type: Oculus.Platform.Models.AbuseReportRecording
#include "Oculus/Platform/Models/AbuseReportRecording.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAbuseReportRecording.GetDataFromMessage
::Oculus::Platform::Models::AbuseReportRecording* Oculus::Platform::MessageWithAbuseReportRecording::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAbuseReportRecording::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AbuseReportRecording*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAbuseReportRecording.GetAbuseReportRecording
::Oculus::Platform::Models::AbuseReportRecording* Oculus::Platform::MessageWithAbuseReportRecording::GetAbuseReportRecording() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAbuseReportRecording::GetAbuseReportRecording");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAbuseReportRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AbuseReportRecording*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAchievementDefinitions
#include "Oculus/Platform/MessageWithAchievementDefinitions.hpp"
// Including type: Oculus.Platform.Models.AchievementDefinitionList
#include "Oculus/Platform/Models/AchievementDefinitionList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAchievementDefinitions.GetDataFromMessage
::Oculus::Platform::Models::AchievementDefinitionList* Oculus::Platform::MessageWithAchievementDefinitions::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementDefinitions::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementDefinitionList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAchievementDefinitions.GetAchievementDefinitions
::Oculus::Platform::Models::AchievementDefinitionList* Oculus::Platform::MessageWithAchievementDefinitions::GetAchievementDefinitions() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementDefinitions::GetAchievementDefinitions");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementDefinitions", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementDefinitionList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAchievementProgressList
#include "Oculus/Platform/MessageWithAchievementProgressList.hpp"
// Including type: Oculus.Platform.Models.AchievementProgressList
#include "Oculus/Platform/Models/AchievementProgressList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAchievementProgressList.GetDataFromMessage
::Oculus::Platform::Models::AchievementProgressList* Oculus::Platform::MessageWithAchievementProgressList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementProgressList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementProgressList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAchievementProgressList.GetAchievementProgressList
::Oculus::Platform::Models::AchievementProgressList* Oculus::Platform::MessageWithAchievementProgressList::GetAchievementProgressList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementProgressList::GetAchievementProgressList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementProgressList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementProgressList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAchievementUpdate
#include "Oculus/Platform/MessageWithAchievementUpdate.hpp"
// Including type: Oculus.Platform.Models.AchievementUpdate
#include "Oculus/Platform/Models/AchievementUpdate.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAchievementUpdate.GetDataFromMessage
::Oculus::Platform::Models::AchievementUpdate* Oculus::Platform::MessageWithAchievementUpdate::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementUpdate::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementUpdate*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAchievementUpdate.GetAchievementUpdate
::Oculus::Platform::Models::AchievementUpdate* Oculus::Platform::MessageWithAchievementUpdate::GetAchievementUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAchievementUpdate::GetAchievementUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAchievementUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AchievementUpdate*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithApplicationInviteList
#include "Oculus/Platform/MessageWithApplicationInviteList.hpp"
// Including type: Oculus.Platform.Models.ApplicationInviteList
#include "Oculus/Platform/Models/ApplicationInviteList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithApplicationInviteList.GetDataFromMessage
::Oculus::Platform::Models::ApplicationInviteList* Oculus::Platform::MessageWithApplicationInviteList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithApplicationInviteList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationInviteList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithApplicationInviteList.GetApplicationInviteList
::Oculus::Platform::Models::ApplicationInviteList* Oculus::Platform::MessageWithApplicationInviteList::GetApplicationInviteList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithApplicationInviteList::GetApplicationInviteList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetApplicationInviteList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationInviteList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithApplicationVersion
#include "Oculus/Platform/MessageWithApplicationVersion.hpp"
// Including type: Oculus.Platform.Models.ApplicationVersion
#include "Oculus/Platform/Models/ApplicationVersion.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithApplicationVersion.GetDataFromMessage
::Oculus::Platform::Models::ApplicationVersion* Oculus::Platform::MessageWithApplicationVersion::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithApplicationVersion::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationVersion*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithApplicationVersion.GetApplicationVersion
::Oculus::Platform::Models::ApplicationVersion* Oculus::Platform::MessageWithApplicationVersion::GetApplicationVersion() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithApplicationVersion::GetApplicationVersion");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetApplicationVersion", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ApplicationVersion*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetDetails
#include "Oculus/Platform/MessageWithAssetDetails.hpp"
// Including type: Oculus.Platform.Models.AssetDetails
#include "Oculus/Platform/Models/AssetDetails.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetDetails.GetDataFromMessage
::Oculus::Platform::Models::AssetDetails* Oculus::Platform::MessageWithAssetDetails::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetDetails::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetails*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetDetails.GetAssetDetails
::Oculus::Platform::Models::AssetDetails* Oculus::Platform::MessageWithAssetDetails::GetAssetDetails() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetDetails::GetAssetDetails");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetDetails", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetails*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetDetailsList
#include "Oculus/Platform/MessageWithAssetDetailsList.hpp"
// Including type: Oculus.Platform.Models.AssetDetailsList
#include "Oculus/Platform/Models/AssetDetailsList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetDetailsList.GetDataFromMessage
::Oculus::Platform::Models::AssetDetailsList* Oculus::Platform::MessageWithAssetDetailsList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetDetailsList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetailsList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetDetailsList.GetAssetDetailsList
::Oculus::Platform::Models::AssetDetailsList* Oculus::Platform::MessageWithAssetDetailsList::GetAssetDetailsList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetDetailsList::GetAssetDetailsList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetDetailsList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetDetailsList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetFileDeleteResult
#include "Oculus/Platform/MessageWithAssetFileDeleteResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDeleteResult
#include "Oculus/Platform/Models/AssetFileDeleteResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDeleteResult.GetDataFromMessage
::Oculus::Platform::Models::AssetFileDeleteResult* Oculus::Platform::MessageWithAssetFileDeleteResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDeleteResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDeleteResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDeleteResult.GetAssetFileDeleteResult
::Oculus::Platform::Models::AssetFileDeleteResult* Oculus::Platform::MessageWithAssetFileDeleteResult::GetAssetFileDeleteResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDeleteResult::GetAssetFileDeleteResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDeleteResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDeleteResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetFileDownloadCancelResult
#include "Oculus/Platform/MessageWithAssetFileDownloadCancelResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadCancelResult
#include "Oculus/Platform/Models/AssetFileDownloadCancelResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadCancelResult.GetDataFromMessage
::Oculus::Platform::Models::AssetFileDownloadCancelResult* Oculus::Platform::MessageWithAssetFileDownloadCancelResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadCancelResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadCancelResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadCancelResult.GetAssetFileDownloadCancelResult
::Oculus::Platform::Models::AssetFileDownloadCancelResult* Oculus::Platform::MessageWithAssetFileDownloadCancelResult::GetAssetFileDownloadCancelResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadCancelResult::GetAssetFileDownloadCancelResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadCancelResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadCancelResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetFileDownloadResult
#include "Oculus/Platform/MessageWithAssetFileDownloadResult.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadResult
#include "Oculus/Platform/Models/AssetFileDownloadResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadResult.GetDataFromMessage
::Oculus::Platform::Models::AssetFileDownloadResult* Oculus::Platform::MessageWithAssetFileDownloadResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadResult.GetAssetFileDownloadResult
::Oculus::Platform::Models::AssetFileDownloadResult* Oculus::Platform::MessageWithAssetFileDownloadResult::GetAssetFileDownloadResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadResult::GetAssetFileDownloadResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithAssetFileDownloadUpdate
#include "Oculus/Platform/MessageWithAssetFileDownloadUpdate.hpp"
// Including type: Oculus.Platform.Models.AssetFileDownloadUpdate
#include "Oculus/Platform/Models/AssetFileDownloadUpdate.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadUpdate.GetDataFromMessage
::Oculus::Platform::Models::AssetFileDownloadUpdate* Oculus::Platform::MessageWithAssetFileDownloadUpdate::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadUpdate::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadUpdate*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithAssetFileDownloadUpdate.GetAssetFileDownloadUpdate
::Oculus::Platform::Models::AssetFileDownloadUpdate* Oculus::Platform::MessageWithAssetFileDownloadUpdate::GetAssetFileDownloadUpdate() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithAssetFileDownloadUpdate::GetAssetFileDownloadUpdate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAssetFileDownloadUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::AssetFileDownloadUpdate*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCalApplicationFinalized
#include "Oculus/Platform/MessageWithCalApplicationFinalized.hpp"
// Including type: Oculus.Platform.Models.CalApplicationFinalized
#include "Oculus/Platform/Models/CalApplicationFinalized.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationFinalized.GetDataFromMessage
::Oculus::Platform::Models::CalApplicationFinalized* Oculus::Platform::MessageWithCalApplicationFinalized::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationFinalized::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationFinalized*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationFinalized.GetCalApplicationFinalized
::Oculus::Platform::Models::CalApplicationFinalized* Oculus::Platform::MessageWithCalApplicationFinalized::GetCalApplicationFinalized() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationFinalized::GetCalApplicationFinalized");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationFinalized", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationFinalized*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCalApplicationProposed
#include "Oculus/Platform/MessageWithCalApplicationProposed.hpp"
// Including type: Oculus.Platform.Models.CalApplicationProposed
#include "Oculus/Platform/Models/CalApplicationProposed.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationProposed.GetDataFromMessage
::Oculus::Platform::Models::CalApplicationProposed* Oculus::Platform::MessageWithCalApplicationProposed::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationProposed::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationProposed*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationProposed.GetCalApplicationProposed
::Oculus::Platform::Models::CalApplicationProposed* Oculus::Platform::MessageWithCalApplicationProposed::GetCalApplicationProposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationProposed::GetCalApplicationProposed");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationProposed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationProposed*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCalApplicationSuggestionList
#include "Oculus/Platform/MessageWithCalApplicationSuggestionList.hpp"
// Including type: Oculus.Platform.Models.CalApplicationSuggestionList
#include "Oculus/Platform/Models/CalApplicationSuggestionList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationSuggestionList.GetDataFromMessage
::Oculus::Platform::Models::CalApplicationSuggestionList* Oculus::Platform::MessageWithCalApplicationSuggestionList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationSuggestionList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationSuggestionList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCalApplicationSuggestionList.GetCalApplicationSuggestionList
::Oculus::Platform::Models::CalApplicationSuggestionList* Oculus::Platform::MessageWithCalApplicationSuggestionList::GetCalApplicationSuggestionList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCalApplicationSuggestionList::GetCalApplicationSuggestionList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCalApplicationSuggestionList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CalApplicationSuggestionList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithChallenge
#include "Oculus/Platform/MessageWithChallenge.hpp"
// Including type: Oculus.Platform.Models.Challenge
#include "Oculus/Platform/Models/Challenge.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithChallenge.GetDataFromMessage
::Oculus::Platform::Models::Challenge* Oculus::Platform::MessageWithChallenge::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallenge::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Challenge*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithChallenge.GetChallenge
::Oculus::Platform::Models::Challenge* Oculus::Platform::MessageWithChallenge::GetChallenge() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallenge::GetChallenge");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallenge", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Challenge*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithChallengeList
#include "Oculus/Platform/MessageWithChallengeList.hpp"
// Including type: Oculus.Platform.Models.ChallengeList
#include "Oculus/Platform/Models/ChallengeList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithChallengeList.GetDataFromMessage
::Oculus::Platform::Models::ChallengeList* Oculus::Platform::MessageWithChallengeList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallengeList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithChallengeList.GetChallengeList
::Oculus::Platform::Models::ChallengeList* Oculus::Platform::MessageWithChallengeList::GetChallengeList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallengeList::GetChallengeList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallengeList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithChallengeEntryList
#include "Oculus/Platform/MessageWithChallengeEntryList.hpp"
// Including type: Oculus.Platform.Models.ChallengeEntryList
#include "Oculus/Platform/Models/ChallengeEntryList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithChallengeEntryList.GetDataFromMessage
::Oculus::Platform::Models::ChallengeEntryList* Oculus::Platform::MessageWithChallengeEntryList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallengeEntryList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeEntryList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithChallengeEntryList.GetChallengeEntryList
::Oculus::Platform::Models::ChallengeEntryList* Oculus::Platform::MessageWithChallengeEntryList::GetChallengeEntryList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithChallengeEntryList::GetChallengeEntryList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetChallengeEntryList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ChallengeEntryList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCloudStorageConflictMetadata
#include "Oculus/Platform/MessageWithCloudStorageConflictMetadata.hpp"
// Including type: Oculus.Platform.Models.CloudStorageConflictMetadata
#include "Oculus/Platform/Models/CloudStorageConflictMetadata.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageConflictMetadata.GetDataFromMessage
::Oculus::Platform::Models::CloudStorageConflictMetadata* Oculus::Platform::MessageWithCloudStorageConflictMetadata::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageConflictMetadata::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageConflictMetadata*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageConflictMetadata.GetCloudStorageConflictMetadata
::Oculus::Platform::Models::CloudStorageConflictMetadata* Oculus::Platform::MessageWithCloudStorageConflictMetadata::GetCloudStorageConflictMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageConflictMetadata::GetCloudStorageConflictMetadata");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageConflictMetadata", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageConflictMetadata*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCloudStorageData
#include "Oculus/Platform/MessageWithCloudStorageData.hpp"
// Including type: Oculus.Platform.Models.CloudStorageData
#include "Oculus/Platform/Models/CloudStorageData.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageData.GetDataFromMessage
::Oculus::Platform::Models::CloudStorageData* Oculus::Platform::MessageWithCloudStorageData::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageData::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageData*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageData.GetCloudStorageData
::Oculus::Platform::Models::CloudStorageData* Oculus::Platform::MessageWithCloudStorageData::GetCloudStorageData() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageData::GetCloudStorageData");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageData", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageData*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCloudStorageMetadataUnderLocal
#include "Oculus/Platform/MessageWithCloudStorageMetadataUnderLocal.hpp"
// Including type: Oculus.Platform.Models.CloudStorageMetadata
#include "Oculus/Platform/Models/CloudStorageMetadata.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageMetadataUnderLocal.GetDataFromMessage
::Oculus::Platform::Models::CloudStorageMetadata* Oculus::Platform::MessageWithCloudStorageMetadataUnderLocal::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageMetadataUnderLocal::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadata*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageMetadataUnderLocal.GetCloudStorageMetadata
::Oculus::Platform::Models::CloudStorageMetadata* Oculus::Platform::MessageWithCloudStorageMetadataUnderLocal::GetCloudStorageMetadata() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageMetadataUnderLocal::GetCloudStorageMetadata");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageMetadata", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadata*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCloudStorageMetadataList
#include "Oculus/Platform/MessageWithCloudStorageMetadataList.hpp"
// Including type: Oculus.Platform.Models.CloudStorageMetadataList
#include "Oculus/Platform/Models/CloudStorageMetadataList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageMetadataList.GetDataFromMessage
::Oculus::Platform::Models::CloudStorageMetadataList* Oculus::Platform::MessageWithCloudStorageMetadataList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageMetadataList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadataList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageMetadataList.GetCloudStorageMetadataList
::Oculus::Platform::Models::CloudStorageMetadataList* Oculus::Platform::MessageWithCloudStorageMetadataList::GetCloudStorageMetadataList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageMetadataList::GetCloudStorageMetadataList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageMetadataList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageMetadataList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithCloudStorageUpdateResponse
#include "Oculus/Platform/MessageWithCloudStorageUpdateResponse.hpp"
// Including type: Oculus.Platform.Models.CloudStorageUpdateResponse
#include "Oculus/Platform/Models/CloudStorageUpdateResponse.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageUpdateResponse.GetDataFromMessage
::Oculus::Platform::Models::CloudStorageUpdateResponse* Oculus::Platform::MessageWithCloudStorageUpdateResponse::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageUpdateResponse::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageUpdateResponse*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithCloudStorageUpdateResponse.GetCloudStorageUpdateResponse
::Oculus::Platform::Models::CloudStorageUpdateResponse* Oculus::Platform::MessageWithCloudStorageUpdateResponse::GetCloudStorageUpdateResponse() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithCloudStorageUpdateResponse::GetCloudStorageUpdateResponse");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCloudStorageUpdateResponse", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::CloudStorageUpdateResponse*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithDataStoreUnderPrivateUserDataStore
#include "Oculus/Platform/MessageWithDataStoreUnderPrivateUserDataStore.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 method: Oculus.Platform.MessageWithDataStoreUnderPrivateUserDataStore.GetDataFromMessage
::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>* Oculus::Platform::MessageWithDataStoreUnderPrivateUserDataStore::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDataStoreUnderPrivateUserDataStore::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithDataStoreUnderPrivateUserDataStore.GetDataStore
::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>* Oculus::Platform::MessageWithDataStoreUnderPrivateUserDataStore::GetDataStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDataStoreUnderPrivateUserDataStore::GetDataStore");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataStore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithDataStoreUnderPublicUserDataStore
#include "Oculus/Platform/MessageWithDataStoreUnderPublicUserDataStore.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 method: Oculus.Platform.MessageWithDataStoreUnderPublicUserDataStore.GetDataFromMessage
::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>* Oculus::Platform::MessageWithDataStoreUnderPublicUserDataStore::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDataStoreUnderPublicUserDataStore::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithDataStoreUnderPublicUserDataStore.GetDataStore
::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>* Oculus::Platform::MessageWithDataStoreUnderPublicUserDataStore::GetDataStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDataStoreUnderPublicUserDataStore::GetDataStore");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataStore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::Dictionary_2<::StringW, ::StringW>*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithDestinationList
#include "Oculus/Platform/MessageWithDestinationList.hpp"
// Including type: Oculus.Platform.Models.DestinationList
#include "Oculus/Platform/Models/DestinationList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithDestinationList.GetDataFromMessage
::Oculus::Platform::Models::DestinationList* Oculus::Platform::MessageWithDestinationList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDestinationList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::DestinationList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithDestinationList.GetDestinationList
::Oculus::Platform::Models::DestinationList* Oculus::Platform::MessageWithDestinationList::GetDestinationList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithDestinationList::GetDestinationList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDestinationList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::DestinationList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithGroupPresenceJoinIntent
#include "Oculus/Platform/MessageWithGroupPresenceJoinIntent.hpp"
// Including type: Oculus.Platform.Models.GroupPresenceJoinIntent
#include "Oculus/Platform/Models/GroupPresenceJoinIntent.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithGroupPresenceJoinIntent.GetDataFromMessage
::Oculus::Platform::Models::GroupPresenceJoinIntent* Oculus::Platform::MessageWithGroupPresenceJoinIntent::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithGroupPresenceJoinIntent::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceJoinIntent*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithGroupPresenceJoinIntent.GetGroupPresenceJoinIntent
::Oculus::Platform::Models::GroupPresenceJoinIntent* Oculus::Platform::MessageWithGroupPresenceJoinIntent::GetGroupPresenceJoinIntent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithGroupPresenceJoinIntent::GetGroupPresenceJoinIntent");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroupPresenceJoinIntent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceJoinIntent*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithGroupPresenceLeaveIntent
#include "Oculus/Platform/MessageWithGroupPresenceLeaveIntent.hpp"
// Including type: Oculus.Platform.Models.GroupPresenceLeaveIntent
#include "Oculus/Platform/Models/GroupPresenceLeaveIntent.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithGroupPresenceLeaveIntent.GetDataFromMessage
::Oculus::Platform::Models::GroupPresenceLeaveIntent* Oculus::Platform::MessageWithGroupPresenceLeaveIntent::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithGroupPresenceLeaveIntent::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceLeaveIntent*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithGroupPresenceLeaveIntent.GetGroupPresenceLeaveIntent
::Oculus::Platform::Models::GroupPresenceLeaveIntent* Oculus::Platform::MessageWithGroupPresenceLeaveIntent::GetGroupPresenceLeaveIntent() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithGroupPresenceLeaveIntent::GetGroupPresenceLeaveIntent");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroupPresenceLeaveIntent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::GroupPresenceLeaveIntent*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithInstalledApplicationList
#include "Oculus/Platform/MessageWithInstalledApplicationList.hpp"
// Including type: Oculus.Platform.Models.InstalledApplicationList
#include "Oculus/Platform/Models/InstalledApplicationList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithInstalledApplicationList.GetDataFromMessage
::Oculus::Platform::Models::InstalledApplicationList* Oculus::Platform::MessageWithInstalledApplicationList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithInstalledApplicationList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InstalledApplicationList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithInstalledApplicationList.GetInstalledApplicationList
::Oculus::Platform::Models::InstalledApplicationList* Oculus::Platform::MessageWithInstalledApplicationList::GetInstalledApplicationList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithInstalledApplicationList::GetInstalledApplicationList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetInstalledApplicationList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InstalledApplicationList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithInvitePanelResultInfo
#include "Oculus/Platform/MessageWithInvitePanelResultInfo.hpp"
// Including type: Oculus.Platform.Models.InvitePanelResultInfo
#include "Oculus/Platform/Models/InvitePanelResultInfo.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithInvitePanelResultInfo.GetDataFromMessage
::Oculus::Platform::Models::InvitePanelResultInfo* Oculus::Platform::MessageWithInvitePanelResultInfo::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithInvitePanelResultInfo::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InvitePanelResultInfo*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithInvitePanelResultInfo.GetInvitePanelResultInfo
::Oculus::Platform::Models::InvitePanelResultInfo* Oculus::Platform::MessageWithInvitePanelResultInfo::GetInvitePanelResultInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithInvitePanelResultInfo::GetInvitePanelResultInfo");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetInvitePanelResultInfo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::InvitePanelResultInfo*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLaunchBlockFlowResult
#include "Oculus/Platform/MessageWithLaunchBlockFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchBlockFlowResult
#include "Oculus/Platform/Models/LaunchBlockFlowResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLaunchBlockFlowResult.GetDataFromMessage
::Oculus::Platform::Models::LaunchBlockFlowResult* Oculus::Platform::MessageWithLaunchBlockFlowResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchBlockFlowResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchBlockFlowResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLaunchBlockFlowResult.GetLaunchBlockFlowResult
::Oculus::Platform::Models::LaunchBlockFlowResult* Oculus::Platform::MessageWithLaunchBlockFlowResult::GetLaunchBlockFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchBlockFlowResult::GetLaunchBlockFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchBlockFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchBlockFlowResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLaunchFriendRequestFlowResult
#include "Oculus/Platform/MessageWithLaunchFriendRequestFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchFriendRequestFlowResult
#include "Oculus/Platform/Models/LaunchFriendRequestFlowResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLaunchFriendRequestFlowResult.GetDataFromMessage
::Oculus::Platform::Models::LaunchFriendRequestFlowResult* Oculus::Platform::MessageWithLaunchFriendRequestFlowResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchFriendRequestFlowResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchFriendRequestFlowResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLaunchFriendRequestFlowResult.GetLaunchFriendRequestFlowResult
::Oculus::Platform::Models::LaunchFriendRequestFlowResult* Oculus::Platform::MessageWithLaunchFriendRequestFlowResult::GetLaunchFriendRequestFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchFriendRequestFlowResult::GetLaunchFriendRequestFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchFriendRequestFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchFriendRequestFlowResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLaunchInvitePanelFlowResult
#include "Oculus/Platform/MessageWithLaunchInvitePanelFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchInvitePanelFlowResult
#include "Oculus/Platform/Models/LaunchInvitePanelFlowResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLaunchInvitePanelFlowResult.GetDataFromMessage
::Oculus::Platform::Models::LaunchInvitePanelFlowResult* Oculus::Platform::MessageWithLaunchInvitePanelFlowResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchInvitePanelFlowResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchInvitePanelFlowResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLaunchInvitePanelFlowResult.GetLaunchInvitePanelFlowResult
::Oculus::Platform::Models::LaunchInvitePanelFlowResult* Oculus::Platform::MessageWithLaunchInvitePanelFlowResult::GetLaunchInvitePanelFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchInvitePanelFlowResult::GetLaunchInvitePanelFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchInvitePanelFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchInvitePanelFlowResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLaunchReportFlowResult
#include "Oculus/Platform/MessageWithLaunchReportFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchReportFlowResult
#include "Oculus/Platform/Models/LaunchReportFlowResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLaunchReportFlowResult.GetDataFromMessage
::Oculus::Platform::Models::LaunchReportFlowResult* Oculus::Platform::MessageWithLaunchReportFlowResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchReportFlowResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchReportFlowResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLaunchReportFlowResult.GetLaunchReportFlowResult
::Oculus::Platform::Models::LaunchReportFlowResult* Oculus::Platform::MessageWithLaunchReportFlowResult::GetLaunchReportFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchReportFlowResult::GetLaunchReportFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchReportFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchReportFlowResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLaunchUnblockFlowResult
#include "Oculus/Platform/MessageWithLaunchUnblockFlowResult.hpp"
// Including type: Oculus.Platform.Models.LaunchUnblockFlowResult
#include "Oculus/Platform/Models/LaunchUnblockFlowResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLaunchUnblockFlowResult.GetDataFromMessage
::Oculus::Platform::Models::LaunchUnblockFlowResult* Oculus::Platform::MessageWithLaunchUnblockFlowResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchUnblockFlowResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchUnblockFlowResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLaunchUnblockFlowResult.GetLaunchUnblockFlowResult
::Oculus::Platform::Models::LaunchUnblockFlowResult* Oculus::Platform::MessageWithLaunchUnblockFlowResult::GetLaunchUnblockFlowResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLaunchUnblockFlowResult::GetLaunchUnblockFlowResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLaunchUnblockFlowResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LaunchUnblockFlowResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLeaderboardList
#include "Oculus/Platform/MessageWithLeaderboardList.hpp"
// Including type: Oculus.Platform.Models.LeaderboardList
#include "Oculus/Platform/Models/LeaderboardList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLeaderboardList.GetDataFromMessage
::Oculus::Platform::Models::LeaderboardList* Oculus::Platform::MessageWithLeaderboardList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLeaderboardList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLeaderboardList.GetLeaderboardList
::Oculus::Platform::Models::LeaderboardList* Oculus::Platform::MessageWithLeaderboardList::GetLeaderboardList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLeaderboardList::GetLeaderboardList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLeaderboardList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLeaderboardEntryList
#include "Oculus/Platform/MessageWithLeaderboardEntryList.hpp"
// Including type: Oculus.Platform.Models.LeaderboardEntryList
#include "Oculus/Platform/Models/LeaderboardEntryList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLeaderboardEntryList.GetDataFromMessage
::Oculus::Platform::Models::LeaderboardEntryList* Oculus::Platform::MessageWithLeaderboardEntryList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLeaderboardEntryList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardEntryList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLeaderboardEntryList.GetLeaderboardEntryList
::Oculus::Platform::Models::LeaderboardEntryList* Oculus::Platform::MessageWithLeaderboardEntryList::GetLeaderboardEntryList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLeaderboardEntryList::GetLeaderboardEntryList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLeaderboardEntryList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LeaderboardEntryList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLinkedAccountList
#include "Oculus/Platform/MessageWithLinkedAccountList.hpp"
// Including type: Oculus.Platform.Models.LinkedAccountList
#include "Oculus/Platform/Models/LinkedAccountList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLinkedAccountList.GetDataFromMessage
::Oculus::Platform::Models::LinkedAccountList* Oculus::Platform::MessageWithLinkedAccountList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLinkedAccountList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LinkedAccountList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLinkedAccountList.GetLinkedAccountList
::Oculus::Platform::Models::LinkedAccountList* Oculus::Platform::MessageWithLinkedAccountList::GetLinkedAccountList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLinkedAccountList::GetLinkedAccountList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLinkedAccountList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LinkedAccountList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLivestreamingApplicationStatus
#include "Oculus/Platform/MessageWithLivestreamingApplicationStatus.hpp"
// Including type: Oculus.Platform.Models.LivestreamingApplicationStatus
#include "Oculus/Platform/Models/LivestreamingApplicationStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingApplicationStatus.GetDataFromMessage
::Oculus::Platform::Models::LivestreamingApplicationStatus* Oculus::Platform::MessageWithLivestreamingApplicationStatus::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingApplicationStatus::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingApplicationStatus*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingApplicationStatus.GetLivestreamingApplicationStatus
::Oculus::Platform::Models::LivestreamingApplicationStatus* Oculus::Platform::MessageWithLivestreamingApplicationStatus::GetLivestreamingApplicationStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingApplicationStatus::GetLivestreamingApplicationStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingApplicationStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingApplicationStatus*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLivestreamingStartResult
#include "Oculus/Platform/MessageWithLivestreamingStartResult.hpp"
// Including type: Oculus.Platform.Models.LivestreamingStartResult
#include "Oculus/Platform/Models/LivestreamingStartResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingStartResult.GetDataFromMessage
::Oculus::Platform::Models::LivestreamingStartResult* Oculus::Platform::MessageWithLivestreamingStartResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingStartResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStartResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingStartResult.GetLivestreamingStartResult
::Oculus::Platform::Models::LivestreamingStartResult* Oculus::Platform::MessageWithLivestreamingStartResult::GetLivestreamingStartResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingStartResult::GetLivestreamingStartResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingStartResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStartResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLivestreamingStatus
#include "Oculus/Platform/MessageWithLivestreamingStatus.hpp"
// Including type: Oculus.Platform.Models.LivestreamingStatus
#include "Oculus/Platform/Models/LivestreamingStatus.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingStatus.GetDataFromMessage
::Oculus::Platform::Models::LivestreamingStatus* Oculus::Platform::MessageWithLivestreamingStatus::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingStatus::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStatus*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingStatus.GetLivestreamingStatus
::Oculus::Platform::Models::LivestreamingStatus* Oculus::Platform::MessageWithLivestreamingStatus::GetLivestreamingStatus() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingStatus::GetLivestreamingStatus");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingStatus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingStatus*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithLivestreamingVideoStats
#include "Oculus/Platform/MessageWithLivestreamingVideoStats.hpp"
// Including type: Oculus.Platform.Models.LivestreamingVideoStats
#include "Oculus/Platform/Models/LivestreamingVideoStats.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingVideoStats.GetDataFromMessage
::Oculus::Platform::Models::LivestreamingVideoStats* Oculus::Platform::MessageWithLivestreamingVideoStats::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingVideoStats::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingVideoStats*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithLivestreamingVideoStats.GetLivestreamingVideoStats
::Oculus::Platform::Models::LivestreamingVideoStats* Oculus::Platform::MessageWithLivestreamingVideoStats::GetLivestreamingVideoStats() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithLivestreamingVideoStats::GetLivestreamingVideoStats");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetLivestreamingVideoStats", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::LivestreamingVideoStats*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithMatchmakingAdminSnapshot
#include "Oculus/Platform/MessageWithMatchmakingAdminSnapshot.hpp"
// Including type: Oculus.Platform.Models.MatchmakingAdminSnapshot
#include "Oculus/Platform/Models/MatchmakingAdminSnapshot.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingAdminSnapshot.GetDataFromMessage
::Oculus::Platform::Models::MatchmakingAdminSnapshot* Oculus::Platform::MessageWithMatchmakingAdminSnapshot::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingAdminSnapshot::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingAdminSnapshot*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingAdminSnapshot.GetMatchmakingAdminSnapshot
::Oculus::Platform::Models::MatchmakingAdminSnapshot* Oculus::Platform::MessageWithMatchmakingAdminSnapshot::GetMatchmakingAdminSnapshot() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingAdminSnapshot::GetMatchmakingAdminSnapshot");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingAdminSnapshot", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingAdminSnapshot*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithMatchmakingEnqueueResult
#include "Oculus/Platform/MessageWithMatchmakingEnqueueResult.hpp"
// Including type: Oculus.Platform.Models.MatchmakingEnqueueResult
#include "Oculus/Platform/Models/MatchmakingEnqueueResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingEnqueueResult.GetDataFromMessage
::Oculus::Platform::Models::MatchmakingEnqueueResult* Oculus::Platform::MessageWithMatchmakingEnqueueResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingEnqueueResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingEnqueueResult.GetMatchmakingEnqueueResult
::Oculus::Platform::Models::MatchmakingEnqueueResult* Oculus::Platform::MessageWithMatchmakingEnqueueResult::GetMatchmakingEnqueueResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingEnqueueResult::GetMatchmakingEnqueueResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingEnqueueResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithMatchmakingEnqueueResultAndRoom
#include "Oculus/Platform/MessageWithMatchmakingEnqueueResultAndRoom.hpp"
// Including type: Oculus.Platform.Models.MatchmakingEnqueueResultAndRoom
#include "Oculus/Platform/Models/MatchmakingEnqueueResultAndRoom.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingEnqueueResultAndRoom.GetDataFromMessage
::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom* Oculus::Platform::MessageWithMatchmakingEnqueueResultAndRoom::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingEnqueueResultAndRoom::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingEnqueueResultAndRoom.GetMatchmakingEnqueueResultAndRoom
::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom* Oculus::Platform::MessageWithMatchmakingEnqueueResultAndRoom::GetMatchmakingEnqueueResultAndRoom() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingEnqueueResultAndRoom::GetMatchmakingEnqueueResultAndRoom");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingEnqueueResultAndRoom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingEnqueueResultAndRoom*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithMatchmakingStatsUnderMatchmakingStats
#include "Oculus/Platform/MessageWithMatchmakingStatsUnderMatchmakingStats.hpp"
// Including type: Oculus.Platform.Models.MatchmakingStats
#include "Oculus/Platform/Models/MatchmakingStats.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingStatsUnderMatchmakingStats.GetDataFromMessage
::Oculus::Platform::Models::MatchmakingStats* Oculus::Platform::MessageWithMatchmakingStatsUnderMatchmakingStats::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingStatsUnderMatchmakingStats::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingStats*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithMatchmakingStatsUnderMatchmakingStats.GetMatchmakingStats
::Oculus::Platform::Models::MatchmakingStats* Oculus::Platform::MessageWithMatchmakingStatsUnderMatchmakingStats::GetMatchmakingStats() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMatchmakingStatsUnderMatchmakingStats::GetMatchmakingStats");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMatchmakingStats", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MatchmakingStats*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithMicrophoneAvailabilityState
#include "Oculus/Platform/MessageWithMicrophoneAvailabilityState.hpp"
// Including type: Oculus.Platform.Models.MicrophoneAvailabilityState
#include "Oculus/Platform/Models/MicrophoneAvailabilityState.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithMicrophoneAvailabilityState.GetDataFromMessage
::Oculus::Platform::Models::MicrophoneAvailabilityState* Oculus::Platform::MessageWithMicrophoneAvailabilityState::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMicrophoneAvailabilityState::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MicrophoneAvailabilityState*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithMicrophoneAvailabilityState.GetMicrophoneAvailabilityState
::Oculus::Platform::Models::MicrophoneAvailabilityState* Oculus::Platform::MessageWithMicrophoneAvailabilityState::GetMicrophoneAvailabilityState() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithMicrophoneAvailabilityState::GetMicrophoneAvailabilityState");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMicrophoneAvailabilityState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::MicrophoneAvailabilityState*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithNetSyncConnection
#include "Oculus/Platform/MessageWithNetSyncConnection.hpp"
// Including type: Oculus.Platform.Models.NetSyncConnection
#include "Oculus/Platform/Models/NetSyncConnection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithNetSyncConnection.GetDataFromMessage
::Oculus::Platform::Models::NetSyncConnection* Oculus::Platform::MessageWithNetSyncConnection::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncConnection::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncConnection*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithNetSyncConnection.GetNetSyncConnection
::Oculus::Platform::Models::NetSyncConnection* Oculus::Platform::MessageWithNetSyncConnection::GetNetSyncConnection() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncConnection::GetNetSyncConnection");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncConnection", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncConnection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithNetSyncSessionList
#include "Oculus/Platform/MessageWithNetSyncSessionList.hpp"
// Including type: Oculus.Platform.Models.NetSyncSessionList
#include "Oculus/Platform/Models/NetSyncSessionList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSessionList.GetDataFromMessage
::Oculus::Platform::Models::NetSyncSessionList* Oculus::Platform::MessageWithNetSyncSessionList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSessionList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSessionList.GetNetSyncSessionList
::Oculus::Platform::Models::NetSyncSessionList* Oculus::Platform::MessageWithNetSyncSessionList::GetNetSyncSessionList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSessionList::GetNetSyncSessionList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSessionList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithNetSyncSessionsChangedNotification
#include "Oculus/Platform/MessageWithNetSyncSessionsChangedNotification.hpp"
// Including type: Oculus.Platform.Models.NetSyncSessionsChangedNotification
#include "Oculus/Platform/Models/NetSyncSessionsChangedNotification.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSessionsChangedNotification.GetDataFromMessage
::Oculus::Platform::Models::NetSyncSessionsChangedNotification* Oculus::Platform::MessageWithNetSyncSessionsChangedNotification::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSessionsChangedNotification::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionsChangedNotification*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSessionsChangedNotification.GetNetSyncSessionsChangedNotification
::Oculus::Platform::Models::NetSyncSessionsChangedNotification* Oculus::Platform::MessageWithNetSyncSessionsChangedNotification::GetNetSyncSessionsChangedNotification() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSessionsChangedNotification::GetNetSyncSessionsChangedNotification");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSessionsChangedNotification", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSessionsChangedNotification*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithNetSyncSetSessionPropertyResult
#include "Oculus/Platform/MessageWithNetSyncSetSessionPropertyResult.hpp"
// Including type: Oculus.Platform.Models.NetSyncSetSessionPropertyResult
#include "Oculus/Platform/Models/NetSyncSetSessionPropertyResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSetSessionPropertyResult.GetDataFromMessage
::Oculus::Platform::Models::NetSyncSetSessionPropertyResult* Oculus::Platform::MessageWithNetSyncSetSessionPropertyResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSetSessionPropertyResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSetSessionPropertyResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithNetSyncSetSessionPropertyResult.GetNetSyncSetSessionPropertyResult
::Oculus::Platform::Models::NetSyncSetSessionPropertyResult* Oculus::Platform::MessageWithNetSyncSetSessionPropertyResult::GetNetSyncSetSessionPropertyResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncSetSessionPropertyResult::GetNetSyncSetSessionPropertyResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncSetSessionPropertyResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncSetSessionPropertyResult*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithNetSyncVoipAttenuationValueList
#include "Oculus/Platform/MessageWithNetSyncVoipAttenuationValueList.hpp"
// Including type: Oculus.Platform.Models.NetSyncVoipAttenuationValueList
#include "Oculus/Platform/Models/NetSyncVoipAttenuationValueList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithNetSyncVoipAttenuationValueList.GetDataFromMessage
::Oculus::Platform::Models::NetSyncVoipAttenuationValueList* Oculus::Platform::MessageWithNetSyncVoipAttenuationValueList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncVoipAttenuationValueList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncVoipAttenuationValueList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithNetSyncVoipAttenuationValueList.GetNetSyncVoipAttenuationValueList
::Oculus::Platform::Models::NetSyncVoipAttenuationValueList* Oculus::Platform::MessageWithNetSyncVoipAttenuationValueList::GetNetSyncVoipAttenuationValueList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithNetSyncVoipAttenuationValueList::GetNetSyncVoipAttenuationValueList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNetSyncVoipAttenuationValueList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::NetSyncVoipAttenuationValueList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithOrgScopedID
#include "Oculus/Platform/MessageWithOrgScopedID.hpp"
// Including type: Oculus.Platform.Models.OrgScopedID
#include "Oculus/Platform/Models/OrgScopedID.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithOrgScopedID.GetDataFromMessage
::Oculus::Platform::Models::OrgScopedID* Oculus::Platform::MessageWithOrgScopedID::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithOrgScopedID::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::OrgScopedID*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithOrgScopedID.GetOrgScopedID
::Oculus::Platform::Models::OrgScopedID* Oculus::Platform::MessageWithOrgScopedID::GetOrgScopedID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithOrgScopedID::GetOrgScopedID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetOrgScopedID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::OrgScopedID*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithParty
#include "Oculus/Platform/MessageWithParty.hpp"
// Including type: Oculus.Platform.Models.Party
#include "Oculus/Platform/Models/Party.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithParty.GetDataFromMessage
::Oculus::Platform::Models::Party* Oculus::Platform::MessageWithParty::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithParty::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Party*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithParty.GetParty
::Oculus::Platform::Models::Party* Oculus::Platform::MessageWithParty::GetParty() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithParty::GetParty");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetParty", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Party*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPartyUnderCurrentParty
#include "Oculus/Platform/MessageWithPartyUnderCurrentParty.hpp"
// Including type: Oculus.Platform.Models.Party
#include "Oculus/Platform/Models/Party.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPartyUnderCurrentParty.GetDataFromMessage
::Oculus::Platform::Models::Party* Oculus::Platform::MessageWithPartyUnderCurrentParty::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyUnderCurrentParty::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Party*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPartyUnderCurrentParty.GetParty
::Oculus::Platform::Models::Party* Oculus::Platform::MessageWithPartyUnderCurrentParty::GetParty() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyUnderCurrentParty::GetParty");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetParty", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Party*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPartyID
#include "Oculus/Platform/MessageWithPartyID.hpp"
// Including type: Oculus.Platform.Models.PartyID
#include "Oculus/Platform/Models/PartyID.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPartyID.GetDataFromMessage
::Oculus::Platform::Models::PartyID* Oculus::Platform::MessageWithPartyID::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyID::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyID*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPartyID.GetPartyID
::Oculus::Platform::Models::PartyID* Oculus::Platform::MessageWithPartyID::GetPartyID() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyID::GetPartyID");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPartyID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyID*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPartyUpdateNotification
#include "Oculus/Platform/MessageWithPartyUpdateNotification.hpp"
// Including type: Oculus.Platform.Models.PartyUpdateNotification
#include "Oculus/Platform/Models/PartyUpdateNotification.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPartyUpdateNotification.GetDataFromMessage
::Oculus::Platform::Models::PartyUpdateNotification* Oculus::Platform::MessageWithPartyUpdateNotification::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyUpdateNotification::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyUpdateNotification*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPartyUpdateNotification.GetPartyUpdateNotification
::Oculus::Platform::Models::PartyUpdateNotification* Oculus::Platform::MessageWithPartyUpdateNotification::GetPartyUpdateNotification() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPartyUpdateNotification::GetPartyUpdateNotification");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPartyUpdateNotification", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PartyUpdateNotification*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPidList
#include "Oculus/Platform/MessageWithPidList.hpp"
// Including type: Oculus.Platform.Models.PidList
#include "Oculus/Platform/Models/PidList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPidList.GetDataFromMessage
::Oculus::Platform::Models::PidList* Oculus::Platform::MessageWithPidList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPidList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PidList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPidList.GetPidList
::Oculus::Platform::Models::PidList* Oculus::Platform::MessageWithPidList::GetPidList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPidList::GetPidList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPidList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PidList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithProductList
#include "Oculus/Platform/MessageWithProductList.hpp"
// Including type: Oculus.Platform.Models.ProductList
#include "Oculus/Platform/Models/ProductList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithProductList.GetDataFromMessage
::Oculus::Platform::Models::ProductList* Oculus::Platform::MessageWithProductList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithProductList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ProductList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithProductList.GetProductList
::Oculus::Platform::Models::ProductList* Oculus::Platform::MessageWithProductList::GetProductList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithProductList::GetProductList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetProductList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::ProductList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPurchase
#include "Oculus/Platform/MessageWithPurchase.hpp"
// Including type: Oculus.Platform.Models.Purchase
#include "Oculus/Platform/Models/Purchase.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPurchase.GetDataFromMessage
::Oculus::Platform::Models::Purchase* Oculus::Platform::MessageWithPurchase::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPurchase::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Purchase*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPurchase.GetPurchase
::Oculus::Platform::Models::Purchase* Oculus::Platform::MessageWithPurchase::GetPurchase() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPurchase::GetPurchase");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPurchase", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::Purchase*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithPurchaseList
#include "Oculus/Platform/MessageWithPurchaseList.hpp"
// Including type: Oculus.Platform.Models.PurchaseList
#include "Oculus/Platform/Models/PurchaseList.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithPurchaseList.GetDataFromMessage
::Oculus::Platform::Models::PurchaseList* Oculus::Platform::MessageWithPurchaseList::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPurchaseList::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PurchaseList*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithPurchaseList.GetPurchaseList
::Oculus::Platform::Models::PurchaseList* Oculus::Platform::MessageWithPurchaseList::GetPurchaseList() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithPurchaseList::GetPurchaseList");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetPurchaseList", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::PurchaseList*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: Oculus.Platform.MessageWithRejoinDialogResult
#include "Oculus/Platform/MessageWithRejoinDialogResult.hpp"
// Including type: Oculus.Platform.Models.RejoinDialogResult
#include "Oculus/Platform/Models/RejoinDialogResult.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: Oculus.Platform.MessageWithRejoinDialogResult.GetDataFromMessage
::Oculus::Platform::Models::RejoinDialogResult* Oculus::Platform::MessageWithRejoinDialogResult::GetDataFromMessage(::System::IntPtr c_message) {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithRejoinDialogResult::GetDataFromMessage");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDataFromMessage", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(c_message)})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RejoinDialogResult*, false>(this, ___internal__method, c_message);
}
// Autogenerated method: Oculus.Platform.MessageWithRejoinDialogResult.GetRejoinDialogResult
::Oculus::Platform::Models::RejoinDialogResult* Oculus::Platform::MessageWithRejoinDialogResult::GetRejoinDialogResult() {
static auto ___internal__logger = ::Logger::get().WithContext("::Oculus::Platform::MessageWithRejoinDialogResult::GetRejoinDialogResult");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetRejoinDialogResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Oculus::Platform::Models::RejoinDialogResult*, false>(this, ___internal__method);
}
| 85.812854 | 397 | 0.793995 | RedBrumbler |
1de9dd987a17339e6f578ef51e50b69b9fcaae31 | 529 | hpp | C++ | include/jln/mp/smp/functional/eval.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 9 | 2020-07-04T16:46:13.000Z | 2022-01-09T21:59:31.000Z | include/jln/mp/smp/functional/eval.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | null | null | null | include/jln/mp/smp/functional/eval.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 1 | 2021-05-23T13:37:40.000Z | 2021-05-23T13:37:40.000Z | #pragma once
#include <jln/mp/smp/contract.hpp>
#include <jln/mp/functional/eval.hpp>
#ifdef __cpp_nontype_template_parameter_class
#if __cpp_nontype_template_parameter_class >= 201806L
namespace jln::mp::smp
{
template <auto F, class C = identity>
using eval = try_contract<mp::eval<F, assume_unary<C>>>;
}
/// \cond
namespace jln::mp::detail
{
template<template<class> class sfinae, auto F, class C>
struct _sfinae<sfinae, eval<F, C>>
{
using type = smp::eval<F, sfinae<C>>;
};
}
/// \endcond
#endif
#endif
| 19.592593 | 58 | 0.705104 | jonathanpoelen |
1de9e7aad58c391fbbe3ed91f99ca089063c818d | 3,640 | cpp | C++ | apps/Sync/main.cpp | scivis-exhibitions/OpenSpace | 5b69cf45f110354ecf3bdbcee8cf9d2c75b07e9e | [
"MIT"
] | 489 | 2015-07-14T22:23:10.000Z | 2022-03-30T07:59:47.000Z | apps/Sync/main.cpp | scivis-exhibitions/OpenSpace | 5b69cf45f110354ecf3bdbcee8cf9d2c75b07e9e | [
"MIT"
] | 1,575 | 2016-07-12T18:10:22.000Z | 2022-03-31T20:12:55.000Z | apps/Sync/main.cpp | scivis-exhibitions/OpenSpace | 5b69cf45f110354ecf3bdbcee8cf9d2c75b07e9e | [
"MIT"
] | 101 | 2016-03-01T02:22:01.000Z | 2022-02-25T15:36:27.000Z | /*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2021 *
* *
* 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 <openspace/engine/openspaceengine.h>
#include <openspace/engine/moduleengine.h>
#include <openspace/engine/windowdelegate.h>
#include <openspace/engine/configuration.h>
#include <openspace/util/factorymanager.h>
#include <openspace/engine/globals.h>
#include <openspace/util/progressbar.h>
#include <openspace/util/resourcesynchronization.h>
#include <openspace/util/task.h>
#include <openspace/util/taskloader.h>
#include <ghoul/fmt.h>
#include <ghoul/ghoul.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/logging/consolelog.h>
int main(int, char**) {
using namespace openspace;
ghoul::initialize();
std::string configFile = configuration::findConfiguration();
global::configuration = configuration::loadConfigurationFromFile(configFile);
global::openSpaceEngine.initialize();
TaskLoader taskLoader;
std::vector<std::unique_ptr<Task>> tasks = taskLoader.tasksFromFile(
absPath("${TASKS}/full_sync.task")
);
for (size_t i = 0; i < tasks.size(); i++) {
Task& task = *tasks[i].get();
LINFOC(
"Sync",
fmt::format(
"Synchronizing scene {} out of {}: {}",
i + 1, tasks.size(), task.description()
)
);
ProgressBar progressBar(100);
task.perform([&progressBar](float progress) {
progressBar.print(static_cast<int>(progress * 100.f));
});
}
std::cout << "Done synchronizing." << std::endl;
return 0;
};
| 48.533333 | 90 | 0.513187 | scivis-exhibitions |
1deb7cae452e6fd0b8f53771c9c0147ffae65d09 | 2,223 | cpp | C++ | remote/rtRemoteAsyncHandle.cpp | madanwork/pxcore-local | c08e9b7a8b675bab71f6c0771c03f8e416cc9545 | [
"Apache-2.0"
] | null | null | null | remote/rtRemoteAsyncHandle.cpp | madanwork/pxcore-local | c08e9b7a8b675bab71f6c0771c03f8e416cc9545 | [
"Apache-2.0"
] | null | null | null | remote/rtRemoteAsyncHandle.cpp | madanwork/pxcore-local | c08e9b7a8b675bab71f6c0771c03f8e416cc9545 | [
"Apache-2.0"
] | null | null | null | #include "rtRemoteAsyncHandle.h"
#include "rtRemoteEnvironment.h"
#include "rtRemoteMessage.h"
#include "rtRemoteConfig.h"
rtRemoteAsyncHandle::rtRemoteAsyncHandle(rtRemoteEnvironment* env, rtRemoteCorrelationKey k)
: m_env(env)
, m_key(k)
, m_error(RT_ERROR_IN_PROGRESS)
{
RT_ASSERT(m_key != rtGuid::null());
m_env->registerResponseHandler(&rtRemoteAsyncHandle::onResponseHandler_Dispatch,
this, m_key);
}
rtRemoteAsyncHandle::~rtRemoteAsyncHandle()
{
if (m_key != kInvalidCorrelationKey)
m_env->removeResponseHandler(m_key);
}
rtError
rtRemoteAsyncHandle::onResponseHandler(std::shared_ptr<rtRemoteClient>& /*client*/,
rtRemoteMessagePtr const& doc)
{
complete(doc, RT_OK);
return RT_OK;
}
rtError
rtRemoteAsyncHandle::wait(uint32_t timeoutInMilliseconds)
{
if (m_error != RT_ERROR_IN_PROGRESS)
return m_error;
if (timeoutInMilliseconds == 0)
timeoutInMilliseconds = m_env->Config->environment_request_timeout();
rtError e = RT_OK;
if (!m_env->Config->server_use_dispatch_thread())
{
time_t timeout = time(nullptr) + ((timeoutInMilliseconds+500) / 1000);
e = m_error = RT_ERROR_TIMEOUT;
while (timeout > time(nullptr))
{
rtRemoteCorrelationKey k = kInvalidCorrelationKey;
rtLogDebug("Waiting for item with key = %s", m_key.toString().c_str());
e = m_env->processSingleWorkItem(std::chrono::milliseconds(timeoutInMilliseconds), true, &k);
rtLogDebug("Got response with key = %s, m_error = %d, error = %d", k.toString().c_str(), m_error, e);
if ( (e == RT_OK) && ((m_error == RT_OK) || (k == m_key)) )
{
rtLogDebug("Got successful response: m_key = %s, key = %s, m_error = %d",
m_key.toString().c_str(), k.toString().c_str(), m_error);
m_env->removeResponseHandler(m_key);
m_key = kInvalidCorrelationKey;
e = m_error = RT_OK;
break;
}
}
}
else
{
e = m_env->waitForResponse(std::chrono::milliseconds(timeoutInMilliseconds), m_key);
}
return e;
}
void
rtRemoteAsyncHandle::complete(rtRemoteMessagePtr const& doc, rtError e)
{
m_doc = doc;
m_error = e;
}
rtRemoteMessagePtr
rtRemoteAsyncHandle::response() const
{
return m_doc;
}
| 25.848837 | 107 | 0.690958 | madanwork |
1df515b9eaed81ac759569276fa08a03c7f2a7ec | 5,682 | cpp | C++ | RegNRecon/jly_main.cpp | MrJia1997/RenderKinect | 6cc6d6a56ce6a925920e155db5aa6f5239c563e8 | [
"MIT"
] | null | null | null | RegNRecon/jly_main.cpp | MrJia1997/RenderKinect | 6cc6d6a56ce6a925920e155db5aa6f5239c563e8 | [
"MIT"
] | null | null | null | RegNRecon/jly_main.cpp | MrJia1997/RenderKinect | 6cc6d6a56ce6a925920e155db5aa6f5239c563e8 | [
"MIT"
] | null | null | null | /********************************************************************
Main Function for point cloud registration with Go-ICP Algorithm
Last modified: Feb 13, 2014
"Go-ICP: Solving 3D Registration Efficiently and Globally Optimally"
Jiaolong Yang, Hongdong Li, Yunde Jia
International Conference on Computer Vision (ICCV), 2013
Copyright (C) 2013 Jiaolong Yang (BIT and ANU)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include <time.h>
#include <iostream>
#include <fstream>
using namespace std;
#include "jly_goicp.h"
#include "ConfigMap.hpp"
#define DEFAULT_OUTPUT_FNAME "output.txt"
#define DEFAULT_CONFIG_FNAME "config.txt"
#define DEFAULT_MODEL_FNAME "model.txt"
#define DEFAULT_DATA_FNAME "data.txt"
void parseInput(int argc, char **argv, string & modelFName, string & dataFName, int & NdDownsampled, string & configFName, string & outputFName);
void readConfig(string FName, GoICP & goicp);
int loadPointCloud(string FName, int & N, POINT3D ** p);
int main(int argc, char** argv)
{
int Nm, Nd, NdDownsampled;
clock_t clockBegin, clockEnd;
string modelFName, dataFName, configFName, outputFname;
POINT3D * pModel, * pData;
GoICP goicp;
parseInput(argc, argv, modelFName, dataFName, NdDownsampled, configFName, outputFname);
readConfig(configFName, goicp);
// Load model and data point clouds
loadPointCloud(modelFName, Nm, pModel);
loadPointCloud(dataFName, Nd, pData);
goicp.pModel = pModel;
goicp.Nm = Nm;
goicp.pData = pData;
goicp.Nd = Nd;
// Build Distance Transform
cout << "Building Distance Transform..." << flush;
clockBegin = clock();
goicp.BuildDT();
clockEnd = clock();
cout << (double)(clockEnd - clockBegin)/CLOCKS_PER_SEC << "s (CPU)" << endl;
// Run GO-ICP
if(NdDownsampled > 0)
{
goicp.Nd = NdDownsampled; // Only use first NdDownsampled data points (assumes data points are randomly ordered)
}
cout << "Model ID: " << modelFName << " (" << goicp.Nm << "), Data ID: " << dataFName << " (" << goicp.Nd << ")" << endl;
cout << "Registering..." << endl;
clockBegin = clock();
goicp.Register();
clockEnd = clock();
double time = (double)(clockEnd - clockBegin)/CLOCKS_PER_SEC;
cout << "Optimal Rotation Matrix:" << endl;
cout << goicp.optR << endl;
cout << "Optimal Translation Vector:" << endl;
cout << goicp.optT << endl;
cout << "Finished in " << time << endl;
ofstream ofile;
ofile.open(outputFname.c_str(), ofstream::out);
ofile << time << endl;
ofile << goicp.optR << endl;
ofile << goicp.optT << endl;
ofile.close();
delete(pModel);
delete(pData);
return 0;
}
void parseInput(int argc, char **argv, string & modelFName, string & dataFName, int & NdDownsampled, string & configFName, string & outputFName)
{
// Set default values
modelFName = DEFAULT_MODEL_FNAME;
dataFName = DEFAULT_DATA_FNAME;
configFName = DEFAULT_CONFIG_FNAME;
outputFName = DEFAULT_OUTPUT_FNAME;
NdDownsampled = 0; // No downsampling
//cout << endl;
//cout << "USAGE:" << "./GOICP <MODEL FILENAME> <DATA FILENAME> <NUM DOWNSAMPLED DATA POINTS> <CONFIG FILENAME> <OUTPUT FILENAME>" << endl;
//cout << endl;
if(argc > 5)
{
outputFName = argv[5];
}
if(argc > 4)
{
configFName = argv[4];
}
if(argc > 3)
{
NdDownsampled = atoi(argv[3]);
}
if(argc > 2)
{
dataFName = argv[2];
}
if(argc > 1)
{
modelFName = argv[1];
}
cout << "INPUT:" << endl;
cout << "(modelFName)->(" << modelFName << ")" << endl;
cout << "(dataFName)->(" << dataFName << ")" << endl;
cout << "(NdDownsampled)->(" << NdDownsampled << ")" << endl;
cout << "(configFName)->(" << configFName << ")" << endl;
cout << "(outputFName)->(" << outputFName << ")" << endl;
cout << endl;
}
void readConfig(string FName, GoICP & goicp)
{
// Open and parse the associated config file
ConfigMap config(FName.c_str());
goicp.MSEThresh = config.getF("MSEThresh");
goicp.initNodeRot.a = config.getF("rotMinX");
goicp.initNodeRot.b = config.getF("rotMinY");
goicp.initNodeRot.c = config.getF("rotMinZ");
goicp.initNodeRot.w = config.getF("rotWidth");
goicp.initNodeTrans.x = config.getF("transMinX");
goicp.initNodeTrans.y = config.getF("transMinY");
goicp.initNodeTrans.z = config.getF("transMinZ");
goicp.initNodeTrans.w = config.getF("transWidth");
goicp.trimFraction = config.getF("trimFraction");
// If < 0.1% trimming specified, do no trimming
if(goicp.trimFraction < 0.001)
{
goicp.doTrim = false;
}
goicp.dt.SIZE = config.getI("distTransSize");
goicp.dt.expandFactor = config.getF("distTransExpandFactor");
cout << "CONFIG:" << endl;
config.print();
//cout << "(doTrim)->(" << goicp.doTrim << ")" << endl;
cout << endl;
}
int loadPointCloud(string FName, int & N, POINT3D * &p)
{
int i;
ifstream ifile;
ifile.open(FName.c_str(), ifstream::in);
if(!ifile.is_open())
{
cout << "Unable to open point file '" << FName << "'" << endl;
exit(-1);
}
ifile >> N; // First line has number of points to follow
p = (POINT3D *)malloc(sizeof(POINT3D) * N);
for(i = 0; i < N; i++)
{
ifile >> p[i].x >> p[i].y >> p[i].z;
}
ifile.close();
return 0;
}
| 29.440415 | 145 | 0.666491 | MrJia1997 |
1df714549c028f535dae6614b37f8018cef9829f | 10,288 | cpp | C++ | die-tk/linux/ConvertersX11.cpp | thinlizzy/die-tk | eba597d9453318b03e44f15753323be80ecb3a4e | [
"Artistic-2.0"
] | 11 | 2015-11-06T01:35:35.000Z | 2021-05-01T18:34:50.000Z | die-tk/linux/ConvertersX11.cpp | thinlizzy/die-tk | eba597d9453318b03e44f15753323be80ecb3a4e | [
"Artistic-2.0"
] | null | null | null | die-tk/linux/ConvertersX11.cpp | thinlizzy/die-tk | eba597d9453318b03e44f15753323be80ecb3a4e | [
"Artistic-2.0"
] | 2 | 2017-07-06T16:05:51.000Z | 2019-07-04T01:17:15.000Z | #include "ConvertersX11.h"
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include "ResourceManager.h"
#define XES(et) case et: return #et
namespace tk {
std::string xEventToStr(int eventType)
{
switch(eventType) {
case 0: return "error?";
case 1: return "reply?";
XES(KeyPress);
XES(KeyRelease);
XES(ButtonPress);
XES(ButtonRelease);
XES(MotionNotify);
XES(EnterNotify);
XES(LeaveNotify);
XES(FocusIn);
XES(FocusOut);
XES(KeymapNotify);
XES(Expose);
XES(GraphicsExpose);
XES(NoExpose);
XES(VisibilityNotify);
XES(CreateNotify);
XES(DestroyNotify);
XES(UnmapNotify);
XES(MapNotify);
XES(MapRequest);
XES(ReparentNotify);
XES(ConfigureNotify);
XES(ConfigureRequest);
XES(GravityNotify);
XES(ResizeRequest);
XES(CirculateNotify);
XES(CirculateRequest);
XES(PropertyNotify);
XES(SelectionClear);
XES(SelectionRequest);
XES(SelectionNotify);
XES(ColormapNotify);
XES(ClientMessage);
XES(MappingNotify);
XES(GenericEvent);
}
return "unknown event " + std::to_string(eventType);
}
MouseEvent toMouseEvent(XButtonEvent event)
{
MouseEvent result;
switch(event.button) {
case Button1:
result.button = MouseButton::left;
break;
case Button2:
result.button = MouseButton::middle;
break;
case Button3:
result.button = MouseButton::right;
break;
case Button4:
result.button = MouseButton::extra1;
break;
case Button5:
result.button = MouseButton::extra2;
break;
default:
result.button = {};
}
result.controlPressed = event.state & ControlMask;
result.shiftPressed = event.state & ShiftMask;
return result;
}
unsigned int toShape(Cursor cursor)
{
switch(cursor) {
case Cursor::defaultCursor: return None;
case Cursor::arrow: return XC_left_ptr;
case Cursor::wait: return XC_watch;
case Cursor::smallwait: return XC_clock; // argh
case Cursor::hand: return XC_hand2;
case Cursor::edit: return XC_xterm;
case Cursor::help: return XC_question_arrow;
case Cursor::cross: return XC_crosshair;
}
return None;
}
unsigned long rgb32(RGBColor const & color)
{
return (0xFFU << 24) | (color.r << 16) | (color.g << 8) | color.b;
}
WindowKey fromKeySym(KeySym keySym)
{
switch(keySym) {
case XK_Escape: return k_ESCAPE;
case XK_space: return k_SPACE;
case XK_BackSpace: return k_BACKSPACE;
case XK_Tab: return k_TAB;
case XK_Return: return k_RETURN_BIG;
case XK_KP_Enter: return k_RETURN_SMALL;
case XK_Insert: return k_INSERT;
case XK_Delete: return k_DELETE;
case XK_Home: return k_HOME;
case XK_End: return k_END;
case XK_Prior: return k_PAGEUP;
case XK_Next: return k_PAGEDOWN;
case XK_Up: return k_UP;
case XK_Down: return k_DOWN;
case XK_Left: return k_LEFT;
case XK_Right: return k_RIGHT;
case XK_Shift_L: return k_SHIFT_L;
case XK_Shift_R: return k_SHIFT_R;
case XK_Control_L: return k_CONTROL_L;
case XK_Control_R: return k_CONTROL_R;
case XK_Alt_L: return k_ALT_L;
case XK_Alt_R: return k_ALT_R;
case XK_Pause: return k_PAUSE;
case XK_Sys_Req: return k_PRINT;
case XK_Caps_Lock: return k_CAPSLOCK;
case XK_Num_Lock: return k_NUMLOCK;
case XK_Scroll_Lock: return k_SCROLLLOCK;
case XK_KP_Insert:
case XK_KP_0: return k_NUM0;
case XK_KP_End:
case XK_KP_1: return k_NUM1;
case XK_KP_Down:
case XK_KP_2: return k_NUM2;
case XK_KP_Page_Down:
case XK_KP_3: return k_NUM3;
case XK_KP_Left:
case XK_KP_4: return k_NUM4;
case XK_KP_5: return k_NUM5;
case XK_KP_Right:
case XK_KP_6: return k_NUM6;
case XK_KP_Home:
case XK_KP_7: return k_NUM7;
case XK_KP_Up:
case XK_KP_8: return k_NUM8;
case XK_KP_Page_Up:
case XK_KP_9: return k_NUM9;
case XK_KP_Delete:
case XK_KP_Decimal: return k_DECIMAL;
case XK_KP_Add: return k_ADD;
case XK_KP_Subtract: return k_SUBTRACT;
case XK_KP_Multiply: return k_MULT;
case XK_KP_Divide: return k_DIVIDE;
case XK_colon:
case XK_semicolon: return k_SEMICOLON;
case XK_less:
case XK_comma: return k_COMMA;
case XK_underscore:
case XK_minus: return k_DASH;
case XK_greater:
case XK_period: return k_DOT;
case XK_plus:
case XK_equal: return k_EQUALS;
case XK_question:
case XK_slash: return k_SLASH;
case XK_quotedbl:
case XK_apostrophe: return k_ACUTE;
case XK_asciitilde:
case XK_grave: return k_BACUTE;
case XK_braceleft:
case XK_bracketleft: return k_LBRACKET;
case XK_braceright:
case XK_bracketright: return k_RBRACKET;
case XK_bar:
case XK_backslash: return k_BACKSLASH;
case XK_F1: return k_F1;
case XK_F2: return k_F2;
case XK_F3: return k_F3;
case XK_F4: return k_F4;
case XK_F5: return k_F5;
case XK_F6: return k_F6;
case XK_F7: return k_F7;
case XK_F8: return k_F8;
case XK_F9: return k_F9;
case XK_F10: return k_F10;
case XK_F11: return k_F11;
case XK_F12: return k_F12;
case XK_A:
case XK_a: return k_A;
case XK_B:
case XK_b: return k_B;
case XK_C:
case XK_c: return k_C;
case XK_D:
case XK_d: return k_D;
case XK_E:
case XK_e: return k_E;
case XK_F:
case XK_f: return k_F;
case XK_G:
case XK_g: return k_G;
case XK_H:
case XK_h: return k_H;
case XK_I:
case XK_i: return k_I;
case XK_J:
case XK_j: return k_J;
case XK_K:
case XK_k: return k_K;
case XK_L:
case XK_l: return k_L;
case XK_M:
case XK_m: return k_M;
case XK_N:
case XK_n: return k_N;
case XK_O:
case XK_o: return k_O;
case XK_P:
case XK_p: return k_P;
case XK_Q:
case XK_q: return k_Q;
case XK_R:
case XK_r: return k_R;
case XK_S:
case XK_s: return k_S;
case XK_T:
case XK_t: return k_T;
case XK_U:
case XK_u: return k_U;
case XK_V:
case XK_v: return k_V;
case XK_W:
case XK_w: return k_W;
case XK_X:
case XK_x: return k_X;
case XK_Y:
case XK_y: return k_Y;
case XK_Z:
case XK_z: return k_Z;
case XK_exclam:
case XK_1: return k_1;
case XK_at:
case XK_2: return k_2;
case XK_numbersign:
case XK_3: return k_3;
case XK_dollar:
case XK_4: return k_4;
case XK_percent:
case XK_5: return k_5;
case XK_asciicircum:
case XK_6: return k_6;
case XK_ampersand:
case XK_7: return k_7;
case XK_asterisk:
case XK_8: return k_8;
case XK_parenleft:
case XK_9: return k_9;
case XK_parenright:
case XK_0: return k_0;
default: return k_NONE;
}
}
KeySym toKeySym(WindowKey key)
{
switch(key) {
case k_ESCAPE: return XK_Escape;
case k_SPACE: return XK_space;
case k_BACKSPACE: return XK_BackSpace;
case k_RETURN_BIG: return XK_Return;
case k_RETURN_SMALL: return XK_KP_Enter;
case k_INSERT: return XK_Insert;
case k_DELETE: return XK_Delete;
case k_HOME: return XK_Home;
case k_END: return XK_End;
case k_PAGEUP: return XK_Prior;
case k_PAGEDOWN: return XK_Next;
case k_UP: return XK_Up;
case k_DOWN: return XK_Down;
case k_LEFT: return XK_Left;
case k_RIGHT: return XK_Right;
case k_SHIFT_L: return XK_Shift_L;
case k_SHIFT_R: return XK_Shift_R;
case k_CONTROL_L: return XK_Control_L;
case k_CONTROL_R: return XK_Control_R;
case k_ALT_L: return XK_Alt_L;
case k_ALT_R: return XK_Alt_R;
case k_PAUSE: return XK_Pause;
case k_PRINT: return XK_Sys_Req;
case k_CAPSLOCK: return XK_Caps_Lock;
case k_NUMLOCK: return XK_Num_Lock;
case k_SCROLLLOCK: return XK_Scroll_Lock;
case k_NUM0: return XK_KP_0;
case k_NUM1: return XK_KP_1;
case k_NUM2: return XK_KP_2;
case k_NUM3: return XK_KP_3;
case k_NUM4: return XK_KP_4;
case k_NUM5: return XK_KP_5;
case k_NUM6: return XK_KP_6;
case k_NUM7: return XK_KP_7;
case k_NUM8: return XK_KP_8;
case k_NUM9: return XK_KP_9;
case k_DECIMAL: return XK_KP_Decimal;
case k_ADD: return XK_KP_Add;
case k_SUBTRACT: return XK_KP_Subtract;
case k_MULT: return XK_KP_Multiply;
case k_DIVIDE: return XK_KP_Divide;
case k_SEMICOLON: return XK_semicolon;
case k_COMMA: return XK_comma;
case k_DASH: return XK_minus;
case k_DOT: return XK_period;
case k_EQUALS: return XK_equal;
case k_SLASH: return XK_slash;
case k_ACUTE: return XK_apostrophe;
case k_BACUTE: return XK_grave;
case k_LBRACKET: return XK_bracketleft;
case k_RBRACKET: return XK_bracketright;
case k_BACKSLASH: return XK_backslash;
case k_F1: return XK_F1;
case k_F2: return XK_F2;
case k_F3: return XK_F3;
case k_F4: return XK_F4;
case k_F5: return XK_F5;
case k_F6: return XK_F6;
case k_F7: return XK_F7;
case k_F8: return XK_F8;
case k_F9: return XK_F9;
case k_F10: return XK_F10;
case k_F11: return XK_F11;
case k_F12: return XK_F12;
case k_A: return XK_A;
case k_B: return XK_B;
case k_C: return XK_C;
case k_D: return XK_D;
case k_E: return XK_E;
case k_F: return XK_F;
case k_G: return XK_G;
case k_H: return XK_H;
case k_I: return XK_I;
case k_J: return XK_J;
case k_K: return XK_K;
case k_L: return XK_L;
case k_M: return XK_M;
case k_N: return XK_N;
case k_O: return XK_O;
case k_P: return XK_P;
case k_Q: return XK_Q;
case k_R: return XK_R;
case k_S: return XK_S;
case k_T: return XK_T;
case k_U: return XK_U;
case k_V: return XK_V;
case k_W: return XK_W;
case k_X: return XK_X;
case k_Y: return XK_Y;
case k_Z: return XK_Z;
case k_1: return XK_1;
case k_2: return XK_2;
case k_3: return XK_3;
case k_4: return XK_4;
case k_5: return XK_5;
case k_6: return XK_6;
case k_7: return XK_7;
case k_8: return XK_8;
case k_9: return XK_9;
case k_0: return XK_0;
default: return 0;
}
}
unsigned int toKeyCode(WindowKey key)
{
auto keySym = toKeySym(key);
ResourceManagerSingleton resourceManager;
return XKeysymToKeycode(resourceManager->dpy,keySym);
}
}
| 25.849246 | 67 | 0.679724 | thinlizzy |
1dffe6ef8b8b801df99225f2fb776e66a44daf9c | 1,362 | hpp | C++ | src/gameworld/gameworld/other/bigchatface/bigchatfaceconfig.hpp | mage-game/metagame-xm-server | 193b67389262803fe0eae742800b1e878b5b3087 | [
"MIT"
] | 3 | 2021-12-16T13:57:28.000Z | 2022-03-26T07:50:08.000Z | src/gameworld/gameworld/other/bigchatface/bigchatfaceconfig.hpp | mage-game/metagame-xm-server | 193b67389262803fe0eae742800b1e878b5b3087 | [
"MIT"
] | null | null | null | src/gameworld/gameworld/other/bigchatface/bigchatfaceconfig.hpp | mage-game/metagame-xm-server | 193b67389262803fe0eae742800b1e878b5b3087 | [
"MIT"
] | 1 | 2022-03-26T07:50:11.000Z | 2022-03-26T07:50:11.000Z | #ifndef __BIG_CHATFACE_CONFIG_HPP__
#define __BIG_CHATFACE_CONFIG_HPP__
#include "common/tinyxml/tinyxml.h"
#include "servercommon/serverdef.h"
#include "servercommon/bigchatfacedef.hpp"
#include "servercommon/struct/itemlistparam.h"
#include "servercommon/configbase.h"
#include "servercommon/pugixml/pugixml_adapter.hpp"
static const int BIG_FACE_MAX_LEVEL = 200;
struct BigFaceLevelConfig
{
BigFaceLevelConfig(): big_face_level(0), big_face_id(0), maxhp(0), gongji(0), fangyu(0), mingzhong(0), shanbi(0), baoji(0), jianren(0), is_notice(0){}
short big_face_level;
short big_face_id;
Attribute maxhp;
Attribute gongji;
Attribute fangyu;
Attribute mingzhong;
Attribute shanbi;
Attribute baoji;
Attribute jianren;
int is_notice;
ItemConfigData common_item;
ItemConfigData prof_one_item;
ItemConfigData prof_two_item;
ItemConfigData prof_three_item;
ItemConfigData prof_four_item;
};
class BigChatFaceConfig : public ConfigBase
{
public:
BigChatFaceConfig();
~BigChatFaceConfig();
bool Init(const std::string &configname, std::string *err);
const BigFaceLevelConfig * GetBigFaceLevelCfg(short level);
const int GetBigFaceMaxLevel(){return max_big_face_level;}
protected:
int InitLevelConfig(PugiXmlNode RootElement);
private:
int max_big_face_level;
BigFaceLevelConfig m_big_face_level_cfg[BIG_FACE_MAX_LEVEL + 1];
};
#endif
| 23.894737 | 151 | 0.799559 | mage-game |
3804fa96b4f3f98ebcc7b9ea2b975c0103353172 | 1,997 | cpp | C++ | src/openloco/windows/constructionwnd.cpp | SmallJoker/OpenLoco | f42ed80be8fac5c1c5d122352a212585d54aa71f | [
"MIT"
] | 1 | 2018-02-22T06:03:32.000Z | 2018-02-22T06:03:32.000Z | src/openloco/windows/constructionwnd.cpp | SmallJoker/OpenLoco | f42ed80be8fac5c1c5d122352a212585d54aa71f | [
"MIT"
] | null | null | null | src/openloco/windows/constructionwnd.cpp | SmallJoker/OpenLoco | f42ed80be8fac5c1c5d122352a212585d54aa71f | [
"MIT"
] | 1 | 2022-03-22T01:46:13.000Z | 2022-03-22T01:46:13.000Z | #include "../input.h"
#include "../interop/interop.hpp"
#include "../ui/WindowManager.h"
using namespace openloco::interop;
namespace openloco::ui::windows::construction
{
namespace widget_idx
{
constexpr uint16_t close = 2;
constexpr uint16_t tab_0 = 4;
constexpr uint16_t tab_1 = 5;
constexpr uint16_t tab_2 = 6;
constexpr uint16_t tab_3 = 7;
constexpr uint16_t construct = 28;
constexpr uint16_t remove = 29;
constexpr uint16_t place = 30;
}
// 0x004A3B0D
window* open_with_flags(uint32_t flags)
{
registers regs;
regs.ecx = flags;
call(0x004A3B0D, regs);
return (window*)regs.esi;
}
// 0x0049D3F6
void on_mouse_up(window& w, uint16_t widgetIndex)
{
// Allow shift key to repeat the action multiple times
// This is useful for building very long tracks.
int multiplier = 1;
if (input::has_key_modifier(input::key_modifier::shift))
{
multiplier = 10;
}
registers regs;
regs.edx = widgetIndex;
regs.esi = (int32_t)&w;
switch (widgetIndex)
{
case widget_idx::close:
WindowManager::close(&w);
break;
case widget_idx::tab_0:
case widget_idx::tab_1:
case widget_idx::tab_2:
case widget_idx::tab_3:
call(0x0049D93A, regs);
break;
case widget_idx::construct:
for (int i = 0; i < multiplier; i++)
{
call(0x0049F92D, regs);
}
break;
case widget_idx::remove:
for (int i = 0; i < multiplier; i++)
{
call(0x004A0121, regs);
}
break;
case widget_idx::place:
call(0x0049D7DC, regs);
break;
}
}
}
| 27.356164 | 64 | 0.511768 | SmallJoker |
3806eb36a37235df76883397348393cb0ce83aae | 215 | hh | C++ | include/AudioClip.hh | carolinavillam/Lucky-Monkey | 5ddbadf6c604ea00c3384cc42eda9033d6297e7e | [
"MIT"
] | null | null | null | include/AudioClip.hh | carolinavillam/Lucky-Monkey | 5ddbadf6c604ea00c3384cc42eda9033d6297e7e | [
"MIT"
] | null | null | null | include/AudioClip.hh | carolinavillam/Lucky-Monkey | 5ddbadf6c604ea00c3384cc42eda9033d6297e7e | [
"MIT"
] | null | null | null | #pragma once
#include<SFML/Audio.hpp>
class AudioClip
{
private:
sf::SoundBuffer* soundBuffer{};
sf::Sound* sound{};
public:
AudioClip(const char* audioUrl, float volume);
~AudioClip();
void Play();
}; | 13.4375 | 48 | 0.67907 | carolinavillam |
3807451cc62a5a2a55b6f82d8600fd851a4af2ae | 150 | cpp | C++ | Tests/UnitTests/SImpleTest.cpp | wocks1123/cpp_osp_test | 8a8859344ee07d07018393651282fc56aee18557 | [
"MIT"
] | null | null | null | Tests/UnitTests/SImpleTest.cpp | wocks1123/cpp_osp_test | 8a8859344ee07d07018393651282fc56aee18557 | [
"MIT"
] | null | null | null | Tests/UnitTests/SImpleTest.cpp | wocks1123/cpp_osp_test | 8a8859344ee07d07018393651282fc56aee18557 | [
"MIT"
] | null | null | null | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include "Project1/Test.hpp"
TEST_CASE("Simple test")
{
CHECK(Add(2, 3) == 5);
} | 16.666667 | 42 | 0.713333 | wocks1123 |
380aee56336f825f1d0cfeb98929beff4bbfb39f | 5,238 | cpp | C++ | engine/generators/settlements/source/WalledSettlementGenerator.cpp | sidav/shadow-of-the-wyrm | 747afdeebed885b1a4f7ab42f04f9f756afd3e52 | [
"MIT"
] | 1 | 2020-05-24T22:44:03.000Z | 2020-05-24T22:44:03.000Z | engine/generators/settlements/source/WalledSettlementGenerator.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | null | null | null | engine/generators/settlements/source/WalledSettlementGenerator.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | null | null | null | #include "BuildingConfigFactory.hpp"
#include "WalledSettlementGenerator.hpp"
#include "FeatureGenerator.hpp"
#include "RNG.hpp"
#include "SettlementGeneratorUtils.hpp"
#include "TileGenerator.hpp"
using namespace std;
WalledSettlementGenerator::WalledSettlementGenerator(MapPtr new_base_map)
: BaseSettlementGenerator(new_base_map)
{
initialize();
}
WalledSettlementGenerator::WalledSettlementGenerator(MapPtr new_base_map, const int new_growth_rate)
: BaseSettlementGenerator(new_base_map, new_growth_rate)
{
initialize();
}
void WalledSettlementGenerator::initialize()
{
north_wall = 0;
south_wall = 0;
east_wall = 0;
west_wall = 0;
gate_row = 0;
gate_col = 0;
}
MapPtr WalledSettlementGenerator::generate(const Dimensions& dim)
{
return generate();
}
MapPtr WalledSettlementGenerator::generate()
{
MapPtr map = std::make_shared<Map>(*base_map);
generate_walled_settlement(map);
generate_wells(map);
return map;
}
// Generate the walls of the settlement, and then generate the buildings
// and other things within the walls.
void WalledSettlementGenerator::generate_walled_settlement(MapPtr map)
{
generate_walls(map);
generate_gate(map);
generate_inner_settlement(map);
}
// Generate the walls around the settlement
void WalledSettlementGenerator::generate_walls(MapPtr map)
{
TileGenerator tg;
Dimensions d = map->size();
int rows = d.get_y();
int cols = d.get_x();
int wall_offset = RNG::range(2,3);
north_wall = 0 + wall_offset;
south_wall = rows - wall_offset;
west_wall = 0 + wall_offset;
east_wall = cols - wall_offset;
// North, south wall
TilePtr wall_tile;
for (int col = west_wall; col <= east_wall; col++)
{
wall_tile = tg.generate(TileType::TILE_TYPE_ROCK);
map->insert(north_wall, col, wall_tile);
wall_tile = tg.generate(TileType::TILE_TYPE_ROCK);
map->insert(south_wall, col, wall_tile);
}
// East, west wall
for (int row = north_wall; row < south_wall; row++)
{
wall_tile = tg.generate(TileType::TILE_TYPE_ROCK);
map->insert(row, east_wall, wall_tile);
wall_tile = tg.generate(TileType::TILE_TYPE_ROCK);
map->insert(row, west_wall, wall_tile);
}
}
void WalledSettlementGenerator::generate_gate(MapPtr map)
{
TileGenerator tg;
CardinalDirection rand = static_cast<CardinalDirection>(RNG::range(static_cast<int>(CardinalDirection::CARDINAL_DIRECTION_NORTH), static_cast<int>(CardinalDirection::CARDINAL_DIRECTION_SOUTH)));
switch(rand)
{
case CardinalDirection::CARDINAL_DIRECTION_WEST:
case CardinalDirection::CARDINAL_DIRECTION_NORTH:
gate_wall = CardinalDirection::CARDINAL_DIRECTION_NORTH;
gate_row = north_wall;
gate_col = (east_wall + west_wall) / 2;
break;
case CardinalDirection::CARDINAL_DIRECTION_EAST:
case CardinalDirection::CARDINAL_DIRECTION_SOUTH:
gate_wall = CardinalDirection::CARDINAL_DIRECTION_SOUTH;
gate_row = south_wall;
gate_col = (east_wall + west_wall) / 2;
break;
default:
break;
}
TilePtr tile = tg.generate(TileType::TILE_TYPE_DUNGEON);
FeaturePtr gate = FeatureGenerator::generate_gate();
tile->set_feature(gate);
map->insert(gate_row, gate_col, tile);
}
void WalledSettlementGenerator::generate_inner_settlement(MapPtr map)
{
switch(gate_wall)
{
case CardinalDirection::CARDINAL_DIRECTION_WEST:
case CardinalDirection::CARDINAL_DIRECTION_NORTH:
generate_road_south(map, gate_row+1, gate_col, south_wall - north_wall - 1, growth_rate, 0, false);
break;
case CardinalDirection::CARDINAL_DIRECTION_EAST:
case CardinalDirection::CARDINAL_DIRECTION_SOUTH:
generate_road_north(map, gate_row-1, gate_col, south_wall - north_wall - 1, growth_rate, 0, false);
break;
default:
break;
}
int gap_height = (south_wall - north_wall) / 2;
int gap_width = (east_wall - west_wall) / 2;
int cur_attempts = 0;
int cur_buildings_generated = 0;
int num_attempts = 200;
int num_buildings = RNG::range(6, 9);
int row, col;
int height, width;
CardinalDirection dir;
int offset_extra = 1;
BuildingConfigFactory bcf;
while ((cur_buildings_generated < num_buildings) && (cur_attempts < num_attempts))
{
row = RNG::range(north_wall+2, south_wall-2);
col = RNG::range(west_wall+2, east_wall-2);
height = RNG::range(std::min(5, gap_height), std::min(7, gap_height));
width = RNG::range(std::min(5, gap_width), std::min(9, gap_width));
dir = static_cast<CardinalDirection>(RNG::range(static_cast<int>(CardinalDirection::CARDINAL_DIRECTION_NORTH), static_cast<int>(CardinalDirection::CARDINAL_DIRECTION_WEST)));
if (!SettlementGeneratorUtils::does_building_overlap(map, row, row+height+1, col, col+width+1, offset_extra))
{
vector<ClassIdentifier> cl_ids = bcf.create_house_or_workshop_features(WORKSHOP_PROBABILITY);
BuildingGenerationParameters bgp(row, row + height, col, col + width, dir, false, cl_ids, bcf.create_creature_ids(cl_ids), bcf.create_item_ids(cl_ids));
SettlementGeneratorUtils::generate_building_if_possible(map, bgp, buildings, growth_rate);
cur_buildings_generated++;
}
cur_attempts++;
}
}
| 30.811765 | 196 | 0.729477 | sidav |
380b371ae97928e13357dcc72565b96bfccc2c1f | 224 | cpp | C++ | solutions/Medium/137. Single Number II/solution4.cpp | BASARANOMO/leetcode-cpp | f779ec46e672f01cec69077e854d6ba15e451d27 | [
"MIT"
] | null | null | null | solutions/Medium/137. Single Number II/solution4.cpp | BASARANOMO/leetcode-cpp | f779ec46e672f01cec69077e854d6ba15e451d27 | [
"MIT"
] | null | null | null | solutions/Medium/137. Single Number II/solution4.cpp | BASARANOMO/leetcode-cpp | f779ec46e672f01cec69077e854d6ba15e451d27 | [
"MIT"
] | null | null | null | class Solution {
public:
int singleNumber(vector<int>& nums) {
int a = 0, b = 0;
for (int num: nums) {
b = ~a & (b ^ num);
a = ~b & (a ^ num);
}
return b;
}
};
| 18.666667 | 41 | 0.383929 | BASARANOMO |
380d949247a4e4cc47110a19087af3b7fa4fea5b | 663 | cpp | C++ | src/vt/util/StringBuilder.cpp | Pikaju/Veletrix | 9572f37542e0a14198de6aa8ba4d6a4fddafd433 | [
"MIT"
] | null | null | null | src/vt/util/StringBuilder.cpp | Pikaju/Veletrix | 9572f37542e0a14198de6aa8ba4d6a4fddafd433 | [
"MIT"
] | null | null | null | src/vt/util/StringBuilder.cpp | Pikaju/Veletrix | 9572f37542e0a14198de6aa8ba4d6a4fddafd433 | [
"MIT"
] | null | null | null | #include "StringBuilder.h"
namespace vt {
StringBuilder::StringBuilder() : m_main(), m_buffer(), m_bufferSize(1024)
{
}
StringBuilder::~StringBuilder()
{
}
StringBuilder& StringBuilder::append(const String& string)
{
m_buffer += string;
// Append buffer to main, if the maximum buffer size is exceeded.
if (m_buffer.size() > m_bufferSize) {
m_main += m_buffer;
m_buffer.resize(0);
}
return *this;
}
const String& StringBuilder::getString()
{
// Append buffer to main, if the buffer isn't empty.
if (m_buffer.size() > 0) {
m_main += m_buffer;
m_buffer.resize(0);
}
return m_main;
}
} | 19.5 | 75 | 0.631976 | Pikaju |
380eee22a33fb82fa355036c7325f8e4ecbea6a1 | 6,170 | cpp | C++ | src/rho.cpp | romz-pl/kohn-sham-atom | f8d87850469097ed39ba855b50df46787b1c3114 | [
"MIT"
] | 1 | 2022-02-24T03:48:19.000Z | 2022-02-24T03:48:19.000Z | src/rho.cpp | romz-pl/kohn-sham-atom | f8d87850469097ed39ba855b50df46787b1c3114 | [
"MIT"
] | null | null | null | src/rho.cpp | romz-pl/kohn-sham-atom | f8d87850469097ed39ba855b50df46787b1c3114 | [
"MIT"
] | null | null | null | #include <fstream>
#include <sstream>
#include "rho.h"
#include "rhoinit.h"
#include "constants.h"
#include "approxsolver.h"
#include "gauss.h"
#include "paramdb.h"
//
// Initialization of electron density.
// Proper initialization of electron density could have large impact on the
// convergence of Self Consisten Field (SCF) procedure implemented in class NonLinKs.
//
// The algorithm implemented in this function is based on heuristic!
// I have never tried other incitialization functions, since I was satisfied with
// the current speed of convergence.
//
// 1. For default initialization the following function is used
//
// \rho_0(r) = M^4 / 16 * r^2 * \exp( -M * r / 2 )
//
// where M is the number of electrons (equal to the number of protons for the nutral atom).
//
// 2. For user defined initialization the following function is used
//
// \rho_0(r) = c * r^2 * \exp( -\alpha * r );
//
// See the class RhoInit.
//
//
void Rho::Init()
{
const bool def = ParamDb::GetBool( "Rho0_Default" );
const double M = ParamDb::GetDouble( "Atom_Proton" );
const double midM = 50; // This is heuristic!
double c, alpha;
if( def ) // Default initialization
{
double w;
if( M < midM )
w = M;
else
w = midM;
// Default inicjalization
c = w * w * w * w / 16.;
c *= ( M / w );
alpha = 0.5 * w;
}
else // User defined initialization
{
c = ParamDb::GetDouble( "Rho0_c" );
alpha = ParamDb::GetDouble( "Rho0_Alpha" );
}
RhoInit f( c, alpha );
Calc( f );
const double elecNo = Integ();
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++\n");
printf("+ Number of protons (electrons) = %.2lf\n", M );
printf("+ Applied 'Rho0' gives %.6lf electrons\n", elecNo );
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++\n\n");
// After initialization integral of electron densities shuld be equal to number of protons
const double eps = 1E-4;
if( fabs( M - elecNo ) > eps )
{
if( def )
{
throw std::runtime_error( "Something strange in function Rho::Init" );
}
else
{
std::stringstream ss;
ss << "Invalid arguments for user defined initialization of electron density." << std::endl;
ss << "Applied parameter Rho0_c = " << ParamDb::GetDouble( "Rho0_c" ) << std::endl;
ss << "and parameter Rho0_Alpha = " << ParamDb::GetDouble( "Rho0_Alpha" ) << std::endl;
ss << "give wrong number of electrons! It must be: " << M << std::endl;
ss << "Applied parameters gave: " << elecNo << std::endl;
ss << "Adjust parameters Rho0_c, Rho0_Alpha and try again." << std::endl;
throw std::runtime_error( ss.str() );
}
}
}
//
// returns integral
//
// \int \rho(r) d \vec{r} = \int_0^{\infty} \rho(r) dr
//
double Rho::Integ() const
{
const std::vector< double > node = GetNode();
assert( node.size() > 1 );
double val = 0;
for( size_t i = 0; i < node.size() - 1; ++i )
val += Gauss::Calc( *this, node[ i ], node[ i + 1 ] );
return val;
}
//
// Calculates approximation of electron density based on function "f"
//
void Rho::Calc( const Fun1D& f )
{
const double rc = ParamDb::GetDouble( "Atom_Rc" );
const size_t rhoDeg = ParamDb::GetSize_t( "Rho_Deg" );
const double rhoDelta = ParamDb::GetDouble( "Rho_Delta" );
ApproxSolver approxSolver( rhoDeg, f );
m_approx = approxSolver.Run( 0, rc, rhoDelta );
}
//
// Returns electron density for radius "r"
//
double Rho::Get( double r ) const
{
assert( r <= ParamDb::GetDouble( "Atom_Rc" ) );
const double v = m_approx.Get( r );
// Sometimes, because of approximation, the approximated value is less than zero,
// what has no phisical meaning. Then zero is returned.
if( v < 0. )
return 0;
return v;
}
//
// Returns value of helper function $\tilde{\rho}(r)$
//
double Rho::GetRhoTilde( double r ) const
{
const double rho = Get( r );
if( r > 0 )
return rho / ( RATOM_4PI * r * r );
// Linear extrapolation for (r == 0)
const double eps = 1E-6;
const double v1 = GetRhoTilde( eps );
const double v2 = GetRhoTilde( 2 * eps );
return 2 * v1 - v2;
}
//
// Returns nodes used for perfoming the approximation
//
std::vector< double > Rho::GetNode() const
{
return m_approx.GetNode();
}
//
// Writes calculated total radial electron density.
//
void Rho::Write() const
{
const std::string outRhoPath = ParamDb::GetString( "Out_RhoPath" );
std::ofstream out( outRhoPath, std::ios::out );
if( !out )
{
throw std::invalid_argument( "Cannot open file. Path = " + outRhoPath );
}
out << std::scientific;
const size_t outRhoNode = ParamDb::GetSize_t( "Out_RhoNode" );
if( outRhoNode < 1 )
{
throw std::runtime_error( "Out_RhoNode must be greater then zero." );
}
out << "# \n";
out << "# Output from RAtom program.\n";
out << "# \n";
out << "# Total radial electron density.\n";
out << "# The first column contains radius $r$ in bohr units.\n";
out << "# The second column holds $\\rho(r)$.\n";
out << "# The third column holds $\\tilde{\\rho}(r) = \\rho(r) / (\\pi * r * r)$\n";
out << "# \n";
out << "# Use this file with gnuplot to create the plot.\n";
out << "# \n";
out << "# R Rho RhoTilde\n";
out << "#\n";
const std::vector< double > node = GetNode( );
if( node.empty() )
{
throw std::runtime_error( "No data in Rho::Write function." );
}
double r;
for( size_t i = 0; i < node.size() - 1; ++i )
{
const double dr = ( node[ i + 1 ] - node[ i ]) / outRhoNode;
r = node[ i ];
for( size_t k = 0; k < outRhoNode; ++k )
{
out << r << " " << Get( r ) << " " << GetRhoTilde( r ) << std::endl;
r += dr;
}
}
// The last node
r = node.back();
out << r << " " << Get( r ) << " " << GetRhoTilde( r ) << std::endl;
}
| 27.918552 | 104 | 0.557536 | romz-pl |
38129f7e8c551cf615552eb79e0bed0a50fbd57c | 983 | cpp | C++ | source/vector/Sort/912sortArray.cpp | Tridu33/myclionarch | d4e41b3465a62a83cbf6c7119401c05009f4b636 | [
"MIT"
] | null | null | null | source/vector/Sort/912sortArray.cpp | Tridu33/myclionarch | d4e41b3465a62a83cbf6c7119401c05009f4b636 | [
"MIT"
] | null | null | null | source/vector/Sort/912sortArray.cpp | Tridu33/myclionarch | d4e41b3465a62a83cbf6c7119401c05009f4b636 | [
"MIT"
] | null | null | null | //quick sort
class Solution {
int partition(vector<int> &nums,int l ,int r){
int pivot = nums[r];
int i = l - 1;
for (int j = l;j<r;j++){
if(nums[j] <= pivot){
i++;
swap(nums[i], nums[j]);
}
}
swap(nums[i + 1], nums[r]);
return i + 1;
}
int randomized_partition(vector<int> & nums,int l,int r){
int i = rand() % (r - l + 1) + l;//[l,r]
swap(nums[r], nums[i]);
return partition(nums, l, r);
}
void randomized_quicksort(vector<int> & nums,int l,int r){
if(l < r){
int pos = randomized_partition(nums, l, r);
randomized_quicksort(nums, l, pos - 1);
randomized_quicksort(nums, pos + 1, r);
}
}
public:
vector<int> sortArray(vector<int>& nums) {
srand((unsigned) time(NULL));
randomized_quicksort(nums, 0, (int)nums.size() - 1);
return nums;
}
}; | 28.085714 | 62 | 0.480163 | Tridu33 |
38147bb11cea0eaf2abd45c5b6e06ad67607a18c | 508 | cpp | C++ | src/telegram/types/pollanswer.cpp | AlexTeos/CustomsForgeBot | 7ac473ea88ded526c9edbc9486967a8a839b6fe2 | [
"MIT"
] | null | null | null | src/telegram/types/pollanswer.cpp | AlexTeos/CustomsForgeBot | 7ac473ea88ded526c9edbc9486967a8a839b6fe2 | [
"MIT"
] | null | null | null | src/telegram/types/pollanswer.cpp | AlexTeos/CustomsForgeBot | 7ac473ea88ded526c9edbc9486967a8a839b6fe2 | [
"MIT"
] | null | null | null | #include "pollanswer.h"
namespace Telegram
{
void readJsonObject(PollAnswer::Ptr& value, const QJsonObject& json, const QString& valueName)
{
if (json.contains(valueName) && json[valueName].isObject())
{
value = PollAnswer::Ptr::create();
QJsonObject object = json[valueName].toObject();
readJsonObject(value->m_poll_id, object, "poll_id");
readJsonObject(value->m_user, object, "user");
readJsonObject(value->m_option_ids, object, "option_ids");
}
}
}
| 26.736842 | 94 | 0.67126 | AlexTeos |
381498f8076837853e3fccea2eb37d434e91be42 | 144 | cpp | C++ | ProgramStudy/Source/Component/Animation/AnimatorController.cpp | trinhlehainam/ASO_3rd_year_StudyProject | 89c54e42e97cc47af175f61b26a5871bc2a718a0 | [
"MIT"
] | null | null | null | ProgramStudy/Source/Component/Animation/AnimatorController.cpp | trinhlehainam/ASO_3rd_year_StudyProject | 89c54e42e97cc47af175f61b26a5871bc2a718a0 | [
"MIT"
] | null | null | null | ProgramStudy/Source/Component/Animation/AnimatorController.cpp | trinhlehainam/ASO_3rd_year_StudyProject | 89c54e42e97cc47af175f61b26a5871bc2a718a0 | [
"MIT"
] | null | null | null | #include "AnimatorController.h"
bool AnimatorController::HasParameter(const std::string& paramKey) const
{
return paramMap.count(paramKey);
}
| 20.571429 | 72 | 0.791667 | trinhlehainam |
381683a50c346f0b08a894db50593b675c4b1d38 | 8,568 | cpp | C++ | src/fractal/fractalnft.cpp | cryptostiltskin/Espers | 8e5f098f8da47fbf2e207dc0b2ecf0d9b6c3fc13 | [
"MIT"
] | 74 | 2016-09-22T02:53:07.000Z | 2022-01-12T09:08:39.000Z | src/fractal/fractalnft.cpp | BirduIDO/Espers | f287ed5e2e187653b132142d6e66cbe68e8ad9c7 | [
"MIT"
] | 32 | 2016-05-05T12:27:19.000Z | 2021-11-07T21:31:23.000Z | src/fractal/fractalnft.cpp | BirduIDO/Espers | f287ed5e2e187653b132142d6e66cbe68e8ad9c7 | [
"MIT"
] | 56 | 2016-04-13T01:11:20.000Z | 2022-01-03T20:46:01.000Z | // Copyright (c) 2020-2021 The Espers Project/CryptoCoderz Team
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// NOTICE!
//
// This is a completely experimental NFT data storage and retrieval written by
// CryptoCoderz (Jonathan Dan Zaretsky - [email protected])
// and
// SaltineChips (Jeremiah Cook - [email protected])
// dmEgc2xhdnUgZ29zcG9kZSBib2dlIGUgbmFzaCBzcGFzZXRhbCBlc3VzIGhyaXN0b3M=
//
//
// PLEASE USE AT YOUR OWN RISK!!!
//
#include "fractalnft.h"
// For Logprintf
#include "util/util.h"
// For image read
#include "fractalnftbase.h"
// For threadsafe messages
#include "ui/ui_interface.h"
#include <string>
#include <cstring>
using namespace std;
std::string nft_data = "CeyQ1FkJc4gwqLvRzCJv5CG8TW1Y2s1H"; // PubKey Example
std::string NFTparserdata = ""; // Set and used for parser
// Logging of each character count (hard limit of 1 line per encoding)
std::string Pixel_Cache[1] = {};
// Logging of succesfull run
bool NFT_run = false;
void NFTrender(std::string input_nft_data, std::string input_alias, string render_alias, int contract_type) {
//
// Returns first word
std::string pixel_count = input_nft_data.substr(0, input_nft_data.find(" "));
// Set found count
int log_found = 0;
// Set starting loop position
int start_position = 0;
//
int channels = 3;
//
int w, h;
// Print for debugging
LogPrintf("deob - INFO - Set base values... \n");
// Set size
size_t position = 0;
// Clear previously set data
nft_data = "";
NFTparserdata = "";
// Loop through all words in input
while((position = input_nft_data.find(" ")) != std::string::npos) {
// Set array data
NFTparserdata += pixel_count;
// Log word count found
log_found ++;
// Break loop if maximum render pixel line count is reached
if(log_found > 400)
{
break;
}
// Move to next word
input_nft_data.erase(0, input_nft_data.find(" ") + std::string(" ").length());
pixel_count = input_nft_data.substr(0, input_nft_data.find(" "));
}
// Print for debugging
LogPrintf("NFT Render - INFO - Found %u pixel lines!\n", log_found);
// Set dimensions
w = log_found;
h = w;
// Print for debugging
//LogPrintf("NFT Render - INFO - Set the following Pixel data for printing: %s\n", NFTparserdata);
// Encoded data to write
unsigned char data[w * h * channels];
// Set rgb parse values
// Set subvalues of pixel value
std::string parse_count = NFTparserdata.substr(0, NFTparserdata.find("C"));
// Set array position
int dataPosition = 0;
// Write pixel data
while (start_position < (w * h))
{
// Set and Move to next data sets
int parse_cache = int(std::stoi(parse_count));
data[dataPosition++] = parse_cache;
NFTparserdata.erase(0, NFTparserdata.find("C") + std::string("C").length());
parse_count = NFTparserdata.substr(0, NFTparserdata.find("C"));
parse_cache = int(std::stoi(parse_count));
data[dataPosition++] = parse_cache;
NFTparserdata.erase(0, NFTparserdata.find("C") + std::string("C").length());
parse_count = NFTparserdata.substr(0, NFTparserdata.find("C"));
parse_cache = int(std::stoi(parse_count));
data[dataPosition++] = parse_cache;
// Print for debugging
//LogPrintf("NFT Render - INFO - Writing Rendered RGB: %s, %s, %s\n", data[(dataPosition - 2)], data[(dataPosition - 1)], data[dataPosition]);
// Move up in start position
start_position ++;
// Move to next word
NFTparserdata.erase(0, NFTparserdata.find("C") + std::string("C").length());
parse_count = NFTparserdata.substr(0, NFTparserdata.find("C"));
}
// Print for debugging
LogPrintf("NFT Render - INFO - Rendering to file: %s!\n", render_alias);
// Print for debugging
LogPrintf("NFT Render - INFO - Rendered NFT: %s!\n", input_alias);
NFTprintRENDER(data, w, h, channels, render_alias, contract_type);
}
void NFTprintRENDER(unsigned char NFTdata[], int w, int h, int channels, std::string passed_alias, int contract_type) {
// Inform user of image generation
uiInterface.ThreadSafeMessageBox("Your NFT image has been rendered!", "", CClientUIInterface::MSG_INFORMATION);
// Print image
int PNGdata = (w * channels);
write_image(passed_alias.c_str(), w, h, channels, NFTdata, contract_type, PNGdata);
}
void NFTparse(std::string image_to_deCode) {
// Clear possible left over data
NFTparserdata = "";
// Set values
NFT_run = false;
NFTBASE_run = NFT_run;
int width, height;
int r, g, b;//, a;
std::vector<unsigned char> image;
std::string str_x, str_y, str_r, str_g, str_b, str_a;
std::string nftBUF = "C";
std::string nftPAD = " ";
// Set image data
bool success = load_image(image, image_to_deCode, width, height);
// Report failure
if (!success)
{
// Print for debugging
LogPrintf("NFT Parser - ERROR - could not open or load image!\n");
// Reset RGB(A) index value for next attempt
n = 0;
return;
}
// Hard limit maximum NFT pixel size
// Limit set to 400x400 for testing
// This can be removed later
// as NFT only cares about amount of data
// to decode and not really how many pixels are there
else if ((width * height) > 160000 || width != height)
{
// Print for debugging
LogPrintf("NFT Parser - ERROR - Image is either too large or invalid aspect ratio!\n");
// Reset RGB(A) index value for next attempt
n = 0;
// Inform user of error
uiInterface.ThreadSafeMessageBox("Image either larger than 400x400 pixels or not a square image!", "", CClientUIInterface::MSG_ERROR);
return;
}
// Print for debugging
LogPrintf("NFT Decode - Image dimensions (width x height): %u %u\n", width, height);
// Define pixel position
int x = 1;
int y = 1;
int p = 1;
int positionLOOP = 0;
int yLOOP = 1;
// Either 3 or 4
size_t RGBA = n;
size_t index = 0;
if (RGBA > 3)
{
// Print for debugging
LogPrintf("NFT Parser - WARNING - Invalid RGB type: expected RGB, parsed RGBA\n");
// Inform user of error
uiInterface.ThreadSafeMessageBox("Image has transparency which degrades when parsed! Use JPG for now!", "", CClientUIInterface::MSG_WARNING);
} else if (RGBA < 3)
{
// Throw error
NFT_run = false;
// Print for debugging
LogPrintf("NFT Parser - ERROR - Invalid RGB type: expected RGB, parsed INVALID FORMAT\n");
// Reset RGB(A) index value for next attempt
n = 0;
return;
}
// Loop handling for a maximum 400x400 image
while (positionLOOP < (width * height))
{
// Handle RGB parsing
r = static_cast<int>(image[index + 0]);
g = static_cast<int>(image[index + 1]);
b = static_cast<int>(image[index + 2]);
// Move to get next pixel of RGB
index += RGBA;
str_x = std::to_string(x);
str_y = std::to_string(y);
str_r = std::to_string(r);
str_g = std::to_string(g);
str_b = std::to_string(b);
//str_a = std::to_string(a);
// Print for debugging
//LogPrintf("NFT Parser - Pixel |%u| Position x=%s y=%s - RGB data parsed: %s, %s, %s\n", p, str_x, str_y, str_r, str_g, str_b);
// Write data to array
Pixel_Cache[0] = str_r + nftBUF + str_g + nftBUF + str_b + nftBUF;// + str_a + nftBUF;
NFTparserdata += Pixel_Cache[0];
// Move up in loop logic and pixel position
if (yLOOP == width)
{
NFTparserdata += nftPAD;
y = 0;
yLOOP = 0;
x++;
}
y++;
p++;
yLOOP++;
positionLOOP++;
}
// Reset RGB(A) index value for next attempt
n = 0;
// Match data and get ready for use
NFTenCode(NFTparserdata);
}
void NFTenCode(std::string input_pixeldata) {
nftBASEOut_String = input_pixeldata;
NFT_run = true;
NFTBASE_run = NFT_run;
// Inform user of image generation
uiInterface.ThreadSafeMessageBox("Image was successfully parsed into a NFT!", "", CClientUIInterface::MSG_INFORMATION);
// Clear data
NFTparserdata = "";
}
| 32.210526 | 150 | 0.622549 | cryptostiltskin |
38190debf42bb9830f46082df81089f50e1a1c00 | 1,118 | cpp | C++ | LinearList/1/main.cpp | Xavi1erW/BUPT_DataStructure | c024bbfcae223f74b75712eb7b7f3a95a75e9484 | [
"MIT"
] | null | null | null | LinearList/1/main.cpp | Xavi1erW/BUPT_DataStructure | c024bbfcae223f74b75712eb7b7f3a95a75e9484 | [
"MIT"
] | null | null | null | LinearList/1/main.cpp | Xavi1erW/BUPT_DataStructure | c024bbfcae223f74b75712eb7b7f3a95a75e9484 | [
"MIT"
] | null | null | null | #include "doubleList.h"
#include "doubleList.cpp"
int main()
{
int test[5] = {1,2,3,4,5};
doubleList<int> list (test, 5);
list.show();
list.insert(3);
cout << "Length:" << list.getLength() << endl;
list.show();
list.insert(10);
list.show();
try{
list.Delete(10);
cout << "Length:" << list.getLength() << endl;
}catch(const char* msg){
cout << msg;
}
try{
list.Delete(2);
cout << "Length:" << list.getLength() << endl;
}catch(const char* msg){
cout << msg;
}
try{
list.show();
list.Delete(6);
cout << "Length:" << list.getLength() << endl;
}catch(const char* msg){
cout << msg;
}
try{
vector<int> result = list.Find(2);
for(int idx : result)
{
cout << idx << ' ';
}
cout << endl;
result.clear();
result = list.Find(9);
for(int idx : result)
{
cout << idx << ' ';
}
cout << endl;
}catch(const char* msg){
cout << msg;
}
return 0;
} | 20.327273 | 54 | 0.449016 | Xavi1erW |
381e58d0d92f9edf2d1b0632f7bfa42666fd1522 | 2,647 | cpp | C++ | src/engine/gui/widgets/checkbox.cpp | Overpeek/Overpeek-Engine | 3df11072378ba870033a19cd09fb332bcc4c466d | [
"MIT"
] | 13 | 2020-01-10T16:36:46.000Z | 2021-08-09T09:24:47.000Z | src/engine/gui/widgets/checkbox.cpp | Overpeek/Overpeek-Engine | 3df11072378ba870033a19cd09fb332bcc4c466d | [
"MIT"
] | 1 | 2020-01-16T11:03:49.000Z | 2020-01-16T11:11:15.000Z | src/engine/gui/widgets/checkbox.cpp | Overpeek/Overpeek-Engine | 3df11072378ba870033a19cd09fb332bcc4c466d | [
"MIT"
] | 1 | 2020-02-06T21:22:47.000Z | 2020-02-06T21:22:47.000Z | #include "checkbox.hpp"
#include "engine/gui/gui_manager.hpp"
#include "engine/graphics/renderer.hpp"
#include "engine/utility/connect_guard_additions.hpp"
#include "button.hpp"
namespace oe::gui
{
Checkbox::Checkbox(Widget* parent, GUI& gui_manager, const info_t& _checkbox_info, value_t& value_ref)
: Widget(parent, gui_manager, _checkbox_info.widget_info)
, m_checkbox_info(_checkbox_info)
, m_value(value_ref)
{
Button::info_t button_info;
button_info.pixel_size = { 0, 0 };
button_info.fract_size = { 1.0f, 1.0f };
m_button = create(button_info);
m_button->connect_listener<ButtonUseEvent, &Checkbox::on_button_use>(this);
m_button->connect_listener<ButtonHoverEvent, &Checkbox::on_button_hover>(this);
}
Checkbox::~Checkbox()
{
m_button->disconnect_listener<ButtonUseEvent, &Checkbox::on_button_use>(this);
m_button->disconnect_listener<ButtonHoverEvent, &Checkbox::on_button_hover>(this);
}
void Checkbox::virtual_toggle(bool enabled)
{
if(enabled)
{
quad_check = m_gui_manager.getRenderer()->create();
quad_box = m_gui_manager.getRenderer()->create(); // check - box, hehe
// event listeners
m_cg_render.connect<GUIRenderEvent, &Checkbox::on_render, Checkbox>(m_gui_manager.m_dispatcher, this);
}
else
{
quad_check.reset();
quad_box.reset();
// event listeners
m_cg_render.disconnect();
}
}
void Checkbox::on_render(const GUIRenderEvent& /* event */)
{
if(!m_cg_render)
return;
quad_box->setPosition(m_render_position);
quad_box->setSize(m_render_size);
quad_box->setZ(m_z);
quad_box->setColor(m_checkbox_info.color_back);
quad_box->setSprite(m_checkbox_info.sprite);
quad_check->setPosition(static_cast<glm::vec2>(m_render_position + m_render_size / 2));
quad_check->setSize(m_value ? static_cast<glm::vec2>(m_render_size) * 0.7f : glm::vec2{ 0.0f, 0.0f });
quad_check->setZ(m_z + 0.05f);
quad_check->setColor(m_checkbox_info.color_mark);
quad_check->setSprite(m_checkbox_info.sprite);
quad_check->setRotationAlignment(oe::alignments::center_center);
}
void Checkbox::on_button_use(const ButtonUseEvent& e)
{
if (e.button == oe::mouse_buttons::button_left && e.action == oe::actions::release)
m_value = !m_value;
event_use_latest.action = e.action;
event_use_latest.button = e.button;
event_use_latest.modifier = e.modifier;
event_use_latest.value = m_value;
m_dispatcher.trigger(event_use_latest);
}
void Checkbox::on_button_hover(const ButtonHoverEvent& /* e */)
{
m_dispatcher.trigger(event_hover_latest);
}
} | 30.079545 | 106 | 0.715527 | Overpeek |
381f157dae543206090ef93f5aaf2e887102be75 | 1,562 | hpp | C++ | boost/range/algorithm/reverse_copy.hpp | jonstewart/boost-svn | 7f6dc0c0cb807b28072c7bdd3d77bb01ab290c59 | [
"BSL-1.0"
] | 1 | 2017-04-08T10:44:28.000Z | 2017-04-08T10:44:28.000Z | boost/range/algorithm/reverse_copy.hpp | jonstewart/boost-svn | 7f6dc0c0cb807b28072c7bdd3d77bb01ab290c59 | [
"BSL-1.0"
] | null | null | null | boost/range/algorithm/reverse_copy.hpp | jonstewart/boost-svn | 7f6dc0c0cb807b28072c7bdd3d77bb01ab290c59 | [
"BSL-1.0"
] | null | null | null | // Copyright Neil Groves 2009. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
#define BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
#include <boost/concept_check.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/iterator/iterator_concepts.hpp>
#include <algorithm>
namespace boost
{
namespace range
{
/// \brief template function reverse_copy
///
/// range-based version of the reverse_copy std algorithm
///
/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
template<typename BidirectionalRange, typename OutputIterator>
inline OutputIterator reverse_copy(BidirectionalRange& rng, OutputIterator out)
{
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
}
/// \overload
template<typename BidirectionalRange, typename OutputIterator>
inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
{
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
}
} // namespace range
using range::reverse_copy;
} // namespace boost
#endif // include guard
| 31.877551 | 85 | 0.774008 | jonstewart |
381f4de1388171bcb62e533b3749d6cb17ba9525 | 760 | cpp | C++ | libs/renderer/src/renderer/lock_flags/from_mode.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | libs/renderer/src/renderer/lock_flags/from_mode.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | libs/renderer/src/renderer/lock_flags/from_mode.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// 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 <sge/renderer/lock_mode.hpp>
#include <sge/renderer/lock_flags/from_mode.hpp>
#include <sge/renderer/lock_flags/method.hpp>
#include <fcppt/assert/unreachable.hpp>
sge::renderer::lock_flags::method
sge::renderer::lock_flags::from_mode(sge::renderer::lock_mode const _mode)
{
switch (_mode)
{
case sge::renderer::lock_mode::writeonly:
return sge::renderer::lock_flags::method::write;
case sge::renderer::lock_mode::readwrite:
return sge::renderer::lock_flags::method::readwrite;
}
FCPPT_ASSERT_UNREACHABLE;
}
| 31.666667 | 74 | 0.731579 | cpreh |
3822b1537b3766e69ccaeef0c718774ff40aafef | 819 | cpp | C++ | GameEngine_Prototype/GameEngine_Prototype/AudioListener.cpp | Michaelwolf95/CECS_491_GameEngine_Prototype | d134fa376484d1115bf5af75f062ef44c8e70263 | [
"MIT"
] | 2 | 2019-10-14T03:45:55.000Z | 2020-07-12T08:08:54.000Z | GameEngine_Prototype/GameEngine_Prototype/AudioListener.cpp | Michaelwolf95/CECS_491_GameEngine_Prototype | d134fa376484d1115bf5af75f062ef44c8e70263 | [
"MIT"
] | null | null | null | GameEngine_Prototype/GameEngine_Prototype/AudioListener.cpp | Michaelwolf95/CECS_491_GameEngine_Prototype | d134fa376484d1115bf5af75f062ef44c8e70263 | [
"MIT"
] | 1 | 2019-09-02T03:34:28.000Z | 2019-09-02T03:34:28.000Z | #include "AudioListener.h"
#include "AudioManager.h"
#include "AudioEngine.h"
REGISTER_COMPONENT(AudioListener, "AudioListener")
void AudioListener::Start()
{
AudioManager::getInstance().sound.Set3dListenerAndOrientation(pos, velocity, forward, up);
}
void AudioListener::Update()
{
glm::vec3 p = this->gameObject->transform->getPosition();
pos.x = p.x;
pos.y = p.y;
pos.z = p.z;
glm::vec3 f = - (this->gameObject->transform->getForwardDirection()); // Flips the facing of the forward.
forward.x = f.x;
forward.y = f.y;
forward.z = f.z;
glm::vec3 u = this->gameObject->transform->getUpDirection();
up.x = u.x;
up.y = u.y;
up.z = u.z;
AudioManager::getInstance().sound.Set3dListenerAndOrientation(pos, velocity, forward, up);
}
AudioListener::AudioListener()
{
}
AudioListener::~AudioListener()
{
}
| 21.552632 | 106 | 0.704518 | Michaelwolf95 |
38275942cbb79019ccb677484ae260bd1fe4b887 | 2,955 | cpp | C++ | src/ShortestDistanceFromAllBuildings.cpp | yanzhe-chen/LeetCode | d82f0b9721ea613ab216c78e7286671d0e9e4187 | [
"MIT"
] | 43 | 2015-10-10T12:59:52.000Z | 2018-07-11T18:07:00.000Z | src/ShortestDistanceFromAllBuildings.cpp | yanzhe-chen/LeetCode | d82f0b9721ea613ab216c78e7286671d0e9e4187 | [
"MIT"
] | null | null | null | src/ShortestDistanceFromAllBuildings.cpp | yanzhe-chen/LeetCode | d82f0b9721ea613ab216c78e7286671d0e9e4187 | [
"MIT"
] | 11 | 2015-10-10T14:41:11.000Z | 2018-07-28T06:03:16.000Z | #include "ShortestDistanceFromAllBuildings.hpp"
#include <queue>
#include <climits>
using namespace std;
int ShortestDistanceFromAllBuildings::shortestDistance(vector<vector<int>> &grid) {
if (grid.empty()) return -1;
int m = grid.size();
int n = grid[0].size();
if (n == 0) return -1;
// accumulate distances from all buildings
vector<vector<int>> distance(m, vector<int>(n, 0));
// record how many buildings can be reached
vector<vector<int>> reach(m, vector<int>(n, 0));
// count how many buildings
int buildings = 0;
int ret = INT_MAX;
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
if (grid[i][j] == 1) {
buildings++;
bfs(grid, i, j, m, n, distance, reach);
}
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
if (grid[i][j] == 0 && reach[i][j] == buildings) {
ret = min(ret, distance[i][j]);
}
}
}
return ret == INT_MAX ? -1 : ret;
}
void ShortestDistanceFromAllBuildings::bfs(vector<vector<int>> &grid, int i, int j, int m, int n,
vector<vector<int>> &distance, vector<vector<int>> &reach) {
typedef pair<int, int> state_t;
vector<vector<bool>> visited(m, vector<bool>(n, false));
auto valid = [&](const state_t &s) {
const int x = s.first;
const int y = s.second;
if (x < 0 || x >= m || y < 0 || y >= n)
return false;
return grid[x][y] == 0 && !visited[x][y];
};
auto neighbors = [&](const state_t &s) {
const int x = s.first;
const int y = s.second;
vector<state_t> ret;
state_t up{x - 1, y};
if (valid(up)) ret.push_back(up);
state_t down{x + 1, y};
if (valid(down)) ret.push_back(down);
state_t left{x, y - 1};
if (valid(left)) ret.push_back(left);
state_t right{x, y + 1};
if (valid(right)) ret.push_back(right);
return ret;
};
auto mark = [&](const state_t &s) {
const int x = s.first;
const int y = s.second;
visited[x][y] = true;
};
auto empty = [&](const state_t &s) {
const int x = s.first;
const int y = s.second;
return grid[x][y] == 0;
};
queue<state_t> q;
state_t init{i, j};
mark(init);
q.push(init);
int dist = 0;
while (!q.empty()) {
int nums = q.size();
for (int c = 0; c < nums; c++) {
state_t t = q.front();
q.pop();
if (empty(t)) {
const int x = t.first;
const int y = t.second;
distance[x][y] += dist;
reach[x][y]++;
}
for (auto nb : neighbors(t)) {
mark(nb);
q.push(nb);
}
}
dist++;
}
} | 26.150442 | 103 | 0.472081 | yanzhe-chen |
382a435f6606a3ba290dbe9a017cac91767d9403 | 1,712 | cpp | C++ | artifact/storm/src/storm/abstraction/ExplicitQualitativeResultMinMax.cpp | glatteis/tacas21-artifact | 30b4f522bd3bdb4bebccbfae93f19851084a3db5 | [
"MIT"
] | null | null | null | artifact/storm/src/storm/abstraction/ExplicitQualitativeResultMinMax.cpp | glatteis/tacas21-artifact | 30b4f522bd3bdb4bebccbfae93f19851084a3db5 | [
"MIT"
] | null | null | null | artifact/storm/src/storm/abstraction/ExplicitQualitativeResultMinMax.cpp | glatteis/tacas21-artifact | 30b4f522bd3bdb4bebccbfae93f19851084a3db5 | [
"MIT"
] | 1 | 2022-02-05T12:39:53.000Z | 2022-02-05T12:39:53.000Z | #include "storm/abstraction/ExplicitQualitativeResultMinMax.h"
#include "storm/abstraction/ExplicitQualitativeResult.h"
namespace storm {
namespace abstraction {
bool ExplicitQualitativeResultMinMax::isExplicit() const {
return true;
}
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb0Min() const {
return getProb0(storm::OptimizationDirection::Minimize);
}
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb1Min() const {
return getProb1(storm::OptimizationDirection::Minimize);
}
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb0Max() const {
return getProb0(storm::OptimizationDirection::Maximize);
}
ExplicitQualitativeResult const& ExplicitQualitativeResultMinMax::getProb1Max() const {
return getProb1(storm::OptimizationDirection::Maximize);
}
ExplicitQualitativeResult& ExplicitQualitativeResultMinMax::getProb0Min() {
return getProb0(storm::OptimizationDirection::Minimize);
}
ExplicitQualitativeResult& ExplicitQualitativeResultMinMax::getProb1Min() {
return getProb1(storm::OptimizationDirection::Minimize);
}
ExplicitQualitativeResult& ExplicitQualitativeResultMinMax::getProb0Max() {
return getProb0(storm::OptimizationDirection::Maximize);
}
ExplicitQualitativeResult& ExplicitQualitativeResultMinMax::getProb1Max() {
return getProb1(storm::OptimizationDirection::Maximize);
}
}
}
| 37.217391 | 95 | 0.676402 | glatteis |
382a4d6954af1e86e2094a0b5a43ac7364587dd5 | 6,007 | cpp | C++ | src/tokenizer.cpp | mihaizh/configparser | 27bc989388b341f967e1fcd5bea90b5ca9ecc3d9 | [
"MIT"
] | null | null | null | src/tokenizer.cpp | mihaizh/configparser | 27bc989388b341f967e1fcd5bea90b5ca9ecc3d9 | [
"MIT"
] | 2 | 2019-04-20T06:28:28.000Z | 2019-04-20T07:32:14.000Z | src/tokenizer.cpp | mihaizh/configparser | 27bc989388b341f967e1fcd5bea90b5ca9ecc3d9 | [
"MIT"
] | null | null | null | #include "tokenizer.h"
#include <cctype> // isalpha, isdigit
namespace configparser
{
namespace detail
{
char tokenizer::peek() const
{
return *m_text_ptr;
}
char tokenizer::peekNext() const
{
if (eof())
{
return 0;
}
return *(m_text_ptr + 1);
}
void tokenizer::consume()
{
++m_text_ptr;
++m_column;
}
bool tokenizer::eof() const
{
return peek() == 0;
}
bool tokenizer::eol() const
{
return peek() == '\n';
}
bool tokenizer::empty() const
{
return (peek() == ' ') ||
(peek() == '\t');
}
void tokenizer::comment()
{
while (peek() != '\n')
{
consume();
}
}
bool tokenizer::is_identifier_start()
{
const bool escaped_start =
(peek() == '\\') &&
(peekNext() == ' ');
return escaped_start ||
isalpha(peek()) ||
(peek() == '.') ||
(peek() == '$') ||
(peek() == ':');
}
bool tokenizer::is_identifier_char()
{
return is_identifier_start() ||
isdigit(peek()) ||
(peek() == '_') ||
(peek() == '~') ||
(peek() == '-') ||
(peek() == '.') ||
(peek() == ':') ||
(peek() == ' ');
}
bool tokenizer::priority_value_separator(char val)
{
return val == ',';
}
bool tokenizer::value_separator(char val)
{
return (val == ':') ||
(val == ',');
}
void tokenizer::identifier()
{
const char* begin_ptr = m_text_ptr;
while (is_identifier_char())
{
consume();
}
const char* end_ptr = m_text_ptr - 1;
// strip whitespace at the end of identifier
while (*end_ptr == ' ')
{
--end_ptr;
}
m_tokens.emplace_back();
m_tokens.back().type = TokenType::TOKEN_IDENTIFIER;
m_tokens.back().begin_ptr = begin_ptr;
m_tokens.back().length = end_ptr - begin_ptr + 1;
m_tokens.back().line = m_line;
m_tokens.back().column = m_column - 1;
}
void tokenizer::section()
{
consume(); // '['
const char* begin_ptr = m_text_ptr;
while (is_identifier_char())
{
consume();
}
// check for bracket at the end of
// section define
if (peek() != ']')
{
m_error_code = ErrorCode::EXPECTED_CLOSING_BRACKET;
--m_column;
}
else
{
m_tokens.emplace_back();
m_tokens.back().type = TokenType::TOKEN_SECTION;
m_tokens.back().begin_ptr = begin_ptr;
m_tokens.back().length = m_text_ptr - begin_ptr;
m_tokens.back().line = m_line;
m_tokens.back().column = m_column - (int)m_tokens.back().length;
consume(); // ']'
}
}
void tokenizer::value()
{
consume(); // '='
// strip whitespace at the beginning
// of a value
while (empty())
{
consume();
}
const char* begin_ptr = m_text_ptr;
char sep = 0; // save items separator, if exists
while (!eof() && !eol() && (peek() != ';'))
{
// save the items separator, with higher priority
// to one of them
if (!priority_value_separator(sep) &&
value_separator(peek()))
{
sep = peek();
}
consume();
}
const TokenType token_type = (sep == 0) ?
TokenType::TOKEN_VALUE :
TokenType::TOKEN_VECTOR_VALUE;
const char* current_ptr = begin_ptr;
while (current_ptr < m_text_ptr)
{
// consume everything until items separator
while ((current_ptr < m_text_ptr) && (*current_ptr != sep))
{
++current_ptr;
}
const char* end_ptr = current_ptr - 1;
// if there's a comment at the end of the line
// then strip the comment and any unescaped whitespace
if (*current_ptr == ';')
{
while ((*end_ptr == ' ') || (*end_ptr == '\t'))
{
--end_ptr;
if (*end_ptr == '\\')
{
++end_ptr;
break;
}
}
}
m_tokens.emplace_back();
m_tokens.back().type = token_type;
m_tokens.back().begin_ptr = begin_ptr;
m_tokens.back().length = end_ptr - begin_ptr + 1;
m_tokens.back().line = m_line;
m_tokens.back().column = m_column - (int)(m_text_ptr - begin_ptr);
// if a comment follows the value, then
// no more parsing is needed
if (*current_ptr == ';')
{
break;
}
// skip the items separator and strip
// any unescaped whitespace before the next value
if (*current_ptr == sep)
{
++current_ptr;
while ((*current_ptr == ' ') || (*current_ptr == '\t'))
{
++current_ptr;
}
}
begin_ptr = current_ptr;
++current_ptr;
}
}
ErrorCode tokenizer::parse(const char* text)
{
m_tokens.clear();
m_text_ptr = text;
m_error_code = ErrorCode::NO_ERROR;
m_line = 1;
m_column = 1;
while (!eof() && (m_error_code == ErrorCode::NO_ERROR))
{
if (is_identifier_start())
{
identifier();
}
switch (peek())
{
case ' ':
case '\t':
case '\r':
consume();
break;
case '\n':
++m_line;
m_column = 1;
consume();
break;
case ';':
comment();
break;
case '[':
section();
break;
case '=':
value();
break;
default: // error
m_error_code = ErrorCode::UNEXPECTED_CHARACTER;
break;
}
}
return m_error_code;
}
const std::vector<token>& tokenizer::tokens() const
{
return m_tokens;
}
int tokenizer::current_line() const
{
return m_line;
}
int tokenizer::current_column() const
{
return m_column;
}
} // detail
} // configparser
| 20.571918 | 74 | 0.493258 | mihaizh |
382d272b6759ddffa178bcdbdcca478211ac18c4 | 566 | cpp | C++ | leetcode/270. Closest Binary Search Tree Value/s2.cpp | zhuohuwu0603/leetcode_cpp_lzl124631x | 6a579328810ef4651de00fde0505934d3028d9c7 | [
"Fair"
] | 787 | 2017-05-12T05:19:57.000Z | 2022-03-30T12:19:52.000Z | leetcode/270. Closest Binary Search Tree Value/s2.cpp | aerlokesh494/LeetCode | 0f2cbb28d5a9825b51a8d3b3a0ae0c30d7ff155f | [
"Fair"
] | 8 | 2020-03-16T05:55:38.000Z | 2022-03-09T17:19:17.000Z | leetcode/270. Closest Binary Search Tree Value/s2.cpp | aerlokesh494/LeetCode | 0f2cbb28d5a9825b51a8d3b3a0ae0c30d7ff155f | [
"Fair"
] | 247 | 2017-04-30T15:07:50.000Z | 2022-03-30T09:58:57.000Z | // OJ: https://leetcode.com/problems/closest-binary-search-tree-value/
// Author: github.com/lzl124631x
// Time: O(N)
// Space: O(logN)
// Ref: https://leetcode.com/problems/closest-binary-search-tree-value/discuss/70331/Clean-and-concise-java-solution
class Solution {
public:
int closestValue(TreeNode* root, double target) {
int ans = root->val;
while (root) {
if (abs(target - root->val) < abs(target - ans)) ans = root->val;
root = root->val > target ? root->left : root->right;
}
return ans;
}
}; | 35.375 | 116 | 0.621908 | zhuohuwu0603 |
382dc7dfb1f5621c2f6f1cb1b08ba5b95220b209 | 1,660 | hxx | C++ | src/interfaces/python/opengm/export_typedes.hxx | amueller/opengm | bf2d0c611ade9bbf1d2ae537fee0df4cb6553777 | [
"Unlicense"
] | 1 | 2020-03-13T20:56:48.000Z | 2020-03-13T20:56:48.000Z | src/interfaces/python/opengm/export_typedes.hxx | amueller/opengm | bf2d0c611ade9bbf1d2ae537fee0df4cb6553777 | [
"Unlicense"
] | null | null | null | src/interfaces/python/opengm/export_typedes.hxx | amueller/opengm | bf2d0c611ade9bbf1d2ae537fee0df4cb6553777 | [
"Unlicense"
] | null | null | null | #ifndef EXPORT_TYPEDES_HXX
#define EXPORT_TYPEDES_HXX
#include <opengm/graphicalmodel/graphicalmodel.hxx>
#include <opengm/functions/potts.hxx>
#include <opengm/utilities/tribool.hxx>
template<class V,class I,class O,class F>
struct GmGen{
typedef opengm::DiscreteSpace<I,I> SpaceType;
typedef opengm::GraphicalModel<V,O,F,SpaceType,false> type;
};
template<class V,class I>
struct ETLGen{
typedef opengm::ExplicitFunction<V ,I,I> type;
};
template<class V,class I>
struct FTLGen{
typedef typename opengm::meta::TypeListGenerator<
opengm::ExplicitFunction<V,I,I>,
opengm::PottsFunction<V,I,I>
>::type type;
};
typedef float GmValueType;
typedef opengm::UInt64Type GmIndexType;
typedef GmGen<
GmValueType,
GmIndexType,
opengm::Adder ,
FTLGen<GmValueType,GmIndexType>::type
>::type GmAdder;
typedef GmAdder::FactorType FactorGmAdder;
typedef GmGen<
GmValueType,
GmIndexType,
opengm::Multiplier ,
FTLGen<GmValueType,GmIndexType>::type
>::type GmMultiplier;
typedef GmMultiplier::FactorType FactorGmMultiplier;
typedef opengm::IndependentFactor<GmValueType,GmIndexType,GmIndexType> GmIndependentFactor;
namespace pyenums{
enum AStarHeuristic{
DEFAULT_HEURISTIC=0,
FAST_HEURISTIC=1,
STANDARD_HEURISTIC=2
};
enum IcmMoveType{
SINGLE_VARIABLE=0,
FACTOR=1
};
enum GibbsVariableProposal{
RANDOM=0,
CYCLIC=1
};
namespace libdai{
#ifdef WITH_LIBDAI
enum UpdateRule{
PARALL=0,
SEQFIX=1,
SEQRND=2,
SEQMAX=3
};
#endif
}
}
#endif /* EXPORT_TYPEDES_HXX */
| 21.558442 | 91 | 0.693976 | amueller |
38301ba828a5fc8c151945c7e49464435f482813 | 3,842 | cpp | C++ | src/planner/plannodes/create_index_plan_node.cpp | AndiLynn/terrier | 6002f8a902d3d0d19bc67998514098f8b41ca264 | [
"MIT"
] | null | null | null | src/planner/plannodes/create_index_plan_node.cpp | AndiLynn/terrier | 6002f8a902d3d0d19bc67998514098f8b41ca264 | [
"MIT"
] | 5 | 2019-04-08T20:47:46.000Z | 2019-04-24T22:11:28.000Z | src/planner/plannodes/create_index_plan_node.cpp | AndiLynn/terrier | 6002f8a902d3d0d19bc67998514098f8b41ca264 | [
"MIT"
] | 1 | 2021-10-08T01:22:25.000Z | 2021-10-08T01:22:25.000Z | #include "planner/plannodes/create_index_plan_node.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
namespace terrier::planner {
common::hash_t CreateIndexPlanNode::Hash() const {
auto type = GetPlanNodeType();
common::hash_t hash = common::HashUtil::Hash(&type);
// Hash database_oid
auto database_oid = GetDatabaseOid();
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(&database_oid));
// Hash namespace oid
auto namespace_oid = GetNamespaceOid();
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(&namespace_oid));
// Hash table_oid
auto table_oid = GetTableOid();
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(&table_oid));
// Hash index_type
auto index_type = GetIndexType();
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(&index_type));
// Hash index_attrs
hash = common::HashUtil::CombineHashInRange(hash, index_attrs_.begin(), index_attrs_.end());
// Hash key_attrs
hash = common::HashUtil::CombineHashInRange(hash, key_attrs_.begin(), key_attrs_.end());
// Hash unique_index
auto unique_index = IsUniqueIndex();
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(&unique_index));
// Hash index_name
hash = common::HashUtil::CombineHashes(hash, common::HashUtil::Hash(GetIndexName()));
return common::HashUtil::CombineHashes(hash, AbstractPlanNode::Hash());
}
bool CreateIndexPlanNode::operator==(const AbstractPlanNode &rhs) const {
if (GetPlanNodeType() != rhs.GetPlanNodeType()) return false;
auto &other = dynamic_cast<const CreateIndexPlanNode &>(rhs);
// Database OID
if (GetDatabaseOid() != other.GetDatabaseOid()) return false;
// Namespace OID
if (GetNamespaceOid() != other.GetNamespaceOid()) return false;
// Table OID
if (GetTableOid() != other.GetTableOid()) return false;
// Index type
if (GetIndexType() != other.GetIndexType()) return false;
// Index attrs
const auto &index_attrs = GetIndexAttributes();
const auto &other_index_attrs = other.GetIndexAttributes();
if (index_attrs.size() != other_index_attrs.size()) return false;
for (size_t i = 0; i < index_attrs.size(); i++) {
if (index_attrs[i] != other_index_attrs[i]) {
return false;
}
}
// Key attrs
const auto &key_attrs = GetKeyAttrs();
const auto &other_key_attrs = other.GetKeyAttrs();
if (key_attrs.size() != other_key_attrs.size()) return false;
for (size_t i = 0; i < key_attrs.size(); i++) {
if (key_attrs[i] != other_key_attrs[i]) {
return false;
}
}
// Unique index
if (IsUniqueIndex() != other.IsUniqueIndex()) return false;
// Index name
if (GetIndexName() != other.GetIndexName()) return false;
return AbstractPlanNode::operator==(rhs);
}
nlohmann::json CreateIndexPlanNode::ToJson() const {
nlohmann::json j = AbstractPlanNode::ToJson();
j["database_oid"] = database_oid_;
j["namespace_oid"] = namespace_oid_;
j["table_oid"] = table_oid_;
j["index_type"] = index_type_;
j["unique_index"] = unique_index_;
j["index_name"] = index_name_;
j["index_attrs"] = index_attrs_;
j["key_attrs"] = key_attrs_;
return j;
}
void CreateIndexPlanNode::FromJson(const nlohmann::json &j) {
AbstractPlanNode::FromJson(j);
database_oid_ = j.at("database_oid").get<catalog::db_oid_t>();
namespace_oid_ = j.at("namespace_oid").get<catalog::namespace_oid_t>();
table_oid_ = j.at("table_oid").get<catalog::table_oid_t>();
index_type_ = j.at("index_type").get<parser::IndexType>();
unique_index_ = j.at("unique_index").get<bool>();
index_name_ = j.at("index_name").get<std::string>();
index_attrs_ = j.at("index_attrs").get<std::vector<std::string>>();
key_attrs_ = j.at("key_attrs").get<std::vector<std::string>>();
}
} // namespace terrier::planner
| 32.559322 | 94 | 0.700937 | AndiLynn |
38307f0eb8004b1809fbda1c4d40b1d840d175fe | 671 | cpp | C++ | AtCoder/AtcoderBiginnersSelection/ABC087B.cpp | arlechann/atcoder | 1af08efa6d3a0e8c75e4eaf13e1eda994820b9e2 | [
"CC0-1.0"
] | null | null | null | AtCoder/AtcoderBiginnersSelection/ABC087B.cpp | arlechann/atcoder | 1af08efa6d3a0e8c75e4eaf13e1eda994820b9e2 | [
"CC0-1.0"
] | null | null | null | AtCoder/AtcoderBiginnersSelection/ABC087B.cpp | arlechann/atcoder | 1af08efa6d3a0e8c75e4eaf13e1eda994820b9e2 | [
"CC0-1.0"
] | null | null | null | #include <cstdio>
int solve(int a, int b, int c, int x);
int main(void){
int a, b, c, x;
scanf("%d\n", &a);
scanf("%d\n", &b);
scanf("%d\n", &c);
scanf("%d\n", &x);
printf("%d\n", solve(a, b, c, x));
return 0;
}
int solve(int a, int b, int c, int x){
int result = 0;
if (x < 0){
return 0;
}
if (!x){
return 1;
}
if (a){
for (int i = 0; i <= a; i++){
result += solve(0, b, c, x - 500 * i);
}
return result;
}
if (b){
for (int i = 0; i <= b; i++){
result += solve(0, 0, c, x - 100 * i);
}
return result;
}
if (c){
for (int i = 0; i <= c; i++){
result += solve(0, 0, 0, x - 50 * i);
}
return result;
}
return 0;
} | 13.42 | 41 | 0.457526 | arlechann |
38339843c19c44f58e60be5bdeba906a068dd3fc | 4,341 | cpp | C++ | core/log/convergence.cpp | kliegeois/ginkgo | 4defcc07f77828393cc5b4a735a00e50da2cbab0 | [
"BSD-3-Clause"
] | null | null | null | core/log/convergence.cpp | kliegeois/ginkgo | 4defcc07f77828393cc5b4a735a00e50da2cbab0 | [
"BSD-3-Clause"
] | null | null | null | core/log/convergence.cpp | kliegeois/ginkgo | 4defcc07f77828393cc5b4a735a00e50da2cbab0 | [
"BSD-3-Clause"
] | null | null | null | /*******************************<GINKGO LICENSE>******************************
Copyright (c) 2017-2022, the Ginkgo authors
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.
******************************<GINKGO LICENSE>*******************************/
#include <ginkgo/core/log/convergence.hpp>
#include <ginkgo/core/base/array.hpp>
#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/stop/criterion.hpp>
#include <ginkgo/core/stop/stopping_status.hpp>
namespace gko {
namespace log {
template <typename ValueType>
void Convergence<ValueType>::on_criterion_check_completed(
const stop::Criterion* criterion, const size_type& num_iterations,
const LinOp* residual, const LinOp* residual_norm,
const LinOp* implicit_sq_resnorm, const LinOp* solution,
const uint8& stopping_id, const bool& set_finalized,
const Array<stopping_status>* status, const bool& one_changed,
const bool& stopped) const
{
if (stopped) {
Array<stopping_status> tmp(status->get_executor()->get_master(),
*status);
this->convergence_status_ = true;
for (int i = 0; i < status->get_num_elems(); i++) {
if (!tmp.get_data()[i].has_converged()) {
this->convergence_status_ = false;
break;
}
}
this->num_iterations_ = num_iterations;
if (residual != nullptr) {
this->residual_.reset(residual->clone().release());
}
if (implicit_sq_resnorm != nullptr) {
this->implicit_sq_resnorm_.reset(
implicit_sq_resnorm->clone().release());
}
if (residual_norm != nullptr) {
this->residual_norm_.reset(residual_norm->clone().release());
} else if (residual != nullptr) {
using Vector = matrix::Dense<ValueType>;
using NormVector = matrix::Dense<remove_complex<ValueType>>;
this->residual_norm_ = NormVector::create(
residual->get_executor(), dim<2>{1, residual->get_size()[1]});
auto dense_r = as<Vector>(residual);
dense_r->compute_norm2(this->residual_norm_.get());
}
}
}
template <typename ValueType>
void Convergence<ValueType>::on_criterion_check_completed(
const stop::Criterion* criterion, const size_type& num_iterations,
const LinOp* residual, const LinOp* residual_norm, const LinOp* solution,
const uint8& stopping_id, const bool& set_finalized,
const Array<stopping_status>* status, const bool& one_changed,
const bool& stopped) const
{
this->on_criterion_check_completed(
criterion, num_iterations, residual, residual_norm, nullptr, solution,
stopping_id, set_finalized, status, one_changed, stopped);
}
#define GKO_DECLARE_CONVERGENCE(_type) class Convergence<_type>
GKO_INSTANTIATE_FOR_EACH_VALUE_TYPE(GKO_DECLARE_CONVERGENCE);
} // namespace log
} // namespace gko
| 40.570093 | 78 | 0.696614 | kliegeois |
38361bc7f6ef0d252245256363ab9c9b0ed244d5 | 1,607 | cpp | C++ | src/perf_watcher.cpp | Foomf/Blyss-Server | f6942f740e74a2bc03f305372486aa62d94fb074 | [
"Zlib"
] | null | null | null | src/perf_watcher.cpp | Foomf/Blyss-Server | f6942f740e74a2bc03f305372486aa62d94fb074 | [
"Zlib"
] | null | null | null | src/perf_watcher.cpp | Foomf/Blyss-Server | f6942f740e74a2bc03f305372486aa62d94fb074 | [
"Zlib"
] | null | null | null | #include "perf_watcher.hpp"
#include <spdlog/spdlog.h>
#include "uv_utils.hpp"
namespace blyss::server
{
const uint64_t frame_leeway = 10;
void perf_watcher_timer_callback(uv_timer_t* handle)
{
const auto self = static_cast<perf_watcher*>(handle->data);
self->reset();
}
perf_watcher::perf_watcher(uv_loop_t* loop, std::uint64_t ms_per_frame, std::uint64_t slow_warning_reset_ms)
: ms_per_frame_{ ms_per_frame }
, slow_warning_reset_ms_{ slow_warning_reset_ms }
, loop_{loop}
, previous_time_{uv_now(loop_)}
{
uv_checked(uv_timer_init(loop_, &show_warning_timer_));
}
perf_watcher::~perf_watcher()
{
uv_warned(uv_timer_stop(&show_warning_timer_));
}
void perf_watcher::start()
{
show_warning_timer_.data = this;
reset();
}
void perf_watcher::update()
{
const auto current_time = uv_now(loop_);
const auto diff = current_time - previous_time_;
previous_time_ = current_time;
if (show_slow_warning_ && diff > ms_per_frame_ + frame_leeway)
{
show_message(diff - ms_per_frame_);
}
}
void perf_watcher::reset()
{
show_slow_warning_ = true;
}
void perf_watcher::show_message(const std::uint64_t missed_ms)
{
spdlog::warn("Server is running {0:d} ms behind! Consider getting a faster cpu...", missed_ms);
show_slow_warning_ = false;
uv_checked(uv_timer_start(&show_warning_timer_, perf_watcher_timer_callback, slow_warning_reset_ms_, 0));
}
} | 26.344262 | 113 | 0.650902 | Foomf |
3839069263d48f72c2c2355071087f6e8086dbf7 | 3,103 | hpp | C++ | RX600/crca.hpp | hirakuni45/RX | 3fb91bfc8d5282cde7aa00b8bd37f4aad32582d0 | [
"BSD-3-Clause"
] | 56 | 2015-06-04T14:15:38.000Z | 2022-03-01T22:58:49.000Z | RX600/crca.hpp | hirakuni45/RX | 3fb91bfc8d5282cde7aa00b8bd37f4aad32582d0 | [
"BSD-3-Clause"
] | 30 | 2019-07-27T11:03:14.000Z | 2021-12-14T09:59:57.000Z | RX600/crca.hpp | hirakuni45/RX | 3fb91bfc8d5282cde7aa00b8bd37f4aad32582d0 | [
"BSD-3-Clause"
] | 15 | 2017-06-24T11:33:39.000Z | 2021-12-07T07:26:58.000Z | #pragma once
//=====================================================================//
/*! @file
@brief RX600 グループ・CRCA 定義
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2020 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=====================================================================//
#include "common/io_utils.hpp"
namespace device {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief CRCA 演算器クラス
@param[in] base ベース・アドレス
@param[in] per ペリフェラル
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
template <uint32_t base, peripheral per>
struct crca_t {
static const auto PERIPHERAL = per; ///< ペリフェラル型
//-----------------------------------------------------------------//
/*!
@brief CRC コントロールレジスタ(CRCCR)
@param[in] ofs オフセット
*/
//-----------------------------------------------------------------//
template <uint32_t ofs>
struct crccr_t : public rw8_t<ofs> {
typedef rw8_t<ofs> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bits_rw_t<io_, bitpos::B0, 3> GPS;
bit_rw_t <io_, bitpos::B6> LMS;
bit_rw_t <io_, bitpos::B7> DORCLR;
};
typedef crccr_t<base + 0x00> CRCCR_;
static CRCCR_ CRCCR;
//-----------------------------------------------------------------//
/*!
@brief CRC データ入力レジスタ(CRCDIRxx)
*/
//-----------------------------------------------------------------//
typedef rw32_t<base + 0x04> CRCDIR32_;
static CRCDIR32_ CRCDIR32;
typedef rw16_t<base + 0x04> CRCDIR16_;
static CRCDIR16_ CRCDIR16;
typedef rw8_t<base + 0x04> CRCDIR8_;
static CRCDIR8_ CRCDIR8;
//-----------------------------------------------------------------//
/*!
@brief CRC データ出力レジスタ(CRCDORxx)
*/
//-----------------------------------------------------------------//
typedef rw32_t<base + 0x08> CRCDOR32_;
static CRCDOR32_ CRCDOR32;
typedef rw16_t<base + 0x08> CRCDOR16_;
static CRCDOR16_ CRCDOR16;
typedef rw8_t<base + 0x08> CRCDOR8_;
static CRCDOR8_ CRCDOR8;
};
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCCR_ crca_t<base, per>::CRCCR;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDIR32_ crca_t<base, per>::CRCDIR32;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDIR16_ crca_t<base, per>::CRCDIR16;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDIR8_ crca_t<base, per>::CRCDIR8;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDOR32_ crca_t<base, per>::CRCDOR32;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDOR16_ crca_t<base, per>::CRCDOR16;
template <uint32_t base, peripheral per>
typename crca_t<base, per>::CRCDOR8_ crca_t<base, per>::CRCDOR8;
typedef crca_t<0x00088280, peripheral::CRC> CRCA;
}
| 33.365591 | 75 | 0.514663 | hirakuni45 |
384156e73e2b6b3d85cdb4a2645adbc76e1f0504 | 1,550 | cpp | C++ | Ch05_Sort/215_Kth_Largest_Element_In_An_Array.cpp | Frodocz/LeetCode101 | 2dfa3c2749e59d44df892300a720fbe070625351 | [
"MIT"
] | null | null | null | Ch05_Sort/215_Kth_Largest_Element_In_An_Array.cpp | Frodocz/LeetCode101 | 2dfa3c2749e59d44df892300a720fbe070625351 | [
"MIT"
] | null | null | null | Ch05_Sort/215_Kth_Largest_Element_In_An_Array.cpp | Frodocz/LeetCode101 | 2dfa3c2749e59d44df892300a720fbe070625351 | [
"MIT"
] | null | null | null | /**
* 5.2 Quick Selection
* 215. Kth Largest Element in an Array(Medium)
*
* Given an integer array nums and an integer k, return the kth largest element in the array.
*
* Note that it is the kth largest element in the sorted order, not the kth distinct element.
*
* Input: nums = [3,2,1,5,6,4], k = 2, Output: 5
*
* Input: nums = [3,2,3,1,2,4,5,5,6], k = 4, Output: 4
*
* Input: s = "a", t = "aa", Output: ""
* Explanation: Both 'a's from t must be included in the window.
* Since the largest window of s only has one 'a', return empty string.
*
* Constraints:
* * 1 <= k <= nums.length <= 10^4
* * -10^4 <= nums[i] <= 10^4
*
*/
int findKthLargest(vector<int>& nums, int k) {
sort(nums.rbegin(), nums.rend());
return nums[k - 1];
}
// 主函数
int findKthLargest(vector<int>& nums, int k) {
int l = 0, r = nums.size() - 1, target = nums.size() - k;
while (l < r) {
int mid = quickSelection(nums, l, r);
if (mid == target) {
return nums[mid];
}
if (mid < target) {
l = mid + 1;
} else {
r = mid - 1;
}
}
return nums[l];
}
// 辅函数 - 快速选择
int quickSelection(vector<int>& nums, int l, int r) {
int i = l + 1, j = r;
while (true) {
while (i < r && nums[i] <= nums[l]) {
++i;
}
while (l < j && nums[j] >= nums[l]) {
--j;
}
if (i >= j) {
break;
}
swap(nums[i], nums[j]);
}
swap(nums[l], nums[j]);
return j;
} | 25 | 93 | 0.495484 | Frodocz |
38423a5734fffc41c486656ddc1339db4ba63e9b | 7,827 | hpp | C++ | Source/CCZ4/CCZ4RHS.impl.hpp | hfinkel/GRChombo | f3f0f0dbcd3368f721eef5d5cea7808f2550d5cf | [
"BSD-3-Clause"
] | null | null | null | Source/CCZ4/CCZ4RHS.impl.hpp | hfinkel/GRChombo | f3f0f0dbcd3368f721eef5d5cea7808f2550d5cf | [
"BSD-3-Clause"
] | null | null | null | Source/CCZ4/CCZ4RHS.impl.hpp | hfinkel/GRChombo | f3f0f0dbcd3368f721eef5d5cea7808f2550d5cf | [
"BSD-3-Clause"
] | null | null | null | /* GRChombo
* Copyright 2012 The GRChombo collaboration.
* Please refer to LICENSE in GRChombo's root directory.
*/
#if !defined(CCZ4RHS_HPP_)
#error "This file should only be included through CCZ4RHS.hpp"
#endif
#ifndef CCZ4RHS_IMPL_HPP_
#define CCZ4RHS_IMPL_HPP_
#include "DimensionDefinitions.hpp"
#include "GRInterval.hpp"
#include "VarsTools.hpp"
template <class gauge_t, class deriv_t>
inline CCZ4RHS<gauge_t, deriv_t>::CCZ4RHS(
CCZ4_params_t<typename gauge_t::params_t> a_params, double a_dx,
double a_sigma, int a_formulation, double a_cosmological_constant)
: m_params(a_params), m_gauge(a_params), m_sigma(a_sigma),
m_formulation(a_formulation),
m_cosmological_constant(a_cosmological_constant), m_deriv(a_dx)
{
// A user who wants to use BSSN should also have damping paramters = 0
if (m_formulation == USE_BSSN)
{
if ((m_params.kappa1 != 0.) || (m_params.kappa2 != 0.) ||
(m_params.kappa3 != 0.))
{
MayDay::Error("BSSN formulation is selected - CCZ4 kappa values "
"should be set to zero in params");
}
}
if (m_formulation > USE_BSSN)
MayDay::Error("The requested formulation is not supported");
}
template <class gauge_t, class deriv_t>
template <class data_t>
void CCZ4RHS<gauge_t, deriv_t>::compute(Cell<data_t> current_cell) const
{
const auto vars = current_cell.template load_vars<Vars>();
const auto d1 = m_deriv.template diff1<Vars>(current_cell);
const auto d2 = m_deriv.template diff2<Diff2Vars>(current_cell);
const auto advec =
m_deriv.template advection<Vars>(current_cell, vars.shift);
Vars<data_t> rhs;
rhs_equation(rhs, vars, d1, d2, advec);
m_deriv.add_dissipation(rhs, current_cell, m_sigma);
current_cell.store_vars(rhs); // Write the rhs into the output FArrayBox
}
template <class gauge_t, class deriv_t>
template <class data_t, template <typename> class vars_t,
template <typename> class diff2_vars_t>
void CCZ4RHS<gauge_t, deriv_t>::rhs_equation(
vars_t<data_t> &rhs, const vars_t<data_t> &vars,
const vars_t<Tensor<1, data_t>> &d1,
const diff2_vars_t<Tensor<2, data_t>> &d2,
const vars_t<data_t> &advec) const
{
using namespace TensorAlgebra;
auto h_UU = compute_inverse_sym(vars.h);
auto chris = compute_christoffel(d1.h, h_UU);
Tensor<1, data_t> Z_over_chi;
Tensor<1, data_t> Z;
if (m_formulation == USE_BSSN)
{
FOR1(i) Z_over_chi[i] = 0.0;
}
else
{
FOR1(i) Z_over_chi[i] = 0.5 * (vars.Gamma[i] - chris.contracted[i]);
}
FOR1(i) Z[i] = vars.chi * Z_over_chi[i];
auto ricci =
CCZ4Geometry::compute_ricci_Z(vars, d1, d2, h_UU, chris, Z_over_chi);
data_t divshift = compute_trace(d1.shift);
data_t Z_dot_d1lapse = compute_dot_product(Z, d1.lapse);
data_t dlapse_dot_dchi = compute_dot_product(d1.lapse, d1.chi, h_UU);
Tensor<2, data_t> covdtilde2lapse;
Tensor<2, data_t> covd2lapse;
FOR2(k, l)
{
covdtilde2lapse[k][l] = d2.lapse[k][l];
FOR1(m) { covdtilde2lapse[k][l] -= chris.ULL[m][k][l] * d1.lapse[m]; }
covd2lapse[k][l] =
vars.chi * covdtilde2lapse[k][l] +
0.5 * (d1.lapse[k] * d1.chi[l] + d1.chi[k] * d1.lapse[l] -
vars.h[k][l] * dlapse_dot_dchi);
}
data_t tr_covd2lapse = -(GR_SPACEDIM / 2.0) * dlapse_dot_dchi;
FOR1(i)
{
tr_covd2lapse -= vars.chi * chris.contracted[i] * d1.lapse[i];
FOR1(j)
{
tr_covd2lapse += h_UU[i][j] * (vars.chi * d2.lapse[i][j] +
d1.lapse[i] * d1.chi[j]);
}
}
Tensor<2, data_t> A_UU = raise_all(vars.A, h_UU);
// A^{ij} A_{ij}. - Note the abuse of the compute trace function.
data_t tr_A2 = compute_trace(vars.A, A_UU);
rhs.chi = advec.chi +
(2.0 / GR_SPACEDIM) * vars.chi * (vars.lapse * vars.K - divshift);
FOR2(i, j)
{
rhs.h[i][j] = advec.h[i][j] - 2.0 * vars.lapse * vars.A[i][j] -
(2.0 / GR_SPACEDIM) * vars.h[i][j] * divshift;
FOR1(k)
{
rhs.h[i][j] +=
vars.h[k][i] * d1.shift[k][j] + vars.h[k][j] * d1.shift[k][i];
}
}
Tensor<2, data_t> Adot_TF;
FOR2(i, j)
{
Adot_TF[i][j] =
-covd2lapse[i][j] + vars.chi * vars.lapse * ricci.LL[i][j];
}
make_trace_free(Adot_TF, vars.h, h_UU);
FOR2(i, j)
{
rhs.A[i][j] = advec.A[i][j] + Adot_TF[i][j] +
vars.A[i][j] * (vars.lapse * (vars.K - 2 * vars.Theta) -
(2.0 / GR_SPACEDIM) * divshift);
FOR1(k)
{
rhs.A[i][j] +=
vars.A[k][i] * d1.shift[k][j] + vars.A[k][j] * d1.shift[k][i];
FOR1(l)
{
rhs.A[i][j] -=
2 * vars.lapse * h_UU[k][l] * vars.A[i][k] * vars.A[l][j];
}
}
}
data_t kappa1_times_lapse;
if (m_params.covariantZ4)
kappa1_times_lapse = m_params.kappa1;
else
kappa1_times_lapse = m_params.kappa1 * vars.lapse;
if (m_formulation == USE_BSSN)
{
rhs.Theta = 0; // ensure the Theta of CCZ4 remains at zero
// Use hamiltonian constraint to remove ricci.scalar for BSSN update
rhs.K = advec.K + vars.lapse * (tr_A2 + vars.K * vars.K / GR_SPACEDIM) -
tr_covd2lapse;
rhs.K += -2 * vars.lapse * m_cosmological_constant / (GR_SPACEDIM - 1.);
}
else
{
rhs.Theta =
advec.Theta +
0.5 * vars.lapse *
(ricci.scalar - tr_A2 +
((GR_SPACEDIM - 1.0) / (double)GR_SPACEDIM) * vars.K * vars.K -
2 * vars.Theta * vars.K) -
0.5 * vars.Theta * kappa1_times_lapse *
((GR_SPACEDIM + 1) + m_params.kappa2 * (GR_SPACEDIM - 1)) -
Z_dot_d1lapse;
rhs.Theta += -vars.lapse * m_cosmological_constant;
rhs.K =
advec.K +
vars.lapse * (ricci.scalar + vars.K * (vars.K - 2 * vars.Theta)) -
kappa1_times_lapse * GR_SPACEDIM * (1 + m_params.kappa2) *
vars.Theta -
tr_covd2lapse;
rhs.K += -2 * vars.lapse * GR_SPACEDIM / (GR_SPACEDIM - 1.) *
m_cosmological_constant;
}
Tensor<1, data_t> Gammadot;
FOR1(i)
{
Gammadot[i] = (2.0 / GR_SPACEDIM) *
(divshift * (chris.contracted[i] +
2 * m_params.kappa3 * Z_over_chi[i]) -
2 * vars.lapse * vars.K * Z_over_chi[i]) -
2 * kappa1_times_lapse * Z_over_chi[i];
FOR1(j)
{
Gammadot[i] +=
2 * h_UU[i][j] *
(vars.lapse * d1.Theta[j] - vars.Theta * d1.lapse[j]) -
2 * A_UU[i][j] * d1.lapse[j] -
vars.lapse * ((2 * (GR_SPACEDIM - 1.0) / (double)GR_SPACEDIM) *
h_UU[i][j] * d1.K[j] +
GR_SPACEDIM * A_UU[i][j] * d1.chi[j] / vars.chi) -
(chris.contracted[j] + 2 * m_params.kappa3 * Z_over_chi[j]) *
d1.shift[i][j];
FOR1(k)
{
Gammadot[i] +=
2 * vars.lapse * chris.ULL[i][j][k] * A_UU[j][k] +
h_UU[j][k] * d2.shift[i][j][k] +
((GR_SPACEDIM - 2.0) / (double)GR_SPACEDIM) * h_UU[i][j] *
d2.shift[k][j][k];
}
}
}
FOR1(i) { rhs.Gamma[i] = advec.Gamma[i] + Gammadot[i]; }
m_gauge.rhs_gauge(rhs, vars, d1, d2, advec);
}
#endif /* CCZ4RHS_IMPL_HPP_ */
| 34.030435 | 80 | 0.54082 | hfinkel |
3845043e7ea7fe041a3f285d61eed2c25469e5bd | 782 | cpp | C++ | code/c++.cpp | zrz1996/ACM-Template | 5bd2999480275ad7e1cffc7c1f2c85fa727f0620 | [
"MIT"
] | 1 | 2017-05-22T02:51:30.000Z | 2017-05-22T02:51:30.000Z | code/c++.cpp | zrz1996/ACM-Template | 5bd2999480275ad7e1cffc7c1f2c85fa727f0620 | [
"MIT"
] | null | null | null | code/c++.cpp | zrz1996/ACM-Template | 5bd2999480275ad7e1cffc7c1f2c85fa727f0620 | [
"MIT"
] | null | null | null | C(n,m)奇偶 如果(n & m) == m,那么为奇数,否则为偶数
欧拉线上的四点中,九点圆圆心到垂心和外心的距离相等,而且重心到外心的距离是重心到垂心距离的一半。
定比分点:P, O, M, PM/MO = t; M = (P + t*O) / (1+t)
求因子和
\sum_{t_1=1}^{n_1} \sum_{t_2=1}^{n_2} \cdots \sum_{t_k=1}^{n_k} d(t_1 t_2 \cdots t_k) = \sum_{\substack{1 \leq t_i \leq n_i \ \textbf{for} \ 1 \leq i \leq k \\ (t_i,t_j)=1 \ \textbf{for} \ 1 \leq i < j \leq k}}[\frac{n_1}{t_1}][\frac{n_2}{t_2}]\cdots [\frac{n_k}{t_k}]
.vimrc
set smartindent
set cindent
set number
set st=4
set ts=4
set sw=4
map <F9> :w<cr>:!g++ % -o %< -g -Wall<cr>
map <C-F9> :!time ./%<<cr>
map <F4> :w<cr>:!gedit %<cr>
set smarttab
set nowrap
#include <iomanip>
cout <<setprecision()
char buf[];
string x = buf;
bool strcmp(buf,"")
vector<> v;
sort(v.begin(), v.end(), cmp);
priority_queue<int, vector<int>, cmp> P;
| 25.225806 | 268 | 0.611253 | zrz1996 |
384d8d3c7d44bba5453d7eb64e8bfad9455cde5c | 3,206 | hpp | C++ | stan/math/prim/fun/exp.hpp | detcitty/math | fe99d5f31171edb24bc841a9fa2f082982771d35 | [
"BSD-3-Clause"
] | null | null | null | stan/math/prim/fun/exp.hpp | detcitty/math | fe99d5f31171edb24bc841a9fa2f082982771d35 | [
"BSD-3-Clause"
] | null | null | null | stan/math/prim/fun/exp.hpp | detcitty/math | fe99d5f31171edb24bc841a9fa2f082982771d35 | [
"BSD-3-Clause"
] | null | null | null | #ifndef STAN_MATH_PRIM_FUN_EXP_HPP
#define STAN_MATH_PRIM_FUN_EXP_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
#include <stan/math/prim/functor/apply_vector_unary.hpp>
#include <cmath>
#include <complex>
#include <limits>
namespace stan {
namespace math {
/**
* Structure to wrap `exp()` so that it can be
* vectorized.
*/
struct exp_fun {
/**
* Return the exponential of the specified scalar argument.
*
* @tparam T type of argument
* @param[in] x argument
* @return Exponential of argument.
*/
template <typename T>
static inline T fun(const T& x) {
using std::exp;
return exp(x);
}
};
/**
* Return the elementwise `exp()` of the specified argument,
* which may be a scalar or any Stan container of numeric scalars.
* The return type is the same as the argument type.
*
* @tparam Container type of container
* @param[in] x container
* @return Elementwise application of exponentiation to the argument.
*/
template <
typename Container,
require_not_container_st<std::is_arithmetic, Container>* = nullptr,
require_not_nonscalar_prim_or_rev_kernel_expression_t<Container>* = nullptr,
require_not_var_matrix_t<Container>* = nullptr>
inline auto exp(const Container& x) {
return apply_scalar_unary<exp_fun, Container>::apply(x);
}
/**
* Version of `exp()` that accepts std::vectors, Eigen Matrix/Array objects
* or expressions, and containers of these.
*
* @tparam Container Type of x
* @param x Container
* @return Elementwise application of exponentiation to the argument.
*/
template <typename Container,
require_container_st<std::is_arithmetic, Container>* = nullptr>
inline auto exp(const Container& x) {
return apply_vector_unary<Container>::apply(
x, [](const auto& v) { return v.array().exp(); });
}
namespace internal {
/**
* Return the natural (base e) complex exponentiation of the specified
* complex argument.
*
* @tparam V value type (must be Stan autodiff type)
* @param z complex number
* @return natural exponentiation of specified complex number
* @see documentation for `std::complex` for boundary condition and
* branch cut details
*/
template <typename V>
inline std::complex<V> complex_exp(const std::complex<V>& z) {
if (is_inf(z.real()) && z.real() > 0) {
if (is_nan(z.imag()) || z.imag() == 0) {
// (+inf, nan), (+inf, 0)
return z;
} else if (is_inf(z.imag()) && z.imag() > 0) {
// (+inf, +inf)
return {z.real(), std::numeric_limits<double>::quiet_NaN()};
} else if (is_inf(z.imag()) && z.imag() < 0) {
// (+inf, -inf)
return {std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN()};
}
}
if (is_inf(z.real()) && z.real() < 0
&& (is_nan(z.imag()) || is_inf(z.imag()))) {
// (-inf, nan), (-inf, -inf), (-inf, inf)
return {0, 0};
}
if (is_nan(z.real()) && z.imag() == -0.0) {
// (nan, -0)
return z;
}
V exp_re = exp(z.real());
return {exp_re * cos(z.imag()), exp_re * sin(z.imag())};
}
} // namespace internal
} // namespace math
} // namespace stan
#endif
| 29.412844 | 80 | 0.657517 | detcitty |
3853db83326e61731bef128a87042e71cfdfee7b | 442 | cc | C++ | tests/fuzzer/flexbuffers_verifier_fuzzer.cc | Apotell/flatbuffers | b92bb0584d056cd237fa7059702e49617ee156b7 | [
"Apache-2.0"
] | null | null | null | tests/fuzzer/flexbuffers_verifier_fuzzer.cc | Apotell/flatbuffers | b92bb0584d056cd237fa7059702e49617ee156b7 | [
"Apache-2.0"
] | null | null | null | tests/fuzzer/flexbuffers_verifier_fuzzer.cc | Apotell/flatbuffers | b92bb0584d056cd237fa7059702e49617ee156b7 | [
"Apache-2.0"
] | null | null | null | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "flatbuffers/flexbuffers.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
std::vector<bool> reuse_tracker;
flexbuffers::VerifyBuffer(data, size, &reuse_tracker);
return 0;
}
| 29.466667 | 73 | 0.748869 | Apotell |
3856fef9c4accc0591b791dca122fb6b163ac890 | 10,647 | cpp | C++ | argCheck/argCheck.cpp | ambiesoft/argCheck | 7726c13491dce8ad440690169eb8aa99a08d8486 | [
"BSD-2-Clause"
] | null | null | null | argCheck/argCheck.cpp | ambiesoft/argCheck | 7726c13491dce8ad440690169eb8aa99a08d8486 | [
"BSD-2-Clause"
] | null | null | null | argCheck/argCheck.cpp | ambiesoft/argCheck | 7726c13491dce8ad440690169eb8aa99a08d8486 | [
"BSD-2-Clause"
] | null | null | null | //BSD 2-Clause License
//
//Copyright (c) 2017, Ambiesoft
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//
//* Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
//* Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
//FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
//DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
//SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
//OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "stdafx.h"
#include "../../lsMisc/CommandLineString.h"
#include "../../lsMisc/HighDPI.h"
#include "../../lsMisc/OpenCommon.h"
#include "../../lsMisc/EnableTextTripleClickSelectAll.h"
#include "../../lsMisc/I18N.h"
#include "../../lsMisc/GetVersionString.h"
#include "argCheck.h"
using namespace std;
using namespace Ambiesoft;
using namespace Ambiesoft::stdosd;
#define MAX_LOADSTRING 100
#define APPNAME L"argCheck"
#define KAIGYO L"\r\n"
#define HORIZLINE L"----------------------------------"
HINSTANCE ghInst;
WCHAR szTitle[MAX_LOADSTRING];
WCHAR szWindowClass[MAX_LOADSTRING];
wstring gIni;
struct MainDialogData {
wstring title_;
wstring message_;
wstring commnadline_;
bool again_;
bool bWW_;
};
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
{
wstring version = GetVersionString(stdGetModuleFileName().c_str(), 3);
SetDlgItemText(hDlg, IDC_STATIC_TITLEANDVERSION,
stdFormat(L"%s v%s", APPNAME, version.c_str()).c_str());
return (INT_PTR)TRUE;
}
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
else if (LOWORD(wParam) == IDC_BUTTON_GOTOWEB)
{
OpenCommon(hDlg, L"https://ambiesoft.github.io/webjumper/?target=argCheck");
}
break;
}
return (INT_PTR)FALSE;
}
wstring ParseCommandLine(LPCWSTR pCommnadLine = nullptr)
{
bool bUserInput = pCommnadLine != nullptr;
if (!pCommnadLine)
{
pCommnadLine = GetCommandLine();
}
wstring message;
message += I18N(L"Current Directory");
message += L":";
message += KAIGYO;
message += stdGetCurrentDirectory();
message += KAIGYO;
message += KAIGYO;
message += I18N(L"Command Line");
message += L":";
message += KAIGYO;
message += pCommnadLine;
message += KAIGYO;
message += KAIGYO;
message += I18N(L"Length");
message += L":";
message += KAIGYO;
message += std::to_wstring(lstrlen(pCommnadLine));
message += KAIGYO;
message += KAIGYO;
// CRT
if (bUserInput)
{
message += L"CRT is not available.";
message += KAIGYO;
message += HORIZLINE;
message += KAIGYO;
message += KAIGYO;
}
else
{
message += L"CRT";
message += KAIGYO;
message += HORIZLINE;
message += KAIGYO;
{
message += I18N(L"CRT argc");
message += L":";
message += KAIGYO;
message += to_wstring(__argc);
message += KAIGYO;
message += KAIGYO;
for (int i = 0; i < __argc; ++i)
{
message += I18N(L"CRT Argument");
message += L" ";
message += to_wstring(i);
message += L":";
message += KAIGYO;
message += __wargv[i];
message += KAIGYO;
message += KAIGYO;
}
}
}
// CommandLineToArgvW
message += L"CommandLineToArgvW";
message += KAIGYO;
message += HORIZLINE;
message += KAIGYO;
{
int nNumArgs = 0;
LPWSTR* pArgv = CommandLineToArgvW(pCommnadLine, &nNumArgs);
message += I18N(L"Shell argc");
message += L":";
message += KAIGYO;
message += to_wstring(nNumArgs);
message += KAIGYO;
message += KAIGYO;
for (int i = 0; i < nNumArgs; ++i)
{
message += I18N(L"Shell Argument");
message += L" ";
message += to_wstring(i);
message += L":";
message += KAIGYO;
message += pArgv[i];
message += KAIGYO;
message += KAIGYO;
}
LocalFree(pArgv);
}
// CCommandLineString
message += L"CCommandLineString";
message += KAIGYO;
message += HORIZLINE;
message += KAIGYO;
{
int nNumArgs = 0;
LPWSTR* pArgv = CCommandLineString::getCommandLineArg(pCommnadLine, &nNumArgs);
message += I18N(L"CCommandLineString argc");
message += L":";
message += KAIGYO;
message += to_wstring(nNumArgs);
message += KAIGYO;
message += KAIGYO;
for (int i = 0; i < nNumArgs; ++i)
{
message += I18N(L"CCommandLineString Argument");
message += L" ";
message += to_wstring(i);
message += L":";
message += KAIGYO;
message += pArgv[i];
message += KAIGYO;
message += KAIGYO;
}
CCommandLineString::freeCommandLineArg(pArgv);
}
return message;
}
//// http://rarara.cafe.coocan.jp/cgi-bin/lng/vc/vclng.cgi?print+200807/08070047.txt
//BOOL GetRightTurn(HWND hEdit)
//{
// LONG lStyle = GetWindowLong(hEdit, GWL_STYLE);
//
// return (lStyle & ES_AUTOHSCROLL) ? FALSE : TRUE;
//}
//BOOL SetRightTurn(HWND hEdit, BOOL bRightTurn)
//{
// BOOL bRight = GetRightTurn(hEdit);
// LONG lStyle = GetWindowLong(hEdit, GWL_STYLE);
//
// if (bRightTurn){
// lStyle &= ~(WS_HSCROLL | ES_AUTOHSCROLL);
// }
// else{
// lStyle |= (WS_HSCROLL | ES_AUTOHSCROLL);
// }
// SetWindowLong(hEdit, GWL_STYLE, lStyle);
// SetWindowPos(hEdit, NULL, 0, 0, 0, 0,
// (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED));
// return bRight;
//}
void setWW(HWND hDlg, BOOL bOn)
{
if (bOn)
{
// WW on
ShowWindow(GetDlgItem(hDlg, IDC_EDIT_MAINWW), SW_SHOW);
ShowWindow(GetDlgItem(hDlg, IDC_EDIT_MAIN), SW_HIDE);
}
else
{
ShowWindow(GetDlgItem(hDlg, IDC_EDIT_MAINWW), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_EDIT_MAIN), SW_SHOW);
}
}
wstring GetDialogText(HWND hDlg, UINT id)
{
int len = GetWindowTextLength(GetDlgItem(hDlg, id));
std::vector<wchar_t> buff(len + 1);
GetDlgItemText(hDlg, id, &buff[0], len + 1);
buff[len] = 0;
return &buff[0];
}
INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static MainDialogData* spData;
switch (uMsg)
{
case WM_INITDIALOG:
{
spData = (MainDialogData*)lParam;
HWND i18nExcepts[] = {
GetDlgItem(hDlg,IDOK),
};
i18nChangeDialogText(hDlg, i18nExcepts, _countof(i18nExcepts));
i18nChangeMenuText(GetMenu(hDlg));
SetWindowText(hDlg, spData->title_.c_str());
SetDlgItemText(hDlg, IDC_EDIT_COMMANDLINE, spData->commnadline_.c_str());
EnableTextTripleClickSelectAll(GetDlgItem(hDlg, IDC_EDIT_COMMANDLINE));
SetDlgItemText(hDlg, IDC_EDIT_MAIN, spData->message_.c_str());
SetDlgItemText(hDlg, IDC_EDIT_MAINWW, spData->message_.c_str());
int intval = GetPrivateProfileInt(L"Option", L"WordWrap", 0, gIni.c_str()) !=0;
setWW(hDlg,intval);
SendDlgItemMessage(hDlg, IDC_CHECK_WORDWRAP, BM_SETCHECK, intval, 0);
HICON hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ARGCHECK));
SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
CenterWindow(hDlg);
return TRUE;
}
break;
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDOK:
if(GetFocus()==GetDlgItem(hDlg, IDC_EDIT_COMMANDLINE))
{
PostMessage(hDlg, WM_COMMAND, IDC_BUTTON_REPARSE, 0);
break;
}
// through
case IDM_EXIT:
{
LRESULT ww = SendDlgItemMessage(hDlg, IDC_CHECK_WORDWRAP, BM_GETCHECK, 0, 0);
if (!WritePrivateProfileString(L"Option", L"WordWrap", ww ? L"1" : L"0", gIni.c_str()))
{
MessageBox(hDlg, L"Save failed", APPNAME, MB_ICONERROR);
}
EndDialog(hDlg, IDOK);
return 0;
}
break;
case IDCANCEL:
{
EndDialog(hDlg, IDCANCEL);
return 0;
}
break;
case IDC_BUTTON_REPARSE:
{
wstring text = GetDialogText(hDlg, IDC_EDIT_COMMANDLINE);
wstring message = ParseCommandLine(text.c_str());
SetDlgItemText(hDlg, IDC_EDIT_MAIN, message.c_str());
SetDlgItemText(hDlg, IDC_EDIT_MAINWW, message.c_str());
}
break;
case IDC_BUTTON_NEWINSTANCE:
{
wstring exe = stdGetModuleFileName();
wstring text = GetDialogText(hDlg, IDC_EDIT_COMMANDLINE);
OpenCommon(hDlg,
exe.c_str(),
text.c_str());
}
break;
case IDC_CHECK_WORDWRAP:
{
//SetRightTurn(GetDlgItem(hDlg, IDC_EDIT_MAIN),
// 0 != SendDlgItemMessage(hDlg, IDC_CHECK_WORDWRAP, BM_GETCHECK, 0, 0));
setWW(hDlg,0 != SendDlgItemMessage(hDlg, IDC_CHECK_WORDWRAP, BM_GETCHECK, 0, 0));
}
break;
case IDM_ABOUT:
{
DialogBox(ghInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hDlg, About);
}
break;
}
}
break;
}
return FALSE;
}
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
i18nInitLangmap(NULL, NULL, APPNAME);
ghInst = hInstance;
InitHighDPISupport();
gIni = stdCombinePath(stdGetParentDirectory(stdGetModuleFileName()),
stdGetFileNameWitoutExtension(APPNAME) + L".ini");
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_ARGCHECK, szWindowClass, MAX_LOADSTRING);
wstring message = ParseCommandLine();
//MessageBox(NULL,
// message.c_str(),
// szTitle,
// MB_ICONINFORMATION);
MainDialogData data;
do
{
data.title_ = szTitle;
data.message_ = message;
data.commnadline_ = GetCommandLine();
data.again_ = false;
if (IDOK != DialogBoxParam(hInstance,
MAKEINTRESOURCE(IDD_DIALOG_MAIN),
NULL,
MainDlgProc,
(LPARAM)&data))
{
return 100;
}
} while (data.again_);
return 0;
}
| 24.645833 | 91 | 0.6646 | ambiesoft |
ee2da4a15c7d17cb69f9740fc5387bbf027943ff | 13,649 | cpp | C++ | code/engine.vc2008/xrGame/ui/UIInventoryUpgradeWnd.cpp | Rikoshet-234/xray-oxygen | eaac3fa4780639152684f3251b8b4452abb8e439 | [
"Apache-2.0"
] | 7 | 2018-03-27T12:36:07.000Z | 2020-06-26T11:31:52.000Z | code/engine.vc2008/xrGame/ui/UIInventoryUpgradeWnd.cpp | Rikoshet-234/xray-oxygen | eaac3fa4780639152684f3251b8b4452abb8e439 | [
"Apache-2.0"
] | 2 | 2018-05-26T23:17:14.000Z | 2019-04-14T18:33:27.000Z | code/engine.vc2008/xrGame/ui/UIInventoryUpgradeWnd.cpp | Rikoshet-234/xray-oxygen | eaac3fa4780639152684f3251b8b4452abb8e439 | [
"Apache-2.0"
] | 3 | 2021-11-01T06:21:26.000Z | 2022-01-08T16:13:23.000Z | ////////////////////////////////////////////////////////////////////////////
// Module : UIInventoryUpgradeWnd.cpp
// Created : 06.10.2007
// Modified : 13.03.2009
// Author : Evgeniy Sokolov, Prishchepa Sergey
// Description : inventory upgrade UI window class implementation
////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "object_broker.h"
#include "UIInventoryUpgradeWnd.h"
#include "../xrUICore/xrUIXmlParser.h"
#include "../xrUICore/UIXmlInit.h"
#include "../xrEngine/string_table.h"
#include "../actor.h"
#include "../../xrServerEntities/script_process.h"
#include "../inventory.h"
#include "ai_space.h"
#include "alife_simulator.h"
#include "inventory_upgrade_manager.h"
#include "inventory_upgrade.h"
#include "inventory_upgrade_property.h"
#include "UIInventoryUtilities.h"
#include "UIActorMenu.h"
#include "UIItemInfo.h"
#include "../xrUICore/UIFrameLineWnd.h"
#include "../xrUICore/UI3tButton.h"
#include "../xrUICore/UIHelper.h"
#include "../../xrUICore/ui_defs.h"
#include "../items/Weapon.h"
#include "../items/WeaponRPG7.h"
#include "../items/CustomOutfit.h"
#include "../items/Helmet.h"
// -----
const char* const g_inventory_upgrade_xml = "inventory_upgrade.xml";
CUIInventoryUpgradeWnd::Scheme::Scheme()
{
}
CUIInventoryUpgradeWnd::Scheme::~Scheme()
{
delete_data( cells );
}
// =============================================================================================
CUIInventoryUpgradeWnd::CUIInventoryUpgradeWnd()
{
m_inv_item = NULL;
m_cur_upgrade_id = NULL;
m_current_scheme = NULL;
m_btn_repair = NULL;
}
CUIInventoryUpgradeWnd::~CUIInventoryUpgradeWnd()
{
delete_data( m_schemes );
}
void CUIInventoryUpgradeWnd::Init()
{
CUIXml uiXml;
uiXml.Load( CONFIG_PATH, UI_PATH, g_inventory_upgrade_xml );
CUIXmlInit xml_init;
xml_init.InitWindow( uiXml, "main", 0, this );
m_item = xr_new<CUIStatic>();
m_item->SetAutoDelete( true );
AttachChild( m_item );
xml_init.InitStatic( uiXml, "item_static", 0, m_item );
m_back = xr_new<CUIWindow>();
m_back->SetAutoDelete( true );
xml_init.InitWindow( uiXml, "back", 0, m_back );
AttachChild(m_back);
m_scheme_wnd = xr_new<CUIWindow>();
m_scheme_wnd->SetAutoDelete( true );
AttachChild( m_scheme_wnd );
xml_init.InitWindow( uiXml, "scheme", 0, m_scheme_wnd );
m_btn_repair = UIHelper::Create3tButton( uiXml, "repair_button", this );
LoadCellsBacks( uiXml );
LoadSchemes( uiXml );
}
void CUIInventoryUpgradeWnd::InitInventory( CInventoryItem* item, bool can_upgrade )
{
m_inv_item = item;
bool is_shader = false;
// Загружаем картинку
if (m_item)
{
if (smart_cast<CWeapon*>(item))
{
is_shader = true;
m_item->SetShader(InventoryUtilities::GetWeaponUpgradeIconsShader());
}
else if (smart_cast<CCustomOutfit*>(item) || smart_cast<CHelmet*>(item))
{
is_shader = true;
m_item->SetShader(InventoryUtilities::GetOutfitUpgradeIconsShader());
}
if (is_shader)
{
Irect item_upgrade_grid_rect = item->GetUpgrIconRect();
Frect texture_rect;
texture_rect.lt.set(item_upgrade_grid_rect.x1, item_upgrade_grid_rect.y1);
texture_rect.rb.set(item_upgrade_grid_rect.x2, item_upgrade_grid_rect.y2);
texture_rect.rb.add(texture_rect.lt);
m_item->GetUIStaticItem().SetTextureRect(texture_rect);
m_item->TextureOn();
m_item->SetStretchTexture(true);
Fvector2 v_r = Fvector2().set(item_upgrade_grid_rect.x2, item_upgrade_grid_rect.y2);
if (UI().is_widescreen())
v_r.x *= 0.8f;
m_item->GetUIStaticItem().SetSize(v_r);
m_item->SetWidth(v_r.x);
m_item->SetHeight(v_r.y);
m_item->Show(true);
}
}
else m_item->Show(false);
m_scheme_wnd->DetachAll();
m_scheme_wnd->Show( false );
m_back->DetachAll();
m_back->Show(false);
m_btn_repair->Enable( false );
if ( ai().get_alife() && m_inv_item )
{
if ( install_item( *m_inv_item, can_upgrade ) )
{
UpdateAllUpgrades();
}
}
}
// ------------------------------------------------------------------------------------------
void CUIInventoryUpgradeWnd::Show( bool status )
{
inherited::Show( status );
UpdateAllUpgrades();
}
void CUIInventoryUpgradeWnd::Update()
{
inherited::Update();
}
void CUIInventoryUpgradeWnd::Reset()
{
SCHEMES::iterator ibw = m_schemes.begin();
SCHEMES::iterator iew = m_schemes.end();
for ( ; ibw != iew; ++ibw )
{
UI_Upgrades_type::iterator ib = (*ibw)->cells.begin();
UI_Upgrades_type::iterator ie = (*ibw)->cells.end();
for ( ; ib != ie; ++ib )
{
(*ib)->Reset();
(*ib)->m_point->Reset();
}
}
inherited::Reset();
inherited::ResetAll();
}
void CUIInventoryUpgradeWnd::UpdateAllUpgrades()
{
if ( !m_current_scheme || !m_inv_item )
{
return;
}
UI_Upgrades_type::iterator ib = m_current_scheme->cells.begin();
UI_Upgrades_type::iterator ie = m_current_scheme->cells.end();
for ( ; ib != ie; ++ib )
{
(*ib)->update_item( m_inv_item );
}
}
void CUIInventoryUpgradeWnd::SetCurScheme( const shared_str& id )
{
SCHEMES::iterator ib = m_schemes.begin();
SCHEMES::iterator ie = m_schemes.end();
for ( ; ib != ie; ++ib )
{
if ( (*ib)->name._get() == id._get() )
{
m_current_scheme = (*ib);
return;
}
}
VERIFY_FORMAT(0, "Scheme <%s> does not loaded !", id.c_str());
}
bool CUIInventoryUpgradeWnd::install_item( CInventoryItem& inv_item, bool can_upgrade )
{
m_scheme_wnd->DetachAll();
m_back->DetachAll();
m_btn_repair->Enable( (inv_item.GetCondition() < 0.99f) );
if ( !can_upgrade )
{
#ifdef DEBUG
Msg( "Inventory item <%s> cannot upgrade - Mechanic say.", inv_item.m_section_id.c_str() );
#endif // DEBUG
m_current_scheme = NULL;
return false;
}
LPCSTR scheme_name = get_manager().get_item_scheme( inv_item );
if ( !scheme_name )
{
#ifdef DEBUG
Msg( "Inventory item <%s> does not contain upgrade scheme.", inv_item.m_section_id.c_str() );
#endif // DEBUG
m_current_scheme = NULL;
return false;
}
SetCurScheme( scheme_name );
UI_Upgrades_type::iterator ib = m_current_scheme->cells.begin();
UI_Upgrades_type::iterator ie = m_current_scheme->cells.end();
for ( ; ib != ie; ++ib )
{
UIUpgrade* ui_item = (*ib);
m_scheme_wnd->AttachChild( ui_item );
m_back->AttachChild( ui_item->m_point );
LPCSTR upgrade_name = get_manager().get_upgrade_by_index( inv_item, ui_item->get_scheme_index() );
ui_item->init_upgrade( upgrade_name, inv_item );
Upgrade_type* upgrade_p = get_manager().get_upgrade( upgrade_name );
VERIFY( upgrade_p );
for(u8 i = 0; i < inventory::upgrade::max_properties_count; i++)
{
shared_str prop_name = upgrade_p->get_property_name(i);
if(prop_name.size())
{
Property_type* prop_p = get_manager().get_property( prop_name );
VERIFY( prop_p );
}
}
ui_item->set_texture( UIUpgrade::LAYER_ITEM, upgrade_p->icon_name() );
ui_item->set_texture( UIUpgrade::LAYER_POINT, m_point_textures[UIUpgrade::STATE_ENABLED].c_str() ); //default
ui_item->set_texture( UIUpgrade::LAYER_COLOR, m_cell_textures[UIUpgrade::STATE_ENABLED].c_str() ); //default
}
m_scheme_wnd->Show ( true );
m_item->Show ( true );
m_back->Show ( true );
UpdateAllUpgrades();
return true;
}
UIUpgrade* CUIInventoryUpgradeWnd::FindUIUpgrade( Upgrade_type const* upgr )
{
if ( !m_current_scheme )
{
return NULL;
}
UI_Upgrades_type::iterator ib = m_current_scheme->cells.begin();
UI_Upgrades_type::iterator ie = m_current_scheme->cells.end();
for ( ; ib != ie; ++ib )
{
Upgrade_type* i_upgr = (*ib)->get_upgrade();
if ( upgr == i_upgr )
{
return (*ib);
}
}
return NULL;
}
bool CUIInventoryUpgradeWnd::DBClickOnUIUpgrade( Upgrade_type const* upgr )
{
UpdateAllUpgrades();
UIUpgrade* uiupgr = FindUIUpgrade( upgr );
if ( uiupgr )
{
uiupgr->OnClick();
return true;
}
return false;
}
void CUIInventoryUpgradeWnd::AskUsing( LPCSTR text, LPCSTR upgrade_name )
{
VERIFY( m_inv_item );
VERIFY( upgrade_name );
VERIFY( m_pParentWnd );
UpdateAllUpgrades();
m_cur_upgrade_id = upgrade_name;
CUIActorMenu* parent_wnd = smart_cast<CUIActorMenu*>(m_pParentWnd);
if ( parent_wnd )
{
parent_wnd->CallMessageBoxYesNo( text );
}
}
void CUIInventoryUpgradeWnd::OnMesBoxYes()
{
if ( get_manager().upgrade_install( *m_inv_item, m_cur_upgrade_id, false ) )
{
VERIFY( m_pParentWnd );
CUIActorMenu* parent_wnd = smart_cast<CUIActorMenu*>( m_pParentWnd );
if ( parent_wnd )
{
parent_wnd->UpdateActor();
parent_wnd->SeparateUpgradeItem();
}
}
UpdateAllUpgrades();
}
void CUIInventoryUpgradeWnd::HighlightHierarchy( shared_str const& upgrade_id )
{
UpdateAllUpgrades();
get_manager().highlight_hierarchy( *m_inv_item, upgrade_id );
}
void CUIInventoryUpgradeWnd::ResetHighlight()
{
UpdateAllUpgrades();
get_manager().reset_highlight( *m_inv_item );
}
void CUIInventoryUpgradeWnd::set_info_cur_upgrade( Upgrade_type* upgrade )
{
UIUpgrade* uiu = FindUIUpgrade( upgrade );
if ( uiu )
{
if ( Device.dwTimeGlobal < uiu->FocusReceiveTime())
{
upgrade = NULL; // visible = false
}
}
else
{
upgrade = NULL;
}
CUIActorMenu* parent_wnd = smart_cast<CUIActorMenu*>(m_pParentWnd);
if ( parent_wnd )
{
if ( parent_wnd->SetInfoCurUpgrade( upgrade, m_inv_item ) )
{
UpdateAllUpgrades();
}
}
}
CUIInventoryUpgradeWnd::Manager_type& CUIInventoryUpgradeWnd::get_manager()
{
return ai().alife().inventory_upgrade_manager();
}
void CUIInventoryUpgradeWnd::LoadCellsBacks(CUIXml& uiXml)
{
XML_NODE* stored_root = uiXml.GetLocalRoot();
int cnt = uiXml.GetNodesNum("cell_states", 0, "state");
XML_NODE* node = uiXml.NavigateToNode("cell_states", 0);
uiXml.SetLocalRoot(node);
for (int i_st = 0; i_st < cnt; ++i_st)
{
uiXml.SetLocalRoot(uiXml.NavigateToNode("state", i_st));
LPCSTR type = uiXml.Read("type", 0, "");
LPCSTR txr = uiXml.Read("back_texture", 0, NULL);
LPCSTR txr2 = uiXml.Read("point_texture", 0, NULL);
u32 color = CUIXmlInit::GetColor(uiXml, "item_color", 0, 0);
LoadCellStates(type, txr, txr2, color);
uiXml.SetLocalRoot(node);
}
uiXml.SetLocalRoot(stored_root);
}
void CUIInventoryUpgradeWnd::LoadCellStates(LPCSTR state_str, LPCSTR texture_name, LPCSTR texture_name2, u32 color)
{
VERIFY(state_str && xr_strcmp(state_str, ""));
if (texture_name && !xr_strcmp(texture_name, ""))
{
texture_name = NULL;
}
if (texture_name2 && !xr_strcmp(texture_name2, ""))
{
texture_name2 = NULL;
}
SetCellState(SelectCellState(state_str), texture_name, texture_name2, color);
}
UIUpgrade::ViewState CUIInventoryUpgradeWnd::SelectCellState(LPCSTR state_str)
{
if (!xr_strcmp(state_str, "enabled")) { return UIUpgrade::STATE_ENABLED; }
if (!xr_strcmp(state_str, "highlight")) { return UIUpgrade::STATE_FOCUSED; }
if (!xr_strcmp(state_str, "touched")) { return UIUpgrade::STATE_TOUCHED; }
if (!xr_strcmp(state_str, "selected")) { return UIUpgrade::STATE_SELECTED; }
if (!xr_strcmp(state_str, "unknown")) { return UIUpgrade::STATE_UNKNOWN; }
if (!xr_strcmp(state_str, "disabled_parent")) { return UIUpgrade::STATE_DISABLED_PARENT; }
if (!xr_strcmp(state_str, "disabled_group")) { return UIUpgrade::STATE_DISABLED_GROUP; }
if (!xr_strcmp(state_str, "disabled_money")) { return UIUpgrade::STATE_DISABLED_PREC_MONEY; }
if (!xr_strcmp(state_str, "disabled_quest")) { return UIUpgrade::STATE_DISABLED_PREC_QUEST; }
if (!xr_strcmp(state_str, "disabled_highlight")) { return UIUpgrade::STATE_DISABLED_FOCUSED; }
VERIFY_FORMAT(0, "Such UI upgrade state (%s) does not exist !", state_str);
return UIUpgrade::STATE_UNKNOWN;
}
void CUIInventoryUpgradeWnd::SetCellState(UIUpgrade::ViewState state, LPCSTR texture_name, LPCSTR texture_name2, u32 color)
{
m_cell_textures[state] = texture_name;
m_point_textures[state] = texture_name2;
}
bool CUIInventoryUpgradeWnd::VerirfyCells()
{
for (int i = 0; i < UIUpgrade::STATE_COUNT; ++i)
{
if (!m_cell_textures[i]._get()) return false;
}
return true;
}
void CUIInventoryUpgradeWnd::LoadSchemes(CUIXml& uiXml)
{
XML_NODE* stored_root = uiXml.GetLocalRoot();
XML_NODE* tmpl_root = uiXml.NavigateToNode("templates", 0);
uiXml.SetLocalRoot(tmpl_root);
Frect t_cell_item;
t_cell_item.x1 = uiXml.ReadAttribFlt("cell_item", 0, "x");
t_cell_item.y1 = uiXml.ReadAttribFlt("cell_item", 0, "y");
t_cell_item.x2 = t_cell_item.x1 + uiXml.ReadAttribFlt("cell_item", 0, "width")*(UI().is_widescreen() ? 0.8f : 1.0f);
t_cell_item.y2 = t_cell_item.y1 + uiXml.ReadAttribFlt("cell_item", 0, "height");
int tmpl_count = uiXml.GetNodesNum(tmpl_root, "template");
for (int i_tmpl = 0; i_tmpl < tmpl_count; ++i_tmpl)
{
XML_NODE* tmpl_node = uiXml.NavigateToNode("template", i_tmpl);
uiXml.SetLocalRoot(tmpl_node);
Scheme* scheme = xr_new<Scheme>();
scheme->cells.reserve(MAX_UI_UPGRADE_CELLS);
LPCSTR name = uiXml.ReadAttrib(tmpl_node, "name", "");
VERIFY(name && xr_strcmp(name, ""));
scheme->name._set(name);
int clm_count = uiXml.GetNodesNum(tmpl_node, "column");
for (int i_clm = 0; i_clm < clm_count; ++i_clm)
{
XML_NODE* clm_node = uiXml.NavigateToNode("column", i_clm);
uiXml.SetLocalRoot(clm_node);
int cell_cnt = uiXml.GetNodesNum(clm_node, "cell");
for (int i_cell = 0; i_cell < cell_cnt; ++i_cell)
{
UIUpgrade* item = xr_new<UIUpgrade>(this);
item->load_from_xml(uiXml, i_clm, i_cell, t_cell_item);
CUIUpgradePoint* item_point = xr_new<CUIUpgradePoint>(item);
item_point->load_from_xml(uiXml, i_cell);
item->attach_point(item_point);
scheme->cells.push_back(item);
}// for i_cell
uiXml.SetLocalRoot(tmpl_node);
}// for i_clm
m_schemes.push_back(scheme);
uiXml.SetLocalRoot(tmpl_root);
}// for i_tmpl
uiXml.SetLocalRoot(stored_root);
}
| 26.606238 | 123 | 0.693604 | Rikoshet-234 |
ee30343c87d9c12ed1924cddfcb6db060a9b8aac | 3,200 | cpp | C++ | WildMagic4/LibFoundation/Intersection/Wm4IntrPlane3Sphere3.cpp | rms80/libgeometry | e60ec7d34968573a9cda3f3bf56d2d4717385dc9 | [
"BSL-1.0"
] | 23 | 2015-08-13T07:36:00.000Z | 2022-01-24T19:00:04.000Z | WildMagic4/LibFoundation/Intersection/Wm4IntrPlane3Sphere3.cpp | rms80/libgeometry | e60ec7d34968573a9cda3f3bf56d2d4717385dc9 | [
"BSL-1.0"
] | null | null | null | WildMagic4/LibFoundation/Intersection/Wm4IntrPlane3Sphere3.cpp | rms80/libgeometry | e60ec7d34968573a9cda3f3bf56d2d4717385dc9 | [
"BSL-1.0"
] | 6 | 2015-07-06T21:37:31.000Z | 2020-07-01T04:07:50.000Z | // Geometric Tools, LLC
// Copyright (c) 1998-2010
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 4.10.0 (2009/11/18)
#include "Wm4FoundationPCH.h"
#include "Wm4IntrPlane3Sphere3.h"
namespace Wm4
{
//----------------------------------------------------------------------------
template <class Real>
IntrPlane3Sphere3<Real>::IntrPlane3Sphere3 (const Plane3<Real>& rkPlane,
const Sphere3<Real>& rkSphere)
:
m_pkPlane(&rkPlane),
m_pkSphere(&rkSphere)
{
}
//----------------------------------------------------------------------------
template <class Real>
const Plane3<Real>& IntrPlane3Sphere3<Real>::GetPlane () const
{
return *m_pkPlane;
}
//----------------------------------------------------------------------------
template <class Real>
const Sphere3<Real>& IntrPlane3Sphere3<Real>::GetSphere () const
{
return *m_pkSphere;
}
//----------------------------------------------------------------------------
template <class Real>
bool IntrPlane3Sphere3<Real>::Test ()
{
Real fSignedDistance = m_pkPlane->DistanceTo(m_pkSphere->Center);
return Math<Real>::FAbs(fSignedDistance) <= m_pkSphere->Radius;
}
//----------------------------------------------------------------------------
template <class Real>
bool IntrPlane3Sphere3<Real>::Find ()
{
Real fSignedDistance = m_pkPlane->DistanceTo(m_pkSphere->Center);
Real fDistance = Math<Real>::FAbs(fSignedDistance);
m_kCircle.Center = m_pkSphere->Center - fSignedDistance*m_pkPlane->Normal;
m_kCircle.N = m_pkPlane->Normal;
if (fDistance <= m_pkSphere->Radius)
{
// The sphere intersects the plane in a circle. The circle is
// degenerate when fDistance is equal to m_pkSphere->Radius, in which
// case the circle radius is zero.
m_kCircle.Radius = Math<Real>::Sqrt(Math<Real>::FAbs(
m_pkSphere->Radius*m_pkSphere->Radius - fDistance*fDistance));
return true;
}
// Additional indication that the circle is invalid.
m_kCircle.Radius = (Real)-1;
return false;
}
//----------------------------------------------------------------------------
template <class Real>
bool IntrPlane3Sphere3<Real>::SphereIsCulled () const
{
Real fSignedDistance = m_pkPlane->DistanceTo(m_pkSphere->Center);
return fSignedDistance <= -m_pkSphere->Radius;
}
//----------------------------------------------------------------------------
template <class Real>
const Circle3<Real>& IntrPlane3Sphere3<Real>::GetCircle () const
{
return m_kCircle;
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// explicit instantiation
//----------------------------------------------------------------------------
template WM4_FOUNDATION_ITEM
class IntrPlane3Sphere3<float>;
template WM4_FOUNDATION_ITEM
class IntrPlane3Sphere3<double>;
//----------------------------------------------------------------------------
}
| 35.955056 | 79 | 0.504688 | rms80 |
ee379876a65fb0fb48fc6ff277e16f5dfb0db337 | 896 | cpp | C++ | src/Consumer.cpp | cieslarmichal/rabbitmq-chatroom | ab538b6c2c1060e34c097d8a4059d97533c717c1 | [
"MIT"
] | null | null | null | src/Consumer.cpp | cieslarmichal/rabbitmq-chatroom | ab538b6c2c1060e34c097d8a4059d97533c717c1 | [
"MIT"
] | null | null | null | src/Consumer.cpp | cieslarmichal/rabbitmq-chatroom | ab538b6c2c1060e34c097d8a4059d97533c717c1 | [
"MIT"
] | null | null | null | #include "Consumer.h"
#include <utility>
#include "ConsoleWriter.h"
namespace chatroom
{
Consumer::Consumer(std::unique_ptr<amqp::AmqpClient> amqpClientInit, std::string userIdInit,
std::string appIdInit, std::string queueNameInit)
: amqpClient{std::move(amqpClientInit)},
userId{std::move(userIdInit)},
appId{std::move(appIdInit)},
queueName{std::move(queueNameInit)}
{
amqpClient->declareQueue(queueName, false, false, false, true);
}
[[noreturn]] void Consumer::startConsuming()
{
while (true)
{
if (const auto envelope = amqpClient->getMessage(queueName))
{
const auto senderId = envelope->userId;
if (envelope->appId == appId and senderId == userId)
{
continue;
}
ConsoleWriter::write(senderId + ": " + envelope->body);
}
}
}
} | 24.216216 | 92 | 0.606027 | cieslarmichal |
ee38e8080ebe29f80fb38b78872150c0898af249 | 2,554 | cpp | C++ | src/Interfaz/Pantalla.cpp | LeonelAguilera/Deeper-Blue | b8df4ab441fa98abfad12ce63b5e961d5af0c15e | [
"MIT"
] | null | null | null | src/Interfaz/Pantalla.cpp | LeonelAguilera/Deeper-Blue | b8df4ab441fa98abfad12ce63b5e961d5af0c15e | [
"MIT"
] | null | null | null | src/Interfaz/Pantalla.cpp | LeonelAguilera/Deeper-Blue | b8df4ab441fa98abfad12ce63b5e961d5af0c15e | [
"MIT"
] | null | null | null | #include "freeglut.h"
#include <math.h>
#include <iostream>
#include <stdlib.h>
#include <ctime>
#include "Controles.h"
#include "ETSIDI.h"
#include "Inicio.h"
#include "Pantalla.h"
#include "Interfaz.h"
using namespace std;
pantalla::pantalla() {
this->ancho = 35;
this->alto = 20;
this->rojo = 255;
this->verde = 255;
this->azul = 255;
this->limite1x = ancho / 2;
this->limite1y = alto / 2;
}
void pantalla::dibuja() {
glDisable(GL_LIGHTING);
glColor3ub(this->rojo, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(-this->limite1x, this->limite1y, 0);
glVertex3d(this->limite1x, this->limite1y, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(this->rojo, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(this->limite1x, this->limite1y, 0);
glVertex3d(this->limite1x, -this->limite1y, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(this->rojo, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(this->limite1x, -this->limite1y, 0);
glVertex3d(-this->limite1x, -this->limite1y, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(this->rojo, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(-this->limite1x, -this->limite1y, 0);
glVertex3d(-this->limite1x, this->limite1y, 0);
glEnd();
glEnable(GL_LIGHTING);
//bordes internos
glDisable(GL_LIGHTING);
glColor3ub(0, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(-this->limite1x+0.25, this->limite1y-0.25, 0);
glVertex3d(this->limite1x-0.25,this->limite1y-0.25, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(0, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(this->limite1x - 0.25, this->limite1y-0.25, 0);
glVertex3d(this->limite1x-0.25 , -this->limite1y+0.25, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(0, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(this->limite1x-0.25, -this->limite1y+0.25, 0);
glVertex3d(-this->limite1x+0.25, -this->limite1y+0.25, 0);
glEnd();
glEnable(GL_LIGHTING);
glDisable(GL_LIGHTING);
glColor3ub(0, this->verde, this->azul);
glBegin(GL_LINES);
glVertex3d(-this->limite1x+0.25, -this->limite1y+0.25, 0);
glVertex3d(-this->limite1x+0.25, this->limite1y-0.25, 0);
glEnd();
glEnable(GL_LIGHTING);
//
}
void pantalla::setcolor(unsigned char r, unsigned char v, unsigned char a) {
this->rojo = r;
this->verde = v;
this->azul = a;
}
| 26.329897 | 77 | 0.673453 | LeonelAguilera |
ee42d13378ce80fa7a323d04cfb42b6343ae787a | 8,691 | cpp | C++ | source/tools/ToolUnitTests/internal_exception_handler_app_lin.cpp | ganboing/pintool | ece4788ffded47124b1c9b203707cc255dbaf20f | [
"Intel"
] | 1 | 2017-06-06T16:02:31.000Z | 2017-06-06T16:02:31.000Z | source/tools/ToolUnitTests/internal_exception_handler_app_lin.cpp | ganboing/pintool | ece4788ffded47124b1c9b203707cc255dbaf20f | [
"Intel"
] | null | null | null | source/tools/ToolUnitTests/internal_exception_handler_app_lin.cpp | ganboing/pintool | ece4788ffded47124b1c9b203707cc255dbaf20f | [
"Intel"
] | null | null | null | /*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2016 Intel Corporation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions
in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution. Neither the name of
the Intel Corporation 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 INTEL OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
END_LEGAL */
/*! @file
* This application used to verify that Pin tool can correctly handle internal exceptions
*/
#include <string>
#include <iostream>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <ucontext.h>
using namespace std;
#ifdef TARGET_IA32
struct fxsave
{
unsigned short _fcw;
unsigned short _fsw;
unsigned char _ftw;
unsigned char _pad1;
unsigned short _fop;
unsigned int _fpuip;
unsigned short _cs;
unsigned short _pad2;
unsigned int _fpudp;
unsigned short _ds;
unsigned short _pad3;
unsigned int _mxcsr;
unsigned int _mxcsrmask;
unsigned char _st[8 * 16];
unsigned char _xmm[8 * 16];
unsigned char _pad4[56 * 4];
};
struct KernelFpstate
{
struct _libc_fpstate _fpregs_mem; // user-visible FP register state (_mcontext points to this)
struct fxsave _fxsave; // full FP state as saved by fxsave instruction
};
#else
struct fxsave
{
unsigned short _cwd;
unsigned short _swd;
unsigned short _twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */
unsigned short _fop;
unsigned long _rip;
unsigned long _rdp;
unsigned int _mxcsr;
unsigned int _mxcsrmask;
unsigned int _st[32]; /* 8*16 bytes for each FP-reg */
unsigned char _xmm[16 * 16]; /* 16*16 bytes for each XMM-reg */
unsigned int _reserved2[24];
};
struct KernelFpstate
{
struct fxsave _fxsave; // user-visible FP register state (_mcontext points to this)
};
#endif
//==========================================================================
// Printing utilities
//==========================================================================
string UnitTestName("internal_exception_handler_app_lin");
static void StartFunctionTest(const string & functionTestName)
{
cerr << UnitTestName << " [ " << functionTestName << " ] Start" << endl << flush;
}
static void EndFunctionTest(const string & functionTestName)
{
cerr << UnitTestName << " [ " << functionTestName << " ] Success" << endl << flush;
}
//================================================================
// Install signal handlers
//================================================================
void div0_signal_handler(int, siginfo_t *, void *);
void install_signal_handlers()
{
int ret;
struct sigaction sSigaction;
/* Register the signal hander using the siginfo interface*/
sSigaction.sa_sigaction = div0_signal_handler;
sSigaction.sa_flags = SA_SIGINFO;
/* mask all other signals */
sigfillset(&sSigaction.sa_mask);
ret = sigaction(SIGFPE, &sSigaction, NULL);
if(ret)
{
perror("ERROR, sigaction failed");
exit(-1);
}
}
//================================================================
// Define signal handlers
//================================================================
#define FCW_ZERO_DIVIDE 0x4
#define MXCSR_ZERO_DIVIDE 0x200
#ifdef TARGET_IA32
# define FCW_MASK_ZERO_DIVIDE (appFpState->_fxsave._fcw |= FCW_ZERO_DIVIDE)
# define FSW_RESET (appFpState->_fxsave._fsw = 0)
# define MSR_MASK_ZERO_DIVIDE (appFpState->_fxsave._mxcsr |= MXCSR_ZERO_DIVIDE)
# define REG_INST_PTR REG_EIP
# define REG_GBX REG_EBX
#else // not TARGET_IA32
# define FCW_MASK_ZERO_DIVIDE (appFpState->_fxsave._cwd |= FCW_ZERO_DIVIDE)
# define FSW_RESET (appFpState->_fxsave._swd = 0)
# define MSR_MASK_ZERO_DIVIDE (appFpState->_fxsave._mxcsr |= MXCSR_ZERO_DIVIDE)
# define REG_INST_PTR REG_RIP
# define REG_GBX REG_RBX
#endif // not TARGET_IA32
#define MCONTEXT_IP_REG uc_mcontext.gregs[REG_INST_PTR]
extern "C" void UnmaskFpZeroDivide();
extern "C" void UnmaskZeroDivideInMxcsr32();
extern "C" void MaskZeroDivideInMxcsr32();
extern "C" void UnmaskZeroDivideInMxcsr();
extern "C" void MaskZeroDivideInMxcsr();
void div0_signal_handler(int signum, siginfo_t *siginfo, void *uctxt)
{
printf("Inside div0 handler\n");
ucontext_t *frameContext = (ucontext_t *)uctxt;
printf("signal %d, code %d (captured EIP: 0x%x)\n", signum, siginfo->si_code,
frameContext->MCONTEXT_IP_REG);
if (siginfo->si_code == FPE_INTDIV)
{
// Move IP to recovery code
// Catch point is kept in %GBX
frameContext->uc_mcontext.gregs[REG_INST_PTR] = frameContext->uc_mcontext.gregs[REG_GBX];
}
else if ((siginfo->si_code == FPE_FLTDIV))
{
// Mask "zero divide" exception in FPU Control Word register
// Reset FPU Status Register
fpregset_t fpState = frameContext->uc_mcontext.fpregs;
/* Change application FP context */
fpregset_t fpPtr = frameContext->uc_mcontext.fpregs;
KernelFpstate *appFpState = reinterpret_cast < KernelFpstate * > (fpPtr);
FCW_MASK_ZERO_DIVIDE;
FSW_RESET;
MSR_MASK_ZERO_DIVIDE;
}
}
// These numbers are for testing only
#define EXCEPTION_INT_DIVIDE_BY_ZERO 18
#define EXCEPTION_FLT_DIVIDE_BY_ZERO 19
static bool CheckExceptionCode(unsigned int exceptCode, unsigned int expectedExceptCode)
{
if (exceptCode != expectedExceptCode)
{
cerr << "Unexpected exception code " <<
hex << exceptCode << ". Should be " <<
hex << expectedExceptCode << endl;
return false;
}
return true;
}
extern "C" unsigned int RaiseIntDivideByZeroException(unsigned int (*)(), unsigned int);
extern "C" unsigned int CatchIntDivideByZeroException();
/*
* Raise "int deivide by zero" exception
*/
void SafeExecuteIntDivideByZero()
{
unsigned int exceptionCaught = RaiseIntDivideByZeroException(CatchIntDivideByZeroException, EXCEPTION_INT_DIVIDE_BY_ZERO);
if (!CheckExceptionCode(exceptionCaught, EXCEPTION_INT_DIVIDE_BY_ZERO))
{
exit(-1);
}
}
/*
* Raise "X87 deivide by zero" exception
*/
extern "C" unsigned int RaiseFltDivideByZeroException(unsigned int exception_code)
{
volatile float zero = 0.0;
volatile float i = 1.0 / zero;
return exception_code;
}
void SafeExecuteFltDivideByZero()
{
UnmaskFpZeroDivide();
#if defined(TARGET_IA32E) || defined(TARGET_MIC)
UnmaskZeroDivideInMxcsr();
#else
UnmaskZeroDivideInMxcsr32();
#endif
unsigned int exceptionCaught = RaiseFltDivideByZeroException(EXCEPTION_FLT_DIVIDE_BY_ZERO);
if (!CheckExceptionCode(exceptionCaught, EXCEPTION_FLT_DIVIDE_BY_ZERO))
{
exit(-1);
}
}
/*!
* The main procedure of the application.
*/
int main(int argc, char *argv[])
{
install_signal_handlers();
StartFunctionTest("Raise int divide by zero in the tool");
SafeExecuteIntDivideByZero();
EndFunctionTest("Raise int divide by zero in the tool");
StartFunctionTest("Raise FP divide by zero in the tool");
SafeExecuteFltDivideByZero();
EndFunctionTest("Raise FP divide by zero in the tool");
}
| 33.298851 | 127 | 0.660338 | ganboing |
ee4359e3a94a0129cc28d6fee906f4081e9f591e | 12,042 | cc | C++ | platforms/unity/unity.cc | seba10000/resonance-audio | e1923fe6fe733ae4d3c8460ff883c87e2ad05d6b | [
"Apache-2.0"
] | 396 | 2018-03-14T09:55:52.000Z | 2022-03-27T14:58:38.000Z | platforms/unity/unity.cc | seba10000/resonance-audio | e1923fe6fe733ae4d3c8460ff883c87e2ad05d6b | [
"Apache-2.0"
] | 46 | 2018-04-18T17:14:29.000Z | 2022-02-19T21:35:57.000Z | platforms/unity/unity.cc | seba10000/resonance-audio | e1923fe6fe733ae4d3c8460ff883c87e2ad05d6b | [
"Apache-2.0"
] | 96 | 2018-03-14T17:20:50.000Z | 2022-03-03T01:12:37.000Z | /*
Copyright 2018 Google Inc. 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 "platforms/unity/unity.h"
#include <algorithm>
#include <memory>
#include "base/audio_buffer.h"
#include "base/constants_and_types.h"
#include "base/logging.h"
#include "base/misc_math.h"
#include "graph/resonance_audio_api_impl.h"
#include "platforms/common/room_effects_utils.h"
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
#include "utils/ogg_vorbis_recorder.h"
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
namespace vraudio {
namespace unity {
namespace {
// Output channels must be stereo for the ResonanceAudio system to run properly.
const size_t kNumOutputChannels = 2;
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
// Maximum number of buffers allowed to record a soundfield, which is set to ~5
// minutes (depending on the sampling rate and the number of frames per buffer).
const size_t kMaxNumRecordBuffers = 15000;
// Record compression quality.
const float kRecordQuality = 1.0f;
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
// Stores the necessary components for the ResonanceAudio system. Methods called
// from the native implementation below must check the validity of this
// instance.
struct ResonanceAudioSystem {
ResonanceAudioSystem(int sample_rate, size_t num_channels,
size_t frames_per_buffer)
: api(CreateResonanceAudioApi(num_channels, frames_per_buffer,
sample_rate)) {
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
is_recording_soundfield = false;
soundfield_recorder.reset(
new OggVorbisRecorder(sample_rate, kNumFirstOrderAmbisonicChannels,
frames_per_buffer, kMaxNumRecordBuffers));
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
}
// ResonanceAudio API instance to communicate with the internal system.
std::unique_ptr<ResonanceAudioApi> api;
// Default room properties, which effectively disable the room effects.
ReflectionProperties null_reflection_properties;
ReverbProperties null_reverb_properties;
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
// Denotes whether the soundfield recording is currently in progress.
bool is_recording_soundfield;
// First-order ambisonic soundfield recorder.
std::unique_ptr<OggVorbisRecorder> soundfield_recorder;
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
};
// Singleton |ResonanceAudioSystem| instance to communicate with the internal
// API.
static std::shared_ptr<ResonanceAudioSystem> resonance_audio = nullptr;
} // namespace
void Initialize(int sample_rate, size_t num_channels,
size_t frames_per_buffer) {
CHECK_GE(sample_rate, 0);
CHECK_EQ(num_channels, kNumOutputChannels);
CHECK_GE(frames_per_buffer, 0);
resonance_audio = std::make_shared<ResonanceAudioSystem>(
sample_rate, num_channels, frames_per_buffer);
}
void Shutdown() { resonance_audio.reset(); }
void ProcessListener(size_t num_frames, float* output) {
CHECK(output != nullptr);
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy == nullptr) {
return;
}
if (!resonance_audio_copy->api->FillInterleavedOutputBuffer(
kNumOutputChannels, num_frames, output)) {
// No valid output was rendered, fill the output buffer with zeros.
const size_t buffer_size_samples = kNumOutputChannels * num_frames;
CHECK(!vraudio::DoesIntegerMultiplicationOverflow<size_t>(
kNumOutputChannels, num_frames, buffer_size_samples));
std::fill(output, output + buffer_size_samples, 0.0f);
}
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
if (resonance_audio_copy->is_recording_soundfield) {
// Record output into soundfield.
auto* const resonance_audio_api_impl =
static_cast<ResonanceAudioApiImpl*>(resonance_audio_copy->api.get());
const auto* soundfield_buffer =
resonance_audio_api_impl->GetAmbisonicOutputBuffer();
std::unique_ptr<AudioBuffer> record_buffer(
new AudioBuffer(kNumFirstOrderAmbisonicChannels, num_frames));
if (soundfield_buffer != nullptr) {
for (size_t ch = 0; ch < kNumFirstOrderAmbisonicChannels; ++ch) {
(*record_buffer)[ch] = (*soundfield_buffer)[ch];
}
} else {
// No output received, fill the record buffer with zeros.
record_buffer->Clear();
}
resonance_audio_copy->soundfield_recorder->AddInput(
std::move(record_buffer));
}
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
}
void SetListenerGain(float gain) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetMasterVolume(gain);
}
}
void SetListenerStereoSpeakerMode(bool enable_stereo_speaker_mode) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetStereoSpeakerMode(enable_stereo_speaker_mode);
}
}
void SetListenerTransform(float px, float py, float pz, float qx, float qy,
float qz, float qw) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetHeadPosition(px, py, pz);
resonance_audio_copy->api->SetHeadRotation(qx, qy, qz, qw);
}
}
ResonanceAudioApi::SourceId CreateSoundfield(int num_channels) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
return resonance_audio_copy->api->CreateAmbisonicSource(num_channels);
}
return ResonanceAudioApi::kInvalidSourceId;
}
ResonanceAudioApi::SourceId CreateSoundObject(RenderingMode rendering_mode) {
SourceId id = ResonanceAudioApi::kInvalidSourceId;
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
id = resonance_audio_copy->api->CreateSoundObjectSource(rendering_mode);
resonance_audio_copy->api->SetSourceDistanceModel(
id, DistanceRolloffModel::kNone, 0.0f, 0.0f);
}
return id;
}
void DestroySource(ResonanceAudioApi::SourceId id) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->DestroySource(id);
}
}
void ProcessSource(ResonanceAudioApi::SourceId id, size_t num_channels,
size_t num_frames, float* input) {
CHECK(input != nullptr);
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetInterleavedBuffer(id, input, num_channels,
num_frames);
}
}
void SetSourceDirectivity(ResonanceAudioApi::SourceId id, float alpha,
float order) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSoundObjectDirectivity(id, alpha, order);
}
}
void SetSourceDistanceAttenuation(ResonanceAudioApi::SourceId id,
float distance_attenuation) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSourceDistanceAttenuation(
id, distance_attenuation);
}
}
void SetSourceGain(ResonanceAudioApi::SourceId id, float gain) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSourceVolume(id, gain);
}
}
void SetSourceListenerDirectivity(ResonanceAudioApi::SourceId id, float alpha,
float order) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSoundObjectListenerDirectivity(id, alpha,
order);
}
}
void SetSourceNearFieldEffectGain(ResonanceAudioApi::SourceId id,
float near_field_effect_gain) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSoundObjectNearFieldEffectGain(
id, near_field_effect_gain);
}
}
void SetSourceOcclusionIntensity(ResonanceAudioApi::SourceId id,
float intensity) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSoundObjectOcclusionIntensity(id, intensity);
}
}
void SetSourceRoomEffectsGain(ResonanceAudioApi::SourceId id,
float room_effects_gain) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSourceRoomEffectsGain(id, room_effects_gain);
}
}
void SetSourceSpread(int id, float spread_deg) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSoundObjectSpread(id, spread_deg);
}
}
void SetSourceTransform(int id, float px, float py, float pz, float qx,
float qy, float qz, float qw) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy != nullptr) {
resonance_audio_copy->api->SetSourcePosition(id, px, py, pz);
resonance_audio_copy->api->SetSourceRotation(id, qx, qy, qz, qw);
}
}
void SetRoomProperties(RoomProperties* room_properties, float* rt60s) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy == nullptr) {
return;
}
if (room_properties == nullptr) {
resonance_audio_copy->api->SetReflectionProperties(
resonance_audio_copy->null_reflection_properties);
resonance_audio_copy->api->SetReverbProperties(
resonance_audio_copy->null_reverb_properties);
return;
}
const auto reflection_properties =
ComputeReflectionProperties(*room_properties);
resonance_audio_copy->api->SetReflectionProperties(reflection_properties);
const auto reverb_properties =
(rt60s == nullptr)
? ComputeReverbProperties(*room_properties)
: ComputeReverbPropertiesFromRT60s(
rt60s, room_properties->reverb_brightness,
room_properties->reverb_time, room_properties->reverb_gain);
resonance_audio_copy->api->SetReverbProperties(reverb_properties);
}
#if !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
bool StartSoundfieldRecorder() {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy == nullptr) {
return false;
}
if (resonance_audio_copy->is_recording_soundfield) {
LOG(ERROR) << "Another soundfield recording already in progress";
return false;
}
resonance_audio_copy->is_recording_soundfield = true;
return true;
}
bool StopSoundfieldRecorderAndWriteToFile(const char* file_path,
bool seamless) {
auto resonance_audio_copy = resonance_audio;
if (resonance_audio_copy == nullptr) {
return false;
}
if (!resonance_audio_copy->is_recording_soundfield) {
LOG(ERROR) << "No recorded soundfield found";
return false;
}
resonance_audio_copy->is_recording_soundfield = false;
if (file_path == nullptr) {
resonance_audio_copy->soundfield_recorder->Reset();
return false;
}
resonance_audio_copy->soundfield_recorder->WriteToFile(
file_path, kRecordQuality, seamless);
return true;
}
#endif // !(defined(PLATFORM_ANDROID) || defined(PLATFORM_IOS))
} // namespace unity
} // namespace vraudio
| 35.627219 | 80 | 0.728617 | seba10000 |
ee441a7ff481ecd2eaa1ada8259930d97c4c0e29 | 1,252 | cpp | C++ | src/rendering/MeshFactory.cpp | MuniuDev/SpaceRush | 5a32ae5ca0ddcc3682a63ef0c0f3c534b921ce36 | [
"MIT"
] | null | null | null | src/rendering/MeshFactory.cpp | MuniuDev/SpaceRush | 5a32ae5ca0ddcc3682a63ef0c0f3c534b921ce36 | [
"MIT"
] | null | null | null | src/rendering/MeshFactory.cpp | MuniuDev/SpaceRush | 5a32ae5ca0ddcc3682a63ef0c0f3c534b921ce36 | [
"MIT"
] | null | null | null | /*
* Copyright by Michal Majczak, 2016
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Author: Michal Majczak <[email protected]>
*/
#include "rendering/MeshFactory.hpp"
#include "rendering/MeshData.hpp"
MeshFactory &MeshFactory::GetInstance() {
static MeshFactory instance;
return instance;
}
std::shared_ptr<MeshData> MeshFactory::LoadMesh(std::string path,
std::string file, bool retain) {
std::string name = path + file;
if (m_meshes.find(name) == m_meshes.end()) {
LOGD("Assigning mesh memory: {}", name);
auto meshData = std::make_shared<MeshData>(path, file);
if (meshData->Init()) {
m_meshes[name] = meshData;
m_refCount[name] = (retain ? 2 : 1);
return meshData;
} else {
LOGE("Failed to load mesh: {}", name);
return std::shared_ptr<MeshData>();
}
} else {
auto meshData = m_meshes[name];
m_refCount[name] += 1;
return meshData;
}
}
void MeshFactory::OnRelease(std::shared_ptr<MeshData> data) {
std::string name = data->GetName();
m_refCount[name] -= 1;
if (m_refCount[name] == 0) {
LOGD("Freeing mesh memory: {}", name);
m_meshes.erase(name);
}
}
| 27.217391 | 80 | 0.63099 | MuniuDev |
ee487d40d5949f71594c8685da707df6978c133e | 3,166 | hpp | C++ | include/xul/util/ptime_counter.hpp | hindsights/xul | 666ce90742a9919d538ad5c8aad618737171e93b | [
"MIT"
] | 2 | 2018-03-16T07:06:48.000Z | 2018-04-02T03:02:14.000Z | include/xul/util/ptime_counter.hpp | hindsights/xul | 666ce90742a9919d538ad5c8aad618737171e93b | [
"MIT"
] | null | null | null | include/xul/util/ptime_counter.hpp | hindsights/xul | 666ce90742a9919d538ad5c8aad618737171e93b | [
"MIT"
] | 1 | 2019-08-12T05:15:29.000Z | 2019-08-12T05:15:29.000Z | #pragma once
#include <xul/util/ptime.hpp>
#include <xul/std/strings.hpp>
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <stdint.h>
namespace xul {
class ptime_counter
{
public:
ptime_counter()
{
sync();
}
explicit ptime_counter(const boost::posix_time::ptime& t) : m_time(t)
{
}
bool operator<(const ptime_counter& t) const
{
return m_time < t.m_time;
}
void sync()
{
m_time = get_system_time();
}
int64_t elapsed() const
{
return get_elapsed_time().total_milliseconds();
}
int64_t get_elapsed() const
{
return get_elapsed_time().total_milliseconds();
}
uint32_t elapsed32() const
{
return static_cast<uint32_t>( get_elapsed() );
}
uint32_t get_elapsed32() const
{
return static_cast<uint32_t>( get_elapsed() );
}
int elapsed_seconds() const
{
return get_elapsed_time().total_seconds();
}
int get_elapsed_seconds() const
{
return get_elapsed_time().total_seconds();
}
boost::posix_time::time_duration elapsed_time() const
{
return get_system_time() - m_time;
}
boost::posix_time::time_duration get_elapsed_time() const
{
return get_system_time() - m_time;
}
const boost::posix_time::ptime& get_time() const
{
return m_time;
}
static boost::posix_time::ptime get_system_time()
{
return boost::posix_time::microsec_clock::universal_time();
}
std::string str() const
{
std::ostringstream os;
os << m_time;
return os.str();
}
private:
boost::posix_time::ptime m_time;
};
/// time counter based on boost.ptime(unit: millisecond)
class local_ptime_counter
{
public:
local_ptime_counter()
{
sync();
}
explicit local_ptime_counter(const boost::posix_time::ptime& t) : m_time(t)
{
}
bool operator<(const local_ptime_counter& t) const
{
return m_time < t.m_time;
}
void sync()
{
m_time = get_system_time();
}
int64_t elapsed() const
{
return (get_system_time() - m_time).total_milliseconds();
}
int64_t get_elapsed() const
{
return (get_system_time() - m_time).total_milliseconds();
}
uint32_t elapsed32() const
{
return static_cast<uint32_t>( elapsed() );
}
boost::posix_time::time_duration elapsed_time() const
{
return get_system_time() - m_time;
}
boost::posix_time::time_duration get_elapsed_time() const
{
return get_system_time() - m_time;
}
const boost::posix_time::ptime& get_time() const
{
return m_time;
}
static boost::posix_time::ptime get_system_time()
{
return boost::posix_time::microsec_clock::local_time();
}
private:
boost::posix_time::ptime m_time;
};
inline std::ostream& operator<<(std::ostream& os, const ptime_counter& t)
{
return os << t.get_time();
}
inline std::ostream& operator<<(std::ostream& os, const local_ptime_counter& t)
{
return os << t.get_time();
}
}
| 20.037975 | 79 | 0.61434 | hindsights |
ee4c54c9194aabeabfb2223ea9c244f4796bbf54 | 480 | cpp | C++ | baekjoon/4673.cpp | 3-24/Competitive-Programming | 8cb3b85bf89db2c173cb0b136de27f2983f335fc | [
"MIT"
] | 1 | 2019-07-15T00:27:37.000Z | 2019-07-15T00:27:37.000Z | baekjoon/4673.cpp | 3-24/Competitive-Programming | 8cb3b85bf89db2c173cb0b136de27f2983f335fc | [
"MIT"
] | null | null | null | baekjoon/4673.cpp | 3-24/Competitive-Programming | 8cb3b85bf89db2c173cb0b136de27f2983f335fc | [
"MIT"
] | null | null | null | #include<stdio.h>
int pow10(int x){
int prod = 1;
for (int i=0;i<x;i++){
prod *= 10;
}
return prod;
}
int d(int n){
int sum = n;
int i = 0;
while (1){
if (n >= pow10(i)){
sum += n % pow10(i+1)/pow10(i);
i++;
}
else{
return sum;
}
}
}
int main(void){
int arr[20000];
int i;
for (i=1;i<=10000;i++){
arr[d(i)] = 1;
}
for (i=1;i<=10000;i++){
if (arr[i] != 1){
printf("%d\n",i);
}
}
return 0;
}
| 12.307692 | 37 | 0.427083 | 3-24 |
ee5163f6688dce211845577c668c980e453285fd | 3,737 | cpp | C++ | src/backends/cl/test/Fp16SupportTest.cpp | korabelnikov/armnn | 8c3259fa007d43fcc5ea56fe6928526dbe79f3c0 | [
"MIT"
] | null | null | null | src/backends/cl/test/Fp16SupportTest.cpp | korabelnikov/armnn | 8c3259fa007d43fcc5ea56fe6928526dbe79f3c0 | [
"MIT"
] | null | null | null | src/backends/cl/test/Fp16SupportTest.cpp | korabelnikov/armnn | 8c3259fa007d43fcc5ea56fe6928526dbe79f3c0 | [
"MIT"
] | null | null | null | //
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include <armnn/Descriptors.hpp>
#include <armnn/IRuntime.hpp>
#include <armnn/INetwork.hpp>
#include <Half.hpp>
#include <Graph.hpp>
#include <Optimizer.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
#include <boost/core/ignore_unused.hpp>
#include <boost/test/unit_test.hpp>
#include <set>
using namespace armnn;
BOOST_AUTO_TEST_SUITE(Fp16Support)
BOOST_AUTO_TEST_CASE(Fp16DataTypeSupport)
{
Graph graph;
Layer* const inputLayer1 = graph.AddLayer<InputLayer>(1, "input1");
Layer* const inputLayer2 = graph.AddLayer<InputLayer>(2, "input2");
Layer* const additionLayer = graph.AddLayer<AdditionLayer>("addition");
Layer* const outputLayer = graph.AddLayer<armnn::OutputLayer>(0, "output");
TensorInfo fp16TensorInfo({1, 2, 3, 5}, armnn::DataType::Float16);
inputLayer1->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(0));
inputLayer2->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(1));
additionLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
inputLayer1->GetOutputSlot().SetTensorInfo(fp16TensorInfo);
inputLayer2->GetOutputSlot().SetTensorInfo(fp16TensorInfo);
additionLayer->GetOutputSlot().SetTensorInfo(fp16TensorInfo);
BOOST_CHECK(inputLayer1->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
BOOST_CHECK(inputLayer2->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
BOOST_CHECK(additionLayer->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
}
BOOST_AUTO_TEST_CASE(Fp16AdditionTest)
{
using namespace half_float::literal;
// Create runtime in which test will run
IRuntime::CreationOptions options;
IRuntimePtr runtime(IRuntime::Create(options));
// Builds up the structure of the network.
INetworkPtr net(INetwork::Create());
IConnectableLayer* inputLayer1 = net->AddInputLayer(0);
IConnectableLayer* inputLayer2 = net->AddInputLayer(1);
IConnectableLayer* additionLayer = net->AddAdditionLayer();
IConnectableLayer* outputLayer = net->AddOutputLayer(0);
inputLayer1->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(0));
inputLayer2->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(1));
additionLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
//change to float16
TensorInfo fp16TensorInfo(TensorShape({4}), DataType::Float16);
inputLayer1->GetOutputSlot(0).SetTensorInfo(fp16TensorInfo);
inputLayer2->GetOutputSlot(0).SetTensorInfo(fp16TensorInfo);
additionLayer->GetOutputSlot(0).SetTensorInfo(fp16TensorInfo);
// optimize the network
std::vector<BackendId> backends = {Compute::GpuAcc};
IOptimizedNetworkPtr optNet = Optimize(*net, backends, runtime->GetDeviceSpec());
// Loads it into the runtime.
NetworkId netId;
runtime->LoadNetwork(netId, std::move(optNet));
std::vector<Half> input1Data
{
1.0_h, 2.0_h, 3.0_h, 4.0_h
};
std::vector<Half> input2Data
{
100.0_h, 200.0_h, 300.0_h, 400.0_h
};
InputTensors inputTensors
{
{0,ConstTensor(runtime->GetInputTensorInfo(netId, 0), input1Data.data())},
{1,ConstTensor(runtime->GetInputTensorInfo(netId, 0), input2Data.data())}
};
std::vector<Half> outputData(input1Data.size());
OutputTensors outputTensors
{
{0,Tensor(runtime->GetOutputTensorInfo(netId, 0), outputData.data())}
};
// Does the inference.
runtime->EnqueueWorkload(netId, inputTensors, outputTensors);
// Checks the results.
BOOST_TEST(outputData == std::vector<Half>({ 101.0_h, 202.0_h, 303.0_h, 404.0_h})); // Add
}
BOOST_AUTO_TEST_SUITE_END()
| 33.666667 | 107 | 0.732138 | korabelnikov |
ee517b57c817336d7f94399562147e452ef994d1 | 340 | hh | C++ | include/utils.hh | Stalker2106x/Mini8BVM | d384ad30f6c870b32aa8e4b9d00705a1406779ad | [
"MIT"
] | 1 | 2021-11-30T06:52:58.000Z | 2021-11-30T06:52:58.000Z | include/utils.hh | Stalker2106x/Mini8BVM | d384ad30f6c870b32aa8e4b9d00705a1406779ad | [
"MIT"
] | null | null | null | include/utils.hh | Stalker2106x/Mini8BVM | d384ad30f6c870b32aa8e4b9d00705a1406779ad | [
"MIT"
] | null | null | null | #ifndef UTILS_HH_
#define UTILS_HH_
#include <string>
#include "config.h"
#define HEX_DELIM 'x'
#define BIN_DELIM 'b'
long long int int128FromString(std::string str);
template <wordSizeType WordSize>
std::string binStringFromInt128(long long int value)
{
return (std::bitset<WordSize>(value).to_string());
}
#endif /* !UTILS_HH_ */ | 18.888889 | 54 | 0.738235 | Stalker2106x |
ee52224c99fdfec2563dad899f89884ef4240be6 | 6,017 | cpp | C++ | source/EvalVar.cpp | xzrunner/shadergraph | a5bf002b40738010ef4d9870f507d4faf07ba893 | [
"MIT"
] | 1 | 2018-12-04T15:32:42.000Z | 2018-12-04T15:32:42.000Z | source/EvalVar.cpp | xzrunner/shadergraph | a5bf002b40738010ef4d9870f507d4faf07ba893 | [
"MIT"
] | null | null | null | source/EvalVar.cpp | xzrunner/shadergraph | a5bf002b40738010ef4d9870f507d4faf07ba893 | [
"MIT"
] | null | null | null | #include "shadergraph/EvalVar.h"
#include "shadergraph/Variant.h"
#include "shadergraph/ValueImpl.h"
#include "shadergraph/block/Float2.h"
#include <cpputil/StringHelper.h>
#include <assert.h>
namespace shadergraph
{
std::shared_ptr<Value>
EvalVar::ValueTrans(const Variant& var, VarType type)
{
if (var.type == type || type == VarType::Dynamic) {
return var.val;
}
std::shared_ptr<Value> ret = nullptr;
switch (var.type)
{
case VarType::Int:
{
int i = std::static_pointer_cast<IntVal>(var.val)->x;
float f = static_cast<float>(i);
switch (type)
{
case VarType::Int2:
ret = std::make_shared<Int2Val>(i, i);
break;
case VarType::Int3:
ret = std::make_shared<Int3Val>(i, i, i);
break;
case VarType::Int4:
ret = std::make_shared<Int4Val>(i, i, i, i);
break;
case VarType::Float:
ret = std::make_shared<FloatVal>(f);
break;
case VarType::Float2:
ret = std::make_shared<Float2Val>(f, f);
break;
case VarType::Float3:
ret = std::make_shared<Float3Val>(f, f, f);
break;
case VarType::Float4:
ret = std::make_shared<Float4Val>(f, f, f, f);
break;
default:
assert(0);
}
}
break;
case VarType::Float:
{
float f = std::static_pointer_cast<FloatVal>(var.val)->x;
switch (type)
{
case VarType::Float2:
ret = std::make_shared<Float2Val>(f, f);
break;
case VarType::Float3:
ret = std::make_shared<Float3Val>(f, f, f);
break;
case VarType::Float4:
ret = std::make_shared<Float4Val>(f, f, f, f);
break;
default:
assert(0);
}
}
break;
default:
assert(0);
}
assert(ret);
return ret;
}
std::string EvalVar::VariantToString(const Variant& var, VarType type)
{
if (var.type == VarType::String) {
return std::static_pointer_cast<StringVal>(var.val)->str;
}
auto val = ValueTrans(var, type);
switch (type)
{
//case VarType::Bool:
// return "false";
//case VarType::Bool2:
// return "bvec2(false, false)";
//case VarType::Bool3:
// return "bvec3(false, false, false)";
//case VarType::Bool4:
// return "bvec4(false, false, false, false)";
case VarType::UInt:
case VarType::Int:
return std::to_string(std::static_pointer_cast<IntVal>(val)->x).c_str();
case VarType::Int2:
{
auto v = std::static_pointer_cast<Int2Val>(val);
return cpputil::StringHelper::Format("ivec2(%s, %s)",
std::to_string(v->xy[0]), std::to_string(v->xy[1]).c_str());
}
case VarType::Int3:
{
auto v = std::static_pointer_cast<Int3Val>(val);
return cpputil::StringHelper::Format("ivec3(%s, %s, %s)",
std::to_string(v->xyz[0]).c_str(), std::to_string(v->xyz[1]).c_str(), std::to_string(v->xyz[2]).c_str());
}
case VarType::Int4:
{
auto v = std::static_pointer_cast<Int4Val>(val);
return cpputil::StringHelper::Format("ivec4(%s, %s, %s, %s)",
std::to_string(v->xyzw[0]).c_str(), std::to_string(v->xyzw[1]).c_str(), std::to_string(v->xyzw[2]).c_str(), std::to_string(v->xyzw[3]).c_str());
}
case VarType::Float:
return std::to_string(std::static_pointer_cast<FloatVal>(val)->x).c_str();
case VarType::Float2:
{
auto v = std::static_pointer_cast<Float2Val>(val);
return cpputil::StringHelper::Format("vec2(%s, %s)",
std::to_string(v->xy[0]).c_str(), std::to_string(v->xy[1]).c_str());
}
case VarType::Float3:
{
auto v = std::static_pointer_cast<Float3Val>(val);
return cpputil::StringHelper::Format("vec3(%s, %s, %s)",
std::to_string(v->xyz[0]).c_str(), std::to_string(v->xyz[1]).c_str(), std::to_string(v->xyz[2]).c_str());
}
case VarType::Float4:
{
auto v = std::static_pointer_cast<Float4Val>(val);
return cpputil::StringHelper::Format("vec4(%s, %s, %s, %s)",
std::to_string(v->xyzw[0]).c_str(), std::to_string(v->xyzw[1]).c_str(), std::to_string(v->xyzw[2]).c_str(), std::to_string(v->xyzw[3]).c_str());
}
default:
return "";
}
}
std::string EvalVar::GetDefaultValueString(VarType type)
{
switch (type)
{
case VarType::Bool:
return "false";
case VarType::Bool2:
return "bvec2(false, false)";
case VarType::Bool3:
return "bvec3(false, false, false)";
case VarType::Bool4:
return "bvec4(false, false, false, false)";
case VarType::UInt:
case VarType::Int:
return "0";
case VarType::Int2:
return "ivec2(0, 0)";
case VarType::Int3:
return "ivec3(0, 0, 0)";
case VarType::Int4:
return "ivec4(0, 0, 0, 0)";
case VarType::Float:
return "0.0";
case VarType::Float2:
return "vec2(0.0, 0.0)";
case VarType::Float3:
return "vec3(0.0, 0.0, 0.0)";
case VarType::Float4:
return "vec4(0.0, 0.0, 0.0, 0.0)";
case VarType::Matrix2:
return "mat2()";
case VarType::Matrix3:
return "mat3()";
case VarType::Matrix4:
return "mat4()";
default:
return "";
}
}
Variant EvalVar::Calc(const Block::Port& in_port)
{
Variant ret;
auto& conns = in_port.conns;
if (conns.empty()) {
return ret;
}
assert(conns.size() == 1);
auto node = conns[0].node.lock();
if (!node) {
return ret;
}
ret = node->GetExports()[0].var.type;
if (node->get_type() == rttr::type::get<block::Float2>())
{
auto v = std::static_pointer_cast<block::Float2>(node)->GetValue();
ret.val = std::make_shared<Float2Val>(v.x, v.y);
}
return ret;
}
} | 28.516588 | 156 | 0.551105 | xzrunner |
ee55f79803751596b833422ab0647a76385770d0 | 78 | hpp | C++ | src/boost_numeric_odeint_stepper_generation_generation_rosenbrock4.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 10 | 2018-03-17T00:58:42.000Z | 2021-07-06T02:48:49.000Z | src/boost_numeric_odeint_stepper_generation_generation_rosenbrock4.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 2 | 2021-03-26T15:17:35.000Z | 2021-05-20T23:55:08.000Z | src/boost_numeric_odeint_stepper_generation_generation_rosenbrock4.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 4 | 2019-05-28T21:06:37.000Z | 2021-07-06T03:06:52.000Z | #include <boost/numeric/odeint/stepper/generation/generation_rosenbrock4.hpp>
| 39 | 77 | 0.858974 | miathedev |
ee5a71d6030465c1a479905f845f5fe986fa4be9 | 10,563 | cpp | C++ | src/shape2d.cpp | myociss/pathfinder | 4c0b14e074cfc8f0e41836abc056989f2d465c12 | [
"MIT"
] | null | null | null | src/shape2d.cpp | myociss/pathfinder | 4c0b14e074cfc8f0e41836abc056989f2d465c12 | [
"MIT"
] | null | null | null | src/shape2d.cpp | myociss/pathfinder | 4c0b14e074cfc8f0e41836abc056989f2d465c12 | [
"MIT"
] | null | null | null | #include "shape2d.hpp"
#include <iostream>
#define _USE_MATH_DEFINES
#include <math.h>
//#include <sort.h>
using namespace Eigen;
using namespace std;
Shape2d::Shape2d(unsigned long int _id, int _numVertices, double _weight){
id=_id;
numVertices=_numVertices;
weight=_weight;
vertices.reserve(numVertices);
endVertex=0;
}
bool Shape2d::Complete(){
return numVertices==vertices.size();
}
void Shape2d::addPoint(Point2d point){
int vectorPos = point.ShapeVectorPos();
if(vertices.size()==0 || vectorPos > vertices.back().ShapeVectorPos()){
vertices.push_back(point);
} else if(vertices[0].ShapeVectorPos() > vectorPos){
vertices.insert(vertices.begin(), point);
} else {
for(int i=0; i<vertices.size()-1; i++){
if(vectorPos>vertices[i].ShapeVectorPos() && vectorPos<vertices[i+1].ShapeVectorPos()){
vertices.insert(vertices.begin()+i+1, point);
break;
}
}
}
}
void Shape2d::arrange(vector<LineInterval>& lineIntervals){
int startVertex;
for(int i=0; i<vertices.size(); i++){
Vector2d prev;
if(i==0){
prev=vertices.back().Vec();
} else {
prev=vertices[i-1].Vec();
}
Vector2d next;
if(i==vertices.size()-1){
next=vertices[0].Vec();
} else{
next=vertices[i+1].Vec();
}
LineInterval& li=lineIntervals[vertices[i].AngleId()];
Vector2d liPoint=li.Point();
if(-liPoint[1]*prev[0] + liPoint[0]*prev[1]>0 && -liPoint[1]*next[0] + liPoint[0]*next[1]>=0){
startVertex=i;
}
}
setVerticesClockwise(startVertex);
}
void Shape2d::setVerticesClockwise(int startVertex){
Vector2d p = vertices[0].Vec();
Vector2d q = vertices[1].Vec();
Vector2d r = vertices[2].Vec();
bool orientedClockwise=(r[0]-p[0])*(q[1]-p[1])-(q[0]-p[0])*(r[1]-p[1]) > 0;
vector<Point2d> tmpVertices;
tmpVertices.reserve(vertices.size());
if(orientedClockwise){
int idx=startVertex;
for(int i=0; i<vertices.size(); ++i){
tmpVertices.push_back(vertices[idx]);
++idx;
if(idx==vertices.size()){
idx=0;
}
}
} else {
int idx=startVertex;
for(int i=0; i<vertices.size(); ++i){
tmpVertices.push_back(vertices[idx]);
--idx;
if(idx<0){
idx=vertices.size()-1;
}
}
}
setNewVertices(tmpVertices);
}
void Shape2d::setNewVertices(vector<Point2d> tmpVertices){
double angleMax=tmpVertices[0].Angle();
for(int i=0; i<numVertices; ++i){
vertices[i]=tmpVertices[i];
double vertexAngle=vertices[i].Angle();
if(vertices[i].Angle()<0 && vertices[0].Angle()>0){
vertexAngle += 2 * M_PI;
}
if(vertexAngle>angleMax){
endVertex=i;
angleMax=vertexAngle;
}
}
}
vector<Vector2d> Shape2d::Vertices(){
vector<Vector2d> vecs;
for(int i=0; i<vertices.size(); ++i){
for(int j=0; j<vertices.size(); ++j){
if(vertices[j].ShapeVectorPos()==i){
vecs.push_back(vertices[j].Vec());
break;
}
}
}
return vecs;
}
vector<Vector2d> Shape2d::VerticesArranged(){
vector<Vector2d> vecs;
for(int i=0; i<vertices.size(); ++i){
vecs.push_back(vertices[i].Vec());
}
return vecs;
}
void Shape2d::calculateOneIntervalTarget(LineInterval& li){
for(int i=vertices.size()-1; i>=0; --i){
int next=i-1;
if(next<0){
next=vertices.size()-1;
}
if(li.IntersectsEdge(vertices[i].Angle(), vertices[next].Angle())){
array<double, 2> edgePolar=polarEquation(vertices[i].Vec(), vertices[next].Vec());
computeBoundsTarget(li, edgePolar);
}
}
}
void Shape2d::calculateOneInterval(LineInterval& li){
array<double, 2> entryPolar=EntryEdge(li);
array<double, 2> terminalPolar=TerminalEdge(li);
array<double, 3> entryFStart=li.FunctionsAt(entryPolar, 0);
array<double, 3> terminalFStart=li.FunctionsAt(terminalPolar, 0);
array<double, 3> entryFEnd=li.FunctionsAt(entryPolar, 1);
array<double, 3> terminalFEnd=li.FunctionsAt(terminalPolar, 1);
computeBounds(entryFStart, entryFEnd, terminalFStart, terminalFEnd, li);
}
void Shape2d::calculateAllIntervalsTarget(vector<LineInterval>& lineIntervals){
for(int i=vertices.size()-1; i>=0; --i){
int next=i-1;
if(next<0){
next=vertices.size()-1;
}
unsigned long int startIntervalId=vertices[i].AngleId();
unsigned long int intervalId=startIntervalId;
//double upperBound=0.0;
//double lowerBound=0.0;
array<double, 2> edgePolar=polarEquation(vertices[i].Vec(), vertices[next].Vec());
while(intervalId!=vertices[next].AngleId()){
LineInterval& li=lineIntervals[intervalId];
/*double startSide=li.DistAt(edgePolar, 0);
double endSide=li.DistAt(edgePolar, 1);
if(li.containsNormal(edgePolar)){
upperBound=weight * max(startSide, endSide);
lowerBound=weight * edgePolar[0];
} else {
upperBound=weight * max(startSide, endSide);
lowerBound=weight * min(startSide, endSide);
}
li.update(upperBound, lowerBound, startSide, endSide, id);*/
computeBoundsTarget(li, edgePolar);
intervalId=(intervalId+1)%lineIntervals.size();
}
}
}
void Shape2d::calculateAllIntervals(vector<LineInterval>& lineIntervals){
unsigned long int startIntervalId=vertices[0].AngleId();
unsigned long int intervalId=startIntervalId;
unsigned long int endVertexIntervalId=vertices[endVertex].AngleId();
int entryEdge=(vertices[0].AngleId()==vertices[1].AngleId() ? 1 : 0);
if(entryEdge==1){
cout << "guess this happens" << endl;
}
int terminalEdge=vertices.size()-1;
array<double, 3> entryFStart;
array<double, 3> terminalFStart;
array<double, 2> entryPolar=polarEquation(vertices[entryEdge].Vec(), vertices[entryEdge+1].Vec());
array<double, 2> terminalPolar=polarEquation(vertices[0].Vec(), vertices[terminalEdge].Vec());
//cout << endVertexIntervalId << endl;
while(intervalId!=endVertexIntervalId){
//cout << intervalId << endl;
LineInterval& li = lineIntervals[intervalId];
//new entry edge
if(vertices[entryEdge].AngleId()==intervalId){
entryFStart=li.FunctionsAt(entryPolar, 0);
}
//new exit edge
if(vertices[(terminalEdge+1)%vertices.size()].AngleId()==intervalId){
terminalFStart=li.FunctionsAt(terminalPolar, 0);
}
array<double, 3> entryFEnd=li.FunctionsAt(entryPolar, 1);
array<double, 3> terminalFEnd=li.FunctionsAt(terminalPolar, 1);
computeBounds(entryFStart, entryFEnd, terminalFStart, terminalFEnd, li);
terminalFStart=terminalFEnd;
entryFStart=entryFEnd;
unsigned long int nextInterval = (intervalId+1)%lineIntervals.size();
if(vertices[terminalEdge].AngleId()==nextInterval){
--terminalEdge;
terminalPolar=polarEquation(vertices[terminalEdge+1].Vec(), vertices[terminalEdge].Vec());
}
if(vertices[entryEdge+1].AngleId()==nextInterval){
++entryEdge;
entryPolar=polarEquation(vertices[entryEdge].Vec(), vertices[entryEdge+1].Vec());
}
intervalId=nextInterval;
}
}
void Shape2d::computeBoundsTarget(LineInterval& li, array<double, 2> edgePolar){
double startSide=li.DistAt(edgePolar, 0);
double endSide=li.DistAt(edgePolar, 1);
double upperBound=0.0;
double lowerBound=0.0;
if(li.containsNormal(edgePolar)){
upperBound=weight * max(startSide, endSide);
lowerBound=weight * edgePolar[0];
} else {
upperBound=weight * max(startSide, endSide);
lowerBound=weight * min(startSide, endSide);
}
li.update(upperBound, lowerBound, startSide, endSide, id);
}
void Shape2d::computeBounds(array<double, 3> entryFStart, array<double, 3> entryFEnd, array<double, 3> terminalFStart, array<double, 3> terminalFEnd, LineInterval& li){
double startDist=max(terminalFStart[0]-entryFStart[0], 0.0);
double startDeriv=terminalFStart[1]-entryFStart[1];
double startDeriv2=terminalFStart[2]-entryFStart[2];
double endDist=max(terminalFEnd[0]-entryFEnd[0], 0.0);
double endDeriv=terminalFEnd[1]-entryFEnd[1];
double endDeriv2=terminalFEnd[2]-entryFEnd[2];
double maxSide=max(startDist, endDist);
double minSide=min(startDist, endDist);
double upperBound = 0.0;
double lowerBound = 0.0;
if(startDeriv2*endDeriv2 <= 0 || startDeriv*endDeriv <= 0){
//if(startDeriv*endDeriv <= 0){
upperBound=weight * maxDist();
} else if(startDeriv*endDeriv <= 0){
double root=li.ApproxRoot(startDist, endDist, startDeriv, endDeriv);
if(root < 0){
root=0.0;
}
if(startDeriv<0 || (startDeriv==0 && endDeriv>0)){
//cout << "root lower bound" << endl;
upperBound=weight*maxSide;
lowerBound=weight*root;
} else{
/*cout << "root upper bound" << endl;
cout << maxDist() << endl;
cout << root << endl;
cout << maxSide << endl;*/
//upperBound=weight*maxDist();
upperBound=weight*min(maxDist(), root);
lowerBound=weight*minSide;
}
} else {
upperBound=weight*maxSide;
lowerBound=weight*minSide;
}
li.update(upperBound, lowerBound, terminalFStart[0], terminalFEnd[0], id);
}
array<double, 2> Shape2d::EntryEdge(LineInterval& li){
array<double, 2> entryEdgePolar;
for(int i=1; i<=endVertex; ++i){
if(li.IntersectsEdge(vertices[i-1].Angle(), vertices[i].Angle())){
entryEdgePolar=polarEquation(vertices[i-1].Vec(), vertices[i].Vec());
break;
}
}
return entryEdgePolar;
}
array<double, 2> Shape2d::TerminalEdge(LineInterval& li){
array<double, 2> terminalEdgePolar;
for(int i=endVertex; i<vertices.size(); ++i){
int next=i+1;
if(next==vertices.size()){
next=0;
}
if(li.IntersectsEdge(vertices[next].Angle(), vertices[i].Angle())){
terminalEdgePolar=polarEquation(vertices[next].Vec(), vertices[i].Vec());
break;
}
}
return terminalEdgePolar;
}
double Shape2d::maxDist(){
double maxDist=0.0;
for(int i=0; i<vertices.size(); ++i){
for(int j=i+1; j<vertices.size();++j){
Vector2d v0=vertices[i].Vec();
Vector2d v1=vertices[j].Vec();
double dist=sqrt(pow(v0[0]-v1[0], 2.0) + pow(v0[1]-v1[1], 2.0));
if(maxDist<dist){
maxDist=dist;
}
}
}
return maxDist;
}
int Shape2d::EndVertex(){
return endVertex;
}
Point2d::Point2d(Vector2d _vec, unsigned long int _shapeId, int _shapeVectorPos){
vec = _vec;
shapeId = _shapeId;
shapeVectorPos = _shapeVectorPos;
angle = atan2(vec[1], vec[0]);
}
double Point2d::Angle(){
return angle;
}
unsigned long int Point2d::AngleId(){
return angleId;
}
unsigned long int Point2d::ShapeId(){
return shapeId;
}
int Point2d::ShapeVectorPos(){
return shapeVectorPos;
}
void Point2d::setAngleId(unsigned long int _angleId){
angleId = _angleId;
}
Vector2d Point2d::Vec(){
return vec;
}
| 26.809645 | 168 | 0.673672 | myociss |
ee5dc5830dbf201725bed848402eadf34cc54fae | 2,343 | hpp | C++ | Siv3D/src/Siv3D/Shader/GL/CShader_GL.hpp | Fuyutsubaki/OpenSiv3D | 4370f6ebe28addd39bfdd75915c5a18e3e5e9273 | [
"MIT"
] | null | null | null | Siv3D/src/Siv3D/Shader/GL/CShader_GL.hpp | Fuyutsubaki/OpenSiv3D | 4370f6ebe28addd39bfdd75915c5a18e3e5e9273 | [
"MIT"
] | null | null | null | Siv3D/src/Siv3D/Shader/GL/CShader_GL.hpp | Fuyutsubaki/OpenSiv3D | 4370f6ebe28addd39bfdd75915c5a18e3e5e9273 | [
"MIT"
] | 1 | 2019-10-06T17:09:26.000Z | 2019-10-06T17:09:26.000Z | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2018 Ryo Suzuki
// Copyright (c) 2016-2018 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <Siv3D/Platform.hpp>
# if defined(SIV3D_TARGET_MACOS) || defined(SIV3D_TARGET_LINUX)
# include "../IShader.hpp"
# include <Siv3D/Array.hpp>
# include <Siv3D/ByteArrayView.hpp>
# include "VertexShader_GL.hpp"
# include "PixelShader_GL.hpp"
# include "../../AssetHandleManager/AssetHandleManager.hpp"
namespace s3d
{
class CShader_GL : public ISiv3DShader
{
private:
Array<VertexShader> m_standardVSs;
Array<PixelShader> m_standardPSs;
AssetHandleManager<VertexShaderID, VertexShader_GL> m_vertexShaders{ U"VertexShader" };
AssetHandleManager<PixelShaderID, PixelShader_GL> m_pixelShaders{ U"PixelShader" };
public:
CShader_GL();
~CShader_GL() override;
bool init();
VertexShaderID createVS(ByteArray&&) override { return VertexShaderID::NullAsset(); }
VertexShaderID createVSFromFile(const FilePath& path, const Array<BindingPoint>&) override;
VertexShaderID createVSFromSource(const String& source, const Array<BindingPoint>& bindingPoints) override;
PixelShaderID createPS(ByteArray&&) override { return PixelShaderID::NullAsset(); }
PixelShaderID createPSFromFile(const FilePath& path, const Array<BindingPoint>&) override;
PixelShaderID createPSFromSource(const String& source, const Array<BindingPoint>& bindingPoints) override;
void releaseVS(VertexShaderID handleID) override;
void releasePS(PixelShaderID handleID) override;
ByteArrayView getBinaryViewVS(VertexShaderID) override
{
return ByteArrayView();
}
ByteArrayView getBinaryViewPS(PixelShaderID) override
{
return ByteArrayView();
}
const VertexShader& getStandardVS(size_t index) const override
{
return m_standardVSs[index];
}
const PixelShader& getStandardPS(size_t index) const override
{
return m_standardPSs[index];
}
void setVS(VertexShaderID) override {}
void setPS(PixelShaderID) override {}
GLuint getVSProgram(VertexShaderID handleID);
GLuint getPSProgram(PixelShaderID handleID);
void setPSSamplerUniform(PixelShaderID handleID);
};
}
# endif
| 24.925532 | 109 | 0.724285 | Fuyutsubaki |
ee602ff754eb713f5ee5f40e7faee640222c1d93 | 5,633 | cpp | C++ | extras/DemFiles/src/GridLib/RecordA.cpp | jebreimo/GridLib | a90a5299512eb01623881c62a1e5f73b9f2c2513 | [
"BSD-2-Clause"
] | null | null | null | extras/DemFiles/src/GridLib/RecordA.cpp | jebreimo/GridLib | a90a5299512eb01623881c62a1e5f73b9f2c2513 | [
"BSD-2-Clause"
] | null | null | null | extras/DemFiles/src/GridLib/RecordA.cpp | jebreimo/GridLib | a90a5299512eb01623881c62a1e5f73b9f2c2513 | [
"BSD-2-Clause"
] | null | null | null | //****************************************************************************
// Copyright © 2020 Jan Erik Breimo. All rights reserved.
// Created by Jan Erik Breimo on 2020-09-27.
//
// This file is distributed under the BSD License.
// License text is included with the source distribution.
//****************************************************************************
#include "RecordA.hpp"
#include <ostream>
#include "FortranReader.hpp"
#include "PrintMacros.hpp"
namespace GridLib
{
double to_degrees(const DegMinSec& dms)
{
return double(dms.degree) + dms.minute / 60.0 + dms.second / 3600.0;
}
std::ostream& operator<<(std::ostream& os, const DegMinSec& dms)
{
os << dms.degree << ' ' << dms.minute << ' ' << dms.second;
return os;
}
std::ostream& operator<<(std::ostream& os, const CartesianCoordinates& cc)
{
return os << cc.easting << ' ' << cc.northing;
}
void print(const RecordA& rec, std::ostream& os)
{
WRITE_STRING(file_name);
WRITE_STRING(text);
WRITE_OPTIONAL(longitude);
WRITE_OPTIONAL(latitude);
WRITE_OPTIONAL(process_code);
WRITE_OPTIONAL(process_code);
WRITE_STRING(sectional_indicator);
WRITE_STRING(origin_code);
WRITE_OPTIONAL(dem_level_code);
WRITE_OPTIONAL(elevation_pattern_code);
WRITE_OPTIONAL(ref_sys);
WRITE_OPTIONAL(ref_sys_zone);
WRITE_ARRAY(map_projection_params);
WRITE_OPTIONAL(horizontal_unit);
WRITE_OPTIONAL(vertical_unit);
WRITE_OPTIONAL(polygon_sides);
WRITE_ARRAY(quadrangle_corners);
WRITE_OPTIONAL(min_elevation);
WRITE_OPTIONAL(max_elevation);
WRITE_OPTIONAL(rotation_angle);
WRITE_OPTIONAL(elevation_accuracy);
WRITE_OPTIONAL(x_resolution);
WRITE_OPTIONAL(y_resolution);
WRITE_OPTIONAL(z_resolution);
WRITE_OPTIONAL(rows);
WRITE_OPTIONAL(columns);
WRITE_OPTIONAL(largest_contour_interval);
WRITE_OPTIONAL(largest_contour_interval_units);
WRITE_OPTIONAL(smallest_contour_interval);
WRITE_OPTIONAL(smallest_contour_interval_units);
WRITE_OPTIONAL(data_source_year);
WRITE_OPTIONAL(data_completion_year);
WRITE_OPTIONAL(inspection_flag);
WRITE_OPTIONAL(data_validation_flag);
CAST_AND_WRITE_OPTIONAL(suspect_and_void_area_flag, int);
CAST_AND_WRITE_OPTIONAL(vertical_datum, int);
CAST_AND_WRITE_OPTIONAL(horizontal_datum, int);
WRITE_OPTIONAL(data_edition);
WRITE_OPTIONAL(percent_void);
WRITE_OPTIONAL(edge_match_flag);
WRITE_OPTIONAL(vertical_datum_shift);
}
std::optional<DegMinSec> read_DegMinSec(FortranReader& reader)
{
auto d = reader.read_int16(4);
auto m = reader.read_int16(2);
auto s = reader.read_float32(7);
if (!d || !m || !s)
return {};
return DegMinSec{*d, *m, *s};
}
RecordA read_record_a(FortranReader& reader)
{
RecordA result;
result.file_name = reader.read_string(40);
result.text = reader.read_string(40);
reader.skip(29);
result.longitude = read_DegMinSec(reader);
result.latitude = read_DegMinSec(reader);
result.process_code = reader.read_char();
reader.skip(1);
result.sectional_indicator = reader.read_string(3);
result.origin_code = reader.read_string(4);
result.dem_level_code = reader.read_int16(6);
result.elevation_pattern_code = reader.read_int16(6);
result.ref_sys = reader.read_int16(6);
result.ref_sys_zone = reader.read_int16(6);
for (auto& param : result.map_projection_params)
param = reader.read_float64(24);
result.horizontal_unit = reader.read_int16(6);
result.vertical_unit = reader.read_int16(6);
result.polygon_sides = reader.read_int16(6);
for (auto& corner : result.quadrangle_corners)
{
auto e = reader.read_float64(24);
auto n = reader.read_float64(24);
if (e && n)
corner = {*e, *n};
}
result.min_elevation = reader.read_float64(24);
result.max_elevation = reader.read_float64(24);
result.rotation_angle = reader.read_float64(24);
result.elevation_accuracy = reader.read_int16(6);
result.x_resolution = reader.read_float32(12);
result.y_resolution = reader.read_float32(12);
result.z_resolution = reader.read_float32(12);
result.rows = reader.read_int16(6);
result.columns = reader.read_int16(6);
result.largest_contour_interval = reader.read_int16(5);
result.largest_contour_interval_units = reader.read_int8(1);
result.smallest_contour_interval = reader.read_int16(5);
result.smallest_contour_interval_units = reader.read_int8(1);
result.data_source_year = reader.read_int16(4);
result.data_completion_year = reader.read_int16(4);
result.inspection_flag = reader.read_char();
result.data_validation_flag = reader.read_int8(1);
result.suspect_and_void_area_flag = reader.read_int8(2);
result.vertical_datum = reader.read_int8(2);
result.horizontal_datum = reader.read_int8(2);
result.data_edition = reader.read_int16(4);
result.percent_void = reader.read_int16(4);
result.edge_match_flag = reader.read_int32(8);
result.vertical_datum_shift = reader.read_float64(7);
reader.skip(109);
return result;
}
}
| 39.391608 | 78 | 0.644239 | jebreimo |
ee63df5b7532e903b35e11f31434233845efc52c | 7,464 | cpp | C++ | src/linux/PeripheralBase.cpp | fidoriel/SimpleBLE | 6ffb6bec0624913c47d3bac36370bdd3e2744a15 | [
"MIT"
] | 2 | 2021-07-20T06:27:08.000Z | 2021-07-28T05:47:11.000Z | third_party/SimpleBLE/src/linux/PeripheralBase.cpp | HDPNC/brainflow | ede79fbd5fcc823c1c64bcc3af3e88b4d12177bf | [
"MIT"
] | null | null | null | third_party/SimpleBLE/src/linux/PeripheralBase.cpp | HDPNC/brainflow | ede79fbd5fcc823c1c64bcc3af3e88b4d12177bf | [
"MIT"
] | null | null | null | #include "PeripheralBase.h"
#include <simpleble/Exceptions.h>
#include "Bluez.h"
#include <iostream>
using namespace SimpleBLE;
using namespace std::chrono_literals;
PeripheralBase::PeripheralBase(std::shared_ptr<BluezDevice> device) {
device_ = device;
// NOTE: As Bluez will delete the object if it was advertising as non-connectable,
// we need to keep a copy of some of the properties around.
identifier_ = device->get_name();
address_ = device->get_address();
}
PeripheralBase::~PeripheralBase() {}
std::string PeripheralBase::identifier() { return identifier_; }
BluetoothAddress PeripheralBase::address() { return address_; }
void PeripheralBase::connect() {
// Attempt to connect to the device.
for (size_t i = 0; i < 5; i++) {
if (_attempt_connect()) {
break;
}
}
if (!is_connected()) {
throw Exception::OperationFailed();
}
}
void PeripheralBase::disconnect() {
// Attempt to connect to the device.
for (size_t i = 0; i < 5; i++) {
if (_attempt_disconnect()) {
break;
}
}
if (is_connected()) {
throw Exception::OperationFailed();
}
}
bool PeripheralBase::is_connected() {
auto device = _get_device();
// NOTE: For Bluez, a device being connected means that it's both
// connected and services have been resolved.
return device->Property_Connected() && device->Property_ServicesResolved();
}
bool PeripheralBase::is_connectable() { return identifier_ != ""; }
std::vector<BluetoothService> PeripheralBase::services() {
auto device = _get_device();
std::vector<BluetoothService> service_list;
for (auto service_uuid : device->get_service_list()) {
BluetoothService service;
service.uuid = service_uuid;
service.characteristics = device->get_characteristic_list(service_uuid);
service_list.push_back(service);
}
return service_list;
}
std::map<uint16_t, ByteArray> PeripheralBase::manufacturer_data() {
auto device = _get_device();
std::map<uint16_t, ByteArray> manufacturer_data;
for (auto& [manufacturer_id, value_array] : device->get_manufacturer_data()) {
manufacturer_data[manufacturer_id] = ByteArray((const char*)value_array.data(), value_array.size());
}
return manufacturer_data;
}
ByteArray PeripheralBase::read(BluetoothUUID service, BluetoothUUID characteristic) {
// TODO: Check if the characteristic is readable.
auto characteristic_object = _get_characteristic(service, characteristic);
std::vector<uint8_t> value = characteristic_object->Property_Value();
return ByteArray((const char*)value.data(), value.size());
}
void PeripheralBase::write_request(BluetoothUUID service, BluetoothUUID characteristic, ByteArray data) {
// TODO: Check if the characteristic is writable.
auto characteristic_object = _get_characteristic(service, characteristic);
characteristic_object->write_request((const uint8_t*)data.c_str(), data.size());
}
void PeripheralBase::write_command(BluetoothUUID service, BluetoothUUID characteristic, ByteArray data) {
// TODO: Check if the characteristic is writable.
auto characteristic_object = _get_characteristic(service, characteristic);
characteristic_object->write_command((const uint8_t*)data.c_str(), data.size());
}
void PeripheralBase::notify(BluetoothUUID service, BluetoothUUID characteristic,
std::function<void(ByteArray payload)> callback) {
// TODO: What to do if the characteristic is already being notified?
// TODO: Check if the property can be notified.
auto characteristic_object = _get_characteristic(service, characteristic);
characteristic_object->ValueChanged = [=](std::vector<uint8_t> value) {
callback(ByteArray((const char*)value.data(), value.size()));
};
characteristic_object->Action_StartNotify();
}
void PeripheralBase::indicate(BluetoothUUID service, BluetoothUUID characteristic,
std::function<void(ByteArray payload)> callback) {
// TODO: What to do if the characteristic is already being indicated?
// TODO: Check if the property can be indicated.
auto characteristic_object = _get_characteristic(service, characteristic);
characteristic_object->ValueChanged = [=](std::vector<uint8_t> value) {
callback(ByteArray((const char*)value.data(), value.size()));
};
characteristic_object->Action_StartNotify();
}
void PeripheralBase::unsubscribe(BluetoothUUID service, BluetoothUUID characteristic) {
// TODO: What to do if the characteristic is not being notified?
auto characteristic_object = _get_characteristic(service, characteristic);
characteristic_object->Action_StopNotify();
// Wait for the characteristic to stop notifying.
// TODO: Upgrade SimpleDBus to provide a way to wait for this signal.
auto timeout = std::chrono::system_clock::now() + 5s;
while (characteristic_object->Property_Notifying() && std::chrono::system_clock::now() < timeout) {
std::this_thread::sleep_for(50ms);
}
}
void PeripheralBase::set_callback_on_connected(std::function<void()> on_connected) {
callback_on_connected_ = on_connected;
}
void PeripheralBase::set_callback_on_disconnected(std::function<void()> on_disconnected) {
callback_on_disconnected_ = on_disconnected;
}
// Private methods
bool PeripheralBase::_attempt_connect() {
auto device = _get_device();
// Set the OnServiceDiscovered callback, which should properly indicate
// if the connection has been established.
device->OnServicesResolved = [=]() { this->connection_cv_.notify_all(); };
// Set the OnDisconnected callback
device->OnDisconnected = [this]() {
this->disconnection_cv_.notify_all();
if (this->callback_on_disconnected_) {
this->callback_on_disconnected_();
}
};
device->Action_Connect();
// Wait for the connection to be confirmed.
// The condition variable will return false if the connection was not established.
std::unique_lock<std::mutex> lock(connection_mutex_);
return connection_cv_.wait_for(lock, 1s, [this]() { return is_connected(); });
}
bool PeripheralBase::_attempt_disconnect() {
auto device = _get_device();
device->Action_Disconnect();
// Wait for the disconnection to be confirmed.
// The condition variable will return false if the connection is still active.
std::unique_lock<std::mutex> lock(disconnection_mutex_);
return disconnection_cv_.wait_for(lock, 1s, [this]() { return !is_connected(); });
}
std::shared_ptr<BluezDevice> PeripheralBase::_get_device() {
std::shared_ptr<BluezDevice> device = device_.lock();
if (!device) {
throw Exception::InvalidReference();
}
return device;
}
std::shared_ptr<BluezGattCharacteristic> PeripheralBase::_get_characteristic(BluetoothUUID service_uuid,
BluetoothUUID characteristic_uuid) {
auto device = _get_device();
auto service = device->get_service(service_uuid);
if (!service) {
throw Exception::ServiceNotFound(service_uuid);
}
auto characteristic = service->get_characteristic(characteristic_uuid);
if (!characteristic) {
throw Exception::CharacteristicNotFound(characteristic_uuid);
}
return characteristic;
}
| 35.042254 | 113 | 0.703108 | fidoriel |
ee65d7cba452972cc0e47752543c8e8f9f0383e6 | 2,491 | cpp | C++ | snapshotable_allocator_test.cpp | jyaif/snapshotable_allocator | 711dff8d6414265476bf8eb83eece563c0c183a8 | [
"MIT"
] | null | null | null | snapshotable_allocator_test.cpp | jyaif/snapshotable_allocator | 711dff8d6414265476bf8eb83eece563c0c183a8 | [
"MIT"
] | null | null | null | snapshotable_allocator_test.cpp | jyaif/snapshotable_allocator | 711dff8d6414265476bf8eb83eece563c0c183a8 | [
"MIT"
] | null | null | null | #include "application/memory/snapshotable_allocator.h"
#include "application/memory/snapshotable_allocator_impl.h"
#include "third_party/nex_test/src/test.h"
#include <cassert>
#include <cstdio>
template <class T>
void SnapshotTest() {
T sm;
auto snapshot1 = sm.NewEmptySnapshot();
sm.SaveMemoryIntoSnapshot(*snapshot1);
const char special_char_1 = 'k';
const char special_char_2 = 'p';
void* ptr = sm.Alloc(100);
memset(ptr, special_char_1, 100);
auto snapshot2 = sm.NewEmptySnapshot();
sm.SaveMemoryIntoSnapshot(*snapshot2);
sm.LoadMemoryFromSnapshot(*snapshot1);
void* ptr2 = sm.Alloc(100);
assert(ptr == ptr2);
memset(ptr2, special_char_2, 100);
sm.LoadMemoryFromSnapshot(*snapshot2);
for (int i = 0; i < 100; i++) {
assert(static_cast<char*>(ptr)[i] == special_char_1);
}
}
template <class T>
void AllocAndFree() {
T sm;
// Check that you can free nullptr without crashing.
sm.Free(nullptr);
// Check that you can write to allocated memory.
void* ptr = sm.Alloc(1000);
memset(ptr, 0, 1000);
// Check that the same allocation after a |free| returns the same pointer.
sm.Free(ptr);
void* ptr2 = sm.Alloc(1000);
assert(ptr == ptr2);
}
template <class T>
void Realloc() {
T sm;
// Check that re-allocating the same size returns the same pointer and same
// data.
uint8_t* ptr = static_cast<uint8_t*>(sm.Alloc(100));
for (int i = 0; i < 100; i++) {
ptr[i] = i * 2;
}
uint8_t* ptr2 = static_cast<uint8_t*>(sm.Realloc(ptr, 100));
assert(ptr == ptr2);
for (int i = 0; i < 100; i++) {
assert(ptr2[i] == i * 2);
}
// Check that re-allocating to a much larger size results in a new pointer
// with memory copied.
const char special_char = 'x';
memset(ptr, special_char, 100);
void* ptr3 = sm.Realloc(ptr2, 1000);
assert(ptr3 != ptr);
for (int i = 0; i < 100; i++) {
assert(static_cast<char*>(ptr3)[i] == special_char);
}
}
template <class T>
void ManyAllocations() {
T sm;
for (int i = 0; i < 1000; i++) {
sm.Alloc(100);
}
auto snapshot = sm.NewEmptySnapshot();
sm.SaveMemoryIntoSnapshot(*snapshot);
sm.LoadMemoryFromSnapshot(*snapshot);
}
NEX_TEST(Memory, AllocAndFree) {
AllocAndFree<SnapshotableAllocatorImpl>();
}
NEX_TEST(Memory, Realloc) {
Realloc<SnapshotableAllocatorImpl>();
}
NEX_TEST(Memory, SnapshotTest) {
SnapshotTest<SnapshotableAllocatorImpl>();
}
NEX_TEST(Memory, ManyAllocations) {
ManyAllocations<SnapshotableAllocatorImpl>();
}
| 23.5 | 77 | 0.676435 | jyaif |
ee687c5ca3d58fe09e5bbd2c5682e697ca462a58 | 5,530 | cpp | C++ | Labirinto_AStar/mainwindow.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | Labirinto_AStar/mainwindow.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | Labirinto_AStar/mainwindow.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "labirinto.h"
#include <QFileDialog>
#include <QMessageBox>
#include <chrono>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
status = new QLabel("");
statusBar()->addWidget(status);
ui->tableWidget->setStyleSheet("QHeaderView::section {background-color:lightgray}");
ui->radioButton->setChecked(true);
redefinir_tabela();
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_tableWidget_cellDoubleClicked(int row, int column)
{
if (labirinto.celulaLivre(Coord(row, column))) {
if (ui->radioButton->isChecked()) {
labirinto.setOrigem(Coord(row, column));
ui->radioButton_2->setChecked(true);
}
else if (ui->radioButton_2->isChecked()) {
labirinto.setDestino(Coord(row, column));
ui->radioButton->setChecked(true);
}
redefinir_tabela();
status->setText("");
}
else {
return;
}
}
void MainWindow::on_actionLer_triggered()
{
QString filename = QFileDialog::getOpenFileName();
if (!labirinto.ler(filename.toStdString())) {
QMessageBox erro;
erro.setText("erro na leitura do arquivo " + filename);
erro.exec();
}
else {
redefinir_tabela();
}
}
void MainWindow::on_actionSalvar_triggered()
{
if (!labirinto.empty()) {
QString filename = QFileDialog::getOpenFileName();
if (!labirinto.salvar(filename.toStdString())) {
QMessageBox erro;
erro.setText("erro na escrita do arquivo " + filename);
erro.exec();
}
}
else {
QMessageBox erro;
erro.setText("erro: mapa vazio");
erro.exec();
}
}
void MainWindow::on_actionGerar_triggered()
{
if (!labirinto.gerar()) {
QMessageBox erro;
erro.setText("erro na geracao do mapa");
erro.exec();
}
else {
redefinir_tabela();
}
}
void MainWindow::on_actionSair_triggered()
{
QCoreApplication::quit();
}
void MainWindow::on_actionCalcular_triggered()
{
if (labirinto.empty()) {
QMessageBox erro;
erro.setText("erro: mapa vazio");
erro.exec();
}
else if (!labirinto.origDestDefinidos()){
QMessageBox erro;
erro.setText("erro: origem e destino nao definidos");
erro.exec();
}
else {
int NN;
int NA;
int NF;
chrono::steady_clock::time_point t0 = chrono::steady_clock::now();
double comprimento = labirinto.calculaCaminho(NN, NA, NF);
chrono::steady_clock::time_point t1 = chrono::steady_clock::now();
chrono::duration<double> dt = chrono::duration_cast<chrono::duration<double>>(t1 - t0);
double dt_ms = 1000 * dt.count();
if (comprimento > 0.0) {
redefinir_tabela();
status->setText(QString::number(comprimento));
QMessageBox resultado;
resultado.setText("caminho encontrado!\nnumero de nos em aberto: "
+ QString::number(NA)
+ "\nnumero de nos em fechado: "
+ QString::number(NF)
+ "\ntempo de execucao: "
+ QString::number(dt_ms));
resultado.exec();
}
else {
QMessageBox resultado;
resultado.setText("caminho nao encontrado!\nnumero de nos em aberto: "
+ QString::number(NA)
+ "\nnumero de nos em fechado: "
+ QString::number(NF)
+ "\ntempo de execucao: "
+ QString::number(dt_ms));
resultado.exec();
}
}
}
void MainWindow::on_actionLimpar_triggered()
{
labirinto.limpaCaminho();
redefinir_tabela();
status->setText("");
}
void MainWindow::redefinir_tabela() {
ui->tableWidget->clear();
ui->tableWidget->setRowCount(labirinto.getNumLin());
ui->tableWidget->setColumnCount(labirinto.getNumCol());
for (int i=0; i<ui->tableWidget->rowCount(); i++) {
for (int j=0; j<ui->tableWidget->columnCount(); j++) {
QLabel* prov = new QLabel("");
prov->setAlignment(Qt::AlignCenter);
ui->tableWidget->setCellWidget(i, j, prov);
if (labirinto.at(i, j) == EstadoCel::LIVRE) {
ui->tableWidget->cellWidget(i, j)->setStyleSheet("background: white");
prov->setText("");
}
else if (labirinto.at(i, j) == EstadoCel::OBSTACULO) {
ui->tableWidget->cellWidget(i, j)->setStyleSheet("background: black");
prov->setText("");
}
if (labirinto.at(i, j) == EstadoCel::CAMINHO) {
ui->tableWidget->cellWidget(i, j)->setStyleSheet("background: white");
prov->setText("X");
}
else if (labirinto.at(i, j) == EstadoCel::ORIGEM) {
ui->tableWidget->cellWidget(i, j)->setStyleSheet("background: yellow");
prov->setText("O");
}
else if (labirinto.at(i, j) == EstadoCel::DESTINO) {
ui->tableWidget->cellWidget(i, j)->setStyleSheet("background: green");
prov->setText("D");
}
}
}
status->setText("");
}
| 28.95288 | 95 | 0.55009 | Bernardo1411 |
ee6bc87d34b309446f6f27f37856c10c4747d49f | 781 | cpp | C++ | src/application/gui/propertyeditor/EvSpiceNumberDelegate.cpp | kaabimg/EvLibrary | 47acd8fdb39c05edb843238a61d0faea5ed6ea88 | [
"Unlicense"
] | 2 | 2017-02-01T11:05:26.000Z | 2017-07-10T13:26:29.000Z | src/application/gui/propertyeditor/EvSpiceNumberDelegate.cpp | kaabimg/EvLibrary | 47acd8fdb39c05edb843238a61d0faea5ed6ea88 | [
"Unlicense"
] | null | null | null | src/application/gui/propertyeditor/EvSpiceNumberDelegate.cpp | kaabimg/EvLibrary | 47acd8fdb39c05edb843238a61d0faea5ed6ea88 | [
"Unlicense"
] | null | null | null | #include "EvSpiceNumberDelegate.h"
#include "EvSpiceNumber.h"
#include <QLineEdit>
QWidget *EvSpiceNumberDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
{
return new QLineEdit(parent);
}
void EvSpiceNumberDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
QLineEdit * lineEdit = qobject_cast<QLineEdit*>(editor);
EvProperty * p = property(index);
lineEdit->setText(qvariant_cast<EvSpiceNumber>(p->value()).toString());
}
void EvSpiceNumberDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
EvSpiceNumber number(qobject_cast<QLineEdit*>(editor)->text());
if(number.isValid())
model->setData(index,number,Qt::EditRole);
}
| 30.038462 | 118 | 0.75032 | kaabimg |
ee7520ad663d352625dd18ec50c6c4a6f7de3337 | 5,754 | hpp | C++ | cpp/Autogarden/include/pins/factory.hpp | e-dang/Autogarden | b15217e5d4755fc028b8dc4255cbdcb77ead80f4 | [
"MIT"
] | null | null | null | cpp/Autogarden/include/pins/factory.hpp | e-dang/Autogarden | b15217e5d4755fc028b8dc4255cbdcb77ead80f4 | [
"MIT"
] | null | null | null | cpp/Autogarden/include/pins/factory.hpp | e-dang/Autogarden | b15217e5d4755fc028b8dc4255cbdcb77ead80f4 | [
"MIT"
] | null | null | null | #pragma once
#include <functional>
#include <pins/logic_input.hpp>
#include <pins/logic_input_pinset.hpp>
#include <pins/logic_output.hpp>
#include <pins/logic_output_pinset.hpp>
#include <pins/terminal.hpp>
#include <pins/terminal_pinset.hpp>
class IPinFactory {
public:
virtual ~IPinFactory() = default;
virtual std::unique_ptr<ITerminalPin> createTerminalPin(const int& pinNum, const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicOutputPin> createLogicOutputPin(const int& pinNum, const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicInputPin> createLogicInputPin(const int& pinNum, const PinMode& pinMode) = 0;
virtual std::unique_ptr<ITerminalPinSet> createTerminalPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) = 0;
virtual std::unique_ptr<ITerminalPinSet> createTerminalPinSet(const int& numPins, const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicOutputPinSet> createLogicOutputPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicOutputPinSet> createLogicOutputPinSet(const int& numPins, const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicInputPinSet> createLogicInputPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) = 0;
virtual std::unique_ptr<ILogicInputPinSet> createLogicInputPinSet(const int& numPins, const PinMode& pinMode) = 0;
};
class PinFactory : public IPinFactory {
public:
std::unique_ptr<ITerminalPin> createTerminalPin(const int& pinNum, const PinMode& pinMode) override {
return std::make_unique<TerminalPin>(pinNum, pinMode);
}
std::unique_ptr<ILogicOutputPin> createLogicOutputPin(const int& pinNum, const PinMode& pinMode) override {
return std::make_unique<LogicOutputPin>(pinNum, pinMode);
}
std::unique_ptr<ILogicInputPin> createLogicInputPin(const int& pinNum, const PinMode& pinMode) override {
return std::make_unique<LogicInputPin>(pinNum, pinMode);
}
std::unique_ptr<ITerminalPinSet> createTerminalPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createTerminalPin(pinNum, pinMode);
};
return __createPinSet<TerminalPinSet, ITerminalPin>(pinNums, pinMode, createPin);
}
std::unique_ptr<ITerminalPinSet> createTerminalPinSet(const int& numPins, const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createTerminalPin(pinNum, pinMode);
};
return __createPinSet<TerminalPinSet, ITerminalPin>(numPins, pinMode, createPin);
}
std::unique_ptr<ILogicOutputPinSet> createLogicOutputPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createLogicOutputPin(pinNum, pinMode);
};
return __createPinSet<LogicOutputPinSet, ILogicOutputPin>(pinNums, pinMode, createPin);
}
std::unique_ptr<ILogicOutputPinSet> createLogicOutputPinSet(const int& numPins, const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createLogicOutputPin(pinNum, pinMode);
};
return __createPinSet<LogicOutputPinSet, ILogicOutputPin>(numPins, pinMode, createPin);
}
std::unique_ptr<ILogicInputPinSet> createLogicInputPinSet(const std::initializer_list<int>& pinNums,
const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createLogicInputPin(pinNum, pinMode);
};
return __createPinSet<LogicInputPinSet, ILogicInputPin>(pinNums, pinMode, createPin);
}
std::unique_ptr<ILogicInputPinSet> createLogicInputPinSet(const int& numPins, const PinMode& pinMode) override {
auto createPin = [this](const int& pinNum, const PinMode& pinMode) {
return this->createLogicInputPin(pinNum, pinMode);
};
return __createPinSet<LogicInputPinSet, ILogicInputPin>(numPins, pinMode, createPin);
}
private:
template <typename T, typename U>
std::unique_ptr<T> __createPinSet(const std::initializer_list<int>& pinNums, const PinMode& pinMode,
std::function<std::unique_ptr<U>(const int&, const PinMode&)> createPin) {
std::vector<std::unique_ptr<U>> pins;
pins.reserve(pinNums.size());
for (const auto& pinNum : pinNums) {
pins.emplace_back(createPin(pinNum, pinMode));
}
return std::make_unique<T>(std::move(pins));
}
template <typename T, typename U>
std::unique_ptr<T> __createPinSet(const int& numPins, const PinMode& pinMode,
std::function<std::unique_ptr<U>(const int&, const PinMode&)> createPin) {
std::vector<std::unique_ptr<U>> pins;
pins.reserve(numPins);
for (int i = 0; i < numPins; i++) {
pins.emplace_back(createPin(i, pinMode));
}
return std::make_unique<T>(std::move(pins));
}
}; | 49.603448 | 120 | 0.648766 | e-dang |
ee7667a329239c078ab356a01f4b4b182a551bbf | 978 | cpp | C++ | BeautifulCPPKateGregory/finding.cpp | przet/CppProgramming | 042aff253988b74db47659d36806912ce84dd8bc | [
"MIT"
] | null | null | null | BeautifulCPPKateGregory/finding.cpp | przet/CppProgramming | 042aff253988b74db47659d36806912ce84dd8bc | [
"MIT"
] | null | null | null | BeautifulCPPKateGregory/finding.cpp | przet/CppProgramming | 042aff253988b74db47659d36806912ce84dd8bc | [
"MIT"
] | null | null | null | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
int main ()
{
std::vector<int> v{1,2,3,5,100,4,7,4};
auto result = std::find(begin(v),end(v),100);
auto resultDeref = *result;
//STL find's return an iterator for generality: not everything
// can be nicely indexed
std::cout<< resultDeref << std::endl;
result = std::find(result,end(v),4);
if (result != end(v))
std::cout << "we have found what we are looking for" << std::endl;
//result, begin(v) and end(v) are iterators. end(v) points to one after the end of v
//works for strings too (or any collection). Note the initialization style:
std::string s{"Hello There Matey!"};
auto letter = std::find(begin(s),end(s),'a');
std::cout << *letter << std::endl;
//TODO: the below won't work though... I will get a pointer vs integer comparison forbidden error (C++ forbids) at compile time
// auto word = std::find(begin(s),end(s),"Hello");
// std::cout << *word << std::endl;
return 0;
}
| 32.6 | 128 | 0.668712 | przet |
ee7a054aa84f0da0ef691965f7dd37607b2c6777 | 74,489 | cpp | C++ | src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp | chinajeffery/MPC-BE--1.2.3 | 2229fde5535f565ba4a496a7f73267bd2c1ad338 | [
"MIT"
] | null | null | null | src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp | chinajeffery/MPC-BE--1.2.3 | 2229fde5535f565ba4a496a7f73267bd2c1ad338 | [
"MIT"
] | 1 | 2019-11-14T04:18:32.000Z | 2019-11-14T04:18:32.000Z | src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp | chinajeffery/MPC-BE--1.2.3 | 2229fde5535f565ba4a496a7f73267bd2c1ad338 | [
"MIT"
] | null | null | null | /*
* $Id: DX9AllocatorPresenter.cpp 2691 2013-05-13 01:53:19Z aleksoid $
*
* (C) 2003-2006 Gabest
* (C) 2006-2013 see Authors.txt
*
* This file is part of MPC-BE.
*
* MPC-BE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* MPC-BE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "stdafx.h"
#include "RenderersSettings.h"
#include "DX9AllocatorPresenter.h"
#include <InitGuid.h>
#include <utility>
#include "../../../SubPic/DX9SubPic.h"
#include "../../../SubPic/SubPicQueueImpl.h"
#include "IPinHook.h"
#include <Version.h>
#include "../DSUtil/WinAPIUtils.h"
CCritSec g_ffdshowReceive;
bool queue_ffdshow_support = false;
// only for debugging
//#define DISABLE_USING_D3D9EX
#define FRAMERATE_MAX_DELTA 3000
using namespace DSObjects;
// CDX9AllocatorPresenter
CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, bool bIsEVR, CString &_Error)
: CDX9RenderingEngine(hWnd, hr, &_Error)
, m_RefreshRate(0)
, m_nTearingPos(0)
, m_nVMR9Surfaces(0)
, m_iVMR9Surface(0)
, m_rtTimePerFrame(0)
, m_bInterlaced(false)
, m_nUsedBuffer(0)
, m_OrderedPaint(0)
, m_bCorrectedFrameTime(0)
, m_FrameTimeCorrection(0)
, m_LastSampleTime(0)
, m_LastFrameDuration(0)
, m_bAlternativeVSync(0)
, m_bIsEVR(bIsEVR)
, m_VSyncMode(0)
, m_TextScale(1.0)
, m_MainThreadId(0)
, m_bNeedCheckSample(true)
, m_pDirectDraw(NULL)
, m_hVSyncThread(NULL)
, m_hEvtQuit(NULL)
, m_bIsFullscreen(bFullscreen)
, m_Decoder(_T(""))
, m_InputVCodec(_T(""))
, m_nRenderState(Undefined)
, m_MonitorName(_T(""))
, m_nMonitorHorRes(0), m_nMonitorVerRes(0)
, m_rcMonitor(0, 0, 0, 0)
{
HINSTANCE hDll;
if (FAILED(hr)) {
_Error += L"ISubPicAllocatorPresenterImpl failed\n";
return;
}
m_pD3DXLoadSurfaceFromMemory = NULL;
m_pD3DXLoadSurfaceFromSurface = NULL;
m_pD3DXCreateLine = NULL;
m_pD3DXCreateFont = NULL;
m_pD3DXCreateSprite = NULL;
hDll = GetRenderersData()->GetD3X9Dll();
if (hDll) {
(FARPROC&)m_pD3DXLoadSurfaceFromMemory = GetProcAddress(hDll, "D3DXLoadSurfaceFromMemory");
(FARPROC&)m_pD3DXLoadSurfaceFromSurface = GetProcAddress(hDll, "D3DXLoadSurfaceFromSurface");
(FARPROC&)m_pD3DXCreateLine = GetProcAddress(hDll, "D3DXCreateLine");
(FARPROC&)m_pD3DXCreateFont = GetProcAddress(hDll, "D3DXCreateFontW");
(FARPROC&)m_pD3DXCreateSprite = GetProcAddress(hDll, "D3DXCreateSprite");
} else {
_Error += L"The installed DirectX End-User Runtime is outdated. Please download and install the ";
_Error += DIRECTX_SDK_DATE;
_Error += L" release or newer in order for MPC-BE to function properly.\n";
}
m_pDwmIsCompositionEnabled = NULL;
m_pDwmEnableComposition = NULL;
m_hDWMAPI = LoadLibrary(L"dwmapi.dll");
if (m_hDWMAPI) {
(FARPROC &)m_pDwmIsCompositionEnabled = GetProcAddress(m_hDWMAPI, "DwmIsCompositionEnabled");
(FARPROC &)m_pDwmEnableComposition = GetProcAddress(m_hDWMAPI, "DwmEnableComposition");
}
m_pDirect3DCreate9Ex = NULL;
m_hD3D9 = LoadLibrary(L"d3d9.dll");
#ifndef DISABLE_USING_D3D9EX
if (m_hD3D9) {
(FARPROC &)m_pDirect3DCreate9Ex = GetProcAddress(m_hD3D9, "Direct3DCreate9Ex");
}
#endif
if (m_pDirect3DCreate9Ex) {
m_pDirect3DCreate9Ex(D3D_SDK_VERSION, &m_pD3DEx);
if (!m_pD3DEx) {
m_pDirect3DCreate9Ex(D3D9b_SDK_VERSION, &m_pD3DEx);
}
}
if (!m_pD3DEx) {
m_pD3D.Attach(Direct3DCreate9(D3D_SDK_VERSION));
if (!m_pD3D) {
m_pD3D.Attach(Direct3DCreate9(D3D9b_SDK_VERSION));
}
} else {
m_pD3D = m_pD3DEx;
}
CRenderersSettings& s = GetRenderersSettings();
if (s.m_AdvRendSets.iVMRDisableDesktopComposition) {
m_bDesktopCompositionDisabled = true;
if (m_pDwmEnableComposition) {
m_pDwmEnableComposition(0);
}
} else {
m_bDesktopCompositionDisabled = false;
}
hr = CreateDevice(_Error);
}
CDX9AllocatorPresenter::~CDX9AllocatorPresenter()
{
if (m_bDesktopCompositionDisabled) {
m_bDesktopCompositionDisabled = false;
if (m_pDwmEnableComposition) {
m_pDwmEnableComposition(1);
}
}
StopWorkerThreads();
m_pFont = NULL;
m_pLine = NULL;
m_pD3DDev = NULL;
m_pD3DDevEx = NULL;
CleanupRenderingEngine();
m_pD3D = NULL;
m_pD3DEx = NULL;
if (m_hDWMAPI) {
FreeLibrary(m_hDWMAPI);
m_hDWMAPI = NULL;
}
if (m_hD3D9) {
FreeLibrary(m_hD3D9);
m_hD3D9 = NULL;
}
}
void ModerateFloat(double& Value, double Target, double& ValuePrim, double ChangeSpeed);
#if 0
class CRandom31
{
public:
CRandom31() {
m_Seed = 12164;
}
void f_SetSeed(int32 _Seed) {
m_Seed = _Seed;
}
int32 f_GetSeed() {
return m_Seed;
}
/*
Park and Miller's psuedo-random number generator.
*/
int32 m_Seed;
int32 f_Get() {
static const int32 A = 16807;
static const int32 M = 2147483647; // 2^31 - 1
static const int32 q = M / A; // M / A
static const int32 r = M % A; // M % A
m_Seed = A * (m_Seed % q) - r * (m_Seed / q);
if (m_Seed < 0) {
m_Seed += M;
}
return m_Seed;
}
static int32 fs_Max() {
return 2147483646;
}
double f_GetFloat() {
return double(f_Get()) * (1.0 / double(fs_Max()));
}
};
class CVSyncEstimation
{
private:
class CHistoryEntry
{
public:
CHistoryEntry() {
m_Time = 0;
m_ScanLine = -1;
}
LONGLONG m_Time;
int m_ScanLine;
};
class CSolution
{
public:
CSolution() {
m_ScanLines = 1000;
m_ScanLinesPerSecond = m_ScanLines * 100;
}
int m_ScanLines;
double m_ScanLinesPerSecond;
double m_SqrSum;
void f_Mutate(double _Amount, CRandom31 &_Random, int _MinScans) {
int ToDo = _Random.f_Get() % 10;
if (ToDo == 0) {
m_ScanLines = m_ScanLines / 2;
} else if (ToDo == 1) {
m_ScanLines = m_ScanLines * 2;
}
m_ScanLines = m_ScanLines * (1.0 + (_Random.f_GetFloat() * _Amount) - _Amount * 0.5);
m_ScanLines = max(m_ScanLines, _MinScans);
if (ToDo == 2) {
m_ScanLinesPerSecond /= (_Random.f_Get() % 4) + 1;
} else if (ToDo == 3) {
m_ScanLinesPerSecond *= (_Random.f_Get() % 4) + 1;
}
m_ScanLinesPerSecond *= 1.0 + (_Random.f_GetFloat() * _Amount) - _Amount * 0.5;
}
void f_SpawnInto(CSolution &_Other, CRandom31 &_Random, int _MinScans) {
_Other = *this;
_Other.f_Mutate(_Random.f_GetFloat() * 0.1, _Random, _MinScans);
}
static int fs_Compare(const void *_pFirst, const void *_pSecond) {
const CSolution *pFirst = (const CSolution *)_pFirst;
const CSolution *pSecond = (const CSolution *)_pSecond;
if (pFirst->m_SqrSum < pSecond->m_SqrSum) {
return -1;
} else if (pFirst->m_SqrSum > pSecond->m_SqrSum) {
return 1;
}
return 0;
}
};
enum {
ENumHistory = 128
};
CHistoryEntry m_History[ENumHistory];
int m_iHistory;
CSolution m_OldSolutions[2];
CRandom31 m_Random;
double fp_GetSquareSum(double _ScansPerSecond, double _ScanLines) {
double SquareSum = 0;
int nHistory = min(m_nHistory, ENumHistory);
int iHistory = m_iHistory - nHistory;
if (iHistory < 0) {
iHistory += ENumHistory;
}
for (int i = 1; i < nHistory; ++i) {
int iHistory0 = iHistory + i - 1;
int iHistory1 = iHistory + i;
if (iHistory0 < 0) {
iHistory0 += ENumHistory;
}
iHistory0 = iHistory0 % ENumHistory;
iHistory1 = iHistory1 % ENumHistory;
ASSERT(m_History[iHistory0].m_Time != 0);
ASSERT(m_History[iHistory1].m_Time != 0);
double DeltaTime = (m_History[iHistory1].m_Time - m_History[iHistory0].m_Time)/10000000.0;
double PredictedScanLine = m_History[iHistory0].m_ScanLine + DeltaTime * _ScansPerSecond;
PredictedScanLine = fmod(PredictedScanLine, _ScanLines);
double Delta = (m_History[iHistory1].m_ScanLine - PredictedScanLine);
double DeltaSqr = Delta * Delta;
SquareSum += DeltaSqr;
}
return SquareSum;
}
int m_nHistory;
public:
CVSyncEstimation() {
m_iHistory = 0;
m_nHistory = 0;
}
void f_AddSample(int _ScanLine, LONGLONG _Time) {
m_History[m_iHistory].m_ScanLine = _ScanLine;
m_History[m_iHistory].m_Time = _Time;
++m_nHistory;
m_iHistory = (m_iHistory + 1) % ENumHistory;
}
void f_GetEstimation(double &_RefreshRate, int &_ScanLines, int _ScreenSizeY, int _WindowsRefreshRate) {
_RefreshRate = 0;
_ScanLines = 0;
int iHistory = m_iHistory;
// We have a full history
if (m_nHistory > 10) {
for (int l = 0; l < 5; ++l) {
const int nSol = 3+5+5+3;
CSolution Solutions[nSol];
Solutions[0] = m_OldSolutions[0];
Solutions[1] = m_OldSolutions[1];
Solutions[2].m_ScanLines = _ScreenSizeY;
Solutions[2].m_ScanLinesPerSecond = _ScreenSizeY * _WindowsRefreshRate;
int iStart = 3;
for (int i = iStart; i < iStart + 5; ++i) {
Solutions[0].f_SpawnInto(Solutions[i], m_Random, _ScreenSizeY);
}
iStart += 5;
for (int i = iStart; i < iStart + 5; ++i) {
Solutions[1].f_SpawnInto(Solutions[i], m_Random, _ScreenSizeY);
}
iStart += 5;
for (int i = iStart; i < iStart + 3; ++i) {
Solutions[2].f_SpawnInto(Solutions[i], m_Random, _ScreenSizeY);
}
int Start = 2;
if (l == 0) {
Start = 0;
}
for (int i = Start; i < nSol; ++i) {
Solutions[i].m_SqrSum = fp_GetSquareSum(Solutions[i].m_ScanLinesPerSecond, Solutions[i].m_ScanLines);
}
qsort(Solutions, nSol, sizeof(Solutions[0]), &CSolution::fs_Compare);
for (int i = 0; i < 2; ++i) {
m_OldSolutions[i] = Solutions[i];
}
}
_ScanLines = m_OldSolutions[0].m_ScanLines + 0.5;
_RefreshRate = 1.0 / (m_OldSolutions[0].m_ScanLines / m_OldSolutions[0].m_ScanLinesPerSecond);
} else {
m_OldSolutions[0].m_ScanLines = _ScreenSizeY;
m_OldSolutions[1].m_ScanLines = _ScreenSizeY;
}
}
};
#endif
void CDX9AllocatorPresenter::VSyncThread()
{
HANDLE hEvts[] = { m_hEvtQuit};
bool bQuit = false;
TIMECAPS tc;
DWORD dwResolution;
DWORD dwUser = 0;
// Tell Vista Multimedia Class Scheduler we are a playback thread (increase priority)
//DWORD dwTaskIndex = 0;
//if (pfAvSetMmThreadCharacteristicsW)
// hAvrt = pfAvSetMmThreadCharacteristicsW (L"Playback", &dwTaskIndex);
//if (pfAvSetMmThreadPriority)
// pfAvSetMmThreadPriority (hAvrt, AVRT_PRIORITY_HIGH /*AVRT_PRIORITY_CRITICAL*/);
timeGetDevCaps(&tc, sizeof(TIMECAPS));
dwResolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
dwUser = timeBeginPeriod(dwResolution);
CRenderersData *pApp = GetRenderersData();
CRenderersSettings& s = GetRenderersSettings();
while (!bQuit) {
DWORD dwObject = WaitForMultipleObjects (_countof(hEvts), hEvts, FALSE, 1);
switch (dwObject) {
case WAIT_OBJECT_0 :
bQuit = true;
break;
case WAIT_TIMEOUT : {
// Do our stuff
if (m_pD3DDev && s.m_AdvRendSets.iVMR9VSync) {
if (m_nRenderState != Undefined && m_nRenderState != Started) {
// we do not need clear m_DetectedRefreshRate & m_DetectedScanlinesPerFrame variable, so do continue
continue;
}
int VSyncPos = GetVBlackPos();
int WaitRange = max(m_ScreenSize.cy / 40, 5);
int MinRange = max(min(int(0.003 * double(m_ScreenSize.cy) * double(m_RefreshRate) + 0.5), m_ScreenSize.cy/3), 5); // 1.8 ms or max 33 % of Time
VSyncPos += MinRange + WaitRange;
VSyncPos = VSyncPos % m_ScreenSize.cy;
if (VSyncPos < 0) {
VSyncPos += m_ScreenSize.cy;
}
int ScanLine = 0;
int StartScanLine = ScanLine;
UNREFERENCED_PARAMETER(StartScanLine);
int LastPos = ScanLine;
UNREFERENCED_PARAMETER(LastPos);
ScanLine = (VSyncPos + 1) % m_ScreenSize.cy;
if (ScanLine < 0) {
ScanLine += m_ScreenSize.cy;
}
int ScanLineMiddle = ScanLine + m_ScreenSize.cy/2;
ScanLineMiddle = ScanLineMiddle % m_ScreenSize.cy;
if (ScanLineMiddle < 0) {
ScanLineMiddle += m_ScreenSize.cy;
}
int ScanlineStart = ScanLine;
bool bTakenLock;
WaitForVBlankRange(ScanlineStart, 5, true, true, false, bTakenLock);
LONGLONG TimeStart = pApp->GetPerfCounter();
WaitForVBlankRange(ScanLineMiddle, 5, true, true, false, bTakenLock);
LONGLONG TimeMiddle = pApp->GetPerfCounter();
int ScanlineEnd = ScanLine;
WaitForVBlankRange(ScanlineEnd, 5, true, true, false, bTakenLock);
LONGLONG TimeEnd = pApp->GetPerfCounter();
double nSeconds = double(TimeEnd - TimeStart) / 10000000.0;
LONGLONG DiffMiddle = TimeMiddle - TimeStart;
LONGLONG DiffEnd = TimeEnd - TimeMiddle;
double DiffDiff;
if (DiffEnd > DiffMiddle) {
DiffDiff = double(DiffEnd) / double(DiffMiddle);
} else {
DiffDiff = double(DiffMiddle) / double(DiffEnd);
}
if (nSeconds > 0.003 && DiffDiff < 1.3) {
double ScanLineSeconds;
double nScanLines;
if (ScanLineMiddle > ScanlineEnd) {
ScanLineSeconds = double(TimeMiddle - TimeStart) / 10000000.0;
nScanLines = ScanLineMiddle - ScanlineStart;
} else {
ScanLineSeconds = double(TimeEnd - TimeMiddle) / 10000000.0;
nScanLines = ScanlineEnd - ScanLineMiddle;
}
double ScanLineTime = ScanLineSeconds / nScanLines;
int iPos = m_DetectedRefreshRatePos % 100;
m_ldDetectedScanlineRateList[iPos] = ScanLineTime;
if (m_DetectedScanlineTime && ScanlineStart != ScanlineEnd) {
int Diff = ScanlineEnd - ScanlineStart;
nSeconds -= double(Diff) * m_DetectedScanlineTime;
}
m_ldDetectedRefreshRateList[iPos] = nSeconds;
double Average = 0;
double AverageScanline = 0;
int nPos = min(iPos + 1, 100);
for (int i = 0; i < nPos; ++i) {
Average += m_ldDetectedRefreshRateList[i];
AverageScanline += m_ldDetectedScanlineRateList[i];
}
if (nPos) {
Average /= double(nPos);
AverageScanline /= double(nPos);
} else {
Average = 0;
AverageScanline = 0;
}
double ThisValue = Average;
if (Average > 0.0 && AverageScanline > 0.0) {
CAutoLock Lock(&m_RefreshRateLock);
++m_DetectedRefreshRatePos;
if (m_DetectedRefreshTime == 0 || m_DetectedRefreshTime / ThisValue > 1.01 || m_DetectedRefreshTime / ThisValue < 0.99) {
m_DetectedRefreshTime = ThisValue;
m_DetectedRefreshTimePrim = 0;
}
if (_isnan(m_DetectedRefreshTime)) {m_DetectedRefreshTime = 0.0;}
if (_isnan(m_DetectedRefreshTimePrim)) {m_DetectedRefreshTimePrim = 0.0;}
ModerateFloat(m_DetectedRefreshTime, ThisValue, m_DetectedRefreshTimePrim, 1.5);
if (m_DetectedRefreshTime > 0.0) {
m_DetectedRefreshRate = 1.0/m_DetectedRefreshTime;
} else {
m_DetectedRefreshRate = 0.0;
}
if (m_DetectedScanlineTime == 0 || m_DetectedScanlineTime / AverageScanline > 1.01 || m_DetectedScanlineTime / AverageScanline < 0.99) {
m_DetectedScanlineTime = AverageScanline;
m_DetectedScanlineTimePrim = 0;
}
ModerateFloat(m_DetectedScanlineTime, AverageScanline, m_DetectedScanlineTimePrim, 1.5);
if (m_DetectedScanlineTime > 0.0) {
m_DetectedScanlinesPerFrame = m_DetectedRefreshTime / m_DetectedScanlineTime;
} else {
m_DetectedScanlinesPerFrame = 0;
}
}
//TRACE("Refresh: %f\n", RefreshRate);
}
} else {
m_DetectedRefreshRate = 0.0;
m_DetectedScanlinesPerFrame = 0.0;
}
}
break;
}
}
timeEndPeriod (dwResolution);
//if (pfAvRevertMmThreadCharacteristics) pfAvRevertMmThreadCharacteristics (hAvrt);
}
DWORD WINAPI CDX9AllocatorPresenter::VSyncThreadStatic(LPVOID lpParam)
{
SetThreadName((DWORD)-1, "CDX9Presenter::VSyncThread");
CDX9AllocatorPresenter* pThis = (CDX9AllocatorPresenter*) lpParam;
pThis->VSyncThread();
return 0;
}
void CDX9AllocatorPresenter::StartWorkerThreads()
{
DWORD dwThreadId;
if ( m_bIsEVR ) {
m_hEvtQuit = CreateEvent( NULL, TRUE, FALSE, NULL );
if ( m_hEvtQuit != NULL ) { // Don't create a thread with no stop switch
m_hVSyncThread = ::CreateThread( NULL, 0, VSyncThreadStatic, (LPVOID)this, 0, &dwThreadId );
if ( m_hVSyncThread != NULL ) {
SetThreadPriority( m_hVSyncThread, THREAD_PRIORITY_HIGHEST );
}
}
}
}
void CDX9AllocatorPresenter::StopWorkerThreads()
{
if ( m_bIsEVR ) {
if ( m_hEvtQuit != NULL ) {
SetEvent( m_hEvtQuit );
if ( m_hVSyncThread != NULL ) {
if ( WaitForSingleObject(m_hVSyncThread, 10000) == WAIT_TIMEOUT ) {
ASSERT(FALSE);
TerminateThread( m_hVSyncThread, 0xDEAD );
}
CloseHandle( m_hVSyncThread );
m_hVSyncThread = NULL;
}
CloseHandle( m_hEvtQuit );
m_hEvtQuit = NULL;
}
}
}
bool CDX9AllocatorPresenter::SettingsNeedResetDevice()
{
CRenderersSettings& s = GetRenderersSettings();
CRenderersSettings::CAdvRendererSettings & New = GetRenderersSettings().m_AdvRendSets;
CRenderersSettings::CAdvRendererSettings & Current = m_LastRendererSettings;
bool bRet = false;
bRet = bRet || New.fVMR9AlterativeVSync != Current.fVMR9AlterativeVSync;
bRet = bRet || New.iVMR9VSyncAccurate != Current.iVMR9VSyncAccurate;
if (m_bIsFullscreen) {
bRet = bRet || New.iVMR9FullscreenGUISupport != Current.iVMR9FullscreenGUISupport;
} else {
if (Current.iVMRDisableDesktopComposition) {
if (!m_bDesktopCompositionDisabled) {
m_bDesktopCompositionDisabled = true;
if (m_pDwmEnableComposition) {
m_pDwmEnableComposition(0);
}
}
} else {
if (m_bDesktopCompositionDisabled) {
m_bDesktopCompositionDisabled = false;
if (m_pDwmEnableComposition) {
m_pDwmEnableComposition(1);
}
}
}
}
if (m_bIsEVR) {
bRet = bRet || New.iEVRHighColorResolution != Current.iEVRHighColorResolution;
bRet = bRet || New.iEVRForceInputHighColorResolution != Current.iEVRForceInputHighColorResolution;
}
m_LastRendererSettings = s.m_AdvRendSets;
return bRet;
}
HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
{
TRACE("CDX9AllocatorPresenter::CreateDevice()\n");
CAutoLock cRenderLock(&m_CreateLock);
StopWorkerThreads();
// extern variable
g_bGetFrameType = FALSE;
g_nFrameType = PICT_NONE;
CRenderersSettings& s = GetRenderersSettings();
CRenderersData* renderersData = GetRenderersData();
m_DetectedFrameRate = 0.0;
m_DetectedFrameTime = 0.0;
m_DetectedFrameTimeStdDev = 0.0;
m_DetectedLock = false;
ZeroMemory(m_DetectedFrameTimeHistory, sizeof(m_DetectedFrameTimeHistory));
ZeroMemory(m_DetectedFrameTimeHistoryHistory, sizeof(m_DetectedFrameTimeHistoryHistory));
m_DetectedFrameTimePos = 0;
ZeroMemory(&m_VMR9AlphaBitmap, sizeof(m_VMR9AlphaBitmap));
ZeroMemory(m_ldDetectedRefreshRateList, sizeof(m_ldDetectedRefreshRateList));
ZeroMemory(m_ldDetectedScanlineRateList, sizeof(m_ldDetectedScanlineRateList));
m_DetectedRefreshRatePos = 0;
m_DetectedRefreshTimePrim = 0;
m_DetectedScanlineTime = 0;
m_DetectedScanlineTimePrim = 0;
m_DetectedRefreshRate = 0;
memset (m_pllJitter, 0, sizeof(m_pllJitter));
memset (m_pllSyncOffset, 0, sizeof(m_pllSyncOffset));
m_nNextJitter = 0;
m_nNextSyncOffset = 0;
m_llLastPerf = 0;
m_fAvrFps = 0.0;
m_fJitterStdDev = 0.0;
m_fSyncOffsetStdDev = 0.0;
m_fSyncOffsetAvr = 0.0;
m_bSyncStatsAvailable = false;
m_VBlankEndWait = 0;
m_VBlankMin = 300000;
m_VBlankMinCalc = 300000;
m_VBlankMax = 0;
m_VBlankStartWait = 0;
m_VBlankWaitTime = 0;
m_VBlankLockTime = 0;
m_PresentWaitTime = 0;
m_PresentWaitTimeMin = 3000000000;
m_PresentWaitTimeMax = 0;
m_LastRendererSettings = s.m_AdvRendSets;
m_VBlankEndPresent = -100000;
m_VBlankStartMeasureTime = 0;
m_VBlankStartMeasure = 0;
m_PaintTime = 0;
m_PaintTimeMin = 3000000000;
m_PaintTimeMax = 0;
m_RasterStatusWaitTime = 0;
m_RasterStatusWaitTimeMin = 3000000000;
m_RasterStatusWaitTimeMax = 0;
m_RasterStatusWaitTimeMaxCalc = 0;
m_ClockDiff = 0.0;
m_ClockDiffPrim = 0.0;
m_ClockDiffCalc = 0.0;
m_ModeratedTimeSpeed = 1.0;
m_ModeratedTimeSpeedDiff = 0.0;
m_ModeratedTimeSpeedPrim = 0;
ZeroMemory(m_TimeChangeHistory, sizeof(m_TimeChangeHistory));
ZeroMemory(m_ClockChangeHistory, sizeof(m_ClockChangeHistory));
m_ClockTimeChangeHistoryPos = 0;
m_pD3DDev = NULL;
m_pD3DDevEx = NULL;
m_pDirectDraw = NULL;
CleanupRenderingEngine();
if (!m_pD3D) {
_Error += L"Failed to create D3D9\n";
return E_UNEXPECTED;
}
HRESULT hr = S_OK;
m_CurrentAdapter = GetAdapter(m_pD3D);
/* // TODO : add nVidia PerfHUD !!!
// Set default settings
UINT AdapterToUse=D3DADAPTER_DEFAULT;
D3DDEVTYPE DeviceType=D3DDEVTYPE_HAL;
#if SHIPPING_VERSION
// When building a shipping version, disable PerfHUD (opt-out)
#else
// Look for 'NVIDIA PerfHUD' adapter
// If it is present, override default settings
for (UINT Adapter=0;Adapter<g_pD3D->GetAdapterCount();Adapter++)
{
D3DADAPTER_IDENTIFIER9 Identifier;
HRESULT Res;
Res = g_pD3D->GetAdapterIdentifier(Adapter,0,&Identifier);
if (strstr(Identifier.Description,"PerfHUD") != 0)
{
AdapterToUse=Adapter;
DeviceType=D3DDEVTYPE_REF;
break;
}
}
#endif
if (FAILED(g_pD3D->CreateDevice( AdapterToUse, DeviceType, hWnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice) ) )
{
return E_FAIL;
}
*/
//#define ENABLE_DDRAWSYNC
#ifdef ENABLE_DDRAWSYNC
hr = DirectDrawCreate(NULL, &m_pDirectDraw, NULL) ;
if (hr == S_OK) {
hr = m_pDirectDraw->SetCooperativeLevel(m_hWnd, DDSCL_NORMAL) ;
}
#endif
ZeroMemory(&m_pp, sizeof(m_pp));
BOOL bCompositionEnabled = false;
if (m_pDwmIsCompositionEnabled) {
m_pDwmIsCompositionEnabled(&bCompositionEnabled);
}
m_bCompositionEnabled = !!bCompositionEnabled;
m_bAlternativeVSync = s.m_AdvRendSets.fVMR9AlterativeVSync;
// detect FP textures support
renderersData->m_bFP16Support = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A32B32G32R32F));
// detect 10-bit textures support
renderersData->m_b10bitSupport = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10));
// set settings that depend on hardware feature support
m_bForceInputHighColorResolution = s.m_AdvRendSets.iEVRForceInputHighColorResolution && m_bIsEVR && renderersData->m_b10bitSupport;
m_bHighColorResolution = s.m_AdvRendSets.iEVRHighColorResolution && m_bIsEVR && renderersData->m_b10bitSupport;
m_bFullFloatingPointProcessing = s.m_AdvRendSets.iVMR9FullFloatingPointProcessing && renderersData->m_bFP16Support;
m_bHalfFloatingPointProcessing = s.m_AdvRendSets.iVMR9HalfFloatingPointProcessing && renderersData->m_bFP16Support && !m_bFullFloatingPointProcessing;
// set color formats
if (m_bFullFloatingPointProcessing) {
m_SurfaceType = D3DFMT_A32B32G32R32F;
} else if (m_bHalfFloatingPointProcessing) {
m_SurfaceType = D3DFMT_A16B16G16R16F;
} else if (m_bForceInputHighColorResolution || m_bHighColorResolution) {
m_SurfaceType = D3DFMT_A2R10G10B10;
} else {
m_SurfaceType = D3DFMT_X8R8G8B8;
}
D3DDISPLAYMODEEX DisplayMode;
ZeroMemory(&DisplayMode, sizeof(DisplayMode));
DisplayMode.Size = sizeof(DisplayMode);
D3DDISPLAYMODE d3ddm;
ZeroMemory(&d3ddm, sizeof(d3ddm));
if (m_bIsFullscreen) {
if (m_bHighColorResolution) {
m_pp.BackBufferFormat = D3DFMT_A2R10G10B10;
} else {
m_pp.BackBufferFormat = D3DFMT_X8R8G8B8;
}
m_pp.Windowed = false;
m_pp.BackBufferCount = 3;
m_pp.SwapEffect = D3DSWAPEFFECT_FLIP;
// there's no Desktop composition to take care of alternative vSync in exclusive mode, alternative vSync is therefore unused
m_pp.hDeviceWindow = m_hWnd;
m_pp.Flags = D3DPRESENTFLAG_VIDEO;
if (s.m_AdvRendSets.iVMR9FullscreenGUISupport && !m_bHighColorResolution) {
m_pp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
}
m_D3DDevExError = L"No m_pD3DEx";
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
DisplayMode.Format = m_pp.BackBufferFormat;
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
m_pp.FullScreen_RefreshRateInHz = m_RefreshRate = DisplayMode.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3DEx->CreateDeviceEx(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS, //D3DCREATE_MANAGED
&m_pp, &DisplayMode, &m_pD3DDevEx);
m_D3DDevExError = GetWindowsErrorMessage(hr, m_hD3D9);
if (m_pD3DDevEx) {
m_pD3DDev = m_pD3DDevEx;
m_BackbufferType = m_pp.BackBufferFormat;
m_DisplayType = DisplayMode.Format;
}
}
if (!m_pD3DDev) {
m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
d3ddm.Format = m_pp.BackBufferFormat;
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
m_pp.FullScreen_RefreshRateInHz = m_RefreshRate = d3ddm.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3D->CreateDevice(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED, //D3DCREATE_MANAGED
&m_pp, &m_pD3DDev);
m_DisplayType = d3ddm.Format;
m_BackbufferType = m_pp.BackBufferFormat;
}
if (m_pD3DDev && s.m_AdvRendSets.iVMR9FullscreenGUISupport && !m_bHighColorResolution) {
m_pD3DDev->SetDialogBoxMode(true);
//if (m_pD3DDev->SetDialogBoxMode(true) != S_OK)
// ExitProcess(0);
}
} else {
m_pp.Windowed = TRUE;
m_pp.hDeviceWindow = m_hWnd;
m_pp.SwapEffect = D3DSWAPEFFECT_COPY;
m_pp.Flags = D3DPRESENTFLAG_VIDEO;
m_pp.BackBufferCount = 1;
if (bCompositionEnabled || m_bAlternativeVSync) {
// Desktop composition takes care of the VSYNC
m_pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
}
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
m_RefreshRate = DisplayMode.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
// We can get 0x8876086a here when switching from two displays to one display using Win + P (Windows 7)
// Cause: We might not reinitialize dx correctly during the switch
hr = m_pD3DEx->CreateDeviceEx(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS, //D3DCREATE_MANAGED
&m_pp, NULL, &m_pD3DDevEx);
if (m_pD3DDevEx) {
m_pD3DDev = m_pD3DDevEx;
m_DisplayType = DisplayMode.Format;
}
}
if (!m_pD3DDev) {
m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
m_RefreshRate = d3ddm.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3D->CreateDevice(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED, //D3DCREATE_MANAGED
&m_pp, &m_pD3DDev);
m_DisplayType = d3ddm.Format;
}
m_BackbufferType = m_pp.BackBufferFormat;
}
while (hr == D3DERR_DEVICELOST) {
TRACE("D3DERR_DEVICELOST. Trying to Reset.\n");
hr = m_pD3DDev->TestCooperativeLevel();
}
if (hr == D3DERR_DEVICENOTRESET) {
TRACE("D3DERR_DEVICENOTRESET\n");
hr = m_pD3DDev->Reset(&m_pp);
}
TRACE("CreateDevice: %d\n", (LONG)hr);
ASSERT (SUCCEEDED (hr));
m_MainThreadId = GetCurrentThreadId();
if (m_pD3DDevEx) {
m_pD3DDevEx->SetGPUThreadPriority(7);
}
if (FAILED(hr)) {
_Error += L"CreateDevice failed\n";
CStringW str;
str.Format(L"Error code: 0x%X\n", hr);
_Error += str;
return hr;
}
// Get the device caps
ZeroMemory(&m_Caps, sizeof(m_Caps));
m_pD3DDev->GetDeviceCaps(&m_Caps);
// Initialize the rendering engine
InitRenderingEngine();
CComPtr<ISubPicProvider> pSubPicProvider;
if (m_pSubPicQueue) {
m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
}
CSize size;
switch (GetRenderersSettings().nSPCMaxRes) {
case 0:
default:
size = m_ScreenSize;
break;
case 1:
size.SetSize(1024, 768);
break;
case 2:
size.SetSize(800, 600);
break;
case 3:
size.SetSize(640, 480);
break;
case 4:
size.SetSize(512, 384);
break;
case 5:
size.SetSize(384, 288);
break;
case 6:
size.SetSize(2560, 1600);
break;
case 7:
size.SetSize(1920, 1080);
break;
case 8:
size.SetSize(1320, 900);
break;
case 9:
size.SetSize(1280, 720);
break;
}
if (m_pAllocator) {
m_pAllocator->ChangeDevice(m_pD3DDev);
} else {
m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, GetRenderersSettings().fSPCPow2Tex, false);
}
if (!m_pAllocator) {
_Error += L"CDX9SubPicAllocator failed\n";
return E_FAIL;
}
hr = S_OK;
m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if (!m_pSubPicQueue || FAILED(hr)) {
_Error += L"m_pSubPicQueue failed\n";
return E_FAIL;
}
if (pSubPicProvider) {
m_pSubPicQueue->SetSubPicProvider(pSubPicProvider);
}
m_pFont = NULL;
m_pSprite = NULL;
m_pLine = NULL;
m_LastAdapterCheck = GetRenderersData()->GetPerfCounter();
m_MonitorName.Empty();
m_nMonitorHorRes = m_nMonitorVerRes = 0;
HMONITOR hMonitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
MONITORINFOEX mi;
mi.cbSize = sizeof(MONITORINFOEX);
if (GetMonitorInfo(hMonitor, &mi)) {
ReadDisplay(mi.szDevice, &m_MonitorName, &m_nMonitorHorRes, &m_nMonitorVerRes);
m_rcMonitor = mi.rcMonitor;
}
StartWorkerThreads();
return S_OK;
}
HRESULT CDX9AllocatorPresenter::AllocSurfaces()
{
CAutoLock cAutoLock(this);
CAutoLock cRenderLock(&m_RenderLock);
return CreateVideoSurfaces();
}
void CDX9AllocatorPresenter::DeleteSurfaces()
{
CAutoLock cAutoLock(this);
CAutoLock cRenderLock(&m_RenderLock);
FreeVideoSurfaces();
}
UINT CDX9AllocatorPresenter::GetAdapter(IDirect3D9* pD3D, bool bGetAdapter)
{
if (m_hWnd == NULL || pD3D == NULL) {
return D3DADAPTER_DEFAULT;
}
m_D3D9Device = _T("");
CRenderersSettings& s = GetRenderersSettings();
if (bGetAdapter && pD3D->GetAdapterCount() > 1 && s.D3D9RenderDevice.GetLength() > 0) {
TCHAR strGUID[50];
D3DADAPTER_IDENTIFIER9 adapterIdentifier;
for (UINT adp = 0, num_adp = pD3D->GetAdapterCount(); adp < num_adp; ++adp) {
if (pD3D->GetAdapterIdentifier(adp, 0, &adapterIdentifier) == S_OK) {
if ((::StringFromGUID2(adapterIdentifier.DeviceIdentifier, strGUID, 50) > 0) && (s.D3D9RenderDevice == strGUID)) {
m_D3D9Device = adapterIdentifier.Description;
return adp;
}
}
}
}
HMONITOR hMonitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
if (hMonitor == NULL) {
return D3DADAPTER_DEFAULT;
}
for (UINT adp = 0, num_adp = pD3D->GetAdapterCount(); adp < num_adp; ++adp) {
HMONITOR hAdpMon = pD3D->GetAdapterMonitor(adp);
if (hAdpMon == hMonitor) {
if (bGetAdapter) {
D3DADAPTER_IDENTIFIER9 adapterIdentifier;
if (pD3D->GetAdapterIdentifier(adp, 0, &adapterIdentifier) == S_OK) {
m_D3D9Device = adapterIdentifier.Description;
}
}
return adp;
}
}
return D3DADAPTER_DEFAULT;
}
DWORD CDX9AllocatorPresenter::GetVertexProcessing()
{
HRESULT hr;
D3DCAPS9 caps;
hr = m_pD3D->GetDeviceCaps(m_CurrentAdapter, D3DDEVTYPE_HAL, &caps);
if (FAILED(hr)) {
return D3DCREATE_SOFTWARE_VERTEXPROCESSING;
}
if ((caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) == 0 ||
caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) {
return D3DCREATE_SOFTWARE_VERTEXPROCESSING;
}
return D3DCREATE_HARDWARE_VERTEXPROCESSING;
}
// ISubPicAllocatorPresenter
STDMETHODIMP CDX9AllocatorPresenter::CreateRenderer(IUnknown** ppRenderer)
{
return E_NOTIMPL;
}
void CDX9AllocatorPresenter::CalculateJitter(LONGLONG PerfCounter)
{
// Calculate the jitter!
LONGLONG llPerf = PerfCounter;
if ((m_rtTimePerFrame != 0) && (labs ((long)(llPerf - m_llLastPerf)) < m_rtTimePerFrame*3) ) {
m_nNextJitter = (m_nNextJitter+1) % NB_JITTER;
m_pllJitter[m_nNextJitter] = llPerf - m_llLastPerf;
m_MaxJitter = MINLONG64;
m_MinJitter = MAXLONG64;
// Calculate the real FPS
LONGLONG llJitterSum = 0;
LONGLONG llJitterSumAvg = 0;
for (int i=0; i<NB_JITTER; i++) {
LONGLONG Jitter = m_pllJitter[i];
llJitterSum += Jitter;
llJitterSumAvg += Jitter;
}
double FrameTimeMean = double(llJitterSumAvg)/NB_JITTER;
m_fJitterMean = FrameTimeMean;
double DeviationSum = 0;
for (int i=0; i<NB_JITTER; i++) {
LONGLONG DevInt = m_pllJitter[i] - (LONGLONG)FrameTimeMean;
double Deviation = (double)DevInt;
DeviationSum += Deviation*Deviation;
m_MaxJitter = max(m_MaxJitter, DevInt);
m_MinJitter = min(m_MinJitter, DevInt);
}
double StdDev = sqrt(DeviationSum/NB_JITTER);
m_fJitterStdDev = StdDev;
m_fAvrFps = 10000000.0/(double(llJitterSum)/NB_JITTER);
}
m_llLastPerf = llPerf;
}
bool CDX9AllocatorPresenter::GetVBlank(int &_ScanLine, int &_bInVBlank, bool _bMeasureTime)
{
LONGLONG llPerf = 0;
if (_bMeasureTime) {
llPerf = GetRenderersData()->GetPerfCounter();
}
int ScanLine = 0;
_ScanLine = 0;
_bInVBlank = 0;
if (m_pDirectDraw) {
DWORD ScanLineGet = 0;
m_pDirectDraw->GetScanLine(&ScanLineGet);
BOOL InVBlank;
if (m_pDirectDraw->GetVerticalBlankStatus (&InVBlank) != S_OK) {
return false;
}
ScanLine = ScanLineGet;
_bInVBlank = InVBlank;
if (InVBlank) {
ScanLine = 0;
}
} else {
D3DRASTER_STATUS RasterStatus;
if (m_pD3DDev->GetRasterStatus(0, &RasterStatus) != S_OK) {
return false;
}
ScanLine = RasterStatus.ScanLine;
_bInVBlank = RasterStatus.InVBlank;
}
if (_bMeasureTime) {
m_VBlankMax = max(m_VBlankMax, ScanLine);
if (ScanLine != 0 && !_bInVBlank) {
m_VBlankMinCalc = min(m_VBlankMinCalc, ScanLine);
}
m_VBlankMin = m_VBlankMax - m_ScreenSize.cy;
}
if (_bInVBlank) {
_ScanLine = 0;
} else if (m_VBlankMin != 300000) {
_ScanLine = ScanLine - m_VBlankMin;
} else {
_ScanLine = ScanLine;
}
if (_bMeasureTime) {
LONGLONG Time = GetRenderersData()->GetPerfCounter() - llPerf;
if (Time > 5000000) { // 0.5 sec
TRACE("GetVBlank too long (%f sec)\n", Time / 10000000.0);
}
m_RasterStatusWaitTimeMaxCalc = max(m_RasterStatusWaitTimeMaxCalc, Time);
}
return true;
}
bool CDX9AllocatorPresenter::WaitForVBlankRange(int &_RasterStart, int _RasterSize, bool _bWaitIfInside, bool _bNeedAccurate, bool _bMeasure, bool &_bTakenLock)
{
if (_bMeasure) {
m_RasterStatusWaitTimeMaxCalc = 0;
}
bool bWaited = false;
int ScanLine = 0;
int InVBlank = 0;
LONGLONG llPerf = 0;
if (_bMeasure) {
llPerf = GetRenderersData()->GetPerfCounter();
}
GetVBlank(ScanLine, InVBlank, _bMeasure);
if (_bMeasure) {
m_VBlankStartWait = ScanLine;
}
static bool bOneWait = true;
if (bOneWait && _bMeasure) {
bOneWait = false;
// If we are already in the wanted interval we need to wait until we aren't, this improves sync when for example you are playing 23.976 Hz material on a 24 Hz refresh rate
int nInVBlank = 0;
for (int i = 0; i < 50; i++) { // to prevent infinite loop
if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
if (InVBlank && nInVBlank == 0) {
nInVBlank = 1;
} else if (!InVBlank && nInVBlank == 1) {
nInVBlank = 2;
} else if (InVBlank && nInVBlank == 2) {
nInVBlank = 3;
} else if (!InVBlank && nInVBlank == 3) {
break;
}
}
}
if (_bWaitIfInside) {
int ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
ScanLineDiff += m_ScreenSize.cy;
}
if (ScanLineDiff >= 0 && ScanLineDiff <= _RasterSize) {
bWaited = true;
// If we are already in the wanted interval we need to wait until we aren't, this improves sync when for example you are playing 23.976 Hz material on a 24 Hz refresh rate
int LastLineDiff = ScanLineDiff;
for (int i = 0; i < 50; i++) { // to prevent infinite loop
if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
int ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
ScanLineDiff += m_ScreenSize.cy;
}
if (!(ScanLineDiff >= 0 && ScanLineDiff <= _RasterSize) || (LastLineDiff < 0 && ScanLineDiff > 0)) {
break;
}
LastLineDiff = ScanLineDiff;
Sleep(1); // Just sleep
}
}
}
double RefreshRate = GetRefreshRate();
LONG ScanLines = GetScanLines();
int MinRange = max(min(int(0.0015 * double(ScanLines) * RefreshRate + 0.5), ScanLines/3), 5); // 1.5 ms or max 33 % of Time
int NoSleepStart = _RasterStart - MinRange;
int NoSleepRange = MinRange;
if (NoSleepStart < 0) {
NoSleepStart += m_ScreenSize.cy;
}
int MinRange2 = max(min(int(0.0050 * double(ScanLines) * RefreshRate + 0.5), ScanLines/3), 5); // 5 ms or max 33 % of Time
int D3DDevLockStart = _RasterStart - MinRange2;
int D3DDevLockRange = MinRange2;
if (D3DDevLockStart < 0) {
D3DDevLockStart += m_ScreenSize.cy;
}
int ScanLineDiff = ScanLine - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
ScanLineDiff += m_ScreenSize.cy;
}
int LastLineDiff = ScanLineDiff;
int ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
if (ScanLineDiffSleep > m_ScreenSize.cy / 2) {
ScanLineDiffSleep -= m_ScreenSize.cy;
} else if (ScanLineDiffSleep < -m_ScreenSize.cy / 2) {
ScanLineDiffSleep += m_ScreenSize.cy;
}
int LastLineDiffSleep = ScanLineDiffSleep;
int ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
if (ScanLineDiffLock > m_ScreenSize.cy / 2) {
ScanLineDiffLock -= m_ScreenSize.cy;
} else if (ScanLineDiffLock < -m_ScreenSize.cy / 2) {
ScanLineDiffLock += m_ScreenSize.cy;
}
int LastLineDiffLock = ScanLineDiffLock;
LONGLONG llPerfLock = 0;
for (int i = 0; i < 50; i++) { // to prevent infinite loop
if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
int ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
ScanLineDiff += m_ScreenSize.cy;
}
if ((ScanLineDiff >= 0 && ScanLineDiff <= _RasterSize) || (LastLineDiff < 0 && ScanLineDiff > 0)) {
break;
}
LastLineDiff = ScanLineDiff;
bWaited = true;
int ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
if (ScanLineDiffLock > m_ScreenSize.cy / 2) {
ScanLineDiffLock -= m_ScreenSize.cy;
} else if (ScanLineDiffLock < -m_ScreenSize.cy / 2) {
ScanLineDiffLock += m_ScreenSize.cy;
}
if (((ScanLineDiffLock >= 0 && ScanLineDiffLock <= D3DDevLockRange) || (LastLineDiffLock < 0 && ScanLineDiffLock > 0))) {
if (!_bTakenLock && _bMeasure) {
_bTakenLock = true;
llPerfLock = GetRenderersData()->GetPerfCounter();
LockD3DDevice();
}
}
LastLineDiffLock = ScanLineDiffLock;
int ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
if (ScanLineDiffSleep > m_ScreenSize.cy / 2) {
ScanLineDiffSleep -= m_ScreenSize.cy;
} else if (ScanLineDiffSleep < -m_ScreenSize.cy / 2) {
ScanLineDiffSleep += m_ScreenSize.cy;
}
if (!((ScanLineDiffSleep >= 0 && ScanLineDiffSleep <= NoSleepRange) || (LastLineDiffSleep < 0 && ScanLineDiffSleep > 0)) || !_bNeedAccurate) {
//TRACE("%d\n", RasterStatus.ScanLine);
Sleep(1); // Don't sleep for the last 1.5 ms scan lines, so we get maximum precision
}
LastLineDiffSleep = ScanLineDiffSleep;
}
_RasterStart = ScanLine;
if (_bMeasure) {
m_VBlankEndWait = ScanLine;
m_VBlankWaitTime = GetRenderersData()->GetPerfCounter() - llPerf;
if (_bTakenLock) {
m_VBlankLockTime = GetRenderersData()->GetPerfCounter() - llPerfLock;
} else {
m_VBlankLockTime = 0;
}
m_RasterStatusWaitTime = m_RasterStatusWaitTimeMaxCalc;
m_RasterStatusWaitTimeMin = min(m_RasterStatusWaitTimeMin, m_RasterStatusWaitTime);
m_RasterStatusWaitTimeMax = max(m_RasterStatusWaitTimeMax, m_RasterStatusWaitTime);
}
return bWaited;
}
int CDX9AllocatorPresenter::GetVBlackPos()
{
CRenderersSettings& s = GetRenderersSettings();
BOOL bCompositionEnabled = m_bCompositionEnabled;
int WaitRange = max(m_ScreenSize.cy / 40, 5);
if (!bCompositionEnabled) {
if (m_bAlternativeVSync) {
return s.m_AdvRendSets.iVMR9VSyncOffset;
} else {
int MinRange = max(min(int(0.005 * double(m_ScreenSize.cy) * GetRefreshRate() + 0.5), m_ScreenSize.cy/3), 5); // 5 ms or max 33 % of Time
int WaitFor = m_ScreenSize.cy - (MinRange + WaitRange);
return WaitFor;
}
} else {
int WaitFor = m_ScreenSize.cy / 2;
return WaitFor;
}
}
bool CDX9AllocatorPresenter::WaitForVBlank(bool &_Waited, bool &_bTakenLock)
{
CRenderersSettings& s = GetRenderersSettings();
if (!s.m_AdvRendSets.iVMR9VSync) {
_Waited = true;
m_VBlankWaitTime = 0;
m_VBlankLockTime = 0;
m_VBlankEndWait = 0;
m_VBlankStartWait = 0;
return true;
}
//_Waited = true;
//return false;
BOOL bCompositionEnabled = m_bCompositionEnabled;
int WaitFor = GetVBlackPos();
if (!bCompositionEnabled) {
if (m_bAlternativeVSync) {
_Waited = WaitForVBlankRange(WaitFor, 0, false, true, true, _bTakenLock);
return false;
} else {
_Waited = WaitForVBlankRange(WaitFor, 0, false, s.m_AdvRendSets.iVMR9VSyncAccurate, true, _bTakenLock);
return true;
}
} else {
// Instead we wait for VBlack after the present, this seems to fix the stuttering problem. It's also possible to fix by removing the Sleep above, but that isn't an option.
WaitForVBlankRange(WaitFor, 0, false, s.m_AdvRendSets.iVMR9VSyncAccurate, true, _bTakenLock);
return false;
}
}
void CDX9AllocatorPresenter::UpdateAlphaBitmap()
{
m_VMR9AlphaBitmapData.Free();
if ((m_VMR9AlphaBitmap.dwFlags & VMRBITMAP_DISABLE) == 0) {
HBITMAP hBitmap = (HBITMAP)GetCurrentObject (m_VMR9AlphaBitmap.hdc, OBJ_BITMAP);
if (!hBitmap) {
return;
}
DIBSECTION info = {0};
if (!::GetObject(hBitmap, sizeof( DIBSECTION ), &info )) {
return;
}
m_VMR9AlphaBitmapRect = CRect(0, 0, info.dsBm.bmWidth, info.dsBm.bmHeight);
m_VMR9AlphaBitmapWidthBytes = info.dsBm.bmWidthBytes;
if (m_VMR9AlphaBitmapData.Allocate(info.dsBm.bmWidthBytes * info.dsBm.bmHeight)) {
memcpy((BYTE *)m_VMR9AlphaBitmapData, info.dsBm.bmBits, info.dsBm.bmWidthBytes * info.dsBm.bmHeight);
}
}
}
STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
{
if (m_bPendingResetDevice) {
SendResetRequest();
return false;
}
CRenderersSettings& s = GetRenderersSettings();
//TRACE("Thread: %d\n", (LONG)((CRITICAL_SECTION &)m_RenderLock).OwningThread);
#if 0
if (TryEnterCriticalSection (&(CRITICAL_SECTION &)(*((CCritSec *)this)))) {
LeaveCriticalSection((&(CRITICAL_SECTION &)(*((CCritSec *)this))));
} else {
__debugbreak();
}
#endif
CRenderersData * pApp = GetRenderersData();
LONGLONG StartPaint = pApp->GetPerfCounter();
CAutoLock cRenderLock(&m_RenderLock);
if (m_WindowRect.right <= m_WindowRect.left || m_WindowRect.bottom <= m_WindowRect.top
|| m_NativeVideoSize.cx <= 0 || m_NativeVideoSize.cy <= 0
|| !m_pVideoSurface) {
if (m_OrderedPaint) {
--m_OrderedPaint;
} else {
//TRACE("UNORDERED PAINT!!!!!!\n");
}
return false;
}
HRESULT hr;
m_pD3DDev->BeginScene();
CComPtr<IDirect3DSurface9> pBackBuffer;
m_pD3DDev->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
// Clear the backbuffer
m_pD3DDev->SetRenderTarget(0, pBackBuffer);
hr = m_pD3DDev->Clear(0, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0);
CRect rSrcVid(CPoint(0, 0), GetVisibleVideoSize());
CRect rDstVid(m_VideoRect);
CRect rSrcPri(CPoint(0, 0), m_WindowRect.Size());
CRect rDstPri(m_WindowRect);
// Render the current video frame
hr = RenderVideo(pBackBuffer, rSrcVid, rDstVid);
if (FAILED(hr)) {
if (m_RenderingPath == RENDERING_PATH_STRETCHRECT) {
// Support ffdshow queueing
// m_pD3DDev->StretchRect may fail if ffdshow is using queue output samples.
// Here we don't want to show the black buffer.
if (m_OrderedPaint) {
--m_OrderedPaint;
} else {
//TRACE("UNORDERED PAINT!!!!!!\n");
}
return false;
}
}
// paint the text on the backbuffer
AlphaBltSubPic(rSrcPri.Size());
// Casimir666 : show OSD
if (m_VMR9AlphaBitmap.dwFlags & VMRBITMAP_UPDATE) {
CAutoLock BitMapLock(&m_VMR9AlphaBitmapLock);
CRect rcSrc (m_VMR9AlphaBitmap.rSrc);
m_pOSDTexture = NULL;
m_pOSDSurface = NULL;
if ((m_VMR9AlphaBitmap.dwFlags & VMRBITMAP_DISABLE) == 0 && (BYTE *)m_VMR9AlphaBitmapData) {
if ( (m_pD3DXLoadSurfaceFromMemory != NULL) &&
SUCCEEDED(hr = m_pD3DDev->CreateTexture(rcSrc.Width(), rcSrc.Height(), 1,
D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, &m_pOSDTexture, NULL)) ) {
if (SUCCEEDED (hr = m_pOSDTexture->GetSurfaceLevel(0, &m_pOSDSurface))) {
hr = m_pD3DXLoadSurfaceFromMemory (m_pOSDSurface,
NULL,
NULL,
(BYTE *)m_VMR9AlphaBitmapData,
D3DFMT_A8R8G8B8,
m_VMR9AlphaBitmapWidthBytes,
NULL,
&m_VMR9AlphaBitmapRect,
D3DX_FILTER_NONE,
m_VMR9AlphaBitmap.clrSrcKey);
}
if (FAILED (hr)) {
m_pOSDTexture = NULL;
m_pOSDSurface = NULL;
}
}
}
m_VMR9AlphaBitmap.dwFlags ^= VMRBITMAP_UPDATE;
}
if (pApp->m_bResetStats) {
ResetStats();
pApp->m_bResetStats = false;
}
if (pApp->m_fDisplayStats) {
g_bGetFrameType = TRUE;
DrawStats();
} else {
g_bGetFrameType = FALSE;
}
if (m_pOSDTexture) {
AlphaBlt(rSrcPri, rDstPri, m_pOSDTexture);
}
m_pD3DDev->EndScene();
BOOL bCompositionEnabled = m_bCompositionEnabled;
bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !s.m_AdvRendSets.iVMR9VSync;
LONGLONG PresentWaitTime = 0;
CComPtr<IDirect3DQuery9> pEventQuery;
m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
if (pEventQuery) {
pEventQuery->Issue(D3DISSUE_END);
}
if (s.m_AdvRendSets.iVMRFlushGPUBeforeVSync && pEventQuery) {
LONGLONG llPerf = pApp->GetPerfCounter();
BOOL Data;
//Sleep(5);
LONGLONG FlushStartTime = pApp->GetPerfCounter();
while (S_FALSE == pEventQuery->GetData( &Data, sizeof(Data), D3DGETDATA_FLUSH )) {
if (!s.m_AdvRendSets.iVMRFlushGPUWait) {
break;
}
Sleep(1);
if (pApp->GetPerfCounter() - FlushStartTime > 500000) {
break; // timeout after 50 ms
}
}
if (s.m_AdvRendSets.iVMRFlushGPUWait) {
m_WaitForGPUTime = pApp->GetPerfCounter() - llPerf;
} else {
m_WaitForGPUTime = 0;
}
} else {
m_WaitForGPUTime = 0;
}
if (fAll) {
m_PaintTime = (GetRenderersData()->GetPerfCounter() - StartPaint);
m_PaintTimeMin = min(m_PaintTimeMin, m_PaintTime);
m_PaintTimeMax = max(m_PaintTimeMax, m_PaintTime);
}
bool bWaited = false;
bool bTakenLock = false;
if (fAll) {
// Only sync to refresh when redrawing all
bool bTest = WaitForVBlank(bWaited, bTakenLock);
ASSERT(bTest == bDoVSyncInPresent);
if (!bDoVSyncInPresent) {
LONGLONG Time = pApp->GetPerfCounter();
OnVBlankFinished(fAll, Time);
if (!m_bIsEVR || m_OrderedPaint) {
CalculateJitter(Time);
}
}
}
// Create a device pointer m_pd3dDevice
// Create a query object
{
CComPtr<IDirect3DQuery9> pEventQuery;
m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
LONGLONG llPerf = pApp->GetPerfCounter();
if (m_pD3DDevEx) {
if (m_bIsFullscreen) {
hr = m_pD3DDevEx->PresentEx(NULL, NULL, NULL, NULL, NULL);
} else {
hr = m_pD3DDevEx->PresentEx(rSrcPri, rDstPri, NULL, NULL, NULL);
}
} else {
if (m_bIsFullscreen) {
hr = m_pD3DDev->Present(NULL, NULL, NULL, NULL);
} else {
hr = m_pD3DDev->Present(rSrcPri, rDstPri, NULL, NULL);
}
}
// Issue an End event
if (pEventQuery) {
pEventQuery->Issue(D3DISSUE_END);
}
BOOL Data;
if (s.m_AdvRendSets.iVMRFlushGPUAfterPresent && pEventQuery) {
LONGLONG FlushStartTime = pApp->GetPerfCounter();
while (S_FALSE == pEventQuery->GetData( &Data, sizeof(Data), D3DGETDATA_FLUSH )) {
if (!s.m_AdvRendSets.iVMRFlushGPUWait) {
break;
}
if (pApp->GetPerfCounter() - FlushStartTime > 500000) {
break; // timeout after 50 ms
}
}
}
int ScanLine;
int bInVBlank;
GetVBlank(ScanLine, bInVBlank, false);
if (fAll && (!m_bIsEVR || m_OrderedPaint)) {
m_VBlankEndPresent = ScanLine;
}
for (int i = 0; i < 50 && (ScanLine == 0 || bInVBlank); i++) { // to prevent infinite loop
if (!GetVBlank(ScanLine, bInVBlank, false)) {
break;
}
}
m_VBlankStartMeasureTime = pApp->GetPerfCounter();
m_VBlankStartMeasure = ScanLine;
if (fAll && bDoVSyncInPresent) {
m_PresentWaitTime = (pApp->GetPerfCounter() - llPerf) + PresentWaitTime;
m_PresentWaitTimeMin = min(m_PresentWaitTimeMin, m_PresentWaitTime);
m_PresentWaitTimeMax = max(m_PresentWaitTimeMax, m_PresentWaitTime);
} else {
m_PresentWaitTime = 0;
m_PresentWaitTimeMin = min(m_PresentWaitTimeMin, m_PresentWaitTime);
m_PresentWaitTimeMax = max(m_PresentWaitTimeMax, m_PresentWaitTime);
}
}
if (bDoVSyncInPresent) {
LONGLONG Time = pApp->GetPerfCounter();
if (!m_bIsEVR || m_OrderedPaint) {
CalculateJitter(Time);
}
OnVBlankFinished(fAll, Time);
}
if (bTakenLock) {
UnlockD3DDevice();
}
/*if (!bWaited)
{
bWaited = true;
WaitForVBlank(bWaited);
TRACE("Double VBlank\n");
ASSERT(bWaited);
if (!bDoVSyncInPresent)
{
CalculateJitter();
OnVBlankFinished(fAll);
}
}*/
if (!m_bPendingResetDevice) {
bool fResetDevice = false;
if (hr == D3DERR_DEVICELOST && m_pD3DDev->TestCooperativeLevel() == D3DERR_DEVICENOTRESET) {
TRACE("Reset Device: D3D Device Lost\n");
fResetDevice = true;
}
//if (hr == S_PRESENT_MODE_CHANGED)
//{
// TRACE("Reset Device: D3D Device mode changed\n");
// fResetDevice = true;
//}
if (SettingsNeedResetDevice()) {
TRACE("Reset Device: settings changed\n");
fResetDevice = true;
}
bCompositionEnabled = false;
if (m_pDwmIsCompositionEnabled) {
m_pDwmIsCompositionEnabled(&bCompositionEnabled);
}
if ((bCompositionEnabled != 0) != m_bCompositionEnabled) {
if (m_bIsFullscreen) {
m_bCompositionEnabled = (bCompositionEnabled != 0);
} else {
TRACE("Reset Device: DWM composition changed\n");
fResetDevice = true;
}
}
if (s.fResetDevice) {
LONGLONG time = GetRenderersData()->GetPerfCounter();
if (time > m_LastAdapterCheck + 20000000) { // check every 2 sec.
m_LastAdapterCheck = time;
#ifdef _DEBUG
D3DDEVICE_CREATION_PARAMETERS Parameters;
if (SUCCEEDED(m_pD3DDev->GetCreationParameters(&Parameters))) {
ASSERT(Parameters.AdapterOrdinal == m_CurrentAdapter);
}
#endif
if (m_CurrentAdapter != GetAdapter(m_pD3D)) {
TRACE("Reset Device: D3D adapter changed\n");
fResetDevice = true;
}
#ifdef _DEBUG
else {
ASSERT(m_pD3D->GetAdapterMonitor(m_CurrentAdapter) == m_pD3D->GetAdapterMonitor(GetAdapter(m_pD3D)));
}
#endif
}
}
if (fResetDevice) {
m_bPendingResetDevice = true;
SendResetRequest();
}
}
if (m_OrderedPaint) {
--m_OrderedPaint;
} else {
//if (m_bIsEVR)
// TRACE("UNORDERED PAINT!!!!!!\n");
}
return true;
}
double CDX9AllocatorPresenter::GetFrameTime()
{
if (m_DetectedLock) {
return m_DetectedFrameTime;
}
return m_rtTimePerFrame / 10000000.0;
}
double CDX9AllocatorPresenter::GetFrameRate()
{
if (m_DetectedLock) {
return m_DetectedFrameRate;
}
return m_rtTimePerFrame ? (10000000.0 / m_rtTimePerFrame) : 0;
}
void CDX9AllocatorPresenter::SendResetRequest()
{
if (!m_bDeviceResetRequested) {
m_bDeviceResetRequested = true;
AfxGetApp()->m_pMainWnd->PostMessage(WM_RESET_DEVICE);
}
}
STDMETHODIMP_(bool) CDX9AllocatorPresenter::ResetDevice()
{
TRACE(_T("CDX9AllocatorPresenter::ResetDevice()\n"));
_ASSERT(m_MainThreadId == GetCurrentThreadId());
StopWorkerThreads();
// In VMR-9 deleting the surfaces before we are told to is bad !
// Can't comment out this because CDX9AllocatorPresenter is used by EVR Custom
// Why is EVR using a presenter for DX9 anyway ?!
DeleteSurfaces();
HRESULT hr;
CString Error;
// TODO: Report error messages here
// In VMR-9 'AllocSurfaces' call is redundant afaik because
// 'CreateDevice' calls 'm_pIVMRSurfAllocNotify->ChangeD3DDevice' which in turn calls
// 'CVMR9AllocatorPresenter::InitializeDevice' which calls 'AllocSurfaces'
if (FAILED(hr = CreateDevice(Error)) || FAILED(hr = AllocSurfaces())) {
// TODO: We should probably pause player
#ifdef _DEBUG
Error += GetWindowsErrorMessage(hr, NULL);
TRACE("D3D Reset Error\n%ws\n\n", Error.GetBuffer());
#endif
m_bDeviceResetRequested = false;
return false;
}
OnResetDevice();
m_bDeviceResetRequested = false;
m_bPendingResetDevice = false;
return true;
}
STDMETHODIMP_(bool) CDX9AllocatorPresenter::DisplayChange()
{
TRACE(_T("CDX9AllocatorPresenter::DisplayChange()\n"));
CAutoLock cRenderLock(&m_CreateLock);
if (m_CurrentAdapter != GetAdapter(m_pD3D)) {
return false;
}
D3DDISPLAYMODEEX DisplayMode;
ZeroMemory(&DisplayMode, sizeof(DisplayMode));
DisplayMode.Size = sizeof(DisplayMode);
D3DDISPLAYMODE d3ddm;
ZeroMemory(&d3ddm, sizeof(d3ddm));
HRESULT hr = E_FAIL;
if (m_bIsFullscreen) {
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
DisplayMode.Format = m_pp.BackBufferFormat;
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
m_pp.FullScreen_RefreshRateInHz = m_RefreshRate = DisplayMode.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3DDevEx->ResetEx(&m_pp, &DisplayMode);
} else {
m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
d3ddm.Format = m_pp.BackBufferFormat;
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
m_pp.FullScreen_RefreshRateInHz = m_RefreshRate = d3ddm.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3DDev->Reset(&m_pp);
}
} else {
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
m_RefreshRate = DisplayMode.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3DDevEx->Reset(&m_pp);
} else {
m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
m_RefreshRate = d3ddm.RefreshRate;
m_pp.BackBufferWidth = m_ScreenSize.cx;
m_pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3DDev->Reset(&m_pp);
}
}
return SUCCEEDED(hr);
}
void CDX9AllocatorPresenter::DrawText(const RECT &rc, const CString &strText, int _Priority)
{
if (_Priority < 1) {
return;
}
int Quality = 1;
//D3DXCOLOR Color1( 1.0f, 0.2f, 0.2f, 1.0f ); // red
//D3DXCOLOR Color1( 1.0f, 1.0f, 1.0f, 1.0f ); // white
D3DXCOLOR Color1( 1.0f, 0.8f, 0.0f, 1.0f ); // yellow
D3DXCOLOR Color0( 0.0f, 0.0f, 0.0f, 1.0f ); // black
RECT Rect1 = rc;
RECT Rect2 = rc;
if (Quality == 1) {
OffsetRect (&Rect2 , 2, 2);
} else {
OffsetRect (&Rect2 , -1, -1);
}
if (Quality > 0) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , 1, 0);
if (Quality > 3) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , 1, 0);
if (Quality > 2) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , 0, 1);
if (Quality > 3) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , 0, 1);
if (Quality > 1) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , -1, 0);
if (Quality > 3) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , -1, 0);
if (Quality > 2) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
OffsetRect (&Rect2 , 0, -1);
if (Quality > 3) {
m_pFont->DrawText( m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
}
m_pFont->DrawText( m_pSprite, strText, -1, &Rect1, DT_NOCLIP, Color1);
}
void CDX9AllocatorPresenter::ResetStats()
{
CRenderersData *pApp = GetRenderersData();
LONGLONG Time = pApp->GetPerfCounter();
m_PaintTime = 0;
m_PaintTimeMin = 0;
m_PaintTimeMax = 0;
m_RasterStatusWaitTime = 0;
m_RasterStatusWaitTimeMin = 0;
m_RasterStatusWaitTimeMax = 0;
m_MinSyncOffset = 0;
m_MaxSyncOffset = 0;
m_fSyncOffsetAvr = 0;
m_fSyncOffsetStdDev = 0;
CalculateJitter(Time);
}
void CDX9AllocatorPresenter::DrawStats()
{
CRenderersSettings& s = GetRenderersSettings();
CRenderersData *pApp = GetRenderersData();
int bDetailedStats = 2;
switch (pApp->m_fDisplayStats) {
case 1:
bDetailedStats = 2;
break;
case 2:
bDetailedStats = 1;
break;
case 3:
bDetailedStats = 0;
break;
}
LONGLONG llMaxJitter = m_MaxJitter;
LONGLONG llMinJitter = m_MinJitter;
LONGLONG llMaxSyncOffset = m_MaxSyncOffset;
LONGLONG llMinSyncOffset = m_MinSyncOffset;
RECT rc = {40, 40, 0, 0 };
static UINT TextHeight = 0;
static CRect WindowRect(0, 0, 0, 0);
if (WindowRect != m_WindowRect) {
m_pFont = NULL;
}
WindowRect = m_WindowRect;
if (!m_pFont && m_pD3DXCreateFont) {
UINT FontWidth = m_WindowRect.Width()/130;
UINT FontHeight = m_WindowRect.Height()/35;
UINT FontWeight = FW_BOLD;
if ((m_rcMonitor.Width() - m_WindowRect.Width()) > 100) {
FontWeight = FW_NORMAL;
}
TextHeight = FontHeight;
m_pD3DXCreateFont( m_pD3DDev, // D3D device
FontHeight, // Height
FontWidth, // Width
FontWeight, // Weight
0, // MipLevels, 0 = autogen mipmaps
FALSE, // Italic
DEFAULT_CHARSET, // CharSet
OUT_DEFAULT_PRECIS, // OutputPrecision
ANTIALIASED_QUALITY, // Quality
FIXED_PITCH | FF_DONTCARE, // PitchAndFamily
L"Lucida Console", // pFaceName
&m_pFont); // ppFont
}
if (!m_pSprite && m_pD3DXCreateSprite) {
m_pD3DXCreateSprite( m_pD3DDev, &m_pSprite);
}
if (!m_pLine && m_pD3DXCreateLine) {
m_pD3DXCreateLine (m_pD3DDev, &m_pLine);
}
if (m_pFont && m_pSprite) {
m_pSprite->Begin(D3DXSPRITE_ALPHABLEND);
CString strText;
if (bDetailedStats > 1) {
double rtMS, rtFPS;
rtMS = rtFPS = 0.0;
if (m_rtTimePerFrame) {
rtMS = double(m_rtTimePerFrame) / 10000.0;
rtFPS = 10000000.0 / (double)(m_rtTimePerFrame);
}
if (m_bIsEVR) {
if (g_nFrameType != PICT_NONE) {
strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%", m_fAvrFps, rtMS, rtFPS, g_nFrameType == PICT_FRAME ? L"P" : L"I", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0, m_ModeratedTimeSpeed*100.0);
} else {
strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%", m_fAvrFps, rtMS, rtFPS, m_bInterlaced ? L"I" : L"P", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0, m_ModeratedTimeSpeed*100.0);
}
} else {
if (g_nFrameType != PICT_NONE) {
strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s)", m_fAvrFps, rtMS, rtFPS, g_nFrameType == PICT_FRAME ? L"P" : L"I");
} else {
strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s)", m_fAvrFps, rtMS, rtFPS, m_bInterlaced ? L"I" : L"P");
}
}
} else {
strText.Format(L"Frame rate : %7.03f (%.03f%s)", m_fAvrFps, GetFrameRate(), m_DetectedLock ? L" L" : L"");
}
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
if (g_nFrameType != PICT_NONE) {
strText.Format(L"Frame type : %s",
g_nFrameType == PICT_FRAME ? L"Progressive" :
g_nFrameType == PICT_BOTTOM_FIELD ? L"Interlaced : Bottom field first" :
L"Interlaced : Top field first");
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
strText = L"Settings : ";
if (m_bIsEVR) {
strText += "EVR ";
} else {
strText += "VMR9 ";
}
if (m_bIsFullscreen) {
strText += "FS ";
}
if (s.m_AdvRendSets.iVMR9FullscreenGUISupport) {
strText += "FSGui ";
}
if (s.m_AdvRendSets.iVMRDisableDesktopComposition) {
strText += "DisDC ";
}
if (m_bColorManagement) {
strText += "ColorMan ";
}
if (s.m_AdvRendSets.iVMRFlushGPUBeforeVSync) {
strText += "GPUFlushBV ";
}
if (s.m_AdvRendSets.iVMRFlushGPUAfterPresent) {
strText += "GPUFlushAP ";
}
if (s.m_AdvRendSets.iVMRFlushGPUWait) {
strText += "GPUFlushWt ";
}
if (s.m_AdvRendSets.iVMR9VSync) {
strText += "VS ";
}
if (s.m_AdvRendSets.fVMR9AlterativeVSync) {
strText += "AltVS ";
}
if (s.m_AdvRendSets.iVMR9VSyncAccurate) {
strText += "AccVS ";
}
if (s.m_AdvRendSets.iVMR9VSyncOffset) {
strText.AppendFormat(L"VSOfst(%d)", s.m_AdvRendSets.iVMR9VSyncOffset);
}
if (m_bFullFloatingPointProcessing) {
strText += "FullFP ";
}
if (m_bHalfFloatingPointProcessing) {
strText += "HalfFP ";
}
if (m_bIsEVR) {
if (m_bHighColorResolution) {
strText += "10bitOut ";
}
if (m_bForceInputHighColorResolution) {
strText += "For10bitIn ";
}
if (s.m_AdvRendSets.iEVREnableFrameTimeCorrection) {
strText += "FTC ";
}
if (s.m_AdvRendSets.iEVROutputRange == 0) {
strText += "0-255 ";
} else if (s.m_AdvRendSets.iEVROutputRange == 1) {
strText += "16-235 ";
}
}
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
strText.Format(L"Formats : Surface %s Backbuffer %s Display %s Device %s D3DExError: %s", GetD3DFormatStr(m_SurfaceType), GetD3DFormatStr(m_BackbufferType), GetD3DFormatStr(m_DisplayType), m_pD3DDevEx ? L"D3DDevEx" : L"D3DDev", m_D3DDevExError.GetString());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
if (m_bIsEVR) {
strText.Format(L"Refresh rate : %.05f Hz SL: %4d (%3d Hz) Last Duration: %10.6f Corrected Frame Time: %s", m_DetectedRefreshRate, int(m_DetectedScanlinesPerFrame + 0.5), m_RefreshRate, double(m_LastFrameDuration)/10000.0, m_bCorrectedFrameTime?L"Yes":L"No");
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
}
if (m_bSyncStatsAvailable) {
if (bDetailedStats > 1) {
strText.Format(L"Sync offset : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms, Avr = %7.3f ms, Mode = %d", (double(llMinSyncOffset)/10000.0), (double(llMaxSyncOffset)/10000.0), m_fSyncOffsetStdDev/10000.0, m_fSyncOffsetAvr/10000.0, m_VSyncMode);
} else {
strText.Format(L"Sync offset : Mode = %d", m_VSyncMode);
}
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
strText.Format(L"Jitter : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms", (double(llMinJitter)/10000.0), (double(llMaxJitter)/10000.0), m_fJitterStdDev/10000.0);
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (m_pAllocator && bDetailedStats > 1) {
CDX9SubPicAllocator *pAlloc = (CDX9SubPicAllocator *)m_pAllocator.p;
int nFree = 0;
int nAlloc = 0;
int nSubPic = 0;
REFERENCE_TIME QueueStart = 0;
REFERENCE_TIME QueueEnd = 0;
if (m_pSubPicQueue) {
REFERENCE_TIME QueueNow = 0;
m_pSubPicQueue->GetStats(nSubPic, QueueNow, QueueStart, QueueEnd);
if (QueueStart) {
QueueStart -= QueueNow;
}
if (QueueEnd) {
QueueEnd -= QueueNow;
}
}
pAlloc->GetStats(nFree, nAlloc);
strText.Format(L"Subtitles : Free %d Allocated %d Buffered %d QueueStart %7.3f QueueEnd %7.3f", nFree, nAlloc, nSubPic, (double(QueueStart)/10000000.0), (double(QueueEnd)/10000000.0));
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
if (m_VBlankEndPresent == -100000) {
strText.Format(L"VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d", m_VBlankStartWait, m_VBlankEndWait, (double(m_VBlankWaitTime)/10000.0), (double(m_VBlankLockTime)/10000.0), m_VBlankMin, m_VBlankMax - m_VBlankMin);
} else {
strText.Format(L"VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d EndPresent %4d", m_VBlankStartWait, m_VBlankEndWait, (double(m_VBlankWaitTime)/10000.0), (double(m_VBlankLockTime)/10000.0), m_VBlankMin, m_VBlankMax - m_VBlankMin, m_VBlankEndPresent);
}
} else {
if (m_VBlankEndPresent == -100000) {
strText.Format(L"VBlank Wait : Start %4d End %4d", m_VBlankStartWait, m_VBlankEndWait);
} else {
strText.Format(L"VBlank Wait : Start %4d End %4d EP %4d", m_VBlankStartWait, m_VBlankEndWait, m_VBlankEndPresent);
}
}
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
BOOL bCompositionEnabled = m_bCompositionEnabled;
bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !s.m_AdvRendSets.iVMR9VSync;
if (bDetailedStats > 1 && bDoVSyncInPresent) {
strText.Format(L"Present Wait : Wait %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_PresentWaitTime)/10000.0), (double(m_PresentWaitTimeMin)/10000.0), (double(m_PresentWaitTimeMax)/10000.0));
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
if (m_WaitForGPUTime) {
strText.Format(L"Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms GPU %7.3f ms", (double(m_PaintTime-m_WaitForGPUTime)/10000.0), (double(m_PaintTimeMin)/10000.0), (double(m_PaintTimeMax)/10000.0), (double(m_WaitForGPUTime)/10000.0));
} else {
strText.Format(L"Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_PaintTime-m_WaitForGPUTime)/10000.0), (double(m_PaintTimeMin)/10000.0), (double(m_PaintTimeMax)/10000.0));
}
} else {
if (m_WaitForGPUTime) {
strText.Format(L"Paint Time : Draw %7.3f ms GPU %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime)/10000.0), (double(m_WaitForGPUTime)/10000.0));
} else {
strText.Format(L"Paint Time : Draw %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime)/10000.0));
}
}
DrawText(rc, strText, 2);
OffsetRect (&rc, 0, TextHeight);
if (bDetailedStats > 1) {
strText.Format(L"Raster Status: Wait %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_RasterStatusWaitTime)/10000.0), (double(m_RasterStatusWaitTimeMin)/10000.0), (double(m_RasterStatusWaitTimeMax)/10000.0));
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (bDetailedStats > 1) {
if (m_bIsEVR) {
strText.Format(L"Buffering : Buffered %3d Free %3d Current Surface %3d", m_nUsedBuffer, m_nNbDXSurface - m_nUsedBuffer, m_nCurSurface);
} else {
strText.Format(L"Buffering : VMR9Surfaces %3d VMR9Surface %3d", m_nVMR9Surfaces, m_iVMR9Surface);
}
} else {
strText.Format(L"Buffered : %3d", m_nUsedBuffer);
}
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
if (bDetailedStats > 1) {
strText.Format(L"Video size : %d x %d (AR = %d : %d)", m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_AspectRatio.cx, m_AspectRatio.cy);
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
if (m_pVideoTexture[0] || m_pVideoSurface[0]) {
D3DSURFACE_DESC desc;
if (m_pVideoTexture[0]) {
m_pVideoTexture[0]->GetLevelDesc(0, &desc);
} else if (m_pVideoSurface[0]) {
m_pVideoSurface[0]->GetDesc(&desc);
}
if (desc.Width != (UINT)m_NativeVideoSize.cx || desc.Height != (UINT)m_NativeVideoSize.cy) {
strText.Format(L"Texture size : %d x %d", desc.Width, desc.Height);
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
}
strText.Format(L"%-13s: %s", GetDXVAVersion(), GetDXVADecoderDescription());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
strText.Format(L"DirectX SDK : %u", GetRenderersData()->GetDXSdkRelease());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
if (!m_D3D9Device.IsEmpty()) {
strText = "Render device: " + m_D3D9Device;
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (!m_MonitorName.IsEmpty()) {
strText.Format(L"Monitor : %s, Native resolution %ux%u", m_MonitorName, m_nMonitorHorRes, m_nMonitorVerRes);
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (!m_Decoder.IsEmpty()) {
strText = "Decoder : " + m_Decoder;
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
if (!m_InputVCodec.IsEmpty()) {
strText = "Input Type : " + m_InputVCodec;
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
}
for (int i=0; i<6; i++) {
if (m_strStatsMsg[i][0]) {
DrawText(rc, m_strStatsMsg[i], 1);
OffsetRect (&rc, 0, TextHeight);
}
}
}
m_pSprite->End();
OffsetRect(&rc, 0, TextHeight); // Extra "line feed"
}
if (m_pLine && bDetailedStats) {
D3DXVECTOR2 Points[NB_JITTER];
int nIndex;
int StartX = 0;
int StartY = 0;
float ScaleX = min(1.0f, max(0.4f, 1.4f*m_WindowRect.Width()/m_rcMonitor.Width()));
float ScaleY = min(1.0f, max(0.4f, 1.4f*m_WindowRect.Height()/m_rcMonitor.Height()));
int DrawWidth = 625 * ScaleX + 50 * ScaleX;
int DrawHeight = 250 * ScaleY;
int Alpha = 80;
StartX = m_WindowRect.Width() - (DrawWidth + 20);
StartY = m_WindowRect.Height() - (DrawHeight + 20);
DrawRect(RGB(0,0,0), Alpha, CRect(StartX, StartY, StartX + DrawWidth, StartY + DrawHeight));
// === Jitter Graduation
m_pLine->SetWidth(2.5 * ScaleX); // Width
m_pLine->SetAntialias(1);
//m_pLine->SetGLLines(1);
m_pLine->Begin();
for (int i=10; i < 250 * ScaleY; i += 10 * ScaleY) {
Points[0].x = (FLOAT)(StartX);
Points[0].y = (FLOAT)(StartY + i);
Points[1].x = (FLOAT)(StartX + ((i-10)%40 ? 50 *ScaleX : 625 * ScaleX));
Points[1].y = (FLOAT)(StartY + i);
if (i == 130) {
Points[1].x += 50 * ScaleX;
}
m_pLine->Draw (Points, 2, D3DCOLOR_XRGB(100,100,255));
}
// === Jitter curve
if (m_rtTimePerFrame) {
for (int i=0; i < NB_JITTER; i++) {
nIndex = (m_nNextJitter + 1 + i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
}
double Jitter = m_pllJitter[nIndex] - m_fJitterMean;
Points[i].x = (FLOAT)(StartX + (i * 5 * ScaleX + 5));
Points[i].y = (FLOAT)(StartY + ((Jitter * ScaleY)/5000.0 + 125.0 * ScaleY));
}
m_pLine->Draw (Points, NB_JITTER, D3DCOLOR_XRGB(255,100,100));
if (m_bSyncStatsAvailable) {
for (int i=0; i<NB_JITTER; i++) {
nIndex = (m_nNextSyncOffset+1+i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
}
Points[i].x = (FLOAT)(StartX + (i * 5 * ScaleX + 5));
Points[i].y = (FLOAT)(StartY + ((m_pllSyncOffset[nIndex] * ScaleY)/5000 + 125 * ScaleY));
}
m_pLine->Draw (Points, NB_JITTER, D3DCOLOR_XRGB(100,200,100));
}
}
m_pLine->End();
}
// === Text
}
STDMETHODIMP CDX9AllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
{
CheckPointer(size, E_POINTER);
HRESULT hr;
D3DSURFACE_DESC desc;
memset(&desc, 0, sizeof(desc));
m_pVideoSurface[m_nCurSurface]->GetDesc(&desc);
DWORD required = sizeof(BITMAPINFOHEADER) + (desc.Width * desc.Height * 32 >> 3);
if (!lpDib) {
*size = required;
return S_OK;
}
if (*size < required) {
return E_OUTOFMEMORY;
}
*size = required;
D3DLOCKED_RECT r;
CComPtr<IDirect3DSurface9> pSurface;
if (m_bFullFloatingPointProcessing || m_bHalfFloatingPointProcessing || m_bHighColorResolution) {
CComPtr<IDirect3DSurface9> fSurface = m_pVideoSurface[m_nCurSurface];
if (FAILED(hr = m_pD3DDev->CreateOffscreenPlainSurface(desc.Width, desc.Height, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &fSurface, NULL))
|| FAILED(hr = m_pD3DXLoadSurfaceFromSurface(fSurface, NULL, NULL, m_pVideoSurface[m_nCurSurface], NULL, NULL, D3DX_DEFAULT, 0))) return hr;
pSurface = fSurface;
if (FAILED(hr = pSurface->LockRect(&r, NULL, D3DLOCK_READONLY))) {
pSurface = NULL;
if (FAILED(hr = m_pD3DDev->CreateOffscreenPlainSurface(desc.Width, desc.Height, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &pSurface, NULL))
|| FAILED(hr = m_pD3DDev->GetRenderTargetData(fSurface, pSurface))
|| FAILED(hr = pSurface->LockRect(&r, NULL, D3DLOCK_READONLY))) return hr;
}
}
else {
pSurface = m_pVideoSurface[m_nCurSurface];
if (FAILED(hr = pSurface->LockRect(&r, NULL, D3DLOCK_READONLY))) {
pSurface = NULL;
if (FAILED(hr = m_pD3DDev->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &pSurface, NULL))
|| FAILED(hr = m_pD3DDev->GetRenderTargetData(m_pVideoSurface[m_nCurSurface], pSurface))
|| FAILED(hr = pSurface->LockRect(&r, NULL, D3DLOCK_READONLY))) return hr;
}
}
BITMAPINFOHEADER* bih = (BITMAPINFOHEADER*)lpDib;
memset(bih, 0, sizeof(BITMAPINFOHEADER));
bih->biSize = sizeof(BITMAPINFOHEADER);
bih->biWidth = desc.Width;
bih->biHeight = desc.Height;
bih->biBitCount = 32;
bih->biPlanes = 1;
bih->biSizeImage = bih->biWidth * bih->biHeight * bih->biBitCount >> 3;
BitBltFromRGBToRGB(
bih->biWidth, bih->biHeight,
(BYTE*)(bih + 1), bih->biWidth*bih->biBitCount>>3, bih->biBitCount,
(BYTE*)r.pBits + r.Pitch*(desc.Height-1), -(int)r.Pitch, 32);
pSurface->UnlockRect();
return S_OK;
}
STDMETHODIMP CDX9AllocatorPresenter::SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget)
{
return SetPixelShader2(pSrcData, pTarget, false);
}
STDMETHODIMP CDX9AllocatorPresenter::SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace)
{
CAutoLock cRenderLock(&m_RenderLock);
return SetCustomPixelShader(pSrcData, pTarget, bScreenSpace);
}
| 29.606121 | 328 | 0.693592 | chinajeffery |
ee7c8f75e654c1e71fc25e7215f53e3ad4ccd233 | 1,157 | cpp | C++ | src/sleek/driver/context.cpp | Phirxian/sleek-engine | 741d55c8daad67ddf631e8b8fbdced59402d7bda | [
"BSD-2-Clause"
] | null | null | null | src/sleek/driver/context.cpp | Phirxian/sleek-engine | 741d55c8daad67ddf631e8b8fbdced59402d7bda | [
"BSD-2-Clause"
] | null | null | null | src/sleek/driver/context.cpp | Phirxian/sleek-engine | 741d55c8daad67ddf631e8b8fbdced59402d7bda | [
"BSD-2-Clause"
] | null | null | null | #include "context.h"
#include "ogl3/ogl3_context.h"
//#include "ogl4/ogl4_context.h"
//#include "dx11/dx11_context.h"
//#include "dx12/dx12_context.h"
//#include "vk/vk_context.h"
//#include "metal/metal_context.h"
namespace sleek
{
namespace driver
{
context::context(std::shared_ptr<device::Device> &d, std::shared_ptr<context> s) noexcept : win(d)
{
shared = s;
}
context::~context() noexcept
{
}
std::shared_ptr<context> createContextRenderer(RENDER_CONTEXT cx, std::shared_ptr<device::Device> &d, std::shared_ptr<context> s) noexcept
{
switch(cx)
{
case RCTX_OGL3:
return std::make_shared<ogl3_context>(d, s);
break;
// case RCTX_OGL4:
// return std::make_shared<ogl4_context>(d, s);
// break;
#ifdef d3d_context_support
case RCTX_D3D:
return std::make_shared<d3d_context>(d, s);
break;
#endif
}
return nullptr;
}
}
}
| 26.295455 | 146 | 0.52204 | Phirxian |
ee83b226b0bab9d284ba20e45397de2342f52711 | 529 | cpp | C++ | src/L/L1338.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | src/L/L1338.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | src/L/L1338.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | #include<bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
int digitsum(int a){
if(a==0) return 0;
return a%10+digitsum(a/10);
}
bool prime(int n){
if(n==1) return false;
int m=sqrt(n);
for(int i=2;i<=m;i++){
if(n%i==0) return false;
}
return true;
}
main(){
ios::sync_with_stdio(false);
cin.tie(0);
int a,b,t,q;
double c=0,h;
cin>>a>>b;
for(int i=0;i<a*b;i++){
cin>>t;
c+=t;
}
cin>>h>>q;
for(int i=0;i<q;i++) c*=1+h/100;
cout<<setprecision(0)<<fixed<<round(c)<<endl;
}
| 16.53125 | 46 | 0.603025 | wlhcode |
ee85b17c677c5a923ca6f8f0e30e43f6f6c21a77 | 847 | cpp | C++ | luogu/cxx/src/P1551.cpp | HoshinoTented/Solutions | 96fb200c7eb5bce17938aec5ae6efdc43b3fe494 | [
"WTFPL"
] | 1 | 2019-09-13T13:06:27.000Z | 2019-09-13T13:06:27.000Z | luogu/cxx/src/P1551.cpp | HoshinoTented/Solutions | 96fb200c7eb5bce17938aec5ae6efdc43b3fe494 | [
"WTFPL"
] | null | null | null | luogu/cxx/src/P1551.cpp | HoshinoTented/Solutions | 96fb200c7eb5bce17938aec5ae6efdc43b3fe494 | [
"WTFPL"
] | null | null | null | #include <iostream>
struct union_find {
int *arr;
const int length;
union_find(const int &len): arr(new int[len]), length(len) {
for (size_t i = 0; i < len; ++ i) {
arr[i] = i;
}
}
auto ask(const int &x) -> int {
if (arr[x] == x) return x;
return arr[x] = ask(arr[x]);
}
auto concat(const int &x, const int &y) -> void {
arr[ask(x)] = ask(y);
}
};
auto main(int, char **) -> int {
int n, m, p;
std::cin >> n >> m >> p;
union_find uf = {n + 1};
for (size_t i = 0; i < m; ++ i) {
int x, y;
std::cin >> x >> y;
uf.concat(x, y);
}
for (size_t i = 0; i < p; ++ i) {
int x, y;
std::cin >> x >> y;
std::cout << (uf.ask(x) == uf.ask(y) ? "Yes" : "No") << std::endl;
}
return 0;
} | 18.822222 | 74 | 0.420307 | HoshinoTented |
ee87c6ead491a6fd9f4ae0d17bfe195c8c15039b | 39,084 | cpp | C++ | tests/src/astro/propagators/unitTestHybridArcVariationalEquations.cpp | kimonito98/tudat | c28f2a3e78b8492e2e054ad5e0d1f9ad785cd092 | [
"BSD-3-Clause"
] | null | null | null | tests/src/astro/propagators/unitTestHybridArcVariationalEquations.cpp | kimonito98/tudat | c28f2a3e78b8492e2e054ad5e0d1f9ad785cd092 | [
"BSD-3-Clause"
] | null | null | null | tests/src/astro/propagators/unitTestHybridArcVariationalEquations.cpp | kimonito98/tudat | c28f2a3e78b8492e2e054ad5e0d1f9ad785cd092 | [
"BSD-3-Clause"
] | null | null | null | /* Copyright (c) 2010-2019, Delft University of Technology
* All rigths reserved
*
* This file is part of the Tudat. Redistribution and use in source and
* binary forms, with or without modification, are permitted exclusively
* under the terms of the Modified BSD license. You should have received
* a copy of the license with this file. If not, please or visit:
* http://tudat.tudelft.nl/LICENSE.
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include <string>
#include <thread>
#include <boost/test/unit_test.hpp>
#include <boost/make_shared.hpp>
#include "tudat/basics/testMacros.h"
#include "tudat/math/basic/linearAlgebra.h"
#include "tudat/astro/basic_astro/physicalConstants.h"
#include "tudat/astro/basic_astro/unitConversions.h"
#include "tudat/interface/spice/spiceInterface.h"
#include "tudat/math/integrators/rungeKuttaCoefficients.h"
#include "tudat/astro/basic_astro/accelerationModel.h"
#include "tudat/io/basicInputOutput.h"
#include "tudat/simulation/environment_setup/body.h"
#include "tudat/simulation/estimation_setup/variationalEquationsSolver.h"
#include "tudat/simulation/environment_setup/defaultBodies.h"
#include "tudat/simulation/environment_setup/createBodies.h"
#include "tudat/simulation/estimation_setup/createNumericalSimulator.h"
#include "tudat/simulation/estimation_setup/createEstimatableParameters.h"
namespace tudat
{
namespace unit_tests
{
//Using declarations.
using namespace tudat;
using namespace tudat::estimatable_parameters;
using namespace tudat::orbit_determination;
using namespace tudat::interpolators;
using namespace tudat::numerical_integrators;
using namespace tudat::spice_interface;
using namespace tudat::simulation_setup;
using namespace tudat::basic_astrodynamics;
using namespace tudat::orbital_element_conversions;
using namespace tudat::ephemerides;
using namespace tudat::propagators;
using namespace tudat::unit_conversions;
BOOST_AUTO_TEST_SUITE( test_hybrid_arc_variational_equation_calculation )
template< typename TimeType = double , typename StateScalarType = double >
std::pair< std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, Eigen::Dynamic > >,
std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > > >
executeHybridArcMarsAndOrbiterSensitivitySimulation(
const Eigen::Matrix< StateScalarType, 12, 1 > initialStateDifference = Eigen::Matrix< StateScalarType, 12, 1 >::Zero( ),
const Eigen::VectorXd parameterPerturbation = Eigen::VectorXd::Zero( 2 ),
const bool propagateVariationalEquations = 1,
const bool patchMultiArcs = 0,
const std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > > forcedMultiArcInitialStates =
std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > >( ),
const double arcDuration = 0.5 * 86400.0,
const double arcOverlap = 5.0E3 )
{
//Load spice kernels.
spice_interface::loadStandardSpiceKernels( );
std::vector< std::string > bodyNames;
bodyNames.push_back( "Sun" );
bodyNames.push_back( "Mars" );
bodyNames.push_back( "Jupiter" );
bodyNames.push_back( "Earth" );
// Specify initial time
double initialEphemerisTime = 1.0E7;
double finalEphemerisTime = initialEphemerisTime + 2.0 * 86400.0;
double maximumTimeStep = 3600.0;
double buffer = 5.0 * maximumTimeStep;
// Create bodies needed in simulation
BodyListSettings bodySettings =
getDefaultBodySettings( bodyNames, initialEphemerisTime - buffer, finalEphemerisTime + buffer );
SystemOfBodies bodies = createSystemOfBodies( bodySettings );
bodies.createEmptyBody( "Orbiter" );
bodies.at( "Orbiter" )->setConstantBodyMass( 5.0E3 );
bodies.at( "Orbiter" )->setEphemeris( std::make_shared< MultiArcEphemeris >(
std::map< double, std::shared_ptr< Ephemeris > >( ),
"Mars", "ECLIPJ2000" ) );
bodies.processBodyFrameDefinitions( );
double referenceAreaRadiation = 4.0;
double radiationPressureCoefficient = 1.2;
std::vector< std::string > occultingBodies;
occultingBodies.push_back( "Earth" );
std::shared_ptr< RadiationPressureInterfaceSettings > orbiterRadiationPressureSettings =
std::make_shared< CannonBallRadiationPressureInterfaceSettings >(
"Sun", referenceAreaRadiation, radiationPressureCoefficient, occultingBodies );
// Create and set radiation pressure settings
bodies.at( "Orbiter" )->setRadiationPressureInterface(
"Sun", createRadiationPressureInterface(
orbiterRadiationPressureSettings, "Orbiter", bodies ) );
// Set accelerations between bodies that are to be taken into account.
SelectedAccelerationMap singleArcAccelerationMap;
std::map< std::string, std::vector< std::shared_ptr< AccelerationSettings > > > accelerationsOfMars;
accelerationsOfMars[ "Earth" ].push_back( std::make_shared< AccelerationSettings >( point_mass_gravity ) );
accelerationsOfMars[ "Sun" ].push_back( std::make_shared< AccelerationSettings >( point_mass_gravity ) );
accelerationsOfMars[ "Jupiter" ].push_back( std::make_shared< AccelerationSettings >( point_mass_gravity ) );
singleArcAccelerationMap[ "Mars" ] = accelerationsOfMars;
std::vector< std::string > singleArcBodiesToIntegrate, singleArcCentralBodies;
singleArcBodiesToIntegrate.push_back( "Mars" );
singleArcCentralBodies.push_back( "SSB" );
AccelerationMap singleArcAccelerationModelMap = createAccelerationModelsMap(
bodies, singleArcAccelerationMap, singleArcBodiesToIntegrate, singleArcCentralBodies );
Eigen::VectorXd singleArcInitialStates = getInitialStatesOfBodies(
singleArcBodiesToIntegrate, singleArcCentralBodies, bodies, initialEphemerisTime );
singleArcInitialStates += initialStateDifference.segment(
0, singleArcInitialStates.rows( ) );
std::shared_ptr< TranslationalStatePropagatorSettings< > > singleArcPropagatorSettings =
std::make_shared< TranslationalStatePropagatorSettings< > >(
singleArcCentralBodies, singleArcAccelerationModelMap, singleArcBodiesToIntegrate,
singleArcInitialStates, finalEphemerisTime );
SelectedAccelerationMap multiArcAccelerationMap;
std::map< std::string, std::vector< std::shared_ptr< AccelerationSettings > > > accelerationsOfOrbiter;
accelerationsOfOrbiter[ "Mars" ].push_back( std::make_shared< SphericalHarmonicAccelerationSettings >( 2, 2 ) );
accelerationsOfOrbiter[ "Sun" ].push_back( std::make_shared< AccelerationSettings >( point_mass_gravity ) );
accelerationsOfOrbiter[ "Sun" ].push_back( std::make_shared< AccelerationSettings >( cannon_ball_radiation_pressure ) );
accelerationsOfOrbiter[ "Jupiter" ].push_back( std::make_shared< AccelerationSettings >( point_mass_gravity ) );
multiArcAccelerationMap[ "Orbiter" ] = accelerationsOfOrbiter;
std::vector< std::string > multiArcBodiesToIntegrate, multiArcCentralBodies;
multiArcBodiesToIntegrate.push_back( "Orbiter" );
multiArcCentralBodies.push_back( "Mars" );
AccelerationMap multiArcAccelerationModelMap = createAccelerationModelsMap(
bodies, multiArcAccelerationMap, multiArcBodiesToIntegrate, multiArcCentralBodies );
// Creater arc times
std::vector< double > integrationArcStarts, integrationArcEnds;
// double integrationStartTime = initialEphemerisTime;
// double integrationEndTime = finalEphemerisTime - 1.0E4;
// double currentStartTime = integrationStartTime;
// double currentEndTime = integrationStartTime + arcDuration;
// do
// {
// integrationArcStarts.push_back( currentStartTime );
// integrationArcEnds.push_back( currentEndTime );
// currentStartTime = currentEndTime - arcOverlap;
// currentEndTime = currentStartTime + arcDuration;
// }
double timeBetweenArcs = 86400.0;
// double arcDuration = 0.5E6;
double currentStartTime = initialEphemerisTime;
double currentEndTime = initialEphemerisTime + arcDuration;
do
{
integrationArcStarts.push_back( currentStartTime );
integrationArcEnds.push_back( currentEndTime );
currentEndTime = currentStartTime + timeBetweenArcs + arcDuration;
currentStartTime = currentStartTime + timeBetweenArcs;
}
while( currentEndTime < finalEphemerisTime );
// Create list of multi-arc initial states
unsigned int numberOfIntegrationArcs = integrationArcStarts.size( );
std::vector< Eigen::VectorXd > multiArcSystemInitialStates;
multiArcSystemInitialStates.resize( numberOfIntegrationArcs );
// Define (quasi-arbitrary) arc initial states
double marsGravitationalParameter = bodies.at( "Mars" )->getGravityFieldModel( )->getGravitationalParameter( );
if( forcedMultiArcInitialStates.size( ) == 0 )
{
for( unsigned int j = 0; j < numberOfIntegrationArcs; j++ )
{
Eigen::Vector6d orbiterInitialStateInKeplerianElements;
orbiterInitialStateInKeplerianElements( semiMajorAxisIndex ) = 6000.0E3;
orbiterInitialStateInKeplerianElements( eccentricityIndex ) = 0.05;
orbiterInitialStateInKeplerianElements( inclinationIndex ) = convertDegreesToRadians( 85.3 );
orbiterInitialStateInKeplerianElements( argumentOfPeriapsisIndex )
= convertDegreesToRadians( 235.7 - j );
orbiterInitialStateInKeplerianElements( longitudeOfAscendingNodeIndex )
= convertDegreesToRadians( 23.4 + j );
orbiterInitialStateInKeplerianElements( trueAnomalyIndex ) = convertDegreesToRadians( 139.87 + j * 10.0 );
// Convert state from Keplerian elements to Cartesian elements.
multiArcSystemInitialStates[ j ] = convertKeplerianToCartesianElements(
orbiterInitialStateInKeplerianElements,
marsGravitationalParameter ) + initialStateDifference.segment(
singleArcInitialStates.rows( ), 6 );
}
}
else
{
for( unsigned int j = 0; j < numberOfIntegrationArcs; j++ )
{
multiArcSystemInitialStates[ j ] = forcedMultiArcInitialStates.at( j ) + initialStateDifference.segment(
singleArcInitialStates.rows( ), 6 );
}
}
// Create propagation settings for each arc
std::vector< std::shared_ptr< SingleArcPropagatorSettings< double > > > arcPropagationSettingsList;
for( unsigned int i = 0; i < numberOfIntegrationArcs; i++ )
{
arcPropagationSettingsList.push_back(
std::make_shared< TranslationalStatePropagatorSettings< double > >
( multiArcCentralBodies, multiArcAccelerationModelMap, multiArcBodiesToIntegrate,
multiArcSystemInitialStates.at( i ), integrationArcEnds.at( i ) ) );
}
std::shared_ptr< MultiArcPropagatorSettings< > > multiArcPropagatorSettings =
std::make_shared< MultiArcPropagatorSettings< > >( arcPropagationSettingsList, patchMultiArcs );
std::shared_ptr< HybridArcPropagatorSettings< > > hybridArcPropagatorSettings =
std::make_shared< HybridArcPropagatorSettings< > >(
singleArcPropagatorSettings, multiArcPropagatorSettings );
std::shared_ptr< IntegratorSettings< > > singleArcIntegratorSettings =
std::make_shared< IntegratorSettings< > >
( rungeKutta4, initialEphemerisTime, 60.0 );
std::shared_ptr< IntegratorSettings< > > multiArcIntegratorSettings =
std::make_shared< IntegratorSettings< > >
( rungeKutta4, initialEphemerisTime, 45.0 );
// Define parameters.
std::vector< std::shared_ptr< EstimatableParameterSettings > > parameterNames;
{
parameterNames =
getInitialStateParameterSettings< double >( hybridArcPropagatorSettings, bodies, integrationArcStarts );
parameterNames.push_back( std::make_shared< EstimatableParameterSettings >( "Sun", gravitational_parameter ) );
parameterNames.push_back( std::make_shared< EstimatableParameterSettings >( "Mars", gravitational_parameter ) );
}
// Create parameters
std::shared_ptr< estimatable_parameters::EstimatableParameterSet< StateScalarType > > parametersToEstimate =
createParametersToEstimate( parameterNames, bodies );
// Perturb parameters.
Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > parameterVector =
parametersToEstimate->template getFullParameterValues< StateScalarType >( );
parameterVector.block( parameterVector.rows( ) - 2, 0, 2, 1 ) += parameterPerturbation;
parametersToEstimate->resetParameterValues( parameterVector );
std::pair< std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, Eigen::Dynamic > >,
std::vector< Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > > > results;
{
// Create dynamics simulator
HybridArcVariationalEquationsSolver< StateScalarType, TimeType > variationalEquations =
HybridArcVariationalEquationsSolver< StateScalarType, TimeType >(
bodies, singleArcIntegratorSettings, multiArcIntegratorSettings,
hybridArcPropagatorSettings, parametersToEstimate, integrationArcStarts );
// Propagate requested equations.
if( propagateVariationalEquations )
{
variationalEquations.integrateVariationalAndDynamicalEquations(
variationalEquations.getPropagatorSettings( )->getInitialStates( ), 1 );
}
else
{
variationalEquations.integrateDynamicalEquationsOfMotionOnly(
variationalEquations.getPropagatorSettings( )->getInitialStates( ) );
}
// Retrieve test data
for( unsigned int arc = 0; arc < integrationArcEnds.size( ); arc++ )
{
double testEpoch = integrationArcEnds.at( arc ) - 2.0E4;
Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 > testStates =
Eigen::Matrix< StateScalarType, Eigen::Dynamic, 1 >::Zero( 12 );
testStates.block( 0, 0, 6, 1 ) = bodies.at( "Mars" )->getStateInBaseFrameFromEphemeris( testEpoch );
testStates.block( 6, 0, 6, 1 ) = bodies.at( "Orbiter" )->getStateInBaseFrameFromEphemeris( testEpoch );/* -
testStates.block( 0, 0, 6, 1 );*/
if( propagateVariationalEquations )
{
results.first.push_back( variationalEquations.getStateTransitionMatrixInterface( )->
getCombinedStateTransitionAndSensitivityMatrix( testEpoch ) );
results.second.push_back( hybridArcPropagatorSettings->getMultiArcPropagatorSettings( )->getInitialStateList( ).at( arc ) );
Eigen::MatrixXd testMatrixDirect =
variationalEquations.getStateTransitionMatrixInterface( )->
getCombinedStateTransitionAndSensitivityMatrix( testEpoch );
Eigen::MatrixXd testMatrixFull=
variationalEquations.getStateTransitionMatrixInterface( )->
getFullCombinedStateTransitionAndSensitivityMatrix( testEpoch );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
testMatrixDirect.block( 0, 0, 12, 6 ),
testMatrixFull.block( 0, 0, 12, 6 ),
std::numeric_limits< double >::epsilon( ) );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
testMatrixDirect.block( 0, 6, 12, 6 ),
testMatrixFull.block( 0, 6 * ( arc + 1 ), 12, 6 ),
std::numeric_limits< double >::epsilon( ) );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
testMatrixDirect.block( 0, 12, 12, 2 ),
testMatrixFull.block( 0, 18, 12, 2 ),
std::numeric_limits< double >::epsilon( ) );
}
else
{
results.second.push_back( testStates );
}
}
}
return results;
}
BOOST_AUTO_TEST_CASE( testMarsAndOrbiterHybridArcVariationalEquationCalculation )
{
std::pair< std::vector< Eigen::MatrixXd >, std::vector< Eigen::VectorXd > > currentOutput;
// Define variables for numerical differentiation
Eigen::Matrix< double, 12, 1> perturbedState;
Eigen::Vector2d perturbedParameter;
Eigen::Matrix< double, 12, 1> statePerturbation;
Eigen::VectorXd parameterPerturbation;
// Define parameter perturbation
parameterPerturbation = ( Eigen::VectorXd( 2 ) << 1.0E20, 1.0E10 ).finished( );
statePerturbation = ( Eigen::Matrix< double, 12, 1>( )<<
1.0E10, 1.0E10, 1.0E10, 5.0E4, 5.0E4, 10.0E4,
10.0, 10.0, 10.0, 0.1, 0.1, 0.1 ).finished( );
for( unsigned int patchArcs = 0; patchArcs < 1; patchArcs++ )
{
// Test for all requested propagator types.
for( unsigned int k = 0; k < 1; k++ )
{
std::cout<<"Propagating state transition: "<<patchArcs<<" "<<" "<<k<<std::endl;
// Compute state transition and sensitivity matrices
currentOutput = executeHybridArcMarsAndOrbiterSensitivitySimulation < double, double >(
Eigen::Matrix< double, 12, 1 >::Zero( ), Eigen::VectorXd::Zero( 2 ), true, patchArcs );
std::vector< Eigen::MatrixXd > stateTransitionAndSensitivityMatrixAtEpoch = currentOutput.first;
std::vector< Eigen::VectorXd > nominalArcStartStates;
if( patchArcs )
{
nominalArcStartStates = currentOutput.second;
}
std::vector< Eigen::MatrixXd > manualPartial;
manualPartial.resize( stateTransitionAndSensitivityMatrixAtEpoch.size( ) );
for( unsigned int arc = 0; arc < manualPartial.size( ); arc++ )
{
manualPartial[ arc ] = Eigen::MatrixXd::Zero( 12, 14 );
}
// Numerically compute state transition matrix
for( unsigned int j = 0; j < 12; j++ )
{
// std::cout<<"Propagating perturbation "<<j<<std::endl;
std::vector< Eigen::VectorXd > upPerturbedState, upPerturbedState2, downPerturbedState2, downPerturbedState;
perturbedState.setZero( );
perturbedState( j ) += statePerturbation( j );
upPerturbedState = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, Eigen::VectorXd::Zero( 2 ), false, false, nominalArcStartStates ).second;
perturbedState.setZero( );
perturbedState( j ) += 0.5 * statePerturbation( j );
upPerturbedState2 = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, Eigen::VectorXd::Zero( 2 ), false, false, nominalArcStartStates ).second;
perturbedState.setZero( );
perturbedState( j ) -= 0.5 * statePerturbation( j );
downPerturbedState2 = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, Eigen::VectorXd::Zero( 2 ), false, false, nominalArcStartStates ).second;
perturbedState.setZero( );
perturbedState( j ) -= statePerturbation( j );
downPerturbedState = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, Eigen::VectorXd::Zero( 2 ), false, false, nominalArcStartStates ).second;
for( unsigned int arc = 0; arc < upPerturbedState.size( ); arc++ )
{
manualPartial[ arc ].block( 0, j, 12, 1 ) =
( -upPerturbedState[ arc ] + 8.0 * upPerturbedState2[ arc ] - 8.0 * downPerturbedState2[ arc ] + downPerturbedState[ arc ] ) /
( 6.0 * statePerturbation( j ) );
}
}
//Numerically compute sensitivity matrix
for( unsigned int j = 0; j < 2; j ++ )
{
std::vector< Eigen::VectorXd > upPerturbedState, upPerturbedState2, downPerturbedState2, downPerturbedState;
perturbedState.setZero( );
Eigen::Vector2d upPerturbedParameter, downPerturbedParameter;
perturbedParameter.setZero( );
perturbedParameter( j ) += parameterPerturbation( j );
upPerturbedState = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, perturbedParameter, false, false, nominalArcStartStates).second;
perturbedParameter.setZero( );
perturbedParameter( j ) += 0.5 * parameterPerturbation( j );
upPerturbedState2 = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, perturbedParameter, false, false, nominalArcStartStates ).second;
perturbedParameter.setZero( );
perturbedParameter( j ) -= 0.5 * parameterPerturbation( j );
downPerturbedState2 = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, perturbedParameter, false, false, nominalArcStartStates ).second;
perturbedParameter.setZero( );
perturbedParameter( j ) -= parameterPerturbation( j );
downPerturbedState = executeHybridArcMarsAndOrbiterSensitivitySimulation< double, double >(
perturbedState, perturbedParameter, false, false, nominalArcStartStates ).second;
for( unsigned int arc = 0; arc < upPerturbedState.size( ); arc++ )
{
manualPartial[ arc ].block( 0, j + 12, 12, 1 ) =
( -upPerturbedState[ arc ] + 8.0 * upPerturbedState2[ arc ] - 8.0 * downPerturbedState2[ arc ] + downPerturbedState[ arc ] ) /
( 6.0 * parameterPerturbation( j ) );
}
}
for( unsigned int arc = 0; arc < manualPartial.size( ); arc++ )
{
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 0, 0, 6, 6 ),
manualPartial.at( arc ).block( 0, 0, 6, 6 ), 5.0E-5 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 6, 6, 6, 6 ),
manualPartial.at( arc ).block( 6, 6, 6, 6 ), 5.0E-5 );
double couplingTolerance;
if( arc == 0 )
{
couplingTolerance = 5.0E-1;
}
else if( arc == 1 || patchArcs )
{
couplingTolerance = 5.0E-2;
}
else
{
couplingTolerance = 1.0E-2;
}
// One component is, by chance, not computed to within relative precision (due to small numerical value),
// next lines mitigate
if( patchArcs == 0 )
{
stateTransitionAndSensitivityMatrixAtEpoch[ arc ]( 7, 4 ) = 0.0;
manualPartial[ arc ]( 7, 4 ) = 0.0;
}
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 6, 0, 6, 6 ),
manualPartial.at( arc ).block( 6, 0, 6, 6 ), couplingTolerance );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 0, 12, 6, 1 ),
manualPartial.at( arc ).block( 0, 12, 6, 1 ), 5.0E-5 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 6, 12, 6, 1 ),
manualPartial.at( arc ).block( 6, 12, 6, 1 ), 5.0E-3 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION(
stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 6, 13, 6, 1 ),
manualPartial.at( arc ).block( 6, 13, 6, 1 ), 5.0E-5 );
// std::cout<<"Arc: "<<arc<<std::endl<<stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 6, 0, 6, 6 )<<std::endl<<std::endl<<
// manualPartial.at( arc ).block( 6, 0, 6, 6 )<<std::endl<<std::endl<<
// ( stateTransitionAndSensitivityMatrixAtEpoch.at( arc ) - manualPartial.at( arc ) ).block( 6, 0, 6, 6 ).cwiseQuotient(
// manualPartial.at( arc ).block( 6, 0, 6, 6 ) )<<std::endl<<std::endl;
// std::cout<<"Arc: "<<arc<<std::endl<<stateTransitionAndSensitivityMatrixAtEpoch.at( arc ).block( 0, 12, 12, 2 )<<std::endl<<std::endl<<
// manualPartial.at( arc ).block( 0, 12, 12, 2 )<<std::endl<<std::endl<<
// ( stateTransitionAndSensitivityMatrixAtEpoch.at( arc ) - manualPartial.at( arc ) ).block( 0, 12, 12, 2 ).cwiseQuotient(
// manualPartial.at( arc ).block( 0, 12, 12, 2 ) )<<std::endl<<std::endl;
}
}
}
}
BOOST_AUTO_TEST_CASE( testVaryingCentralBodyHybridArcVariationalEquations )
{
// Load spice kernels.
spice_interface::loadStandardSpiceKernels( );
// Create list of bodies to create.
std::vector< std::string > bodyNames;
bodyNames.push_back( "Jupiter" );
bodyNames.push_back( "Io" );
bodyNames.push_back( "Europa" );
bodyNames.push_back( "Ganymede" );
// Specify initial time
double initialTime = 0.0;
double finalTime = 4.0 * 86400.0;
// Get body settings.
BodyListSettings bodySettings =
getDefaultBodySettings( bodyNames, initialTime - 3600.0, finalTime + 3600.0,
"Jupiter", "ECLIPJ2000" );
// Create bodies needed in simulation
SystemOfBodies bodies = createSystemOfBodies( bodySettings );
bodies.createEmptyBody( "Spacecraft" );
bodies.at( "Spacecraft" )->setEphemeris( std::make_shared< MultiArcEphemeris >(
std::map< double, std::shared_ptr< Ephemeris > >( ), "Jupiter", "ECLIPJ2000" ) );
bodies.processBodyFrameDefinitions( );
SelectedAccelerationMap singleArcAccelerationMap;
std::vector< std::string > singleArcBodiesToPropagate = { "Io", "Europa", "Ganymede" };
std::vector< std::string > singleArcCentralBodies = { "Jupiter", "Jupiter", "Jupiter" };
for( unsigned int i = 0; i < singleArcBodiesToPropagate.size( ); i++ )
{
singleArcAccelerationMap[ singleArcBodiesToPropagate.at( i ) ][ "Jupiter" ].push_back(
std::make_shared< AccelerationSettings >( basic_astrodynamics::point_mass_gravity ) );
for( unsigned int j = 0; j < singleArcBodiesToPropagate.size( ); j++ )
{
if( i != j )
{
singleArcAccelerationMap[ singleArcBodiesToPropagate.at( i ) ][ singleArcBodiesToPropagate.at( j ) ].push_back(
std::make_shared< AccelerationSettings >( basic_astrodynamics::point_mass_gravity ) );
}
}
}
basic_astrodynamics::AccelerationMap singleArcAccelerationModelMap = createAccelerationModelsMap(
bodies, singleArcAccelerationMap, singleArcBodiesToPropagate, singleArcCentralBodies );
Eigen::VectorXd singleArcInitialState = getInitialStatesOfBodies(
singleArcBodiesToPropagate, singleArcCentralBodies, bodies, initialTime );
std::shared_ptr< TranslationalStatePropagatorSettings< double > > singleArcPropagatorSettings =
std::make_shared< TranslationalStatePropagatorSettings< double > >
( singleArcCentralBodies, singleArcAccelerationModelMap, singleArcBodiesToPropagate,singleArcInitialState, finalTime );
std::vector< std::string > multiArcBodiesToPropagate =
{ "Spacecraft", "Spacecraft", "Spacecraft", "Spacecraft", "Spacecraft", "Spacecraft" };
std::vector< std::string > multiArcCentralBodies =
{ "Io", "Ganymede", "Europa", "Ganymede", "Io", "Europa" };
std::vector< double > arcStartTimes =
{ 3600.0, 3.0 * 3600, 5.0 * 3600.0, 7.0 * 3600.0, 9.0 * 3600.0, 11.0 * 3600.0 };
std::map< std::string, std::vector< double > > arcStartTimesPerBody;
for( unsigned int i = 0; i < arcStartTimes.size( ); i++ )
{
arcStartTimesPerBody[ multiArcCentralBodies.at( i ) ].push_back( arcStartTimes.at( i ) );
}
double arcDuration = 3600.0;
std::vector< Eigen::VectorXd > multiArcSystemInitialStates;
std::vector< std::shared_ptr< SingleArcPropagatorSettings< double > > > multiArcPropagationSettingsList;
std::map< std::string, std::vector< std::shared_ptr< SingleArcPropagatorSettings< double > > > >
multiArcPropagationSettingsListPerCentralBody;
std::map< std::string, std::vector< int > > perBodyIndicesInFullPropagation;
for( unsigned int i = 0; i < arcStartTimes.size( ); i++ )
{
Eigen::Vector6d spacecraftInitialStateInKeplerianElements;
spacecraftInitialStateInKeplerianElements( semiMajorAxisIndex ) = 3500.0E3;
spacecraftInitialStateInKeplerianElements( eccentricityIndex ) = 0.1;
spacecraftInitialStateInKeplerianElements( inclinationIndex ) = unit_conversions::convertDegreesToRadians(
static_cast< double >( i * 30 ) );
spacecraftInitialStateInKeplerianElements( argumentOfPeriapsisIndex ) = unit_conversions::convertDegreesToRadians(
static_cast< double >( i * 30 ) );
spacecraftInitialStateInKeplerianElements( longitudeOfAscendingNodeIndex ) = unit_conversions::convertDegreesToRadians(
static_cast< double >( i * 30 ) );
spacecraftInitialStateInKeplerianElements( trueAnomalyIndex ) = unit_conversions::convertDegreesToRadians(
static_cast< double >( i * 30 ) );
double centralBodyGravitationalParameter = bodies.at( multiArcCentralBodies.at( i ) )->getGravityFieldModel( )->getGravitationalParameter( );
multiArcSystemInitialStates.push_back( convertKeplerianToCartesianElements(
spacecraftInitialStateInKeplerianElements, centralBodyGravitationalParameter ) );
SelectedAccelerationMap multiArcAccelerationMap;
multiArcAccelerationMap[ "Spacecraft" ][ "Jupiter" ].push_back(
std::make_shared< AccelerationSettings >( basic_astrodynamics::point_mass_gravity ) );
for( unsigned int i = 0; i < singleArcBodiesToPropagate.size( ); i++ )
{
multiArcAccelerationMap[ "Spacecraft" ][ singleArcBodiesToPropagate.at( i ) ].push_back(
std::make_shared< AccelerationSettings >( basic_astrodynamics::point_mass_gravity ) );
}
basic_astrodynamics::AccelerationMap multiArcAccelerationModelMap = createAccelerationModelsMap(
bodies, multiArcAccelerationMap, { multiArcBodiesToPropagate.at( i ) }, { multiArcCentralBodies.at( i ) } );
multiArcPropagationSettingsList.push_back(
std::make_shared< TranslationalStatePropagatorSettings< double > >
( std::vector< std::string >{ multiArcCentralBodies.at( i ) }, multiArcAccelerationModelMap,
std::vector< std::string >{ multiArcBodiesToPropagate.at( i ) },
multiArcSystemInitialStates.at( i ), arcStartTimes.at( i ) + arcDuration ) );
multiArcPropagationSettingsListPerCentralBody[
multiArcCentralBodies.at( i ) ].push_back(
std::make_shared< TranslationalStatePropagatorSettings< double > >
( std::vector< std::string >{ multiArcCentralBodies.at( i ) }, multiArcAccelerationModelMap,
std::vector< std::string >{ multiArcBodiesToPropagate.at( i ) },
multiArcSystemInitialStates.at( i ), arcStartTimes.at( i ) + arcDuration ) );
perBodyIndicesInFullPropagation[ multiArcCentralBodies.at( i ) ].push_back( i );
}
std::shared_ptr< MultiArcPropagatorSettings< > > multiArcPropagationSettings =
std::make_shared< MultiArcPropagatorSettings< > >( multiArcPropagationSettingsList );
std::shared_ptr< HybridArcPropagatorSettings< > > hybridArcPropagatorSettings =
std::make_shared< HybridArcPropagatorSettings< > >( singleArcPropagatorSettings, multiArcPropagationSettings );
std::vector< std::shared_ptr< EstimatableParameterSettings > > parameterNames;
parameterNames = getInitialHybridArcParameterSettings< >( hybridArcPropagatorSettings, bodies, arcStartTimes );
for( unsigned int i = 0; i < singleArcBodiesToPropagate.size( ); i++ )
{
parameterNames.push_back( std::make_shared< EstimatableParameterSettings >(
singleArcBodiesToPropagate.at( i ), gravitational_parameter ) );
}
std::shared_ptr< estimatable_parameters::EstimatableParameterSet< double > > parametersToEstimate =
createParametersToEstimate< double >( parameterNames, bodies, hybridArcPropagatorSettings );
printEstimatableParameterEntries( parametersToEstimate );
std::shared_ptr< IntegratorSettings< > > singleArcIntegratorSettings =
std::make_shared< IntegratorSettings< > >
( rungeKutta4, initialTime, 60.0 );
std::shared_ptr< IntegratorSettings< > > multiArcIntegratorSettings =
std::make_shared< IntegratorSettings< > >
( rungeKutta4, TUDAT_NAN, 15.0 );
// Create dynamics simulator
HybridArcVariationalEquationsSolver< > variationalEquations =
HybridArcVariationalEquationsSolver< >(
bodies, singleArcIntegratorSettings, multiArcIntegratorSettings,
hybridArcPropagatorSettings, parametersToEstimate, arcStartTimes, true, false, true );
std::vector< std::vector< std::map< double, Eigen::MatrixXd > > > fullMultiArcVariationalSolution =
variationalEquations.getMultiArcSolver( )->getNumericalVariationalEquationsSolution( );
std::vector< std::map< double, Eigen::VectorXd > > fullMultiArcStateSolution =
variationalEquations.getMultiArcSolver( )->getDynamicsSimulator( )->getEquationsOfMotionNumericalSolution( );
for( unsigned int i = 0; i < singleArcBodiesToPropagate.size( ); i++ )
{
std::shared_ptr< MultiArcPropagatorSettings< > > multiArcPerBodyPropagationSettings =
std::make_shared< MultiArcPropagatorSettings< > >( multiArcPropagationSettingsListPerCentralBody.at(
singleArcBodiesToPropagate.at( i ) ) );
std::shared_ptr< HybridArcPropagatorSettings< > > hybridArcPerBodyPropagatorSettings =
std::make_shared< HybridArcPropagatorSettings< > >(
singleArcPropagatorSettings, multiArcPerBodyPropagationSettings );
std::vector< std::shared_ptr< EstimatableParameterSettings > > parameterNamesPerBody;
parameterNamesPerBody = getInitialHybridArcParameterSettings< >(
hybridArcPerBodyPropagatorSettings, bodies, arcStartTimesPerBody.at( singleArcBodiesToPropagate.at( i ) ) );
for( unsigned int j = 0; j < singleArcBodiesToPropagate.size( ); j++ )
{
parameterNamesPerBody.push_back( std::make_shared< EstimatableParameterSettings >(
singleArcBodiesToPropagate.at( j ), gravitational_parameter ) );
}
std::shared_ptr< estimatable_parameters::EstimatableParameterSet< double > > parametersToEstimatePerBody =
createParametersToEstimate< double >( parameterNamesPerBody, bodies, hybridArcPerBodyPropagatorSettings );
printEstimatableParameterEntries( parametersToEstimatePerBody );
HybridArcVariationalEquationsSolver< > perCentralBodyVariationalEquations =
HybridArcVariationalEquationsSolver< >(
bodies, singleArcIntegratorSettings, multiArcIntegratorSettings,
hybridArcPerBodyPropagatorSettings, parametersToEstimatePerBody, arcStartTimesPerBody.at(
singleArcBodiesToPropagate.at( i ) ), true, false, true );
std::vector< std::vector< std::map< double, Eigen::MatrixXd > > > perBodyMultiArcVariationalSolution =
perCentralBodyVariationalEquations.getMultiArcSolver( )->getNumericalVariationalEquationsSolution( );
std::vector< std::map< double, Eigen::VectorXd > > perBodyMultiArcStateSolution =
perCentralBodyVariationalEquations.getMultiArcSolver( )->getDynamicsSimulator( )->getEquationsOfMotionNumericalSolution( );
for( unsigned int j = 0; j < perBodyIndicesInFullPropagation.at( singleArcBodiesToPropagate.at( i ) ).size( ); j++ )
{
for( unsigned int k = 0; k < 2; k++ )
{
std::map< double, Eigen::MatrixXd > fullMultiArcMatrixHistory = fullMultiArcVariationalSolution.at(
perBodyIndicesInFullPropagation.at( singleArcBodiesToPropagate.at( i ) ).at( j ) ).at( k );
std::map< double, Eigen::MatrixXd > perBodyMultiMatrixHistory = perBodyMultiArcVariationalSolution.at( j ).at( k );
auto fullIterator = fullMultiArcMatrixHistory.begin( );
auto perBodyIterator = perBodyMultiMatrixHistory.begin( );
BOOST_CHECK_EQUAL( fullMultiArcMatrixHistory.size( ), perBodyMultiMatrixHistory.size( ) );
for( unsigned int i = 0; i < fullMultiArcMatrixHistory.size( ); i++ )
{
BOOST_CHECK_CLOSE_FRACTION( fullIterator->first, perBodyIterator->first, std::numeric_limits< double >::epsilon( ) );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( fullIterator->second, perBodyIterator->second, std::numeric_limits< double >::epsilon( ) );
fullIterator++;
perBodyIterator++;
}
}
}
}
}
BOOST_AUTO_TEST_SUITE_END( )
}
}
| 52.391421 | 170 | 0.647426 | kimonito98 |
ee8fddf09fb08b761d3fb16e4c3c586edd1e6435 | 5,448 | cpp | C++ | Plain/src/Runtime/Rendering/Techniques/Bloom.cpp | Gaukler/PlainRenderer | cf0f41a2300bee9f29a886230c061776cb29ba5e | [
"MIT"
] | 9 | 2021-04-09T14:07:45.000Z | 2022-03-06T07:51:14.000Z | Plain/src/Runtime/Rendering/Techniques/Bloom.cpp | Gaukler/PlainRenderer | cf0f41a2300bee9f29a886230c061776cb29ba5e | [
"MIT"
] | 14 | 2021-04-10T11:06:06.000Z | 2021-05-07T14:20:34.000Z | Plain/src/Runtime/Rendering/Techniques/Bloom.cpp | Gaukler/PlainRenderer | cf0f41a2300bee9f29a886230c061776cb29ba5e | [
"MIT"
] | null | null | null | #include "pch.h"
#include "Bloom.h"
#include "Utilities/GeneralUtils.h"
#include "Utilities/MathUtils.h"
const int bloomMipCount = 6;
void Bloom::init(const int textureWidth, const int textureHeight) {
// bloom downsample
for (int i = 0; i < bloomMipCount - 1; i++) {
ComputePassDescription desc;
const int mip = i + 1;
desc.name = "Bloom downsample mip " + std::to_string(mip);
desc.shaderDescription.srcPathRelative = "bloomDownsample.comp";
m_bloomDownsamplePasses.push_back(gRenderBackend.createComputePass(desc));
}
// bloom upsample
for (int i = 0; i < bloomMipCount - 1; i++) {
ComputePassDescription desc;
const int mip = bloomMipCount - 2 - i;
desc.name = "Bloom Upsample mip " + std::to_string(mip);
desc.shaderDescription.srcPathRelative = "bloomUpsample.comp";
const bool isLowestMip = i == 0;
desc.shaderDescription.specialisationConstants = {
SpecialisationConstant{
0, //location
dataToCharArray((void*)&isLowestMip, sizeof(isLowestMip))} //value
};
m_bloomUpsamplePasses.push_back(gRenderBackend.createComputePass(desc));
}
// apply bloom pass
{
ComputePassDescription desc;
desc.name = "Apply bloom";
desc.shaderDescription.srcPathRelative = "applyBloom.comp";
m_applyBloomPass = gRenderBackend.createComputePass(desc);
}
}
ImageDescription getBloomImageDescription(const uint32_t width, const uint32_t height) {
ImageDescription desc;
desc.width = width;
desc.height = height;
desc.depth = 1;
desc.type = ImageType::Type2D;
desc.format = ImageFormat::R11G11B10_uFloat;
desc.usageFlags = ImageUsageFlags::Sampled | ImageUsageFlags::Storage;
desc.mipCount = MipCount::Manual;
desc.manualMipCount = bloomMipCount;
desc.autoCreateMips = false;
return desc;
}
void Bloom::computeBloom(const ImageHandle targetImage, const BloomSettings& settings) const {
const ImageDescription bloomImageDescription = gRenderBackend.getImageDescription(targetImage);
const int width = bloomImageDescription.width;
const int height = bloomImageDescription.height;
ImageDescription desc = getBloomImageDescription(width, height);
const ImageHandle downscaleTexture = gRenderBackend.createTemporaryImage(desc);
// downscale
for (int i = 0; i < m_bloomDownsamplePasses.size(); i++) {
ComputePassExecution exe;
exe.genericInfo.handle = m_bloomDownsamplePasses[i];
const int sourceMip = i;
const int targetMip = i + 1;
const ImageHandle srcTexture = i == 0 ? targetImage : downscaleTexture;
exe.genericInfo.resources.storageImages = {
ImageResource(downscaleTexture, targetMip, 0)
};
exe.genericInfo.resources.sampledImages = {
ImageResource(srcTexture, sourceMip, 1)
};
const glm::ivec2 baseResolution = glm::ivec2(width, height);
const glm::ivec2 targetResolution = resolutionFromMip(glm::ivec3(baseResolution, 1), targetMip);
const int groupSize = 8;
exe.dispatchCount[0] = (uint32_t)glm::ceil(targetResolution.x / float(groupSize));
exe.dispatchCount[1] = (uint32_t)glm::ceil(targetResolution.y / float(groupSize));
exe.dispatchCount[2] = 1;
gRenderBackend.setComputePassExecution(exe);
}
const ImageHandle upscaleTexture = gRenderBackend.createTemporaryImage(desc);
// upscale
for (int i = 0; i < m_bloomUpsamplePasses.size(); i++) {
ComputePassExecution exe;
exe.genericInfo.handle = m_bloomUpsamplePasses[i];
const int targetMip = bloomMipCount - 2 - i;
const int sourceMip = targetMip + 1;
exe.genericInfo.resources.storageImages = {
ImageResource(upscaleTexture, targetMip, 0)
};
exe.genericInfo.resources.sampledImages = {
ImageResource(upscaleTexture, sourceMip, 1),
ImageResource(downscaleTexture, sourceMip, 2)
};
const glm::ivec2 baseResolution = glm::ivec2(width, height);
const glm::ivec2 targetResolution = resolutionFromMip(glm::ivec3(baseResolution, 1), targetMip);
const int groupSize = 8;
exe.dispatchCount[0] = (uint32_t)glm::ceil(targetResolution.x / float(groupSize));
exe.dispatchCount[1] = (uint32_t)glm::ceil(targetResolution.y / float(groupSize));
exe.dispatchCount[2] = 1;
exe.pushConstants = dataToCharArray((void*)&settings.radius, sizeof(settings.radius));
gRenderBackend.setComputePassExecution(exe);
}
// apply bloom
{
ComputePassExecution exe;
exe.genericInfo.handle = m_applyBloomPass;
exe.genericInfo.resources.storageImages = {
ImageResource(targetImage, 0, 0)
};
exe.genericInfo.resources.sampledImages = {
ImageResource(upscaleTexture, 0, 1)
};
const int groupSize = 8;
exe.dispatchCount[0] = (uint32_t)glm::ceil(width / float(groupSize));
exe.dispatchCount[1] = (uint32_t)glm::ceil(height / float(groupSize));
exe.dispatchCount[2] = 1;
exe.pushConstants = dataToCharArray((void*)&settings.strength, sizeof(settings.strength));
gRenderBackend.setComputePassExecution(exe);
}
} | 37.833333 | 104 | 0.66116 | Gaukler |
ee90319edee5692142accdcca88e9493ac3c307f | 283 | cpp | C++ | Part1/Chapter1/L1-9.cpp | HarmioneF/LuoguBook_Base | 65637085e951574823749ef2b2584d08aa8e08d6 | [
"MIT"
] | null | null | null | Part1/Chapter1/L1-9.cpp | HarmioneF/LuoguBook_Base | 65637085e951574823749ef2b2584d08aa8e08d6 | [
"MIT"
] | null | null | null | Part1/Chapter1/L1-9.cpp | HarmioneF/LuoguBook_Base | 65637085e951574823749ef2b2584d08aa8e08d6 | [
"MIT"
] | null | null | null | #include <iostream>
#include <cmath>
using namespace std;
int main() {
double r = 5;
const double PI = 3.141593;
// # define PI 3.14125953
cout << 2 * PI * r << endl;
cout << PI * pow(r, 2) << endl;
cout << 4.0 / 3 * PI * pow(r, 3) << endl;
return 0;
}
| 18.866667 | 45 | 0.522968 | HarmioneF |
ee904debfddbf375b39451bbbe8cb470f732d65e | 108 | cpp | C++ | src/OpenCvSharpExtern/stitching.cpp | kakashasha/opencvsharp | c1f6652cec7ae211e642ae66d17c19b77abc52e7 | [
"BSD-3-Clause"
] | 3,886 | 2015-01-02T15:12:37.000Z | 2022-03-31T02:30:51.000Z | src/OpenCvSharpExtern/stitching.cpp | kakashasha/opencvsharp | c1f6652cec7ae211e642ae66d17c19b77abc52e7 | [
"BSD-3-Clause"
] | 1,110 | 2015-01-15T06:18:25.000Z | 2022-03-30T14:57:26.000Z | src/OpenCvSharpExtern/stitching.cpp | kakashasha/opencvsharp | c1f6652cec7ae211e642ae66d17c19b77abc52e7 | [
"BSD-3-Clause"
] | 1,047 | 2015-01-08T07:14:48.000Z | 2022-03-30T08:54:30.000Z | // ReSharper disable CppUnusedIncludeDirective
#include "stitching.h"
#include "stitching_detail_Matchers.h" | 36 | 46 | 0.842593 | kakashasha |
ee909d77451d31374898118b7f80a71723d2f0f3 | 5,955 | hpp | C++ | include/GlobalNamespace/LiteNetLibConnectionManager_LiteNetLibConnectionParamsBase.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | include/GlobalNamespace/LiteNetLibConnectionManager_LiteNetLibConnectionParamsBase.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | include/GlobalNamespace/LiteNetLibConnectionManager_LiteNetLibConnectionParamsBase.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: LiteNetLibConnectionManager
#include "GlobalNamespace/LiteNetLibConnectionManager.hpp"
// Including type: IConnectionInitParams`1
#include "GlobalNamespace/IConnectionInitParams_1.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Begin forward declares
// Forward declaring namespace: GlobalNamespace
namespace GlobalNamespace {
// Forward declaring type: IConnectionRequestHandler
class IConnectionRequestHandler;
}
// Completed forward declares
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::GlobalNamespace::LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase);
DEFINE_IL2CPP_ARG_TYPE(::GlobalNamespace::LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase*, "", "LiteNetLibConnectionManager/LiteNetLibConnectionParamsBase");
// Type namespace:
namespace GlobalNamespace {
// Size: 0x24
#pragma pack(push, 1)
// Autogenerated type: LiteNetLibConnectionManager/LiteNetLibConnectionParamsBase
// [TokenAttribute] Offset: FFFFFFFF
class LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase : public ::Il2CppObject/*, public ::GlobalNamespace::IConnectionInitParams_1<::GlobalNamespace::LiteNetLibConnectionManager*>*/ {
public:
#ifdef USE_CODEGEN_FIELDS
public:
#else
#ifdef CODEGEN_FIELD_ACCESSIBILITY
CODEGEN_FIELD_ACCESSIBILITY:
#else
protected:
#endif
#endif
// public IConnectionRequestHandler connectionRequestHandler
// Size: 0x8
// Offset: 0x10
::GlobalNamespace::IConnectionRequestHandler* connectionRequestHandler;
// Field size check
static_assert(sizeof(::GlobalNamespace::IConnectionRequestHandler*) == 0x8);
// public System.Int32 port
// Size: 0x4
// Offset: 0x18
int port;
// Field size check
static_assert(sizeof(int) == 0x4);
// public System.Boolean filterUnencryptedTraffic
// Size: 0x1
// Offset: 0x1C
bool filterUnencryptedTraffic;
// Field size check
static_assert(sizeof(bool) == 0x1);
// public System.Boolean enableUnconnectedMessages
// Size: 0x1
// Offset: 0x1D
bool enableUnconnectedMessages;
// Field size check
static_assert(sizeof(bool) == 0x1);
// public System.Boolean enableBackgroundSentry
// Size: 0x1
// Offset: 0x1E
bool enableBackgroundSentry;
// Field size check
static_assert(sizeof(bool) == 0x1);
// public System.Boolean enableStatistics
// Size: 0x1
// Offset: 0x1F
bool enableStatistics;
// Field size check
static_assert(sizeof(bool) == 0x1);
// public System.Int32 disconnectTimeoutMs
// Size: 0x4
// Offset: 0x20
int disconnectTimeoutMs;
// Field size check
static_assert(sizeof(int) == 0x4);
public:
// Creating interface conversion operator: operator ::GlobalNamespace::IConnectionInitParams_1<::GlobalNamespace::LiteNetLibConnectionManager*>
operator ::GlobalNamespace::IConnectionInitParams_1<::GlobalNamespace::LiteNetLibConnectionManager*>() noexcept {
return *reinterpret_cast<::GlobalNamespace::IConnectionInitParams_1<::GlobalNamespace::LiteNetLibConnectionManager*>*>(this);
}
// Get instance field reference: public IConnectionRequestHandler connectionRequestHandler
::GlobalNamespace::IConnectionRequestHandler*& dyn_connectionRequestHandler();
// Get instance field reference: public System.Int32 port
int& dyn_port();
// Get instance field reference: public System.Boolean filterUnencryptedTraffic
bool& dyn_filterUnencryptedTraffic();
// Get instance field reference: public System.Boolean enableUnconnectedMessages
bool& dyn_enableUnconnectedMessages();
// Get instance field reference: public System.Boolean enableBackgroundSentry
bool& dyn_enableBackgroundSentry();
// Get instance field reference: public System.Boolean enableStatistics
bool& dyn_enableStatistics();
// Get instance field reference: public System.Int32 disconnectTimeoutMs
int& dyn_disconnectTimeoutMs();
// protected System.Void .ctor()
// Offset: 0x164BD74
// Implemented from: System.Object
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase*, creationType>()));
}
}; // LiteNetLibConnectionManager/LiteNetLibConnectionParamsBase
#pragma pack(pop)
static check_size<sizeof(LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase), 32 + sizeof(int)> __GlobalNamespace_LiteNetLibConnectionManager_LiteNetLibConnectionParamsBaseSizeCheck;
static_assert(sizeof(LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase) == 0x24);
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: GlobalNamespace::LiteNetLibConnectionManager::LiteNetLibConnectionParamsBase::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 48.024194 | 198 | 0.743913 | RedBrumbler |
ee970101ada6acb51203aae3f54385a5da9b3f8d | 57 | hpp | C++ | tests/core/generator.hpp | jschmold/icarus-prototype | 162a180dc9b9f7db5695480f5b3adff37de8248a | [
"Apache-2.0"
] | null | null | null | tests/core/generator.hpp | jschmold/icarus-prototype | 162a180dc9b9f7db5695480f5b3adff37de8248a | [
"Apache-2.0"
] | null | null | null | tests/core/generator.hpp | jschmold/icarus-prototype | 162a180dc9b9f7db5695480f5b3adff37de8248a | [
"Apache-2.0"
] | null | null | null | #pragma once
namespace GeneratorTests {
void run();
}
| 9.5 | 26 | 0.701754 | jschmold |
eea0321ca981c8b59873da342e9c902423b2cac2 | 885 | cpp | C++ | docs/examples/SampleMapping.cpp | Aschratt/Texturize | bba688d1afd60363f03e02d28e642a63845591d6 | [
"MIT"
] | 11 | 2019-05-17T12:23:12.000Z | 2020-11-12T14:03:23.000Z | docs/examples/SampleMapping.cpp | crud89/Texturize | bba688d1afd60363f03e02d28e642a63845591d6 | [
"MIT"
] | 2 | 2019-04-01T08:37:36.000Z | 2019-04-01T08:49:15.000Z | docs/examples/SampleMapping.cpp | crud89/Texturize | bba688d1afd60363f03e02d28e642a63845591d6 | [
"MIT"
] | 1 | 2019-06-25T01:04:35.000Z | 2019-06-25T01:04:35.000Z | #include <analysis.hpp>
int main(int argc, const char** argv)
{
// Read an image using OpenCV. The name of the image is provided within the first command line parameter.
cv::Mat img = cv::imread(argv[0]);
// Read the uv map, provided by the second command line parameter. Note that uv maps must contain 2 channels.
cv::Mat uv = cv::imread(argv[1]);
TEXTURIZE_ASSERT(uv.depth() == 2);
// Create a sample for the sample and uv map.
// Note that both images may differ in size.
Texturize::Sample exemplar(img);
Texturize::Sample uvMap(uv);
// Apply the uv map to the image and store the result to a new sample.
Texturize::Sample result;
exemplar.sample(uv, result);
// Display the result. It will have the same size as the uv map and the same depth as the image.
cv::imshow("Result", (cv::Mat)result);
cv::waitKey(1);
} | 36.875 | 113 | 0.671186 | Aschratt |
eea12b353475f283a6f93b54e0ba46fd6b845413 | 67 | hpp | C++ | src/boost_geometry_strategies_concepts_distance_concept.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 10 | 2018-03-17T00:58:42.000Z | 2021-07-06T02:48:49.000Z | src/boost_geometry_strategies_concepts_distance_concept.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 2 | 2021-03-26T15:17:35.000Z | 2021-05-20T23:55:08.000Z | src/boost_geometry_strategies_concepts_distance_concept.hpp | miathedev/BoostForArduino | 919621dcd0c157094bed4df752b583ba6ea6409e | [
"BSL-1.0"
] | 4 | 2019-05-28T21:06:37.000Z | 2021-07-06T03:06:52.000Z | #include <boost/geometry/strategies/concepts/distance_concept.hpp>
| 33.5 | 66 | 0.850746 | miathedev |
eea725725d18401a09d00238ffb1578ad1e4c11a | 493 | cpp | C++ | my_work/10_sayidan_tek_cift.cpp | korayyalcin1903/c-_work | 1a5f6103aa68ae9a16077d972bfeba1a4272789f | [
"MIT"
] | null | null | null | my_work/10_sayidan_tek_cift.cpp | korayyalcin1903/c-_work | 1a5f6103aa68ae9a16077d972bfeba1a4272789f | [
"MIT"
] | null | null | null | my_work/10_sayidan_tek_cift.cpp | korayyalcin1903/c-_work | 1a5f6103aa68ae9a16077d972bfeba1a4272789f | [
"MIT"
] | null | null | null | #include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char const *argv[])
{
int sayi,teksayac=0,ciftsayac=0;
for(int i=1;i<=10;i++)
{
cout << "Sayi Giriniz=";
cin >> sayi;
if(sayi%2==0)
{
ciftsayac++;
}
else
{
teksayac++;
}
}
cout << "Çift Sayisi adeti=" << ciftsayac << endl;
cout << "Tek Sayi adeti=" << teksayac;
return 0;
}
| 19.72 | 55 | 0.452333 | korayyalcin1903 |
eeaa82546c579db997933219ce1d466c1bf0d147 | 11,230 | cpp | C++ | applications/ParticlesEditor/src/Objects/EmitterObject.cpp | AluminiumRat/mtt | 3052f8ad0ffabead05a1033e1d714a61e77d0aa8 | [
"MIT"
] | null | null | null | applications/ParticlesEditor/src/Objects/EmitterObject.cpp | AluminiumRat/mtt | 3052f8ad0ffabead05a1033e1d714a61e77d0aa8 | [
"MIT"
] | null | null | null | applications/ParticlesEditor/src/Objects/EmitterObject.cpp | AluminiumRat/mtt | 3052f8ad0ffabead05a1033e1d714a61e77d0aa8 | [
"MIT"
] | null | null | null | #include <chrono>
#include <Objects/EmitterObject.h>
const std::map<EmitterObject::Shape, QString> EmitterObject::shapeNames =
{ {EmitterObject::CIRCLE_SHAPE, QT_TR_NOOP("Circle")},
{EmitterObject::SPHERE_SHAPE, QT_TR_NOOP("Sphere")}};
const std::map<EmitterObject::Distribution, QString>
EmitterObject::distributionNames =
{ {EmitterObject::UNIFORM_DISTRIBUTION, QT_TR_NOOP("Uniform")},
{EmitterObject::SMOOTH_DISTRIBUTION, QT_TR_NOOP("Smooth")}};
EmitterObject::EmitterObject( const QString& name,
bool canBeRenamed,
const mtt::UID& id) :
HierarhicalObject(name, canBeRenamed, id),
_enabled(true),
_typeMask(1),
_fieldRef(*this),
_intensity(0.f),
_size(1.f),
_shape(SPHERE_SHAPE),
_distribution(UNIFORM_DISTRIBUTION),
_directionAngle(2.f * glm::pi<float>()),
_speedRange(0.f, 0.f),
_sizeRange(1.f, 1.f),
_rotationRange(-glm::pi<float>(), glm::pi<float>()),
_rotationSpeedRange(.0f, .0f),
_firstAlbedo(1.f, 1.f, 1.f),
_secondAlbedo(1.f, 1.f, 1.f),
_opacityRange(1.f, 1.f),
_emissionColor(1.f),
_emissionBrightness(0.f),
_textureIndex(0),
_tileIndex(0),
_lifetimeRange(mtt::second, mtt::second),
_massRange(0.f, 0.f),
_frictionFactorRange(0.f, 0.f),
_randomEngine(
unsigned int(std::chrono::system_clock::now().time_since_epoch().count())),
_symmetricalDistribution(-1.f, 1.f),
_displacedDistribution(0.f, 1.f)
{
}
void EmitterObject::_connectToField(ParticleField& field)
{
field.registerEmitter(*this);
}
void EmitterObject::_disconnectFromField(ParticleField& field) noexcept
{
field.unregisterEmitter(*this);
}
void EmitterObject::setEnabled(bool newValue) noexcept
{
if (_enabled == newValue) return;
_enabled = newValue;
emit enabledChanged(newValue);
}
void EmitterObject::setTypeMask(uint32_t newValue) noexcept
{
if (_typeMask == newValue) return;
_typeMask = newValue;
emit typeMaskChanged(newValue);
}
void EmitterObject::setIntensity(float newValue) noexcept
{
if(_intensity == newValue) return;
_intensity = newValue;
emit intensityChanged(newValue);
}
void EmitterObject::setSize(float newValue) noexcept
{
if(_size == newValue) return;
_size = newValue;
emit sizeChanged(newValue);
}
void EmitterObject::setShape(Shape newValue) noexcept
{
if(_shape == newValue) return;
_shape = newValue;
emit shapeChanged(newValue);
}
void EmitterObject::setDistribution(Distribution newValue) noexcept
{
if(_distribution == newValue) return;
_distribution = newValue;
emit distributionChanged(newValue);
}
void EmitterObject::setDirectionAngle(float newValue) noexcept
{
if(_directionAngle == newValue) return;
_directionAngle = newValue;
emit directionAngleChanged(newValue);
}
void EmitterObject::setSpeedRange(const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_speedRange == newValue) return;
_speedRange = newValue;
emit speedRangeChanged(newValue);
}
void EmitterObject::setSizeRange(const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_sizeRange == newValue) return;
_sizeRange = newValue;
emit sizeRangeChanged(newValue);
}
void EmitterObject::setRotationRange(const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_rotationRange == newValue) return;
_rotationRange = newValue;
emit rotationRangeChanged(newValue);
}
void EmitterObject::setRotationSpeedRange(
const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_rotationSpeedRange == newValue) return;
_rotationSpeedRange = newValue;
emit rotationSpeedRangeChanged(newValue);
}
void EmitterObject::setFirstAlbedo(const glm::vec3& newValue) noexcept
{
glm::vec3 newColor = glm::max(newValue, glm::vec3(0.f));
if(_firstAlbedo == newColor) return;
_firstAlbedo = newColor;
emit firstAlbedoChanged(newColor);
}
void EmitterObject::setSecondAlbedo(const glm::vec3& newValue) noexcept
{
glm::vec3 newColor = glm::max(newValue, glm::vec3(0.f));
if(_secondAlbedo == newColor) return;
_secondAlbedo = newColor;
emit secondAlbedoChanged(newColor);
}
void EmitterObject::setOpacityRange(const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_opacityRange == newValue) return;
_opacityRange = newValue;
emit opacityRangeChanged(newValue);
}
void EmitterObject::setEmissionColor(const glm::vec3& newValue) noexcept
{
glm::vec3 newColor = glm::max(newValue, glm::vec3(0.f));
if(_emissionColor == newColor) return;
_emissionColor = newColor;
emit emissionColorChanged(newColor);
}
void EmitterObject::setEmissionBrightness(float newValue) noexcept
{
newValue = glm::max(newValue, 0.f);
if(_emissionBrightness == newValue) return;
_emissionBrightness = newValue;
emit emissionBrightnessChanged(newValue);
}
void EmitterObject::setTextureIndex(uint8_t newValue) noexcept
{
if(_textureIndex == newValue) return;
_textureIndex = newValue;
emit textureIndexChanged(newValue);
}
void EmitterObject::setTileIndex(uint8_t newValue) noexcept
{
if(_tileIndex == newValue) return;
_tileIndex = newValue;
emit tileIndexChanged(newValue);
}
void EmitterObject::setLifetimeRange(const mtt::TimeRange& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_lifetimeRange == newValue) return;
_lifetimeRange = newValue;
emit lifetimeRangeChanged(newValue);
}
void EmitterObject::setMassRange(const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_massRange == newValue) return;
_massRange = newValue;
emit massRangeChanged(newValue);
}
void EmitterObject::setFrictionFactorRange(
const mtt::Range<float>& newValue) noexcept
{
if(!newValue.isValid()) return;
if(_frictionFactorRange == newValue) return;
_frictionFactorRange = newValue;
emit frictionFactorRangeChanged(newValue);
}
void EmitterObject::simulationStep(mtt::TimeRange time)
{
if(_intensity <= 0.f) return;
float floatDelta = mtt::toFloatTime(time.length());
float floatParticlesNumber = _intensity * floatDelta;
emitParticles(floatParticlesNumber);
}
glm::vec4 EmitterObject::_getParticlePosition() const noexcept
{
if(_shape == CIRCLE_SHAPE)
{
float angle = glm::pi<float>() * _symmetricalDistribution(_randomEngine);
float radius = sqrt(_displacedDistribution(_randomEngine));
if (_distribution == SMOOTH_DISTRIBUTION)
{
radius = 1.f - sqrt(1.f - radius);
}
radius *= _size / 2.f;
return glm::vec4( sin(angle) * radius,
cos(angle) * radius,
0.f,
1.f);
}
else
{
float angle1 = glm::pi<float>() * _symmetricalDistribution(_randomEngine);
float height = _symmetricalDistribution(_randomEngine);
float angle2 = asin(height);
float radius = pow(_displacedDistribution(_randomEngine), 1.f / 3.f);
if (_distribution == SMOOTH_DISTRIBUTION)
{
radius = 1.f - sqrt(1.f - radius);
}
radius *= _size / 2.f;
return glm::vec4( sin(angle1) * cos(angle2) * radius,
cos(angle1) * cos(angle2) * radius,
height * radius,
1.f);
}
}
glm::vec4 EmitterObject::_getParticleSpeed() const noexcept
{
float angle1 = glm::pi<float>() * _symmetricalDistribution(_randomEngine);
float startZ = cos(_directionAngle / 2.f);
float zValue = glm::mix(startZ, 1.f, _displacedDistribution(_randomEngine));
float angle2 = asin(zValue);
float length = glm::mix(_speedRange.min(),
_speedRange.max(),
_displacedDistribution(_randomEngine));
return glm::vec4( sin(angle1) * cos(angle2) * length,
cos(angle1) * cos(angle2) * length,
zValue * length,
0.f);
}
void EmitterObject::emitParticles(float floatParticlesNumber) noexcept
{
if(!_enabled) return;
size_t particlesNumber = size_t(floatParticlesNumber);
float remainder = floatParticlesNumber - particlesNumber;
if (_displacedDistribution(_randomEngine) < remainder) particlesNumber++;
if (particlesNumber == 0) return;
ParticleField* field = _fieldRef.get();
if(field == nullptr) return;
glm::mat4x4 toField = glm::inverse(field->localToWorldTransform()) *
localToWorldTransform();
float xScale = glm::length(glm::vec3(toField[0]));
float yScale = glm::length(glm::vec3(toField[1]));
float zScale = glm::length(glm::vec3(toField[2]));
float uniformScale = (xScale + yScale + zScale) / 3.f;
std::uniform_int_distribution<mtt::TimeT::rep>
timeDistribution( glm::max(_lifetimeRange.min().count(), 0),
glm::max(_lifetimeRange.max().count(), 0));
for (size_t i = 0; i < particlesNumber; i++)
{
ParticleField::ParticleData newParticle;
newParticle.typeMask = _typeMask;
newParticle.position = toField * _getParticlePosition();
newParticle.speed = toField * _getParticleSpeed();
newParticle.size = glm::mix(_sizeRange.min(),
_sizeRange.max(),
_displacedDistribution(_randomEngine));
newParticle.size *= uniformScale;
newParticle.size = glm::max(newParticle.size, 0.f);
newParticle.rotation = glm::mix(_rotationRange.min(),
_rotationRange.max(),
_displacedDistribution(_randomEngine));
newParticle.rotationSpeed = glm::mix(
_rotationSpeedRange.min(),
_rotationSpeedRange.max(),
_displacedDistribution(_randomEngine));
glm::vec3 albedo = glm::mix(_firstAlbedo,
_secondAlbedo,
_displacedDistribution(_randomEngine));
float opacity = glm::mix( _opacityRange.min(),
_opacityRange.max(),
_displacedDistribution(_randomEngine));
newParticle.albedo = glm::vec4(albedo, opacity);
newParticle.emission = glm::vec4(_emissionColor * _emissionBrightness, 0.f);
newParticle.visibilityFactor = 1.f;
newParticle.textureIndex = _textureIndex;
newParticle.tileIndex = _tileIndex;
newParticle.currentTime = mtt::TimeT(0);
newParticle.maxTime = mtt::TimeT(timeDistribution(_randomEngine));
newParticle.mass = glm::mix(_massRange.min(),
_massRange.max(),
_displacedDistribution(_randomEngine));
newParticle.mass = glm::max(0.f, newParticle.mass);
newParticle.frictionFactor = glm::mix(
_frictionFactorRange.min(),
_frictionFactorRange.max(),
_displacedDistribution(_randomEngine));
newParticle.frictionFactor = glm::max(0.f, newParticle.frictionFactor);
field->addParticle(newParticle);
}
}
| 32.085714 | 80 | 0.664648 | AluminiumRat |
eeafbd7ec7d5309edc6a0a7eec8f79befd5c3a3f | 13,536 | cpp | C++ | lib/src/AMRElliptic/PetscCompGridVTO.cpp | rmrsk/Chombo-3.3 | f2119e396460c1bb19638effd55eb71c2b35119e | [
"BSD-3-Clause-LBNL"
] | 10 | 2018-02-01T20:57:36.000Z | 2022-03-17T02:57:49.000Z | lib/src/AMRElliptic/PetscCompGridVTO.cpp | rmrsk/Chombo-3.3 | f2119e396460c1bb19638effd55eb71c2b35119e | [
"BSD-3-Clause-LBNL"
] | 19 | 2018-10-04T21:37:18.000Z | 2022-02-25T16:20:11.000Z | lib/src/AMRElliptic/PetscCompGridVTO.cpp | rmrsk/Chombo-3.3 | f2119e396460c1bb19638effd55eb71c2b35119e | [
"BSD-3-Clause-LBNL"
] | 11 | 2019-01-12T23:33:32.000Z | 2021-08-09T15:19:50.000Z | #ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#include "PetscCompGridVTO.H"
#include "FluxBox.H"
#include "IntVectSet.H"
#include "NamespaceHeader.H"
// derived ViscousTensor Operator class
#ifdef CH_USE_PETSC
void
PetscCompGridVTO::clean()
{
PetscCompGrid::clean();
}
void
PetscCompGridVTO::createOpStencil(IntVect a_iv, int a_ilev,const DataIndex &a_di, StencilTensor &a_sten)
{
CH_TIME("PetscCompGridVTO::createOpStencil");
Real dx=m_dxs[a_ilev][0],idx2=1./(dx*dx);
Real eta_x0,eta_x1,lam_x0,lam_x1,eta_y0,eta_y1,lam_y0,lam_y1;
IntVect ivwst=IntVect::Zero,ivest=IntVect::Zero,ivsth=IntVect::Zero,ivnth=IntVect::Zero;
//IntVect ivSW(-1,-1),ivSE(1,-1),ivNE(1,1),ivNW(-1,1);
IntVect ivSW(IntVect::Unit),ivSE(IntVect::Unit),ivNE(IntVect::Unit),ivNW(IntVect::Unit);
ivSW[1] = ivSW[0] = -1; // >= 2D
ivSE[1] = -1; // >= 2D
ivNW[0] = -1;
ivwst[0] = -1; ivest[0] = 1; ivsth[1] = -1; ivnth[1] = 1;
{ // get stencil coeficients
Real beta_hinv2=m_beta*idx2;
const FluxBox &etaFab = (*m_eta[a_ilev])[a_di];
const FArrayBox &eta_x = etaFab[0];
const FArrayBox &eta_y = etaFab[1];
const FluxBox &lamFab = (*m_lamb[a_ilev])[a_di];
const FArrayBox &lam_x = lamFab[0];
const FArrayBox &lam_y = lamFab[1];
eta_x0 = beta_hinv2*eta_x(a_iv,0); eta_y0 = beta_hinv2*eta_y(a_iv,0);
eta_x1 = beta_hinv2*eta_x(ivest+a_iv,0); eta_y1 = beta_hinv2*eta_y(ivnth+a_iv,0);
lam_x0 = beta_hinv2*lam_x(a_iv,0); lam_y0 = beta_hinv2*lam_y(a_iv,0);
lam_x1 = beta_hinv2*lam_x(ivest+a_iv,0); lam_y1 = beta_hinv2*lam_y(ivnth+a_iv,0);
}
// loop over two equations, should probably just hard wire this
for (int kk=0,vv=1;kk<2;kk++,vv--)
{
Real vd;
// add one eta everywhere -- same for u and v
vd = eta_x0;
{
StencilTensorValue &v1 = a_sten[IndexML(ivwst+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = eta_x1;
{
StencilTensorValue &v1 = a_sten[IndexML(ivest+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = eta_y0;
{
StencilTensorValue &v1 = a_sten[IndexML(ivsth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = eta_y1;
{
StencilTensorValue &v1 = a_sten[IndexML(ivnth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = -(eta_x0 + eta_y0 + eta_x1 + eta_y1);
{
StencilTensorValue &v1 = a_sten[IndexML(a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
// add extra eta and the lambda for each direction
if (kk==0)
{
vd = eta_x0 + lam_x0;
{
StencilTensorValue &v1 = a_sten[IndexML(ivwst+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = eta_x1 + lam_x1;
{
StencilTensorValue &v1 = a_sten[IndexML(ivest+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = -(eta_x0 + eta_x1 + lam_x0 + lam_x1);
{
StencilTensorValue &v1 = a_sten[IndexML(a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
}
else {
vd = eta_y0 + lam_y0;
{
StencilTensorValue &v1 = a_sten[IndexML(ivsth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = eta_y1 + lam_y1;
{
StencilTensorValue &v1 = a_sten[IndexML(ivnth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
vd = -(eta_y0 + eta_y1 + lam_y0 + lam_y1);
{
StencilTensorValue &v1 = a_sten[IndexML(a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
}
// u -- v coupling terms -- 8 point stencil
// S
if (kk==0) vd = 0.25*(-lam_x1 + lam_x0);
else vd = 0.25*(-eta_x1 + eta_x0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivsth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// S.W.
if (kk==0) vd = 0.25*(eta_y0 + lam_x0);
else vd = 0.25*(eta_x0 + lam_y0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivSW+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// S.E.
if (kk==0) vd = 0.25*(-lam_x1 - eta_y0);
else vd = 0.25*(-lam_y0 - eta_x1);
{
StencilTensorValue &v1 = a_sten[IndexML(ivSE+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// W
if (kk==0) vd = 0.25*(-eta_y1 + eta_y0);
else vd = 0.25*(-lam_y1 + lam_y0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivwst+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// E
if (kk==0) vd = 0.25*(eta_y1 - eta_y0);
else vd = 0.25*(lam_y1 - lam_y0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivest+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// N.W.
if (kk==0) vd = 0.25*(-lam_x0 - eta_y1);
else vd = 0.25*(-lam_y1 - eta_x0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivNW+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// N
if (kk==0) vd = 0.25*(lam_x1 - lam_x0);
else vd = 0.25*(eta_x1 - eta_x0);
{
StencilTensorValue &v1 = a_sten[IndexML(ivnth+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// N.E.
if (kk==0) vd = 0.25*(eta_y1 + lam_x1);
else vd = 0.25*(eta_x1 + lam_y1);
{
StencilTensorValue &v1 = a_sten[IndexML(ivNE+a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,vv,vd);
}
// diagonal alpha term
vd = m_alpha * (!(m_a[a_ilev]) ? 1. : (*m_a[a_ilev])[a_di](a_iv,0));
{
StencilTensorValue &v1 = a_sten[IndexML(a_iv,a_ilev)]; v1.define(CH_SPACEDIM);
v1.addValue(kk,kk,vd);
}
} // kk=1:2 loop
if (0)
{
Real summ=0.;
StencilTensor::const_iterator end = a_sten.end();
for ( StencilTensor::const_iterator it = a_sten.begin(); it != end; ++it) {
for (int i=0; i<CH_SPACEDIM; ++i)
{
for (int j=0; j<CH_SPACEDIM; ++j)
{
summ += it->second.value(i,j);
}
}
}
if (abs(summ)>1.e-10)
{
for (StencilTensor::const_iterator it = a_sten.begin(); it != end; ++it) {
pout() << it->first << " ERROR: \n";
for (int i=0; i<CH_SPACEDIM; ++i)
{
pout() << "\t\t";
for (int j=0; j<CH_SPACEDIM; ++j)
{
pout() << it->second.value(i,j) << ", ";
}
pout() << endl;
}
}
pout() << "\t ERROR summ: " << summ << endl;
}
}
}
// clean out BC from stencil of cell a_iv
void
PetscCompGridVTO::applyBCs( IntVect a_iv, int a_ilev, const DataIndex &di_dummy, Box a_dombox,
StencilTensor &a_sten )
{
CH_TIME("PetscCompGridVTO::applyBCs");
Vector<Vector<StencilNode> > new_vals; // StencilTensorValue
RefCountedPtr<BCFunction> bc = m_bc.getBCFunction();
CompGridVTOBC *mybc = dynamic_cast<CompGridVTOBC*>(&(*bc));
// count degrees, add to 'corners'
Vector<IntVectSet> corners(CH_SPACEDIM);
StencilTensor::const_iterator end2 = a_sten.end();
for (StencilTensor::const_iterator it = a_sten.begin(); it != end2; ++it)
{
const IntVect &jiv = it->first.iv();
if (!a_dombox.contains(jiv) && it->first.level()==a_ilev) // a BC
{
int degree = CH_SPACEDIM-1;
for (int dir=0;dir<CH_SPACEDIM;++dir)
{
if (jiv[dir] >= a_dombox.smallEnd(dir) && jiv[dir] <= a_dombox.bigEnd(dir)) degree--;
}
CH_assert(degree>=0);
corners[degree] |= jiv;
}
}
// move ghosts starting at with high degree corners and cascade to lower degree
for (int ideg=CH_SPACEDIM-1;ideg>=0;ideg--)
{
// iterate through list
for (IVSIterator ivit(corners[ideg]); ivit.ok(); ++ivit)
{
const IntVect &jiv = ivit(); // get rid of this bc ghost
// get layer of ghost
Box gbox(IntVect::Zero,IntVect::Zero); gbox.shift(jiv);
Box inter = a_dombox & gbox; CH_assert(inter.numPts()==0);
int igid = -1; // find which layer of ghost I am
do{
igid++;
gbox.grow(1);
inter = a_dombox & gbox;
}while (inter.numPts()==0);
if (igid!=0) MayDay::Error("PetscCompGridVTO::applyBCs layer???");
for (int dir=0;dir<CH_SPACEDIM;++dir)
{
if (jiv[dir] < a_dombox.smallEnd(dir) || jiv[dir] > a_dombox.bigEnd(dir))
{ // have a BC, get coefs on demand
int iside = 1; // hi
int isign = 1;
if (jiv[dir] < a_dombox.smallEnd(dir)) isign = -1;
if (jiv[dir] < a_dombox.smallEnd(dir)) iside = 0; // lo
if (!mybc) MayDay::Error("PetscCompGridVTO::applyBCs: wrong BC!!!!");
new_vals.resize(1);
new_vals[0].resize(1);
//new_vals[i][j].second.setValue(mybc->getCoef(j,i));
for (int comp=0; comp<SpaceDim; comp++)
{
new_vals[0][0].second.define(1);
if (mybc->m_bcDiri[dir][iside][comp]) new_vals[0][0].second.setValue(comp,comp,-1.); // simple diagonal
else new_vals[0][0].second.setValue(comp,comp,1.);
} // end loop over components
new_vals[0][0].first.setLevel(a_ilev);
IndexML kill(jiv,a_ilev);
IntVect biv = jiv;
biv.shift(dir,-isign*(igid+1));
new_vals[igid][0].first.setIV(biv);
if (ideg>0 && !a_dombox.contains(biv)) // this could be a new stencil value for high order BCs
{
corners[ideg-1] |= biv; // send down to lower list for later removal
}
else CH_assert(a_dombox.contains(biv));
StencilProject(kill,new_vals[igid],a_sten);
int nrm = a_sten.erase(kill); CH_assert(nrm==1);
break;
} // BC
} // spacedim
} // ghosts
} // degree
}
#endif // ifdef petsc
// CompGridVTOBC
void
CompGridVTOBC::createCoefs()
{
m_isDefined=true;
// is this needed ?
m_Rcoefs[0] = -1.;
}
//
void
CompGridVTOBC::operator()( FArrayBox& a_state,
const Box& a_valid,
const ProblemDomain& a_domain,
Real a_dx,
bool a_homogeneous)
{
const Box& domainBox = a_domain.domainBox();
for (int idir = 0; idir < SpaceDim; idir++)
{
if (!a_domain.isPeriodic(idir))
{
for (SideIterator sit; sit.ok(); ++sit)
{
Side::LoHiSide side = sit();
if (a_valid.sideEnd(side)[idir] == domainBox.sideEnd(side)[idir])
{
// Dirichlet BC
int isign = sign(side);
Box toRegion = adjCellBox(a_valid, idir, side, 1);
// include corner cells if possible by growing toRegion in transverse direction
toRegion.grow(1);
toRegion.grow(idir, -1);
toRegion &= a_state.box();
for (BoxIterator bit(toRegion); bit.ok(); ++bit)
{
IntVect ivTo = bit();
IntVect ivClose = ivTo - isign*BASISV(idir);
for (int ighost=0;ighost<m_nGhosts[0];ighost++,ivTo += isign*BASISV(idir))
{
//for (int icomp = 0; icomp < a_state.nComp(); icomp++) a_state(ivTo, icomp) = 0.0;
IntVect ivFrom = ivClose;
// hardwire to linear BCs for now
for (int icomp = 0; icomp < a_state.nComp() ; icomp++)
{
if (m_bcDiri[idir][side][icomp])
{
a_state(ivTo, icomp) = (-1.0)*a_state(ivFrom, icomp);
}
else
{
a_state(ivTo, icomp) = (1.0)*a_state(ivFrom, icomp);
}
}
}
} // end loop over cells
} // if ends match
} // end loop over sides
} // if not periodic in this direction
} // end loop over directions
}
#include "NamespaceFooter.H"
#ifdef CH_USE_PETSC
#endif
| 36.192513 | 126 | 0.507018 | rmrsk |
eeb4c7525e77153e9597c4d9737d1b6da2e99324 | 9,657 | hpp | C++ | src/cola/parser/AstBuilder.hpp | Wolff09/seal | c0560204743d1c5f602cfc206ffac32531ea2c06 | [
"MIT"
] | 7 | 2019-10-18T07:24:13.000Z | 2022-01-07T14:01:17.000Z | src/cola/parser/AstBuilder.hpp | Wolff09/seal | c0560204743d1c5f602cfc206ffac32531ea2c06 | [
"MIT"
] | null | null | null | src/cola/parser/AstBuilder.hpp | Wolff09/seal | c0560204743d1c5f602cfc206ffac32531ea2c06 | [
"MIT"
] | 1 | 2019-11-30T01:45:41.000Z | 2019-11-30T01:45:41.000Z | #pragma once
#include <memory>
#include <deque>
#include <unordered_map>
// TODO: import string
#include "antlr4-runtime.h"
#include "CoLaVisitor.h"
#include "cola/ast.hpp"
namespace cola {
class AstBuilder : public cola::CoLaVisitor { // TODO: should this be a private subclass to avoid misuse?
private:
const std::string INIT_NAME = "init";
enum struct Modifier { NONE, INLINE, EXTERN };
enum struct ExprForm { NOPTR, PTR, DEREF, NESTED };
struct ExprTrans {
ExprForm form;
std::vector<Statement*> helper;
Expression* expr;
std::size_t num_shared;
ExprTrans() {}
ExprTrans(ExprForm form, Expression* expr) : form(form), expr(expr), num_shared(0) {}
ExprTrans(ExprForm form, Expression* expr, std::size_t num_shared) : form(form), expr(expr), num_shared(num_shared) {}
};
using TypeMap = std::unordered_map<std::string, std::reference_wrapper<const Type>>;
using VariableMap = std::unordered_map<std::string, std::unique_ptr<VariableDeclaration>>;
using FunctionMap = std::unordered_map<std::string, Function&>;
using ArgDeclList = std::vector<std::pair<std::string, std::string>>;
std::shared_ptr<Program> _program = nullptr;
std::deque<VariableMap> _scope;
TypeMap _types;
FunctionMap _functions;
bool _inside_loop = false;
std::unique_ptr<Invariant> _cmdInvariant;
const Function* _currentFunction;
void pushScope();
std::vector<std::unique_ptr<VariableDeclaration>> popScope();
void addVariable(std::unique_ptr<VariableDeclaration> variable);
bool isVariableDeclared(std::string variableName);
const VariableDeclaration& lookupVariable(std::string variableName);
bool isTypeDeclared(std::string typeName);
const Type& lookupType(std::string typeName);
std::unique_ptr<Statement> mk_stmt_from_list(std::vector<cola::CoLaParser::StatementContext*> stmts);
std::unique_ptr<Statement> mk_stmt_from_list(std::vector<Statement*> stmts); // claims ownership of stmts
Statement* as_command(Statement* stmt, AnnotatedStatement* cmd);
Statement* as_command(AnnotatedStatement* stmt) { return as_command(stmt, stmt); }
public:
static std::shared_ptr<Program> buildFrom(cola::CoLaParser::ProgramContext* parseTree);
antlrcpp::Any visitProgram(cola::CoLaParser::ProgramContext* context) override;
antlrcpp::Any visitStruct_decl(cola::CoLaParser::Struct_declContext* context) override;
antlrcpp::Any visitNameVoid(cola::CoLaParser::NameVoidContext* context) override;
antlrcpp::Any visitNameBool(cola::CoLaParser::NameBoolContext* context) override;
antlrcpp::Any visitNameInt(cola::CoLaParser::NameIntContext* context) override;
antlrcpp::Any visitNameData(cola::CoLaParser::NameDataContext* context) override;
antlrcpp::Any visitNameIdentifier(cola::CoLaParser::NameIdentifierContext* context) override;
antlrcpp::Any visitTypeValue(cola::CoLaParser::TypeValueContext* context) override;
antlrcpp::Any visitTypePointer(cola::CoLaParser::TypePointerContext* context) override;
antlrcpp::Any visitField_decl(cola::CoLaParser::Field_declContext* context) override;
antlrcpp::Any visitVar_decl(cola::CoLaParser::Var_declContext* context) override;
antlrcpp::Any visitFunction(cola::CoLaParser::FunctionContext* context) override;
antlrcpp::Any visitArgDeclList(cola::CoLaParser::ArgDeclListContext *context) override;
antlrcpp::Any visitBlockStmt(cola::CoLaParser::BlockStmtContext* context) override;
antlrcpp::Any visitBlockScope(cola::CoLaParser::BlockScopeContext* context) override;
antlrcpp::Any visitScope(cola::CoLaParser::ScopeContext* context) override;
antlrcpp::Any visitStmtIf(cola::CoLaParser::StmtIfContext* context) override;
antlrcpp::Any visitStmtWhile(cola::CoLaParser::StmtWhileContext* context) override;
antlrcpp::Any visitStmtDo(cola::CoLaParser::StmtDoContext* context) override;
antlrcpp::Any visitStmtChoose(cola::CoLaParser::StmtChooseContext* context) override;
antlrcpp::Any visitStmtLoop(cola::CoLaParser::StmtLoopContext* context) override;
antlrcpp::Any visitStmtAtomic(cola::CoLaParser::StmtAtomicContext* context) override;
antlrcpp::Any visitStmtCom(cola::CoLaParser::StmtComContext* context) override;
antlrcpp::Any visitAnnotation(cola::CoLaParser::AnnotationContext* context) override;
antlrcpp::Any visitCmdSkip(cola::CoLaParser::CmdSkipContext* context) override;
antlrcpp::Any visitCmdAssign(cola::CoLaParser::CmdAssignContext* context) override;
antlrcpp::Any visitCmdMalloc(cola::CoLaParser::CmdMallocContext* context) override;
antlrcpp::Any visitCmdAssume(cola::CoLaParser::CmdAssumeContext* context) override;
antlrcpp::Any visitCmdAssert(cola::CoLaParser::CmdAssertContext* context) override;
antlrcpp::Any visitCmdAngel(cola::CoLaParser::CmdAngelContext* context) override;
antlrcpp::Any visitCmdCall(cola::CoLaParser::CmdCallContext* context) override;
antlrcpp::Any visitCmdContinue(cola::CoLaParser::CmdContinueContext* context) override;
antlrcpp::Any visitCmdBreak(cola::CoLaParser::CmdBreakContext* context) override;
antlrcpp::Any visitCmdReturn(cola::CoLaParser::CmdReturnContext* context) override;
antlrcpp::Any visitCmdCas(cola::CoLaParser::CmdCasContext* context) override;
antlrcpp::Any visitArgList(cola::CoLaParser::ArgListContext* context) override;
antlrcpp::Any visitCas(cola::CoLaParser::CasContext* context) override;
antlrcpp::Any visitOpEq(cola::CoLaParser::OpEqContext* context) override;
antlrcpp::Any visitOpNeq(cola::CoLaParser::OpNeqContext* context) override;
antlrcpp::Any visitOpLt(cola::CoLaParser::OpLtContext* context) override;
antlrcpp::Any visitOpLte(cola::CoLaParser::OpLteContext* context) override;
antlrcpp::Any visitOpGt(cola::CoLaParser::OpGtContext* context) override;
antlrcpp::Any visitOpGte(cola::CoLaParser::OpGteContext* context) override;
antlrcpp::Any visitOpAnd(cola::CoLaParser::OpAndContext* context) override;
antlrcpp::Any visitOpOr(cola::CoLaParser::OpOrContext* context) override;
antlrcpp::Any visitValueNull(cola::CoLaParser::ValueNullContext* context) override;
antlrcpp::Any visitValueTrue(cola::CoLaParser::ValueTrueContext* context) override;
antlrcpp::Any visitValueFalse(cola::CoLaParser::ValueFalseContext* context) override;
antlrcpp::Any visitValueNDet(cola::CoLaParser::ValueNDetContext* context) override;
antlrcpp::Any visitValueEmpty(cola::CoLaParser::ValueEmptyContext* context) override;
antlrcpp::Any visitValueMin(cola::CoLaParser::ValueMinContext* context) override;
antlrcpp::Any visitValueMax(cola::CoLaParser::ValueMaxContext* context) override;
antlrcpp::Any visitExprValue(cola::CoLaParser::ExprValueContext* context) override;
antlrcpp::Any visitExprBinary(cola::CoLaParser::ExprBinaryContext* context) override;
antlrcpp::Any visitExprIdentifier(cola::CoLaParser::ExprIdentifierContext* context) override;
antlrcpp::Any visitExprParens(cola::CoLaParser::ExprParensContext* context) override;
antlrcpp::Any visitExprDeref(cola::CoLaParser::ExprDerefContext* context) override;
antlrcpp::Any visitExprCas(cola::CoLaParser::ExprCasContext* context) override;
antlrcpp::Any visitExprNegation(cola::CoLaParser::ExprNegationContext* context) override;
antlrcpp::Any visitInvExpr(cola::CoLaParser::InvExprContext* context) override;
antlrcpp::Any visitInvActive(cola::CoLaParser::InvActiveContext* context) override;
antlrcpp::Any visitAngelChoose(cola::CoLaParser::AngelChooseContext* context) override;
antlrcpp::Any visitAngelActive(cola::CoLaParser::AngelActiveContext* context) override;
antlrcpp::Any visitAngelChooseActive(cola::CoLaParser::AngelChooseActiveContext* context) override;
antlrcpp::Any visitAngelContains(cola::CoLaParser::AngelContainsContext* context) override;
antlrcpp::Any visitOption(cola::CoLaParser::OptionContext* context) override;
antlrcpp::Any visitObserverList(cola::CoLaParser::ObserverListContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverDefinition(cola::CoLaParser::ObserverDefinitionContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverVariableList(cola::CoLaParser::ObserverVariableListContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverVariable(cola::CoLaParser::ObserverVariableContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverStateList(cola::CoLaParser::ObserverStateListContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverState(cola::CoLaParser::ObserverStateContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverTransitionList(cola::CoLaParser::ObserverTransitionListContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverTransition(cola::CoLaParser::ObserverTransitionContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverGuardTrue(cola::CoLaParser::ObserverGuardTrueContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverGuardIdentifierEq(cola::CoLaParser::ObserverGuardIdentifierEqContext* /*context*/) override { throw std::logic_error("not implemented"); }
antlrcpp::Any visitObserverGuardIdentifierNeq(cola::CoLaParser::ObserverGuardIdentifierNeqContext* /*context*/) override { throw std::logic_error("not implemented"); }
};
} // namespace cola
| 68.007042 | 170 | 0.780988 | Wolff09 |
eebe45928db19e68e33f304681ba250d82f9c2fb | 2,280 | cpp | C++ | exercises/Perception-Driven_Manipulation/solution_ws/src/collision_avoidance_pick_and_place/src/tasks/detect_box_pick.cpp | JonathanPlasse/industrial_training | 2de2ecbc8d1f7d2b4b724cc6badd003ca2d653d7 | [
"Apache-2.0"
] | 324 | 2015-01-31T07:35:37.000Z | 2022-03-27T09:30:14.000Z | exercises/Perception-Driven_Manipulation/ros1/solution_ws/src/collision_avoidance_pick_and_place/src/tasks/detect_box_pick.cpp | AhmedMounir/industrial_training | e6761c7bee65d3802fee6cf7c99e3113d3dc1af2 | [
"Apache-2.0"
] | 226 | 2015-01-20T17:15:56.000Z | 2022-01-19T04:55:23.000Z | exercises/Perception-Driven_Manipulation/ros1/solution_ws/src/collision_avoidance_pick_and_place/src/tasks/detect_box_pick.cpp | AhmedMounir/industrial_training | e6761c7bee65d3802fee6cf7c99e3113d3dc1af2 | [
"Apache-2.0"
] | 219 | 2015-03-29T03:05:11.000Z | 2022-03-23T11:12:43.000Z | #include <collision_avoidance_pick_and_place/pick_and_place.h>
/* DETECTING BOX PICK POSE
Goal:
- Find the box's position in the world frame using the transform listener.
* this transform is published by the kinect AR-tag perception node
- Save the pose into 'box_pose'.
*/
geometry_msgs::Pose collision_avoidance_pick_and_place::PickAndPlace::detect_box_pick()
{
//ROS_ERROR_STREAM("detect_box_pick is not implemented yet. Aborting."); exit(1);
// creating shape for recognition
shape_msgs::SolidPrimitive shape;
shape.type = shape_msgs::SolidPrimitive::BOX;
shape.dimensions.resize(3);
shape.dimensions[0] = cfg.BOX_SIZE.getX();
shape.dimensions[1] = cfg.BOX_SIZE.getY();
shape.dimensions[2] = cfg.BOX_SIZE.getZ();
// creating request object
collision_avoidance_pick_and_place::GetTargetPose srv;
srv.request.shape = shape;
srv.request.world_frame_id = cfg.WORLD_FRAME_ID;
srv.request.ar_tag_frame_id = cfg.AR_TAG_FRAME_ID;
geometry_msgs::Pose place_pose;
tf::poseTFToMsg(cfg.BOX_PLACE_TF,place_pose);
srv.request.remove_at_poses.push_back(place_pose);
/* Fill Code:
* Goal:
* - Call target recognition service and save results.
* Hint:
* - Use the service response member to access the
* detected pose "srv.response.target_pose".
* - Assign the target_pose in the response to the box_pose variable in
* order to save the results.
*/
geometry_msgs::Pose box_pose;
if(target_recognition_client.call(srv))
{
if(srv.response.succeeded)
{
box_pose = srv.response.target_pose;
ROS_INFO_STREAM("target recognition succeeded");
}
else
{
ROS_ERROR_STREAM("target recognition failed");
exit(0);
}
}
else
{
ROS_ERROR_STREAM("Service call for target recognition failed with response '"<<
(srv.response.succeeded ?"SUCCESS":"FAILURE")
<<"', exiting");
exit(0);
}
// updating box marker for visualization in rviz
visualization_msgs::Marker marker = cfg.MARKER_MESSAGE;
cfg.MARKER_MESSAGE.header.frame_id = cfg.WORLD_FRAME_ID;
cfg.MARKER_MESSAGE.pose = box_pose;
cfg.MARKER_MESSAGE.pose.position.z = box_pose.position.z - 0.5f*cfg.BOX_SIZE.z();
show_box(true);
return box_pose;
}
| 31.232877 | 87 | 0.710965 | JonathanPlasse |
eec0672afc0d69351a2c4dff6f4edaed157d62e5 | 4,490 | hpp | C++ | include/ensmallen_bits/scd/scd_impl.hpp | ElianeBriand/ensmallen | 0f634056d054d100b2a70cb8f15ea9fa38680d10 | [
"BSL-1.0",
"BSD-3-Clause"
] | 1 | 2020-04-07T18:50:10.000Z | 2020-04-07T18:50:10.000Z | include/ensmallen_bits/scd/scd_impl.hpp | ElianeBriand/ensmallen | 0f634056d054d100b2a70cb8f15ea9fa38680d10 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | include/ensmallen_bits/scd/scd_impl.hpp | ElianeBriand/ensmallen | 0f634056d054d100b2a70cb8f15ea9fa38680d10 | [
"BSL-1.0",
"BSD-3-Clause"
] | 1 | 2019-01-16T16:21:59.000Z | 2019-01-16T16:21:59.000Z | /**
* @file scd_impl.hpp
* @author Shikhar Bhardwaj
*
* Implementation of stochastic coordinate descent.
*
* ensmallen is free software; you may redistribute it and/or modify it under
* the terms of the 3-clause BSD license. You should have received a copy of
* the 3-clause BSD license along with ensmallen. If not, see
* http://www.opensource.org/licenses/BSD-3-Clause for more information.
*/
#ifndef ENSMALLEN_SCD_SCD_IMPL_HPP
#define ENSMALLEN_SCD_SCD_IMPL_HPP
// In case it hasn't been included yet.
#include "scd.hpp"
#include <ensmallen_bits/function.hpp>
namespace ens {
template <typename DescentPolicyType>
SCD<DescentPolicyType>::SCD(
const double stepSize,
const size_t maxIterations,
const double tolerance,
const size_t updateInterval,
const DescentPolicyType descentPolicy) :
stepSize(stepSize),
maxIterations(maxIterations),
tolerance(tolerance),
updateInterval(updateInterval),
descentPolicy(descentPolicy)
{ /* Nothing to do */ }
//! Optimize the function (minimize).
template <typename DescentPolicyType>
template <typename ResolvableFunctionType,
typename MatType,
typename GradType,
typename... CallbackTypes>
typename std::enable_if<IsArmaType<GradType>::value,
typename MatType::elem_type>::type
SCD<DescentPolicyType>::Optimize(
ResolvableFunctionType& function,
MatType& iterateIn,
CallbackTypes&&... callbacks)
{
// Convenience typedefs.
typedef typename MatType::elem_type ElemType;
typedef typename MatTypeTraits<MatType>::BaseMatType BaseMatType;
typedef typename MatTypeTraits<GradType>::BaseMatType BaseGradType;
// Make sure we have the methods that we need.
traits::CheckResolvableFunctionTypeAPI<ResolvableFunctionType, BaseMatType,
BaseGradType>();
RequireFloatingPointType<BaseMatType>();
RequireFloatingPointType<BaseGradType>();
ElemType overallObjective = 0;
ElemType lastObjective = std::numeric_limits<ElemType>::max();
BaseMatType& iterate = (BaseMatType&) iterateIn;
BaseGradType gradient;
// Controls early termination of the optimization process.
bool terminate = false;
// Start iterating.
terminate |= Callback::BeginOptimization(*this, function, iterate,
callbacks...);
for (size_t i = 1; i != maxIterations && !terminate; ++i)
{
// Get the coordinate to descend on.
size_t featureIdx = descentPolicy.template DescentFeature<
ResolvableFunctionType, BaseMatType, BaseGradType>(i, iterate,
function);
// Get the partial gradient with respect to this feature.
function.PartialGradient(iterate, featureIdx, gradient);
terminate |= Callback::Gradient(*this, function, iterate, overallObjective,
gradient, callbacks...);
// Update the decision variable with the partial gradient.
iterate.col(featureIdx) -= stepSize * gradient.col(featureIdx);
terminate |= Callback::StepTaken(*this, function, iterate, callbacks...);
// Check for convergence.
if (i % updateInterval == 0)
{
overallObjective = function.Evaluate(iterate);
terminate |= Callback::Evaluate(*this, function, iterate,
overallObjective, callbacks...);
// Output current objective function.
Info << "SCD: iteration " << i << ", objective " << overallObjective
<< "." << std::endl;
if (std::isnan(overallObjective) || std::isinf(overallObjective))
{
Warn << "SCD: converged to " << overallObjective << "; terminating"
<< " with failure. Try a smaller step size?" << std::endl;
Callback::EndOptimization(*this, function, iterate, callbacks...);
return overallObjective;
}
if (std::abs(lastObjective - overallObjective) < tolerance)
{
Info << "SCD: minimized within tolerance " << tolerance << "; "
<< "terminating optimization." << std::endl;
Callback::EndOptimization(*this, function, iterate, callbacks...);
return overallObjective;
}
lastObjective = overallObjective;
}
}
Info << "SCD: maximum iterations (" << maxIterations << ") reached; "
<< "terminating optimization." << std::endl;
// Calculate and return final objective.
const ElemType objective = function.Evaluate(iterate);
Callback::Evaluate(*this, function, iterate, objective, callbacks...);
Callback::EndOptimization(*this, function, iterate, callbacks...);
return objective;
}
} // namespace ens
#endif
| 33.014706 | 79 | 0.69755 | ElianeBriand |
eec071a2cbddfd37d6f8b4116d2e6ad8fd4b5f75 | 15,143 | cpp | C++ | adaptors/emscripten/egl-implementation-emscripten.cpp | pwisbey/dali-adaptor | 21d5e77316e53285fa1e210a93b13cf9889e3b54 | [
"Apache-2.0"
] | null | null | null | adaptors/emscripten/egl-implementation-emscripten.cpp | pwisbey/dali-adaptor | 21d5e77316e53285fa1e210a93b13cf9889e3b54 | [
"Apache-2.0"
] | null | null | null | adaptors/emscripten/egl-implementation-emscripten.cpp | pwisbey/dali-adaptor | 21d5e77316e53285fa1e210a93b13cf9889e3b54 | [
"Apache-2.0"
] | null | null | null | /*
Copyright (c) 2000-2013 Samsung Electronics Co., Ltd All Rights Reserved
This file is part of Dali Adaptor
PROPRIETARY/CONFIDENTIAL
This software is the confidential and proprietary information of
SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement you entered
into with SAMSUNG ELECTRONICS.
SAMSUNG make no representations or warranties about the suitability
of the software, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a particular
purpose, or non-infringement. SAMSUNG shall not be liable for any
damages suffered by licensee as a result of using, modifying or
distributing this software or its derivatives.
*/
// CLASS HEADER
#include <gl/egl-implementation.h>
// EXTERNAL INCLUDES
#include <iostream>
#include <dali/integration-api/debug.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/dali-vector.h>
// INTERNAL INCLUDES
namespace
{
#if defined(DEBUG_ENABLED)
void PrintConfigs(EGLDisplay d)
{
EGLint numConfigs;
eglGetConfigs(d, NULL, 0, &numConfigs);
EGLConfig *configs = new EGLConfig[numConfigs];
eglGetConfigs(d, configs, numConfigs, &numConfigs);
printf("Configurations: N=%d\n", numConfigs);
printf(" - config id\n");
printf(" - buffer size\n");
printf(" - level\n");
printf(" - double buffer\n");
printf(" - stereo\n");
printf(" - r, g, b\n");
printf(" - depth\n");
printf(" - stencil\n");
printf(" bf lv d st colorbuffer dp st supported \n");
printf(" id sz l b ro r g b a th cl surfaces \n");
printf("----------------------------------------------\n");
for (EGLint i = 0; i < numConfigs; i++) {
EGLint id, size, level;
EGLint red, green, blue, alpha;
EGLint depth, stencil;
EGLint surfaces;
EGLint doubleBuf = 1, stereo = 0;
char surfString[100] = "";
eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
if (surfaces & EGL_WINDOW_BIT)
strcat(surfString, "win,");
if (surfaces & EGL_PBUFFER_BIT)
strcat(surfString, "pb,");
if (surfaces & EGL_PIXMAP_BIT)
strcat(surfString, "pix,");
if (strlen(surfString) > 0)
surfString[strlen(surfString) - 1] = 0;
printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n",
id, size, level,
doubleBuf ? 'y' : '.',
stereo ? 'y' : '.',
red, green, blue, alpha,
depth, stencil, surfString);
}
delete [] configs;
}
#endif
} // namespace anon
namespace Dali
{
namespace Internal
{
namespace Adaptor
{
#define TEST_EGL_ERROR(lastCommand) \
{ \
EGLint err = eglGetError(); \
if (err != EGL_SUCCESS) \
{ \
printf("EGL error after %s code=%x\n", lastCommand, err); \
DALI_LOG_ERROR("EGL error after %s code=%x\n", lastCommand,err); \
DALI_ASSERT_ALWAYS(0 && "EGL error"); \
} \
}
EglImplementation::EglImplementation()
: mEglNativeDisplay(0),
mCurrentEglNativePixmap(0),
mEglDisplay(0),
mEglConfig(0),
mEglContext(0),
mCurrentEglSurface(0),
mGlesInitialized(false),
mIsOwnSurface(true),
mContextCurrent(false),
mIsWindow(true),
mColorDepth(COLOR_DEPTH_24)
{
}
EglImplementation::~EglImplementation()
{
TerminateGles();
}
bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwnSurface )
{
if ( !mGlesInitialized )
{
mEglNativeDisplay = display;
//@todo see if we can just EGL_DEFAULT_DISPLAY instead
mEglDisplay = eglGetDisplay(mEglNativeDisplay);
EGLint majorVersion = 0;
EGLint minorVersion = 0;
if ( !eglInitialize( mEglDisplay, &majorVersion, &minorVersion ) )
{
return false;
}
eglBindAPI(EGL_OPENGL_ES_API);
#if defined(DEBUG_ENABLED)
PrintConfigs(mEglDisplay);
#endif
mContextAttribs.Clear();
#if DALI_GLES_VERSION >= 30
mContextAttribs.Reserve(5);
mContextAttribs.PushBack( EGL_CONTEXT_MAJOR_VERSION_KHR );
mContextAttribs.PushBack( 3 );
mContextAttribs.PushBack( EGL_CONTEXT_MINOR_VERSION_KHR );
mContextAttribs.PushBack( 0 );
#else // DALI_GLES_VERSION >= 30
mContextAttribs.Reserve(3);
mContextAttribs.PushBack( EGL_CONTEXT_CLIENT_VERSION );
mContextAttribs.PushBack( 2 );
#endif // DALI_GLES_VERSION >= 30
mContextAttribs.PushBack( EGL_NONE );
mGlesInitialized = true;
mIsOwnSurface = isOwnSurface;
}
return mGlesInitialized;
}
bool EglImplementation::CreateContext()
{
// make sure a context isn't created twice
DALI_ASSERT_ALWAYS( (mEglContext == 0) && "EGL context recreated" );
DALI_ASSERT_ALWAYS( mGlesInitialized );
mEglContext = eglCreateContext(mEglDisplay, mEglConfig, NULL, &(mContextAttribs[0]));
// if emscripten ignore this (egl spec says non gles2 implementation must return EGL_BAD_MATCH if it doesnt support gles2)
// so just ignore error for now....
// TEST_EGL_ERROR("eglCreateContext render thread");
// DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != mEglContext && "EGL context not created" );
return true;
}
void EglImplementation::DestroyContext()
{
DALI_ASSERT_ALWAYS( mEglContext && "no EGL context" );
eglDestroyContext( mEglDisplay, mEglContext );
mEglContext = 0;
}
void EglImplementation::DestroySurface()
{
if(mIsOwnSurface && mCurrentEglSurface)
{
eglDestroySurface( mEglDisplay, mCurrentEglSurface );
mCurrentEglSurface = 0;
}
}
void EglImplementation::MakeContextCurrent()
{
mContextCurrent = true;
if(mIsOwnSurface)
{
eglMakeCurrent( mEglDisplay, mCurrentEglSurface, mCurrentEglSurface, mEglContext );
}
EGLint error = eglGetError();
if ( error != EGL_SUCCESS )
{
switch (error)
{
case EGL_BAD_DISPLAY:
{
DALI_LOG_ERROR("EGL_BAD_DISPLAY : Display is not an EGL display connection\n");
break;
}
case EGL_NOT_INITIALIZED:
{
DALI_LOG_ERROR("EGL_NOT_INITIALIZED : Display has not been initialized\n");
break;
}
case EGL_BAD_SURFACE:
{
DALI_LOG_ERROR("EGL_BAD_SURFACE : Draw or read is not an EGL surface\n");
break;
}
case EGL_BAD_CONTEXT:
{
DALI_LOG_ERROR("EGL_BAD_CONTEXT : Context is not an EGL rendering context\n");
break;
}
case EGL_BAD_MATCH:
{
DALI_LOG_ERROR("EGL_BAD_MATCH : Draw or read are not compatible with context, or if context is set to EGL_NO_CONTEXT and draw or read are not set to EGL_NO_SURFACE, or if draw or read are set to EGL_NO_SURFACE and context is not set to EGL_NO_CONTEXT\n");
break;
}
case EGL_BAD_ACCESS:
{
DALI_LOG_ERROR("EGL_BAD_ACCESS : Context is current to some other thread\n");
break;
}
case EGL_BAD_NATIVE_PIXMAP:
{
DALI_LOG_ERROR("EGL_BAD_NATIVE_PIXMAP : A native pixmap underlying either draw or read is no longer valid.\n");
break;
}
case EGL_BAD_NATIVE_WINDOW:
{
DALI_LOG_ERROR("EGL_BAD_NATIVE_WINDOW : A native window underlying either draw or read is no longer valid.\n");
break;
}
case EGL_BAD_CURRENT_SURFACE:
{
DALI_LOG_ERROR("EGL_BAD_CURRENT_SURFACE : The previous context has unflushed commands and the previous surface is no longer valid.\n");
break;
}
case EGL_BAD_ALLOC:
{
DALI_LOG_ERROR("EGL_BAD_ALLOC : Allocation of ancillary buffers for draw or read were delayed until eglMakeCurrent is called, and there are not enough resources to allocate them\n");
break;
}
case EGL_CONTEXT_LOST:
{
DALI_LOG_ERROR("EGL_CONTEXT_LOST : If a power management event has occurred. The application must destroy all contexts and reinitialise OpenGL ES state and objects to continue rendering\n");
break;
}
default:
{
DALI_LOG_ERROR("Unknown error\n");
break;
}
}
DALI_ASSERT_ALWAYS(false && "MakeContextCurrent failed!");
}
DALI_LOG_WARNING("- EGL Information\nVendor: %s\nVersion: %s\nClient APIs: %s\nExtensions: %s\n",
eglQueryString(mEglDisplay, EGL_VENDOR),
eglQueryString(mEglDisplay, EGL_VERSION),
eglQueryString(mEglDisplay, EGL_CLIENT_APIS),
eglQueryString(mEglDisplay, EGL_EXTENSIONS));
}
void EglImplementation::MakeContextNull()
{
mContextCurrent = false;
// clear the current context
eglMakeCurrent( mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
}
void EglImplementation::TerminateGles()
{
if ( mGlesInitialized )
{
// in latest Mali DDK (r2p3 ~ r3p0 in April, 2012),
// MakeContextNull should be called before eglDestroy surface
// to prevent crash in _mali_surface_destroy_callback
MakeContextNull();
if(mIsOwnSurface && mCurrentEglSurface)
{
eglDestroySurface(mEglDisplay, mCurrentEglSurface);
}
eglDestroyContext(mEglDisplay, mEglContext);
eglTerminate(mEglDisplay);
mEglDisplay = NULL;
mEglConfig = NULL;
mEglContext = NULL;
mCurrentEglSurface = NULL;
mGlesInitialized = false;
}
}
bool EglImplementation::IsGlesInitialized() const
{
return mGlesInitialized;
}
void EglImplementation::SwapBuffers()
{
eglSwapBuffers( mEglDisplay, mCurrentEglSurface );
}
void EglImplementation::CopyBuffers()
{
eglCopyBuffers( mEglDisplay, mCurrentEglSurface, mCurrentEglNativePixmap );
}
void EglImplementation::WaitGL()
{
eglWaitGL();
}
void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
{
if(mEglConfig && isWindowType == mIsWindow && mColorDepth == depth)
{
return;
}
mIsWindow = isWindowType;
EGLint numConfigs;
Vector<EGLint> configAttribs;
configAttribs.Reserve(31);
if(isWindowType)
{
configAttribs.PushBack( EGL_SURFACE_TYPE );
configAttribs.PushBack( EGL_WINDOW_BIT );
}
else
{
DALI_ASSERT_ALWAYS(!"uninplemented");
configAttribs.PushBack( EGL_SURFACE_TYPE );
configAttribs.PushBack( EGL_PIXMAP_BIT );
}
configAttribs.PushBack( EGL_RENDERABLE_TYPE );
#if DALI_GLES_VERSION >= 30
DALI_ASSERT_ALWAYS(!"uninplemented");
#ifdef _ARCH_ARM_
configAttribs.PushBack( EGL_OPENGL_ES3_BIT_KHR );
#else
// There is a bug in the desktop emulator
// Requesting for ES3 causes eglCreateContext even though it allows to ask
// for a configuration that supports GLES 3.0
configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
#endif // _ARCH_ARM_
#else // DALI_GLES_VERSION >= 30
configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
#endif //DALI_GLES_VERSION >= 30
configAttribs.PushBack( EGL_RED_SIZE );
configAttribs.PushBack( 8 );
configAttribs.PushBack( EGL_GREEN_SIZE );
configAttribs.PushBack( 8 );
configAttribs.PushBack( EGL_BLUE_SIZE );
configAttribs.PushBack( 8 );
//
// Setting the alpha crashed .... need SDL_SetVideo(...) with alpha somehow??
//
configAttribs.PushBack( EGL_ALPHA_SIZE );
configAttribs.PushBack( 8 );
configAttribs.PushBack( EGL_DEPTH_SIZE );
configAttribs.PushBack( 24 );
configAttribs.PushBack( EGL_NONE );
if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
{
EGLint error = eglGetError();
switch (error)
{
case EGL_BAD_DISPLAY:
{
DALI_LOG_ERROR("Display is not an EGL display connection\n");
break;
}
case EGL_BAD_ATTRIBUTE:
{
DALI_LOG_ERROR("The parameter confirAttribs contains an invalid frame buffer configuration attribute or an attribute value that is unrecognized or out of range\n");
break;
}
case EGL_NOT_INITIALIZED:
{
DALI_LOG_ERROR("Display has not been initialized\n");
break;
}
case EGL_BAD_PARAMETER:
{
DALI_LOG_ERROR("The parameter numConfig is NULL\n");
break;
}
default:
{
DALI_LOG_ERROR("Unknown error\n");
}
}
DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
}
if ( numConfigs != 1 )
{
DALI_LOG_ERROR("No configurations found.\n");
TEST_EGL_ERROR("eglChooseConfig");
}
}
void EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
{
DALI_ASSERT_ALWAYS( ( mCurrentEglSurface == 0 ) && "EGL surface already exists" );
mColorDepth = depth;
mIsWindow = true;
// egl choose config
static_cast<void>(window);
EGLNativeWindowType dummyWindow = NULL;
mCurrentEglSurface = eglCreateWindowSurface( mEglDisplay, mEglConfig, dummyWindow, NULL );
TEST_EGL_ERROR("eglCreateWindowSurface");
DALI_ASSERT_ALWAYS( mCurrentEglSurface && "Create window surface failed" );
}
EGLSurface EglImplementation::CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth )
{
DALI_ASSERT_ALWAYS( mCurrentEglSurface == 0 && "Cannot create more than one instance of surface pixmap" );
mCurrentEglNativePixmap = pixmap;
mColorDepth = depth;
mIsWindow = false;
// egl choose config
ChooseConfig(mIsWindow, mColorDepth);
mCurrentEglSurface = eglCreatePixmapSurface( mEglDisplay, mEglConfig, mCurrentEglNativePixmap, NULL );
TEST_EGL_ERROR("eglCreatePixmapSurface");
DALI_ASSERT_ALWAYS( mCurrentEglSurface && "Create pixmap surface failed" );
return mCurrentEglSurface;
}
bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window )
{
DALI_ASSERT_ALWAYS(!"Unimplemented");
bool contextLost = false;
// the surface is bound to the context, so set the context to null
MakeContextNull();
// destroy the surface
DestroySurface();
// create the EGL surface
CreateSurfaceWindow( window, mColorDepth );
// set the context to be current with the new surface
MakeContextCurrent();
return contextLost;
}
bool EglImplementation::ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLSurface& eglSurface )
{
bool contextLost = false;
// the surface is bound to the context, so set the context to null
MakeContextNull();
// destroy the surface
DestroySurface();
// create the EGL surface
eglSurface = CreateSurfacePixmap( pixmap, mColorDepth );
// set the context to be current with the new surface
MakeContextCurrent();
return contextLost;
}
EGLDisplay EglImplementation::GetDisplay() const
{
return mEglDisplay;
}
EGLDisplay EglImplementation::GetContext() const
{
return mEglContext;
}
} // namespace Adaptor
} // namespace Internal
} // namespace Dali
| 26.94484 | 263 | 0.695107 | pwisbey |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.