text string | size int64 | token_count int64 |
|---|---|---|
// Copyright 2019 Google LLC
//
// 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
//
// https://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 "gax/backoff_policy.h"
#include <gtest/gtest.h>
#include <chrono>
#include <memory>
#include <random>
namespace google {
namespace gax {
TEST(ExponentialBackoffPolicy, Basic) {
ExponentialBackoffPolicy tested(std::chrono::milliseconds(1),
std::chrono::milliseconds(32));
for (int i = 0; i < 5; ++i) {
auto base_delay = tested.current_delay_range_;
EXPECT_EQ(base_delay, std::chrono::milliseconds(1 << i));
auto delay = tested.OnCompletion();
EXPECT_GE(delay, base_delay / 2.0);
EXPECT_LE(delay, base_delay);
}
EXPECT_EQ(tested.current_delay_range_, tested.maximum_delay_);
// current_delay_range_ saturates to max delay.
tested.OnCompletion();
EXPECT_EQ(tested.current_delay_range_, tested.maximum_delay_);
}
TEST(ExponentialBackoffPolicy, CopyConstruct) {
ExponentialBackoffPolicy tested(std::chrono::milliseconds(10),
std::chrono::milliseconds(320));
tested.OnCompletion();
ExponentialBackoffPolicy copy(
tested); // Copy starts with fresh backoff delays
EXPECT_EQ(copy.current_delay_range_, std::chrono::milliseconds(10));
EXPECT_EQ(copy.maximum_delay_, std::chrono::milliseconds(320));
}
TEST(ExponentialBackoffPolicy, MoveConstruct) {
ExponentialBackoffPolicy tested(std::chrono::milliseconds(10),
std::chrono::milliseconds(320));
tested.OnCompletion();
ExponentialBackoffPolicy moved(
std::move(tested)); // Starts with fresh backoff delays
EXPECT_EQ(moved.current_delay_range_, std::chrono::milliseconds(10));
EXPECT_EQ(moved.maximum_delay_, std::chrono::milliseconds(320));
}
TEST(ExponentialBackoffPolicy, Clone) {
ExponentialBackoffPolicy tested(std::chrono::milliseconds(10),
std::chrono::milliseconds(320));
tested.OnCompletion();
std::unique_ptr<BackoffPolicy> clone = tested.clone();
// We need to check that the clone method has the right signature, but we also
// need to check that the clone attributes have the right initial values.
auto cast_clone = std::unique_ptr<ExponentialBackoffPolicy>(
static_cast<ExponentialBackoffPolicy*>(clone.release()));
EXPECT_EQ(cast_clone->current_delay_range_, std::chrono::milliseconds(10));
EXPECT_EQ(cast_clone->maximum_delay_, std::chrono::milliseconds(320));
}
TEST(ExponentialBackoffPolicy, LazyGenerator) {
ExponentialBackoffPolicy tested(std::chrono::milliseconds(10),
std::chrono::milliseconds(320));
EXPECT_EQ(tested.generator_, nullptr);
tested.OnCompletion();
EXPECT_NE(tested.generator_, nullptr);
// Copies and clones use their own lazily constructed generators
ExponentialBackoffPolicy copy(tested);
EXPECT_EQ(copy.generator_, nullptr);
copy.OnCompletion();
EXPECT_NE(copy.generator_, nullptr);
auto clone = std::unique_ptr<ExponentialBackoffPolicy>(
static_cast<ExponentialBackoffPolicy*>(copy.clone().release()));
EXPECT_EQ(clone->generator_, nullptr);
clone->OnCompletion();
EXPECT_NE(clone->generator_, nullptr);
// Moves reuse the existing generator
ExponentialBackoffPolicy move(std::move(tested));
EXPECT_NE(move.generator_, nullptr);
}
} // namespace gax
} // namespace google
| 3,868 | 1,249 |
#include <assert.h>
#include <iostream>
#include "common.h"
#include <unistd.h>
#include "io/cmd_parser.h"
#include "io/pb_parser.h"
#include "io/binary_parser.h"
#include "app/gibbs/gibbs_sampling.h"
#include "dstruct/factor_graph/factor_graph.h"
/*
* Parse input arguments
*/
dd::CmdParser parse_input(int argc, char** argv){
// if(argv == 1){
// std::cout << "ERROR: APP_NAME REQUIRED " << std::endl;
// std::cout << "AVAILABLE APP_NAME {gibbs}" << std::endl;
// std::cout << "USAGE ./dw APP_NAME" << std::endl;
// assert(false);
// }
std::vector<std::string> new_args;
if (argc < 2 || strcmp(argv[1], "gibbs") != 0) {
new_args.push_back(std::string(argv[0]) + " " + "gibbs");
new_args.push_back("-h");
} else {
new_args.push_back(std::string(argv[0]) + " " + std::string(argv[1]));
for(int i=2;i<argc;i++){
new_args.push_back(std::string(argv[i]));
}
}
char ** new_argv = new char*[new_args.size()];
for(int i=0;i<new_args.size();i++){
new_argv[i] = new char[new_args[i].length() + 1];
std::copy(new_args[i].begin(), new_args[i].end(), new_argv[i]);
new_argv[i][new_args[i].length()] = '\0';
}
dd::CmdParser cmd_parser("gibbs");
cmd_parser.parse(new_args.size(), new_argv);
return cmd_parser;
}
void gibbs(dd::CmdParser & cmd_parser){
int n_numa_node = numa_max_node() + 1;
int n_thread_per_numa = (sysconf(_SC_NPROCESSORS_CONF))/(n_numa_node);
std::string fg_file = cmd_parser.fg_file->getValue();
std::string weight_file = cmd_parser.weight_file->getValue();
std::string variable_file = cmd_parser.variable_file->getValue();
std::string factor_file = cmd_parser.factor_file->getValue();
std::string edge_file = cmd_parser.edge_file->getValue();
std::string output_folder = cmd_parser.output_folder->getValue();
int n_learning_epoch = cmd_parser.n_learning_epoch->getValue();
int n_samples_per_learning_epoch = cmd_parser.n_samples_per_learning_epoch->getValue();
int n_inference_epoch = cmd_parser.n_inference_epoch->getValue();
double stepsize = cmd_parser.stepsize->getValue();
double stepsize2 = cmd_parser.stepsize2->getValue();
if (stepsize == 0.01) stepsize = stepsize2;
double decay = cmd_parser.decay->getValue();
std::cout << std::endl;
std::cout << "#################MACHINE CONFIG#################" << std::endl;
std::cout << "# # NUMA Node : " << n_numa_node << std::endl;
std::cout << "# # Thread/NUMA Node : " << n_thread_per_numa << std::endl;
std::cout << "################################################" << std::endl;
std::cout << std::endl;
std::cout << "#################GIBBS SAMPLING#################" << std::endl;
std::cout << "# fg_file : " << fg_file << std::endl;
std::cout << "# edge_file : " << edge_file << std::endl;
std::cout << "# weight_file : " << weight_file << std::endl;
std::cout << "# variable_file : " << variable_file << std::endl;
std::cout << "# factor_file : " << factor_file << std::endl;
std::cout << "# output_folder : " << output_folder << std::endl;
std::cout << "# n_learning_epoch : " << n_learning_epoch << std::endl;
std::cout << "# n_samples/l. epoch : " << n_samples_per_learning_epoch << std::endl;
std::cout << "# n_inference_epoch : " << n_inference_epoch << std::endl;
std::cout << "# stepsize : " << stepsize << std::endl;
std::cout << "# decay : " << decay << std::endl;
std::cout << "################################################" << std::endl;
std::cout << "# IGNORE -s (n_samples/l. epoch). ALWAYS -s 1. #" << std::endl;
std::cout << "# IGNORE -t (threads). ALWAYS USE ALL THREADS. #" << std::endl;
std::cout << "################################################" << std::endl;
//deepdive::FactorGraph meta = dd::read_single_pb<deepdive::FactorGraph>(fg_file);
Meta meta = read_meta(fg_file);
std::cout << "# nvar : " << meta.num_variables << std::endl;
std::cout << "# nfac : " << meta.num_factors << std::endl;
std::cout << "# nweight : " << meta.num_weights << std::endl;
std::cout << "# nedge : " << meta.num_edges << std::endl;
std::cout << "################################################" << std::endl;
// std::cout << "# nvar : " << meta.numvariables() << std::endl;
// std::cout << "# nfac : " << meta.numfactors() << std::endl;
// std::cout << "# nweight : " << meta.numweights() << std::endl;
// std::cout << "# nedge : " << meta.numedges() << std::endl;
// std::cout << "################################################" << std::endl;
numa_run_on_node(0);
numa_set_localalloc();
// dd::FactorGraph fg(meta.numvariables(), meta.numfactors(), meta.numweights(), meta.numedges());
dd::FactorGraph fg(meta.num_variables, meta.num_factors, meta.num_weights, meta.num_edges);
fg.load(cmd_parser);
dd::GibbsSampling gibbs(&fg, &cmd_parser);
int numa_aware_n_learning_epoch = (int)(n_learning_epoch/n_numa_node) +
(n_learning_epoch%n_numa_node==0?0:1);
gibbs.learn(numa_aware_n_learning_epoch, n_samples_per_learning_epoch, stepsize, decay);
gibbs.dump_weights();
int numa_aware_n_epoch = (int)(n_inference_epoch/n_numa_node) +
(n_inference_epoch%n_numa_node==0?0:1);
gibbs.inference(numa_aware_n_epoch);
gibbs.dump();
}
int main(int argv, char** argc){
dd::CmdParser cmd_parser = parse_input(argv, argc);
if(cmd_parser.app_name == "gibbs"){
gibbs(cmd_parser);
}
}
| 5,629 | 2,064 |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2017 Intel Corporation. All Rights Reserved.
#pragma once
#include <sys/stat.h>
#include <string>
#include <iostream>
#include <unistd.h>
#include <thread>
#include <mutex>
#include <algorithm>
#include <set>
#include <iomanip>
#include <librealsense/rs.hpp>
#include <signal.h>
#include "rs_sdk.h"
#include "person_tracking_video_module_factory.h"
namespace RS = Intel::RealSense;
using namespace RS::PersonTracking;
using namespace std;
using namespace rs::core;
class PT_module
{
public:
PT_module(module_result_listener_interface* module_listener) : lastPersonCount(0),
totalPersonIncrements(0), prevPeopleInFrame(-1), prevPeopleTotal(-1),
id_set(nullptr), pt_initialized(false), pt_is_running(false), m_stopped(false),
m_module_listener(module_listener)
{
dataDir = get_data_files_path();
// Create person tracker video module
ptModule.reset(rs::person_tracking::person_tracking_video_module_factory::
create_person_tracking_video_module(dataDir.c_str()));
m_sample_set = new rs::core::correlated_sample_set();
}
int init_pt(rs::core::video_module_interface::supported_module_config& cfg,
rs::device* device)
{
// Configure camera and get parameters for person tracking video module
auto actualModuleConfig = ConfigureCamera(device, cfg);
// Configure projection
rs::core::intrinsics color_intrin = rs::utils::convert_intrinsics(device->get_stream_intrinsics(rs::stream::color));
rs::core::intrinsics depth_intrin = rs::utils::convert_intrinsics(device->get_stream_intrinsics(rs::stream::depth));
rs::core::extrinsics extrinsics = rs::utils::convert_extrinsics(device->get_extrinsics(rs::stream::depth, rs::stream::color));
actualModuleConfig.projection = rs::core::projection_interface::create_instance(&color_intrin, &depth_intrin, &extrinsics);
// Enabling Person head pose and orientation
ptModule->QueryConfiguration()->QueryTracking()->Enable();
ptModule->QueryConfiguration()->QueryTracking()->SetTrackingMode((Intel::RealSense::PersonTracking::PersonTrackingConfiguration::TrackingConfiguration::TrackingMode)0);
// Set the enabled module configuration
if(ptModule->set_module_config(actualModuleConfig) != rs::core::status_no_error)
{
cerr<<"error : failed to set the enabled module configuration" << endl;
return -1;
}
pt_initialized = true;
cout << "init_pt complete" << endl;
return 0;
}
bool negotiate_supported_cfg(
rs::core::video_module_interface::supported_module_config& slam_config)
{
slam_config.image_streams_configs[(int)rs::stream::color].size.width = 640;
slam_config.image_streams_configs[(int)rs::stream::color].size.height = 480;
slam_config[stream_type::color].is_enabled = true;
slam_config[stream_type::color].frame_rate = 30.f;
return true;
}
int query_supported_config(rs::device* device,
video_module_interface::supported_module_config& supported_config)
{
supported_config.image_streams_configs[(int)rs::stream::color].size.width = 640;
supported_config.image_streams_configs[(int)rs::stream::color].size.height = 480;
supported_config[stream_type::color].is_enabled = true;
supported_config[stream_type::color].frame_rate = 30.f;
supported_config.image_streams_configs[(int)rs::stream::depth].size.width = 320;
supported_config.image_streams_configs[(int)rs::stream::depth].size.height = 240;
supported_config[stream_type::depth].is_enabled = true;
supported_config[stream_type::depth].frame_rate = 30.f;
return 0;
}
int process_pt(rs::core::correlated_sample_set& pt_sample_set)
{
std::unique_lock<std::mutex> mtx_lock(mtx);
if(!pt_initialized || pt_is_running || m_stopped)
{
// Drop the frame
mtx_lock.unlock();
return false;
}
pt_is_running = true;
m_sample_set = &pt_sample_set;
std::thread pt_work_thread(&PT_module::pt_worker, this);
pt_work_thread.detach();
mtx_lock.unlock();
return 0;
}
void pt_worker()
{
// Process frame
if (ptModule->process_sample_set(*m_sample_set) != rs::core::status_no_error)
{
cerr << "error : failed to process sample" << endl;
return;
}
set<int>* new_ids = get_persion_ids(ptModule->QueryOutput());
int numPeopleInFrame = ptModule->QueryOutput()->QueryNumberOfPeople();
if (numPeopleInFrame > lastPersonCount)
totalPersonIncrements += (numPeopleInFrame - lastPersonCount);
else if(numPeopleInFrame == lastPersonCount && id_set != nullptr)
{
set<int> diff;
set_difference(id_set->begin(), id_set->end(), new_ids->begin(), new_ids->end(), inserter(diff, diff.begin()));
totalPersonIncrements += diff.size();
}
if (id_set != nullptr)
delete id_set;
id_set = new_ids;
bool people_changed =false;
lastPersonCount = numPeopleInFrame;
if (numPeopleInFrame != prevPeopleInFrame || totalPersonIncrements != prevPeopleTotal)
{
prevPeopleInFrame = numPeopleInFrame;
prevPeopleTotal = totalPersonIncrements;
people_changed = true;
}
m_module_listener->on_person_tracking_finished(*m_sample_set,
numPeopleInFrame, totalPersonIncrements, people_changed);
pt_is_running = false;
}
set<int>* get_persion_ids(PersonTrackingData* trackingData)
{
set<int>* id_set = new set<int>;
for (int index = 0; index < trackingData->QueryNumberOfPeople(); ++index)
{
PersonTrackingData::Person* personData = trackingData->QueryPersonData(
Intel::RealSense::PersonTracking::PersonTrackingData::ACCESS_ORDER_BY_INDEX, index);
if (personData)
{
PersonTrackingData::PersonTracking* personTrackingData = personData->QueryTracking();
int id = personTrackingData->QueryId();
id_set->insert(id);
}
}
return id_set;
}
wstring get_data_files_path()
{
struct stat stat_struct;
if(stat(PERSON_TRACKING_DATA_FILES, &stat_struct) != 0)
{
cerr << "Failed to find person tracking data files at " << PERSON_TRACKING_DATA_FILES << endl;
cerr << "Please check that you run sample from correct directory" << endl;
exit(EXIT_FAILURE);
}
string person_tracking_data_files = PERSON_TRACKING_DATA_FILES;
int size = person_tracking_data_files.length();
wchar_t wc_person_tracking_data_files[size + 1];
mbstowcs(wc_person_tracking_data_files, person_tracking_data_files.c_str(), size + 1);
return wstring(wc_person_tracking_data_files);
}
rs::core::video_module_interface::actual_module_config ConfigureCamera (
rs::device* device,
rs::core::video_module_interface::supported_module_config& cfg)
{
rs::core::video_module_interface::actual_module_config actualModuleConfig = {};
// Person tracking uses only color & depth
vector<rs::core::stream_type> possible_streams = {rs::core::stream_type::depth,
rs::core::stream_type::color
};
for (auto &stream : possible_streams)
{
rs::stream librealsenseStream = rs::utils::convert_stream_type(stream);
auto &supported_stream_config = cfg[stream];
int width = supported_stream_config.size.width;
int height = supported_stream_config.size.height;
int frame_rate = supported_stream_config.frame_rate;
rs::core::video_module_interface::actual_image_stream_config &actualStreamConfig = actualModuleConfig[stream];
actualStreamConfig.size.width = width;
actualStreamConfig.size.height = height;
actualStreamConfig.frame_rate = frame_rate;
actualStreamConfig.intrinsics = rs::utils::convert_intrinsics(
device->get_stream_intrinsics(librealsenseStream));
actualStreamConfig.extrinsics = rs::utils::convert_extrinsics(
device->get_extrinsics(rs::stream::depth, librealsenseStream));
actualStreamConfig.is_enabled = true;
}
return actualModuleConfig;
}
int8_t get_pixel_size(rs::format format)
{
switch(format)
{
case rs::format::any:
return 0;
case rs::format::z16:
return 2;
case rs::format::disparity16:
return 2;
case rs::format::xyz32f:
return 4;
case rs::format::yuyv:
return 2;
case rs::format::rgb8:
return 3;
case rs::format::bgr8:
return 3;
case rs::format::rgba8:
return 4;
case rs::format::bgra8:
return 4;
case rs::format::y8:
return 1;
case rs::format::y16:
return 2;
case rs::format::raw8:
return 1;
case rs::format::raw10:
return 0;//not supported
case rs::format::raw16:
return 2;
}
}
bool get_pt_running()
{
return pt_is_running;
}
bool get_pt_is_ready()
{
return pt_initialized && !pt_is_running && !m_stopped;
}
void stop()
{
m_stopped = true;
}
private:
wstring dataDir;
unique_ptr<rs::person_tracking::person_tracking_video_module_interface> ptModule;
int lastPersonCount;
int totalPersonIncrements;
int prevPeopleInFrame;
int prevPeopleTotal;
set<int> *id_set;
bool pt_initialized;
bool pt_is_running;
bool m_stopped;
std::mutex mtx;
rs::core::correlated_sample_set* m_sample_set;
module_result_listener_interface* m_module_listener;
};
| 10,493 | 3,190 |
#include <McachedRequestHandler.h>
#include <mraft/floyd/include/floyd.h>
extern floyd::Floyd *floyd_raft;
moxie::McachedClientHandler::McachedClientHandler(const std::shared_ptr<PollerEvent>& client, const std::shared_ptr<moxie::NetAddress>& cad) :
event_(client),
peer_(cad),
argc_(0),
argv_() {
}
void moxie::McachedClientHandler::AfetrRead(const std::shared_ptr<PollerEvent>& event, EventLoop *loop) {
if (ParseRedisRequest()) {
DoMcachedCammand();
}
if (writeBuf_.writableBytes()) {
event_->EnableWrite();
loop->Modity(event);
}
}
void moxie::McachedClientHandler::AfetrWrite(const std::shared_ptr<PollerEvent>& event, EventLoop *loop) {
if (writeBuf_.readableBytes() > 0) {
return;
}
event->DisableWrite();
loop->Modity(event);
}
bool moxie::McachedClientHandler::DoMcachedCammand() {
ResetArgcArgv reset(argc_, argv_);
assert(argc_ == argv_.size());
assert(argc_ > 0);
assert(floyd_raft);
//DebugArgcArgv();
slash::Status s;
std::string res;
s = floyd_raft->ExecMcached(argv_, res);
if (s.ok()) {
if (argv_[0] == "SET" || argv_[0] == "set") {
res = "+OK\r\n";
ReplyString(res);
} else if (argv_[0] == "get" || argv_[0] == "GET") {
ReplyBulkString(res);
}
} else {
if (argv_[0] == "SET" || argv_[0] == "set") {
res = "-ERR write " + s.ToString() + " \r\n";
} else if (argv_[0] == "get" || argv_[0] == "GET") {
res = "-ERR read " + s.ToString() + " \r\n";
} else {
res = "-ERR request " + s.ToString() + " \r\n";
}
ReplyString(res);
}
return true;
}
bool moxie::McachedClientHandler::ParseRedisRequest() {
if (readBuf_.readableBytes() <= 0) {
return false;
}
if (argc_ <= 0) { // parse buffer to get argc
argv_.clear();
curArgvlen_ = -1;
const char* crlf = readBuf_.findChars(Buffer::kCRLF, 2);
if (crlf == nullptr) {
return false;
}
std::string argc_str = readBuf_.retrieveAsString(crlf - readBuf_.peek());
if (argc_str[0] != '*') {
ReplyString("-ERR Protocol error: invalid multibulk length\r\n");
return false;
}
argc_ = std::atoi(argc_str.c_str() + sizeof('*'));
if (argc_ == 0) {
ReplyString("-ERR Protocol error: invalid multibulk length\r\n");
return false;
}
// \r\n
readBuf_.retrieve(2);
//std::cout << "argc:" << argc_ << std::endl;
}
while (argv_.size() < argc_) {
const char* crlf = readBuf_.findChars(Buffer::kCRLF, 2);
if (crlf == nullptr) {
return false;
}
if (curArgvlen_ < 0) {
std::string argv_len = readBuf_.retrieveAsString(crlf - readBuf_.peek());
if (argv_len[0] != '$') {
curArgvlen_ = -1;
argc_ = 0;
//std::cout << argv_len << " " << argv_len[0] << std::endl;
ReplyString("-ERR Protocol error: invalid bulk length (argv_len)\r\n");
return false;
}
// remove $
curArgvlen_ = std::atoi(argv_len.c_str() + sizeof('$'));
//std::cout << "curArgvlen_:" << curArgvlen_ << std::endl;
// \r\n
readBuf_.retrieve(2);
} else {
std::string argv_str = readBuf_.retrieveAsString(crlf - readBuf_.peek());
if (static_cast<ssize_t>(argv_str.size()) != curArgvlen_) {
curArgvlen_ = -1;
argc_ = 0;
std::cout << argv_str << std::endl;
ReplyString("-ERR Protocol error: invalid bulk length (argv_str)\r\n");
return false;
}
argv_.push_back(argv_str);
//std::cout << "argv_str:" << argv_str << std::endl;
// \r\n
readBuf_.retrieve(2);
curArgvlen_ = -1; // must do, to read next argv item
}
}
// request can be solved
if ((argc_ > 0) && (argv_.size() == argc_)) {
return true;
}
return false;
}
void moxie::McachedClientHandler::DebugArgcArgv() const {
std::cout << peer_->getIp() << ":" << peer_->getPort() << "->";
for (size_t index = 0; index < argc_; index++) {
std::cout << argv_[index];
if (index != argc_ - 1) {
std::cout << " ";
}
}
std::cout << std::endl;
}
void moxie::McachedClientHandler::ReplyString(const std::string& error) {
writeBuf_.append(error.c_str(), error.size());
}
void moxie::McachedClientHandler::ReplyBulkString(const std::string& item) {
writeBuf_.append("$", 1);
std::string len = std::to_string(item.size());
writeBuf_.append(len.c_str(), len.size());
writeBuf_.append(Buffer::kCRLF, 2);
writeBuf_.append(item.c_str(), item.size());
writeBuf_.append(Buffer::kCRLF, 2);
} | 5,028 | 1,786 |
/***************************************************************************
* You can redistribute and/or modify this program under the *
* terms of the SeisComP Public License. *
* *
* 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 *
* SeisComP Public License for more details. *
* *
* Developed by gempa GmbH *
***************************************************************************/
#include <string.h>
template <typename T>
CircularBuffer<T>::CircularBuffer(size_t capacity)
: _capacity(0), _start(0), _end(0), _data(NULL) {
setCapacity(capacity);
}
template <typename T>
CircularBuffer<T>::~CircularBuffer() {
if ( _data != NULL ) delete _data;
}
template <typename T>
void CircularBuffer<T>::setCapacity(size_t n) {
// No change in capacity
if ( _capacity == n ) return;
// Delete existing data block
if ( _data != NULL ) {
delete _data;
_data = NULL;
}
_capacity = n;
if ( _capacity > 0 )
_data = new T[_capacity+1];
// Reset all index pointers
_start = _end = 0;
}
template <typename T>
size_t CircularBuffer<T>::capacity() const {
return _capacity;
}
template <typename T>
size_t CircularBuffer<T>::size() const {
if ( _end < _start ) return _capacity-_start+_end+1;
return _end-_start;
}
template <typename T>
bool CircularBuffer<T>::empty() const {
return _start == _end;
}
template <typename T>
void CircularBuffer<T>::append(const T *d, size_t n) {
if ( n >= _capacity ) {
d += n-_capacity;
n = _capacity;
_start = 0;
_end = _capacity;
memcpy(_data, d, _capacity*sizeof(T));
return;
}
size_t new_end = _end + n;
bool move_front = size() + n > _capacity;
if ( new_end > _capacity ) {
new_end -= _capacity;
--new_end;
}
// Simple case
if ( new_end > _end )
memcpy(_data + _end, d, n*sizeof(T));
else {
// Split up blocks
size_t remain = _capacity - _end + 1;
memcpy(_data + _end, d, remain*sizeof(T));
n -= remain;
d += remain;
memcpy(_data, d, n*sizeof(T));
}
_end = new_end;
if ( move_front ) _start = _end+1;
}
template <typename T>
void CircularBuffer<T>::append(const T *d, size_t n, T scale) {
if ( n >= _capacity ) {
d += n-_capacity;
n = _capacity;
_start = 0;
_end = _capacity;
memcpy(_data, d, _capacity*sizeof(T));
for ( size_t i = 0; i < _capacity; ++i ) _data[i] *= scale;
return;
}
size_t new_end = _end + n;
bool move_front = size() + n > _capacity;
if ( new_end > _capacity ) {
new_end -= _capacity;
--new_end;
}
// Simple case
if ( new_end > _end ) {
T *block = _data + _end;
memcpy(block, d, n*sizeof(T));
for ( size_t i = 0; i < n; ++i ) block[i] *= scale;
}
else {
// Split up blocks
size_t remain = _capacity - _end + 1;
T *block = _data + _end;
memcpy(block, d, remain*sizeof(T));
for ( size_t i = 0; i < remain; ++i ) block[i] *= scale;
n -= remain;
d += remain;
memcpy(_data, d, n*sizeof(T));
for ( size_t i = 0; i < n; ++i ) _data[i] *= scale;
}
_end = new_end;
if ( move_front ) _start = _end+1;
}
template <typename T>
size_t CircularBuffer<T>::copy(T *target, size_t ofs, size_t n) const {
size_t copied = 0;
size_t size_ = size();
if ( ofs >= size_ ) return copied;
size_ -= ofs;
size_t s = _start + ofs;
if ( s > _capacity ) {
s -= _capacity;
--s;
}
// Simple case
if ( _end > s ) {
size_t to_copy = std::min(n, _end-s);
memcpy(target, _data+s, to_copy*sizeof(T));
copied += to_copy;
}
else {
// Split up blocks
size_t to_copy = std::min(n, _capacity - s + 1);
memcpy(target, _data+s, to_copy*sizeof(T));
copied += to_copy;
n -= to_copy;
if ( n > 0 ) {
target += to_copy;
to_copy = std::min(n, _end);
memcpy(target, _data, to_copy*sizeof(T));
copied += to_copy;
}
}
return copied;
}
template <typename T>
void CircularBuffer<T>::clear() {
_start = _end = 0;
}
template <typename T>
void CircularBuffer<T>::dump(std::ostream &os) {
os << "Capacity: " << capacity() << std::endl;
os << "Size : " << size() << std::endl;
os << "get_ptr : " << _start << std::endl;
os << "put_ptr : " << _end << std::endl;
size_t i = _start;
while ( i != _end ) {
if ( i != _start ) os << ",";
os << _data[i];
++i; if ( i > _capacity ) i = 0;
}
os << std::endl;
}
| 4,672 | 1,870 |
#include "Common.h"
namespace oria {
std::string readFile(const std::string & filename) {
using namespace std;
ifstream ins(filename.c_str(), ios::binary);
if (!ins) {
throw runtime_error("Failed to load file " + filename);
}
assert(ins);
stringstream sstr;
sstr << ins.rdbuf();
return sstr.str();
}
} | 346 | 116 |
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* 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 <gtest/gtest.h>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define private public
#define protected public
#include "graph/model_serialize.h"
#include "graph/detail/model_serialize_imp.h"
#include "graph/ge_attr_value.h"
#include "graph/utils/graph_utils.h"
#include "graph/utils/tensor_utils.h"
#undef private
#undef protected
#include "proto/ge_ir.pb.h"
using namespace ge;
using std::string;
using std::vector;
bool LinkEdge(NodePtr src_node, int32_t src_index, NodePtr dst_node, int32_t dst_index) {
if (src_index >= 0) {
auto src_anchor = src_node->GetOutDataAnchor(src_index);
auto dst_anchor = dst_node->GetInDataAnchor(dst_index);
src_anchor->LinkTo(dst_anchor);
} else {
auto src_anchor = src_node->GetOutControlAnchor();
auto dst_anchor = dst_node->GetInControlAnchor();
src_anchor->LinkTo(dst_anchor);
}
}
NodePtr CreateNode(OpDescPtr op, ComputeGraphPtr owner_graph) { return owner_graph->AddNode(op); }
void CompareShape(const vector<int64_t> &shape1, const vector<int64_t> &shape2) {
EXPECT_EQ(shape1.size(), shape2.size());
if (shape1.size() == shape2.size()) {
for (int i = 0; i < shape1.size(); i++) {
EXPECT_EQ(shape1[i], shape2[i]);
}
}
}
template <typename T>
void CompareList(const vector<T> &val1, const vector<T> &val2) {
EXPECT_EQ(val1.size(), val2.size());
if (val1.size() == val2.size()) {
for (int i = 0; i < val1.size(); i++) {
EXPECT_EQ(val1[i], val2[i]);
}
}
}
static bool NamedAttrsSimpleCmp(const GeAttrValue &left, const GeAttrValue &right) {
GeAttrValue::NamedAttrs val1, val2;
left.GetValue<GeAttrValue::NamedAttrs>(val1);
right.GetValue<GeAttrValue::NamedAttrs>(val2);
if (val1.GetName() != val2.GetName()) {
return false;
}
auto attrs1 = val1.GetAllAttrs();
auto attrs2 = val2.GetAllAttrs();
if (attrs1.size() != attrs1.size()) {
return false;
}
for (auto it : attrs1) {
auto it2 = attrs2.find(it.first);
if (it2 == attrs2.end()) { // simple check
return false;
}
if (it.second.GetValueType() != it2->second.GetValueType()) {
return false;
}
switch (it.second.GetValueType()) {
case GeAttrValue::VT_INT: {
int64_t i1 = 0, i2 = 0;
it.second.GetValue<GeAttrValue::INT>(i1);
it2->second.GetValue<GeAttrValue::INT>(i2);
if (i1 != i2) {
return false;
}
}
case GeAttrValue::VT_FLOAT: {
GeAttrValue::FLOAT i1 = 0, i2 = 0;
it.second.GetValue<GeAttrValue::FLOAT>(i1);
it2->second.GetValue<GeAttrValue::FLOAT>(i2);
if (i1 != i2) {
return false;
}
}
case GeAttrValue::VT_STRING: {
string i1, i2;
it.second.GetValue<GeAttrValue::STR>(i1);
it2->second.GetValue<GeAttrValue::STR>(i2);
if (i1 != i2) {
return false;
}
}
case GeAttrValue::VT_BOOL: {
bool i1 = false, i2 = false;
it.second.GetValue<GeAttrValue::BOOL>(i1);
it2->second.GetValue<GeAttrValue::BOOL>(i2);
if (i1 != i2) {
return false;
}
}
}
}
return true;
}
static GeAttrValue::NamedAttrs CreateNamedAttrs(const string &name, std::map<string, GeAttrValue> map) {
GeAttrValue::NamedAttrs named_attrs;
named_attrs.SetName(name);
for (auto it : map) {
named_attrs.SetAttr(it.first, it.second);
}
return named_attrs;
}
TEST(UtestGeModelSerialize, simple) {
Model model("model_name", "custom version3.0");
model.SetAttr("model_key1", GeAttrValue::CreateFrom<GeAttrValue::INT>(123));
model.SetAttr("model_key2", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(456.78f));
model.SetAttr("model_key3", GeAttrValue::CreateFrom<GeAttrValue::STR>("abcd"));
model.SetAttr("model_key4", GeAttrValue::CreateFrom<GeAttrValue::LIST_INT>({123, 456}));
model.SetAttr("model_key5", GeAttrValue::CreateFrom<GeAttrValue::LIST_FLOAT>({456.78f, 998.90f}));
model.SetAttr("model_key6", GeAttrValue::CreateFrom<GeAttrValue::LIST_STR>({"abcd", "happy"}));
model.SetAttr("model_key7", GeAttrValue::CreateFrom<GeAttrValue::BOOL>(false));
model.SetAttr("model_key8", GeAttrValue::CreateFrom<GeAttrValue::LIST_BOOL>({true, false}));
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("input", "Input");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
// w1
auto w1_op = std::make_shared<OpDesc>("w1", "ConstOp");
w1_op->AddOutputDesc(GeTensorDesc(GeShape({12, 2, 64, 64, 16}), FORMAT_NC1HWC0, DT_FLOAT16));
auto w1 = CreateNode(w1_op, compute_graph);
// node1
auto node1_op = std::make_shared<OpDesc>("node1", "Conv2D");
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 2, 64, 64, 16}), FORMAT_NC1HWC0, DT_FLOAT16));
node1_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto node1 = CreateNode(node1_op, compute_graph);
// Attr set
node1_op->SetAttr("node_key1", GeAttrValue::CreateFrom<GeAttrValue::BYTES>(Buffer(10)));
node1_op->SetAttr("node_key2", GeAttrValue::CreateFrom<GeAttrValue::LIST_BYTES>({Buffer(20), Buffer(30)}));
auto named_attrs1 = GeAttrValue::CreateFrom<GeAttrValue::NAMED_ATTRS>(
CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}));
node1_op->SetAttr("node_key3", std::move(named_attrs1));
auto list_named_attrs = GeAttrValue::CreateFrom<GeAttrValue::LIST_NAMED_ATTRS>(
{CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}),
CreateNamedAttrs("my_name2", {{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}})});
node1_op->SetAttr("node_key4", std::move(list_named_attrs));
// tensor
auto tensor_data1 = "qwertyui";
auto tensor1 =
std::make_shared<GeTensor>(GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_INT8), (uint8_t *)tensor_data1, 8);
auto tensor_data2 = "asdfqwertyui";
auto tensor2 =
std::make_shared<GeTensor>(GeTensorDesc(GeShape({3, 2, 2}), FORMAT_ND, DT_UINT8), (uint8_t *)tensor_data2, 12);
auto tensor_data3 = "ghjkasdfqwertyui";
auto tensor3 =
std::make_shared<GeTensor>(GeTensorDesc(GeShape({4, 2, 2}), FORMAT_ND, DT_UINT16), (uint8_t *)tensor_data3, 16);
node1_op->SetAttr("node_key5", GeAttrValue::CreateFrom<GeAttrValue::TENSOR>(tensor1));
node1_op->SetAttr("node_key6", GeAttrValue::CreateFrom<GeAttrValue::LIST_TENSOR>({tensor2, tensor3}));
auto tensor_desc = GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_INT16);
TensorUtils::SetSize(tensor_desc, 100);
node1_op->SetAttr("node_key7", GeAttrValue::CreateFrom<GeAttrValue::TENSOR_DESC>(tensor_desc));
node1_op->SetAttr("node_key8", GeAttrValue::CreateFrom<GeAttrValue::LIST_TENSOR_DESC>(
{GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_INT32),
GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_UINT32),
GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_INT64),
GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_UINT64),
GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_BOOL),
GeTensorDesc(GeShape({2, 2, 2}), FORMAT_NCHW, DT_DOUBLE)}));
LinkEdge(input, 0, node1, 0);
LinkEdge(w1, 0, node1, 1);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
Buffer buffer;
ASSERT_EQ(model.Save(buffer), GRAPH_SUCCESS);
EXPECT_TRUE(buffer.GetData() != nullptr);
Model model2;
ASSERT_EQ(Model::Load(buffer.GetData(), buffer.GetSize(), model2), GRAPH_SUCCESS);
EXPECT_EQ(model2.GetName(), "model_name");
GeAttrValue::INT model_val1;
AttrUtils::GetInt(&model2, "model_key1", model_val1);
EXPECT_EQ(model_val1, 123);
GeAttrValue::FLOAT model_val2;
AttrUtils::GetFloat(&model2, "model_key2", model_val2);
EXPECT_EQ(model_val2, (float)456.78f);
GeAttrValue::STR model_val3;
AttrUtils::GetStr(&model2, "model_key3", model_val3);
EXPECT_EQ(model_val3, "abcd");
GeAttrValue::LIST_INT model_val4;
AttrUtils::GetListInt(&model2, "model_key4", model_val4);
CompareList(model_val4, {123, 456});
GeAttrValue::LIST_FLOAT model_val5;
AttrUtils::GetListFloat(&model2, "model_key5", model_val5);
CompareList(model_val5, {456.78f, 998.90f});
GeAttrValue::LIST_STR model_val6;
AttrUtils::GetListStr(&model2, "model_key6", model_val6);
CompareList(model_val6, {"abcd", "happy"});
GeAttrValue::BOOL model_val7;
EXPECT_EQ(AttrUtils::GetBool(&model2, "model_key7", model_val7), true);
EXPECT_EQ(model_val7, false);
GeAttrValue::LIST_BOOL model_val8;
AttrUtils::GetListBool(&model2, "model_key8", model_val8);
CompareList(model_val8, {true, false});
auto graph2 = model2.GetGraph();
const auto &s_graph = GraphUtils::GetComputeGraph(graph2);
ASSERT_TRUE(s_graph != nullptr);
auto s_nodes = s_graph->GetDirectNode();
ASSERT_EQ(3, s_nodes.size());
auto s_input = s_nodes.at(0);
auto s_w1 = s_nodes.at(1);
auto s_nod1 = s_nodes.at(2);
{
auto s_op = s_input->GetOpDesc();
EXPECT_EQ(s_op->GetName(), "input");
EXPECT_EQ(s_op->GetType(), "Input");
auto s_input_descs = s_op->GetAllInputsDesc();
ASSERT_EQ(s_input_descs.size(), 0);
auto s_output_descs = s_op->GetAllOutputsDesc();
ASSERT_EQ(s_output_descs.size(), 1);
auto desc1 = s_output_descs.at(0);
EXPECT_EQ(desc1.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc1.GetDataType(), DT_FLOAT);
CompareShape(desc1.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
auto out_anchor = s_input->GetOutDataAnchor(0);
auto peer_anchors = out_anchor->GetPeerInDataAnchors();
ASSERT_EQ(peer_anchors.size(), 1);
auto peer_anchor = peer_anchors.at(0);
ASSERT_EQ(peer_anchor->GetIdx(), 0);
ASSERT_EQ(peer_anchor->GetOwnerNode(), s_nod1);
}
{
auto s_op = s_w1->GetOpDesc();
EXPECT_EQ(s_op->GetName(), "w1");
EXPECT_EQ(s_op->GetType(), "ConstOp");
auto s_input_descs = s_op->GetAllInputsDesc();
ASSERT_EQ(s_input_descs.size(), 0);
auto s_output_descs = s_op->GetAllOutputsDesc();
ASSERT_EQ(s_output_descs.size(), 1);
auto desc1 = s_output_descs.at(0);
EXPECT_EQ(desc1.GetFormat(), FORMAT_NC1HWC0);
EXPECT_EQ(desc1.GetDataType(), DT_FLOAT16);
CompareShape(desc1.GetShape().GetDims(), vector<int64_t>{12, 2, 64, 64, 16});
auto out_anchor = s_w1->GetOutDataAnchor(0);
auto peer_anchors = out_anchor->GetPeerInDataAnchors();
ASSERT_EQ(peer_anchors.size(), 1);
auto peer_anchor = peer_anchors.at(0);
ASSERT_EQ(peer_anchor->GetIdx(), 1);
ASSERT_EQ(peer_anchor->GetOwnerNode(), s_nod1);
}
{
auto s_op = s_nod1->GetOpDesc();
EXPECT_EQ(s_op->GetName(), "node1");
EXPECT_EQ(s_op->GetType(), "Conv2D");
auto s_input_descs = s_op->GetAllInputsDesc();
ASSERT_EQ(s_input_descs.size(), 2);
auto desc1 = s_input_descs.at(0);
EXPECT_EQ(desc1.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc1.GetDataType(), DT_FLOAT);
CompareShape(desc1.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
auto desc2 = s_input_descs.at(1);
EXPECT_EQ(desc2.GetFormat(), FORMAT_NC1HWC0);
EXPECT_EQ(desc2.GetDataType(), DT_FLOAT16);
CompareShape(desc2.GetShape().GetDims(), vector<int64_t>{12, 2, 64, 64, 16});
auto s_output_descs = s_op->GetAllOutputsDesc();
ASSERT_EQ(s_output_descs.size(), 1);
auto desc3 = s_output_descs.at(0);
EXPECT_EQ(desc3.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc3.GetDataType(), DT_FLOAT);
CompareShape(desc3.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
auto out_anchor = s_nod1->GetOutDataAnchor(0);
auto peer_anchors = out_anchor->GetPeerInDataAnchors();
ASSERT_EQ(peer_anchors.size(), 0);
// node attrs
GeAttrValue::BYTES node_val1;
AttrUtils::GetBytes(s_op, "node_key1", node_val1);
ASSERT_EQ(node_val1.GetSize(), 10);
GeAttrValue::LIST_BYTES node_val2;
AttrUtils::GetListBytes(s_op, "node_key2", node_val2);
ASSERT_EQ(node_val2.size(), 2);
ASSERT_EQ(node_val2[0].GetSize(), 20);
ASSERT_EQ(node_val2[1].GetSize(), 30);
GeAttrValue s_named_attrs;
s_op->GetAttr("node_key3", s_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_named_attrs, named_attrs1));
GeAttrValue s_list_named_attrs;
s_op->GetAttr("node_key4", s_list_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_list_named_attrs, list_named_attrs));
ConstGeTensorPtr s_tensor;
AttrUtils::GetTensor(s_op, "node_key5", s_tensor);
ASSERT_TRUE(s_tensor != nullptr);
string str((char *)s_tensor->GetData().data(), s_tensor->GetData().size());
EXPECT_EQ(str, "qwertyui");
vector<ConstGeTensorPtr> s_list_tensor;
AttrUtils::GetListTensor(s_op, "node_key6", s_list_tensor);
ASSERT_EQ(s_list_tensor.size(), 2);
string str2((char *)s_list_tensor[0]->GetData().data(), s_list_tensor[0]->GetData().size());
EXPECT_EQ(str2, "asdfqwertyui");
string str3((char *)s_list_tensor[1]->GetData().data(), s_list_tensor[1]->GetData().size());
EXPECT_EQ(str3, "ghjkasdfqwertyui");
GeTensorDesc s_tensor_desc;
AttrUtils::GetTensorDesc(s_op, "node_key7", s_tensor_desc);
EXPECT_EQ(s_tensor_desc.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(s_tensor_desc.GetDataType(), DT_INT16);
uint32_t size = 0;
TensorUtils::GetSize(s_tensor_desc, size);
EXPECT_EQ(size, 100);
vector<GeTensorDesc> s_list_tensor_desc;
AttrUtils::GetListTensorDesc(s_op, "node_key8", s_list_tensor_desc);
ASSERT_EQ(s_list_tensor_desc.size(), 6);
EXPECT_EQ(s_list_tensor_desc[0].GetDataType(), DT_INT32);
EXPECT_EQ(s_list_tensor_desc[1].GetDataType(), DT_UINT32);
EXPECT_EQ(s_list_tensor_desc[2].GetDataType(), DT_INT64);
EXPECT_EQ(s_list_tensor_desc[3].GetDataType(), DT_UINT64);
EXPECT_EQ(s_list_tensor_desc[4].GetDataType(), DT_BOOL);
EXPECT_EQ(s_list_tensor_desc[5].GetDataType(), DT_DOUBLE);
}
}
TEST(UtestGeModelSerialize, op_desc) {
// node1_op
auto node1_op = std::make_shared<OpDesc>("node1", "Conv2D");
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 2, 64, 64, 16}), FORMAT_NC1HWC0, DT_FLOAT16));
node1_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
// Attr set
node1_op->SetAttr("node_key1", GeAttrValue::CreateFrom<GeAttrValue::BYTES>(Buffer(10)));
node1_op->SetAttr("node_key2", GeAttrValue::CreateFrom<GeAttrValue::LIST_BYTES>({Buffer(20), Buffer(30)}));
auto named_attrs1 = GeAttrValue::CreateFrom<GeAttrValue::NAMED_ATTRS>(
CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}));
node1_op->SetAttr("node_key3", std::move(named_attrs1));
auto list_named_attrs = GeAttrValue::CreateFrom<GeAttrValue::LIST_NAMED_ATTRS>(
{CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}),
CreateNamedAttrs("my_name2", {{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}})});
node1_op->SetAttr("node_key4", std::move(list_named_attrs));
ModelSerialize model_serialize;
Buffer buffer = model_serialize.SerializeOpDesc(node1_op);
EXPECT_TRUE(buffer.GetData() != nullptr);
auto s_op = model_serialize.UnserializeOpDesc(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(s_op != nullptr);
{
EXPECT_EQ(s_op->GetName(), "node1");
EXPECT_EQ(s_op->GetType(), "Conv2D");
auto s_input_descs = s_op->GetAllInputsDesc();
ASSERT_EQ(s_input_descs.size(), 2);
auto desc1 = s_input_descs.at(0);
EXPECT_EQ(desc1.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc1.GetDataType(), DT_FLOAT);
CompareShape(desc1.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
auto desc2 = s_input_descs.at(1);
EXPECT_EQ(desc2.GetFormat(), FORMAT_NC1HWC0);
EXPECT_EQ(desc2.GetDataType(), DT_FLOAT16);
CompareShape(desc2.GetShape().GetDims(), vector<int64_t>{12, 2, 64, 64, 16});
auto s_output_descs = s_op->GetAllOutputsDesc();
ASSERT_EQ(s_output_descs.size(), 1);
auto desc3 = s_output_descs.at(0);
EXPECT_EQ(desc3.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc3.GetDataType(), DT_FLOAT);
CompareShape(desc3.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
// node attrs
GeAttrValue::BYTES node_val1;
AttrUtils::GetBytes(s_op, "node_key1", node_val1);
ASSERT_EQ(node_val1.GetSize(), 10);
GeAttrValue::LIST_BYTES node_val2;
AttrUtils::GetListBytes(s_op, "node_key2", node_val2);
ASSERT_EQ(node_val2.size(), 2);
ASSERT_EQ(node_val2[0].GetSize(), 20);
ASSERT_EQ(node_val2[1].GetSize(), 30);
GeAttrValue s_named_attrs;
s_op->GetAttr("node_key3", s_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_named_attrs, named_attrs1));
GeAttrValue s_list_named_attrs;
s_op->GetAttr("node_key4", s_list_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_list_named_attrs, list_named_attrs));
}
}
TEST(UtestGeModelSerialize, opdesc_as_attr_value) {
// node1_op
auto node1_op = std::make_shared<OpDesc>("node1", "Conv2D");
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
node1_op->AddInputDesc(GeTensorDesc(GeShape({12, 2, 64, 64, 16}), FORMAT_NC1HWC0, DT_FLOAT16));
node1_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
// Attr set
node1_op->SetAttr("node_key1", GeAttrValue::CreateFrom<GeAttrValue::BYTES>(Buffer(10)));
node1_op->SetAttr("node_key2", GeAttrValue::CreateFrom<GeAttrValue::LIST_BYTES>({Buffer(20), Buffer(30)}));
auto named_attrs1 = GeAttrValue::CreateFrom<GeAttrValue::NAMED_ATTRS>(
CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}));
node1_op->SetAttr("node_key3", std::move(named_attrs1));
auto list_named_attrs = GeAttrValue::CreateFrom<GeAttrValue::LIST_NAMED_ATTRS>(
{CreateNamedAttrs("my_name", {{"int_val", GeAttrValue::CreateFrom<int64_t>(123)},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}}),
CreateNamedAttrs("my_name2", {{"str_val", GeAttrValue::CreateFrom<string>("abc")},
{"float_val", GeAttrValue::CreateFrom<GeAttrValue::FLOAT>(345.345)}})});
node1_op->SetAttr("node_key4", std::move(list_named_attrs));
Model model;
EXPECT_TRUE(AttrUtils::SetListOpDesc(&model, "my_key", vector<OpDescPtr>{node1_op}));
EXPECT_TRUE(AttrUtils::SetListInt(&model, "my_key2", {123}));
EXPECT_TRUE(AttrUtils::SetListBytes(&model, "my_key3", {Buffer(100)}));
vector<OpDescPtr> op_list;
EXPECT_FALSE(AttrUtils::GetListOpDesc(&model, "my_error_key", op_list));
EXPECT_FALSE(AttrUtils::GetListOpDesc(&model, "my_key2", op_list));
EXPECT_TRUE(AttrUtils::GetListOpDesc(&model, "my_key", op_list));
ASSERT_TRUE(op_list.size() > 0);
auto s_op = op_list[0];
{
EXPECT_EQ(s_op->GetName(), "node1");
EXPECT_EQ(s_op->GetType(), "Conv2D");
auto s_input_descs = s_op->GetAllInputsDesc();
ASSERT_EQ(s_input_descs.size(), 2);
auto desc1 = s_input_descs.at(0);
EXPECT_EQ(desc1.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc1.GetDataType(), DT_FLOAT);
CompareShape(desc1.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
auto desc2 = s_input_descs.at(1);
EXPECT_EQ(desc2.GetFormat(), FORMAT_NC1HWC0);
EXPECT_EQ(desc2.GetDataType(), DT_FLOAT16);
CompareShape(desc2.GetShape().GetDims(), vector<int64_t>{12, 2, 64, 64, 16});
auto s_output_descs = s_op->GetAllOutputsDesc();
ASSERT_EQ(s_output_descs.size(), 1);
auto desc3 = s_output_descs.at(0);
EXPECT_EQ(desc3.GetFormat(), FORMAT_NCHW);
EXPECT_EQ(desc3.GetDataType(), DT_FLOAT);
CompareShape(desc3.GetShape().GetDims(), vector<int64_t>{12, 32, 64, 64});
// node attrs
GeAttrValue::BYTES node_val1;
AttrUtils::GetBytes(s_op, "node_key1", node_val1);
ASSERT_EQ(node_val1.GetSize(), 10);
GeAttrValue::LIST_BYTES node_val2;
AttrUtils::GetListBytes(s_op, "node_key2", node_val2);
ASSERT_EQ(node_val2.size(), 2);
ASSERT_EQ(node_val2[0].GetSize(), 20);
ASSERT_EQ(node_val2[1].GetSize(), 30);
GeAttrValue s_named_attrs;
s_op->GetAttr("node_key3", s_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_named_attrs, named_attrs1));
GeAttrValue s_list_named_attrs;
s_op->GetAttr("node_key4", s_list_named_attrs);
EXPECT_TRUE(NamedAttrsSimpleCmp(s_list_named_attrs, list_named_attrs));
}
}
TEST(UtestGeModelSerialize, test_sub_graph) {
Model model("model_name", "custom version3.0");
{
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
auto sub_compute_graph = std::make_shared<ComputeGraph>("sub_graph");
// input
auto sub_graph_input_op = std::make_shared<OpDesc>("sub_graph_test", "TestOp2");
sub_graph_input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto sub_graph_input = CreateNode(sub_graph_input_op, sub_compute_graph);
AttrUtils::SetGraph(input_op, "sub_graph", sub_compute_graph);
}
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
ASSERT_GE(buffer.GetSize(), 0);
ASSERT_GE(serialize.GetSerializeModelSize(model), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.GetGraph().IsValid());
auto graph2 = GraphUtils::GetComputeGraph(model2.GetGraph());
EXPECT_EQ(graph2->GetName(), "graph_name");
auto nodes2 = graph2->GetDirectNode();
ASSERT_EQ(nodes2.size(), 1);
auto node2 = nodes2.at(0);
EXPECT_EQ(node2->GetName(), "test");
auto node2_op = node2->GetOpDesc();
EXPECT_EQ(node2_op->GetType(), "TestOp");
auto node2_input_descs = node2_op->GetAllInputsDesc();
ASSERT_EQ(node2_input_descs.size(), 1);
auto node2_input_desc = node2_input_descs.at(0);
ComputeGraphPtr sub_compute_graph2;
ASSERT_TRUE(AttrUtils::GetGraph(node2_op, "sub_graph", sub_compute_graph2));
EXPECT_EQ(sub_compute_graph2->GetName(), "sub_graph");
auto sub_nodes2 = sub_compute_graph2->GetDirectNode();
ASSERT_EQ(sub_nodes2.size(), 1);
auto sub_node2 = sub_nodes2.at(0);
EXPECT_EQ(sub_node2->GetName(), "sub_graph_test");
ASSERT_EQ(sub_node2->GetAllInDataAnchors().size(), 1);
auto sub_node_op2 = sub_node2->GetOpDesc();
EXPECT_EQ(sub_node_op2->GetType(), "TestOp2");
ASSERT_EQ(sub_node_op2->GetAllInputsDesc().size(), 1);
auto sub_node2_input_desc = sub_node_op2->GetAllInputsDesc().at(0);
EXPECT_EQ(sub_node2_input_desc.GetShape().GetDim(1), 32);
}
TEST(UtestGeModelSerialize, test_list_sub_graph) {
Model model("model_name", "custom version3.0");
{
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
auto sub_compute_graph1 = std::make_shared<ComputeGraph>("sub_graph1");
// input
auto sub_graph_input_op1 = std::make_shared<OpDesc>("sub_graph_test1", "TestOp2");
sub_graph_input_op1->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto sub_graph_input1 = CreateNode(sub_graph_input_op1, sub_compute_graph1);
auto sub_compute_graph2 = std::make_shared<ComputeGraph>("sub_graph2");
// input
auto sub_graph_input_op2 = std::make_shared<OpDesc>("sub_graph_test2", "TestOp2");
sub_graph_input_op2->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto sub_graph_input2 = CreateNode(sub_graph_input_op2, sub_compute_graph2);
AttrUtils::SetListGraph(input_op, "sub_graph", vector<ComputeGraphPtr>{sub_compute_graph1, sub_compute_graph2});
}
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
ASSERT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.GetGraph().IsValid());
auto graph2 = GraphUtils::GetComputeGraph(model2.GetGraph());
EXPECT_EQ(graph2->GetName(), "graph_name");
auto nodes2 = graph2->GetDirectNode();
ASSERT_EQ(nodes2.size(), 1);
auto node2 = nodes2.at(0);
auto node2_op = node2->GetOpDesc();
vector<ComputeGraphPtr> list_sub_compute_graph;
ASSERT_TRUE(AttrUtils::GetListGraph(node2_op, "sub_graph", list_sub_compute_graph));
ASSERT_EQ(list_sub_compute_graph.size(), 2);
EXPECT_EQ(list_sub_compute_graph[0]->GetName(), "sub_graph1");
EXPECT_EQ(list_sub_compute_graph[1]->GetName(), "sub_graph2");
auto sub_nodes21 = list_sub_compute_graph[0]->GetDirectNode();
ASSERT_EQ(sub_nodes21.size(), 1);
auto sub_node21 = sub_nodes21.at(0);
EXPECT_EQ(sub_node21->GetName(), "sub_graph_test1");
auto sub_nodes22 = list_sub_compute_graph[1]->GetDirectNode();
ASSERT_EQ(sub_nodes22.size(), 1);
auto sub_node22 = sub_nodes22.at(0);
EXPECT_EQ(sub_node22->GetName(), "sub_graph_test2");
}
TEST(UtestGeModelSerialize, test_format) {
Model model("model_name", "custom version3.0");
{
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NHWC, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_ND, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NC1HWC0, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_FRACTAL_Z, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NC1C0HWPAD, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NHWC1C0, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_FSR_NCHW, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_FRACTAL_DECONV, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_BN_WEIGHT, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_CHWN, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_FILTER_HWCK, DT_FLOAT));
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_FRACTAL_Z_C04, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
model.SetGraph(GraphUtils::CreateGraphFromComputeGraph(compute_graph));
}
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
ASSERT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.GetGraph().IsValid());
auto graph = model2.GetGraph();
ASSERT_TRUE(GraphUtils::GetComputeGraph(graph) != nullptr);
ASSERT_EQ(GraphUtils::GetComputeGraph(graph)->GetDirectNode().size(), 1);
auto op = GraphUtils::GetComputeGraph(graph)->GetDirectNode().at(0)->GetOpDesc();
auto input_descs = op->GetAllInputsDesc();
ASSERT_EQ(input_descs.size(), 13);
EXPECT_EQ(input_descs.at(0).GetFormat(), FORMAT_NCHW);
EXPECT_EQ(input_descs.at(1).GetFormat(), FORMAT_NHWC);
EXPECT_EQ(input_descs.at(2).GetFormat(), FORMAT_ND);
EXPECT_EQ(input_descs.at(3).GetFormat(), FORMAT_NC1HWC0);
EXPECT_EQ(input_descs.at(4).GetFormat(), FORMAT_FRACTAL_Z);
EXPECT_EQ(input_descs.at(5).GetFormat(), FORMAT_NC1C0HWPAD);
EXPECT_EQ(input_descs.at(6).GetFormat(), FORMAT_NHWC1C0);
EXPECT_EQ(input_descs.at(7).GetFormat(), FORMAT_FSR_NCHW);
EXPECT_EQ(input_descs.at(8).GetFormat(), FORMAT_FRACTAL_DECONV);
EXPECT_EQ(input_descs.at(9).GetFormat(), FORMAT_BN_WEIGHT);
EXPECT_EQ(input_descs.at(10).GetFormat(), FORMAT_CHWN);
EXPECT_EQ(input_descs.at(11).GetFormat(), FORMAT_FILTER_HWCK);
EXPECT_EQ(input_descs.at(12).GetFormat(), FORMAT_FRACTAL_Z_C04);
}
TEST(UtestGeModelSerialize, test_control_edge) {
Model model("model_name", "custom version3.0");
{
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
// sink
auto sink_op = std::make_shared<OpDesc>("test2", "Sink");
auto sink = CreateNode(sink_op, compute_graph);
LinkEdge(sink, -1, input, -1);
// sink2
auto sink_op2 = std::make_shared<OpDesc>("test3", "Sink");
auto sink2 = CreateNode(sink_op2, compute_graph);
LinkEdge(sink2, -1, input, -1);
// dest
auto dest_op = std::make_shared<OpDesc>("test4", "Dest");
auto dest = CreateNode(dest_op, compute_graph);
LinkEdge(input, -1, dest, -1);
compute_graph->AddInputNode(sink);
compute_graph->AddInputNode(sink2);
compute_graph->AddOutputNode(dest);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
}
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.GetGraph().IsValid());
auto graph = GraphUtils::GetComputeGraph(model2.GetGraph());
EXPECT_EQ(graph->GetName(), "graph_name");
auto nodes = graph->GetDirectNode();
ASSERT_EQ(nodes.size(), 4);
auto node1 = nodes.at(0);
auto sink = nodes.at(1);
auto sink2 = nodes.at(2);
auto dest = nodes.at(3);
EXPECT_EQ(node1->GetName(), "test");
EXPECT_EQ(sink->GetName(), "test2");
ASSERT_EQ(node1->GetAllInDataAnchors().size(), 1);
auto anchor1 = node1->GetAllInDataAnchors().at(0);
EXPECT_EQ(anchor1->GetPeerAnchors().size(), 0);
auto contorl_in_anchor1 = node1->GetInControlAnchor();
ASSERT_EQ(contorl_in_anchor1->GetPeerAnchors().size(), 2);
EXPECT_EQ(contorl_in_anchor1->GetPeerAnchors().at(0)->GetOwnerNode(), sink);
EXPECT_EQ(contorl_in_anchor1->GetPeerAnchors().at(1)->GetOwnerNode(), sink2);
auto contorl_out_anchor1 = node1->GetOutControlAnchor();
ASSERT_EQ(contorl_out_anchor1->GetPeerAnchors().size(), 1);
EXPECT_EQ(contorl_out_anchor1->GetPeerAnchors().at(0)->GetOwnerNode(), dest);
auto input_nodes = graph->GetInputNodes();
ASSERT_EQ(input_nodes.size(), 2);
EXPECT_EQ(input_nodes.at(0), sink);
EXPECT_EQ(input_nodes.at(1), sink2);
auto output_nodes = graph->GetOutputNodes();
ASSERT_EQ(output_nodes.size(), 1);
EXPECT_EQ(output_nodes.at(0), dest);
}
TEST(UtestGeModelSerialize, test_serialize_graph) {
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
{
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddInputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
// sink
auto sink_op = std::make_shared<OpDesc>("test2", "Sink");
auto sink = CreateNode(sink_op, compute_graph);
LinkEdge(sink, -1, input, -1);
// sink2
auto sink_op2 = std::make_shared<OpDesc>("test3", "Sink");
auto sink2 = CreateNode(sink_op2, compute_graph);
LinkEdge(sink2, -1, input, -1);
// dest
auto dest_op = std::make_shared<OpDesc>("test4", "Dest");
auto dest = CreateNode(dest_op, compute_graph);
LinkEdge(input, -1, dest, -1);
compute_graph->AddInputNode(sink);
compute_graph->AddInputNode(sink2);
compute_graph->AddOutputNode(dest);
}
ModelSerialize serialize;
auto buffer = serialize.SerializeGraph(compute_graph);
EXPECT_GE(buffer.GetSize(), 0);
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(graph != nullptr);
EXPECT_EQ(graph->GetName(), "graph_name");
auto nodes = graph->GetDirectNode();
ASSERT_EQ(nodes.size(), 4);
auto node1 = nodes.at(0);
auto sink = nodes.at(1);
auto sink2 = nodes.at(2);
auto dest = nodes.at(3);
EXPECT_EQ(node1->GetName(), "test");
EXPECT_EQ(sink->GetName(), "test2");
ASSERT_EQ(node1->GetAllInDataAnchors().size(), 1);
auto anchor1 = node1->GetAllInDataAnchors().at(0);
EXPECT_EQ(anchor1->GetPeerAnchors().size(), 0);
auto contorl_in_anchor1 = node1->GetInControlAnchor();
ASSERT_EQ(contorl_in_anchor1->GetPeerAnchors().size(), 2);
EXPECT_EQ(contorl_in_anchor1->GetPeerAnchors().at(0)->GetOwnerNode(), sink);
EXPECT_EQ(contorl_in_anchor1->GetPeerAnchors().at(1)->GetOwnerNode(), sink2);
auto contorl_out_anchor1 = node1->GetOutControlAnchor();
ASSERT_EQ(contorl_out_anchor1->GetPeerAnchors().size(), 1);
EXPECT_EQ(contorl_out_anchor1->GetPeerAnchors().at(0)->GetOwnerNode(), dest);
auto input_nodes = graph->GetInputNodes();
ASSERT_EQ(input_nodes.size(), 2);
EXPECT_EQ(input_nodes.at(0), sink);
EXPECT_EQ(input_nodes.at(1), sink2);
auto output_nodes = graph->GetOutputNodes();
ASSERT_EQ(output_nodes.size(), 1);
EXPECT_EQ(output_nodes.at(0), dest);
}
TEST(UtestGeModelSerialize, test_invalid_model) {
{ // empty graph
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_EQ(buffer.GetSize(), 0);
}
}
TEST(UtestGeModelSerialize, test_invalid_graph) {
{ // empty graph
ComputeGraphPtr graph = nullptr;
ModelSerialize serialize;
auto buffer = serialize.SerializeGraph(graph);
EXPECT_EQ(buffer.GetSize(), 0);
}
}
TEST(UtestGeModelSerialize, test_invalid_opdesc) {
{ // empty OpDesc
OpDescPtr op_desc = nullptr;
ModelSerialize serialize;
auto buffer = serialize.SerializeOpDesc(op_desc);
EXPECT_EQ(buffer.GetSize(), 0);
}
}
TEST(UtestGeModelSerialize, test_invalid_tensor_desc) {
{ // valid test
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_GE(buffer.GetSize(), 0);
}
{ // invalid format
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_RESERVED, DT_FLOAT)); // invalid format
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
ASSERT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.IsValid());
auto graph_new = GraphUtils::GetComputeGraph(model2.GetGraph());
ASSERT_TRUE(graph_new != nullptr);
auto node_list_new = graph_new->GetAllNodes();
ASSERT_EQ(node_list_new.size(), 1);
auto opdesc_new = node_list_new.at(0)->GetOpDesc();
ASSERT_TRUE(opdesc_new != nullptr);
auto output_desc_list_new = opdesc_new->GetAllOutputsDesc();
ASSERT_EQ(output_desc_list_new.size(), 1);
auto output_desc_new = output_desc_list_new.at(0);
EXPECT_EQ(output_desc_new.GetDataType(), DT_FLOAT);
EXPECT_EQ(output_desc_new.GetFormat(), FORMAT_RESERVED);
}
{ // DT_UNDEFINED datatype
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_UNDEFINED));
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
ASSERT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(model2.IsValid());
auto graph_new = GraphUtils::GetComputeGraph(model2.GetGraph());
ASSERT_TRUE(graph_new != nullptr);
auto node_list_new = graph_new->GetAllNodes();
ASSERT_EQ(node_list_new.size(), 1);
auto opdesc_new = node_list_new.at(0)->GetOpDesc();
ASSERT_TRUE(opdesc_new != nullptr);
auto output_desc_list_new = opdesc_new->GetAllOutputsDesc();
ASSERT_EQ(output_desc_list_new.size(), 1);
auto output_desc_new = output_desc_list_new.at(0);
EXPECT_EQ(output_desc_new.GetDataType(), DT_UNDEFINED);
EXPECT_EQ(output_desc_new.GetFormat(), FORMAT_NCHW);
}
}
TEST(UtestGeModelSerialize, test_invalid_attrs) {
{ // valid test
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
named_attrs.SetAttr("key1", GeAttrValue::CreateFrom<GeAttrValue::INT>(10));
AttrUtils::SetNamedAttrs(input_op, "key", named_attrs);
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_GE(buffer.GetSize(), 0);
}
{ // none type
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
EXPECT_EQ(named_attrs.SetAttr("key1", GeAttrValue()), GRAPH_FAILED);
}
{ // bytes attr len is 0
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
named_attrs.SetAttr("key1", GeAttrValue::CreateFrom<GeAttrValue::BYTES>(GeAttrValue::BYTES(0)));
AttrUtils::SetNamedAttrs(input_op, "key", named_attrs);
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_GE(buffer.GetSize(), 0);
auto model2 = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_TRUE(model2.IsValid());
}
{ // invalid list bytes attr
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
named_attrs.SetAttr("key1", GeAttrValue::CreateFrom<GeAttrValue::LIST_BYTES>({GeAttrValue::BYTES(0)}));
AttrUtils::SetNamedAttrs(input_op, "key", named_attrs);
auto input = CreateNode(input_op, compute_graph);
Graph graph = GraphUtils::CreateGraphFromComputeGraph(compute_graph);
model.SetGraph(graph);
ModelSerialize serialize;
auto buffer = serialize.SerializeModel(model);
EXPECT_GE(buffer.GetSize(), 0);
}
{ // invalid graph attr
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
EXPECT_EQ(named_attrs.SetAttr("key1", GeAttrValue::CreateFrom<GeAttrValue::GRAPH>(nullptr)), GRAPH_FAILED);
GeAttrValue value;
EXPECT_EQ(named_attrs.GetAttr("key1", value), GRAPH_FAILED);
EXPECT_TRUE(value.IsEmpty());
}
{ // invalid list graph attr
Model model("model_name", "custom version3.0");
auto compute_graph = std::make_shared<ComputeGraph>("graph_name");
// input
auto input_op = std::make_shared<OpDesc>("test", "TestOp");
input_op->AddOutputDesc(GeTensorDesc(GeShape({12, 32, 64, 64}), FORMAT_NCHW, DT_FLOAT));
GeAttrValue::NamedAttrs named_attrs;
EXPECT_EQ(named_attrs.SetAttr("key1", GeAttrValue::CreateFrom<GeAttrValue::LIST_GRAPH>({nullptr})), GRAPH_FAILED);
GeAttrValue value;
EXPECT_EQ(named_attrs.GetAttr("key1", value), GRAPH_FAILED);
EXPECT_TRUE(value.IsEmpty());
}
}
TEST(UtestGeModelSerialize, test_model_serialize_imp_invalid_param) {
ModelSerializeImp imp;
EXPECT_FALSE(imp.SerializeModel(Model(), nullptr));
EXPECT_FALSE(imp.SerializeGraph(nullptr, nullptr));
EXPECT_FALSE(imp.SerializeNode(nullptr, nullptr));
EXPECT_FALSE(imp.SerializeOpDesc(nullptr, nullptr));
auto graph = std::make_shared<ComputeGraph>("test_graph");
auto node = graph->AddNode(std::make_shared<OpDesc>());
node->op_ = nullptr;
proto::ModelDef model_def;
Model model;
model.SetGraph(GraphUtils::CreateGraphFromComputeGraph(graph));
EXPECT_FALSE(imp.SerializeModel(model, &model_def));
ModelSerialize serialize;
EXPECT_EQ(serialize.GetSerializeModelSize(model), 0);
}
TEST(UtestGeModelSerialize, test_parse_node_false) {
ModelSerializeImp imp;
string node_index = "invalid_index";
string node_name = "name";
int32_t index = 1;
EXPECT_EQ(imp.ParseNodeIndex(node_index, node_name, index), false);
}
TEST(UtestGeModelSerialize, test_invalid_tensor) {
ModelSerializeImp imp;
EXPECT_EQ(imp.SerializeTensor(nullptr, nullptr), false);
try {
ConstGeTensorPtr tensor_ptr = std::make_shared<GeTensor>();
EXPECT_EQ(imp.SerializeTensor(tensor_ptr, nullptr), false);
} catch (...) {
}
}
TEST(UTEST_ge_model_unserialize, test_invalid_tensor) {
ModelSerializeImp imp;
EXPECT_EQ(imp.SerializeTensor(nullptr, nullptr), false);
try {
ConstGeTensorPtr tensor_ptr = std::make_shared<GeTensor>();
EXPECT_EQ(imp.SerializeTensor(tensor_ptr, nullptr), false);
} catch (...) {
}
}
TEST(UTEST_ge_model_unserialize, test_invalid_TensorDesc) {
{ // valid
proto::ModelDef mode_def;
auto attrs = mode_def.mutable_attr();
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_td();
tensor_desc_attr->set_layout("NCHW");
tensor_desc_attr->set_dtype(proto::DataType::DT_INT8);
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
}
{ // invalid layout
proto::ModelDef mode_def;
auto attrs = mode_def.mutable_attr();
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_td();
tensor_desc_attr->set_layout("InvalidLayout");
tensor_desc_attr->set_dtype(proto::DataType::DT_INT8);
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
GeTensorDesc tensor_desc;
EXPECT_TRUE(AttrUtils::GetTensorDesc(model, "key1", tensor_desc));
EXPECT_EQ(tensor_desc.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc.GetDataType(), DT_INT8);
}
{ // invalid datatype
proto::ModelDef mode_def;
auto attrs = mode_def.mutable_attr();
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_td(); // tensor desc
tensor_desc_attr->set_layout("NHWC");
tensor_desc_attr->set_dtype((proto::DataType)100);
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
GeTensorDesc tensor_desc;
EXPECT_TRUE(AttrUtils::GetTensorDesc(model, "key1", tensor_desc));
EXPECT_EQ(tensor_desc.GetFormat(), FORMAT_NHWC);
EXPECT_EQ(tensor_desc.GetDataType(), DT_UNDEFINED);
}
{ // invalid datatype
proto::ModelDef mode_def;
auto attrs = mode_def.mutable_attr();
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_t()->mutable_desc(); // tensor
tensor_desc_attr->set_layout("NHWC");
tensor_desc_attr->set_dtype((proto::DataType)100);
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
ConstGeTensorPtr tensor;
EXPECT_TRUE(AttrUtils::GetTensor(model, "key1", tensor));
ASSERT_TRUE(tensor != nullptr);
auto tensor_desc = tensor->GetTensorDesc();
EXPECT_EQ(tensor_desc.GetFormat(), FORMAT_NHWC);
EXPECT_EQ(tensor_desc.GetDataType(), DT_UNDEFINED);
}
{ // invalid attrmap
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->mutable_attr(); // graph attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_t()->mutable_desc(); // tensor
tensor_desc_attr->set_layout("NCHW");
tensor_desc_attr->set_dtype(proto::DataType::DT_INT8);
auto attrs1 = tensor_desc_attr->mutable_attr();
auto attr1 = (*attrs1)["key2"]; // empty attr
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
ConstGeTensorPtr tensor;
EXPECT_TRUE(AttrUtils::GetTensor(graph, "key1", tensor));
ASSERT_TRUE(tensor != nullptr);
auto tensor_desc = tensor->GetTensorDesc();
GeAttrValue attr_value;
EXPECT_EQ(tensor_desc.GetAttr("key2", attr_value), GRAPH_SUCCESS);
EXPECT_EQ(attr_value.GetValueType(), GeAttrValue::VT_NONE);
}
{ // invalid attrmap2
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto tensor_desc_attr = attr_def->mutable_t()->mutable_desc(); // tensor
tensor_desc_attr->set_layout("NCHW");
tensor_desc_attr->set_dtype(proto::DataType::DT_INT8);
auto attrs1 = tensor_desc_attr->mutable_attr();
auto attr1 = (*attrs1)["key2"].mutable_list(); // empty list attr
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
ConstGeTensorPtr tensor;
EXPECT_TRUE(AttrUtils::GetTensor(nodes.at(0)->GetOpDesc(), "key1", tensor));
ASSERT_TRUE(tensor != nullptr);
auto tensor_desc = tensor->GetTensorDesc();
GeAttrValue attr_value;
EXPECT_EQ(tensor_desc.GetAttr("key2", attr_value), GRAPH_SUCCESS);
EXPECT_EQ(attr_value.GetValueType(), GeAttrValue::VT_NONE);
}
}
TEST(UTEST_ge_model_unserialize, test_invalid_attr) {
{ // invalid graph
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto graph_attr = attr_def->mutable_g();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
ComputeGraphPtr graph_attr_new;
EXPECT_TRUE(AttrUtils::GetGraph(nodes.at(0)->GetOpDesc(), "key1", graph_attr_new));
ASSERT_TRUE(graph_attr_new != nullptr);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(graph_attr_new, "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid list graph
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
attr_def->mutable_list()->set_val_type(ge::proto::AttrDef_ListValue_ListValueType_VT_LIST_GRAPH);
auto graph_attr = attr_def->mutable_list()->add_g();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
vector<ComputeGraphPtr> graph_list_attr;
EXPECT_TRUE(AttrUtils::GetListGraph(nodes.at(0)->GetOpDesc(), "key1", graph_list_attr));
ASSERT_EQ(graph_list_attr.size(), 1);
ASSERT_TRUE(graph_list_attr[0] != nullptr);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(graph_list_attr[0], "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid named_attrs
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto graph_attr = attr_def->mutable_func();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
GeAttrValue::NAMED_ATTRS named_attrs;
EXPECT_TRUE(AttrUtils::GetNamedAttrs(nodes.at(0)->GetOpDesc(), "key1", named_attrs));
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(named_attrs, "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid list named_attrs
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
attr_def->mutable_list()->set_val_type(ge::proto::AttrDef_ListValue_ListValueType_VT_LIST_NAMED_ATTRS);
auto graph_attr = attr_def->mutable_list()->add_na();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
GeAttrValue::LIST_NAMED_ATTRS named_attrs;
EXPECT_TRUE(AttrUtils::GetListNamedAttrs(nodes.at(0)->GetOpDesc(), "key1", named_attrs));
ASSERT_EQ(named_attrs.size(), 1);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(named_attrs.at(0), "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid tensor_desc
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto graph_attr = attr_def->mutable_td();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
GeTensorDesc tensor_desc;
EXPECT_TRUE(AttrUtils::GetTensorDesc(nodes.at(0)->GetOpDesc(), "key1", tensor_desc));
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(tensor_desc, "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid list tensor_desc
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
attr_def->mutable_list()->set_val_type(ge::proto::AttrDef_ListValue_ListValueType_VT_LIST_TENSOR_DESC);
auto graph_attr = attr_def->mutable_list()->add_td();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
vector<GeTensorDesc> tensor_desc;
EXPECT_TRUE(AttrUtils::GetListTensorDesc(nodes.at(0)->GetOpDesc(), "key1", tensor_desc));
ASSERT_EQ(tensor_desc.size(), 1);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(tensor_desc.at(0), "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid tensor
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
auto graph_attr = attr_def->mutable_t()->mutable_desc();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
ConstGeTensorPtr tensor;
EXPECT_TRUE(AttrUtils::GetTensor(nodes.at(0)->GetOpDesc(), "key1", tensor));
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(tensor->GetTensorDesc(), "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid list tensor
proto::ModelDef mode_def;
auto attrs = mode_def.add_graph()->add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
attr_def->mutable_list()->set_val_type(ge::proto::AttrDef_ListValue_ListValueType_VT_LIST_TENSOR);
auto graph_attr = attr_def->mutable_list()->add_t()->mutable_desc();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Model model;
EXPECT_TRUE(imp.UnserializeModel(model, mode_def));
auto graph = GraphUtils::GetComputeGraph(model.GetGraph());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
vector<ConstGeTensorPtr> tensor;
EXPECT_TRUE(AttrUtils::GetListTensor(nodes.at(0)->GetOpDesc(), "key1", tensor));
ASSERT_EQ(tensor.size(), 1);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(tensor.at(0)->GetTensorDesc(), "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
{ // invalid list tensor
proto::GraphDef graph_def;
auto attrs = graph_def.add_op()->mutable_attr(); // node attr
proto::AttrDef *attr_def = &(*attrs)["key1"];
attr_def->mutable_list()->set_val_type(ge::proto::AttrDef_ListValue_ListValueType_VT_LIST_TENSOR);
auto graph_attr = attr_def->mutable_list()->add_t()->mutable_desc();
auto attrs_of_graph = graph_attr->mutable_attr();
auto tensor_val = (*attrs_of_graph)["key2"].mutable_td();
tensor_val->set_dtype(proto::DT_INT8);
tensor_val->set_layout("invalidLayout");
ModelSerializeImp imp;
Buffer buffer(graph_def.ByteSizeLong());
graph_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
ASSERT_TRUE(graph != nullptr);
auto nodes = graph->GetAllNodes();
ASSERT_EQ(nodes.size(), 1);
vector<ConstGeTensorPtr> tensor;
EXPECT_TRUE(AttrUtils::GetListTensor(nodes.at(0)->GetOpDesc(), "key1", tensor));
ASSERT_EQ(tensor.size(), 1);
GeTensorDesc tensor_desc1;
EXPECT_TRUE(AttrUtils::GetTensorDesc(tensor.at(0)->GetTensorDesc(), "key2", tensor_desc1));
EXPECT_EQ(tensor_desc1.GetFormat(), FORMAT_RESERVED);
EXPECT_EQ(tensor_desc1.GetDataType(), DT_INT8);
}
}
TEST(UTEST_ge_model_unserialize, test_invalid_input_output) {
// model invalid node input
{
proto::ModelDef model_def;
auto op_def = model_def.add_graph()->add_op(); // node attr
op_def->add_input("invalidNodeName:0");
Buffer buffer(model_def.ByteSizeLong());
model_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto model = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(model.IsValid());
}
// model invalid node control input
{
proto::ModelDef model_def;
auto op_def = model_def.add_graph()->add_op(); // node attr
op_def->add_input("invalidNodeName:-1");
Buffer buffer(model_def.ByteSizeLong());
model_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto model = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(model.IsValid());
}
// model invalid graph input
{
proto::ModelDef model_def;
model_def.add_graph()->add_input("invalidNodeName:0");
Buffer buffer(model_def.ByteSizeLong());
model_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto model = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(model.IsValid());
}
// model invalid graph input
{
proto::ModelDef model_def;
model_def.add_graph()->add_output("invalidNodeName:0");
Buffer buffer(model_def.ByteSizeLong());
model_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto model = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(model.IsValid());
}
// graph invalid node input
{
proto::GraphDef graph_def;
auto op_def = graph_def.add_op(); // node attr
op_def->add_input("invalidNodeName:0");
Buffer buffer(graph_def.ByteSizeLong());
graph_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(graph != nullptr);
}
// graph invalid node control input
{
proto::GraphDef graph_def;
auto op_def = graph_def.add_op(); // node attr
op_def->add_input("invalidNodeName:-1");
Buffer buffer(graph_def.ByteSizeLong());
graph_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(graph != nullptr);
}
// graph invalid graph input
{
proto::GraphDef graph_def;
graph_def.add_input("invalidNodeName:0");
Buffer buffer(graph_def.ByteSizeLong());
graph_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(graph != nullptr);
}
// graph invalid graph output
{
proto::GraphDef graph_def;
graph_def.add_output("invalidNodeName:0");
Buffer buffer(graph_def.ByteSizeLong());
graph_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(graph != nullptr);
}
// model invalid node input anchor
{
proto::ModelDef model_def;
auto graph_def = model_def.add_graph();
auto node_def1 = graph_def->add_op(); // node attr
node_def1->set_name("node1");
auto node_def2 = graph_def->add_op(); // node attr
node_def2->add_input("node1:0");
Buffer buffer(model_def.ByteSizeLong());
model_def.SerializeToArray(buffer.GetData(), static_cast<int>(buffer.GetSize()));
ModelSerialize serialize;
auto model = serialize.UnserializeModel(buffer.GetData(), buffer.GetSize());
EXPECT_FALSE(model.IsValid());
}
}
TEST(UTEST_ge_model_unserialize, test_invalid_CodeBuffer) {
{
char buffer[100] = "sdfasf";
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph((uint8_t *)buffer, 100);
EXPECT_FALSE(graph != nullptr);
}
{
char buffer[100] = "sdfasf";
ModelSerialize serialize;
auto model = serialize.UnserializeModel((uint8_t *)buffer, 100);
EXPECT_FALSE(model.IsValid());
}
{
char buffer[100] = "sdfasf";
ModelSerialize serialize;
auto op_desc = serialize.UnserializeOpDesc((uint8_t *)buffer, 100);
EXPECT_FALSE(op_desc != nullptr);
}
{
ModelSerialize serialize;
auto graph = serialize.UnserializeGraph((uint8_t *)nullptr, 100);
EXPECT_FALSE(graph != nullptr);
}
{
ModelSerialize serialize;
auto model = serialize.UnserializeModel((uint8_t *)nullptr, 100);
EXPECT_FALSE(model.IsValid());
}
{
ModelSerialize serialize;
auto op_desc = serialize.UnserializeOpDesc((uint8_t *)nullptr, 100);
EXPECT_FALSE(op_desc != nullptr);
}
}
| 65,591 | 25,382 |
#include "win_misc.h"
void usleep(int usec) {
Sleep((usec + 999)/1000);
}
int getpagesize(void) {
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwPageSize;
}
bool ftruncate(const winapi::File& fd, int64_t length) {
bool b = fd.setFilePointerEx(length, NULL, FILE_BEGIN);
if ( !b ) return false;
return fd.setEndOfFile();
}
| 344 | 155 |
/*
* trade_pair_t.hpp
*
* Created on: Jan 22, 2022
* Author: mad
*/
#ifndef INCLUDE_MMX_EXCHANGE_TRADE_PAIR_T_HPP_
#define INCLUDE_MMX_EXCHANGE_TRADE_PAIR_T_HPP_
#include <mmx/exchange/trade_pair_t.hxx>
namespace mmx {
namespace exchange {
inline
trade_pair_t trade_pair_t::reverse() const
{
trade_pair_t pair;
pair.ask = bid;
pair.bid = ask;
return pair;
}
inline
trade_pair_t trade_pair_t::create_ex(const addr_t& bid, const addr_t& ask)
{
trade_pair_t pair;
pair.bid = bid;
pair.ask = ask;
return pair;
}
inline
bool operator==(const trade_pair_t& lhs, const trade_pair_t& rhs) {
return lhs.bid == rhs.bid && lhs.ask == rhs.ask;
}
inline
bool operator<(const trade_pair_t& lhs, const trade_pair_t& rhs) {
if(lhs.bid == rhs.bid) {
return lhs.ask < rhs.ask;
}
return lhs.bid < rhs.bid;
}
} // exchange
} // mmx
#endif /* INCLUDE_MMX_EXCHANGE_TRADE_PAIR_T_HPP_ */
| 900 | 414 |
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <fidl/fidl.cpp.wire.interop.test/cpp/fidl.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/fidl/cpp/client.h>
#include <lib/stdcompat/string_view.h>
#include <zircon/assert.h>
#include <vector>
#include <zxtest/zxtest.h>
namespace {
class WireTestBase : public fidl::WireServer<fidl_cpp_wire_interop_test::Interop> {
void RoundTrip(RoundTripRequestView request, RoundTripCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
void TryRoundTrip(TryRoundTripRequestView request,
TryRoundTripCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
void OneWay(OneWayRequestView request, OneWayCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
};
class MockData {
public:
// Helpers to build mock domain objects and test that they are equal to expected.
static fidl_cpp_wire_interop_test::Node MakeNaturalFile();
static fidl_cpp_wire_interop_test::wire::Node MakeWireFile(fidl::AnyArena& arena);
static void CheckNaturalFile(const fidl_cpp_wire_interop_test::Node& node);
static void CheckWireFile(const fidl_cpp_wire_interop_test::wire::Node& node);
static fidl_cpp_wire_interop_test::Node MakeNaturalDir();
static fidl_cpp_wire_interop_test::wire::Node MakeWireDir(fidl::AnyArena& arena);
static void CheckNaturalDir(const fidl_cpp_wire_interop_test::Node& node);
static void CheckWireDir(const fidl_cpp_wire_interop_test::wire::Node& node);
private:
const static char kFileName[9];
static std::vector<uint8_t> kFileContent;
static const char kDirName[8];
};
const char MockData::kFileName[9] = "foo file";
std::vector<uint8_t> MockData::kFileContent = {1, 2, 3};
const char MockData::kDirName[8] = "bar dir";
fidl_cpp_wire_interop_test::Node MockData::MakeNaturalFile() {
fidl_cpp_wire_interop_test::Node node;
node.name() = kFileName;
node.kind() = fidl_cpp_wire_interop_test::Kind::WithFile({{.content = kFileContent}});
return node;
}
fidl_cpp_wire_interop_test::wire::Node MockData::MakeWireFile(fidl::AnyArena& arena) {
auto kind = fidl_cpp_wire_interop_test::wire::Kind::WithFile(arena);
kind.file().content = fidl::VectorView<uint8_t>::FromExternal(kFileContent);
return fidl_cpp_wire_interop_test::wire::Node::Builder(arena).name(kFileName).kind(kind).Build();
}
void MockData::CheckNaturalFile(const fidl_cpp_wire_interop_test::Node& node) {
ASSERT_TRUE(node.name().has_value());
EXPECT_EQ(kFileName, node.name());
ASSERT_TRUE(node.kind().has_value());
EXPECT_EQ(fidl_cpp_wire_interop_test::Kind::Tag::kFile, node.kind()->Which());
EXPECT_EQ(kFileContent, node.kind()->file()->content());
}
void MockData::CheckWireFile(const fidl_cpp_wire_interop_test::wire::Node& node) {
ASSERT_TRUE(node.has_name());
EXPECT_EQ(fidl::StringView{kFileName}.get(), node.name().get());
ASSERT_TRUE(node.has_kind());
EXPECT_EQ(fidl_cpp_wire_interop_test::wire::Kind::Tag::kFile, node.kind().Which());
std::vector<uint8_t> content(node.kind().file().content.begin(),
node.kind().file().content.end());
EXPECT_EQ(kFileContent, content);
}
fidl_cpp_wire_interop_test::Node MockData::MakeNaturalDir() {
fidl_cpp_wire_interop_test::Node node;
node.name() = kDirName;
fidl_cpp_wire_interop_test::Node child = MakeNaturalFile();
fidl_cpp_wire_interop_test::Directory directory;
directory.children() = std::make_unique<fidl_cpp_wire_interop_test::Children>();
directory.children()->elements().emplace_back(std::move(child));
node.kind() = fidl_cpp_wire_interop_test::Kind::WithDirectory(std::move(directory));
return node;
}
fidl_cpp_wire_interop_test::wire::Node MockData::MakeWireDir(fidl::AnyArena& arena) {
auto node = fidl_cpp_wire_interop_test::wire::Node::Builder(arena)
.name(kDirName)
.kind(fidl_cpp_wire_interop_test::wire::Kind::WithDirectory(arena))
.Build();
fidl::ObjectView<fidl_cpp_wire_interop_test::wire::Children>& children =
node.kind().directory().children;
children.Allocate(arena);
children->elements.Allocate(arena, 1);
children->elements[0] = MakeWireFile(arena);
return node;
}
void MockData::CheckNaturalDir(const fidl_cpp_wire_interop_test::Node& node) {
ASSERT_TRUE(node.name().has_value());
EXPECT_EQ(kDirName, node.name());
ASSERT_TRUE(node.kind().has_value());
ASSERT_EQ(fidl_cpp_wire_interop_test::Kind::Tag::kDirectory, node.kind()->Which());
const fidl_cpp_wire_interop_test::Directory& dir = node.kind()->directory().value();
EXPECT_EQ(1, dir.children()->elements().size());
const fidl_cpp_wire_interop_test::Node& child = dir.children()->elements()[0];
CheckNaturalFile(child);
}
void MockData::CheckWireDir(const fidl_cpp_wire_interop_test::wire::Node& node) {
EXPECT_TRUE(node.has_name());
EXPECT_EQ(fidl::StringView{kDirName}.get(), node.name().get());
EXPECT_TRUE(node.has_kind());
EXPECT_EQ(fidl_cpp_wire_interop_test::wire::Kind::Tag::kDirectory, node.kind().Which());
const fidl_cpp_wire_interop_test::wire::Directory& dir = node.kind().directory();
EXPECT_EQ(1, dir.children->elements.count());
const fidl_cpp_wire_interop_test::wire::Node& child = dir.children->elements[0];
CheckWireFile(child);
}
// Test fixture to simplify creating endpoints and a unified client to talk to
// a wire domain object server.
class UnifiedClientToWireServerBase : public zxtest::Test, public MockData {
public:
UnifiedClientToWireServerBase() : loop_(&kAsyncLoopConfigNeverAttachToThread) {}
void SetUp() final {
zx::status client_end =
fidl::CreateEndpoints<fidl_cpp_wire_interop_test::Interop>(&server_end_);
ASSERT_OK(client_end.status_value());
client_.Bind(std::move(*client_end), loop_.dispatcher(), GetEventHandler());
}
virtual fidl::AsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() = 0;
async::Loop& loop() { return loop_; }
fidl::ServerEnd<fidl_cpp_wire_interop_test::Interop>& server_end() { return server_end_; }
fidl::Client<fidl_cpp_wire_interop_test::Interop>& client() { return client_; }
private:
async::Loop loop_;
fidl::ServerEnd<fidl_cpp_wire_interop_test::Interop> server_end_;
fidl::Client<fidl_cpp_wire_interop_test::Interop> client_;
};
// Test fixture that does not care about events (besides the fact that there
// should not be any errors).
class UnifiedClientToWireServer : public UnifiedClientToWireServerBase {
private:
fidl::AsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() final {
return &event_handler_;
}
class FailOnClientError : public fidl::AsyncEventHandler<fidl_cpp_wire_interop_test::Interop> {
// We should not observe any terminal error from the client during these tests.
void on_fidl_error(fidl::UnbindInfo info) final {
ADD_FATAL_FAILURE("Detected client error during test: %s", info.FormatDescription().c_str());
}
};
FailOnClientError event_handler_;
};
// Test round-tripping a file node.
TEST_F(UnifiedClientToWireServer, RoundTrip) {
class Server : public WireTestBase {
public:
void RoundTrip(RoundTripRequestView request, RoundTripCompleter::Sync& completer) final {
CheckWireFile(request->node);
num_calls++;
completer.Reply(request->node);
}
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server);
{
// Test with natural domain objects.
auto node = MakeNaturalFile();
fidl_cpp_wire_interop_test::InteropRoundTripRequest request{std::move(node)};
bool got_response = false;
client()
->RoundTrip(std::move(request))
.ThenExactlyOnce([&](fidl::Result<fidl_cpp_wire_interop_test::Interop::RoundTrip>& result) {
ASSERT_TRUE(result.is_ok());
CheckNaturalFile(result->node());
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
EXPECT_TRUE(got_response);
}
{
// Test with wire domain objects.
fidl::Arena arena;
auto node = MakeWireFile(arena);
bool got_response = false;
client().wire()->RoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::RoundTrip>& result) {
if (!result.ok()) {
FAIL("RoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
CheckWireFile(response->node);
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, server.num_calls);
EXPECT_TRUE(got_response);
}
}
// Test round-tripping a directory node with error syntax.
TEST_F(UnifiedClientToWireServer, TryRoundTrip) {
class Server : public WireTestBase {
public:
void TryRoundTrip(TryRoundTripRequestView request,
TryRoundTripCompleter::Sync& completer) final {
CheckWireDir(request->node);
num_calls++;
if (reply_with_error) {
completer.ReplyError(ZX_ERR_INVALID_ARGS);
} else {
completer.ReplySuccess(request->node);
}
}
bool reply_with_error = false;
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server);
{
// Test with natural domain objects, success case.
auto node = MakeNaturalDir();
fidl_cpp_wire_interop_test::InteropTryRoundTripRequest request{std::move(node)};
bool got_response = false;
client()
->TryRoundTrip(std::move(request))
.ThenExactlyOnce(
[&](fidl::Result<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
ASSERT_TRUE(result.is_ok());
fidl_cpp_wire_interop_test::InteropTryRoundTripResponse payload =
std::move(result.value());
fidl_cpp_wire_interop_test::Node node = payload.node();
CheckNaturalDir(node);
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
EXPECT_TRUE(got_response);
}
{
// Test with wire domain objects, success case.
fidl::Arena arena;
auto node = MakeWireDir(arena);
bool got_response = false;
client().wire()->TryRoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
if (!result.ok()) {
FAIL("TryRoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
ASSERT_TRUE(response->result.is_response());
CheckWireDir(response->result.response().node);
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, server.num_calls);
EXPECT_TRUE(got_response);
}
server.reply_with_error = true;
{
// Test with natural domain objects, error case.
auto node = MakeNaturalDir();
fidl_cpp_wire_interop_test::InteropTryRoundTripRequest request{std::move(node)};
bool got_response = false;
client()
->TryRoundTrip(std::move(request))
.ThenExactlyOnce(
[&](fidl::Result<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
ASSERT_FALSE(result.is_ok());
ASSERT_TRUE(result.is_error());
fidl::AnyErrorIn<fidl_cpp_wire_interop_test::Interop::TryRoundTrip> error =
result.error_value();
ASSERT_TRUE(error.is_application_error());
EXPECT_STATUS(ZX_ERR_INVALID_ARGS, error.application_error());
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(3, server.num_calls);
EXPECT_TRUE(got_response);
}
{
// Test with wire domain objects, error case.
fidl::Arena arena;
auto node = MakeWireDir(arena);
bool got_response = false;
client().wire()->TryRoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
if (!result.ok()) {
FAIL("TryRoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
ASSERT_TRUE(response->result.is_err());
EXPECT_STATUS(ZX_ERR_INVALID_ARGS, response->result.err());
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(4, server.num_calls);
EXPECT_TRUE(got_response);
}
}
// Test sending a one way call.
TEST_F(UnifiedClientToWireServer, OneWay) {
class Server : public WireTestBase {
public:
void OneWay(OneWayRequestView request, OneWayCompleter::Sync& completer) override {
CheckWireFile(request->node);
num_calls++;
}
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server);
{
// Test with natural domain objects.
fitx::result<fidl::Error> result = client()->OneWay({MakeNaturalFile()});
ASSERT_TRUE(result.is_ok());
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
}
{
// Test with wire domain objects.
fidl::Arena arena;
fidl::Status status = client().wire()->OneWay(MakeWireFile(arena));
ASSERT_TRUE(status.ok());
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, server.num_calls);
}
}
// Test fixture that checks events.
class UnifiedClientToWireServerWithEventHandler : public UnifiedClientToWireServerBase {
public:
int num_events() const { return event_handler_.num_events(); }
private:
class ExpectOnNodeEvent : public fidl::AsyncEventHandler<fidl_cpp_wire_interop_test::Interop> {
public:
int num_events() const { return num_events_; }
private:
// We should not observe any terminal error from the client during these tests.
void on_fidl_error(fidl::UnbindInfo info) final {
ADD_FATAL_FAILURE("Detected client error during test: %s", info.FormatDescription().c_str());
}
void OnNode(fidl::Event<fidl_cpp_wire_interop_test::Interop::OnNode>& event) final {
CheckNaturalDir(event.node());
num_events_++;
}
int num_events_ = 0;
};
fidl::AsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() final {
return &event_handler_;
}
ExpectOnNodeEvent event_handler_;
};
TEST_F(UnifiedClientToWireServerWithEventHandler, OnNode) {
class Server : public WireTestBase {};
Server server;
auto binding = fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server);
EXPECT_EQ(0, num_events());
// Send an event.
fidl::Arena arena;
auto node = MakeWireDir(arena);
fidl::Status status = fidl::WireSendEvent(binding)->OnNode(node);
ASSERT_OK(status.status());
// Test receiving natural domain objects.
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, num_events());
}
class NaturalTestBase : public fidl::Server<fidl_cpp_wire_interop_test::Interop> {
void RoundTrip(RoundTripRequest& request, RoundTripCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
void TryRoundTrip(TryRoundTripRequest& request, TryRoundTripCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
void OneWay(OneWayRequest& request, OneWayCompleter::Sync& completer) override {
ZX_PANIC("Unreachable");
}
};
// Test fixture to simplify creating endpoints and a wire client to talk to
// a natural server.
class WireClientToNaturalServerBase : public zxtest::Test, public MockData {
public:
WireClientToNaturalServerBase() : loop_(&kAsyncLoopConfigNeverAttachToThread) {}
void SetUp() final {
zx::status client_end =
fidl::CreateEndpoints<fidl_cpp_wire_interop_test::Interop>(&server_end_);
ASSERT_OK(client_end.status_value());
client_.Bind(std::move(*client_end), loop_.dispatcher(), GetEventHandler());
}
template <typename ServerImpl>
static auto CheckErrorsWhenUnbound() {
return [](ServerImpl* impl, fidl::UnbindInfo info,
fidl::ServerEnd<fidl_cpp_wire_interop_test::Interop> server_end) {
if (info.is_user_initiated())
return;
if (info.is_dispatcher_shutdown())
return;
if (info.is_peer_closed())
return;
ADD_FATAL_FAILURE("Detected server error during test: %s", info.FormatDescription().c_str());
};
}
virtual fidl::WireAsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() = 0;
async::Loop& loop() { return loop_; }
fidl::ServerEnd<fidl_cpp_wire_interop_test::Interop>& server_end() { return server_end_; }
fidl::WireClient<fidl_cpp_wire_interop_test::Interop>& client() { return client_; }
private:
async::Loop loop_;
fidl::ServerEnd<fidl_cpp_wire_interop_test::Interop> server_end_;
fidl::WireClient<fidl_cpp_wire_interop_test::Interop> client_;
};
// Test fixture that does not care about events (besides the fact that there
// should not be any errors).
class WireClientToNaturalServer : public WireClientToNaturalServerBase {
private:
fidl::WireAsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() final {
return &event_handler_;
}
class FailOnClientError
: public fidl::WireAsyncEventHandler<fidl_cpp_wire_interop_test::Interop> {
// We should not observe any terminal error from the client during these tests.
void on_fidl_error(fidl::UnbindInfo info) final {
ADD_FATAL_FAILURE("Detected client error during test: %s", info.FormatDescription().c_str());
}
};
FailOnClientError event_handler_;
};
// Test round-tripping a file node.
TEST_F(WireClientToNaturalServer, RoundTrip) {
class Server : public NaturalTestBase {
public:
void RoundTrip(RoundTripRequest& request, RoundTripCompleter::Sync& completer) final {
CheckNaturalFile(request.node());
num_calls++;
completer.Reply(std::move(request.node()));
}
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server,
CheckErrorsWhenUnbound<Server>());
fidl::Arena arena;
auto node = MakeWireFile(arena);
bool got_response = false;
client()->RoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::RoundTrip>& result) {
if (!result.ok()) {
FAIL("RoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
CheckWireFile(response->node);
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
EXPECT_TRUE(got_response);
}
// Test round-tripping a directory node with error syntax.
TEST_F(WireClientToNaturalServer, TryRoundTrip) {
class Server : public NaturalTestBase {
public:
void TryRoundTrip(TryRoundTripRequest& request, TryRoundTripCompleter::Sync& completer) final {
CheckNaturalDir(request.node());
num_calls++;
// TODO(fxbug.dev/91363): ReplySuccess/ReplyError.
if (reply_with_error) {
completer.Reply(fitx::error(ZX_ERR_INVALID_ARGS));
} else {
completer.Reply(fitx::ok(std::move(request.node())));
}
}
bool reply_with_error = false;
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server,
CheckErrorsWhenUnbound<Server>());
{
// Test success case.
fidl::Arena arena;
auto node = MakeWireDir(arena);
bool got_response = false;
client()->TryRoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
if (!result.ok()) {
FAIL("TryRoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
ASSERT_TRUE(response->result.is_response());
CheckWireDir(response->result.response().node);
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
EXPECT_TRUE(got_response);
}
server.reply_with_error = true;
{
// Test error case.
fidl::Arena arena;
auto node = MakeWireDir(arena);
bool got_response = false;
client()->TryRoundTrip(node).ThenExactlyOnce(
[&](fidl::WireUnownedResult<fidl_cpp_wire_interop_test::Interop::TryRoundTrip>& result) {
if (!result.ok()) {
FAIL("TryRoundTrip failed: %s", result.error().FormatDescription().c_str());
return;
}
auto* response = result.Unwrap();
ASSERT_TRUE(response->result.is_err());
EXPECT_STATUS(ZX_ERR_INVALID_ARGS, response->result.err());
got_response = true;
});
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, server.num_calls);
EXPECT_TRUE(got_response);
}
}
// Test receiving a one way call.
TEST_F(WireClientToNaturalServer, OneWay) {
class Server : public NaturalTestBase {
public:
void OneWay(OneWayRequest& request, OneWayCompleter::Sync& completer) override {
CheckNaturalFile(request.node());
num_calls++;
}
int num_calls = 0;
};
Server server;
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server,
CheckErrorsWhenUnbound<Server>());
fidl::Arena arena;
fidl::Status status = client()->OneWay(MakeWireFile(arena));
ASSERT_TRUE(status.ok());
ASSERT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, server.num_calls);
}
// Test fixture that checks events.
class WireClientToNaturalServerWithEventHandler : public WireClientToNaturalServerBase {
public:
int num_events() const { return event_handler_.num_events(); }
private:
class ExpectOnNodeEvent
: public fidl::WireAsyncEventHandler<fidl_cpp_wire_interop_test::Interop> {
public:
int num_events() const { return num_events_; }
private:
// We should not observe any terminal error from the client during these tests.
void on_fidl_error(fidl::UnbindInfo info) final {
ADD_FATAL_FAILURE("Detected client error during test: %s", info.FormatDescription().c_str());
}
void OnNode(fidl::WireEvent<fidl_cpp_wire_interop_test::Interop::OnNode>* event) final {
CheckWireDir(event->node);
num_events_++;
}
int num_events_ = 0;
};
fidl::WireAsyncEventHandler<fidl_cpp_wire_interop_test::Interop>* GetEventHandler() final {
return &event_handler_;
}
ExpectOnNodeEvent event_handler_;
};
// Test sending an event over a |fidl::ServerEnd|.
TEST_F(WireClientToNaturalServerWithEventHandler, SendOnNodeEventOverServerEnd) {
EXPECT_EQ(0, num_events());
// Test sending the event with natural types.
{
fidl_cpp_wire_interop_test::Node node = MakeNaturalDir();
fitx::result result = fidl::SendEvent(server_end())->OnNode(node);
EXPECT_TRUE(result.is_ok(), "%s", result.error_value().FormatDescription().c_str());
EXPECT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, num_events());
}
// Test sending the event with wire types.
{
fidl::Arena arena;
fidl_cpp_wire_interop_test::wire::Node node = MakeWireDir(arena);
fidl::Status status = fidl::WireSendEvent(server_end())->OnNode(node);
EXPECT_OK(status.status());
EXPECT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, num_events());
}
}
// Test sending an event over a |fidl::ServerBindingRef|.
TEST_F(WireClientToNaturalServerWithEventHandler, SendOnNodeEventOverServerBindingRef) {
EXPECT_EQ(0, num_events());
class Server : public NaturalTestBase {};
Server server;
fidl::ServerBindingRef binding_ref =
fidl::BindServer(loop().dispatcher(), std::move(server_end()), &server);
// Test sending the event with natural types.
{
fidl_cpp_wire_interop_test::Node node = MakeNaturalDir();
fitx::result result = fidl::SendEvent(binding_ref)->OnNode(node);
EXPECT_TRUE(result.is_ok(), "%s", result.error_value().FormatDescription().c_str());
EXPECT_OK(loop().RunUntilIdle());
EXPECT_EQ(1, num_events());
}
// Test sending the event with wire types.
{
fidl::Arena arena;
fidl_cpp_wire_interop_test::wire::Node node = MakeWireDir(arena);
fidl::Status status = fidl::WireSendEvent(binding_ref)->OnNode(node);
EXPECT_OK(status.status());
EXPECT_OK(loop().RunUntilIdle());
EXPECT_EQ(2, num_events());
}
}
} // namespace
| 24,713 | 8,576 |
#include <frovedis.hpp>
#include <frovedis/dataframe.hpp>
int main(int argc, char* argv[]){
frovedis::use_frovedis use(argc, argv);
auto t = frovedis::make_dftable_loadtext("./t.csv",
{"int", "double", "string"},
{"c1", "c2", "c3"});
auto t2 = t.select({"c2", "c3"});
t2.show();
t2.drop("c2");
t2.show();
t2.rename("c3","cx");
t2.show();
}
| 443 | 183 |
///////////////////////////////////////////////////////////////////////////////
// $Id$
//
// 3DimViewer
// Lightweight 3D DICOM viewer.
//
// Copyright 2008-2016 3Dim Laboratory s.r.o.
//
// 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 <graph/widgets/CPositionedWindow.h>
///////////////////////////////////////////////////////////////////////////////
//
void scene::CPositionedWindow::setWindowManager(scene::CSizeableWindowManager * wm)
{
// VPL_ASSERT( wm );
if( !wm )
{
return;
}
// Connect to the signal
m_conSizeChanged = wm->getSigSizeChanged().connect( this, &scene::CPositionedWindow::onWMSizeChanged );
// Update window size
onWMSizeChanged( wm->getWidth(), wm->getHeight() );
}
///////////////////////////////////////////////////////////////////////////////
//
scene::CPositionedWindow::CPositionedWindow(void)
: m_widthType( NONE )
, m_heightType( NONE )
, m_xType( NONE )
, m_yType( NONE )
, m_xOriginType( NONE )
, m_yOriginType( NONE )
, m_width( 0.0f )
, m_height( 0.0f )
, m_x( 0.0f )
, m_y( 0.0f )
, m_ox( 0.0f )
, m_oy( 0.0f )
{
}
///////////////////////////////////////////////////////////////////////////////
//
void scene::CPositionedWindow::onWMSizeChanged(int wmw, int wmh)
{
int w(0), h(0), x(0), y(0), ox(0), oy(0);
// Call window to update its size/origin information
this->recomputeSizes();
// Recompute window size
this->computeSize( wmw, wmh, w, h );
// Compute window origin
this->computeOrigin( wmw, wmh, w, h, ox, oy );
// Compute new window position
this->computePosition( wmw, wmh, ox, oy, x, y );
// Call update
updateWindowSizePosition( w, h, x, y );
}
///////////////////////////////////////////////////////////////////////////////
//
void scene::CPositionedWindow::computeSize(int wmw, int wmh, int &w, int &h)
{
// compute new window width
switch( m_widthType )
{
case NONE:
case PROPORTIONAL_WINDOW: break;
case PROPORTIONAL_WM:
w = 0.01 * m_width * wmw;
break;
case FIXED:
w = m_width;
break;
}
// Compute new window height
switch( m_heightType )
{
case NONE:
case PROPORTIONAL_WINDOW: break;
case PROPORTIONAL_WM:
h = 0.01 * m_height * wmh;
break;
case FIXED:
h = m_height;
break;
}
}
///////////////////////////////////////////////////////////////////////////////
//
void scene::CPositionedWindow::computeOrigin(int wmw, int wmh, int ww, int wh, int &ox, int &oy)
{
// compute new window x origin
switch( m_xOriginType )
{
case NONE: break;
case PROPORTIONAL_WINDOW:
ox = 0.01 * m_ox * ww;
break;
case PROPORTIONAL_WM:
ox = 0.01 * m_ox * wmw;
break;
case FIXED:
ox = m_ox;
break;
}
// Compute new window y origin
switch( m_yOriginType )
{
case NONE: break;
case PROPORTIONAL_WINDOW:
oy = 0.01 * m_oy * wh;
break;
case PROPORTIONAL_WM:
oy = 0.01 * m_oy * wmh;
break;
case FIXED:
ox = m_ox;
break;
}
}
///////////////////////////////////////////////////////////////////////////////
//
void scene::CPositionedWindow::computePosition(int wmw, int wmh, int ox, int oy, int &x, int &y)
{
// compute new window x position
switch( m_xType )
{
case NONE: break;
case PROPORTIONAL_WINDOW:
break;
case PROPORTIONAL_WM:
x = 0.01 * m_x * wmw + ox;
break;
case FIXED:
x = m_x + ox;
break;
}
// Compute new window height
switch( m_yType )
{
case NONE: break;
case PROPORTIONAL_WINDOW:
break;
case PROPORTIONAL_WM:
y = 0.01 * m_y * wmh + oy;
break;
case FIXED:
y = m_y + oy;
break;
}
}
| 4,628 | 1,711 |
#include "FWCore/Framework/src/EndPathStatusInserter.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Utilities/interface/StreamID.h"
#include "DataFormats/Common/interface/EndPathStatus.h"
#include <memory>
namespace edm {
EndPathStatusInserter::EndPathStatusInserter(unsigned int) : token_{produces<EndPathStatus>()} {}
void EndPathStatusInserter::produce(StreamID, edm::Event& event, edm::EventSetup const&) const {
//Puts a default constructed EndPathStatus
event.emplace(token_);
}
} // namespace edm
| 542 | 185 |
#include "WiFi.h"
#include "esp_camera.h"
//#include "esp_timer.h"
//#include "img_converters.h"
//#include "soc/soc.h" // Disable brownour problems
//#include "soc/rtc_cntl_reg.h" // Disable brownour problems
//#include "driver/rtc_io.h"
//#include <StringArray.h>
//#include <SPIFFS.h>
//#include <FS.h>
// Replace with your network credentials
const char* ssid = "";
const char* password = "";
// Photo File Name to save in SPIFFS
#define FILE_PHOTO "/photo.jpg"
// OV2640 camera module pins (CAMERA_MODEL_AI_THINKER)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 4
#define SIOD_GPIO_NUM 18
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 36
#define Y8_GPIO_NUM 37
#define Y7_GPIO_NUM 38
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 35
#define Y4_GPIO_NUM 14
#define Y3_GPIO_NUM 13
#define Y2_GPIO_NUM 34
#define VSYNC_GPIO_NUM 5
#define HREF_GPIO_NUM 27
#define PCLK_GPIO_NUM 25
void setup() {
// Serial port for debugging purposes
Serial.begin(115200);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(5000);
Serial.println(WiFi.status());
WiFi.begin(ssid, password);
delay(500);
Serial.println("Connecting to WiFi...");
}
/*
if (!SPIFFS.begin(true)) {
Serial.println("An Error has occurred while mounting SPIFFS");
// ESP.restart();
}
else {
delay(500);
Serial.println("SPIFFS mounted successfully");
}
*/
// Print ESP32 Local IP Address
Serial.print("IP Address: http://");
Serial.println(WiFi.localIP());
// Turn-off the 'brownout detector'
//WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
/*
// OV2640 camera module
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
if (psramFound()) {
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
} else {
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12;
config.fb_count = 1;
}
// Camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
//ESP.restart();
}
*/
}
/*
// Check if photo capture was successful
bool checkPhoto( fs::FS &fs ) {
File f_pic = fs.open( FILE_PHOTO );
unsigned int pic_sz = f_pic.size();
return ( pic_sz > 100 );
}
/*
// Capture Photo and Save it to SPIFFS
void capturePhotoSaveSpiffs( void ) {
camera_fb_t * fb = NULL; // pointer
bool ok = 0; // Boolean indicating if the picture has been taken correctly
do {
// Take a photo with the camera
Serial.println("Taking a photo...");
fb = esp_camera_fb_get();
if (!fb) {
Serial.println("Camera capture failed");
return;
}
// Photo file name
/*
Serial.printf("Picture file name: %s\n", FILE_PHOTO);
File file = SPIFFS.open(FILE_PHOTO, FILE_WRITE);
// Insert the data in the photo file
if (!file) {
Serial.println("Failed to open file in writing mode");
}
else {
file.write(fb->buf, fb->len); // payload (image), payload length
Serial.print("The picture has been saved in ");
Serial.print(FILE_PHOTO);
Serial.print(" - Size: ");
Serial.print(file.size());
Serial.println(" bytes");
}
// Close the file
file.close();
esp_camera_fb_return(fb);
// check if file has been correctly saved in SPIFFS
ok = checkPhoto(SPIFFS);
} while ( !ok );
}
*/
/*
void sendPhoto(void)
{
File file = SPIFFS.open(FILE_PHOTO, FILE_READ);
String start_request = ""; String end_request = "";
//headers = {'Prediction-Key': '9c5da3f162c04c45b85be1eb5c2ca33b', 'Content-Type':'application/octet-stream'}
start_request = start_request +
"\n--AaB03x\n" +
"\nPrediction-Key: 9c5da3f162c04c45b85be1eb5c2ca33b\n" +
"\nContent-Type: application/octet-stream\n\n";
end_request = end_request + "\n--AaB03x--\n";
uint16_t full_length;
full_length = start_request.length() + file.size() + end_request.length();
WiFiClient client;
if (!client.connect("https://aibenchtest.cognitiveservices.azure.com/customvision/v3.0/Prediction/YOURPROJECTID/detect/iterations/Iteration1/image", 80)) {
Serial.println("Connected FILED!");
return;
}
/*
url = 'https://aibenchtest.cognitiveservices.azure.com/customvision/v3.0/Prediction/YOURPROECTID/detect/iterations/Iteration1/image'
#payload = {'client_id': 1}
files = {'file': file}
r = requests.post(url, data=file, headers=headers)
json_data = r.json()
*/
/*
Serial.println("Connected ok!");
client.println("POST /Home/Index HTTP/1.1");
client.println("Host: example.com");
client.println("User-Agent: ESP32");
client.println("Content-Type: application/octet-stream");
client.print("Content-Length: ");
client.println(full_length);
client.println();
client.print(start_request);
while (file.available()){
client.write(file.read());
}
Serial.println(">>><<<");
client.println(end_request);
}
*/
void loop() {
// capturePhotoSaveSpiffs();
delay(10000);
Serial.println("loop");
// put your main code here, to run repeatedly:
/*
file = open('images/drink1/cap0.jpg', 'rb')
url = 'https://YOURCOGNITIVESERVICESNAME.cognitiveservices.azure.com/customvision/v3.0/Prediction/YOURPROJECTID/detect/iterations/Iteration1/image'
headers = {'Prediction-Key': 'YOURPREDICTIONKEY', 'Content-Type':'application/octet-stream'}
#payload = {'client_id': 1}
files = {'file': file}
r = requests.post(url, data=file, headers=headers)
json_data = r.json()
*/
} | 6,246 | 2,519 |
/********************************************************************
created: 2010/05/13
filename: TerrainBlock.cc
author: Crazii
purpose:
*********************************************************************/
#include <BladePCH.h>
#include <interface/IGraphicsSystem.h>
#include <interface/IRenderQueue.h>
#include "TerrainBufferManager.h"
#include "TerrainBlock.h"
#include "BlockQuery.h"
namespace Blade
{
static const uint BLOCK_UPDATE_LOD = 0x01;
static const uint BLOCK_UPDATE_INDICES = 0x02;
//////////////////////////////////////////////////////////////////////////
TerrainBlock::TerrainBlock(index_t x,index_t z, ITerrainTile* parent)
:mParent(parent)
,mFixedLOD(INVALID_FIXED_LOD)
,mLODLevel(0)
,mLODDiffIndex(LODDI_NONE)
,mMaterialLOD(0)
{
mUpdateFlags |= CUF_DEFAULT_VISIBLE | CUF_VISIBLE_UPDATE;
mSpaceFlags = CSF_CONTENT | CSF_SHADOWCASTER;
const TERRAIN_INFO& GTInfo = TerrainConfigManager::getSingleton().getTerrainInfo();
mBlockIndex.mX = (uint16)x;
mBlockIndex.mZ = (uint16)z;
mBlockIndex.mIndex = (uint32)( mBlockIndex.mX + mBlockIndex.mZ*GTInfo.mBlocksPerTileSide);
const TILE_INFO& tileInfo = mParent->getTileInfo();
GraphicsGeometry& geometry = tileInfo.mRenderGeomBuffer[ this->getBlockIndex() ];
geometry.reset();
//setup render geometry
geometry.useIndexBuffer(true);
geometry.mIndexBuffer = NULL;
geometry.mIndexCount = 0;
geometry.mIndexStart = 0;
geometry.mVertexSource = tileInfo.mVertexSource;
geometry.mVertexDecl = TerrainConfigManager::getRenderType().getVertexDeclaration();
geometry.mVertexCount = (uint32)TerrainConfigManager::getSingleton().getTerrainBlockVertexCount();
geometry.mVertexStart = 0;
geometry.mPrimitiveType = GraphicsGeometry::GPT_TRIANGLE_LIST;
#if BLADE_DEBUG
mQueued = 0;
#endif
if( IGraphicsSystem::getSingleton().getCurrentProfile() > BTString("2_0") )
tileInfo.mScene->getMaterialLODUpdater()->addForLODUpdate(this);
}
TerrainBlock::~TerrainBlock()
{
if(mParent->getTileInfo().mScene != NULL)
mParent->getTileInfo().mScene->getMaterialLODUpdater()->removeFromLODUpdate(this);
}
/************************************************************************/
/* SpaceContent overrides */
/************************************************************************/
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::updateRender(IRenderQueue* queue)
{
const TILE_INFO& tileInfo = mParent->getTileInfo();
assert(tileInfo.mMaterialLODCount == 0 || mMaterialLOD < tileInfo.mMaterialLODCount);
if(tileInfo.mLODMaterials != NULL && mMaterialLOD < tileInfo.mMaterialLODCount)
{
TerrainConfigManager& tcm = static_cast<TerrainConfigManager&>(*mParent->getConfigManager());
ITerrainBatchCombiner* combiner = tcm.getBatchCombiner();
IRenderQueue* redirect = mParent->getTileInfo().mOutputBuffer;
if (redirect != NULL && combiner->needCombine(queue) )
{
#if BLADE_DEBUG
//assert(mQueued == 0);
mQueued = 1;
#endif
redirect->addRenderable(this);
}
else
{
this->updateIndexBuffer();
queue->addRenderable(this);
}
}
}
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::visibleUpdateImpl(const Vector3& cameraPos)
{
uint8& updateMask = mParent->getTileInfo().mUpdatedMask[this->getBlockIndex()];
if (updateMask & BLOCK_UPDATE_LOD) //multiple camera update optimize.
return;
updateMask |= BLOCK_UPDATE_LOD;
#define ADAPTIVE_FIXED_LOD 0 //TODO: use adaptive fixed LOD will need morph height for adapted level.
#if !ADAPTIVE_FIXED_LOD
if (mFixedLOD != INVALID_FIXED_LOD)
mLODLevel = mFixedLOD;
else
#endif
{
//Vector3 CameraDir = cameraRotation*Vector3::NEGATIVE_UNIT_Z;
//Vector3 Vec = mPostion - cameraPos;
//scalar dist = Vec.dotProduct(CameraDir);
//mLODLevel = TerrainConfigManager::getSingleton().getLODLevelByDistance(dist);
//get LOD level only at horizontal dimension
//to avoid LOD level gap, when height different is too large
Vector3 position = mWorldAABB.getCenter();
Vector2 pos2(position.x, position.z);
Vector2 camPos2(cameraPos.x, cameraPos.z);
scalar SqrDist = pos2.getSquaredDistance(camPos2);
mLODLevel = static_cast<TerrainConfigManager*>(mParent->getConfigManager())->getLODLevelBySquaredDistance(SqrDist);
}
#if ADAPTIVE_FIXED_LOD
if (mFixedLOD != INVALID_FIXED_LOD)
{
if (mFixedLOD == TerrainConfigManager::getSingleton().getFlatLODLevel())
mLODLevel = std::max<uint8>(mFixedLOD, mLODLevel);
else //
mLODLevel = std::min<uint8>(mFixedLOD, mLODLevel);
}
#endif
#if BLADE_DEBUG
if(mLastLODLevel != mLODLevel)
mLastLODLevel = mLODLevel;
mQueued = 0;
#endif
}
//////////////////////////////////////////////////////////////////////////
bool TerrainBlock::queryNearestPoint(SpaceQuery& query, scalar& distance) const
{
//transform ray to local space (actually it's tile's local space, not block's local space, because block's all vertices are in tile's space)
StaticHandle<SpaceQuery> transformed = query.clone(this->getWorldTransform().getInverse());
const TERRAIN_POSITION_DATA_Y* vposition = mParent->getSoftHeightPositionData();
const TERRAIN_POSITION_DATA_XZ* hposition = TerrainBufferManager::getSingleton().getSoftHorizontalPositionBuffer();
const TerrainQueryIndexGroup* group = mParent->getQueryIndexBuffer();
size_t blockSize = TerrainConfigManager::getSingleton().getTerrainBlockSize();
BlockQuery blockQuery;
blockQuery.initialize(vposition + mVertexStart, hposition + mVertexStart, group, mBlockIndex.mX*blockSize, mBlockIndex.mZ*blockSize);
AABB localAABB = this->getWorldAABB();
localAABB.offset(-mParent->getStartPos());
blockQuery.setAABB(localAABB);
BlockVolumeQuery q(this->getWorldTransform()[3], *transformed, mLODLevel, (LOD_DI)mLODDiffIndex);
q.mDistance = distance;
bool ret = blockQuery.raycastPoint(q);
if (ret)
{
//skip scale since not scale for terrain blocks
distance = q.mDistance;
}
return ret;
}
//////////////////////////////////////////////////////////////////////////
bool TerrainBlock::intersectTriangles(SpaceQuery& query, POS_VOL contentPos/* = PV_INTERSECTED*/) const
{
bool result = false;
//transform the volume from world space to local space
StaticHandle<SpaceQuery> transformed = query.clone( this->getWorldTransform().getInverse() );
const TERRAIN_POSITION_DATA_Y* vposition = mParent->getSoftHeightPositionData();
const TERRAIN_POSITION_DATA_XZ* hposition = TerrainBufferManager::getSingleton().getSoftHorizontalPositionBuffer();
const TerrainQueryIndexGroup* group = mParent->getQueryIndexBuffer();
size_t blockSize = TerrainConfigManager::getSingleton().getTerrainBlockSize();
BlockQuery blockQuery;
blockQuery.initialize(vposition+mVertexStart, hposition+mVertexStart, group, mBlockIndex.mX*blockSize, mBlockIndex.mZ*blockSize);
AABB localAABB = this->getWorldAABB();
localAABB.offset(-mParent->getStartPos());
blockQuery.setAABB(localAABB);
BlockVolumeQuery q(this->getWorldTransform()[3], *transformed, mLODLevel, (LOD_DI)mLODDiffIndex);
result = blockQuery.intersect(q, contentPos);
return result;
}
/************************************************************************/
/* custom methods */
/************************************************************************/
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::setVertexOffsetCount(index_t startVertex, size_t count)
{
mVertexStart = startVertex;
mVertexCount = (uint16)count;
}
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::updateIndexBuffer(bool force/* = false*/)
{
uint8& updateMask = mParent->getTileInfo().mUpdatedMask[this->getBlockIndex()];
if ((updateMask & BLOCK_UPDATE_INDICES) && !force) //multiple camera update optimize
return;
updateMask |= BLOCK_UPDATE_INDICES;
TerrainConfigManager& tcm = static_cast<TerrainConfigManager&>(*mParent->getConfigManager());
ILODComparator* LODCmp = tcm.getIndexGenerator();
LODDiff diff;
FixedLODDiff fixedDiff;
TerrainBlock* up = mParent->getTerrainBlock((int)this->getBlockX(), (int)this->getBlockZ()-1);
if (up != NULL && (fixedDiff.t=(int8)LODCmp->compareLOD(up->getCurrentLODLevel(), mLODLevel)) > 0 && !up->isFixedLOD())
diff.setUpDiff();
TerrainBlock* left = mParent->getTerrainBlock((int)this->getBlockX()-1, (int)this->getBlockZ());
if (left != NULL && (fixedDiff.l=(int8)LODCmp->compareLOD(left->getCurrentLODLevel(), mLODLevel)) > 0 && !left->isFixedLOD())
diff.setLeftDiff();
TerrainBlock* down = mParent->getTerrainBlock((int)this->getBlockX(), (int)this->getBlockZ()+1);
if (down != NULL && (fixedDiff.b=(int8)LODCmp->compareLOD(down->getCurrentLODLevel(), mLODLevel)) > 0 && !down->isFixedLOD() )
diff.setDownDiff();
TerrainBlock* right = mParent->getTerrainBlock((int)this->getBlockX()+1, (int)this->getBlockZ());
if (right != NULL && (fixedDiff.r=(int8)LODCmp->compareLOD(right->getCurrentLODLevel(), mLODLevel)) > 0 && !right->isFixedLOD())
diff.setRightDiff();
GraphicsGeometry& geometry = mParent->getTileInfo().mRenderGeomBuffer[this->getBlockIndex()];
if (mFixedLOD != INVALID_FIXED_LOD && fixedDiff.isValid() && mLODLevel == tcm.getFlatLODLevel())
{
//adaption only work for one side(flat or cliff), disable flat LOD adaption
int8 specialDiff = (int8)LODCmp->compareLOD(tcm.getCliffLODLevel(), mLODLevel);
if (std::abs(specialDiff) > 1)
{
assert(mLODLevel >= 1u);
if (fixedDiff.l == specialDiff && left != NULL && left->isFixedLOD())
fixedDiff.l = 0;
if (fixedDiff.t == specialDiff && up != NULL && up->isFixedLOD() )
fixedDiff.t = 0;
if (fixedDiff.r == specialDiff && right != NULL && right->isFixedLOD())
fixedDiff.r = 0;
if (fixedDiff.b == specialDiff && down != NULL && down->isFixedLOD())
fixedDiff.b = 0;
}
}
if (mFixedLOD != INVALID_FIXED_LOD && mLODLevel == mFixedLOD && fixedDiff.isValid())
geometry.mIndexBuffer = mParent->getFixedIndexBuffer(mLODLevel, fixedDiff, this->getBlockIndex(), geometry.mIndexStart, geometry.mIndexCount);
else
{
mLODDiffIndex = (uint8)LODDiff::generateDifferenceIndex(diff);
#if BLADE_DEBUG
if (mLastLODDiffIndex != mLODDiffIndex)
mLastLODDiffIndex = mLODDiffIndex;
#endif
geometry.mIndexBuffer = mParent->getIndexBuffer(mLODLevel, (LOD_DI)mLODDiffIndex, this->getBlockIndex(), geometry.mIndexStart, geometry.mIndexCount);
}
geometry.mIndexCount = (uint32)geometry.mIndexBuffer->getIndexCount();
geometry.mVertexStart = (uint32)mVertexStart;
geometry.mVertexCount = (uint32)mVertexCount;
}
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::updateMaterial()
{
const TILE_INFO& tileInfo = mParent->getTileInfo();
assert(tileInfo.mMaterialLODCount > 0);
if (mMaterialLOD >= tileInfo.mMaterialLODCount)
mMaterialLOD = tileInfo.mMaterialLODCount - 1u;
}
//////////////////////////////////////////////////////////////////////////
void TerrainBlock::cacheOut()
{
assert(this->getSpace() == NULL);
//mParent->getTileInfo().mScene->getMaterialLODUpdater()->removeFromLODUpdate(this);
this->setElement(NULL);
}
}//namespace Blade | 11,507 | 4,130 |
#ifndef ATELIER_RUNTIME_HASH_HPP
#define ATELIER_RUNTIME_HASH_HPP
#include "runtime_export.hpp"
#include <cstdint>
#include <iterator>
#include <type_traits>
#include <string_view>
namespace at
{
// Current default Hash function is fnv1a
inline namespace fnv1a
{
/**
* Hash a range of bytes
* @tparam It The iterator on the range of byte
* @param begin The first iterator on the range
* @param end The iterator after the last on the range
* @return The hash value of the range
* @note FNV-1a implementation
*/
template<typename It>
[[nodiscard]] constexpr uint64_t hash(It begin, It end) noexcept
{
using iterator_value_type = typename std::iterator_traits<It>::value_type;
static_assert(std::is_convertible_v<iterator_value_type, uint8_t>, "Iterator must be on bytes");
constexpr const uint64_t fnv_offset_basis = 0xcbf29ce484222325;
constexpr const uint64_t fnv_prime = 0x00000100000001B3;
uint64_t h = fnv_offset_basis;
for (; begin != end; ++begin)
{
h ^= static_cast<uint8_t>(*begin);
h *= fnv_prime;
}
return h;
}
/**
* Hash a string
* @param str The string to hash
* @return The hash value of the string
*/
[[nodiscard]] constexpr uint64_t hash(std::string_view str) noexcept
{
return hash(str.begin(), str.end());
}
/**
* Hash a memory block
* @param memory The memory block to hash
* @param size The size of the memory block
* @return The hash value for this memory block
*/
[[nodiscard]] ATELIER_RUNTIME_EXPORT uint64_t hash(const void* memory, std::size_t size) noexcept;
}
namespace literals
{
/**
* String literals to create compile time hash
* @param str The string to hash
* @param length The length of the string to hash
* @return The hashed value of the string
*/
[[nodiscard]] constexpr uint64_t operator ""_h(const char* str, std::size_t length)
{
return hash(std::string_view{str, length});
}
}
/**
* Combine two hashes
* @param h1 The first hash to combine with h2
* @param h2 The second hash to combine with h1
* @return A new hash constructed from two other hashes
* @note The order used to combine hashes is important
* Implementation based on this stack overflow answer: https://stackoverflow.com/a/27952689
*/
[[nodiscard]] constexpr uint64_t hash_combine(uint64_t h1, uint64_t h2) noexcept
{
const uint64_t combined_hash = h1 ^ h2 + 0x9e3779b97f4a7c16 + (h1 << 6) + (h1 >> 2);
return combined_hash;
}
}
#endif | 2,449 | 872 |
#include "stdmsg.h"
/*
* Initialises the standard messaging debug system
*/
bool StdMsg::Init() {
UART::Init();
return true;
}
/*
* Sends a warning via stdmsg and hex codes
*/
bool StdMsg::SendWarning(msg warning) {
UART::PutChar(warning.type[0]);
UART::PutChar(warning.type[1]);
UART::PutChar(warning.eid);
UART::PutChar(warning.msg);
UART::PutChar('\n');
return true;
}
/*
* Compares two commands, returns true if they are
* the same and vice versa
*/
bool StdMsg::CommandCompare(command a, command b) {
if(a.type[0] == b.type[0])
if(a.type[1] == b.type[1])
if(a.msg == a.msg)
return true;
return false;
}
| 658 | 251 |
/*
** v_pfx.cpp
** Pixel format conversion routines
**
**---------------------------------------------------------------------------
** Copyright 1998-2006 Randy Heit
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**---------------------------------------------------------------------------
**
*/
#include "doomtype.h"
#include "i_system.h"
#include "v_palette.h"
#include "v_pfx.h"
PfxUnion GPfxPal;
PfxState GPfx;
static bool AnalyzeMask (uint32_t mask, uint8_t *shift);
static void Palette16Generic (const PalEntry *pal);
static void Palette16R5G5B5 (const PalEntry *pal);
static void Palette16R5G6B5 (const PalEntry *pal);
static void Palette32Generic (const PalEntry *pal);
static void Palette32RGB (const PalEntry *pal);
static void Palette32BGR (const PalEntry *pal);
static void Scale8 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
static void Convert8 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
static void Convert16 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
static void Convert24 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
static void Convert32 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
void PfxState::SetFormat (int bits, uint32_t redMask, uint32_t greenMask, uint32_t blueMask)
{
switch (bits)
{
case -8:
Convert = Scale8;
SetPalette = NULL;
break;
case 8:
Convert = Convert8;
SetPalette = NULL;
break;
case 16:
if (redMask == 0x7c00 && greenMask == 0x03e0 && blueMask == 0x001f)
{
SetPalette = Palette16R5G5B5;
}
else if (redMask == 0xf800 && greenMask == 0x07e0 && blueMask == 0x001f)
{
SetPalette = Palette16R5G6B5;
}
else
{
SetPalette = Palette16Generic;
}
Convert = Convert16;
Masks.Bits16.Red = (uint16_t)redMask;
Masks.Bits16.Green = (uint16_t)greenMask;
Masks.Bits16.Blue = (uint16_t)blueMask;
break;
case 24:
if (redMask == 0xff0000 && greenMask == 0x00ff00 && blueMask == 0x0000ff)
{
SetPalette = Palette32RGB;
Convert = Convert24;
}
else if (redMask == 0x0000ff && greenMask == 0x00ff00 && blueMask == 0xff0000)
{
SetPalette = Palette32BGR;
Convert = Convert24;
}
else
{
I_FatalError ("24-bit displays are only supported if they are RGB or BGR");
};
break;
case 32:
if (redMask == 0xff0000 && greenMask == 0x00ff00 && blueMask == 0x0000ff)
{
SetPalette = Palette32RGB;
}
else if (redMask == 0x0000ff && greenMask == 0x00ff00 && blueMask == 0xff0000)
{
SetPalette = Palette32BGR;
}
else
{
SetPalette = Palette32Generic;
}
Convert = Convert32;
Masks.Bits32.Red = redMask;
Masks.Bits32.Green = greenMask;
Masks.Bits32.Blue = blueMask;
break;
default:
I_FatalError ("Can't draw to %d-bit displays", bits);
}
if (bits != 8 && bits != -8)
{
RedLeft = AnalyzeMask (redMask, &RedShift);
GreenLeft = AnalyzeMask (greenMask, &GreenShift);
BlueLeft = AnalyzeMask (blueMask, &BlueShift);
}
}
static bool AnalyzeMask (uint32_t mask, uint8_t *shiftout)
{
uint8_t shift = 0;
if (mask >= 0xff)
{
while (mask > 0xff)
{
shift++;
mask >>= 1;
}
*shiftout = shift;
return true;
}
else
{
while (mask < 0xff)
{
shift++;
mask <<= 1;
}
*shiftout = shift;
return false;
}
}
// Palette converters ------------------------------------------------------
static void Palette16Generic (const PalEntry *pal)
{
uint16_t *p16;
int i;
for (p16 = GPfxPal.Pal16, i = 256; i != 0; i--, pal++, p16++)
{
uint16_t rpart, gpart, bpart;
if (GPfx.RedLeft) rpart = pal->r << GPfx.RedShift;
else rpart = pal->r >> GPfx.RedShift;
if (GPfx.GreenLeft) gpart = pal->g << GPfx.GreenShift;
else gpart = pal->g >> GPfx.GreenShift;
if (GPfx.BlueLeft) bpart = pal->b << GPfx.BlueShift;
else bpart = pal->b >> GPfx.BlueShift;
*p16 = (rpart & GPfx.Masks.Bits16.Red) |
(gpart & GPfx.Masks.Bits16.Green) |
(bpart & GPfx.Masks.Bits16.Blue);
}
}
static void Palette16R5G5B5 (const PalEntry *pal)
{
uint16_t *p16;
int i;
for (p16 = GPfxPal.Pal16, i = 256; i != 0; i--, pal++, p16++)
{
*p16 = ((pal->r << 7) & 0x7c00) |
((pal->g << 2) & 0x03e0) |
((pal->b >> 3) & 0x001f);
}
}
static void Palette16R5G6B5 (const PalEntry *pal)
{
uint16_t *p16;
int i;
for (p16 = GPfxPal.Pal16, i = 256; i != 0; i--, pal++, p16++)
{
*p16 = ((pal->r << 8) & 0xf800) |
((pal->g << 3) & 0x07e0) |
((pal->b >> 3) & 0x001f);
}
}
static void Palette32Generic (const PalEntry *pal)
{
uint32_t *p32;
int i;
for (p32 = GPfxPal.Pal32, i = 256; i != 0; i--, pal++, p32++)
{
uint32_t rpart, gpart, bpart;
if (GPfx.RedLeft) rpart = pal->r << GPfx.RedShift;
else rpart = pal->r >> GPfx.RedShift;
if (GPfx.GreenLeft) gpart = pal->g << GPfx.GreenShift;
else gpart = pal->g >> GPfx.GreenShift;
if (GPfx.BlueLeft) bpart = pal->b << GPfx.BlueShift;
else bpart = pal->b >> GPfx.BlueShift;
*p32 = (rpart & GPfx.Masks.Bits32.Red) |
(gpart & GPfx.Masks.Bits32.Green) |
(bpart & GPfx.Masks.Bits32.Blue);
}
}
static void Palette32RGB (const PalEntry *pal)
{
memcpy (GPfxPal.Pal32, pal, 256*4);
}
static void Palette32BGR (const PalEntry *pal)
{
uint32_t *p32;
int i;
for (p32 = GPfxPal.Pal32, i = 256; i != 0; i--, pal++, p32++)
{
*p32 = (pal->r) | (pal->g << 8) | (pal->b << 16);
}
}
// Bitmap converters -------------------------------------------------------
static void Scale8 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac)
{
if ((destwidth | destheight) == 0)
{
return;
}
int x, y, savedx;
uint8_t *dest = (uint8_t *)destin;
if (xstep == FRACUNIT && ystep == FRACUNIT)
{
for (y = destheight; y != 0; y--)
{
memcpy(dest, src, destwidth);
dest += destpitch;
src += srcpitch;
}
}
else if (xstep == FRACUNIT/2 && ystep == FRACUNIT/2)
{
uint8_t *dest2 = dest + destpitch;
destpitch = destpitch * 2 - destwidth;
srcpitch -= destwidth / 2;
for (y = destheight / 2; y != 0; --y)
{
for (x = destwidth / 2; x != 0; --x)
{
uint8_t foo = src[0];
dest[0] = foo;
dest[1] = foo;
dest2[0] = foo;
dest2[1] = foo;
dest += 2;
dest2 += 2;
src += 1;
}
dest += destpitch;
dest2 += destpitch;
src += srcpitch;
}
}
else if (xstep == FRACUNIT/4 && ystep == FRACUNIT/4)
{
int gap = destpitch * 4 - destwidth;
srcpitch -= destwidth / 4;
for (y = destheight / 4; y != 0; --y)
{
for (uint8_t *end = dest + destpitch; dest != end; dest += 4)
{
uint8_t foo = src[0];
dest[0] = foo;
dest[1] = foo;
dest[2] = foo;
dest[3] = foo;
dest[0 + destpitch] = foo;
dest[1 + destpitch] = foo;
dest[2 + destpitch] = foo;
dest[3 + destpitch] = foo;
dest[0 + destpitch*2] = foo;
dest[1 + destpitch*2] = foo;
dest[2 + destpitch*2] = foo;
dest[3 + destpitch*2] = foo;
dest[0 + destpitch*3] = foo;
dest[1 + destpitch*3] = foo;
dest[2 + destpitch*3] = foo;
dest[3 + destpitch*3] = foo;
src += 1;
}
dest += gap;
src += srcpitch;
}
}
else
{
destpitch -= destwidth;
for (y = destheight; y != 0; y--)
{
fixed_t xf = xfrac;
x = destwidth;
while (((size_t)dest & 3) && x != 0)
{
*dest++ = src[xf >> FRACBITS];
xf += xstep;
x--;
}
for (savedx = x, x >>= 2; x != 0; x--)
{
uint32_t work;
#ifdef __BIG_ENDIAN__
work = src[xf >> FRACBITS] << 24; xf += xstep;
work |= src[xf >> FRACBITS] << 16; xf += xstep;
work |= src[xf >> FRACBITS] << 8; xf += xstep;
work |= src[xf >> FRACBITS]; xf += xstep;
#else
work = src[xf >> FRACBITS]; xf += xstep;
work |= src[xf >> FRACBITS] << 8; xf += xstep;
work |= src[xf >> FRACBITS] << 16; xf += xstep;
work |= src[xf >> FRACBITS] << 24; xf += xstep;
#endif
*(uint32_t *)dest = work;
dest += 4;
}
for (savedx &= 3; savedx != 0; savedx--, xf += xstep)
{
*dest++ = src[xf >> FRACBITS];
}
yfrac += ystep;
while (yfrac >= FRACUNIT)
{
yfrac -= FRACUNIT;
src += srcpitch;
}
dest += destpitch;
}
}
}
static void Convert8 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac)
{
if ((destwidth | destheight) == 0)
{
return;
}
int x, y, savedx;
uint8_t *dest = (uint8_t *)destin;
destpitch -= destwidth;
if (xstep == FRACUNIT && ystep == FRACUNIT)
{
srcpitch -= destwidth;
for (y = destheight; y != 0; y--)
{
x = destwidth;
while (((size_t)dest & 3) && x != 0)
{
*dest++ = GPfxPal.Pal8[*src++];
x--;
}
for (savedx = x, x >>= 2; x != 0; x--)
{
*(uint32_t *)dest =
#ifdef __BIG_ENDIAN__
(GPfxPal.Pal8[src[0]] << 24) |
(GPfxPal.Pal8[src[1]] << 16) |
(GPfxPal.Pal8[src[2]] << 8) |
(GPfxPal.Pal8[src[3]]);
#else
(GPfxPal.Pal8[src[0]]) |
(GPfxPal.Pal8[src[1]] << 8) |
(GPfxPal.Pal8[src[2]] << 16) |
(GPfxPal.Pal8[src[3]] << 24);
#endif
dest += 4;
src += 4;
}
for (savedx &= 3; savedx != 0; savedx--)
{
*dest++ = GPfxPal.Pal8[*src++];
}
dest += destpitch;
src += srcpitch;
}
}
else
{
for (y = destheight; y != 0; y--)
{
fixed_t xf = xfrac;
x = destwidth;
while (((size_t)dest & 3) && x != 0)
{
*dest++ = GPfxPal.Pal8[src[xf >> FRACBITS]];
xf += xstep;
x--;
}
for (savedx = x, x >>= 2; x != 0; x--)
{
uint32_t work;
#ifdef __BIG_ENDIAN__
work = GPfxPal.Pal8[src[xf >> FRACBITS]] << 24; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]] << 16; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]] << 8; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]]; xf += xstep;
#else
work = GPfxPal.Pal8[src[xf >> FRACBITS]]; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]] << 8; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]] << 16; xf += xstep;
work |= GPfxPal.Pal8[src[xf >> FRACBITS]] << 24; xf += xstep;
#endif
*(uint32_t *)dest = work;
dest += 4;
}
for (savedx &= 3; savedx != 0; savedx--, xf += xstep)
{
*dest++ = GPfxPal.Pal8[src[xf >> FRACBITS]];
}
yfrac += ystep;
while (yfrac >= FRACUNIT)
{
yfrac -= FRACUNIT;
src += srcpitch;
}
dest += destpitch;
}
}
}
static void Convert16 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac)
{
if ((destwidth | destheight) == 0)
{
return;
}
int x, y, savedx;
uint16_t *dest = (uint16_t *)destin;
destpitch = (destpitch >> 1) - destwidth;
if (xstep == FRACUNIT && ystep == FRACUNIT)
{
srcpitch -= destwidth;
for (y = destheight; y != 0; y--)
{
x = destwidth;
if ((size_t)dest & 1)
{
x--;
*dest++ = GPfxPal.Pal16[*src++];
}
for (savedx = x, x >>= 1; x != 0; x--)
{
*(uint32_t *)dest =
#ifdef __BIG_ENDIAN__
(GPfxPal.Pal16[src[0]] << 16) |
(GPfxPal.Pal16[src[1]]);
#else
(GPfxPal.Pal16[src[0]]) |
(GPfxPal.Pal16[src[1]] << 16);
#endif
dest += 2;
src += 2;
}
if (savedx & 1)
{
*dest++ = GPfxPal.Pal16[*src++];
}
dest += destpitch;
src += srcpitch;
}
}
else
{
for (y = destheight; y != 0; y--)
{
fixed_t xf = xfrac;
x = destwidth;
if ((size_t)dest & 1)
{
*dest++ = GPfxPal.Pal16[src[xf >> FRACBITS]];
xf += xstep;
x--;
}
for (savedx = x, x >>= 1; x != 0; x--)
{
uint32_t work;
#ifdef __BIG_ENDIAN__
work = GPfxPal.Pal16[src[xf >> FRACBITS]] << 16; xf += xstep;
work |= GPfxPal.Pal16[src[xf >> FRACBITS]]; xf += xstep;
#else
work = GPfxPal.Pal16[src[xf >> FRACBITS]]; xf += xstep;
work |= GPfxPal.Pal16[src[xf >> FRACBITS]] << 16; xf += xstep;
#endif
*(uint32_t *)dest = work;
dest += 2;
}
if (savedx & 1)
{
*dest++ = GPfxPal.Pal16[src[xf >> FRACBITS]];
}
yfrac += ystep;
while (yfrac >= FRACUNIT)
{
yfrac -= FRACUNIT;
src += srcpitch;
}
dest += destpitch;
}
}
}
static void Convert24 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac)
{
if ((destwidth | destheight) == 0)
{
return;
}
int x, y;
uint8_t *dest = (uint8_t *)destin;
destpitch = destpitch - destwidth*3;
if (xstep == FRACUNIT && ystep == FRACUNIT)
{
srcpitch -= destwidth;
for (y = destheight; y != 0; y--)
{
for (x = destwidth; x != 0; x--)
{
uint8_t *pe = GPfxPal.Pal24[src[0]];
dest[0] = pe[0];
dest[1] = pe[1];
dest[2] = pe[2];
dest += 3;
src++;
}
dest += destpitch;
src += srcpitch;
}
}
else
{
for (y = destheight; y != 0; y--)
{
fixed_t xf = xfrac;
for (x = destwidth; x != 0; x--)
{
uint8_t *pe = GPfxPal.Pal24[src[xf >> FRACBITS]];
dest[0] = pe[0];
dest[1] = pe[1];
dest[2] = pe[2];
xf += xstep;
dest += 2;
}
yfrac += ystep;
while (yfrac >= FRACUNIT)
{
yfrac -= FRACUNIT;
src += srcpitch;
}
dest += destpitch;
}
}
}
static void Convert32 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac)
{
if ((destwidth | destheight) == 0)
{
return;
}
int x, y, savedx;
uint32_t *dest = (uint32_t *)destin;
destpitch = (destpitch >> 2) - destwidth;
if (xstep == FRACUNIT && ystep == FRACUNIT)
{
srcpitch -= destwidth;
for (y = destheight; y != 0; y--)
{
for (savedx = x = destwidth, x >>= 3; x != 0; x--)
{
dest[0] = GPfxPal.Pal32[src[0]];
dest[1] = GPfxPal.Pal32[src[1]];
dest[2] = GPfxPal.Pal32[src[2]];
dest[3] = GPfxPal.Pal32[src[3]];
dest[4] = GPfxPal.Pal32[src[4]];
dest[5] = GPfxPal.Pal32[src[5]];
dest[6] = GPfxPal.Pal32[src[6]];
dest[7] = GPfxPal.Pal32[src[7]];
dest += 8;
src += 8;
}
for (x = savedx & 7; x != 0; x--)
{
*dest++ = GPfxPal.Pal32[*src++];
}
dest += destpitch;
src += srcpitch;
}
}
else
{
for (y = destheight; y != 0; y--)
{
fixed_t xf = xfrac;
for (savedx = x = destwidth, x >>= 1; x != 0; x--)
{
dest[0] = GPfxPal.Pal32[src[xf >> FRACBITS]]; xf += xstep;
dest[1] = GPfxPal.Pal32[src[xf >> FRACBITS]]; xf += xstep;
dest += 2;
}
if (savedx & 1)
{
*dest++ = GPfxPal.Pal32[src[xf >> FRACBITS]];
}
yfrac += ystep;
while (yfrac >= FRACUNIT)
{
yfrac -= FRACUNIT;
src += srcpitch;
}
dest += destpitch;
}
}
}
| 16,477 | 8,252 |
/*
// Definition for a Node.
class Node {
public:
int val;
Node* next;
Node* random;
Node() {}
Node(int _val, Node* _next, Node* _random) {
val = _val;
next = _next;
random = _random;
}
};
*/
class Solution {
public:
Node* copyRandomList(Node* head) {
this->nodeMap = unordered_map<Node *, Node *>();
if (head == nullptr) { return nullptr; }
copyRandomList_(head);
return nodeMap[head];
}
// Call this function when curr does not exist in the nodeMap
void copyRandomList_(Node *curr) {
nodeMap[curr] = new Node(curr->val, nullptr, nullptr);
Node *next = curr->next;
if (next != nullptr) {
if (nodeMap.find(next) == nodeMap.end()) {
copyRandomList_(next);
}
nodeMap[curr]->next = nodeMap[next];
}
Node *random = curr->random;
if (random != nullptr) {
if (nodeMap.find(random) == nodeMap.end()) {
copyRandomList_(random);
}
nodeMap[curr]->random = nodeMap[random];
}
}
private:
unordered_map<Node *, Node *> nodeMap;
}; | 1,240 | 378 |
/* Copyright 2020 The Mapnn Team. 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 "tengine_kernel.h"
#include <executor/operator/arm64/conv/winograd/wino_trans_ker.h>
#include <executor/operator/arm64/conv/winograd/wino_trans_inp.h>
#include <executor/operator/arm64/conv/winograd/wino_sgemm.h>
#include <executor/operator/arm64/conv/winograd/conv_2d_wino.h>
#define TILE 4
namespace mapnn {
void tengine_conv_2d_wino::init(const Tensors& ins, Tensor& out, Tensors& tmp, Operator& op) {
Conv conv(op);
L1CHW input(ins[0]);
L1CHW output(out);
L1VAB temp0(tmp[0]);
L1VAB temp1(tmp[1]);
const int extented_filter_h = conv.hdilation * (conv.hkernel - 1) + 1;
const int extented_filter_w = conv.wdilation * (conv.wkernel - 1) + 1;
const int output_xy = output.hw;
const int kernel_size = input.c * conv.hkernel * conv.wkernel;
output.c = conv.outch;
output.h = (input.h - extented_filter_h) / conv.hstride + 1;
output.w = (input.w - extented_filter_w) / conv.wstride + 1;
int block_h = (output.h + TILE - 1) / TILE;
int block_w = (output.w + TILE - 1) / TILE;
int block_hw = block_h * block_w;
int padded_inh = TILE * block_h + 2;
int padded_inw = TILE * block_w + 2;
int pad_inhw = padded_inh * padded_inw;
int inp_padded_size = (input.c * pad_inhw + 2);
temp0.u = 1;
temp0.v = 1;
temp0.a = inp_padded_size;
temp1.u = 1;
temp1.v = 1;
temp1.a = ELEM_SIZE * input.c * block_hw + 32;
}
void tengine_conv_2d_wino::run(const Tensors& ins, Tensor& out, Tensors& tmp, Operator& op) {
Conv conv(op);
L1CHW output(out);
L1CHW input(ins[0]);
L1VAB weight(ins[1]);
L111W biast(ins[2]);
L1VAB temp0(tmp[0]);
L1VAB temp1(tmp[1]);
int pad_h0 = 0;
int pad_w0 = 0;
int cpu_type = TYPE_A53;
int activation = -1;
float* input_org = input.data;
int input_c = input.c;
int input_h = input.h;
int input_w = input.w;
int inp_chw = input_c * input_h * input_w;
float* output_org = output.data;
int output_h = output.h;
int output_w = output.w;
int output_c = output.c;
int out_hw = output_h * output_w;
int out_chw = out_hw * output_c;
int output_n = 1;
int block_h = (output_h + TILE - 1) / TILE;
int block_w = (output_w + TILE - 1) / TILE;
int block_hw = block_h * block_w;
int padded_inh = TILE * block_h + 2;
int padded_inw = TILE * block_w + 2;
int pad_inhw = padded_inh * padded_inw;
int nn_block = block_hw / BLOCK_HW_UNIT;
int resi_block = nn_block * BLOCK_HW_UNIT;
int resi_w = block_w * TILE - output_w;
int resi_h = block_h * TILE - output_h;
float* kernel_interleaved = weight.data;
float* input_padded = temp0.data;
float* trans_inp = temp1.data;
float* bias = biast.data;
int bias_term = biast.data != NULL;
int block_4 = (block_hw+3)/4;
int L2_CACHE_SIZE = (cpu_type == TYPE_A53) ? 512 * 1024 : 1024 * 1024;
int L2_n = L2_CACHE_SIZE * 0.3 / (ELEM_SIZE * input_c * sizeof(float));
L2_n = L2_n > 16 ? (L2_n & -16) : 16;
int cout_count16 = output_c/16;
int cout_nn16 = cout_count16*16;
for(int n = 0; n < output_n; n++)
{
float* input = input_org + n * inp_chw;
float* output = output_org + n * out_chw;
// pad_trans_interleave_inp
pad_input1(input, input_padded, input_c, input_h, input_w, padded_inh, padded_inw, pad_h0, pad_w0);
tran_input_4block(input_padded, trans_inp, input_c, 0, nn_block, block_w, pad_inhw, padded_inw);
if(resi_block != block_hw)
tran_input_resi_block(input_padded, trans_inp, input_c, nn_block, resi_block, block_hw, block_w, pad_inhw,
padded_inw);
wino_sgemm_4x16(kernel_interleaved, trans_inp, output, bias, bias_term, input_c, cpu_type, 0, cout_nn16, 0,
block_hw, block_h, block_w, out_hw, output_w, resi_h, resi_w, activation);
if(cout_nn16!=output_c)
{
wino_sgemm_4x4(kernel_interleaved, trans_inp, output, bias, bias_term, input_c, cpu_type, cout_nn16,output_c , 0,
block_hw, block_h, block_w, out_hw, output_w, resi_h, resi_w, activation);
}
}
}
}
| 5,012 | 2,030 |
// This program demonstrates how a misplaced semicolon
// prematurely terminates an if statement.
#include <iostream>
using namespace std;
int main()
{
int x = 0, y = 10;
cout << "x is " << x << " and y is " << y << endl;
if (x > y); // Error! Misplaced semicolon
cout << "x is greater than y\n"; //This is always executed.
return 0;
} | 358 | 125 |
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "reflection.h"
#include <float.h>
#include <limits.h>
#include "ScopedLocalRef.h"
#include "art_method-inl.h"
#include "common_compiler_test.h"
#include "scoped_thread_state_change.h"
namespace art {
// TODO: Convert to CommonRuntimeTest. Currently MakeExecutable is used.
class ReflectionTest : public CommonCompilerTest {
protected:
virtual void SetUp() {
CommonCompilerTest::SetUp();
vm_ = Runtime::Current()->GetJavaVM();
// Turn on -verbose:jni for the JNI tests.
// gLogVerbosity.jni = true;
vm_->AttachCurrentThread(&env_, nullptr);
ScopedLocalRef<jclass> aioobe(env_,
env_->FindClass("java/lang/ArrayIndexOutOfBoundsException"));
CHECK(aioobe.get() != nullptr);
aioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(aioobe.get()));
ScopedLocalRef<jclass> ase(env_, env_->FindClass("java/lang/ArrayStoreException"));
CHECK(ase.get() != nullptr);
ase_ = reinterpret_cast<jclass>(env_->NewGlobalRef(ase.get()));
ScopedLocalRef<jclass> sioobe(env_,
env_->FindClass("java/lang/StringIndexOutOfBoundsException"));
CHECK(sioobe.get() != nullptr);
sioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(sioobe.get()));
}
void CleanUpJniEnv() {
if (aioobe_ != nullptr) {
env_->DeleteGlobalRef(aioobe_);
aioobe_ = nullptr;
}
if (ase_ != nullptr) {
env_->DeleteGlobalRef(ase_);
ase_ = nullptr;
}
if (sioobe_ != nullptr) {
env_->DeleteGlobalRef(sioobe_);
sioobe_ = nullptr;
}
}
virtual void TearDown() {
CleanUpJniEnv();
CommonCompilerTest::TearDown();
}
jclass GetPrimitiveClass(char descriptor) {
ScopedObjectAccess soa(env_);
mirror::Class* c = class_linker_->FindPrimitiveClass(descriptor);
CHECK(c != nullptr);
return soa.AddLocalReference<jclass>(c);
}
void ReflectionTestMakeExecutable(ArtMethod** method,
mirror::Object** receiver,
bool is_static, const char* method_name,
const char* method_signature)
SHARED_REQUIRES(Locks::mutator_lock_) {
const char* class_name = is_static ? "StaticLeafMethods" : "NonStaticLeafMethods";
jobject jclass_loader(LoadDex(class_name));
Thread* self = Thread::Current();
StackHandleScope<2> hs(self);
Handle<mirror::ClassLoader> class_loader(
hs.NewHandle(
ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader)));
if (is_static) {
MakeExecutable(ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader),
class_name);
} else {
MakeExecutable(nullptr, "java.lang.Class");
MakeExecutable(nullptr, "java.lang.Object");
MakeExecutable(ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader),
class_name);
}
mirror::Class* c = class_linker_->FindClass(self, DotToDescriptor(class_name).c_str(),
class_loader);
CHECK(c != nullptr);
*method = is_static ? c->FindDirectMethod(method_name, method_signature, sizeof(void*))
: c->FindVirtualMethod(method_name, method_signature, sizeof(void*));
CHECK(method != nullptr);
if (is_static) {
*receiver = nullptr;
} else {
// Ensure class is initialized before allocating object
StackHandleScope<1> hs2(self);
Handle<mirror::Class> h_class(hs2.NewHandle(c));
bool initialized = class_linker_->EnsureInitialized(self, h_class, true, true);
CHECK(initialized);
*receiver = c->AllocObject(self);
}
// Start runtime.
bool started = runtime_->Start();
CHECK(started);
self->TransitionFromSuspendedToRunnable();
}
void InvokeNopMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "nop", "()V");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), nullptr);
}
void InvokeIdentityByteMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(B)B");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[1];
args[0].b = 0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(0, result.GetB());
args[0].b = -1;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-1, result.GetB());
args[0].b = SCHAR_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(SCHAR_MAX, result.GetB());
static_assert(SCHAR_MIN == -128, "SCHAR_MIN unexpected");
args[0].b = SCHAR_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(SCHAR_MIN, result.GetB());
}
void InvokeIdentityIntMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(I)I");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[1];
args[0].i = 0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(0, result.GetI());
args[0].i = -1;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-1, result.GetI());
args[0].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(INT_MAX, result.GetI());
args[0].i = INT_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(INT_MIN, result.GetI());
}
void InvokeIdentityDoubleMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(D)D");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[1];
args[0].d = 0.0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(0.0, result.GetD());
args[0].d = -1.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(-1.0, result.GetD());
args[0].d = DBL_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(DBL_MAX, result.GetD());
args[0].d = DBL_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(DBL_MIN, result.GetD());
}
void InvokeSumIntIntMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(II)I");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[2];
args[0].i = 1;
args[1].i = 2;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(3, result.GetI());
args[0].i = -2;
args[1].i = 5;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(3, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-1, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-2, result.GetI());
}
void InvokeSumIntIntIntMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(III)I");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[3];
args[0].i = 0;
args[1].i = 0;
args[2].i = 0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(0, result.GetI());
args[0].i = 1;
args[1].i = 2;
args[2].i = 3;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(6, result.GetI());
args[0].i = -1;
args[1].i = 2;
args[2].i = -3;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-2, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MIN;
args[2].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(2147483646, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MAX;
args[2].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(2147483645, result.GetI());
}
void InvokeSumIntIntIntIntMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(IIII)I");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[4];
args[0].i = 0;
args[1].i = 0;
args[2].i = 0;
args[3].i = 0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(0, result.GetI());
args[0].i = 1;
args[1].i = 2;
args[2].i = 3;
args[3].i = 4;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(10, result.GetI());
args[0].i = -1;
args[1].i = 2;
args[2].i = -3;
args[3].i = 4;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(2, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MIN;
args[2].i = INT_MAX;
args[3].i = INT_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-2, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MAX;
args[2].i = INT_MAX;
args[3].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-4, result.GetI());
}
void InvokeSumIntIntIntIntIntMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(IIIII)I");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[5];
args[0].i = 0;
args[1].i = 0;
args[2].i = 0;
args[3].i = 0;
args[4].i = 0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(0, result.GetI());
args[0].i = 1;
args[1].i = 2;
args[2].i = 3;
args[3].i = 4;
args[4].i = 5;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(15, result.GetI());
args[0].i = -1;
args[1].i = 2;
args[2].i = -3;
args[3].i = 4;
args[4].i = -5;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(-3, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MIN;
args[2].i = INT_MAX;
args[3].i = INT_MIN;
args[4].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(2147483645, result.GetI());
args[0].i = INT_MAX;
args[1].i = INT_MAX;
args[2].i = INT_MAX;
args[3].i = INT_MAX;
args[4].i = INT_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(2147483643, result.GetI());
}
void InvokeSumDoubleDoubleMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DD)D");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[2];
args[0].d = 0.0;
args[1].d = 0.0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(0.0, result.GetD());
args[0].d = 1.0;
args[1].d = 2.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(3.0, result.GetD());
args[0].d = 1.0;
args[1].d = -2.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(-1.0, result.GetD());
args[0].d = DBL_MAX;
args[1].d = DBL_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(1.7976931348623157e308, result.GetD());
args[0].d = DBL_MAX;
args[1].d = DBL_MAX;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(INFINITY, result.GetD());
}
void InvokeSumDoubleDoubleDoubleMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDD)D");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[3];
args[0].d = 0.0;
args[1].d = 0.0;
args[2].d = 0.0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(0.0, result.GetD());
args[0].d = 1.0;
args[1].d = 2.0;
args[2].d = 3.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(6.0, result.GetD());
args[0].d = 1.0;
args[1].d = -2.0;
args[2].d = 3.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(2.0, result.GetD());
}
void InvokeSumDoubleDoubleDoubleDoubleMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDDD)D");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[4];
args[0].d = 0.0;
args[1].d = 0.0;
args[2].d = 0.0;
args[3].d = 0.0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(0.0, result.GetD());
args[0].d = 1.0;
args[1].d = 2.0;
args[2].d = 3.0;
args[3].d = 4.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(10.0, result.GetD());
args[0].d = 1.0;
args[1].d = -2.0;
args[2].d = 3.0;
args[3].d = -4.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(-2.0, result.GetD());
}
void InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(bool is_static) {
ScopedObjectAccess soa(env_);
ArtMethod* method;
mirror::Object* receiver;
ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDDDD)D");
ScopedLocalRef<jobject> receiver_ref(soa.Env(), soa.AddLocalReference<jobject>(receiver));
jvalue args[5];
args[0].d = 0.0;
args[1].d = 0.0;
args[2].d = 0.0;
args[3].d = 0.0;
args[4].d = 0.0;
JValue result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(0.0, result.GetD());
args[0].d = 1.0;
args[1].d = 2.0;
args[2].d = 3.0;
args[3].d = 4.0;
args[4].d = 5.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(15.0, result.GetD());
args[0].d = 1.0;
args[1].d = -2.0;
args[2].d = 3.0;
args[3].d = -4.0;
args[4].d = 5.0;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_DOUBLE_EQ(3.0, result.GetD());
}
JavaVMExt* vm_;
JNIEnv* env_;
jclass aioobe_;
jclass ase_;
jclass sioobe_;
};
TEST_F(ReflectionTest, StaticMainMethod) {
TEST_DISABLED_FOR_READ_BARRIER_WITH_OPTIMIZING_FOR_UNSUPPORTED_INSTRUCTION_SETS();
ScopedObjectAccess soa(Thread::Current());
jobject jclass_loader = LoadDex("Main");
StackHandleScope<1> hs(soa.Self());
Handle<mirror::ClassLoader> class_loader(
hs.NewHandle(soa.Decode<mirror::ClassLoader*>(jclass_loader)));
CompileDirectMethod(class_loader, "Main", "main", "([Ljava/lang/String;)V");
mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LMain;", class_loader);
ASSERT_TRUE(klass != nullptr);
ArtMethod* method = klass->FindDirectMethod("main", "([Ljava/lang/String;)V", sizeof(void*));
ASSERT_TRUE(method != nullptr);
// Start runtime.
bool started = runtime_->Start();
CHECK(started);
soa.Self()->TransitionFromSuspendedToRunnable();
jvalue args[1];
args[0].l = nullptr;
InvokeWithJValues(soa, nullptr, soa.EncodeMethod(method), args);
}
TEST_F(ReflectionTest, StaticNopMethod) {
InvokeNopMethod(true);
}
TEST_F(ReflectionTest, NonStaticNopMethod) {
InvokeNopMethod(false);
}
TEST_F(ReflectionTest, StaticIdentityByteMethod) {
InvokeIdentityByteMethod(true);
}
TEST_F(ReflectionTest, NonStaticIdentityByteMethod) {
InvokeIdentityByteMethod(false);
}
TEST_F(ReflectionTest, StaticIdentityIntMethod) {
InvokeIdentityIntMethod(true);
}
TEST_F(ReflectionTest, NonStaticIdentityIntMethod) {
InvokeIdentityIntMethod(false);
}
TEST_F(ReflectionTest, StaticIdentityDoubleMethod) {
InvokeIdentityDoubleMethod(true);
}
TEST_F(ReflectionTest, NonStaticIdentityDoubleMethod) {
InvokeIdentityDoubleMethod(false);
}
TEST_F(ReflectionTest, StaticSumIntIntMethod) {
InvokeSumIntIntMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumIntIntMethod) {
InvokeSumIntIntMethod(false);
}
TEST_F(ReflectionTest, StaticSumIntIntIntMethod) {
InvokeSumIntIntIntMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumIntIntIntMethod) {
InvokeSumIntIntIntMethod(false);
}
TEST_F(ReflectionTest, StaticSumIntIntIntIntMethod) {
InvokeSumIntIntIntIntMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumIntIntIntIntMethod) {
InvokeSumIntIntIntIntMethod(false);
}
TEST_F(ReflectionTest, StaticSumIntIntIntIntIntMethod) {
InvokeSumIntIntIntIntIntMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumIntIntIntIntIntMethod) {
InvokeSumIntIntIntIntIntMethod(false);
}
TEST_F(ReflectionTest, StaticSumDoubleDoubleMethod) {
InvokeSumDoubleDoubleMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumDoubleDoubleMethod) {
InvokeSumDoubleDoubleMethod(false);
}
TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleMethod(false);
}
TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleDoubleMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleDoubleMethod(false);
}
TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(true);
}
TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleDoubleDoubleMethod) {
InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(false);
}
} // namespace art
| 20,767 | 7,821 |
//+-------------------------------------------------------------------
//
// File: call.hxx
//
// Contents: Support for canceling DCOM calls
//
// Classes: CCallTable
// CMessageCall
// CAsyncCall
//
// History: 14-May-97 Gopalk Created
// History: 13-Nov-98 pdejong added Enable/Disable Cancel
//
//--------------------------------------------------------------------
#ifndef _CALL_HXX_
#define _CALL_HXX_
#include <pgalloc.hxx>
#include <destobj.hxx>
#include <objidl.h> // SChannelHookInfo
#define CALLENTRIES_PER_PAGE 100
#define CALLS_PER_PAGE 100
#define DEB_CALL DEB_USER1
#define DEB_CANCEL DEB_USER2
#define DEB_LOOP DEB_USER3
#define RPC_E_CALL_NESTED E_FAIL
#define RPC_E_CALL_NOTSYNCHRONOUS E_FAIL
const DWORD CALLFLAG_CALLCOMPLETED = DCOM_CALL_COMPLETE;
const DWORD CALLFLAG_CALLCANCELED = DCOM_CALL_CANCELED;
const DWORD CALLFLAG_USERMODEBITS = DCOM_CALL_COMPLETE | DCOM_CALL_CANCELED;
const DWORD CALLFLAG_CALLDISPATCHED = 0x00010000;
const DWORD CALLFLAG_WOWMSGARRIVED = 0x00020000;
const DWORD CALLFLAG_CALLFINISHED = 0x00040000;
const DWORD CALLFLAG_CANCELISSUED = 0x00080000;
const DWORD CALLFLAG_CLIENTNOTWAITING = 0x00100000;
const DWORD CALLFLAG_INDESTRUCTOR = 0x00200000;
const DWORD CALLFLAG_STATHREAD = 0x00400000;
const DWORD CALLFLAG_WOWTHREAD = 0x00800000;
const DWORD CALLFLAG_CALLSENT = 0x01000000;
const DWORD CALLFLAG_CLIENTASYNC = 0x02000000;
const DWORD CALLFLAG_SERVERASYNC = 0x04000000;
const DWORD CALLFLAG_SIGNALED = 0x08000000;
const DWORD CALLFLAG_ONCALLSTACK = 0x10000000;
const DWORD CALLFLAG_CANCELENABLED = 0x20000000;
const DWORD CALLFLAG_ERRORFROMPOLICY = 0x40000000;
class CAsyncCall;
class CCtxCall;
class CChannelObject;
// critical section guarding call objects
extern COleStaticMutexSem gCallLock;
extern BOOL gfChannelProcessInitialized;
void SignalTheClient(CAsyncCall *pCall);
//+-------------------------------------------------------------------
//
// Class: CCallTable, public
//
// Synopsis: Global Call Table.
//
// Notes: Table of registered Call objects
//
// History: 14-May-97 Gopalk Created
//
//--------------------------------------------------------------------
class CCallTable
{
public:
// Functionality methods
HRESULT PushCallObject(ICancelMethodCalls *pObject)
{
Win4Assert(pObject);
return SetEntry(pObject);
}
ICancelMethodCalls *PopCallObject(ICancelMethodCalls *pObject)
{
return ClearEntry(pObject);
}
ICancelMethodCalls *GetEntry(DWORD dwThreadId);
void CancelPendingCalls();
// Initialization and cleanup methods
void Initialize();
void Cleanup();
void PrivateCleanup();
private:
HRESULT SetEntry(ICancelMethodCalls *pObject);
ICancelMethodCalls *ClearEntry(ICancelMethodCalls *pObject);
ULONG m_cCalls; // Number of calls using the table
static BOOL m_fInitialized; // Set when initialized
static CPageAllocator m_Allocator; // Allocator for call entries
};
extern CCallTable gCallTbl; // Global call table
/* Type definitions. */
typedef enum EChannelState
{
// The channel on the client side held by the remote handler.
client_cs = 0x1,
// The channels on the client side held by proxies.
proxy_cs = 0x2,
// The server channels held by remote handlers.
server_cs = 0x4,
// Flag to indicate that the channel may be used on any thread.
freethreaded_cs = 0x8,
// The server and client are in this process.
process_local_cs = 0x20,
// Set when free buffer must call UnlockClient
locked_cs = 0x40,
// Call server on client's thread
neutral_cs = 0x100,
// Convert sync call to async to avoid blocking
fake_async_cs = 0x200,
// Use application security, set blanket called
app_security_cs = 0x400,
// The server and client are in the same thread
thread_local_cs = 0x800,
#ifdef _WIN64
// NDR Transfer Syntax Negotiation happened on the channel
syntax_negotiate_cs = 0x1000
#if DBG == 1
,
#endif
#endif
#if DBG == 1
// leave the NA to enter the MTA
leave_natomta_cs = 0x2000,
// leave the NA to enter the STA
leave_natosta_cs = 0x4000
#endif
} EChannelState;
typedef enum
{
none_ss,
pending_ss,
signaled_ss,
failed_ss
} ESignalState;
// Forward declaration of ClientCall
class CClientCall;
class CChannelHandle;
class CCliModalLoop;
//-----------------------------------------------------------------
//
// Class: CMessageCall
//
// Purpose: This class adds a message to the call info. The
// proxie's message is copied so the call can be
// canceled without stray pointer references.
//
//-----------------------------------------------------------------
class CMessageCall : public ICancelMethodCalls, public IMessageParam
{
public:
// Constructor and destructor
CMessageCall();
protected:
virtual ~CMessageCall();
virtual void UninitCallObject();
public:
// called before a call starts and after a call completes.
virtual HRESULT InitCallObject(CALLCATEGORY callcat,
RPCOLEMESSAGE *message,
DWORD flags,
REFIPID ipidServer,
DWORD destctx,
COMVERSION version,
CChannelHandle *handle);
// IUnknown methods
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppv) = 0;
STDMETHOD_(ULONG,AddRef)(void) = 0;
STDMETHOD_(ULONG,Release)(void) = 0;
// ICancelMethodCalls methods
STDMETHOD(Cancel)(ULONG ulSeconds) = 0;
STDMETHOD(TestCancel)(void) = 0;
// Virtual methods needed by every call type for cancel support
virtual void CallCompleted ( HRESULT hrRet ) = 0;
virtual void CallFinished () = 0;
virtual HRESULT CanDispatch () = 0;
virtual HRESULT WOWMsgArrived () = 0;
virtual HRESULT GetState ( DWORD *pdwState ) = 0;
virtual BOOL IsCallDispatched() = 0;
virtual BOOL IsCallCompleted () = 0;
virtual BOOL IsCallCanceled () = 0;
virtual BOOL IsCancelIssued () = 0;
virtual BOOL HasWOWMsgArrived() = 0;
virtual BOOL IsClientWaiting () = 0;
virtual void AckCancel () = 0;
virtual HRESULT Cancel (BOOL fModalLoop,
ULONG ulTimeout) = 0;
virtual HRESULT AdvCancel () = 0;
virtual void Abort() { Win4Assert(!"Abort Called"); }
// Query methods
BOOL ClientAsync() { return _iFlags & CALLFLAG_CLIENTASYNC; }
BOOL ServerAsync() { return _iFlags & CALLFLAG_SERVERASYNC; }
BOOL CancelEnabled() { return _iFlags & CALLFLAG_CANCELENABLED; }
BOOL IsClientSide() { return !(_iFlags & server_cs); }
BOOL FakeAsync() { return _iFlags & fake_async_cs; }
BOOL FreeThreaded() { return _iFlags & freethreaded_cs; }
void Lock() { _iFlags |= locked_cs; }
#if DBG == 1
void SetNAToMTAFlag() {_iFlags |= leave_natomta_cs;}
void ResetNAToMTAFlag(){_iFlags &= ~leave_natomta_cs;}
BOOL IsNAToMTAFlagSet(){ return _iFlags & leave_natomta_cs;}
void SetNAToSTAFlag() {_iFlags |= leave_natosta_cs;}
void ResetNAToSTAFlag(){_iFlags &= ~leave_natosta_cs;}
BOOL IsNAToSTAFlagSet(){ return _iFlags & leave_natosta_cs;}
#endif
BOOL Locked() { return _iFlags & locked_cs; }
BOOL Neutral() { return _iFlags & neutral_cs; }
BOOL ProcessLocal() { return _iFlags & process_local_cs; }
BOOL ThreadLocal() { return _iFlags & thread_local_cs; }
BOOL Proxy() { return _iFlags & proxy_cs; }
BOOL Server() { return _iFlags & server_cs; }
// Get methods
DWORD GetTimeout();
DWORD GetDestCtx() { return _destObj.GetDestCtx(); }
COMVERSION &GetComVersion() { return _destObj.GetComVersion(); }
CCtxCall *GetClientCtxCall() { return m_pClientCtxCall; }
CCtxCall *GetServerCtxCall() { return m_pServerCtxCall; }
BOOL GetErrorFromPolicy() { return (_iFlags & CALLFLAG_ERRORFROMPOLICY); }
HRESULT SetCallerhWnd();
HWND GetCallerhWnd() { return _hWndCaller; }
HANDLE GetEvent() { return _hEvent; }
CALLCATEGORY GetCallCategory(){ return _callcat; }
HRESULT GetResult() { return _hResult; }
void SetResult(HRESULT hr) { _hResult = hr; }
DWORD GetFault() { return _server_fault; }
void SetFault(DWORD fault) { _server_fault = fault; }
IPID & GetIPID() { return _ipid; }
HANDLE GetSxsActCtx() { return _hSxsActCtx; }
// Set methods
void SetThreadLocal(BOOL fThreadLocal);
void SetClientCtxCall(CCtxCall *pCtxCall) { m_pClientCtxCall = pCtxCall; }
void SetServerCtxCall(CCtxCall *pCtxCall) { m_pServerCtxCall = pCtxCall; }
void SetClientAsync() { _iFlags |= CALLFLAG_CLIENTASYNC; }
void SetServerAsync() { _iFlags |= CALLFLAG_SERVERASYNC; }
void SetCancelEnabled() { _iFlags |= CALLFLAG_CANCELENABLED; }
void SetErrorFromPolicy() { _iFlags |= CALLFLAG_ERRORFROMPOLICY; }
void ResetErrorFromPolicy() { _iFlags &= ~CALLFLAG_ERRORFROMPOLICY; }
void SetSxsActCtx(HANDLE hCtx);
// Other methods
HRESULT RslvCancel(DWORD &dwSignal, HRESULT hrIn,
BOOL fPostMsg, CCliModalLoop *pCML);
protected:
// Call object fields
CALLCATEGORY _callcat; // call category
DWORD _iFlags; // EChannelState
SCODE _hResult; // HRESULT or exception code
HANDLE _hEvent; // caller wait event
HWND _hWndCaller;// caller apartment hWnd (only used InWow)
IPID _ipid; // ipid of interface call is being made on
HANDLE _hSxsActCtx;// Activation context active in the caller's context
public:
// Channel fields
DWORD _server_fault;
CDestObject _destObj;
void *_pHeader;
CChannelHandle *_pHandle;
handle_t _hRpc; // Call handle (not binding handle).
IUnknown *_pContext;
// Structure
RPCOLEMESSAGE message;
SChannelHookCallInfo hook;
DWORD _dwErrorBufSize;
protected:
// Cancel fields
ULONG m_ulCancelTimeout; // Seconds to wait before canceling the call
DWORD m_dwStartCount; // Tick count at the time the call was made
CCtxCall *m_pClientCtxCall; // Client side context call object
CCtxCall *m_pServerCtxCall; // Server side context call object
};
inline void CMessageCall::SetSxsActCtx(HANDLE hCtx)
{
if (_hSxsActCtx != INVALID_HANDLE_VALUE)
ReleaseActCtx(_hSxsActCtx);
_hSxsActCtx = hCtx;
if (_hSxsActCtx != INVALID_HANDLE_VALUE)
AddRefActCtx(_hSxsActCtx);
}
inline void CMessageCall::SetThreadLocal( BOOL fTL )
{
if (fTL)
_iFlags |= thread_local_cs;
else
_iFlags &= ~thread_local_cs;
}
//-----------------------------------------------------------------
//
// Class: CAsyncCall
//
// Purpose: This class adds an async handle to a message call.
// Async calls need the message handle in addition to
// all the other stuff.
//
//-----------------------------------------------------------------
class CAsyncCall : public CMessageCall
{
public:
// Constructor and destructor
CAsyncCall();
CAsyncCall(ULONG refs)
{
_iRefCount = refs;
_pChnlObj = NULL;
_pContext = NULL;
#if DBG == 1
_dwSignature = 0;
#endif
}
virtual ~CAsyncCall();
public:
// called before a call starts and after a call completes.
HRESULT InitCallObject(CALLCATEGORY callcat,
RPCOLEMESSAGE *message,
DWORD flags,
REFIPID ipidServer,
DWORD destctx,
COMVERSION version,
CChannelHandle *handle);
void UninitCallObject();
static CMessageCall *AllocCallFromList();
BOOL ReturnCallToList(CAsyncCall *pCall);
static void Cleanup ( void );
void ServerReply ( void );
// IUnknown methods
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppv);
STDMETHOD_(ULONG,AddRef)(void);
STDMETHOD_(ULONG,Release)(void);
// ICancelMethodCalls methods
STDMETHOD(Cancel)(ULONG ulSeconds);
STDMETHOD(TestCancel)(void);
// CMessageCall methods
void CallCompleted(HRESULT hrRet);
void CallFinished();
HRESULT CallSent();
HRESULT CanDispatch();
HRESULT WOWMsgArrived();
HRESULT GetState(DWORD *pdwState);
BOOL IsCallDispatched() { return _lFlags & CALLFLAG_CALLDISPATCHED; }
BOOL IsCallCompleted () { return _lFlags & CALLFLAG_CALLCOMPLETED; }
BOOL IsCallCanceled () { return _lFlags & CALLFLAG_CALLCANCELED; }
BOOL IsCancelIssued () { return _lFlags & CALLFLAG_CANCELISSUED; }
BOOL HasWOWMsgArrived() { return _lFlags & CALLFLAG_WOWMSGARRIVED; }
BOOL IsClientWaiting () { return !(_lFlags & CALLFLAG_CLIENTNOTWAITING); }
void AckCancel();
HRESULT Cancel(BOOL fModalLoop, ULONG ulTimeout);
HRESULT AdvCancel();
BOOL IsCallSent() { return _lFlags & CALLFLAG_CALLSENT; };
void InitClientHwnd();
HRESULT InitForSendComplete();
void CallCompleted(BOOL *pCanceled);
#if DBG==1
void Signaled() {_lFlags |= CALLFLAG_SIGNALED;}
BOOL IsSignaled() {return _lFlags & CALLFLAG_SIGNALED;}
#endif
#if DBG==1
DWORD _dwSignature;
#endif
DWORD _iRefCount;
DWORD _lFlags;
CChannelObject *_pChnlObj;
void *_pRequestBuffer;
DWORD _lApt;
RPC_ASYNC_STATE _AsyncState;
HWND _hwndSTA;
CAsyncCall* _pNext;
// Debug field to track async calls that are signalled twice or freed with
// a pending signal.
ESignalState _eSignalState;
private:
static CAsyncCall *_aList[CALLCACHE_SIZE];
static DWORD _iNext;
};
inline CMessageCall *CAsyncCall::AllocCallFromList()
{
CMessageCall *pCall = NULL;
ASSERT_LOCK_NOT_HELD(gCallLock);
LOCK(gCallLock);
if (_iNext > 0 && _iNext < CALLCACHE_SIZE+1)
{
// Get the last entry from the cache.
_iNext--;
pCall = _aList[_iNext];
_aList[_iNext] = NULL;
}
UNLOCK(gCallLock);
ASSERT_LOCK_NOT_HELD(gCallLock);
return pCall;
}
inline BOOL CAsyncCall::ReturnCallToList(CAsyncCall *pCall)
{
// Add the structure to the list if the list is not full and
// if the process is still initialized (since latent threads may try
// to return stuff).
BOOL fRet = FALSE;
ASSERT_LOCK_NOT_HELD(gCallLock);
LOCK(gCallLock);
if (_iNext < CALLCACHE_SIZE && gfChannelProcessInitialized)
{
_aList[_iNext] = pCall;
_iNext++;
fRet = TRUE; // don't need to memfree
}
UNLOCK(gCallLock);
ASSERT_LOCK_NOT_HELD(gCallLock);
return fRet;
}
inline void CAsyncCall::AckCancel()
{
ASSERT_LOCK_HELD(gCallLock);
_lFlags &= ~CALLFLAG_CANCELISSUED;
ASSERT_LOCK_HELD(gCallLock);
}
inline void CAsyncCall::ServerReply()
{
Win4Assert( _hRpc != NULL );
if (_hResult != S_OK)
{
I_RpcAsyncAbortCall( &_AsyncState, _hResult );
}
else
{
// Ignore errors because replies can fail.
message.reserved1 = _hRpc;
I_RpcSend( (RPC_MESSAGE *) &message );
}
}
//+-------------------------------------------------------------------
//
// Class: CClientCall, public
//
// Synopsis: Default Call Object on the client side
//
// Notes: Default call object that is used by the channel on the
// client side for standard marshaled calls.
// REVIEW: We need a mechanism for handlers to overide
// installation of the above default call object
//
// History: 26-June-97 Gopalk Created
//
//--------------------------------------------------------------------
class CClientCall : public CMessageCall
{
public:
// Constructor and destructor
CClientCall();
CClientCall(ULONG cRefs) : m_cRefs(cRefs) {}
virtual ~CClientCall();
// called before a call starts and after a call completes.
HRESULT InitCallObject(CALLCATEGORY callcat,
RPCOLEMESSAGE *message,
DWORD flags,
REFIPID ipidServer,
DWORD destctx,
COMVERSION version,
CChannelHandle *handle);
void UninitCallObject();
// Operators
void *operator new(size_t size);
void operator delete(void *pv);
// Cleanup method
static void Cleanup();
// IUnknown methods
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppv);
STDMETHOD_(ULONG,AddRef)(void);
STDMETHOD_(ULONG,Release)(void);
// ICancelMethodCalls methods
STDMETHOD(Cancel)(ULONG ulSeconds);
STDMETHOD(TestCancel)(void);
// CMessageCall methods
void CallCompleted(HRESULT hrRet);
void CallFinished();
HRESULT CanDispatch();
HRESULT WOWMsgArrived();
HRESULT GetState(DWORD *pdwState);
BOOL IsCallDispatched() {
return(m_dwFlags & CALLFLAG_CALLDISPATCHED);
}
BOOL IsCallCompleted() {
return(m_dwFlags & CALLFLAG_CALLCOMPLETED);
}
BOOL IsCallCanceled() {
return(m_dwFlags & CALLFLAG_CALLCANCELED);
}
BOOL IsCancelIssued() {
return(m_dwFlags & CALLFLAG_CANCELISSUED);
}
BOOL HasWOWMsgArrived() {
return(m_dwFlags & CALLFLAG_WOWMSGARRIVED);
}
BOOL IsClientWaiting() {
return(!(m_dwFlags & CALLFLAG_CLIENTNOTWAITING));
}
void AckCancel()
{
ASSERT_LOCK_HELD(gCallLock);
m_dwFlags &= ~CALLFLAG_CANCELISSUED;
ASSERT_LOCK_HELD(gCallLock);
}
HRESULT Cancel(BOOL fModalLoop, ULONG ulTimeout);
HRESULT AdvCancel();
private:
// Private member variables
ULONG m_cRefs; // References
DWORD m_dwFlags; // State bits
HANDLE m_hThread; // Handle to the thread making RPC call
DWORD m_dwThreadId; // ThreadId of the thread making COM call
#if DBG==1
DWORD m_dwSignature; // Signature of call control object
DWORD m_dwWorkerThreadId; // ThreadId of the thread making the call
#endif
static void *_aList[CALLCACHE_SIZE];
static DWORD _iNext;
};
/***************************************************************************/
/* Externals. */
DWORD _stdcall ComSignal ( void *pParam );
void ThreadSignal(struct _RPC_ASYNC_STATE *hAsync, void *Context,
RPC_ASYNC_EVENT eVent );
INTERNAL GetCallObject (BOOL fAsync, CMessageCall **ppCall);
INTERNAL ReleaseMarshalBuffer(
RPCOLEMESSAGE *pMessage,
IUnknown *punk,
BOOL fOutParams
);
#endif // _CALL_HXX_
| 20,901 | 6,936 |
#include <iostream>
#include <vector>
#include <SFML/Graphics.hpp>
#include "Network.h"
#include "Stage.h"
int main()
{
Stage stage(3, 3000);
sf::RenderWindow window(sf::VideoMode(1920, 1080), "Genetic Drone Evolution");
stage.init(window);
stage.run();
return 0;
} | 290 | 117 |
#include <vtkActor.h>
#include <vtkCamera.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkLookupTable.h>
#include <vtkNamedColors.h>
#include <vtkNew.h>
#include <vtkPointData.h>
#include <vtkPolyDataConnectivityFilter.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkSmartPointer.h>
#include <vtkSphereSource.h>
#include <vtkMinimalStandardRandomSequence.h>
#include <vtkBYUReader.h>
#include <vtkOBJReader.h>
#include <vtkPLYReader.h>
#include <vtkPolyDataReader.h>
#include <vtkSTLReader.h>
#include <vtkXMLPolyDataReader.h>
//#include <random>
#include <vtksys/SystemTools.hxx>
namespace {
vtkSmartPointer<vtkPolyData> ReadPolyData(const char* fileName);
void RandomColors(vtkLookupTable* lut, int numberOfColors);
} // namespace
int main(int argc, char* argv[])
{
vtkSmartPointer<vtkPolyData> polyData = ReadPolyData(argc > 1 ? argv[1] : "");
vtkNew<vtkNamedColors> colors;
vtkNew<vtkPolyDataConnectivityFilter> connectivityFilter;
connectivityFilter->SetInputData(polyData);
connectivityFilter->SetExtractionModeToAllRegions();
connectivityFilter->ColorRegionsOn();
connectivityFilter->Update();
// Visualize
auto numberOfRegions = connectivityFilter->GetNumberOfExtractedRegions();
vtkNew<vtkLookupTable> lut;
lut->SetNumberOfTableValues(std::max(numberOfRegions, 10));
lut->Build();
RandomColors(lut, numberOfRegions);
vtkNew<vtkPolyDataMapper> mapper;
mapper->SetInputConnection(connectivityFilter->GetOutputPort());
mapper->SetScalarRange(connectivityFilter->GetOutput()
->GetPointData()
->GetArray("RegionId")
->GetRange());
mapper->SetLookupTable(lut);
mapper->Update();
vtkNew<vtkActor> actor;
actor->SetMapper(mapper);
vtkNew<vtkRenderer> renderer;
renderer->UseHiddenLineRemovalOn();
renderer->AddActor(actor);
renderer->SetBackground(colors->GetColor3d("Silver").GetData());
// Create a useful view
renderer->ResetCamera();
renderer->GetActiveCamera()->Azimuth(30);
renderer->GetActiveCamera()->Elevation(30);
renderer->GetActiveCamera()->Dolly(1.2);
renderer->ResetCameraClippingRange();
vtkNew<vtkRenderWindow> renderWindow;
renderWindow->AddRenderer(renderer);
renderWindow->SetSize(640, 480);
renderWindow->SetWindowName("ColorDisconnectedRegions");
vtkNew<vtkInteractorStyleTrackballCamera> style;
vtkNew<vtkRenderWindowInteractor> interactor;
interactor->SetInteractorStyle(style);
interactor->SetRenderWindow(renderWindow);
renderWindow->Render();
interactor->Initialize();
interactor->Start();
return EXIT_SUCCESS;
}
namespace {
vtkSmartPointer<vtkPolyData> ReadPolyData(const char* fileName)
{
vtkSmartPointer<vtkPolyData> polyData;
std::string extension =
vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName));
if (extension == ".ply")
{
vtkNew<vtkPLYReader> reader;
reader->SetFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".vtp")
{
vtkNew<vtkXMLPolyDataReader> reader;
reader->SetFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".obj")
{
vtkNew<vtkOBJReader> reader;
reader->SetFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".stl")
{
vtkNew<vtkSTLReader> reader;
reader->SetFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".vtk")
{
vtkNew<vtkPolyDataReader> reader;
reader->SetFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".g")
{
vtkNew<vtkBYUReader> reader;
reader->SetGeometryFileName(fileName);
reader->Update();
polyData = reader->GetOutput();
}
else
{
vtkNew<vtkSphereSource> source;
source->Update();
polyData = source->GetOutput();
}
return polyData;
}
void RandomColors(vtkLookupTable* lut, int numberOfColors)
{
// Fill in a few known colors, the rest will be generated if needed
vtkNew<vtkNamedColors> colors;
lut->SetTableValue(0, colors->GetColor4d("Gold").GetData());
lut->SetTableValue(1, colors->GetColor4d("Banana").GetData());
lut->SetTableValue(2, colors->GetColor4d("Tomato").GetData());
lut->SetTableValue(3, colors->GetColor4d("Wheat").GetData());
lut->SetTableValue(4, colors->GetColor4d("Lavender").GetData());
lut->SetTableValue(5, colors->GetColor4d("Flesh").GetData());
lut->SetTableValue(6, colors->GetColor4d("Raspberry").GetData());
lut->SetTableValue(7, colors->GetColor4d("Salmon").GetData());
lut->SetTableValue(8, colors->GetColor4d("Mint").GetData());
lut->SetTableValue(9, colors->GetColor4d("Peacock").GetData());
// If the number of colors is larger than the number of specified colors,
// generate some random colors.
vtkNew<vtkMinimalStandardRandomSequence> randomSequence;
randomSequence->SetSeed(4355412);
if (numberOfColors > 9)
{
for (auto i = 10; i < numberOfColors; ++i)
{
double r, g, b;
r = randomSequence->GetRangeValue(0.6, 1.0);
randomSequence->Next();
g = randomSequence->GetRangeValue(0.6, 1.0);
randomSequence->Next();
b = randomSequence->GetRangeValue(0.6, 1.0);
randomSequence->Next();
lut->SetTableValue(i, r, g, b, 1.0);
}
}
}
} // namespace
| 5,559 | 1,935 |
#include "game.h"
int main()
{
printf("Please enter the name of the players:\n");
printf("(Press two enters if there is only one player!)\n");
gets(username1);
gets(username2);
initwindow(WIDTH,HEIGHT);
PlaySound("theme.wav", NULL, SND_ASYNC);
char s[100];
int clr[9] = {};
while(true) {
if(state == 1) {
state = mainmenu();
}
else if(state == 2) {
state = difficulty();
}
else if(state == 3) {
state = options();
}
else if(state == 4) {
state = highscore();
}
else if(state == 5){
state = game();
}
else if(state == 0) {
return 0;
}
}
return 0;
}
| 761 | 248 |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef unsigned long long ull;
typedef pair<int, int> ipair;
typedef vector<int> coord;
void widen(deque<deque<char>> &img, int times, char c) {
for (auto &row : img) {
for (int i = 0; i < times; i++) {
row.push_front(c);
row.push_back(c);
}
}
deque<char> r(img[0].size(), c);
for (int i = 0; i < times; i++) {
img.push_front(r);
img.push_back(r);
}
};
void print(deque<deque<char>> &img) {
for (auto row : img) {
for (auto col : row) {
printf("%c", col);
}
printf("\n");
}
printf("\n");
}
int index(int i, int j, deque<deque<char>> &src, char frame) {
int ix = 0;
int m = src.size();
int n = src[0].size();
for (int di : {-1, 0, 1}) {
for (int dj : {-1, 0, 1}) {
int bit = 0;
if (i + di >= 0 && i + di < m && j + dj >= 0 && j + dj < n) {
bit = src[i + di][j + dj] == '.' ? 0 : 1;
} else {
bit = frame == '.' ? 0 : 1;
}
// printf("%d", bit);
ix += bit;
// ix *= 2;
if (dj == 1 && di == 1) continue;
ix *= 2;
}
}
// ix /= 2;
return ix;
// dst[i][j] = code[ix];
}
int main() {
int times = 2;
string code;
deque<deque<char>> img;
getline(cin, code);
string s;
getline(cin, s);
while (getline(cin, s)) {
deque<char> tmp;
for (char c : s) {
tmp.push_back(c);
}
img.push_back(tmp);
}
// printf("index: %d", index(2, 2, img));
// return 0;
// printf("%lu %lu\n", img.size(), img[0].size());
// return 0;
char frame = '.';
widen(img, 2, frame);
for (int t = 0; t < times; t++) {
deque<deque<char>> next(img);
// print(img);
for (int i = 0; i < img.size(); i++) {
for (int j = 0; j < img[0].size(); j++) {
next[i][j] = code[index(i, j, img, frame)];
}
}
// char frame = t % 2 == 1 ? code[0] : code[code.size() - 1];
// if (code[0] == '.') frame = '.';
// printf("here\n");
img = next;
frame = img[0][0];
// print(img);
widen(img, 1, frame);
}
print(img);
int sum = 0;
for (int i = 0; i < img.size(); i++) {
for (int j = 0; j < img[0].size(); j++) {
if (img[i][j] == '#') sum++;
}
}
printf("%lu %lu %d\n", img.size(), img[0].size(), sum);
return 0;
} | 2,476 | 1,080 |
// Copyright 2019 Qwant Research. Licensed under the terms of the Apache 2.0
// license. See LICENSE in the project root.
#include "utils.h"
void printCookies(const Pistache::Http::Request &req) {
auto cookies = req.cookies();
const std::string indent(4, ' ');
std::cout << "Cookies: [" << std::endl;
for (const auto &c : cookies) {
std::cout << indent << c.name << " = " << c.value << std::endl;
}
std::cout << "]" << std::endl;
}
const std::string currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
// Visit http://en.cppreference.com/w/cpp/chrono/c/strftime
// for more information about date/time format
strftime(buf, sizeof(buf), "%Y-%m-%d.%X", &tstruct);
return buf;
}
namespace Generic {
void handleReady(const Pistache::Rest::Request &req, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Ok, "1");
}
} // namespace Generic
| 960 | 343 |
/*
* Copyright (C) 2013 Zuse-Institute-Berlin (ZIB)
* Copyright (C) 2013-2014 Thoralf Klein
* Written (W) 2013-2014 Thoralf Klein
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those
* of the authors and should not be interpreted as representing official policies,
* either expressed or implied, of the Shogun Development Team.
*/
#include <shogun/labels/MultilabelLabels.h>
#include <shogun/io/SGIO.h> // for require, io::print, etc
using namespace shogun;
CMultilabelLabels::CMultilabelLabels()
: CLabels()
{
init(0, 1);
}
CMultilabelLabels::CMultilabelLabels(int32_t num_classes)
: CLabels()
{
init(0, num_classes);
}
CMultilabelLabels::CMultilabelLabels(int32_t num_labels, int32_t num_classes)
: CLabels()
{
init(num_labels, num_classes);
}
CMultilabelLabels::~CMultilabelLabels()
{
delete[] m_labels;
}
void
CMultilabelLabels::init(int32_t num_labels, int32_t num_classes)
{
require(num_labels >= 0, "num_labels={} should be >= 0", num_labels);
require(num_classes > 0, "num_classes={} should be > 0", num_classes);
// This one does consider the contained labels, so its simply BROKEN
// Can be disabled as
SG_ADD(&m_num_labels, "m_num_labels", "number of labels");
SG_ADD(&m_num_classes, "m_num_classes", "number of classes");
// SG_ADD((CSGObject**) &m_labels, "m_labels", "The labels");
// Can only be enabled after this issue has been solved:
// https://github.com/shogun-toolbox/shogun/issues/1972
/* this->m_parameters->add(&m_num_labels, "m_num_labels",
"Number of labels.");
this->m_parameters->add(&m_num_classes, "m_num_classes",
"Number of classes.");
this->m_parameters->add_vector(&m_labels, &m_num_labels, "labels_array",
"The label vectors for all (num_labels)
outputs.");
*/
m_num_labels = num_labels;
m_num_classes = num_classes;
m_labels = new SGVector <int32_t>[m_num_labels];
}
bool CMultilabelLabels::is_valid() const
{
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
if (!CMath::is_sorted(m_labels[label_j]))
return false;
int32_t c_len = m_labels[label_j].vlen;
if (c_len <= 0)
{
continue;
}
if (m_labels[label_j].vector[0] < 0)
return false;
if (m_labels[label_j].vector[c_len - 1] >= get_num_classes())
return false;
}
return true;
}
void CMultilabelLabels::ensure_valid(const char* context)
{
require(
is_valid(),
"Multilabel labels need to be sorted and in [0, num_classes-1].");
}
int32_t
CMultilabelLabels::get_num_labels() const
{
return m_num_labels;
}
int32_t
CMultilabelLabels::get_num_classes() const
{
return m_num_classes;
}
void
CMultilabelLabels::set_labels(SGVector <int32_t> * labels)
{
for (int32_t label_j = 0; label_j < m_num_labels; label_j++)
{
m_labels[label_j] = labels[label_j];
}
ensure_valid("set_labels()");
}
SGVector <int32_t> ** CMultilabelLabels::get_class_labels() const
{
SGVector <int32_t> ** labels_list =
SG_MALLOC(SGVector <int32_t> *, get_num_classes());
int32_t * num_label_idx =
SG_MALLOC(int32_t, get_num_classes());
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
num_label_idx[class_i] = 0;
}
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
for (int32_t c_pos = 0; c_pos < m_labels[label_j].vlen; c_pos++)
{
int32_t class_i = m_labels[label_j][c_pos];
require(class_i < get_num_classes(),
"class_i exceeded number of classes");
num_label_idx[class_i]++;
}
}
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
labels_list[class_i] =
new SGVector <int32_t> (num_label_idx[class_i]);
}
SG_FREE(num_label_idx);
int32_t * next_label_idx = SG_MALLOC(int32_t, get_num_classes());
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
next_label_idx[class_i] = 0;
}
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
for (int32_t c_pos = 0; c_pos < m_labels[label_j].vlen; c_pos++)
{
// get class_i of current position
int32_t class_i = m_labels[label_j][c_pos];
require(class_i < get_num_classes(),
"class_i exceeded number of classes");
// next free element in m_classes[class_i]:
int32_t l_pos = next_label_idx[class_i];
require(l_pos < labels_list[class_i]->size(),
"l_pos exceeded length of label list");
next_label_idx[class_i]++;
// finally, story label_j into class-column
(*labels_list[class_i])[l_pos] = label_j;
}
}
SG_FREE(next_label_idx);
return labels_list;
}
SGMatrix<int32_t> CMultilabelLabels::get_labels() const
{
if (m_num_labels==0)
return SGMatrix<int32_t>();
int32_t n_outputs = m_labels[0].vlen;
SGMatrix<int32_t> labels(m_num_labels, n_outputs);
for (int32_t i=0; i<m_num_labels; i++)
{
require(m_labels[i].vlen==n_outputs,
"This function is valid only for multiclass multiple output lables.");
for (int32_t j=0; j<n_outputs; j++)
labels(i,j) = m_labels[i][j];
}
return labels;
}
SGVector <int32_t> CMultilabelLabels::get_label(int32_t j)
{
require(j < get_num_labels(),
"label index j={} should be within [{},{}[",
j, 0, get_num_labels());
return m_labels[j];
}
template <class S, class D>
SGVector <D> CMultilabelLabels::to_dense
(SGVector <S> * sparse, int32_t dense_len, D d_true, D d_false)
{
SGVector <D> dense(dense_len);
dense.set_const(d_false);
for (int32_t i = 0; i < sparse->vlen; i++)
{
S index = (*sparse)[i];
require(index < dense_len,
"class index exceeded length of dense vector");
dense[index] = d_true;
}
return dense;
}
template
SGVector <int32_t> CMultilabelLabels::to_dense <int32_t, int32_t>
(SGVector <int32_t> *, int32_t, int32_t, int32_t);
template
SGVector <float64_t> CMultilabelLabels::to_dense <int32_t, float64_t>
(SGVector <int32_t> *, int32_t, float64_t, float64_t);
void
CMultilabelLabels::set_label(int32_t j, SGVector <int32_t> label)
{
require(j < get_num_labels(),
"label index j={} should be within [{},{}[",
j, 0, get_num_labels());
m_labels[j] = label;
}
void
CMultilabelLabels::set_class_labels(SGVector <int32_t> ** labels_list)
{
int32_t * num_class_idx = SG_MALLOC(int32_t , get_num_labels());
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
num_class_idx[label_j] = 0;
}
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
for (int32_t l_pos = 0; l_pos < labels_list[class_i]->vlen; l_pos++)
{
int32_t label_j = (*labels_list[class_i])[l_pos];
require(label_j < get_num_labels(),
"class_i={}/{} :: label_j={}/{} (l_pos={})",
class_i, get_num_classes(), label_j, get_num_labels(),
l_pos);
num_class_idx[label_j]++;
}
}
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
m_labels[label_j].resize_vector(num_class_idx[label_j]);
}
SG_FREE(num_class_idx);
int32_t * next_class_idx = SG_MALLOC(int32_t , get_num_labels());
for (int32_t label_j = 0; label_j < get_num_labels(); label_j++)
{
next_class_idx[label_j] = 0;
}
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
for (int32_t l_pos = 0; l_pos < labels_list[class_i]->vlen; l_pos++)
{
// get class_i of current position
int32_t label_j = (*labels_list[class_i])[l_pos];
require(label_j < get_num_labels(),
"class_i={}/{} :: label_j={}/{} (l_pos={})",
class_i, get_num_classes(), label_j, get_num_labels(),
l_pos);
// next free element in m_labels[label_j]:
int32_t c_pos = next_class_idx[label_j];
require(c_pos < m_labels[label_j].size(),
"c_pos exceeded length of labels vector");
next_class_idx[label_j]++;
// finally, story label_j into class-column
m_labels[label_j][c_pos] = class_i;
}
}
SG_FREE(next_class_idx);
return;
}
void
CMultilabelLabels::display() const
{
SGVector <int32_t> ** labels_list = get_class_labels();
io::print("printing {} binary label vectors for {} multilabels:\n",
get_num_classes(), get_num_labels());
for (int32_t class_i = 0; class_i < get_num_classes(); class_i++)
{
io::print(" yC_{{class_i={}}}", class_i);
SGVector <float64_t> dense =
to_dense <int32_t, float64_t> (labels_list[class_i],
get_num_labels(), +1, -1);
dense.display_vector("");
delete labels_list[class_i];
}
SG_FREE(labels_list);
io::print("printing {} binary class vectors for {} labels:\n",
get_num_labels(), get_num_classes());
for (int32_t j = 0; j < get_num_labels(); j++)
{
io::print(" y_{{j={}}}", j);
SGVector <float64_t> dense =
to_dense <int32_t , float64_t> (&m_labels[j], get_num_classes(),
+1, -1);
dense.display_vector("");
}
return;
}
| 10,427 | 4,360 |
class Exception {};
namespace ns {
class Throwable {};
}
void foo_1() throw (const char) {
}
void foo_2() throw (const char&) {
}
void foo_3() throw (Exception) {
}
void foo_4() throw (const Exception&) {
}
void foo_5() throw (const ns::Throwable&) {
}
void foo_6() throw () {
}
int fun1(int, int);
int (*fp_fun1)(int, int) = fun1;
// An extremely perverted one
void foo_7() throw (int (*)(int, int)) {
throw fp_fun1;
}
| 436 | 175 |
/*
* Copyright (c) 2014-2017 The University of Utah
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/*
Orion Sky Lawlor, olawlor@acm.org, 9/23/2000
Computes so-called "Mie scattering" for a homogenous
sphere of arbitrary size illuminated by coherent
harmonic radiation.
*/
#include <radprops/Particles.h>
#include <test/TestHelper.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <ctime>
#include <string>
#include "cuda.h"
using namespace std;
using namespace RadProps;
bool cpu_gpu_compare(const double* gpuValues, const double* cpuValues, const size_t n, const double t_cpu, const double t_gpu)
{
double *hostValues;
hostValues = (double*)malloc(sizeof(double) * n);
cudaError_t err= cudaMemcpy( hostValues, gpuValues, sizeof(double) * n, cudaMemcpyDeviceToHost );
cudaThreadSynchronize();
for (int i=0; i<n; ++i) {
if (std::abs((hostValues[i] - cpuValues[i]) / cpuValues[i]) > 1e-8) {
std::cout << cpuValues[i] << " - " <<hostValues[i] << "\n";
return false;
}
}
std::cout <<" npts = " << n << "\t" << "time CPU = " << t_cpu << ", GPU = " << t_gpu << " => CPU/GPU = " << t_cpu / t_gpu << std::endl;
return true;
}
bool time_it2D(const ParticleRadCoeffs& pcoeff, const ParticleRadCoeffs3D& pcoeff3D, const size_t n)
{
TestHelper status(true);
std::vector<double> wavelength, radius, temperature, iRreal;
for (int i=0; i<n ; i++) {
wavelength. push_back(double(rand())/double(RAND_MAX) * 1e-6);
radius. push_back(double(rand())/double(RAND_MAX) * 1e-6);
temperature.push_back(double(rand())/double(RAND_MAX) * 1000 + 300);
iRreal. push_back(double(rand())/double(RAND_MAX));
}
// GPU variables
double *gpuWavelength, *gpuRadius, *gpuTemperature, *gpuiRreal;
cudaMalloc((void**) &gpuWavelength, sizeof(double) * n);
cudaMalloc((void**) &gpuRadius, sizeof(double) * n);
cudaMalloc((void**) &gpuTemperature, sizeof(double) * n);
cudaMalloc((void**) &gpuiRreal, sizeof(double) * n);
cudaMemcpy(gpuWavelength , &wavelength[0], sizeof(double) * n, cudaMemcpyHostToDevice);
cudaMemcpy(gpuRadius , &radius[0], sizeof(double) * n, cudaMemcpyHostToDevice);
cudaMemcpy(gpuTemperature , &temperature[0],sizeof(double) * n, cudaMemcpyHostToDevice);
cudaMemcpy(gpuiRreal , &gpuiRreal[0], sizeof(double) * n, cudaMemcpyHostToDevice);
cudaThreadSynchronize();
double *gpuValues;
cudaMalloc((void**) &gpuValues, sizeof(double) * n);
std::clock_t start;
double t_cpu, t_gpu;
string modelname;
modelname = "abs_spectral_coeff";
std::vector<double> cpuValues;
cpuValues.clear();
// 2D
// Run on CPU
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff.abs_spectral_coeff(wavelength[i], radius[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_abs_spectral_coeff(gpuValues, gpuWavelength, gpuRadius, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff3D.abs_spectral_coeff(wavelength[i], radius[i], iRreal[i]));
t_cpu = std::clock() - start;
start = std::clock(); pcoeff3D.gpu_abs_spectral_coeff(gpuValues, gpuWavelength, gpuRadius, gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
modelname = "scattering_spectral_coeff";
cpuValues.clear();
// 2D
// Run on CPU
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues[i] = pcoeff.scattering_spectral_coeff(wavelength[i], radius[i]);
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_scattering_spectral_coeff(gpuValues, gpuWavelength, gpuRadius, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
// Run on CPU
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues[i] = pcoeff3D.scattering_spectral_coeff(wavelength[i], radius[i], iRreal[i]);
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff3D.gpu_scattering_spectral_coeff(gpuValues, gpuWavelength, gpuRadius, gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
// ----------- planck_abs_coeff
// 2D
// Run on CPU
modelname = "planck_abs_coeff";
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff.planck_abs_coeff(radius[i], temperature[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_planck_abs_coeff(gpuValues, gpuRadius, gpuTemperature, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
// Run on CPU
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff3D.planck_abs_coeff(radius[i], temperature[i], iRreal[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff3D.gpu_planck_abs_coeff(gpuValues, gpuRadius, gpuTemperature,gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
// ----------- planck_sca_coeff
// Run on CPU
modelname = "planck_sca_coeff";
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff.planck_sca_coeff(radius[i], temperature[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_planck_sca_coeff(gpuValues, gpuRadius, gpuTemperature, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff3D.planck_sca_coeff(radius[i], temperature[i], iRreal[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff3D.gpu_planck_sca_coeff(gpuValues, gpuRadius, gpuTemperature, gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
// ----------- ross_abs_coeff
// 2D
// Run on CPU
modelname = "ross_abs_coeff";
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff.ross_abs_coeff(radius[i], temperature[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_ross_abs_coeff(gpuValues, gpuRadius, gpuTemperature, n); t_gpu = std::clock() - start;
// compare CPU and GPU results
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff3D.ross_abs_coeff(radius[i], temperature[i], iRreal[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff3D.gpu_ross_abs_coeff(gpuValues, gpuRadius, gpuTemperature, gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
// ----------- ross_sca_coeff
// Run on CPU
modelname = "ross_sca_coeff";
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff.ross_sca_coeff(radius[i], temperature[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff.gpu_ross_sca_coeff(gpuValues, gpuRadius, gpuTemperature, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname);
// 3D
cpuValues.clear();
start = std::clock();
for( int unsigned i=0; i<n; ++i ) cpuValues.push_back(pcoeff3D.ross_sca_coeff(radius[i], temperature[i], iRreal[i]));
t_cpu = std::clock() - start;
// Run on GPU
start = std::clock(); pcoeff3D.gpu_ross_sca_coeff(gpuValues, gpuRadius, gpuTemperature, gpuiRreal, n); t_gpu = std::clock() - start;
status( cpu_gpu_compare(gpuValues, &cpuValues[0], n, t_cpu, t_gpu), modelname + " 3D");
return status.ok();
cudaFree( gpuWavelength );
cudaFree( gpuRadius );
cudaFree( gpuTemperature );
cudaFree( gpuiRreal );
cudaFree( gpuValues );
}
//==============================================================================
int main( int argc, char* argv[] )
{
TestHelper status(true);
try{
complex<double> rCoal, rCoallo, rCoalhi;
rCoal =complex<double>(2.0,-0.6);
rCoallo =complex<double>(0,0);
rCoalhi =complex<double>(1,1);
ParticleRadCoeffs P2(rCoal,1e-7,1e-4,10,1);
std::cout << " 2D table is made! \n";
ParticleRadCoeffs3D P3(rCoallo, rCoalhi,5,1e-7,1e-4,5,1);
std::cout << " 3D table is made! \n";
status (time_it2D(P2, P3, 2), " Checking GPU versus CPU results ");
if( status.ok() ){
cout << "PASS" << endl;
return 0;
}
}
catch( std::exception& err ){
cout << err.what() << endl;
}
cout << "FAIL" << endl;
return -1;
}
| 10,330 | 4,146 |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#ifndef GUARD_NEURALNET_ALIAS_ALIAS_MODEL_GROWER_HPP
#define GUARD_NEURALNET_ALIAS_ALIAS_MODEL_GROWER_HPP
#include <functional>
#include <memory>
#include <popart/alias/aliasmodel.hpp>
namespace popart {
/**
* An enum type that determines whether topological constraints are added to
* an alias model.
**/
enum class DataDependenciesOnly {
// Only add data constraints.
Yes,
// Add data constraints and additional topological constraints.
No
};
/**
* Class that contains some methods for creating `AliasModel` instances via a
* `AliasModelGrowInterface`. It takes such an interface by reference and
* grows it by calling, e.g., `Op::growAliasModel` on certain specific ops.
**/
class AliasModelGrower final {
public:
/**
* Grow the default AliasModel.
**/
AliasModelGrower(AliasModel &aliasModel);
/**
* Get non-owning reference to grown AliasModel.
**/
AliasModel &getAliasModelRef();
/**
* Return owning AliasModel associated with this instance. Calling this
* function leaves the grower without an AliasModel and growing further grow
* functions without such a model will raise an exception.
**/
std::unique_ptr<AliasModel> getAliasModel();
/**
* Set the AliasModel we are growing.
**/
void setAliasModel(std::unique_ptr<AliasModel> aliasModel);
/**
* Grow an alias model that contains all tensors in a PopART Graph. This
* mapping will include every PopART op and Tensor in the Graph.
* \param graph The PopART Graph object to construct a mapping for.
* \param dataDepsOnly Flag to indicate whether to add only data dependencies
* or whether to also add topocological constraints.
**/
void growFullGraph(const Graph &graph, DataDependenciesOnly dataDepsOnly);
/**
* Construct a mapping from tensors in a PopART Graph to an alias model that
* is guaranteed to contain a mapping for any tensor that alias the
* `tensorId` parameter (and ops that separate them) but may also contain
* other tensors that do not alias it.
*
* The purpose of this function is to provide an alternative to
* `getFullAliasModel` for when you do not require a whole mapping.
*
* \param graph The PopART Graph object to construct a mapping for.
* \param tensorId The PopART Tensor used to determine which part of the
*PopART graph to create a mapping for. \param dataDepsOnly Flag to indicate
*whether to add only data dependencies or whether to also add topocological
*constraints.
**/
void growPartialGraph(const Graph &graph,
const TensorId &tensorId,
DataDependenciesOnly dataDepsOnly);
private:
/**
* Data type that dictates whether we check at runtime whether a tensor that
*is produced by an op may be added via `insertTensor`. When growing the alias
* model for a full graph you would expect these tensors to be added by
*growing their producer.
**/
enum class AllowInsertingProducedTensors {
// Produced tensors may be added via `insertTensor`.
Yes = 0,
// Producer tensors must be added by their producer.
No
};
/// Add a tensor to the AliasModel.
void
addTensor(const Graph &graph, Tensor *t, AllowInsertingProducedTensors allow);
/// Add an Op to the AliasModel.
void
addAliaserOp(const Graph &graph, Op *op, AllowInsertingProducedTensors allow);
/// Add topological constraints to the AliasModel.
void addAliaserConstraints(const Graph &graph,
const std::vector<Op *> &opSubset);
// The grow interface reference.
std::reference_wrapper<AliasModel> aliasModel;
};
} // namespace popart
#endif | 3,724 | 1,086 |
// Copyright (c) 2017, Lawrence Livermore National Security, LLC and
// UT-Battelle, LLC.
// Produced at the Lawrence Livermore National Laboratory and the Oak Ridge
// National Laboratory.
// LLNL-CODE-743438
// All rights reserved.
// This file is part of MGmol. For details, see https://github.com/llnl/mgmol.
// Please also read this link https://github.com/llnl/mgmol/LICENSE
#include "SinCosOps.h"
#include "ExtendedGridOrbitals.h"
#include "FunctionsPacking.h"
#include "LocGridOrbitals.h"
#include "MGmol_MPI.h"
using namespace std;
template <class T>
void SinCosOps<T>::compute(const T& orbitals, vector<vector<double>>& a)
{
assert(a.size() == 6);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int numst = orbitals.numst();
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int n2 = numst * numst;
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
vector<double> sinx;
vector<double> siny;
vector<double> sinz;
vector<double> cosx;
vector<double> cosy;
vector<double> cosz;
grid.getSinCosFunctions(sinx, siny, sinz, cosx, cosy, cosz);
const int size = orbitals.chromatic_number();
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
for (int icolor = 0; icolor < size; icolor++)
{
const int i = orbitals.overlapping_gids_[iloc][icolor];
if (i != -1)
{
const ORBDTYPE* const ppsii = orbitals.psi(icolor);
for (int jstate = 0; jstate <= icolor; jstate++)
{
const int j = orbitals.overlapping_gids_[iloc][jstate];
if (j != -1)
{
const ORBDTYPE* const ppsij = orbitals.psi(jstate);
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
const int ixend = loc_length * (iloc + 1);
for (int ix = loc_length * iloc; ix < ixend; ix++)
{
const double cosix = cosx[ix];
const double sinix = sinx[ix];
const int offsetx = ix * incx;
for (int iy = 0; iy < dim1; iy++)
{
const double cosiy = cosy[iy];
const double siniy = siny[iy];
const int offset = offsetx + iy * incy;
for (int iz = 0; iz < dim2; iz++)
{
const int index = offset + iz;
const double alpha = (double)ppsij[index]
* (double)ppsii[index];
atmp[0] += alpha * cosix;
atmp[1] += alpha * sinix;
atmp[2] += alpha * cosiy;
atmp[3] += alpha * siniy;
atmp[4] += alpha * cosz[iz];
atmp[5] += alpha * sinz[iz];
}
}
}
const int ji = j * numst + i;
const int ij = i * numst + j;
a[0][ji] = a[0][ij] += atmp[0];
a[1][ji] = a[1][ij] += atmp[1];
a[2][ji] = a[2][ij] += atmp[2];
a[3][ji] = a[3][ij] += atmp[3];
a[4][ji] = a[4][ij] += atmp[4];
a[5][ji] = a[5][ij] += atmp[5];
}
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 6; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::computeSquare(const T& orbitals, vector<vector<double>>& a)
{
assert(a.size() == 6);
for (short i = 0; i < 6; i++)
assert(a[i].size() > 0);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int numst = orbitals.numst_;
const int n2 = numst * numst;
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
const int xoff = grid.istart(0);
const int yoff = grid.istart(1);
const int zoff = grid.istart(2);
const double hhx = 2. * M_PI / (double)grid.gdim(0);
const double hhy = 2. * M_PI / (double)grid.gdim(1);
const double hhz = 2. * M_PI / (double)grid.gdim(2);
int incx = dim1 * dim2;
int incy = dim2;
const double inv_2pi = 0.5 * M_1_PI;
const double alphax = grid.ll(0) * grid.ll(0) * inv_2pi * inv_2pi;
const double alphay = grid.ll(1) * grid.ll(1) * inv_2pi * inv_2pi;
const double alphaz = grid.ll(2) * grid.ll(2) * inv_2pi * inv_2pi;
vector<double> sinx2, siny2, sinz2, cosx2, cosy2, cosz2;
sinx2.resize(dim0);
cosx2.resize(dim0);
siny2.resize(dim1);
cosy2.resize(dim1);
sinz2.resize(dim2);
cosz2.resize(dim2);
for (int i = 0; i < dim0; i++)
{
const double tmp = sin((double)(xoff + i) * hhx);
sinx2[i] = tmp * tmp * alphax;
cosx2[i] = (1. - tmp * tmp) * alphax;
}
for (int i = 0; i < dim1; i++)
{
const double tmp = sin((double)(yoff + i) * hhy);
siny2[i] = tmp * tmp * alphay;
cosy2[i] = (1. - tmp * tmp) * alphay;
}
for (int i = 0; i < dim2; i++)
{
const double tmp = sin((double)(zoff + i) * hhz);
sinz2[i] = tmp * tmp * alphaz;
cosz2[i] = (1. - tmp * tmp) * alphaz;
}
const int size = orbitals.chromatic_number();
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
for (int icolor = 0; icolor < size; icolor++)
{
int i = orbitals.overlapping_gids_[iloc][icolor];
if (i != -1)
for (int jstate = 0; jstate <= icolor; jstate++)
{
int j = orbitals.overlapping_gids_[iloc][jstate];
if (j != -1)
{
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
for (int ix = loc_length * iloc;
ix < loc_length * (iloc + 1); ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
int index = ix * incx + iy * incy + iz;
double alpha
= orbitals.psi(jstate)[index]
* orbitals.psi(icolor)[index];
atmp[0] += alpha * cosx2[ix];
atmp[1] += alpha * sinx2[ix];
atmp[2] += alpha * cosy2[iy];
atmp[3] += alpha * siny2[iy];
atmp[4] += alpha * cosz2[iz];
atmp[5] += alpha * sinz2[iz];
}
int ji = j * numst + i;
int ij = i * numst + j;
a[0][ji] = a[0][ij] += atmp[0];
a[1][ji] = a[1][ij] += atmp[1];
a[2][ji] = a[2][ij] += atmp[2];
a[3][ji] = a[3][ij] += atmp[3];
a[4][ji] = a[4][ij] += atmp[4];
a[5][ji] = a[5][ij] += atmp[5];
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 6; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::computeSquare1D(
const T& orbitals, vector<vector<double>>& a, const int dim_index)
{
assert(a.size() == 2);
for (short i = 0; i < 2; i++)
assert(a[i].size() > 0);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int numst = orbitals.numst_;
const int dim = grid.dim(dim_index);
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int n2 = numst * numst;
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
const int off = grid.istart(dim_index);
const double hh = 2. * M_PI / (double)grid.gdim(dim_index);
int incx = dim1 * dim2;
int incy = dim2;
const double inv_2pi = 0.5 * M_1_PI;
const double alphax
= grid.ll(dim_index) * grid.ll(dim_index) * inv_2pi * inv_2pi;
vector<double> sinx2(dim);
vector<double> cosx2(dim);
for (int i = 0; i < dim; i++)
{
const double tmp = sin((double)(off + i) * hh);
sinx2[i] = tmp * tmp * alphax;
cosx2[i] = (1. - tmp * tmp) * alphax;
}
const int size = orbitals.chromatic_number();
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
for (int icolor = 0; icolor < size; icolor++)
{
int i = orbitals.overlapping_gids_[iloc][icolor];
if (i != -1)
for (int jstate = 0; jstate <= icolor; jstate++)
{
int j = orbitals.overlapping_gids_[iloc][jstate];
if (j != -1)
{
double atmp[2] = { 0., 0. };
for (int ix = loc_length * iloc;
ix < loc_length * (iloc + 1); ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
int dindex[3] = { ix, iy, iz };
int index = ix * incx + iy * incy + iz;
double alpha
= orbitals.psi(jstate)[index]
* orbitals.psi(icolor)[index];
atmp[0] += alpha * cosx2[dindex[dim_index]];
atmp[1] += alpha * sinx2[dindex[dim_index]];
}
int ji = j * numst + i;
int ij = i * numst + j;
a[0][ji] = a[0][ij] += atmp[0];
a[1][ji] = a[1][ij] += atmp[1];
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (int i = 0; i < 2; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::compute1D(
const T& orbitals, vector<vector<double>>& a, const int dim_index)
{
assert(a.size() == 2);
for (short i = 0; i < 2; i++)
assert(a[i].size() > 0);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int numst = orbitals.numst_;
const int dim = grid.dim(dim_index);
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int n2 = numst * numst;
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
const int off = grid.istart(dim_index);
const double hh = 2. * M_PI / (double)grid.gdim(dim_index);
const double inv_2pi = 0.5 * M_1_PI;
const double alphax = grid.ll(dim_index) * inv_2pi;
vector<double> sinx(dim);
for (int i = 0; i < dim; i++)
sinx[i] = sin(double(off + i) * hh) * alphax;
vector<double> cosx(dim);
for (int i = 0; i < dim; i++)
cosx[i] = cos(double(off + i) * hh) * alphax;
const int size = orbitals.chromatic_number();
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
for (int icolor = 0; icolor < size; icolor++)
{
const int i = orbitals.overlapping_gids_[iloc][icolor];
if (i != -1)
{
const ORBDTYPE* const ppsii = orbitals.psi(icolor);
for (int jstate = 0; jstate <= icolor; jstate++)
{
const int j = orbitals.overlapping_gids_[iloc][jstate];
if (j != -1)
{
const ORBDTYPE* const ppsij = orbitals.psi(jstate);
double atmp[2] = { 0., 0. };
const int ixend = loc_length * (iloc + 1);
for (int ix = loc_length * iloc; ix < ixend; ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
int dindex[3] = { ix, iy, iz };
const int index
= ix * incx + iy * incy + iz;
const double alpha = (double)ppsij[index]
* (double)ppsii[index];
atmp[0] += alpha * cosx[dindex[dim_index]];
atmp[1] += alpha * sinx[dindex[dim_index]];
}
const int ji = j * numst + i;
const int ij = i * numst + j;
a[0][ji] = a[0][ij] += atmp[0];
a[1][ji] = a[1][ij] += atmp[1];
}
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 2; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::computeDiag2states(
const T& orbitals, vector<vector<double>>& a, const int st1, const int st2)
{
assert(st1 >= 0);
assert(st2 >= 0);
assert(st1 != st2);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int st[2] = { st1, st2 };
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
short color_st[2] = { -1, -1 };
for (short ic = 0; ic < 2; ++ic)
{
color_st[ic] = orbitals.getColor(st[ic]);
}
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
vector<double> sinx;
vector<double> siny;
vector<double> sinz;
vector<double> cosx;
vector<double> cosy;
vector<double> cosz;
grid.getSinCosFunctions(sinx, siny, sinz, cosx, cosy, cosz);
double norm2[2] = { 0., 0. };
for (short ic = 0; ic < 2; ic++)
{
const short mycolor = color_st[ic];
if (mycolor >= 0)
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
if (orbitals.overlapping_gids_[iloc][mycolor] == st[ic])
{
const ORBDTYPE* const ppsii = orbitals.psi(mycolor);
assert(ppsii != nullptr);
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
const int ixend = loc_length * (iloc + 1);
for (int ix = loc_length * iloc; ix < ixend; ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
const int index = ix * incx + iy * incy + iz;
const double alpha = (double)ppsii[index]
* (double)ppsii[index];
atmp[0] += alpha * cosx[ix];
atmp[1] += alpha * sinx[ix];
atmp[2] += alpha * cosy[iy];
atmp[3] += alpha * siny[iy];
atmp[4] += alpha * cosz[iz];
atmp[5] += alpha * sinz[iz];
norm2[ic] += alpha;
}
a[0][ic] += atmp[0];
a[1][ic] += atmp[1];
a[2][ic] += atmp[2];
a[3][ic] += atmp[3];
a[4][ic] += atmp[4];
a[5][ic] += atmp[5];
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 6; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], 2);
my_dscal(2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::compute2states(
const T& orbitals, vector<vector<double>>& a, const int st1, const int st2)
{
assert(a.size() == 6);
assert(st1 >= 0);
assert(st2 >= 0);
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int st[2] = { st1, st2 };
int color_st[2] = { -1, -1 };
for (short ic = 0; ic < 2; ++ic)
{
color_st[ic] = orbitals.getColor(st[ic]);
}
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int n2 = 4;
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
vector<double> sinx;
vector<double> siny;
vector<double> sinz;
vector<double> cosx;
vector<double> cosy;
vector<double> cosz;
grid.getSinCosFunctions(sinx, siny, sinz, cosx, cosy, cosz);
for (int ic = 0; ic < 2; ic++)
{
const int mycolor = color_st[ic];
if (mycolor >= 0)
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
if (orbitals.overlapping_gids_[iloc][mycolor] == st[ic])
{
const ORBDTYPE* const ppsii = orbitals.psi(mycolor);
assert(ppsii != nullptr);
for (int jc = 0; jc <= ic; jc++)
if (color_st[jc] >= 0)
{
if (orbitals.overlapping_gids_[iloc][color_st[jc]]
== st[jc])
{
const ORBDTYPE* const ppsij
= orbitals.psi(color_st[jc]);
assert(ppsij != nullptr);
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
const int ixend = loc_length * (iloc + 1);
for (int ix = loc_length * iloc; ix < ixend;
ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
const int index
= ix * incx + iy * incy + iz;
const double alpha
= (double)ppsij[index]
* (double)ppsii[index];
atmp[0] += alpha * cosx[ix];
atmp[1] += alpha * sinx[ix];
atmp[2] += alpha * cosy[iy];
atmp[3] += alpha * siny[iy];
atmp[4] += alpha * cosz[iz];
atmp[5] += alpha * sinz[iz];
}
const int ji = jc * 2 + ic;
const int ij = ic * 2 + jc;
a[0][ji] = a[0][ij] += atmp[0];
a[1][ji] = a[1][ij] += atmp[1];
a[2][ji] = a[2][ij] += atmp[2];
a[3][ji] = a[3][ij] += atmp[3];
a[4][ji] = a[4][ij] += atmp[4];
a[5][ji] = a[5][ij] += atmp[5];
}
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 6; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::compute(
const T& orbitals1, const T& orbitals2, vector<vector<double>>& a)
{
assert(a.size() == 6);
compute_tm_.start();
const pb::Grid& grid(orbitals1.grid_);
const int numst = orbitals1.numst_;
int n2 = numst * numst;
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int loc_length = dim0 / orbitals1.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
vector<double> sinx;
vector<double> siny;
vector<double> sinz;
vector<double> cosx;
vector<double> cosy;
vector<double> cosz;
grid.getSinCosFunctions(sinx, siny, sinz, cosx, cosy, cosz);
for (short iloc = 0; iloc < orbitals1.subdivx_; iloc++)
{
for (int color = 0; color < orbitals1.chromatic_number(); color++)
{
int i = orbitals1.overlapping_gids_[iloc][color];
if (i != -1)
for (int jstate = 0; jstate < orbitals2.chromatic_number();
jstate++)
{
int j = orbitals2.overlapping_gids_[iloc][jstate];
if (j != -1)
{
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
for (int ix = loc_length * iloc;
ix < loc_length * (iloc + 1); ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
const int index
= ix * incx + iy * incy + iz;
const double alpha
= (double)orbitals1.psi(color)[index]
* (double)orbitals2.psi(
jstate)[index];
atmp[0] += alpha * cosx[ix];
atmp[1] += alpha * sinx[ix];
atmp[2] += alpha * cosy[iy];
atmp[3] += alpha * siny[iy];
atmp[4] += alpha * cosz[iz];
atmp[5] += alpha * sinz[iz];
}
int ij = j * numst + i; // row i, column j
a[0][ij] += atmp[0];
a[1][ij] += atmp[1];
a[2][ij] += atmp[2];
a[3][ij] += atmp[3];
a[4][ij] += atmp[4];
a[5][ij] += atmp[5];
}
}
}
}
MGmol_MPI& mmpi = *(MGmol_MPI::instance());
for (short i = 0; i < 6; i++)
{
mmpi.split_allreduce_sums_double(&a[i][0], n2);
my_dscal(n2, grid.vel(), &a[i][0]);
}
compute_tm_.stop();
}
template <class T>
void SinCosOps<T>::computeDiag(const T& orbitals,
VariableSizeMatrix<sparserow>& mat, const bool normalized_functions)
{
compute_tm_.start();
const pb::Grid& grid(orbitals.grid_);
const int dim0 = grid.dim(0);
const int dim1 = grid.dim(1);
const int dim2 = grid.dim(2);
int loc_length = dim0 / orbitals.subdivx_;
assert(loc_length > 0);
assert(loc_length <= dim0);
int incx = dim1 * dim2;
int incy = dim2;
vector<double> sinx;
vector<double> siny;
vector<double> sinz;
vector<double> cosx;
vector<double> cosy;
vector<double> cosz;
grid.getSinCosFunctions(sinx, siny, sinz, cosx, cosy, cosz);
vector<vector<double>> inv_norms2;
if (!normalized_functions)
{
orbitals.computeInvNorms2(inv_norms2);
}
// initialize sparse ordering of rows to match local overlap regions
// This is necessary for computing correct moves in moveTo()
mat.setupSparseRows(orbitals.getAllOverlappingGids());
const int size = orbitals.chromatic_number();
for (short iloc = 0; iloc < orbitals.subdivx_; iloc++)
{
for (short icolor = 0; icolor < size; icolor++)
{
int gid = orbitals.overlapping_gids_[iloc][icolor];
if (gid != -1)
{
const ORBDTYPE* const psii = orbitals.psi(icolor);
double atmp[6] = { 0., 0., 0., 0., 0., 0. };
for (int ix = loc_length * iloc; ix < loc_length * (iloc + 1);
ix++)
for (int iy = 0; iy < dim1; iy++)
for (int iz = 0; iz < dim2; iz++)
{
const int index = ix * incx + iy * incy + iz;
const double alpha
= (double)psii[index] * (double)psii[index];
atmp[0] += alpha * cosx[ix];
atmp[1] += alpha * sinx[ix];
atmp[2] += alpha * cosy[iy];
atmp[3] += alpha * siny[iy];
atmp[4] += alpha * cosz[iz];
atmp[5] += alpha * sinz[iz];
}
if (!normalized_functions)
{
for (int col = 0; col < 6; col++)
atmp[col] *= inv_norms2[iloc][icolor];
}
for (int col = 0; col < 6; col++)
mat.insertMatrixElement(gid, col, atmp[col], ADD, true);
}
}
}
/* scale data */
mat.scale(grid.vel());
/* gather data */
Mesh* mymesh = Mesh::instance();
const pb::Grid& mygrid = mymesh->grid();
const pb::PEenv& myPEenv = mymesh->peenv();
double domain[3] = { mygrid.ll(0), mygrid.ll(1), mygrid.ll(2) };
double maxr = orbitals.getMaxR();
DataDistribution distributor("Distributor4SinCos", maxr, myPEenv, domain);
distributor.augmentLocalData(mat, true);
compute_tm_.stop();
}
template class SinCosOps<LocGridOrbitals>;
template class SinCosOps<ExtendedGridOrbitals>;
| 27,674 | 9,331 |
#include <Prim/PrimIncludeAll.h>
#ifndef NO_PRIM_CHECKS
int PrimCheckLock::_check_locks = 0; // Number of locks in force.
#endif
//
// Return the debug checking control variable.
//
bool& PrimCheckLock::debug_check() {
static PrimGetEnv<bool> debugCheck("PrimCheckLock::debug_check", debug_full_check());
return debugCheck;
}
//
// Return the debug full check control variable.
//
bool& PrimCheckLock::debug_full_check() {
static PrimGetEnv<bool> debugFullCheck("PrimCheckLock::debug_full_check", false);
return debugFullCheck;
}
| 551 | 187 |
/*** Include ***/
/* for general */
#include <cstdint>
#include <cstdlib>
#define _USE_MATH_DEFINES
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
#include <chrono>
#include <fstream>
/* for OpenCV */
#include <opencv2/opencv.hpp>
/* for My modules */
#include "CommonHelper.h"
#include "InferenceHelper.h"
#include "HandLandmarkEngine.h"
/*** Macro ***/
#define TAG "HandLandmarkEngine"
#define PRINT(...) COMMON_HELPER_PRINT(TAG, __VA_ARGS__)
#define PRINT_E(...) COMMON_HELPER_PRINT_E(TAG, __VA_ARGS__)
/* Model parameters */
#define MODEL_NAME "hand_landmark.tflite"
/*** Function ***/
int32_t HandLandmarkEngine::initialize(const std::string& workDir, const int32_t numThreads)
{
/* Set model information */
std::string modelFilename = workDir + "/model/" + MODEL_NAME;
/* Set input tensor info */
m_inputTensorList.clear();
InputTensorInfo inputTensorInfo;
inputTensorInfo.name = "input_1";
inputTensorInfo.tensorType = TensorInfo::TENSOR_TYPE_FP32;
inputTensorInfo.tensorDims.batch = 1;
inputTensorInfo.tensorDims.width = 256;
inputTensorInfo.tensorDims.height = 256;
inputTensorInfo.tensorDims.channel = 3;
inputTensorInfo.dataType = InputTensorInfo::DATA_TYPE_IMAGE;
inputTensorInfo.normalize.mean[0] = 0.0f; /* normalized to[0.f, 1.f] (hand_landmark_cpu.pbtxt) */
inputTensorInfo.normalize.mean[1] = 0.0f;
inputTensorInfo.normalize.mean[2] = 0.0f;
inputTensorInfo.normalize.norm[0] = 1.0f;
inputTensorInfo.normalize.norm[1] = 1.0f;
inputTensorInfo.normalize.norm[2] = 1.0f;
m_inputTensorList.push_back(inputTensorInfo);
/* Set output tensor info */
m_outputTensorList.clear();
OutputTensorInfo outputTensorInfo;
outputTensorInfo.tensorType = TensorInfo::TENSOR_TYPE_FP32;
outputTensorInfo.name = "ld_21_3d";
m_outputTensorList.push_back(outputTensorInfo);
outputTensorInfo.name = "output_handflag";
m_outputTensorList.push_back(outputTensorInfo);
outputTensorInfo.name = "output_handedness";
m_outputTensorList.push_back(outputTensorInfo);
/* Create and Initialize Inference Helper */
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::OPEN_CV));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::TENSOR_RT));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::NCNN));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::MNN));
m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::TENSORFLOW_LITE));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::TENSORFLOW_LITE_EDGETPU));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::TENSORFLOW_LITE_GPU));
//m_inferenceHelper.reset(InferenceHelper::create(InferenceHelper::TENSORFLOW_LITE_XNNPACK));
if (!m_inferenceHelper) {
return RET_ERR;
}
if (m_inferenceHelper->setNumThread(numThreads) != InferenceHelper::RET_OK) {
m_inferenceHelper.reset();
return RET_ERR;
}
if (m_inferenceHelper->initialize(modelFilename, m_inputTensorList, m_outputTensorList) != InferenceHelper::RET_OK) {
m_inferenceHelper.reset();
return RET_ERR;
}
/* Check if input tensor info is set */
for (const auto& inputTensorInfo : m_inputTensorList) {
if ((inputTensorInfo.tensorDims.width <= 0) || (inputTensorInfo.tensorDims.height <= 0) || inputTensorInfo.tensorType == TensorInfo::TENSOR_TYPE_NONE) {
PRINT_E("Invalid tensor size\n");
m_inferenceHelper.reset();
return RET_ERR;
}
}
return RET_OK;
}
int32_t HandLandmarkEngine::finalize()
{
if (!m_inferenceHelper) {
PRINT_E("Inference helper is not created\n");
return RET_ERR;
}
m_inferenceHelper->finalize();
return RET_OK;
}
int32_t HandLandmarkEngine::invoke(const cv::Mat& originalMat, int32_t palmX, int32_t palmY, int32_t palmW, int32_t palmH, float palmRotation, RESULT& result)
{
if (!m_inferenceHelper) {
PRINT_E("Inference helper is not created\n");
return RET_ERR;
}
/*** PreProcess ***/
const auto& tPreProcess0 = std::chrono::steady_clock::now();
InputTensorInfo& inputTensorInfo = m_inputTensorList[0];
/* Rotate palm image */
cv::Mat rotatedImage;
cv::RotatedRect rect(cv::Point(palmX + palmW / 2, palmY + palmH / 2), cv::Size(palmW, palmH), palmRotation * 180.f / static_cast<float>(M_PI));
cv::Mat trans = cv::getRotationMatrix2D(rect.center, rect.angle, 1.0);
cv::Mat srcRot;
cv::warpAffine(originalMat, srcRot, trans, originalMat.size());
cv::getRectSubPix(srcRot, rect.size, rect.center, rotatedImage);
//cv::imshow("rotatedImage", rotatedImage);
/* Resize image */
cv::Mat imgSrc;
cv::resize(rotatedImage, imgSrc, cv::Size(inputTensorInfo.tensorDims.width, inputTensorInfo.tensorDims.height));
#ifndef CV_COLOR_IS_RGB
cv::cvtColor(imgSrc, imgSrc, cv::COLOR_BGR2RGB);
#endif
inputTensorInfo.data = imgSrc.data;
inputTensorInfo.dataType = InputTensorInfo::DATA_TYPE_IMAGE;
inputTensorInfo.imageInfo.width = imgSrc.cols;
inputTensorInfo.imageInfo.height = imgSrc.rows;
inputTensorInfo.imageInfo.channel = imgSrc.channels();
inputTensorInfo.imageInfo.cropX = 0;
inputTensorInfo.imageInfo.cropY = 0;
inputTensorInfo.imageInfo.cropWidth = imgSrc.cols;
inputTensorInfo.imageInfo.cropHeight = imgSrc.rows;
inputTensorInfo.imageInfo.isBGR = false;
inputTensorInfo.imageInfo.swapColor = false;
if (m_inferenceHelper->preProcess(m_inputTensorList) != InferenceHelper::RET_OK) {
return RET_ERR;
}
const auto& tPreProcess1 = std::chrono::steady_clock::now();
/*** Inference ***/
const auto& tInference0 = std::chrono::steady_clock::now();
if (m_inferenceHelper->invoke(m_outputTensorList) != InferenceHelper::RET_OK) {
return RET_ERR;
}
const auto& tInference1 = std::chrono::steady_clock::now();
/*** PostProcess ***/
const auto& tPostProcess0 = std::chrono::steady_clock::now();
/* Retrieve the result */
HAND_LANDMARK& handLandmark = result.handLandmark;
handLandmark.handflag = m_outputTensorList[1].getDataAsFloat()[0];
handLandmark.handedness = m_outputTensorList[2].getDataAsFloat()[0];
const float *ld21 = m_outputTensorList[0].getDataAsFloat();
//printf("%f %f\n", m_outputTensorHandflag->getDataAsFloat()[0], m_outputTensorHandedness->getDataAsFloat()[0]);
for (int32_t i = 0; i < 21; i++) {
handLandmark.pos[i].x = ld21[i * 3 + 0] / inputTensorInfo.tensorDims.width; // 0.0 - 1.0
handLandmark.pos[i].y = ld21[i * 3 + 1] / inputTensorInfo.tensorDims.height; // 0.0 - 1.0
handLandmark.pos[i].z = ld21[i * 3 + 2] * 1; // Scale Z coordinate as X. (-100 - 100???) todo
//printf("%f\n", m_outputTensorLd21->getDataAsFloat()[i]);
//cv::circle(originalMat, cv::Point(m_outputTensorLd21->getDataAsFloat()[i * 3 + 0], m_outputTensorLd21->getDataAsFloat()[i * 3 + 1]), 5, cv::Scalar(255, 255, 0), 1);
}
/* Fix landmark rotation */
for (int32_t i = 0; i < 21; i++) {
handLandmark.pos[i].x *= rotatedImage.cols; // coordinate on rotatedImage
handLandmark.pos[i].y *= rotatedImage.rows;
}
rotateLandmark(handLandmark, palmRotation, rotatedImage.cols, rotatedImage.rows); // coordinate on thei nput image
/* Calculate palm rectangle from Landmark */
transformLandmarkToRect(handLandmark);
handLandmark.rect.rotation = calculateRotation(handLandmark);
for (int32_t i = 0; i < 21; i++) {
handLandmark.pos[i].x += palmX;
handLandmark.pos[i].y += palmY;
}
handLandmark.rect.x += palmX;
handLandmark.rect.y += palmY;
const auto& tPostProcess1 = std::chrono::steady_clock::now();
/* Return the results */
result.timePreProcess = static_cast<std::chrono::duration<double>>(tPreProcess1 - tPreProcess0).count() * 1000.0;
result.timeInference = static_cast<std::chrono::duration<double>>(tInference1 - tInference0).count() * 1000.0;
result.timePostProcess = static_cast<std::chrono::duration<double>>(tPostProcess1 - tPostProcess0).count() * 1000.0;;
return RET_OK;
}
void HandLandmarkEngine::rotateLandmark(HAND_LANDMARK& handLandmark, float rotationRad, int32_t imageWidth, int32_t imageHeight)
{
for (int32_t i = 0; i < 21; i++) {
float x = handLandmark.pos[i].x - imageWidth / 2.f;
float y = handLandmark.pos[i].y - imageHeight / 2.f;
handLandmark.pos[i].x = x * std::cos(rotationRad) - y * std::sin(rotationRad) + imageWidth / 2.f;
handLandmark.pos[i].y = x * std::sin(rotationRad) + y * std::cos(rotationRad) + imageHeight / 2.f;
//handLandmark.pos[i].x = std::min(handLandmark.pos[i].x, 1.f);
//handLandmark.pos[i].y = std::min(handLandmark.pos[i].y, 1.f);
};
}
float HandLandmarkEngine::calculateRotation(const HAND_LANDMARK& handLandmark)
{
// Reference: mediapipe\graphs\hand_tracking\calculators\hand_detections_to_rects_calculator.cc
constexpr int32_t kWristJoint = 0;
constexpr int32_t kMiddleFingerPIPJoint = 12;
constexpr int32_t kIndexFingerPIPJoint = 8;
constexpr int32_t kRingFingerPIPJoint = 16;
constexpr float target_angle_ = static_cast<float>(M_PI) * 0.5f;
const float x0 = handLandmark.pos[kWristJoint].x;
const float y0 = handLandmark.pos[kWristJoint].y;
float x1 = (handLandmark.pos[kMiddleFingerPIPJoint].x + handLandmark.pos[kMiddleFingerPIPJoint].x) / 2.f;
float y1 = (handLandmark.pos[kMiddleFingerPIPJoint].y + handLandmark.pos[kMiddleFingerPIPJoint].y) / 2.f;
x1 = (x1 + handLandmark.pos[kMiddleFingerPIPJoint].x) / 2.f;
y1 = (y1 + handLandmark.pos[kMiddleFingerPIPJoint].y) / 2.f;
float rotation;
rotation = target_angle_ - std::atan2(-(y1 - y0), x1 - x0);
rotation = rotation - 2 * static_cast<float>(M_PI) * std::floor((rotation - (-static_cast<float>(M_PI))) / (2 * static_cast<float>(M_PI)));
return rotation;
}
void HandLandmarkEngine::transformLandmarkToRect(HAND_LANDMARK &handLandmark)
{
constexpr float shift_x = 0.0f;
constexpr float shift_y = -0.0f;
constexpr float scale_x = 1.8f; // tuned parameter by looking
constexpr float scale_y = 1.8f;
float width = 0;
float height = 0;
float x_center = 0;
float y_center = 0;
float xmin = handLandmark.pos[0].x;
float xmax = handLandmark.pos[0].x;
float ymin = handLandmark.pos[0].y;
float ymax = handLandmark.pos[0].y;
for (int32_t i = 0; i < 21; i++) {
if (handLandmark.pos[i].x < xmin) xmin = handLandmark.pos[i].x;
if (handLandmark.pos[i].x > xmax) xmax = handLandmark.pos[i].x;
if (handLandmark.pos[i].y < ymin) ymin = handLandmark.pos[i].y;
if (handLandmark.pos[i].y > ymax) ymax = handLandmark.pos[i].y;
}
width = xmax - xmin;
height = ymax - ymin;
x_center = (xmax + xmin) / 2.f;
y_center = (ymax + ymin) / 2.f;
width *= scale_x;
height *= scale_y;
float long_side = std::max(width, height);
/* for hand is closed */
//float palmDistance = powf(handLandmark.pos[0].x - handLandmark.pos[9].x, 2) + powf(handLandmark.pos[0].y - handLandmark.pos[9].y, 2);
//palmDistance = sqrtf(palmDistance);
//long_side = std::max(long_side, palmDistance);
handLandmark.rect.width = (long_side * 1);
handLandmark.rect.height = (long_side * 1);
handLandmark.rect.x = (x_center - handLandmark.rect.width / 2);
handLandmark.rect.y = (y_center - handLandmark.rect.height / 2);
}
| 11,276 | 4,584 |
#include "Arduino.h"
#include "modbusTcpSlave.h"
// WiFiServer mbServer(MODBUSIP_PORT);
#define TCP_TIMEOUT_MS RTU_TIMEOUT * 2
ModbusTcpSlave::ModbusTcpSlave(_ApplicationLogger& logger, uint16_t port = MODBUSIP_PORT, bool _isDebug = false)
: mbServer(port), mLogger(logger), isDebug(_isDebug)
{
mbServer.begin();
mbServer.setNoDelay(true);
#ifdef ESP32
mbServer.setTimeout(TCP_TIMEOUT_MS / 1000);
#endif
for (uint8_t i = 0 ; i < FRAME_COUNT; i++)
mbFrame[i].status = frameStatus::empty;
for (uint8_t i = 0 ; i < CLIENT_NUM; i++)
clientOnLine[i].onLine = false;
}
ModbusTcpSlave::~ModbusTcpSlave()
{
}
void ModbusTcpSlave::waitNewClient(void)
{
// see if the old customers are alive if not alive then release them
for (uint8_t i = 0 ; i < CLIENT_NUM; i++)
{
//find free/disconnected spot
if (clientOnLine[i].onLine && !clientOnLine[i].client.connected())
{
clientOnLine[i].client.stop(); //
clientOnLine[i].onLine = false;
this->mLogger.debug (("\tClient stopped: [%d]\n"), i);
}
// else clientOnLine[i].client.flush();
}
if (mbServer.hasClient())
{
bool clientAdded = false;
for(uint8_t i = 0 ; i < CLIENT_NUM; i++)
{
if( !clientOnLine[i].onLine)
{
clientOnLine[i].client = mbServer.available();
clientOnLine[i].client.setNoDelay(true); //disable delay feature algorithm
clientOnLine[i].onLine = true;
clientAdded = true;
if(this->isDebug) {
this->mLogger.debug (("\tNew Client: [%d] remote Ip: %s\n"), i, clientOnLine[i].client.remoteIP().toString().c_str());
}
break;
}
}
if (!clientAdded) // If there was no place for a new client
{
//no free/disconnected spot so reject
this->mLogger.error (("\tToo many Clients reject the new connection \n") );
mbServer.available().stop();
// clientOnLine[0].client.stop();
// clientOnLine[0].client = mbServer.available();
}
}
}
void ModbusTcpSlave::readDataClient(void)
{
for(uint8_t i = 0; i < CLIENT_NUM; i++)
{
if(clientOnLine[i].onLine)
{
if(clientOnLine[i].client.available())
{
this->readFrameClient(clientOnLine[i].client, i);
}
}
}
}
void ModbusTcpSlave::readFrameClient(WiFiClient client, uint8_t nClient)
{
size_t available = client.available();
if ((available < TCP_BUFFER_SIZE) && (available > 11))
{
size_t len = available;
uint8_t buf[len];
size_t count = 0;
while(client.available()) {
buf[count] = client.read(); count++;
}
count =0;
smbap mbap;
mbapUnpack(&mbap, &buf[0]);
if(this->isDebug) {
this->mLogger.debug (("\tPaket in : len TCP data [%d] Len mbap pak [%d], UnitId [%d], TI [%d] \n"),
len, mbap._len, mbap._ui, mbap._ti);
}
// checking for glued requests. (wizards are requested for 4 requests)
while((count < len ) && ((len - count) <= (size_t) (mbap._len + TCP_MBAP_SIZE)) && (mbap._pi ==0))
{
smbFrame * pmbFrame = this->getFreeBuffer();
if(pmbFrame == 0)
break; // if there is no free buffer then we reduce the parsing
pmbFrame->nClient = nClient;
if(mbap._ui==0) {
// UnitId = 0 => broadcast modbus message
pmbFrame->status = frameStatus::readyToSendRtuNoReply;
} else {
pmbFrame->status = frameStatus::readyToSendRtu;
}
pmbFrame->len = mbap._len + TCP_MBAP_SIZE;
pmbFrame->millis = millis();
for (uint16_t j = 0; j < (pmbFrame->len); j++)
pmbFrame->buffer[j] = buf[j];
count += pmbFrame->len;
mbapUnpack(&mbap, &buf[count]);
}
}
else
{
this->mLogger.error (("\tTCP client [%d] data count invalid : %d\n"), nClient, available);
// uint16_t tmp = client.available();
while(client.available())
client.read();
}
}
void ModbusTcpSlave::writeFrameClient(void)
{
smbFrame * pmbFrame = this->getReadyToSendTcpBuffer();
if(pmbFrame)
{
uint8_t cli = pmbFrame->nClient;
size_t len = pmbFrame->len;
if(! clientOnLine[cli].client.connected() ) {
this->mLogger.warn (("\tERROR writeFrameClient: writing to a disconnected client: %d"), cli);
return;
}
size_t written = clientOnLine[cli].client.write(&pmbFrame->buffer[0], len);
// write to TCP client
if(this->isDebug) {
this->mLogger.debug (("\twritten data buffer to TCP client: %d, len=%d\n"), cli, len );
}
if(written!= len) {
this->mLogger.error (("\tERROR writeFrameClient: writing buffer [%d] to RTU client len_to_write=%d, written=%d\n"), cli, len, written);
}
// delay(1);
// yield();
clientOnLine[cli].client.flush();
pmbFrame->status = frameStatus::empty;
}
}
// void ModbusTcpSlave::task()
// {
// waitNewClient();
// yield();
// readDataClient();
// yield();
// writeFrameClient();
// yield();
// timeoutBufferCleanup();
// }
void ModbusTcpSlave::timeoutBufferCleanup() {
// Cleaning the buffers
for(uint8_t i = 0; i < FRAME_COUNT; i++)
{
if(mbFrame[i].status != frameStatus::empty ) {
if (millis() - mbFrame[i].millis > RTU_TIMEOUT)
{
mbFrame[i].status = frameStatus::empty;
// this->mLogger.printf (("\tRTU_TIMEOUT -> Del pack.\n"));
this->mLogger.error (("\tRTU_TIMEOUT -> Del pack.\n"));
}
}
}
}
ModbusTcpSlave::smbFrame * ModbusTcpSlave::getFreeBuffer ()
{
static uint8_t scanBuff = 0;
while (mbFrame[scanBuff].status != frameStatus::empty)
{
scanBuff++;
if(scanBuff >= FRAME_COUNT)
{
this->mLogger.error (("\tNo Free buffer\n"));
scanBuff = 0;
return 0;
}
}
//init frame
mbFrame[scanBuff].nClient=0;
mbFrame[scanBuff].len=0;
mbFrame[scanBuff].millis=0;
mbFrame[scanBuff].guessedReponseLen=0;
mbFrame[scanBuff].ascii_response_buffer="";
return &mbFrame[scanBuff];
}
ModbusTcpSlave::smbFrame * ModbusTcpSlave::getReadyToSendRtuBuffer ()
{
uint8_t pointer = 255;
uint8_t pointerMillis = 0;
for(uint8_t i = 0; i < FRAME_COUNT; i++)
{
if(mbFrame[i].status == frameStatus::readyToSendRtu || mbFrame[i].status == frameStatus::readyToSendRtuNoReply)
{
// check if current buffer is older
if ( pointerMillis < (millis() - mbFrame[i].millis))
{
pointerMillis = millis() - mbFrame[i].millis;
pointer = i;
}
}
}
if (pointer != 255)
return &mbFrame[pointer]; //returns the LEAST RECENTLY modified frame buffer
else
return NULL;
}
ModbusTcpSlave::smbFrame * ModbusTcpSlave::getWaitFromRtuBuffer ()
{
for(uint8_t i = 0; i < FRAME_COUNT; i++)
{
if(mbFrame[i].status == frameStatus::waitFromRtu )
return &mbFrame[i];
}
return NULL;
}
ModbusTcpSlave::smbFrame *ModbusTcpSlave::getReadyToSendTcpBuffer ()
{
for(uint8_t i = 0; i < FRAME_COUNT; i++)
{
if(mbFrame[i].status == frameStatus::readyToSendTcp )
return &mbFrame[i];
}
return NULL;
}
void ModbusTcpSlave::mbapUnpack(smbap* pmbap, uint8_t * buff )
{
pmbap->_ti = *(buff + 0) << 8 | *(buff + 1);
pmbap->_pi = *(buff + 2) << 8 | *(buff + 3);
pmbap->_len = *(buff + 4) << 8 | *(buff + 5);
pmbap->_ui = *(buff + 6);
}
| 7,351 | 2,791 |
#include "version.h"
#include "pch.h"
char version[16];
char NSUserAgent[32];
void InitialiseVersion()
{
HRSRC hResInfo;
DWORD dwSize;
HGLOBAL hResData;
LPVOID pRes, pResCopy;
UINT uLen = 0;
VS_FIXEDFILEINFO* lpFfi = NULL;
HINSTANCE hInst = ::GetModuleHandle(NULL);
hResInfo = FindResourceW(hInst, MAKEINTRESOURCE(1), RT_VERSION);
if (hResInfo != NULL)
{
dwSize = SizeofResource(hInst, hResInfo);
hResData = LoadResource(hInst, hResInfo);
if (hResData != NULL)
{
pRes = LockResource(hResData);
pResCopy = LocalAlloc(LMEM_FIXED, dwSize);
if (pResCopy != 0)
{
CopyMemory(pResCopy, pRes, dwSize);
VerQueryValueW(pResCopy, L"\\", (LPVOID*)&lpFfi, &uLen);
DWORD dwFileVersionMS = lpFfi->dwFileVersionMS;
DWORD dwFileVersionLS = lpFfi->dwFileVersionLS;
DWORD dwLeftMost = HIWORD(dwFileVersionMS);
DWORD dwSecondLeft = LOWORD(dwFileVersionMS);
DWORD dwSecondRight = HIWORD(dwFileVersionLS);
DWORD dwRightMost = LOWORD(dwFileVersionLS);
// We actually use the rightmost integer do determine whether or not we're a debug/dev build
// If it is set to 1 (as in resources.rc), we are a dev build
// On github CI, we set this 1 to a 0 automatically as we replace the 0.0.0.1 with the real version number
if (dwRightMost == 1)
{
sprintf(version, "%d.%d.%d.%d+dev", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost);
sprintf(NSUserAgent, "R2Northstar/%d.%d.%d+dev", dwLeftMost, dwSecondLeft, dwSecondRight);
}
else
{
sprintf(version, "%d.%d.%d.%d", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost);
sprintf(NSUserAgent, "R2Northstar/%d.%d.%d", dwLeftMost, dwSecondLeft, dwSecondRight);
}
UnlockResource(hResData);
FreeResource(hResData);
LocalFree(pResCopy);
return;
}
UnlockResource(hResData);
FreeResource(hResData);
LocalFree(pResCopy);
}
}
// Could not locate version info for whatever reason
spdlog::error("Failed to load version info:\n{}", std::system_category().message(GetLastError()));
sprintf(NSUserAgent, "R2Northstar/0.0.0");
}
| 2,093 | 901 |
#include "music.h"
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
int main()
{
Node n;
int count{};
int choice;
char yes;
int const size = 3;
int i = 0;
music_data s;
fstream data("music.txt", ios::out);
ifstream take("music.txt");
take >> count;
do
{
cout << endl << " " << "=====MENU=====" << endl;
cout << endl << " " << "1.To Enter the data in to the File. " << endl;
cout << endl << " " << "2.To display all of the data." << endl;
cout << endl << " " << "Enter the choice: ";
cin >> choice;
switch (choice)
{
case 1:
do
{
cout << endl << " " << "Enter the name of the song: ";
cin.ignore();
getline(cin, s.name);
cout << endl << " " << "Enter the name of movie: ";
cin.ignore();
getline(cin, s.movie);
cout << endl << " " << "Enter the name of the Singer: ";
cin.ignore();
getline(cin, s.singer);
data.write(reinterpret_cast<char*>(&s), sizeof(s));
cout << endl << " " << "Do you like to store the data again: ";
cin >> yes;
} while (yes == 'Y' && 1 < 3);
for (int i = 0; i < count; i++)
{
take >> n.array[i];
}
break;
default:
break;
}
} while (choice!=3);
system("pause");
return 0;
} | 1,248 | 553 |
/*
* CacheExpression.hpp
*
* Created on: 08.03.2016
* Author: Ulrich Schwesinger
*/
#ifndef INCLUDE_ASLAM_BACKEND_CACHEEXPRESSION_HPP_
#define INCLUDE_ASLAM_BACKEND_CACHEEXPRESSION_HPP_
// boost includes
#include <boost/thread.hpp>
// Eigen includes
#include <Eigen/Dense>
// aslam_backend includes
#include <aslam/Exceptions.hpp>
// self includes
#include <aslam/backend/DesignVariable.hpp>
#include <aslam/backend/JacobianContainerSparse.hpp>
#include <aslam/backend/JacobianContainerPrescale.hpp>
#include <aslam/backend/CacheInterface.hpp>
namespace aslam {
namespace backend {
template<int IRows, int ICols, typename TScalar>
class GenericMatrixExpressionNode;
/**
* \class CacheExpressionNode
* \brief Wraps an expression into a cache data structure to avoid duplicate
* computation of error and Jacobian values
*
* \tparam ExpressionNode Type of the expression node
* \tparam Dimensions Dimensionality of the design variables
*/
template <typename ExpressionNode, int Dimension>
class CacheExpressionNode : public CacheInterface, public ExpressionNode
{
public:
template <typename Expression>
friend Expression toCacheExpression(const Expression& expr);
public:
virtual ~CacheExpressionNode() { }
protected:
typename ExpressionNode::value_t evaluateImplementation() const override
{
if (!_isCacheValidV)
{
boost::mutex::scoped_lock lock(_mutexV);
if (!_isCacheValidV) // could be updated by another thread in the meantime
{
_v = _node->evaluate();
_isCacheValidV = true;
}
}
return _v;
}
void evaluateJacobiansImplementation(JacobianContainer & outJacobians) const override
{
updateJacobian();
_jc.addTo(outJacobians);
}
virtual void getDesignVariablesImplementation(DesignVariable::set_t & designVariables) const override
{
_node->getDesignVariables(designVariables);
}
private:
CacheExpressionNode(const boost::shared_ptr<ExpressionNode>& e)
: CacheInterface(), ExpressionNode(), _node(e)
{
}
void updateJacobian() const
{
if (!_isCacheValidJ)
{
boost::mutex::scoped_lock lock(_mutexJ);
if (!_isCacheValidJ) // could be updated by another thread in the meantime
{
_jc.setZero();
_node->evaluateJacobians(_jc);
_isCacheValidJ = true;
}
}
}
private:
mutable typename ExpressionNode::value_t _v; /// \brief Cache for error values
mutable JacobianContainerSparse<Dimension> _jc = JacobianContainerSparse<Dimension>(Dimension); /// \brief Cache for Jacobians
boost::shared_ptr<ExpressionNode> _node; /// \brief Wrapped expression node, stored to delegate evaluation calls
mutable boost::mutex _mutexV; /// \brief Mutex for error value write operations
mutable boost::mutex _mutexJ; /// \brief Mutex for Jacobian write operations
};
template<int IRows, int ICols, int Dimension, typename TScalar>
class CacheExpressionNode< GenericMatrixExpressionNode<IRows, ICols, TScalar>, Dimension > : public CacheInterface, public GenericMatrixExpressionNode<IRows, ICols, TScalar>
{
public:
template <typename Expression>
friend Expression toCacheExpression(const Expression& expr);
typedef GenericMatrixExpressionNode<IRows, ICols, TScalar> ExpressionNode;
public:
virtual ~CacheExpressionNode() { }
protected:
void evaluateImplementation() const override
{
if (!_isCacheValidV)
{
boost::mutex::scoped_lock lock(_mutexV);
if (!_isCacheValidV) // could be updated by another thread in the meantime
{
this->_currentValue = _node->evaluate();
_isCacheValidV = true;
}
}
}
void evaluateJacobiansImplementation(JacobianContainer & outJacobians, const typename ExpressionNode::differential_t & chainRuleDifferential) const override
{
updateJacobian();
_jc.addTo((JacobianContainer&)applyDifferentialToJacobianContainer(outJacobians, chainRuleDifferential, IRows));
}
virtual void getDesignVariablesImplementation(DesignVariable::set_t & designVariables) const override
{
_node->getDesignVariables(designVariables);
}
private:
CacheExpressionNode(const boost::shared_ptr<ExpressionNode>& e)
: CacheInterface(), ExpressionNode(), _node(e)
{
}
void updateJacobian() const
{
if (!_isCacheValidJ)
{
boost::mutex::scoped_lock lock(_mutexJ);
if (!_isCacheValidJ) // could be updated by another thread in the meantime
{
_jc.setZero();
_node->evaluateJacobians(_jc, IdentityDifferential<typename ExpressionNode::tangent_vector_t, TScalar>());
_isCacheValidJ = true;
}
}
}
private:
mutable JacobianContainerSparse<IRows> _jc = JacobianContainerSparse<IRows>(IRows); /// \brief Cache for Jacobians
boost::shared_ptr<ExpressionNode> _node; /// \brief Wrapped expression node, stored to delegate evaluation calls
mutable boost::mutex _mutexV; /// \brief Mutex for error value write operations
mutable boost::mutex _mutexJ; /// \brief Mutex for Jacobian write operations
};
/**
* \brief Converts a regular expression to a cache expression and registers the expression
* in the corresponding design variables in order to allow the design variables to
* invalidate the cache
*
* @param expr original expression
* \tparam Expression expression type
* @return Cached expression
*/
template <typename Expression>
Expression toCacheExpression(const Expression& expr)
{
boost::shared_ptr< CacheExpressionNode<typename Expression::node_t, Expression::Dimension> > node
(new CacheExpressionNode<typename Expression::node_t, Expression::Dimension>(expr.root()));
DesignVariable::set_t dvs;
node->getDesignVariables(dvs);
for (auto dv : dvs)
dv->registerCacheExpressionNode(node);
return Expression(node);
}
} /* namespace aslam */
} /* namespace backend */
#endif /* INCLUDE_ASLAM_BACKEND_CACHEEXPRESSION_HPP_ */
| 5,926 | 1,798 |
/*
Copyright (C) 2020 George Cave.
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 <foe/model/animation.hpp>
glm::vec3 interpolatePosition(double time, foeNodeAnimationChannel const *pAnimationChannel) {
// If there's no keys, return no position
if (pAnimationChannel->positionKeys.empty()) {
return glm::vec3(0.f);
}
// If there's only one key, OR the time is before the first key, return the first key
if (pAnimationChannel->positionKeys.size() == 1 ||
time < pAnimationChannel->positionKeys[0].time) {
return pAnimationChannel->positionKeys[0].value;
}
size_t index = 0;
for (size_t i = 1; i < pAnimationChannel->positionKeys.size(); ++i) {
if (time < pAnimationChannel->positionKeys[i].time) {
break;
}
index = i;
}
// If it's the last key, return it alone
if (index == pAnimationChannel->positionKeys.size() - 1) {
return pAnimationChannel->positionKeys[index].value;
}
// If here, we're interpolating between two keys
size_t nextIndex = index + 1;
double deltaTime = pAnimationChannel->positionKeys[nextIndex].time -
pAnimationChannel->positionKeys[index].time;
// The percentage through between the keyframes we're at
double factorTime = (time - pAnimationChannel->positionKeys[index].time) / deltaTime;
glm::vec3 const &startPos = pAnimationChannel->positionKeys[index].value;
glm::vec3 const &endPos = pAnimationChannel->positionKeys[nextIndex].value;
return startPos + ((endPos - startPos) * static_cast<float>(factorTime));
}
glm::quat interpolateRotation(double time, foeNodeAnimationChannel const *pAnimationChannel) {
// If there's no keys, return no rotation
if (pAnimationChannel->rotationKeys.empty()) {
return glm::vec3(0.f);
}
// If there's only one key, OR the time is before the first key, return the first key
if (pAnimationChannel->rotationKeys.size() == 1 ||
time < pAnimationChannel->rotationKeys[0].time) {
return pAnimationChannel->rotationKeys[0].value;
}
size_t index = 0;
for (size_t i = 1; i < pAnimationChannel->rotationKeys.size(); ++i) {
if (time < pAnimationChannel->rotationKeys[i].time) {
break;
}
index = i;
}
// If it's the last key, return it alone
if (index == pAnimationChannel->rotationKeys.size() - 1) {
return pAnimationChannel->rotationKeys[index].value;
}
// If here, we're interpolating between two keys
size_t nextIndex = index + 1;
double deltaTime = pAnimationChannel->rotationKeys[nextIndex].time -
pAnimationChannel->rotationKeys[index].time;
// The percentage through between the keyframes we're at
double factorTime = (time - pAnimationChannel->rotationKeys[index].time) / deltaTime;
glm::quat const &startPos = pAnimationChannel->rotationKeys[index].value;
glm::quat const &endPos = pAnimationChannel->rotationKeys[nextIndex].value;
return startPos + ((endPos - startPos) * static_cast<float>(factorTime));
}
glm::vec3 interpolateScaling(double time, foeNodeAnimationChannel const *pAnimationChannel) {
// If there's no keys, return no scaling
if (pAnimationChannel->scalingKeys.empty()) {
return glm::vec3(1.f);
}
// If there's only one key, OR the time is before the first key, return the first key
if (pAnimationChannel->scalingKeys.size() == 1 ||
time < pAnimationChannel->scalingKeys[0].time) {
return pAnimationChannel->scalingKeys[0].value;
}
size_t index = 0;
for (size_t i = 1; i < pAnimationChannel->scalingKeys.size(); ++i) {
if (time < pAnimationChannel->scalingKeys[i].time) {
break;
}
index = i;
}
// If it's the last key, return it alone
if (index == pAnimationChannel->scalingKeys.size() - 1) {
return pAnimationChannel->scalingKeys[index].value;
}
// If here, we're interpolating between two keys
size_t nextIndex = index + 1;
double deltaTime =
pAnimationChannel->scalingKeys[nextIndex].time - pAnimationChannel->scalingKeys[index].time;
// The percentage through between the keyframes we're at
double factorTime = (time - pAnimationChannel->scalingKeys[index].time) / deltaTime;
glm::vec3 const &startPos = pAnimationChannel->scalingKeys[index].value;
glm::vec3 const &endPos = pAnimationChannel->scalingKeys[nextIndex].value;
return startPos + ((endPos - startPos) * static_cast<float>(factorTime));
} | 5,128 | 1,535 |
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 3.0 of the License, or
// any later version.
//
// The GPSTk is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with GPSTk; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
//
// Copyright 2004, The University of Texas at Austin
//
//============================================================================
//============================================================================
//
//This software developed by Applied Research Laboratories at the University of
//Texas at Austin, under contract to an agency or agencies within the U.S.
//Department of Defense. The U.S. Government retains all rights to use,
//duplicate, distribute, disclose, or release this software.
//
//Pursuant to DoD Directive 523024
//
// DISTRIBUTION STATEMENT A: This software has been approved for public
// release, distribution is unlimited.
//
//=============================================================================
/**
* @file EphemerisRange.cpp
* Computation of range and associated quantities from EphemerisStore,
* given receiver position and time.
*/
#include "EphemerisRange.hpp"
#include "MiscMath.hpp"
#include "GPSEllipsoid.hpp"
#include "GNSSconstants.hpp"
#include "GNSSconstants.hpp"
using namespace std;
using namespace gpstk;
namespace gpstk
{
// Compute the corrected range at RECEIVE time, from receiver at position Rx,
// to the GPS satellite given by SatID sat, as well as all the CER quantities,
// given the nominal receive time tr_nom and an EphemerisStore. Note that this
// routine does not intrinsicly account for the receiver clock error
// like the ComputeAtTransmitTime routine does.
double CorrectedEphemerisRange::ComputeAtReceiveTime(
const CommonTime& tr_nom,
const Position& Rx,
const SatID sat,
const XvtStore<SatID>& Eph)
{
try {
int nit;
double tof,tof_old;
GPSEllipsoid ellipsoid;
nit = 0;
tof = 0.07; // initial guess 70ms
do {
// best estimate of transmit time
transmit = tr_nom;
transmit -= tof;
tof_old = tof;
// get SV position
try {
svPosVel = Eph.getXvt(sat, transmit);
}
catch(InvalidRequest& e) {
GPSTK_RETHROW(e);
}
rotateEarth(Rx);
// update raw range and time of flight
rawrange = RSS(svPosVel.x[0]-Rx.X(),
svPosVel.x[1]-Rx.Y(),
svPosVel.x[2]-Rx.Z());
tof = rawrange/ellipsoid.c();
} while(ABS(tof-tof_old)>1.e-13 && ++nit<5);
updateCER(Rx);
return (rawrange-svclkbias-relativity);
}
catch(gpstk::Exception& e) {
GPSTK_RETHROW(e);
}
} // end CorrectedEphemerisRange::ComputeAtReceiveTime
// Compute the corrected range at TRANSMIT time, from receiver at position Rx,
// to the GPS satellite given by SatID sat, as well as all the CER quantities,
// given the nominal receive time tr_nom and an EphemerisStore, as well as
// the raw measured pseudorange.
double CorrectedEphemerisRange::ComputeAtTransmitTime(
const CommonTime& tr_nom,
const double& pr,
const Position& Rx,
const SatID sat,
const XvtStore<SatID>& Eph)
{
try {
CommonTime tt;
// 0-th order estimate of transmit time = receiver - pseudorange/c
transmit = tr_nom;
transmit -= pr/C_MPS;
tt = transmit;
// correct for SV clock
for(int i=0; i<2; i++) {
// get SV position
try {
svPosVel = Eph.getXvt(sat,tt);
}
catch(InvalidRequest& e) {
GPSTK_RETHROW(e);
}
tt = transmit;
// remove clock bias and relativity correction
tt -= (svPosVel.clkbias + svPosVel.relcorr);
}
rotateEarth(Rx);
// raw range
rawrange = RSS(svPosVel.x[0]-Rx.X(),
svPosVel.x[1]-Rx.Y(),
svPosVel.x[2]-Rx.Z());
updateCER(Rx);
return (rawrange-svclkbias-relativity);
}
catch(gpstk::Exception& e) {
GPSTK_RETHROW(e);
}
} // end CorrectedEphemerisRange::ComputeAtTransmitTime
double CorrectedEphemerisRange::ComputeAtTransmitTime(
const CommonTime& tr_nom,
const Position& Rx,
const SatID sat,
const XvtStore<SatID>& Eph)
{
try {
gpstk::GPSEllipsoid gm;
svPosVel = Eph.getXvt(sat, tr_nom);
double pr = svPosVel.preciseRho(Rx, gm);
return ComputeAtTransmitTime(tr_nom, pr, Rx, sat, Eph);
}
catch(gpstk::Exception& e) {
GPSTK_RETHROW(e);
}
}
double CorrectedEphemerisRange::ComputeAtTransmitSvTime(
const CommonTime& tt_nom,
const double& pr,
const Position& rx,
const SatID sat,
const XvtStore<SatID>& eph)
{
try
{
Position trx(rx);
trx.asECEF();
svPosVel = eph.getXvt(sat, tt_nom);
// compute rotation angle in the time of signal transit
// While this is quite similiar to rotateEarth, its not the same
// and jcl doesn't know which is really correct
// BWT this uses the measured pseudorange, corrected for SV clock and
// relativity, to compute the time of flight; rotateEarth uses the value
// computed from the receiver position and the ephemeris. They should be
// very nearly the same, and multiplying by angVel/c should make the angle
// of rotation very nearly identical.
GPSEllipsoid ell;
double range(pr/ell.c() - svPosVel.clkbias - svPosVel.relcorr);
double rotation_angle = -ell.angVelocity() * range;
svPosVel.x[0] = svPosVel.x[0] - svPosVel.x[1] * rotation_angle;
svPosVel.x[1] = svPosVel.x[1] + svPosVel.x[0] * rotation_angle;
svPosVel.x[2] = svPosVel.x[2];
rawrange = trx.slantRange(svPosVel.x);
updateCER(trx);
return rawrange - svclkbias - relativity;
}
catch (Exception& e) {
GPSTK_RETHROW(e);
}
}
void CorrectedEphemerisRange::updateCER(const Position& Rx)
{
relativity = svPosVel.computeRelativityCorrection() * C_MPS;
svclkbias = svPosVel.clkbias * C_MPS;
svclkdrift = svPosVel.clkdrift * C_MPS;
cosines[0] = (Rx.X()-svPosVel.x[0])/rawrange;
cosines[1] = (Rx.Y()-svPosVel.x[1])/rawrange;
cosines[2] = (Rx.Z()-svPosVel.x[2])/rawrange;
Position SV(svPosVel);
elevation = Rx.elevation(SV);
azimuth = Rx.azimuth(SV);
elevationGeodetic = Rx.elevationGeodetic(SV);
azimuthGeodetic = Rx.azimuthGeodetic(SV);
}
void CorrectedEphemerisRange::rotateEarth(const Position& Rx)
{
GPSEllipsoid ellipsoid;
double tof = RSS(svPosVel.x[0]-Rx.X(),
svPosVel.x[1]-Rx.Y(),
svPosVel.x[2]-Rx.Z())/ellipsoid.c();
double wt = ellipsoid.angVelocity()*tof;
double sx = ::cos(wt)*svPosVel.x[0] + ::sin(wt)*svPosVel.x[1];
double sy = -::sin(wt)*svPosVel.x[0] + ::cos(wt)*svPosVel.x[1];
svPosVel.x[0] = sx;
svPosVel.x[1] = sy;
sx = ::cos(wt)*svPosVel.v[0] + ::sin(wt)*svPosVel.v[1];
sy = -::sin(wt)*svPosVel.v[0] + ::cos(wt)*svPosVel.v[1];
svPosVel.v[0] = sx;
svPosVel.v[1] = sy;
}
double RelativityCorrection(const Xvt& svPosVel)
{
// relativity correction
// dtr = -2*dot(R,V)/(c*c) = -4.4428e-10(s/sqrt(m)) * ecc * sqrt(A(m)) * sinE
// compute it separately here, in units seconds.
double dtr = ( -2.0 *( svPosVel.x[0] * svPosVel.v[0]
+ svPosVel.x[1] * svPosVel.v[1]
+ svPosVel.x[2] * svPosVel.v[2] ) / C_MPS ) / C_MPS;
return dtr;
}
} // namespace gpstk
| 8,726 | 2,990 |
/*!\file
* \author Matthias Elf
*
* \par License:
* This file is part of ABACUS - A Branch And CUt System
* Copyright (C) 1995 - 2003
* University of Cologne, Germany
*
* \par
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* \par
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* \see http://www.gnu.org/copyleft/gpl.html
*/
#include <ogdf/lib/abacus/row.h>
namespace abacus {
std::ostream &operator<<(std::ostream& out, const Row &rhs)
{
double eps = rhs.glob_->machineEps();
const int rhsNnz = rhs.nnz();
for (int i = 0; i < rhsNnz; i++) {
int s = rhs.support(i);
double c = rhs.coeff(i);
char sign;
if (c < 0.0) {
sign = '-';
c = -c;
}
else sign = '+';
if (i > 0 || sign == '-') // do not print first \a '+' of row
out << sign << ' ';
if (c < 1.0 - eps || 1.0 + eps < c) // do not print coefficient 1
out << c << ' ';
out << 'x' << s << ' ';
if (i && !(i % 10)) out << std::endl;
}
return out << rhs.sense_ << ' ' << rhs.rhs();
}
void Row::copy(const Row &row)
{
sense_ = row.sense_;
rhs_ = row.rhs_;
SparVec::copy(row);
}
}
| 1,750 | 685 |
//
// main.cpp
// Zad6
//
// Created by Filip Gulan on 31/03/16.
// Copyright © 2016 FIlip Gulan. All rights reserved.
//
#include <iostream>
typedef int (*PTRFUN)();
class B
{
public:
virtual int prva() = 0;
virtual int druga() = 0;
};
class D: public B
{
public:
virtual int prva()
{
return 0;
}
virtual int druga()
{
return 42;
}
};
int main(int argc, const char * argv[])
{
D *obj = new D();
size_t *vTable = *(size_t**)obj;
int prva = ((PTRFUN) vTable[0])();
int druga = ((PTRFUN) vTable[1])();
printf("Prva: %d\nDruga: %d\n", prva, druga);
}
| 626 | 275 |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
void recoverTree(TreeNode* root) {
if(!root) return;
stack<TreeNode*> st;
vector<int> res;
st.push(root);
TreeNode* p = root;
while(p->left)
{
st.push(p->left);
p = p->left;
}
TreeNode* p1 = NULL;
TreeNode* p2 = NULL;
TreeNode* q;
int flag = 0;
int pre = 0;
while(!st.empty())
{
p = st.top();
st.pop();
q = p->right;
while(q)
{
st.push(q);
q = q->left;
}
if(!p1 && p->val > st.top()->val)
{
p1 = p;
TreeNode* tmp = st.top();
st.pop();
q = tmp->right;
while(q)
{
st.push(q);
q = q->left;
}
if(st.empty() || st.top()->val > p1->val)
{
p2 = tmp;
break;
}
flag = 1;
pre = tmp->val;
continue;
}
if(flag && !p2 && (st.empty() || p->val < pre))
{
p2 = p;
break;
}
pre = p->val;
}
int tmp = p1->val;
p1->val = p2->val;
p2->val = tmp;
return ;
}
}; | 1,748 | 523 |
// C++ (gcc 8.3)
#include <iostream>
#include <tuple>
std::tuple<int, int, int> ExtendedGCD(int a, int b) {
if (a == 0) return std::make_tuple(0, 1, b);
int x, y, gcd;
std::tie(x, y, gcd) = ExtendedGCD(b % a, a);
return std::make_tuple(y - (b / a) * x, x, gcd);
}
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int t;
std::cin >> t;
int p, n;
while (--t >= 0) {
std::cin >> p >> n;
int y{std::get<1>(ExtendedGCD(p, n))};
if (y < 0) y -= ((y - p + 1) / p) * p;
std::cout << y << "\n";
}
return 0;
} | 573 | 281 |
// Generated by Haxe 4.0.0-rc.2+77068e10c
#include <hxcpp.h>
#ifndef INCLUDED_StringTools
#include <StringTools.h>
#endif
#ifndef INCLUDED_haxe_IMap
#include <haxe/IMap.h>
#endif
#ifndef INCLUDED_haxe_ds_StringMap
#include <haxe/ds/StringMap.h>
#endif
#ifndef INCLUDED_haxe_io_Bytes
#include <haxe/io/Bytes.h>
#endif
#ifndef INCLUDED_lime_app_Application
#include <lime/app/Application.h>
#endif
#ifndef INCLUDED_lime_app_Future
#include <lime/app/Future.h>
#endif
#ifndef INCLUDED_lime_app_IModule
#include <lime/app/IModule.h>
#endif
#ifndef INCLUDED_lime_app_Module
#include <lime/app/Module.h>
#endif
#ifndef INCLUDED_lime_app_Promise_lime_utils_AssetLibrary
#include <lime/app/Promise_lime_utils_AssetLibrary.h>
#endif
#ifndef INCLUDED_lime_app__Event_Void_Void
#include <lime/app/_Event_Void_Void.h>
#endif
#ifndef INCLUDED_lime_graphics_Image
#include <lime/graphics/Image.h>
#endif
#ifndef INCLUDED_lime_graphics_ImageBuffer
#include <lime/graphics/ImageBuffer.h>
#endif
#ifndef INCLUDED_lime_media_AudioBuffer
#include <lime/media/AudioBuffer.h>
#endif
#ifndef INCLUDED_lime_text_Font
#include <lime/text/Font.h>
#endif
#ifndef INCLUDED_lime_utils_AssetCache
#include <lime/utils/AssetCache.h>
#endif
#ifndef INCLUDED_lime_utils_AssetLibrary
#include <lime/utils/AssetLibrary.h>
#endif
#ifndef INCLUDED_lime_utils_AssetManifest
#include <lime/utils/AssetManifest.h>
#endif
#ifndef INCLUDED_lime_utils_Assets
#include <lime/utils/Assets.h>
#endif
#ifndef INCLUDED_lime_utils_Log
#include <lime/utils/Log.h>
#endif
#ifndef INCLUDED_lime_utils_Preloader
#include <lime/utils/Preloader.h>
#endif
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_46_exists,"lime.utils.Assets","exists",0x1d422f71,"lime.utils.Assets.exists","lime/utils/Assets.hx",46,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_71_getAsset,"lime.utils.Assets","getAsset",0x8d49da4f,"lime.utils.Assets.getAsset","lime/utils/Assets.hx",71,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_157_getAudioBuffer,"lime.utils.Assets","getAudioBuffer",0x84c07015,"lime.utils.Assets.getAudioBuffer","lime/utils/Assets.hx",157,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_168_getBytes,"lime.utils.Assets","getBytes",0x24a878ca,"lime.utils.Assets.getBytes","lime/utils/Assets.hx",168,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_179_getFont,"lime.utils.Assets","getFont",0x6eb05e50,"lime.utils.Assets.getFont","lime/utils/Assets.hx",179,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_191_getImage,"lime.utils.Assets","getImage",0x24798fba,"lime.utils.Assets.getImage","lime/utils/Assets.hx",191,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_195_getLibrary,"lime.utils.Assets","getLibrary",0xdfc4ad1a,"lime.utils.Assets.getLibrary","lime/utils/Assets.hx",195,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_211_getPath,"lime.utils.Assets","getPath",0x7541e626,"lime.utils.Assets.getPath","lime/utils/Assets.hx",211,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_243_getText,"lime.utils.Assets","getText",0x77e9cd2e,"lime.utils.Assets.getText","lime/utils/Assets.hx",243,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_247_hasLibrary,"lime.utils.Assets","hasLibrary",0x1b170ed6,"lime.utils.Assets.hasLibrary","lime/utils/Assets.hx",247,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_257_isLocal,"lime.utils.Assets","isLocal",0x6de3bdec,"lime.utils.Assets.isLocal","lime/utils/Assets.hx",257,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_275_isValidAudio,"lime.utils.Assets","isValidAudio",0xfba1fa19,"lime.utils.Assets.isValidAudio","lime/utils/Assets.hx",275,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_282_isValidImage,"lime.utils.Assets","isValidImage",0x918aa09e,"lime.utils.Assets.isValidImage","lime/utils/Assets.hx",282,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_286_list,"lime.utils.Assets","list",0x96ec2eb3,"lime.utils.Assets.list","lime/utils/Assets.hx",286,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_303_loadAsset,"lime.utils.Assets","loadAsset",0x8c6c0f75,"lime.utils.Assets.loadAsset","lime/utils/Assets.hx",303,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_355_loadAsset,"lime.utils.Assets","loadAsset",0x8c6c0f75,"lime.utils.Assets.loadAsset","lime/utils/Assets.hx",355,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_376_loadAudioBuffer,"lime.utils.Assets","loadAudioBuffer",0xa72805bb,"lime.utils.Assets.loadAudioBuffer","lime/utils/Assets.hx",376,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_381_loadBytes,"lime.utils.Assets","loadBytes",0x23caadf0,"lime.utils.Assets.loadBytes","lime/utils/Assets.hx",381,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_386_loadFont,"lime.utils.Assets","loadFont",0xbb998fea,"lime.utils.Assets.loadFont","lime/utils/Assets.hx",386,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_391_loadImage,"lime.utils.Assets","loadImage",0x239bc4e0,"lime.utils.Assets.loadImage","lime/utils/Assets.hx",391,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_425_loadLibrary,"lime.utils.Assets","loadLibrary",0x93baf7c0,"lime.utils.Assets.loadLibrary","lime/utils/Assets.hx",425,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_446_loadLibrary,"lime.utils.Assets","loadLibrary",0x93baf7c0,"lime.utils.Assets.loadLibrary","lime/utils/Assets.hx",446,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_395_loadLibrary,"lime.utils.Assets","loadLibrary",0x93baf7c0,"lime.utils.Assets.loadLibrary","lime/utils/Assets.hx",395,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_455_loadText,"lime.utils.Assets","loadText",0xc4d2fec8,"lime.utils.Assets.loadText","lime/utils/Assets.hx",455,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_459_registerLibrary,"lime.utils.Assets","registerLibrary",0xb6301ea3,"lime.utils.Assets.registerLibrary","lime/utils/Assets.hx",459,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_481_unloadLibrary,"lime.utils.Assets","unloadLibrary",0xc816d6c7,"lime.utils.Assets.unloadLibrary","lime/utils/Assets.hx",481,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_512___cacheBreak,"lime.utils.Assets","__cacheBreak",0xe7faf592,"lime.utils.Assets.__cacheBreak","lime/utils/Assets.hx",512,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_516___libraryNotFound,"lime.utils.Assets","__libraryNotFound",0x7dfa37b5,"lime.utils.Assets.__libraryNotFound","lime/utils/Assets.hx",516,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_534_library_onChange,"lime.utils.Assets","library_onChange",0x3a89dec8,"lime.utils.Assets.library_onChange","lime/utils/Assets.hx",534,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_39_boot,"lime.utils.Assets","boot",0x90549687,"lime.utils.Assets.boot","lime/utils/Assets.hx",39,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_40_boot,"lime.utils.Assets","boot",0x90549687,"lime.utils.Assets.boot","lime/utils/Assets.hx",40,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_42_boot,"lime.utils.Assets","boot",0x90549687,"lime.utils.Assets.boot","lime/utils/Assets.hx",42,0x95055f23)
HX_LOCAL_STACK_FRAME(_hx_pos_df5754140b017d9f_43_boot,"lime.utils.Assets","boot",0x90549687,"lime.utils.Assets.boot","lime/utils/Assets.hx",43,0x95055f23)
namespace lime{
namespace utils{
void Assets_obj::__construct() { }
Dynamic Assets_obj::__CreateEmpty() { return new Assets_obj; }
void *Assets_obj::_hx_vtable = 0;
Dynamic Assets_obj::__Create(hx::DynamicArray inArgs)
{
hx::ObjectPtr< Assets_obj > _hx_result = new Assets_obj();
_hx_result->__construct();
return _hx_result;
}
bool Assets_obj::_hx_isInstanceOf(int inClassId) {
return inClassId==(int)0x00000001 || inClassId==(int)0x2b49805f;
}
::lime::utils::AssetCache Assets_obj::cache;
::lime::app::_Event_Void_Void Assets_obj::onChange;
::String Assets_obj::defaultRootPath;
::haxe::ds::StringMap Assets_obj::libraries;
::haxe::ds::StringMap Assets_obj::libraryPaths;
bool Assets_obj::exists(::String id,::String type){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_46_exists)
HXLINE( 48) if (hx::IsNull( type )) {
HXLINE( 50) type = HX_("BINARY",01,68,8e,9f);
}
HXLINE( 53) ::String id1 = id;
HXDLIN( 53) int colonIndex = id1.indexOf(HX_(":",3a,00,00,00),null());
HXDLIN( 53) ::String symbol_libraryName = id1.substring(0,colonIndex);
HXDLIN( 53) ::String symbol_symbolName = id1.substring((colonIndex + 1),null());
HXDLIN( 53) ::lime::utils::AssetLibrary symbol_library = ::lime::utils::Assets_obj::getLibrary(symbol_libraryName);
HXLINE( 55) if (hx::IsNotNull( symbol_library )) {
HXLINE( 57) return symbol_library->exists(symbol_symbolName,type);
}
HXLINE( 61) return false;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,exists,return )
::Dynamic Assets_obj::getAsset(::String id,::String type,bool useCache){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_71_getAsset)
HXLINE( 73) bool _hx_tmp;
HXDLIN( 73) if (useCache) {
HXLINE( 73) _hx_tmp = ::lime::utils::Assets_obj::cache->enabled;
}
else {
HXLINE( 73) _hx_tmp = false;
}
HXDLIN( 73) if (_hx_tmp) {
HXLINE( 75) ::String _hx_switch_0 = type;
if ( (_hx_switch_0==HX_("BINARY",01,68,8e,9f)) || (_hx_switch_0==HX_("TEXT",ad,94,ba,37)) ){
HXLINE( 79) useCache = false;
HXDLIN( 79) goto _hx_goto_1;
}
if ( (_hx_switch_0==HX_("FONT",cf,25,81,2e)) ){
HXLINE( 82) ::Dynamic font = ::lime::utils::Assets_obj::cache->font->get(id);
HXLINE( 84) if (hx::IsNotNull( font )) {
HXLINE( 86) return font;
}
HXLINE( 81) goto _hx_goto_1;
}
if ( (_hx_switch_0==HX_("IMAGE",3b,57,57,3b)) ){
HXLINE( 90) ::lime::graphics::Image image = ( ( ::lime::graphics::Image)(::lime::utils::Assets_obj::cache->image->get(id)) );
HXLINE( 92) if (::lime::utils::Assets_obj::isValidImage(image)) {
HXLINE( 94) return image;
}
HXLINE( 89) goto _hx_goto_1;
}
if ( (_hx_switch_0==HX_("MUSIC",85,08,49,8e)) || (_hx_switch_0==HX_("SOUND",af,c4,ba,fe)) ){
HXLINE( 98) ::lime::media::AudioBuffer audio = ( ( ::lime::media::AudioBuffer)(::lime::utils::Assets_obj::cache->audio->get(id)) );
HXLINE( 100) if (::lime::utils::Assets_obj::isValidAudio(audio)) {
HXLINE( 102) return audio;
}
HXLINE( 97) goto _hx_goto_1;
}
if ( (_hx_switch_0==HX_("TEMPLATE",3a,78,cd,05)) ){
HXLINE( 106) HX_STACK_DO_THROW((HX_("Not sure how to get template: ",a1,19,8c,ad) + id));
HXDLIN( 106) goto _hx_goto_1;
}
/* default */{
HXLINE( 109) return null();
}
_hx_goto_1:;
}
HXLINE( 113) ::String id1 = id;
HXDLIN( 113) int colonIndex = id1.indexOf(HX_(":",3a,00,00,00),null());
HXDLIN( 113) ::String symbol_libraryName = id1.substring(0,colonIndex);
HXDLIN( 113) ::String symbol_symbolName = id1.substring((colonIndex + 1),null());
HXDLIN( 113) ::lime::utils::AssetLibrary symbol_library = ::lime::utils::Assets_obj::getLibrary(symbol_libraryName);
HXLINE( 115) if (hx::IsNotNull( symbol_library )) {
HXLINE( 117) if (symbol_library->exists(symbol_symbolName,type)) {
HXLINE( 119) if (symbol_library->isLocal(symbol_symbolName,type)) {
HXLINE( 121) ::Dynamic asset = symbol_library->getAsset(symbol_symbolName,type);
HXLINE( 123) bool _hx_tmp1;
HXDLIN( 123) if (useCache) {
HXLINE( 123) _hx_tmp1 = ::lime::utils::Assets_obj::cache->enabled;
}
else {
HXLINE( 123) _hx_tmp1 = false;
}
HXDLIN( 123) if (_hx_tmp1) {
HXLINE( 125) ::lime::utils::Assets_obj::cache->set(id,type,asset);
}
HXLINE( 128) return asset;
}
else {
HXLINE( 132) ::lime::utils::Log_obj::error((((type + HX_(" asset \"",d2,25,2a,5d)) + id) + HX_("\" exists, but only asynchronously",dc,ca,f2,dd)),hx::SourceInfo(HX_("lime/utils/Assets.hx",23,5f,05,95),132,HX_("lime.utils.Assets",39,6e,7e,b0),HX_("getAsset",7a,79,10,86)));
}
}
else {
HXLINE( 137) ::lime::utils::Log_obj::error(((((HX_("There is no ",e5,bb,ab,c5) + type) + HX_(" asset with an ID of \"",95,f2,3a,0d)) + id) + HX_("\"",22,00,00,00)),hx::SourceInfo(HX_("lime/utils/Assets.hx",23,5f,05,95),137,HX_("lime.utils.Assets",39,6e,7e,b0),HX_("getAsset",7a,79,10,86)));
}
}
else {
HXLINE( 142) ::String _hx_tmp2 = ::lime::utils::Assets_obj::_hx___libraryNotFound(symbol_libraryName);
HXDLIN( 142) ::lime::utils::Log_obj::error(_hx_tmp2,hx::SourceInfo(HX_("lime/utils/Assets.hx",23,5f,05,95),142,HX_("lime.utils.Assets",39,6e,7e,b0),HX_("getAsset",7a,79,10,86)));
}
HXLINE( 146) return null();
}
STATIC_HX_DEFINE_DYNAMIC_FUNC3(Assets_obj,getAsset,return )
::lime::media::AudioBuffer Assets_obj::getAudioBuffer(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_157_getAudioBuffer)
HXDLIN( 157) return ( ( ::lime::media::AudioBuffer)(::lime::utils::Assets_obj::getAsset(id,HX_("SOUND",af,c4,ba,fe),useCache)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,getAudioBuffer,return )
::haxe::io::Bytes Assets_obj::getBytes(::String id){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_168_getBytes)
HXDLIN( 168) return ( ( ::haxe::io::Bytes)(::lime::utils::Assets_obj::getAsset(id,HX_("BINARY",01,68,8e,9f),false)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,getBytes,return )
::lime::text::Font Assets_obj::getFont(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_179_getFont)
HXDLIN( 179) return ( ( ::lime::text::Font)(::lime::utils::Assets_obj::getAsset(id,HX_("FONT",cf,25,81,2e),useCache)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,getFont,return )
::lime::graphics::Image Assets_obj::getImage(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_191_getImage)
HXDLIN( 191) return ( ( ::lime::graphics::Image)(::lime::utils::Assets_obj::getAsset(id,HX_("IMAGE",3b,57,57,3b),useCache)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,getImage,return )
::lime::utils::AssetLibrary Assets_obj::getLibrary(::String name){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_195_getLibrary)
HXLINE( 196) bool _hx_tmp;
HXDLIN( 196) if (hx::IsNotNull( name )) {
HXLINE( 196) _hx_tmp = (name == HX_("",00,00,00,00));
}
else {
HXLINE( 196) _hx_tmp = true;
}
HXDLIN( 196) if (_hx_tmp) {
HXLINE( 198) name = HX_("default",c1,d8,c3,9b);
}
HXLINE( 201) return ( ( ::lime::utils::AssetLibrary)(::lime::utils::Assets_obj::libraries->get(name)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,getLibrary,return )
::String Assets_obj::getPath(::String id){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_211_getPath)
HXLINE( 213) ::String id1 = id;
HXDLIN( 213) int colonIndex = id1.indexOf(HX_(":",3a,00,00,00),null());
HXDLIN( 213) ::String symbol_libraryName = id1.substring(0,colonIndex);
HXDLIN( 213) ::String symbol_symbolName = id1.substring((colonIndex + 1),null());
HXDLIN( 213) ::lime::utils::AssetLibrary symbol_library = ::lime::utils::Assets_obj::getLibrary(symbol_libraryName);
HXLINE( 215) if (hx::IsNotNull( symbol_library )) {
HXLINE( 217) if (symbol_library->exists(symbol_symbolName,null())) {
HXLINE( 219) return symbol_library->getPath(symbol_symbolName);
}
else {
HXLINE( 223) ::lime::utils::Log_obj::error(((HX_("There is no asset with an ID of \"",b0,92,42,96) + id) + HX_("\"",22,00,00,00)),hx::SourceInfo(HX_("lime/utils/Assets.hx",23,5f,05,95),223,HX_("lime.utils.Assets",39,6e,7e,b0),HX_("getPath",5b,95,d4,1c)));
}
}
else {
HXLINE( 228) ::String _hx_tmp = ::lime::utils::Assets_obj::_hx___libraryNotFound(symbol_libraryName);
HXDLIN( 228) ::lime::utils::Log_obj::error(_hx_tmp,hx::SourceInfo(HX_("lime/utils/Assets.hx",23,5f,05,95),228,HX_("lime.utils.Assets",39,6e,7e,b0),HX_("getPath",5b,95,d4,1c)));
}
HXLINE( 232) return null();
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,getPath,return )
::String Assets_obj::getText(::String id){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_243_getText)
HXDLIN( 243) return ( (::String)(::lime::utils::Assets_obj::getAsset(id,HX_("TEXT",ad,94,ba,37),false)) );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,getText,return )
bool Assets_obj::hasLibrary(::String name){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_247_hasLibrary)
HXLINE( 248) bool _hx_tmp;
HXDLIN( 248) if (hx::IsNotNull( name )) {
HXLINE( 248) _hx_tmp = (name == HX_("",00,00,00,00));
}
else {
HXLINE( 248) _hx_tmp = true;
}
HXDLIN( 248) if (_hx_tmp) {
HXLINE( 250) name = HX_("default",c1,d8,c3,9b);
}
HXLINE( 253) return ::lime::utils::Assets_obj::libraries->exists(name);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,hasLibrary,return )
bool Assets_obj::isLocal(::String id,::String type,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_257_isLocal)
HXLINE( 259) bool _hx_tmp;
HXDLIN( 259) if (useCache) {
HXLINE( 259) _hx_tmp = ::lime::utils::Assets_obj::cache->enabled;
}
else {
HXLINE( 259) _hx_tmp = false;
}
HXDLIN( 259) if (_hx_tmp) {
HXLINE( 261) if (::lime::utils::Assets_obj::cache->exists(id,type)) {
HXLINE( 261) return true;
}
}
HXLINE( 264) ::String id1 = id;
HXDLIN( 264) int colonIndex = id1.indexOf(HX_(":",3a,00,00,00),null());
HXDLIN( 264) ::String symbol_libraryName = id1.substring(0,colonIndex);
HXDLIN( 264) ::String symbol_symbolName = id1.substring((colonIndex + 1),null());
HXDLIN( 264) ::lime::utils::AssetLibrary symbol_library = ::lime::utils::Assets_obj::getLibrary(symbol_libraryName);
HXLINE( 265) if (hx::IsNotNull( symbol_library )) {
HXLINE( 265) return symbol_library->isLocal(symbol_symbolName,type);
}
else {
HXLINE( 265) return false;
}
HXDLIN( 265) return false;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC3(Assets_obj,isLocal,return )
bool Assets_obj::isValidAudio( ::lime::media::AudioBuffer buffer){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_275_isValidAudio)
HXDLIN( 275) return hx::IsNotNull( buffer );
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,isValidAudio,return )
bool Assets_obj::isValidImage( ::lime::graphics::Image image){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_282_isValidImage)
HXDLIN( 282) if (hx::IsNotNull( image )) {
HXDLIN( 282) return hx::IsNotNull( image->buffer );
}
else {
HXDLIN( 282) return false;
}
HXDLIN( 282) return false;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,isValidImage,return )
::Array< ::String > Assets_obj::list(::String type){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_286_list)
HXLINE( 287) ::Array< ::String > items = ::Array_obj< ::String >::__new(0);
HXLINE( 289) {
HXLINE( 289) ::Dynamic library = ::lime::utils::Assets_obj::libraries->iterator();
HXDLIN( 289) while(( (bool)(library->__Field(HX_("hasNext",6d,a5,46,18),hx::paccDynamic)()) )){
HXLINE( 289) ::lime::utils::AssetLibrary library1 = ( ( ::lime::utils::AssetLibrary)(library->__Field(HX_("next",f3,84,02,49),hx::paccDynamic)()) );
HXLINE( 291) ::Array< ::String > libraryItems = library1->list(type);
HXLINE( 293) if (hx::IsNotNull( libraryItems )) {
HXLINE( 295) items = items->concat(libraryItems);
}
}
}
HXLINE( 299) return items;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,list,return )
::lime::app::Future Assets_obj::loadAsset(::String id,::String type,bool useCache){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_303_loadAsset)
HXLINE( 305) bool _hx_tmp;
HXDLIN( 305) if (useCache) {
HXLINE( 305) _hx_tmp = ::lime::utils::Assets_obj::cache->enabled;
}
else {
HXLINE( 305) _hx_tmp = false;
}
HXDLIN( 305) if (_hx_tmp) {
HXLINE( 307) ::String _hx_switch_0 = type;
if ( (_hx_switch_0==HX_("BINARY",01,68,8e,9f)) || (_hx_switch_0==HX_("TEXT",ad,94,ba,37)) ){
HXLINE( 311) useCache = false;
HXDLIN( 311) goto _hx_goto_16;
}
if ( (_hx_switch_0==HX_("FONT",cf,25,81,2e)) ){
HXLINE( 314) ::Dynamic font = ::lime::utils::Assets_obj::cache->font->get(id);
HXLINE( 316) if (hx::IsNotNull( font )) {
HXLINE( 318) return ::lime::app::Future_obj::withValue(font);
}
HXLINE( 313) goto _hx_goto_16;
}
if ( (_hx_switch_0==HX_("IMAGE",3b,57,57,3b)) ){
HXLINE( 322) ::lime::graphics::Image image = ( ( ::lime::graphics::Image)(::lime::utils::Assets_obj::cache->image->get(id)) );
HXLINE( 324) if (::lime::utils::Assets_obj::isValidImage(image)) {
HXLINE( 326) return ::lime::app::Future_obj::withValue(image);
}
HXLINE( 321) goto _hx_goto_16;
}
if ( (_hx_switch_0==HX_("MUSIC",85,08,49,8e)) || (_hx_switch_0==HX_("SOUND",af,c4,ba,fe)) ){
HXLINE( 330) ::lime::media::AudioBuffer audio = ( ( ::lime::media::AudioBuffer)(::lime::utils::Assets_obj::cache->audio->get(id)) );
HXLINE( 332) if (::lime::utils::Assets_obj::isValidAudio(audio)) {
HXLINE( 334) return ::lime::app::Future_obj::withValue(audio);
}
HXLINE( 329) goto _hx_goto_16;
}
if ( (_hx_switch_0==HX_("TEMPLATE",3a,78,cd,05)) ){
HXLINE( 338) HX_STACK_DO_THROW((HX_("Not sure how to get template: ",a1,19,8c,ad) + id));
HXDLIN( 338) goto _hx_goto_16;
}
/* default */{
HXLINE( 341) return null();
}
_hx_goto_16:;
}
HXLINE( 345) ::String id1 = id;
HXDLIN( 345) int colonIndex = id1.indexOf(HX_(":",3a,00,00,00),null());
HXDLIN( 345) ::String symbol_libraryName = id1.substring(0,colonIndex);
HXDLIN( 345) ::String symbol_symbolName = id1.substring((colonIndex + 1),null());
HXDLIN( 345) ::lime::utils::AssetLibrary symbol_library = ::lime::utils::Assets_obj::getLibrary(symbol_libraryName);
HXLINE( 347) if (hx::IsNotNull( symbol_library )) {
HXLINE( 349) if (symbol_library->exists(symbol_symbolName,type)) {
HXLINE( 351) ::lime::app::Future future = symbol_library->loadAsset(symbol_symbolName,type);
HXLINE( 353) bool _hx_tmp1;
HXDLIN( 353) if (useCache) {
HXLINE( 353) _hx_tmp1 = ::lime::utils::Assets_obj::cache->enabled;
}
else {
HXLINE( 353) _hx_tmp1 = false;
}
HXDLIN( 353) if (_hx_tmp1) {
HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_hx_Closure_0,::String,id,::String,type) HXARGC(1)
void _hx_run( ::Dynamic asset){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_355_loadAsset)
HXLINE( 355) ::lime::utils::Assets_obj::cache->set(id,type,asset);
}
HX_END_LOCAL_FUNC1((void))
HXLINE( 355) future->onComplete( ::Dynamic(new _hx_Closure_0(id,type)));
}
HXLINE( 358) return future;
}
else {
HXLINE( 362) return ::lime::app::Future_obj::withError(((((HX_("There is no ",e5,bb,ab,c5) + type) + HX_(" asset with an ID of \"",95,f2,3a,0d)) + id) + HX_("\"",22,00,00,00)));
}
}
else {
HXLINE( 367) return ::lime::app::Future_obj::withError(::lime::utils::Assets_obj::_hx___libraryNotFound(symbol_libraryName));
}
HXLINE( 347) return null();
}
STATIC_HX_DEFINE_DYNAMIC_FUNC3(Assets_obj,loadAsset,return )
::lime::app::Future Assets_obj::loadAudioBuffer(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_376_loadAudioBuffer)
HXDLIN( 376) return ::lime::utils::Assets_obj::loadAsset(id,HX_("SOUND",af,c4,ba,fe),useCache);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,loadAudioBuffer,return )
::lime::app::Future Assets_obj::loadBytes(::String id){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_381_loadBytes)
HXDLIN( 381) return ::lime::utils::Assets_obj::loadAsset(id,HX_("BINARY",01,68,8e,9f),false);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,loadBytes,return )
::lime::app::Future Assets_obj::loadFont(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_386_loadFont)
HXDLIN( 386) return ::lime::utils::Assets_obj::loadAsset(id,HX_("FONT",cf,25,81,2e),useCache);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,loadFont,return )
::lime::app::Future Assets_obj::loadImage(::String id,hx::Null< bool > __o_useCache){
bool useCache = __o_useCache.Default(true);
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_391_loadImage)
HXDLIN( 391) return ::lime::utils::Assets_obj::loadAsset(id,HX_("IMAGE",3b,57,57,3b),useCache);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,loadImage,return )
::lime::app::Future Assets_obj::loadLibrary(::String id){
HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_hx_Closure_0,::String,id, ::lime::app::Promise_lime_utils_AssetLibrary,promise) HXARGC(1)
void _hx_run( ::lime::utils::AssetManifest manifest){
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_425_loadLibrary)
HXLINE( 426) if (hx::IsNull( manifest )) {
HXLINE( 428) promise->error(((HX_("Cannot parse asset manifest for library \"",cf,1e,cc,48) + id) + HX_("\"",22,00,00,00)));
HXLINE( 429) return;
}
HXLINE( 432) ::lime::utils::AssetLibrary library1 = ::lime::utils::AssetLibrary_obj::fromManifest(manifest);
HXLINE( 434) if (hx::IsNull( library1 )) {
HXLINE( 436) promise->error(((HX_("Cannot open library \"",44,cc,55,e7) + id) + HX_("\"",22,00,00,00)));
}
else {
HXLINE( 440) ::lime::utils::Assets_obj::libraries->set(id,library1);
HXLINE( 441) library1->onChange->add(::lime::utils::Assets_obj::onChange->dispatch_dyn(),null(),null());
HXLINE( 442) ::lime::app::Future _hx_tmp = library1->load();
HXDLIN( 442) promise->completeWith(_hx_tmp);
}
}
HX_END_LOCAL_FUNC1((void))
HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_hx_Closure_1,::String,id, ::lime::app::Promise_lime_utils_AssetLibrary,promise) HXARGC(1)
void _hx_run( ::Dynamic _){
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_446_loadLibrary)
HXLINE( 446) promise->error(((HX_("There is no asset library with an ID of \"",8b,06,e2,9a) + id) + HX_("\"",22,00,00,00)));
}
HX_END_LOCAL_FUNC1((void))
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_395_loadLibrary)
HXLINE( 396) ::lime::app::Promise_lime_utils_AssetLibrary promise = ::lime::app::Promise_lime_utils_AssetLibrary_obj::__alloc( HX_CTX );
HXLINE( 399) ::lime::utils::AssetLibrary library = ::lime::utils::Assets_obj::getLibrary(id);
HXLINE( 401) if (hx::IsNotNull( library )) {
HXLINE( 403) return library->load();
}
HXLINE( 406) ::String path = id;
HXLINE( 407) ::String rootPath = null();
HXLINE( 409) if (::lime::utils::Assets_obj::libraryPaths->exists(id)) {
HXLINE( 411) path = ::lime::utils::Assets_obj::libraryPaths->get_string(id);
HXLINE( 412) rootPath = ::lime::utils::Assets_obj::defaultRootPath;
}
else {
HXLINE( 416) if (::StringTools_obj::endsWith(path,HX_(".bundle",30,4a,b8,4e))) {
HXLINE( 418) path = (path + HX_("/library.json",2a,a7,07,47));
}
HXLINE( 421) path = ::lime::utils::Assets_obj::_hx___cacheBreak(path);
}
HXLINE( 424) ::lime::utils::AssetManifest_obj::loadFromFile(path,rootPath)->onComplete( ::Dynamic(new _hx_Closure_0(id,promise)))->onError( ::Dynamic(new _hx_Closure_1(id,promise)));
HXLINE( 450) return promise->future;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,loadLibrary,return )
::lime::app::Future Assets_obj::loadText(::String id){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_455_loadText)
HXDLIN( 455) return ::lime::utils::Assets_obj::loadAsset(id,HX_("TEXT",ad,94,ba,37),false);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,loadText,return )
void Assets_obj::registerLibrary(::String name, ::lime::utils::AssetLibrary library){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_459_registerLibrary)
HXLINE( 460) if (::lime::utils::Assets_obj::libraries->exists(name)) {
HXLINE( 462) if (hx::IsEq( ::lime::utils::Assets_obj::libraries->get(name),library )) {
HXLINE( 464) return;
}
else {
HXLINE( 468) ::lime::utils::Assets_obj::unloadLibrary(name);
}
}
HXLINE( 472) if (hx::IsNotNull( library )) {
HXLINE( 474) library->onChange->add(::lime::utils::Assets_obj::library_onChange_dyn(),null(),null());
}
HXLINE( 477) ::lime::utils::Assets_obj::libraries->set(name,library);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC2(Assets_obj,registerLibrary,(void))
void Assets_obj::unloadLibrary(::String name){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_481_unloadLibrary)
HXLINE( 483) ::lime::utils::AssetLibrary library = ( ( ::lime::utils::AssetLibrary)(::lime::utils::Assets_obj::libraries->get(name)) );
HXLINE( 485) if (hx::IsNotNull( library )) {
HXLINE( 487) ::lime::utils::Assets_obj::cache->clear((name + HX_(":",3a,00,00,00)));
HXLINE( 488) library->onChange->remove(::lime::utils::Assets_obj::library_onChange_dyn());
HXLINE( 489) library->unload();
}
HXLINE( 492) ::lime::utils::Assets_obj::libraries->remove(name);
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,unloadLibrary,(void))
::String Assets_obj::_hx___cacheBreak(::String path){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_512___cacheBreak)
HXDLIN( 512) return path;
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,_hx___cacheBreak,return )
::String Assets_obj::_hx___libraryNotFound(::String name){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_516___libraryNotFound)
HXLINE( 517) bool _hx_tmp;
HXDLIN( 517) if (hx::IsNotNull( name )) {
HXLINE( 517) _hx_tmp = (name == HX_("",00,00,00,00));
}
else {
HXLINE( 517) _hx_tmp = true;
}
HXDLIN( 517) if (_hx_tmp) {
HXLINE( 519) name = HX_("default",c1,d8,c3,9b);
}
HXLINE( 522) bool _hx_tmp1;
HXDLIN( 522) bool _hx_tmp2;
HXDLIN( 522) if (hx::IsNotNull( ::lime::app::Application_obj::current )) {
HXLINE( 522) _hx_tmp2 = hx::IsNotNull( ::lime::app::Application_obj::current->_hx___preloader );
}
else {
HXLINE( 522) _hx_tmp2 = false;
}
HXDLIN( 522) if (_hx_tmp2) {
HXLINE( 522) _hx_tmp1 = !(::lime::app::Application_obj::current->_hx___preloader->complete);
}
else {
HXLINE( 522) _hx_tmp1 = false;
}
HXDLIN( 522) if (_hx_tmp1) {
HXLINE( 524) return ((HX_("There is no asset library named \"",a1,83,5f,51) + name) + HX_("\", or it is not yet preloaded",db,ac,d4,2f));
}
else {
HXLINE( 528) return ((HX_("There is no asset library named \"",a1,83,5f,51) + name) + HX_("\"",22,00,00,00));
}
HXLINE( 522) return null();
}
STATIC_HX_DEFINE_DYNAMIC_FUNC1(Assets_obj,_hx___libraryNotFound,return )
void Assets_obj::library_onChange(){
HX_STACKFRAME(&_hx_pos_df5754140b017d9f_534_library_onChange)
HXLINE( 535) ::lime::utils::Assets_obj::cache->clear(null());
HXLINE( 536) ::lime::utils::Assets_obj::onChange->dispatch();
}
STATIC_HX_DEFINE_DYNAMIC_FUNC0(Assets_obj,library_onChange,(void))
Assets_obj::Assets_obj()
{
}
bool Assets_obj::__GetStatic(const ::String &inName, Dynamic &outValue, hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 4:
if (HX_FIELD_EQ(inName,"list") ) { outValue = list_dyn(); return true; }
break;
case 5:
if (HX_FIELD_EQ(inName,"cache") ) { outValue = ( cache ); return true; }
break;
case 6:
if (HX_FIELD_EQ(inName,"exists") ) { outValue = exists_dyn(); return true; }
break;
case 7:
if (HX_FIELD_EQ(inName,"getFont") ) { outValue = getFont_dyn(); return true; }
if (HX_FIELD_EQ(inName,"getPath") ) { outValue = getPath_dyn(); return true; }
if (HX_FIELD_EQ(inName,"getText") ) { outValue = getText_dyn(); return true; }
if (HX_FIELD_EQ(inName,"isLocal") ) { outValue = isLocal_dyn(); return true; }
break;
case 8:
if (HX_FIELD_EQ(inName,"onChange") ) { outValue = ( onChange ); return true; }
if (HX_FIELD_EQ(inName,"getAsset") ) { outValue = getAsset_dyn(); return true; }
if (HX_FIELD_EQ(inName,"getBytes") ) { outValue = getBytes_dyn(); return true; }
if (HX_FIELD_EQ(inName,"getImage") ) { outValue = getImage_dyn(); return true; }
if (HX_FIELD_EQ(inName,"loadFont") ) { outValue = loadFont_dyn(); return true; }
if (HX_FIELD_EQ(inName,"loadText") ) { outValue = loadText_dyn(); return true; }
break;
case 9:
if (HX_FIELD_EQ(inName,"libraries") ) { outValue = ( libraries ); return true; }
if (HX_FIELD_EQ(inName,"loadAsset") ) { outValue = loadAsset_dyn(); return true; }
if (HX_FIELD_EQ(inName,"loadBytes") ) { outValue = loadBytes_dyn(); return true; }
if (HX_FIELD_EQ(inName,"loadImage") ) { outValue = loadImage_dyn(); return true; }
break;
case 10:
if (HX_FIELD_EQ(inName,"getLibrary") ) { outValue = getLibrary_dyn(); return true; }
if (HX_FIELD_EQ(inName,"hasLibrary") ) { outValue = hasLibrary_dyn(); return true; }
break;
case 11:
if (HX_FIELD_EQ(inName,"loadLibrary") ) { outValue = loadLibrary_dyn(); return true; }
break;
case 12:
if (HX_FIELD_EQ(inName,"libraryPaths") ) { outValue = ( libraryPaths ); return true; }
if (HX_FIELD_EQ(inName,"isValidAudio") ) { outValue = isValidAudio_dyn(); return true; }
if (HX_FIELD_EQ(inName,"isValidImage") ) { outValue = isValidImage_dyn(); return true; }
if (HX_FIELD_EQ(inName,"__cacheBreak") ) { outValue = _hx___cacheBreak_dyn(); return true; }
break;
case 13:
if (HX_FIELD_EQ(inName,"unloadLibrary") ) { outValue = unloadLibrary_dyn(); return true; }
break;
case 14:
if (HX_FIELD_EQ(inName,"getAudioBuffer") ) { outValue = getAudioBuffer_dyn(); return true; }
break;
case 15:
if (HX_FIELD_EQ(inName,"defaultRootPath") ) { outValue = ( defaultRootPath ); return true; }
if (HX_FIELD_EQ(inName,"loadAudioBuffer") ) { outValue = loadAudioBuffer_dyn(); return true; }
if (HX_FIELD_EQ(inName,"registerLibrary") ) { outValue = registerLibrary_dyn(); return true; }
break;
case 16:
if (HX_FIELD_EQ(inName,"library_onChange") ) { outValue = library_onChange_dyn(); return true; }
break;
case 17:
if (HX_FIELD_EQ(inName,"__libraryNotFound") ) { outValue = _hx___libraryNotFound_dyn(); return true; }
}
return false;
}
bool Assets_obj::__SetStatic(const ::String &inName,Dynamic &ioValue,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 5:
if (HX_FIELD_EQ(inName,"cache") ) { cache=ioValue.Cast< ::lime::utils::AssetCache >(); return true; }
break;
case 8:
if (HX_FIELD_EQ(inName,"onChange") ) { onChange=ioValue.Cast< ::lime::app::_Event_Void_Void >(); return true; }
break;
case 9:
if (HX_FIELD_EQ(inName,"libraries") ) { libraries=ioValue.Cast< ::haxe::ds::StringMap >(); return true; }
break;
case 12:
if (HX_FIELD_EQ(inName,"libraryPaths") ) { libraryPaths=ioValue.Cast< ::haxe::ds::StringMap >(); return true; }
break;
case 15:
if (HX_FIELD_EQ(inName,"defaultRootPath") ) { defaultRootPath=ioValue.Cast< ::String >(); return true; }
}
return false;
}
#ifdef HXCPP_SCRIPTABLE
static hx::StorageInfo *Assets_obj_sMemberStorageInfo = 0;
static hx::StaticInfo Assets_obj_sStaticStorageInfo[] = {
{hx::fsObject /* ::lime::utils::AssetCache */ ,(void *) &Assets_obj::cache,HX_("cache",42,9a,14,41)},
{hx::fsObject /* ::lime::app::_Event_Void_Void */ ,(void *) &Assets_obj::onChange,HX_("onChange",ef,87,1f,97)},
{hx::fsString,(void *) &Assets_obj::defaultRootPath,HX_("defaultRootPath",c8,76,96,0a)},
{hx::fsObject /* ::haxe::ds::StringMap */ ,(void *) &Assets_obj::libraries,HX_("libraries",19,50,f8,18)},
{hx::fsObject /* ::haxe::ds::StringMap */ ,(void *) &Assets_obj::libraryPaths,HX_("libraryPaths",33,26,5e,06)},
{ hx::fsUnknown, 0, null()}
};
#endif
static void Assets_obj_sMarkStatics(HX_MARK_PARAMS) {
HX_MARK_MEMBER_NAME(Assets_obj::cache,"cache");
HX_MARK_MEMBER_NAME(Assets_obj::onChange,"onChange");
HX_MARK_MEMBER_NAME(Assets_obj::defaultRootPath,"defaultRootPath");
HX_MARK_MEMBER_NAME(Assets_obj::libraries,"libraries");
HX_MARK_MEMBER_NAME(Assets_obj::libraryPaths,"libraryPaths");
};
#ifdef HXCPP_VISIT_ALLOCS
static void Assets_obj_sVisitStatics(HX_VISIT_PARAMS) {
HX_VISIT_MEMBER_NAME(Assets_obj::cache,"cache");
HX_VISIT_MEMBER_NAME(Assets_obj::onChange,"onChange");
HX_VISIT_MEMBER_NAME(Assets_obj::defaultRootPath,"defaultRootPath");
HX_VISIT_MEMBER_NAME(Assets_obj::libraries,"libraries");
HX_VISIT_MEMBER_NAME(Assets_obj::libraryPaths,"libraryPaths");
};
#endif
hx::Class Assets_obj::__mClass;
static ::String Assets_obj_sStaticFields[] = {
HX_("cache",42,9a,14,41),
HX_("onChange",ef,87,1f,97),
HX_("defaultRootPath",c8,76,96,0a),
HX_("libraries",19,50,f8,18),
HX_("libraryPaths",33,26,5e,06),
HX_("exists",dc,1d,e0,bf),
HX_("getAsset",7a,79,10,86),
HX_("getAudioBuffer",80,41,e3,26),
HX_("getBytes",f5,17,6f,1d),
HX_("getFont",85,0d,43,16),
HX_("getImage",e5,2e,40,1d),
HX_("getLibrary",05,ad,d1,8e),
HX_("getPath",5b,95,d4,1c),
HX_("getText",63,7c,7c,1f),
HX_("hasLibrary",c1,0e,24,ca),
HX_("isLocal",21,6d,76,15),
HX_("isValidAudio",c4,0a,df,47),
HX_("isValidImage",49,b1,c7,dd),
HX_("list",5e,1c,b3,47),
HX_("loadAsset",ea,b5,70,41),
HX_("loadAudioBuffer",f0,71,7c,e3),
HX_("loadBytes",65,54,cf,d8),
HX_("loadFont",15,2f,60,b4),
HX_("loadImage",55,6b,a0,d8),
HX_("loadLibrary",75,e5,0d,10),
HX_("loadText",f3,9d,99,bd),
HX_("registerLibrary",d8,8a,84,f2),
HX_("unloadLibrary",bc,5b,48,31),
HX_("__cacheBreak",3d,06,38,34),
HX_("__libraryNotFound",2a,db,69,c9),
HX_("library_onChange",f3,20,14,c8),
::String(null())
};
void Assets_obj::__register()
{
Assets_obj _hx_dummy;
Assets_obj::_hx_vtable = *(void **)&_hx_dummy;
hx::Static(__mClass) = new hx::Class_obj();
__mClass->mName = HX_("lime.utils.Assets",39,6e,7e,b0);
__mClass->mSuper = &super::__SGetClass();
__mClass->mConstructEmpty = &__CreateEmpty;
__mClass->mConstructArgs = &__Create;
__mClass->mGetStaticField = &Assets_obj::__GetStatic;
__mClass->mSetStaticField = &Assets_obj::__SetStatic;
__mClass->mMarkFunc = Assets_obj_sMarkStatics;
__mClass->mStatics = hx::Class_obj::dupFunctions(Assets_obj_sStaticFields);
__mClass->mMembers = hx::Class_obj::dupFunctions(0 /* sMemberFields */);
__mClass->mCanCast = hx::TCanCast< Assets_obj >;
#ifdef HXCPP_VISIT_ALLOCS
__mClass->mVisitFunc = Assets_obj_sVisitStatics;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mMemberStorageInfo = Assets_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mStaticStorageInfo = Assets_obj_sStaticStorageInfo;
#endif
hx::_hx_RegisterClass(__mClass->mName, __mClass);
}
void Assets_obj::__boot()
{
{
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_39_boot)
HXDLIN( 39) cache = ::lime::utils::AssetCache_obj::__alloc( HX_CTX );
}
{
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_40_boot)
HXDLIN( 40) onChange = ::lime::app::_Event_Void_Void_obj::__alloc( HX_CTX );
}
{
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_42_boot)
HXDLIN( 42) libraries = ::haxe::ds::StringMap_obj::__alloc( HX_CTX );
}
{
HX_GC_STACKFRAME(&_hx_pos_df5754140b017d9f_43_boot)
HXDLIN( 43) libraryPaths = ::haxe::ds::StringMap_obj::__alloc( HX_CTX );
}
}
} // end namespace lime
} // end namespace utils
| 40,854 | 19,783 |
#include <iostream>
using namespace std;
int main()
{
int arr[10] = {0};
cout<< arr[9]<<"\n";
return 0;
}
| 120 | 52 |
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
//====================================================================================================================================================
//
// ESD description of an ALICE muon forward track, combining the information of the Muon Spectrometer and the Muon Forward Tracker
//
// Contact author: antonio.uras@cern.ch
//
//====================================================================================================================================================
#include "AliESDMuonGlobalTrack.h"
#include "AliESDEvent.h"
#include "TClonesArray.h"
#include "TLorentzVector.h"
#include "TMath.h"
#include "TDatabasePDG.h"
ClassImp(AliESDMuonGlobalTrack)
//====================================================================================================================================================
AliESDMuonGlobalTrack::AliESDMuonGlobalTrack():
AliVParticle(),
fCharge(0),
fMatchTrigger(0),
fNMFTClusters(0),
fNWrongMFTClustersMC(-1),
fMFTClusterPattern(0),
fPx(0),
fPy(0),
fPz(0),
fPt(0),
fP(0),
fEta(0),
fRapidity(0),
fFirstTrackingPointX(0),
fFirstTrackingPointY(0),
fFirstTrackingPointZ(0),
fXAtVertex(0),
fYAtVertex(0),
fRAtAbsorberEnd(0),
fCovariances(0),
fChi2OverNdf(0),
fChi2MatchTrigger(0),
fLabel(-1),
fMuonClusterMap(0),
fHitsPatternInTrigCh(0),
fHitsPatternInTrigChTrk(0),
fLoCircuit(0),
fIsConnected(kFALSE),
fESDEvent(0)
{
// Default constructor
fProdVertexXYZ[0]=0;
fProdVertexXYZ[1]=0;
fProdVertexXYZ[2]=0;
}
//====================================================================================================================================================
AliESDMuonGlobalTrack::AliESDMuonGlobalTrack(Double_t px, Double_t py, Double_t pz):
AliVParticle(),
fCharge(0),
fMatchTrigger(0),
fNMFTClusters(0),
fNWrongMFTClustersMC(-1),
fMFTClusterPattern(0),
fPx(0),
fPy(0),
fPz(0),
fPt(0),
fP(0),
fEta(0),
fRapidity(0),
fFirstTrackingPointX(0),
fFirstTrackingPointY(0),
fFirstTrackingPointZ(0),
fXAtVertex(0),
fYAtVertex(0),
fRAtAbsorberEnd(0),
fCovariances(0),
fChi2OverNdf(0),
fChi2MatchTrigger(0),
fLabel(-1),
fMuonClusterMap(0),
fHitsPatternInTrigCh(0),
fHitsPatternInTrigChTrk(0),
fLoCircuit(0),
fIsConnected(kFALSE),
fESDEvent(0)
{
// Constructor with kinematics
SetPxPyPz(px, py, pz);
fProdVertexXYZ[0]=0;
fProdVertexXYZ[1]=0;
fProdVertexXYZ[2]=0;
}
//====================================================================================================================================================
AliESDMuonGlobalTrack::AliESDMuonGlobalTrack(const AliESDMuonGlobalTrack& muonTrack):
AliVParticle(muonTrack),
fCharge(muonTrack.fCharge),
fMatchTrigger(muonTrack.fMatchTrigger),
fNMFTClusters(muonTrack.fNMFTClusters),
fNWrongMFTClustersMC(muonTrack.fNWrongMFTClustersMC),
fMFTClusterPattern(muonTrack.fMFTClusterPattern),
fPx(muonTrack.fPx),
fPy(muonTrack.fPy),
fPz(muonTrack.fPz),
fPt(muonTrack.fPt),
fP(muonTrack.fP),
fEta(muonTrack.fEta),
fRapidity(muonTrack.fRapidity),
fFirstTrackingPointX(muonTrack.fFirstTrackingPointX),
fFirstTrackingPointY(muonTrack.fFirstTrackingPointY),
fFirstTrackingPointZ(muonTrack.fFirstTrackingPointZ),
fXAtVertex(muonTrack.fXAtVertex),
fYAtVertex(muonTrack.fYAtVertex),
fRAtAbsorberEnd(muonTrack.fRAtAbsorberEnd),
fCovariances(0),
fChi2OverNdf(muonTrack.fChi2OverNdf),
fChi2MatchTrigger(muonTrack.fChi2MatchTrigger),
fLabel(muonTrack.fLabel),
fMuonClusterMap(muonTrack.fMuonClusterMap),
fHitsPatternInTrigCh(muonTrack.fHitsPatternInTrigCh),
fHitsPatternInTrigChTrk(muonTrack.fHitsPatternInTrigChTrk),
fLoCircuit(muonTrack.fLoCircuit),
fIsConnected(muonTrack.fIsConnected),
fESDEvent(muonTrack.fESDEvent)
{
// Copy constructor
fProdVertexXYZ[0]=muonTrack.fProdVertexXYZ[0];
fProdVertexXYZ[1]=muonTrack.fProdVertexXYZ[1];
fProdVertexXYZ[2]=muonTrack.fProdVertexXYZ[2];
if (muonTrack.fCovariances) fCovariances = new TMatrixD(*(muonTrack.fCovariances));
}
//====================================================================================================================================================
AliESDMuonGlobalTrack& AliESDMuonGlobalTrack::operator=(const AliESDMuonGlobalTrack& muonTrack) {
// Assignment operator
if (this == &muonTrack) return *this;
// Base class assignement
AliVParticle::operator=(muonTrack);
fCharge = muonTrack.fCharge;
fMatchTrigger = muonTrack.fMatchTrigger;
fNMFTClusters = muonTrack.fNMFTClusters;
fNWrongMFTClustersMC = muonTrack.fNWrongMFTClustersMC;
fMFTClusterPattern = muonTrack.fMFTClusterPattern;
fPx = muonTrack.fPx;
fPy = muonTrack.fPy;
fPz = muonTrack.fPz;
fPt = muonTrack.fPt;
fP = muonTrack.fP;
fEta = muonTrack.fEta;
fRapidity = muonTrack.fRapidity;
fFirstTrackingPointX = muonTrack.fFirstTrackingPointX;
fFirstTrackingPointY = muonTrack.fFirstTrackingPointY;
fFirstTrackingPointZ = muonTrack.fFirstTrackingPointZ;
fXAtVertex = muonTrack.fXAtVertex;
fYAtVertex = muonTrack.fYAtVertex;
fRAtAbsorberEnd = muonTrack.fRAtAbsorberEnd;
fChi2OverNdf = muonTrack.fChi2OverNdf;
fChi2MatchTrigger = muonTrack.fChi2MatchTrigger;
fLabel = muonTrack.fLabel;
fMuonClusterMap = muonTrack.fMuonClusterMap;
fHitsPatternInTrigCh = muonTrack.fHitsPatternInTrigCh;
fHitsPatternInTrigChTrk = muonTrack.fHitsPatternInTrigChTrk;
fLoCircuit = muonTrack.fLoCircuit;
fIsConnected = muonTrack.fIsConnected;
fESDEvent = muonTrack.fESDEvent;
fProdVertexXYZ[0]=muonTrack.fProdVertexXYZ[0];
fProdVertexXYZ[1]=muonTrack.fProdVertexXYZ[1];
fProdVertexXYZ[2]=muonTrack.fProdVertexXYZ[2];
if (muonTrack.fCovariances) {
if (fCovariances) *fCovariances = *(muonTrack.fCovariances);
else fCovariances = new TMatrixD(*(muonTrack.fCovariances));
}
else {
delete fCovariances;
fCovariances = 0x0;
}
return *this;
}
//====================================================================================================================================================
void AliESDMuonGlobalTrack::Copy(TObject &obj) const {
// This overwrites the virtual TObject::Copy()
// to allow run time copying without casting
// in AliESDEvent
if (this==&obj) return;
AliESDMuonGlobalTrack *robj = dynamic_cast<AliESDMuonGlobalTrack*>(&obj);
if (!robj) return; // not an AliESDMuonGlobalTrack
*robj = *this;
}
//====================================================================================================================================================
void AliESDMuonGlobalTrack::SetPxPyPz(Double_t px, Double_t py, Double_t pz) {
Double_t mMu = TDatabasePDG::Instance()->GetParticle("mu-")->Mass();
Double_t eMu = TMath::Sqrt(mMu*mMu + px*px + py*py + pz*pz);
TLorentzVector kinem(px, py, pz, eMu);
fPx = kinem.Px();
fPy = kinem.Py();
fPz = kinem.Pz();
fP = kinem.P();
fPt = kinem.Pt();
fEta = kinem.Eta();
fRapidity = kinem.Rapidity();
}
//====================================================================================================================================================
const TMatrixD& AliESDMuonGlobalTrack::GetCovariances() const {
// Return the covariance matrix (create it before if needed)
if (!fCovariances) {
fCovariances = new TMatrixD(5,5);
fCovariances->Zero();
}
return *fCovariances;
}
//====================================================================================================================================================
void AliESDMuonGlobalTrack::SetCovariances(const TMatrixD& covariances) {
// Set the covariance matrix
if (fCovariances) *fCovariances = covariances;
else fCovariances = new TMatrixD(covariances);
}
//====================================================================================================================================================
| 9,372 | 3,263 |
/* Copyright 2021 Enjin Pte. Ltd.
*
* 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 "PusherEventListener.hpp"
#include "EventTypeDef.hpp"
#include <sstream>
namespace enjin::sdk::events {
PusherEventListener::PusherEventListener(PusherEventService* service) : service(service) {
}
void PusherEventListener::on_event(const pusher::PusherEvent& event) {
const std::string& key = event.get_event_name().value_or("");
const std::string& channel = event.get_channel_name().value_or("");
const std::string& message = event.get_data().value_or("");
auto listeners = service->get_listeners();
auto logger = service->get_logger_provider();
// Log event received
if (logger != nullptr) {
std::stringstream ss;
ss << "Received event " << key << " on channel " << channel << " with results " << message;
logger->log(utils::LogLevel::INFO, ss.str());
}
if (listeners.empty()) {
if (logger != nullptr) {
logger->log(utils::LogLevel::INFO, "No registered listener when event was received");
}
return;
}
EventTypeDef def = EventTypeDef::get_from_key(key);
if (def.get_type() == models::EventType::UNKNOWN) {
if (logger != nullptr) {
std::stringstream ss;
ss << "Unknown event type for key " << def.get_key();
logger->log(utils::LogLevel::WARN, ss.str());
}
return;
}
models::NotificationEvent notification_event(def.get_type(), channel, message);
for (const auto& registration : listeners) {
if (registration.get_matcher()(notification_event.get_type())) {
registration.get_listener().notification_received(notification_event);
}
}
}
}
| 2,267 | 668 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
class edmond_blossom {
private:
std::vector<std::vector<int>> adj_list;
std::vector<int> match;
std::vector<int> parent;
std::vector<int> blossom_root;
std::vector<bool> in_queue;
std::vector<bool> in_blossom;
std::queue<int> process_queue;
int num_v;
/// Find the lowest common ancestor between u and v.
/// The specified root represents an upper bound.
int get_lca(int root, int u, int v) {
std::vector<bool> in_path(num_v, false);
for (u = blossom_root[u]; ; u = blossom_root[parent[match[u]]]) {
in_path[u] = true;
if (u == root) {
break;
}
}
for (v = blossom_root[v]; ; v = blossom_root[parent[match[v]]]) {
if (in_path[v]) {
return v;
}
}
}
/// Mark the vertices between u and the specified lowest
/// common ancestor for contraction where necessary.
void mark_blossom(int lca, int u) {
while (blossom_root[u] != lca) {
int v = match[u];
in_blossom[blossom_root[u]] = true;
in_blossom[blossom_root[v]] = true;
u = parent[v];
if (blossom_root[u] != lca) {
parent[u] = v;
}
}
}
/// Contract the blossom that is formed after processing
/// the edge u-v.
void contract_blossom(int source, int u, int v) {
int lca = get_lca(source, u, v);
std::fill(in_blossom.begin(), in_blossom.end(), false);
mark_blossom(lca, u);
mark_blossom(lca, v);
if (blossom_root[u] != lca) {
parent[u] = v;
}
if (blossom_root[v] != lca) {
parent[v] = u;
}
for (int i = 0; i < num_v; ++i) {
if (in_blossom[blossom_root[i]]) {
blossom_root[i] = lca;
if (!in_queue[i]) {
process_queue.push(i);
in_queue[i] = true;
}
}
}
}
/// Return the vertex at the end of an augmenting path
/// starting at the specified source, or -1 if none exist.
int find_augmenting_path(int source) {
for (int i = 0; i < num_v; ++i) {
in_queue[i] = false;
parent[i] = -1;
blossom_root[i] = i;
}
// Empty the queue
process_queue = std::queue<int>();
process_queue.push(source);
in_queue[source] = true;
while (!process_queue.empty()) {
int u = process_queue.front();
process_queue.pop();
for (int v : adj_list[u]) {
if (blossom_root[u] != blossom_root[v] && match[u] != v) {
// Process if
// + u-v is not an edge in the matching
// && u and v are not in the same blossom (yet)
if (v == source || (match[v] != -1 && parent[match[v]] != -1)) {
// Contract a blossom if
// + v is the source
// || v is matched and v's match has a parent.
//
// The fact that parents are assigned to vertices
// with odd distances from the source is used to
// check if a cycle is odd or even. u is always an
// even distance away from the source, so if v's
// match is assigned a parent, you have an odd cycle.
contract_blossom(source, u, v);
} else if (parent[v] == -1) {
parent[v] = u;
if (match[v] == -1) {
// v is unmatched; augmenting path found
return v;
} else {
// Enqueue v's match.
int w = match[v];
if (!in_queue[w]) {
process_queue.push(w);
in_queue[w] = true;
}
}
}
}
}
}
return -1;
}
/// Augment the path that ends with the specified vertex
/// using the parent and match fields. Returns the increase
/// in the number of matchings. (i.e. 1 if the path is valid,
/// 0 otherwise)
int augment_path(int end) {
int u = end;
while (u != -1) {
// Currently w===v----u
int v = parent[u];
int w = match[v];
// Change to w---v===u
match[v] = u;
match[u] = v;
u = w;
}
// Return 1 if the augmenting path is valid
return end == -1 ? 0 : 1;
}
public:
edmond_blossom(int v) :
adj_list(v),
match(v, -1),
parent(v),
blossom_root(v),
in_queue(v),
in_blossom(v),
num_v(v) {}
/// Add a bidirectional edge from u to v.
void add_edge(int u, int v) {
adj_list[u].push_back(v);
adj_list[v].push_back(u);
}
/// Returns the maximum cardinality matching
int get_max_matching() {
int ans = 0;
// Reset
std::fill(match.begin(), match.end(), -1);
for (int u = 0; u < num_v; ++u) {
if (match[u] == -1) {
int v = find_augmenting_path(u);
if (v != -1) {
// An augmenting path exists
ans += augment_path(v);
}
}
}
return ans;
}
/// Constructs the maximum cardinality matching
std::vector<std::pair<int, int>> construct_matching() {
std::vector<std::pair<int, int>> output;
std::vector<bool> is_processed(num_v, false);
for (int u = 0; u < num_v; ++u) {
if (!is_processed[u] && match[u] != -1) {
output.emplace_back(u, match[u]);
is_processed[u] = true;
is_processed[match[u]] = true;
}
}
return output;
}
};
int main() {
/*
10 18
0 1
0 2
1 2
1 3
1 4
3 4
2 4
2 5
4 5
3 6
3 7
4 7
4 8
5 8
5 9
6 7
7 8
8 9
*/
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int num_vertices;
int num_edges;
std::cin >> num_vertices >> num_edges;
edmond_blossom eb(num_vertices);
for (int i = 0; i < num_edges; ++i) {
int u, v;
std::cin >> u >> v;
eb.add_edge(u, v);
}
std::cout << "Maximum Cardinality: " << eb.get_max_matching() << "\n";
std::vector<std::pair<int, int>> matching = eb.construct_matching();
for (auto& match : matching) {
std::cout << match.first << " " << match.second << "\n";
}
}
| 7,297 | 2,378 |
#include <fstream>
#include <streambuf>
#include <qfiledialog.h>
#include <tree_editor/common/dialogs/path_config_dialog.h>
#include <tree_editor/common/choice_manager.h>
#include <tree_editor/common/graph/tree_instance.h>
#include <any_container/decode.h>
#include "formula_editor_window.h"
#include "formula_nodes.h"
using namespace spiritsaway::tree_editor;
using namespace spiritsaway::formula_tree::editor;
using namespace std;
std::string formula_editor_window::new_file_name()
{
std::string temp = fmt::format("new_formula_tree_{}.json", get_seq());
std::filesystem::path temp_path = data_folder / temp;
while (already_open(temp) || std::filesystem::exists(temp_path))
{
temp = fmt::format("new_formula_tree_{}.json", get_seq());
temp_path = data_folder / temp;
}
return temp;
}
bool formula_editor_window::load_config()
{
auto config_file_name = "formula_node_config.json";
std::string notify_info;
std::string node_desc_path;
std::string choice_desc_path;
std::string save_path;
if (!std::filesystem::exists(std::filesystem::path(config_file_name)))
{
path_req_desc node_req;
node_req.name = "formula node types";
node_req.tips = "file to provide all formula nodes";
node_req.extension = ".json";
path_req_desc choice_req;
choice_req.name = "formula named attr";
choice_req.tips = "file to provide named attr";
choice_req.extension = ".json";
path_req_desc save_path_req;
save_path_req.name = "data save dir";
save_path_req.tips = "directory to save data files";
save_path_req.extension = "";
std::vector<path_req_desc> path_reqs;
path_reqs.push_back(node_req);
path_reqs.push_back(choice_req);
path_reqs.push_back(save_path_req);
auto cur_dialog = new path_config_dialog(path_reqs, config_file_name, this);
auto temp_result = cur_dialog->run();
if (!cur_dialog->valid)
{
QMessageBox::about(this, QString("Error"),
QString::fromStdString("invalid formula node config"));
return false;
}
node_desc_path = temp_result[0];
choice_desc_path = temp_result[1];
save_path = temp_result[2];
}
else
{
auto config_json_variant = load_json_file(config_file_name);
if (std::holds_alternative<std::string>(config_json_variant))
{
auto notify_info = "config file: " + std::get<std::string>(config_json_variant);
QMessageBox::about(this, QString("Error"),
QString::fromStdString(notify_info));
return false;
}
auto json_content = std::get<json::object_t>(config_json_variant);
std::vector<std::string> temp_result;
std::vector<std::string> path_keys = { "formula node types", "formula named attr" , "data save dir" };
for (auto one_key : path_keys)
{
auto cur_value_iter = json_content.find(one_key);
if (cur_value_iter == json_content.end())
{
notify_info = "config content should be should has key " + one_key;
QMessageBox::about(this, QString("Error"),
QString::fromStdString(notify_info));
return false;
}
if (!cur_value_iter->second.is_string())
{
notify_info = "config content should for key " + one_key + " should be str";
QMessageBox::about(this, QString("Error"),
QString::fromStdString(notify_info));
return false;
}
temp_result.push_back(cur_value_iter->second.get<std::string>());
}
node_desc_path = temp_result[0];
choice_desc_path = temp_result[1];
save_path = temp_result[2];
}
// choice first
auto choice_json_variant = load_json_file(choice_desc_path);
if (std::holds_alternative<std::string>(choice_json_variant))
{
auto notify_info = "chocie file: " + std::get<std::string>(choice_json_variant);
QMessageBox::about(this, QString("Error"),
QString::fromStdString(notify_info));
return false;
}
else
{
choice_manager::instance().load_from_json(std::get<json::object_t>(choice_json_variant));
}
//nodes depends on choice
auto node_json_variant = load_json_file(node_desc_path);
if (std::holds_alternative<std::string>(node_json_variant))
{
auto notify_info = "nodes file: " + std::get<std::string>(node_json_variant);
QMessageBox::about(this, QString("Error"),
QString::fromStdString(notify_info));
return false;
}
else
{
node_config_repo::instance().load_config(std::get<json::object_t>(node_json_variant));
}
data_folder = save_path;
return true;
}
basic_node* formula_editor_window::create_node_from_desc(const basic_node_desc& cur_desc, basic_node* parent)
{
auto cur_config = node_config_repo::instance().get_config(cur_desc.type);
if (!cur_config)
{
return nullptr;
}
auto cur_node = new formula_node(cur_config.value(), dynamic_cast<formula_node*>(parent), cur_desc.idx);
if (parent)
{
parent->add_child(cur_node);
}
cur_node->color = cur_desc.color;
cur_node->_is_collapsed = cur_desc.is_collpased;
cur_node->comment = cur_desc.comment;
cur_node->refresh_editable_items();
cur_node->set_extra(json(cur_desc.extra));
return cur_node;
} | 4,904 | 1,871 |
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1991 - 1992.
//
// File: PRTIFLST.CXX
//
// Contents: Partition Information List
//
// Classes:
//
// History: 16-Feb-94 SrikantS Created.
//
//----------------------------------------------------------------------------
#include <pch.cxx>
#pragma hdrstop
#include "prtiflst.hxx"
//+---------------------------------------------------------------------------
//----------------------------------------------------------------------------
CPartInfo::CPartInfo( PARTITIONID partId )
: _partId(partId)
{
_widChangeLog = widInvalid ;
_widCurrMasterIndex = widInvalid ;
_widNewMasterIndex = widInvalid ;
_widMMergeLog = widInvalid ;
}
//+---------------------------------------------------------------------------
//----------------------------------------------------------------------------
CPartInfoList::~CPartInfoList()
{
CPartInfo * pNode = NULL;
while ( (pNode = RemoveFirst()) != NULL ) {
delete pNode;
}
}
//+---------------------------------------------------------------------------
//----------------------------------------------------------------------------
CPartInfo* CPartInfoList::GetPartInfo( PARTITIONID partId )
{
for ( CForPartInfoIter it(*this); !AtEnd(it); Advance(it) )
{
if ( it->GetPartId() == partId )
{
return it.GetPartInfo();
}
}
return NULL;
}
| 1,608 | 451 |
#ifndef KERNEL_NEW_H_
#define KERNEL_NEW_H_
#include "kdef.h"
#include "kuseful.h"
#include "klog.h"
#include <kernel/mem_operators.hpp>
NAMESPACE_BEGIN(kernel)
/**
* @brief Custome memory allocator, that uses __primitive_heap
* as an allocation space. Has no ability to deconstruct an object,
* since you cannot deallocate on __primitive heap
* More documentation inside of IAllocator (libstdcxx/allocator.hpp)
*
* @tparam Type - Allocator will alocate this type
*/
template <typename Type>
struct PrimitiveAllocator
{
static constexpr uint32_t object_size = sizeof(Type);
typedef Type value_type;
typedef Type& reference;
typedef const Type& const_reference;
typedef Type* pointer;
static pointer allocate(uint32_t n)
{
return (pointer)kernel::heap::Allocate(n * object_size);
}
static void construct(pointer p, const_reference v)
{
*p = Type(v);
}
static void destroy(pointer p)
{
p->~Type();
}
};
/**
* @brief Custome memory allocator, that uses __mapped_heap
* as an allocation space. Has the ability to deallocate memory.
* More documentation inside of IAllocator (libstdcxx/allocator.hpp)
*
* @tparam Type - Allocator will alocate this type
*/
template <typename Type>
struct AdvancedAllocator
{
static constexpr uint32_t object_size = sizeof(Type);
typedef Type value_type;
typedef Type& reference;
typedef const Type& const_reference;
typedef Type* pointer;
/**
* @brief Allocate _n_ objects of size Type
*
* @param n
* @return pointer
*/
static pointer allocate(uint32_t n)
{
return new Type[n];
}
/**
* @brief Deallocate a pointer pointing to _n_ objects of type Type
*
* @param p
* @param n
*/
static void deallocate(pointer p, size_t n)
{
delete p;
}
/**
* @brief construct an object of type Type in pointer _p_ with args _v_
*
* @param p
* @param v
*/
static void construct(pointer p, const_reference v)
{
*p = Type(v);
}
/**
* @brief Destroy an object of type Type in pointer _p_
*
* @param p
*/
static void destroy(pointer p)
{
p->~Type();
}
};
NAMESPACE_END(kernel)
#endif // KERNEL_NEW_H_ | 2,802 | 824 |
#include "Teste.h"
int Teste::ct =0;
int Teste::getNumInstancias() {
return ct;
}
Teste::Teste() {
ct++;
}
Teste::~Teste() {
ct--;
}
| 146 | 76 |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* TimeModule.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jaleman <jaleman@student.42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/07/15 18:52:47 by jaleman #+# #+# */
/* Updated: 2017/07/15 18:52:48 by jaleman ### ########.fr */
/* */
/* ************************************************************************** */
#include "TimeModule.hpp"
TimeModule::TimeModule(void)
{
return ;
}
TimeModule::TimeModule(const TimeModule &src)
{
*this = src;
return ;
}
TimeModule::~TimeModule(void)
{
return ;
}
TimeModule
&TimeModule::operator= (const TimeModule &rhs)
{
static_cast <void> (rhs);
return (*this);
}
| 1,207 | 348 |
#include <memory>
int main()
{
std::unique_ptr<int> foo = std::make_unique<int>(42);
return ((*foo) == 42) ? 0 : 1;
}
| 124 | 59 |
#include <KrisLibrary/Logger.h>
#include "LAPACKInterface.h"
#include "complex.h"
#include "errors.h"
using namespace Math;
bool LAPACKInterface::IsCompliant(const fVector& x)
{
return (x.stride == 1);
}
bool LAPACKInterface::IsCompliant(const dVector& x)
{
return (x.stride == 1);
}
bool LAPACKInterface::IsCompliant(const cVector& x)
{
return (x.stride == 1);
}
bool LAPACKInterface::IsCompliant(const fMatrix& A)
{
if(A.isRowMajor()) return false;
return (A.istride == 1);
}
bool LAPACKInterface::IsCompliant(const dMatrix& A)
{
if(A.isRowMajor()) return false;
return (A.istride == 1);
}
bool LAPACKInterface::IsCompliant(const cMatrix& A)
{
if(A.isRowMajor()) return false;
return (A.istride == 1);
}
void LAPACKInterface::MakeCompliant(const fVector& x,fVector& res)
{
Assert(res.empty());
res.resize(x.n);
res.copy(x);
Assert(IsCompliant(res));
}
void LAPACKInterface::MakeCompliant(const dVector& x,dVector& res)
{
Assert(res.empty());
res.resize(x.n);
res.copy(x);
Assert(IsCompliant(res));
}
void LAPACKInterface::MakeCompliant(const cVector& x,cVector& res)
{
Assert(res.empty());
res.resize(x.n);
res.copy(x);
Assert(IsCompliant(res));
}
void LAPACKInterface::MakeCompliant(const fMatrix& A,fMatrix& res)
{
Assert(res.isEmpty());
res.resize(A.m,A.n);
std::swap(res.istride,res.jstride); //make column major
Assert(res.isValid());
Assert(IsCompliant(res));
res.copy(A);
}
void LAPACKInterface::MakeCompliant(const dMatrix& A,dMatrix& res)
{
Assert(res.isEmpty());
res.resize(A.m,A.n);
std::swap(res.istride,res.jstride); //make column major
Assert(res.isValid());
Assert(IsCompliant(res));
res.copy(A);
}
void LAPACKInterface::MakeCompliant(const cMatrix& A,cMatrix& res)
{
Assert(res.isEmpty());
res.resize(A.m,A.n);
std::swap(res.istride,res.jstride); //make column major
Assert(res.isValid());
Assert(IsCompliant(res));
res.copy(A);
}
#if HAVE_CLAPACK
extern "C" {
#include "f2c.h"
#include "clapack.h"
}
bool LAPACKInterface::Solve(const fMatrix& A,const fVector& b,fVector& x)
{
Assert(A.isSquare());
Assert(A.n == b.n);
Assert(x.isEmpty() || !x.isReference());
fMatrix LU;
MakeCompliant(A,LU);
//copy b into x
x.resize(0);
MakeCompliant(b,x);
//solve it
integer n = A.m;
integer nrhs = 1; //nrhs is 1, because only one vector solved for
integer ldb = x.n; //ignored, because only one vector solved for
integer info=0;
integer* ipiv = new integer[n];
integer lda = LU.jstride;
sgesv_(&n,&nrhs,LU.getStart(),&lda,ipiv,x.getStart(),&ldb,&info);
delete [] ipiv;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::Solve(const dMatrix& A,const dVector& b,dVector& x)
{
Assert(A.isSquare());
Assert(A.n == b.n);
Assert(x.isEmpty() || !x.isReference());
dMatrix LU;
MakeCompliant(A,LU);
//copy b into x
x.resize(0);
MakeCompliant(b,x);
//solve it
integer n = A.m;
integer nrhs = 1; //nrhs is 1, because only one vector solved for
integer ldb = x.n; //ignored, because only one vector solved for
integer info=0;
integer* ipiv = new integer[n];
integer lda = LU.jstride;
dgesv_(&n,&nrhs,LU.getStart(),&lda,ipiv,x.getStart(),&ldb,&info);
delete [] ipiv;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::LeastSquares(const fMatrix& A,const fVector& b,fVector& x)
{
Assert(A.m == b.n);
Assert(x.isEmpty() || !x.isReference());
fMatrix QR;
MakeCompliant(A,QR);
//copy b into x
x.resize(0);
MakeCompliant(b,x);
if(A.m < A.n) { //minimum norm solution
x.resize(A.m);
x.copySubVector(0,b);
}
//solve it
char trans='N';
integer m = A.m;
integer n = A.n;
integer nrhs = 1; //nrhs is 1, because only one vector solved for
integer lda = QR.jstride;
integer ldb = x.n; //ignored, because only one vector solved for
integer info=0;
real worktemp;
integer lwork = -1;
//query workspace size
sgels_(&trans,&m,&n,&nrhs,QR.getStart(),&lda,x.getStart(),&ldb,&worktemp,&lwork,&info);
//do the LS
lwork = (int)worktemp;
real* work = new real[lwork];
sgels_(&trans,&m,&n,&nrhs,QR.getStart(),&lda,x.getStart(),&ldb,&worktemp,&lwork,&info);
delete [] work;
x.n = A.n;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::LeastSquares(const dMatrix& A,const dVector& b,dVector& x)
{
Assert(A.m == b.n);
Assert(x.isEmpty() || !x.isReference());
dMatrix QR;
MakeCompliant(A,QR);
//copy b into x
x.resize(0);
MakeCompliant(b,x);
if(A.m < A.n) { //minimum norm solution
x.resize(A.m);
x.copySubVector(0,b);
}
//solve it
char trans='N';
integer m = A.m;
integer n = A.n;
integer nrhs = 1; //nrhs is 1, because only one vector solved for
integer lda = QR.jstride;
integer ldb = x.n; //ignored, because only one vector solved for
integer info=0;
doublereal worktemp;
integer lwork = -1;
//query workspace size
dgels_(&trans,&m,&n,&nrhs,QR.getStart(),&lda,x.getStart(),&ldb,&worktemp,&lwork,&info);
//do the LS
lwork = (int)worktemp;
doublereal* work = new doublereal[lwork];
dgels_(&trans,&m,&n,&nrhs,QR.getStart(),&lda,x.getStart(),&ldb,&worktemp,&lwork,&info);
delete [] work;
x.n = A.n;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::Eigenvalues_Symmetric(const fMatrix& A,fVector& lambda)
{
Assert(A.isSquare());
fMatrix Atemp;
MakeCompliant(A,Atemp);
fVector wtemp;
wtemp.resize(A.n);
Assert(IsCompliant(wtemp));
//solve it
char job='N'; //only eigenvalues
char uplo='U';
integer n = Atemp.n;
integer lda = Atemp.jstride;
integer info=0;
real worktemp;
integer lwork = -1;
//query workspace size
ssyev_(&job,&uplo,&n,Atemp.getStart(),&lda,wtemp.getStart(),&worktemp,&lwork,&info);
//do the LS
lwork = (int)worktemp;
real* work = new real[lwork];
ssyev_(&job,&uplo,&n,Atemp.getStart(),&lda,wtemp.getStart(),work,&lwork,&info);
delete [] work;
lambda = wtemp;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::Eigenvalues_Symmetric(const dMatrix& A,dVector& lambda)
{
Assert(A.isSquare());
dMatrix Atemp;
MakeCompliant(A,Atemp);
dVector wtemp;
wtemp.resize(A.n);
Assert(IsCompliant(wtemp));
//solve it
char job='N'; //only eigenvalues
char uplo='U';
integer n = Atemp.n;
integer lda = Atemp.jstride;
integer info=0;
doublereal worktemp;
integer lwork = -1;
//query workspace size
dsyev_(&job,&uplo,&n,Atemp.getStart(),&lda,wtemp.getStart(),&worktemp,&lwork,&info);
//do the LS
lwork = (int)worktemp;
doublereal* work = new doublereal[lwork];
dsyev_(&job,&uplo,&n,Atemp.getStart(),&lda,wtemp.getStart(),work,&lwork,&info);
delete [] work;
lambda = wtemp;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::Eigenvectors_Symmetric(const fMatrix& A,fVector& lambda,fMatrix& Q)
{
Assert(A.isSquare());
Assert(Q.isEmpty() || !Q.isRef());
MakeCompliant(A,Q);
fVector wtemp;
wtemp.resize(A.n);
Assert(IsCompliant(wtemp));
//solve it
char job='V'; //eigenvectors+eigenvalues
char uplo='U';
integer n = Q.n;
integer lda = Q.jstride;
integer info=0;
real worktemp;
integer lwork = -1;
//query workspace size
ssyev_(&job,&uplo,&n,Q.getStart(),&lda,wtemp.getStart(),&worktemp,&lwork,&info);
//do the LS
lwork = (int)worktemp;
real* work = new real[lwork];
ssyev_(&job,&uplo,&n,Q.getStart(),&lda,wtemp.getStart(),work,&lwork,&info);
delete [] work;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
lambda = wtemp;
return true;
}
bool LAPACKInterface::Eigenvectors_Symmetric(const dMatrix& A,dVector& lambda,dMatrix& Q)
{
Assert(A.isSquare());
Assert(Q.isEmpty() || !Q.isRef());
MakeCompliant(A,Q);
dVector wtemp;
wtemp.resize(A.n);
Assert(IsCompliant(wtemp));
//solve it
char job='V'; //eigenvectors+eigenvalues
char uplo='U';
integer n = Q.n;
integer lda = Q.jstride;
integer info=0;
doublereal worktemp;
integer lwork = -1;
//query workspace size
dsyev_(&job,&uplo,&n,Q.getStart(),&lda,wtemp.getStart(),&worktemp,&lwork,&info);
Assert(info == 0);
//do the LS
lwork = (int)worktemp;
Assert(lwork > 0);
doublereal* work = new doublereal[lwork];
dsyev_(&job,&uplo,&n,Q.getStart(),&lda,wtemp.getStart(),work,&lwork,&info);
delete [] work;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
lambda = wtemp;
return true;
}
bool LAPACKInterface::SVD(const fMatrix& A,fMatrix& U,fVector& W,fMatrix& Vt)
{
fMatrix Atemp;
MakeCompliant(A,Atemp);
Assert(U.isEmpty() || !U.isRef());
Assert(Vt.isEmpty() || !Vt.isRef());
Assert(W.isEmpty() || !W.isReference());
U.resize(A.m,A.m);
std::swap(U.jstride,U.istride);
Vt.resize(A.n,A.n);
std::swap(Vt.jstride,Vt.istride);
W.resize(Min(A.m,A.n));
Assert(W.stride == 1);
//solve it
char jobu='A'; //all left SV's in U
char jobvt='A'; //all right SV's in Vt
integer m = A.m;
integer n = A.n;
integer lda = Atemp.jstride;
integer ldu = U.jstride;
integer ldvt = Vt.jstride;
integer info=0;
real worktemp;
integer lwork = -1;
//query workspace size
sgesvd_(&jobu,&jobvt,&m,&n,Atemp.getStart(),&lda,W.getStart(),U.getStart(),&ldu,Vt.getStart(),&ldvt,&worktemp,&lwork,&info);
Assert(info == 0);
//do the SVD
lwork = (int)worktemp;
Assert(lwork > 0);
real* work = new real[lwork];
sgesvd_(&jobu,&jobvt,&m,&n,Atemp.getStart(),&lda,W.getStart(),U.getStart(),&ldu,Vt.getStart(),&ldvt,work,&lwork,&info);
delete [] work;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
bool LAPACKInterface::SVD(const dMatrix& A,dMatrix& U,dVector& W,dMatrix& Vt)
{
dMatrix Atemp;
MakeCompliant(A,Atemp);
Assert(U.isEmpty() || !U.isRef());
Assert(Vt.isEmpty() || !Vt.isRef());
Assert(W.isEmpty() || !W.isReference());
U.resize(A.m,A.m);
std::swap(U.jstride,U.istride);
Vt.resize(A.n,A.n);
std::swap(Vt.jstride,Vt.istride);
W.resize(Min(A.m,A.n));
Assert(W.stride == 1);
//solve it
char jobu='A'; //all left SV's in U
char jobvt='A'; //all right SV's in Vt
integer m = A.m;
integer n = A.n;
integer lda = Atemp.jstride;
integer ldu = U.jstride;
integer ldvt = Vt.jstride;
integer info=0;
doublereal worktemp;
integer lwork = -1;
//query workspace size
dgesvd_(&jobu,&jobvt,&m,&n,Atemp.getStart(),&lda,W.getStart(),U.getStart(),&ldu,Vt.getStart(),&ldvt,&worktemp,&lwork,&info);
Assert(info == 0);
//do the LS
lwork = (int)worktemp;
Assert(lwork > 0);
doublereal* work = new doublereal[lwork];
dgesvd_(&jobu,&jobvt,&m,&n,Atemp.getStart(),&lda,W.getStart(),U.getStart(),&ldu,Vt.getStart(),&ldvt,work,&lwork,&info);
delete [] work;
if(info != 0) { //failed somehow
if(info < 0) //input error
FatalError("Uh... info=%d\n",info);
FatalError("Error... info=%d\n",info);
return false;
}
return true;
}
#else
#include <iostream>
using namespace std;
bool LAPACKInterface::Solve(const fMatrix& A,const fVector& b,fVector& x)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::Solve(const dMatrix& A,const dVector& b,dVector& x)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::LeastSquares(const fMatrix& A,const fVector& b,fVector& x)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::LeastSquares(const dMatrix& A,const dVector& b,dVector& x)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::Eigenvalues_Symmetric(const fMatrix& A,fVector& lambda)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::Eigenvalues_Symmetric(const dMatrix& A,dVector& lambda)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::Eigenvectors_Symmetric(const fMatrix& A,fVector& lambda,fMatrix& Q)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::Eigenvectors_Symmetric(const dMatrix& A,dVector& lambda,dMatrix& Q)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::SVD(const fMatrix& A,fMatrix& U,fVector& W,fMatrix& Vt)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
bool LAPACKInterface::SVD(const dMatrix& A,dMatrix& U,dVector& W,dMatrix& Vt)
{
LOG4CXX_ERROR(KrisLibrary::logger(),"Warning, LAPACK not defined");
return false;
}
#endif
| 13,881 | 5,815 |
//需要设置solver里面iter_size=2 ,第一次前向反向传播为正常输入和正常梯度,并记录反传回来的梯度,第二次前向为原输入+梯度干扰,输入list需要在第一次和第二次的时候保持一样。且根据ICLR18cross gradients 相应的loss也要做修改,此时只修改了BIER loss.
#include <vector>
#include "caffe/filler.hpp"
#include "caffe/layers/cross_perturbation_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
void CrossPerturbationLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
CHECK_EQ(bottom.size(), 2);
CHECK_EQ(bottom[0]->count(), bottom[1]->count());
F_iter_size_ = 0;
B_iter_size_ = 0;
}
template <typename Dtype>
void CrossPerturbationLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
top[0]->ReshapeLike(*bottom[0]);
top[1]->ReshapeLike(*bottom[1]);
temp0_.ReshapeLike(*bottom[0]);
temp1_.ReshapeLike(*bottom[1]);
}
template <typename Dtype>
void CrossPerturbationLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
//load cross weights
//static int iter_size = 0;
vector<Dtype> ems;
for(int i = 0; i < this->layer_param_.cross_perturbation_param().ems_size(); i++)
{
ems.push_back(this->layer_param_.cross_perturbation_param().ems(i));
}
//forward propagation
if(F_iter_size_ == 0)
{
for(int i = 0; i < bottom.size(); i++)
caffe_copy(bottom[i]->count(), bottom[i]->cpu_data(), top[i]->mutable_cpu_data());
F_iter_size_ = 1;
}
else
{//fi + ems[i]*gradient(fj)
caffe_cpu_axpby(bottom[0]->count(), Dtype(1), bottom[0]->cpu_data(), Dtype(0), top[0]->mutable_cpu_data());
caffe_cpu_axpby(bottom[1]->count(), Dtype(ems[0]), temp1_.cpu_data(), Dtype(1), top[0]->mutable_cpu_data());
caffe_cpu_axpby(bottom[1]->count(), Dtype(1), bottom[1]->cpu_data(), Dtype(0), top[1]->mutable_cpu_data());
caffe_cpu_axpby(bottom[0]->count(), Dtype(ems[1]), temp0_.cpu_data(), Dtype(1), top[1]->mutable_cpu_data());
F_iter_size_ = 0;
}
}
template <typename Dtype>
void CrossPerturbationLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down,
const vector<Blob<Dtype>*>& bottom) {
//static int iter_size = 0;
if(B_iter_size_ == 0)
{
for(int i = 0; i < bottom.size(); i++)
{
//propagate gradients
caffe_copy(bottom[i]->count(), top[i]->cpu_diff(), bottom[i]->mutable_cpu_diff());
}
//store gradients
caffe_copy(bottom[0]->count(), top[0]->cpu_diff(), temp0_.mutable_cpu_data());
caffe_copy(bottom[1]->count(), top[1]->cpu_diff(), temp1_.mutable_cpu_data());
B_iter_size_ = 1;
}
else
{
for(int i = 0; i < bottom.size(); i++)
{
//propagate gradients
caffe_set(bottom[i]->count(), Dtype(0), bottom[i]->mutable_cpu_diff());
}
B_iter_size_ = 0;
}
}
#ifdef CPU_ONLY
STUB_GPU(CrossPerturbationLayer);
#endif
INSTANTIATE_CLASS(CrossPerturbationLayer);
REGISTER_LAYER_CLASS(CrossPerturbation);
} // namespace caffe
| 3,198 | 1,268 |
//----------------------------------------------------
// file: SceneUtil.cpp
//----------------------------------------------------
#include "stdafx.h"
#pragma hdrstop
#include "Scene.h"
#include "ELight.h"
#include "SceneObject.h"
#include "ui_leveltools.h"
//----------------------------------------------------
CCustomObject* EScene::FindObjectByName( LPCSTR name, ObjClassID classfilter )
{
if(!name)
return NULL;
CCustomObject* object = 0;
if (classfilter==OBJCLASS_DUMMY)
{
SceneToolsMapPairIt _I = m_SceneTools.begin();
SceneToolsMapPairIt _E = m_SceneTools.end();
for (; _I!=_E; ++_I)
{
ESceneCustomOTool* mt = dynamic_cast<ESceneCustomOTool*>(_I->second);
if (mt&&(0!=(object=mt->FindObjectByName(name))))
return object;
}
}else{
ESceneCustomOTool* mt = GetOTool(classfilter); VERIFY(mt);
if (mt&&(0!=(object=mt->FindObjectByName(name)))) return object;
}
return object;
}
CCustomObject* EScene::FindObjectByName( LPCSTR name, CCustomObject* pass_object )
{
CCustomObject* object = 0;
SceneToolsMapPairIt _I = m_SceneTools.begin();
SceneToolsMapPairIt _E = m_SceneTools.end();
for (; _I!=_E; _I++){
ESceneCustomOTool* mt = dynamic_cast<ESceneCustomOTool*>(_I->second);
if (mt&&(0!=(object=mt->FindObjectByName(name,pass_object)))) return object;
}
return 0;
}
bool EScene::FindDuplicateName()
{
// find duplicate name
SceneToolsMapPairIt _I = m_SceneTools.begin();
SceneToolsMapPairIt _E = m_SceneTools.end();
for (; _I!=_E; _I++){
ESceneCustomOTool* mt = dynamic_cast<ESceneCustomOTool*>(_I->second);
if (mt){
ObjectList& lst = mt->GetObjects();
for(ObjectIt _F = lst.begin();_F!=lst.end();_F++)
if (FindObjectByName((*_F)->Name, *_F)){
ELog.DlgMsg(mtError,"Duplicate object name already exists: '%s'",(*_F)->Name);
return true;
}
}
}
return false;
}
void EScene::GenObjectName( ObjClassID cls_id, char *buffer, const char* pref )
{
ESceneCustomOTool* ot = GetOTool(cls_id); VERIFY(ot);
AnsiString result = FHelper.GenerateName(pref&&pref[0]?pref:ot->ClassName(),4,fastdelegate::bind<TFindObjectByName>(this,&EScene::FindObjectByNameCB),true,true);
strcpy (buffer,result.c_str());
}
//------------------------------------------------------------------------------
| 2,573 | 876 |
/*=============================================================================
Copyright (c) 2009 Hartmut Kaiser
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)
==============================================================================*/
#if !defined(BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM)
#define BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM
#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/support/config.hpp>
namespace boost {
namespace fusion {
struct nview_iterator_tag;
template <typename Sequence, typename Pos> struct nview_iterator;
namespace extension {
template <typename Tag> struct value_of_impl;
template <> struct value_of_impl<nview_iterator_tag> {
template <typename Iterator> struct apply {
typedef typename Iterator::first_type first_type;
typedef typename Iterator::sequence_type sequence_type;
typedef typename result_of::deref<first_type>::type index;
typedef typename result_of::at<typename sequence_type::sequence_type,
index>::type type;
};
};
} // namespace extension
} // namespace fusion
} // namespace boost
#endif
| 1,308 | 407 |
#include <iostream>
#include <thread>
#include <map>
#include <string>
#include <mutex>
#include <shared_mutex>
#include <string>
//void myprint(const int &i, const std::string &mybuf)
void myprint(const int &i, char* mybuf)
{
//below print shows that address of i is not the same as one in the main function
//which later proves that reference variable `i` is copied when calling std::thread
std::cout<<"address of i inside function is: "<<&i<<"\n";
std::cout<<"char array address in function is: "<<&mybuf<<"\n";
std::cout<<i<<std::endl;
std::cout<<mybuf<<std::endl;
}
int main()
{
int myvar = 1;
std::cout<<"address of myvar inside main is: "<<&myvar<<"\n";
int &var = myvar;
std::cout<<"reference of myvar address is: "<<&var<<"\n";
char mybuf[] = "this is a test!";
//char* mybuf = (char*)"this is a test!";
std::cout<<"char array address in main is: "<<&mybuf<<"\n";
std::thread myobj(myprint, myvar, mybuf);
//if args in function is `const std::string`, there could be possible chance that
//main thread is finished while mybuf is not converted yet
//adding std::string() could prevent this case
//std::thread myobj(myprint, myvar, std::string(mybuf));
myobj.join();
//myobj.detach();
std::cout<<"this is thread basic testing"<<std::endl;
return 0;
}
| 1,350 | 450 |
#include <iostream>
using namespace std;
int main() {
const int SCORES_SIZE = 4;
int bonusScores[SCORES_SIZE];
int i;
for (i = 0; i < SCORES_SIZE; ++i) {
cin >> bonusScores[i];
}
// Set all indexed values to itself plus the next value except for the last element
for (i = 0; i < SCORES_SIZE; ++i) {
if (i == SCORES_SIZE - 1) {
bonusScores[i] = bonusScores[i];
} else {
bonusScores[i] = bonusScores[i] + bonusScores[i + 1];
}
}
for (i = 0; i < SCORES_SIZE; ++i) {
cout << bonusScores[i] << " ";
}
cout << endl;
return 0;
}
| 612 | 246 |
#include <cpplib/stdinc.hpp>
int32_t main(){
desync();
int acc = 0;
char last = 0;
string s;
cin >> s;
for(char c:s){
if(c != last)
acc = 0;
acc++;
if(acc == 3){
cout << (c == 'C'? 'P' : 'T');
acc = 0;
}
else
cout << (c == 'C'? 'B' : 'D');
last = c;
}
cout << endl;
return 0;
}
| 411 | 163 |
// Copyright 2016 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 "components/offline_pages/core/background/request_queue.h"
#include <utility>
#include "base/bind.h"
#include "base/location.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/offline_pages/core/background/add_request_task.h"
#include "components/offline_pages/core/background/change_requests_state_task.h"
#include "components/offline_pages/core/background/get_requests_task.h"
#include "components/offline_pages/core/background/initialize_store_task.h"
#include "components/offline_pages/core/background/mark_attempt_aborted_task.h"
#include "components/offline_pages/core/background/mark_attempt_completed_task.h"
#include "components/offline_pages/core/background/mark_attempt_started_task.h"
#include "components/offline_pages/core/background/pick_request_task.h"
#include "components/offline_pages/core/background/reconcile_task.h"
#include "components/offline_pages/core/background/remove_requests_task.h"
#include "components/offline_pages/core/background/request_queue_store.h"
#include "components/offline_pages/core/background/save_page_request.h"
namespace offline_pages {
namespace {
// Completes the get requests call.
void GetRequestsDone(RequestQueue::GetRequestsCallback callback,
bool success,
std::vector<std::unique_ptr<SavePageRequest>> requests) {
GetRequestsResult result =
success ? GetRequestsResult::SUCCESS : GetRequestsResult::STORE_FAILURE;
std::move(callback).Run(result, std::move(requests));
}
// Completes the add request call.
void AddRequestDone(RequestQueue::AddRequestCallback callback,
const SavePageRequest& request,
ItemActionStatus status) {
AddRequestResult result;
switch (status) {
case ItemActionStatus::SUCCESS:
result = AddRequestResult::SUCCESS;
break;
case ItemActionStatus::ALREADY_EXISTS:
result = AddRequestResult::ALREADY_EXISTS;
break;
case ItemActionStatus::STORE_ERROR:
result = AddRequestResult::STORE_FAILURE;
break;
case ItemActionStatus::NOT_FOUND:
default:
NOTREACHED();
return;
}
std::move(callback).Run(result, request);
}
} // namespace
RequestQueue::RequestQueue(std::unique_ptr<RequestQueueStore> store)
: store_(std::move(store)), task_queue_(this), weak_ptr_factory_(this) {
Initialize();
}
RequestQueue::~RequestQueue() {}
void RequestQueue::OnTaskQueueIsIdle() {}
void RequestQueue::GetRequests(GetRequestsCallback callback) {
std::unique_ptr<Task> task(new GetRequestsTask(
store_.get(), base::BindOnce(&GetRequestsDone, std::move(callback))));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::AddRequest(const SavePageRequest& request,
AddRequestCallback callback) {
std::unique_ptr<AddRequestTask> task(new AddRequestTask(
store_.get(), request,
base::BindOnce(&AddRequestDone, std::move(callback), request)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::RemoveRequests(const std::vector<int64_t>& request_ids,
UpdateCallback callback) {
std::unique_ptr<Task> task(
new RemoveRequestsTask(store_.get(), request_ids, std::move(callback)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::ChangeRequestsState(
const std::vector<int64_t>& request_ids,
const SavePageRequest::RequestState new_state,
UpdateCallback callback) {
std::unique_ptr<Task> task(new ChangeRequestsStateTask(
store_.get(), request_ids, new_state, std::move(callback)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::MarkAttemptStarted(int64_t request_id,
UpdateCallback callback) {
std::unique_ptr<Task> task(new MarkAttemptStartedTask(
store_.get(), request_id, std::move(callback)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::MarkAttemptAborted(int64_t request_id,
UpdateCallback callback) {
std::unique_ptr<Task> task(new MarkAttemptAbortedTask(
store_.get(), request_id, std::move(callback)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::MarkAttemptCompleted(int64_t request_id,
FailState fail_state,
UpdateCallback callback) {
std::unique_ptr<Task> task(new MarkAttemptCompletedTask(
store_.get(), request_id, fail_state, std::move(callback)));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::PickNextRequest(
OfflinerPolicy* policy,
PickRequestTask::RequestPickedCallback picked_callback,
PickRequestTask::RequestNotPickedCallback not_picked_callback,
PickRequestTask::RequestCountCallback request_count_callback,
DeviceConditions& conditions,
std::set<int64_t>& disabled_requests,
base::circular_deque<int64_t>& prioritized_requests) {
// Using the PickerContext, create a picker task.
std::unique_ptr<Task> task(new PickRequestTask(
store_.get(), policy, std::move(picked_callback),
std::move(not_picked_callback), std::move(request_count_callback),
conditions, disabled_requests, prioritized_requests));
// Queue up the picking task, it will call one of the callbacks when it
// completes.
task_queue_.AddTask(std::move(task));
}
void RequestQueue::ReconcileRequests(UpdateCallback callback) {
std::unique_ptr<Task> task(
new ReconcileTask(store_.get(), std::move(callback)));
// Queue up the reconcile task.
task_queue_.AddTask(std::move(task));
}
void RequestQueue::CleanupRequestQueue() {
// Create a cleanup task.
std::unique_ptr<Task> task(cleanup_factory_->CreateCleanupTask(store_.get()));
// Queue up the cleanup task.
task_queue_.AddTask(std::move(task));
}
void RequestQueue::Initialize() {
std::unique_ptr<Task> task(new InitializeStoreTask(
store_.get(), base::BindOnce(&RequestQueue::InitializeStoreDone,
weak_ptr_factory_.GetWeakPtr())));
task_queue_.AddTask(std::move(task));
}
void RequestQueue::InitializeStoreDone(bool success) {
// TODO(fgorski): Result can be ignored for now. Report UMA in future.
// No need to pass the result up to RequestCoordinator.
}
} // namespace offline_pages
| 6,486 | 1,962 |
// 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);
}
| 1,438 | 460 |
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;
} | 158 | 75 |
/**
* 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
| 5,122 | 1,706 |
#include <iostream>
#include <string.h>
#include <queue>
#include <fstream>
using namespace std;
int N, s,t;
const int MAXN=100;
int matrix[MAXN][MAXN];
bool bfs(int parent[])
{
bool visit[N];
memset(visit, 0, sizeof(visit));
queue <int> q;
q.push(s);
visit[s] = true;
parent[s] = -1;
while (!q.empty())
{
int i = q.front();
q.pop();
for (int j=0; j<N; j++)
{
if (visit[j]!= true&& matrix[i][j]!=0)
{
q.push(j);
parent[j] = i;
visit[j] = true;
}
}
}
if(visit[t] == true)
return true;
else return false;
}
int Ford_Fulkerson()
{
int parent[N];
int max_flow = 0;
while (bfs(parent)== true)
{
for (int v=t; v != s; v=parent[v])
{
int u = parent[v];
matrix[u][v] -= 1;
matrix[v][u] += 1;
}
max_flow++;
}
return max_flow;
}
int main()
{
ofstream fout("output.out");
ifstream fin("input.in");
int n, m;
fin>>n>>m;
N=n;
int buf;
for(int i=0; i<n; i++)
{
fin>>buf;
while (buf!=0)
{
matrix[i][buf-1]=1;
fin>>buf;
}
}
fin>>s>>t;
--s; --t;
fout<<Ford_Fulkerson();
return 0;
} | 1,427 | 549 |
/*
* 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;
| 9,116 | 3,458 |
//==================================================================================================
// 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
| 2,112 | 741 |
#include <camera/COrbitCamera.h>
namespace engine
{
std::string ToString( const eOrbitCameraState& state )
{
/**/ if ( state == eOrbitCameraState::IDLE ) return "idle";
else if ( state == eOrbitCameraState::DRAGGING ) return "dragging";
else if ( state == eOrbitCameraState::MOVING_TARGET ) return "moving_target";
ENGINE_CORE_CRITICAL( "Invalid orbit-camera state" );
return "undefined";
}
COrbitCamera::COrbitCamera( const std::string& name,
const CVec3& position,
const CVec3& target_point,
const eAxis& up_axis,
const CCameraProjData& proj_data,
float move_sensitivity,
float zoom_sensitivity )
: CICamera( name, position, target_point, up_axis, proj_data )
{
m_Type = eCameraType::ORBIT;
m_TargetPoint0 = m_TargetPoint;
m_MoveSensitivity = move_sensitivity;
m_ZoomSensitivity = zoom_sensitivity;
_ComputeSphericalsFromPosition();
_UpdateCameraVectors();
_BuildViewMatrix();
}
void COrbitCamera::_PositionChangedInternal()
{
_ComputeSphericalsFromPosition();
_UpdateCameraVectors();
_BuildViewMatrix();
}
void COrbitCamera::_TargetPointChangedInternal()
{
_ComputeSphericalsFromPosition();
_UpdateCameraVectors();
_BuildViewMatrix();
}
void COrbitCamera::_UpdateInternal()
{
if ( !m_Active )
return;
if ( m_State == eOrbitCameraState::IDLE )
{
if ( CInputManager::IsMouseDown( Mouse::BUTTON_LEFT ) )
{
m_State = eOrbitCameraState::DRAGGING;
m_Cursor0 = CInputManager::GetCursorPosition();
m_Cursor = CInputManager::GetCursorPosition();
m_Phi0 = m_Phi;
m_Theta0 = m_Theta;
}
else if ( CInputManager::IsMouseDown( Mouse::BUTTON_RIGHT ) )
{
m_State = eOrbitCameraState::MOVING_TARGET;
m_Cursor0 = CInputManager::GetCursorPosition();
m_Cursor = CInputManager::GetCursorPosition();
m_TargetPoint0 = m_TargetPoint;
}
}
else if ( m_State == eOrbitCameraState::DRAGGING )
{
m_Cursor = CInputManager::GetCursorPosition();
float _dx = m_Cursor.x() - m_Cursor0.x();
float _dy = m_Cursor.y() - m_Cursor0.y();
float _dtheta = ( -_dx / m_ProjData.viewportWidth ) * 2.0f * engine::PI;
float _dphi = ( -_dy / m_ProjData.viewportHeight ) * engine::PI;
m_Theta = m_Theta0 + _dtheta;
m_Phi = m_Phi0 + _dphi;
if ( !CInputManager::IsMouseDown( Mouse::BUTTON_LEFT ) )
m_State = eOrbitCameraState::IDLE;
}
else if ( m_State == eOrbitCameraState::MOVING_TARGET )
{
m_Cursor = CInputManager::GetCursorPosition();
float _dx = -( m_Cursor.x() - m_Cursor0.x() );
float _dy = m_Cursor.y() - m_Cursor0.y();
m_TargetPoint.x() = m_TargetPoint0.x() + ( m_Right.x() * _dx + m_Up.x() * _dy ) * m_MoveSensitivity;
m_TargetPoint.y() = m_TargetPoint0.y() + ( m_Right.y() * _dx + m_Up.y() * _dy ) * m_MoveSensitivity;
m_TargetPoint.z() = m_TargetPoint0.z();
if ( !CInputManager::IsMouseDown( Mouse::BUTTON_RIGHT ) )
m_State = eOrbitCameraState::IDLE;
}
m_Rho = m_Rho0 + ( m_ZoomSensitivity * CInputManager::GetScrollAccumValueY() ) * 0.25f;
_ComputePositionFromSphericals();
_UpdateCameraVectors();
_BuildViewMatrix();
}
std::string COrbitCamera::_ToStringInternal() const
{
std::string strrep;
strrep += "state : " + engine::ToString( m_State ) + "\n\r";
strrep += "front : " + engine::toString( m_Front ) + "\n\r";
strrep += "right : " + engine::toString( m_Right ) + "\n\r";
strrep += "up : " + engine::toString( m_Up ) + "\n\r";
strrep += "rho : " + std::to_string( m_Rho ) + "\n\r";
strrep += "rho0 : " + std::to_string( m_Rho0 ) + "\n\r";
strrep += "phi : " + std::to_string( m_Phi ) + "\n\r";
strrep += "phi0 : " + std::to_string( m_Phi ) + "\n\r";
strrep += "theta : " + std::to_string( m_Theta ) + "\n\r";
strrep += "theta0 : " + std::to_string( m_Theta0 ) + "\n\r";
strrep += "r : " + engine::toString( m_Radial ) + "\n\r";
return strrep;
}
void COrbitCamera::_ComputeSphericalsFromPosition()
{
m_Radial = m_Position - m_TargetPoint;
m_Rho0 = m_Rho = m_Radial.length();
if ( m_UpAxis == eAxis::X )
{
m_Phi0 = m_Phi = std::acos( m_Radial.x() / m_Rho0 );
m_Theta0 = m_Theta = std::atan2( m_Radial.z(), m_Radial.y() );
}
else if ( m_UpAxis == eAxis::Y )
{
m_Phi0 = m_Phi = std::acos( m_Radial.y() / m_Rho0 );
m_Theta0 = m_Theta = std::atan2( m_Radial.x(), m_Radial.z() );
}
else if ( m_UpAxis == eAxis::Z )
{
m_Phi0 = m_Phi = std::acos( m_Radial.z() / m_Rho0 );
m_Theta0 = m_Theta = std::atan2( m_Radial.y(), m_Radial.x() );
}
}
void COrbitCamera::_ComputePositionFromSphericals()
{
const float _sphi = std::sin( m_Phi );
const float _cphi = std::cos( m_Phi );
const float _stheta = std::sin( m_Theta );
const float _ctheta = std::cos( m_Theta );
if ( m_UpAxis == eAxis::X )
{
m_Radial.x() = m_Rho * _cphi;
m_Radial.y() = m_Rho * _sphi * _ctheta;
m_Radial.z() = m_Rho * _sphi * _stheta;
}
else if ( m_UpAxis == eAxis::Y )
{
m_Radial.x() = m_Rho * _sphi * _stheta;
m_Radial.y() = m_Rho * _cphi;
m_Radial.z() = m_Rho * _sphi * _ctheta;
}
else if ( m_UpAxis == eAxis::Z )
{
m_Radial.x() = m_Rho * _sphi * _ctheta;
m_Radial.y() = m_Rho * _sphi * _stheta;
m_Radial.z() = m_Rho * _cphi;
}
m_Position = m_TargetPoint + m_Radial;
}
void COrbitCamera::_UpdateCameraVectors()
{
m_Front = ( m_TargetPoint - m_Position ).normalized();
m_Right = tinymath::cross( m_Front, m_WorldUp ).normalized();
m_Up = tinymath::cross( m_Right, m_Front ).normalized();
}
}
| 6,696 | 2,312 |
#include "parser.h"
#include "exception.h"
#include "struct.h"
#include "util.h"
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <fstream>
using namespace Ishlang;
// -------------------------------------------------------------
Parser::Parser()
: lexer_()
{
initAppFtns();
}
// -------------------------------------------------------------
CodeNode::SharedPtr Parser::read(const std::string &expr) {
lexer_.read(expr);
return readExpr();
}
// -------------------------------------------------------------
CodeNode::SharedPtr Parser::readLiteral(const std::string &expr) {
const auto tokTyp = Lexer::tokenType(expr);
switch (tokTyp) {
case Lexer::Char:
case Lexer::String:
case Lexer::Int:
case Lexer::Real:
case Lexer::Bool:
case Lexer::Null:
return makeLiteral(tokTyp, expr);
default:
break;
}
return std::make_shared<Literal>(Value(expr));
}
// -------------------------------------------------------------
void Parser::readMulti(const std::string &expr, CallBack callback) {
lexer_.read(expr);
while (!lexer_.empty()) {
if (!haveSExpression()) {
return;
}
auto code = readExpr();
if (code.get()) {
callback(code);
}
}
}
// -------------------------------------------------------------
void Parser::readFile(const std::string &filename, CallBack callback) {
std::ifstream ifs(filename.c_str());
if (!ifs.is_open()) {
throw UnknownFile(filename);
}
unsigned lineNo = 0;
try {
std::string line;
while (std::getline(ifs, line)) {
++lineNo;
readMulti(line, callback);
}
if (hasIncompleteExpr()) {
clearIncompleteExpr();
throw IncompleteExpression("Incomplete code at end of file " + filename);
}
ifs.close();
}
catch (Exception &ex) {
ifs.close();
ex.setFileContext(filename, lineNo);
throw;
}
catch (...) {
ifs.close();
throw;
}
}
// -------------------------------------------------------------
CodeNode::SharedPtr Parser::readExpr() {
while (!lexer_.empty()) {
if (!haveSExpression()) {
return CodeNode::SharedPtr();
}
auto token = lexer_.next();
if (!token.text.empty()) {
switch (token.type) {
case Lexer::LeftP:
return readApp();
case Lexer::RightP:
return CodeNode::SharedPtr();
case Lexer::Char:
case Lexer::String:
case Lexer::Int:
case Lexer::Real:
case Lexer::Bool:
case Lexer::Null:
return makeLiteral(token.type, token.text);
case Lexer::Symbol:
return std::make_shared<Variable>(token.text);
case Lexer::Unknown:
throw UnknownTokenType(token.text, static_cast<char>(token.type));
break;
}
}
}
return std::make_shared<Literal>(Value::Null);
}
// -------------------------------------------------------------
CodeNode::SharedPtr Parser::makeLiteral(Lexer::TokenType type, const std::string &text) {
switch (type) {
case Lexer::Char:
return std::make_shared<Literal>(Value(text[1]));
case Lexer::String:
return std::make_shared<Literal>(Value(std::string(text.c_str() + 1, text.size() - 2)));
case Lexer::Int:
return std::make_shared<Literal>(Value(Value::Long(std::stoll(text, 0, 10))));
case Lexer::Real:
return std::make_shared<Literal>(Value(std::stod(text, 0)));
case Lexer::Bool:
return std::make_shared<Literal>((Value(Value::Bool(text == "true"))));
default:
break;
}
return std::make_shared<Literal>(Value::Null);
}
// -------------------------------------------------------------
CodeNode::SharedPtr Parser::readApp(const std::string &expected) {
if (!lexer_.empty()) {
auto token = lexer_.next();
if (!token.text.empty()) {
if (!expected.empty() && token.text != expected) {
throw UnexpectedExpression("lambda", token.text);
}
auto iter = appFtns_.find(token.text);
if (iter != appFtns_.end()) {
return iter->second();
}
else {
if (token.type == Lexer::Symbol) {
const auto & name(token.text);
auto args(readExprList());
return std::make_shared<FunctionApp>(name, args);
}
else {
throw UnknownSymbol(token.text);
}
}
}
}
return std::make_shared<Literal>(Value::Null);
}
// -------------------------------------------------------------
CodeNode::SharedPtrList Parser::readExprList() {
CodeNode::SharedPtrList forms;
auto form = readExpr();
while (form.get()) {
forms.push_back(form);
form = readExpr();
}
return forms;
}
// -------------------------------------------------------------
CodeNode::SharedPtrList Parser::readAndCheckExprList(const char *name, std::size_t expectedSize) {
auto exprs(readExprList());
if (exprs.size() != expectedSize) {
throw TooManyOrFewForms(name);
}
return exprs;
}
// -------------------------------------------------------------
CodeNode::SharedPtrList Parser::readAndCheckRangeExprList(const char *name, std::size_t minExpectedSize, std::size_t maxExpectedSize) {
auto exprs(readExprList());
if (exprs.size() < minExpectedSize || exprs.size() > maxExpectedSize) {
throw TooManyOrFewForms(name);
}
return exprs;
}
// -------------------------------------------------------------
CodeNode::SharedPtrPairs Parser::readExprPairs() {
CodeNode::SharedPtrPairs pairs;
CodeNode::SharedPtrPair cons;
ignoreLeftP(false);
cons.first = readExpr();
cons.second = readExpr();
ignoreRightP();
while (cons.first.get() && cons.second.get()) {
pairs.push_back(cons);
if (ignoreLeftP(true)) { break; }
cons.first = readExpr();
cons.second = readExpr();
ignoreRightP();
}
return pairs;
}
// -------------------------------------------------------------
CodeNode::NameSharedPtrs Parser::readNameExprPairs() {
CodeNode::NameSharedPtrs nameExprs;
std::pair<std::string, CodeNode::SharedPtr> cons;
bool rpseen = false;
if (lexer_.peek().type == Lexer::LeftP) {
ignoreLeftP(false);
cons.first = readName();
cons.second = readExpr();
ignoreRightP();
while (cons.second.get()) {
nameExprs.push_back(cons);
if (ignoreLeftP(true)) {
rpseen = true;
break;
}
cons.first = readName();
cons.second = readExpr();
ignoreRightP();
}
}
if (!rpseen && lexer_.peek().type == Lexer::RightP) {
ignoreRightP();
}
return nameExprs;
}
// -------------------------------------------------------------
std::string Parser::readName() {
auto nameToken = lexer_.next();
if (nameToken.type != Lexer::Symbol) {
throw UnexpectedExpression("name", nameToken.text);
}
return nameToken.text;
}
// -------------------------------------------------------------
CodeNode::NameAndAsList Parser::readNameAndAsList() {
// Parse following format: "name [as asName] [name [as asName]]*"
// Examples:
// 1) foo
// 2) foo as bar
// 3) one two
// 4) one as single two as double
// 5) one two foo as bar
CodeNode::NameAndAsList nameAndAsList;
auto getNext =
[this]() {
auto token = lexer_.next();
if (token.type != Lexer::Symbol) {
throw UnexpectedTokenType(token.text, token.type, "name/as list");
}
return token;
};
auto name = getNext();
while (name.type != Lexer::RightP) {
if (name.text == "as") {
throw InvalidExpression("Misformed name/as list");
}
auto maybeAs = lexer_.next();
if (maybeAs.text == "as") {
auto asName = getNext();
nameAndAsList.emplace_back(name.text, asName.text);
name = lexer_.next();
}
else {
nameAndAsList.emplace_back(name.text, std::nullopt);
name = maybeAs;
}
}
return nameAndAsList;
}
// -------------------------------------------------------------
CodeNode::ParamList Parser::readParams() {
CodeNode::ParamList params;
auto token = lexer_.next();
if (token.type != Lexer::LeftP) {
throw InvalidExpression("Expecting ( beginning of param list");
}
token = lexer_.next();
while (token.type != Lexer::RightP) {
if (token.type != Lexer::Symbol) {
throw UnexpectedTokenType(token.text, token.type, "paramList");
}
params.push_back(std::move(token.text));
token = lexer_.next();
}
return params;
}
// -------------------------------------------------------------
bool Parser::ignoreLeftP(bool allowRightP) {
auto token = lexer_.next();
if (token.type == Lexer::RightP && allowRightP) { return true; }
if (token.type != Lexer::LeftP) {
throw ExpectedParenthesis('(');
}
return false;
}
// -------------------------------------------------------------
void Parser::ignoreRightP() {
if (lexer_.next().type != Lexer::RightP) {
throw ExpectedParenthesis(')');
}
}
// -------------------------------------------------------------
bool Parser::haveSExpression() const {
size_t openParenthesis = 0;
for (auto iter = lexer_.cbegin(); iter != lexer_.cend(); ++iter) {
const auto & token = *iter;
if (token.type == Lexer::LeftP) {
++openParenthesis;
}
else if (token.type == Lexer::RightP) {
if (openParenthesis > 0) {
--openParenthesis;
}
}
if (openParenthesis == 0) {
return true;
}
}
return openParenthesis == 0;
}
// -------------------------------------------------------------
void Parser::initAppFtns() {
appFtns_ = {
{ "import",
[this]() {
const auto nameAndAsList = readNameAndAsList();
if (nameAndAsList.size() == 1) {
return std::make_shared<ImportModule>(nameAndAsList[0].first,
nameAndAsList[0].second ? *nameAndAsList[0].second : "");
}
else {
throw InvalidExpression("Misformed import");
}
}
},
{ "from",
[this]() {
const auto name = readName();
const auto import = readName();
if (import != "import") {
throw InvalidExpression("Misformed from/import");
}
const auto nameAndAsList = readNameAndAsList();
if (nameAndAsList.size() > 0) {
return std::make_shared<FromModuleImport>(name, nameAndAsList);
}
else {
throw InvalidExpression("Misformed from/import");
}
}
},
{ "var",
[this]() {
const auto name(readName());
auto expr(readAndCheckExprList("var", 1));
return std::make_shared<Define>(name, expr[0]);
}
},
{ "=",
[this]() {
const auto name(readName());
auto expr(readAndCheckExprList("=", 1));
return std::make_shared<Assign>(name, expr[0]);
}
},
{ "?",
[this]() {
const auto name(readName());
ignoreRightP();
return std::make_shared<Exists>(name);
}
},
{ "clone",
[this]() {
auto expr(readAndCheckExprList("clone", 1));
return std::make_shared<Clone>(expr[0]);
}
},
{ "+", MakeBinaryExpression<ArithOp, ArithOp::Type>("+", *this, ArithOp::Add) },
{ "-", MakeBinaryExpression<ArithOp, ArithOp::Type>("-", *this, ArithOp::Sub) },
{ "*", MakeBinaryExpression<ArithOp, ArithOp::Type>("*", *this, ArithOp::Mul) },
{ "/", MakeBinaryExpression<ArithOp, ArithOp::Type>("/", *this, ArithOp::Div) },
{ "%", MakeBinaryExpression<ArithOp, ArithOp::Type>("%", *this, ArithOp::Mod) },
{ "^", MakeBinaryExpression<ArithOp, ArithOp::Type>("^", *this, ArithOp::Pow) },
{ "==", MakeBinaryExpression<CompOp, CompOp::Type>("==", *this, CompOp::EQ) },
{ "!=", MakeBinaryExpression<CompOp, CompOp::Type>("!=", *this, CompOp::NE) },
{ "<", MakeBinaryExpression<CompOp, CompOp::Type>("<", *this, CompOp::LT) },
{ ">", MakeBinaryExpression<CompOp, CompOp::Type>("<", *this, CompOp::GT) },
{ "<=", MakeBinaryExpression<CompOp, CompOp::Type>("<=", *this, CompOp::LE) },
{ ">=", MakeBinaryExpression<CompOp, CompOp::Type>(">=", *this, CompOp::GE) },
{ "and", MakeBinaryExpression<LogicOp, LogicOp::Type>("and", *this, LogicOp::Conjunction) },
{ "or", MakeBinaryExpression<LogicOp, LogicOp::Type>("or", *this, LogicOp::Disjunction) },
{ "not",
[this]() {
auto expr(readAndCheckExprList("not", 1));
return std::make_shared<Not>(expr[0]);
}
},
{ "neg",
[this]() {
auto expr(readAndCheckExprList("neg", 1));
return std::make_shared<NegativeOf>(expr[0]);
}
},
{ "progn",
[this]() {
auto exprs(readExprList());
return std::make_shared<ProgN>(exprs);
}
},
{ "block",
[this]() {
auto exprs(readExprList());
return std::make_shared<Block>(exprs);
}
},
{ "if",
[this]() {
auto exprs(readExprList());
if (exprs.size() == 2) {
return std::make_shared<If>(exprs[0], exprs[1]);
}
else if (exprs.size() == 3) {
return std::make_shared<If>(exprs[0], exprs[1], exprs[2]);
}
else {
throw TooManyOrFewForms("if");
}
}
},
{ "when",
[this]() {
auto exprs(readAndCheckExprList("when", 2));
return std::make_shared<If>(exprs[0], exprs[1]);
}
},
{ "unless",
[this]() {
auto exprs(readAndCheckExprList("unless", 2));
return std::make_shared<If>(std::make_shared<Not>(exprs[0]), exprs[1]);
}
},
{ "cond",
[this]() {
auto pairs(readExprPairs());
return std::make_shared<Cond>(pairs);
}
},
{ "break",
[this]() {
ignoreRightP();
return std::make_shared<Break>();
}
},
{ "loop",
[this]() {
auto forms(readExprList());
if (forms.size() == 4) {
auto iter = forms.begin();
auto decl(*iter++);
auto cond(*iter++);
auto next(*iter++);
auto body(*iter++);
return std::make_shared<Loop>(decl, cond, next, body);
}
else if (forms.size() == 2) {
auto iter = forms.begin();
auto cond(*iter++);
auto body(*iter++);
return std::make_shared<Loop>(cond, body);
}
else {
throw TooManyOrFewForms("loop");
}
}
},
{ "lambda",
[this]() {
auto params(readParams());
auto exprs(readExprList());
auto body(exprs.size() == 1
? exprs[0]
: std::make_shared<ProgN>(exprs));
return std::make_shared<LambdaExpr>(params, body);
}
},
{ "defun",
[this]() {
const auto name(readName());
auto params(readParams());
auto exprs(readExprList());
auto body(exprs.size() == 1
? exprs[0]
: std::make_shared<ProgN>(exprs));
return std::make_shared<FunctionExpr>(name, params, body);
}
},
{ "(",
[this]() {
auto lambda(readApp("lambda"));
auto args(readExprList());
return std::make_shared<LambdaApp>(lambda, args);
}
},
{ "istypeof",
[this]() {
auto form(readExpr());
auto type(Value::stringToType(readName()));
ignoreRightP();
return std::make_shared<IsType>(form, type);
}
},
{ "typename",
[this]() {
auto exprs(readAndCheckExprList("typename", 1));
return std::make_shared<TypeName>(exprs[0]);
}
},
{ "astype",
[this]() {
auto form(readExpr());
auto type(Value::stringToType(readName()));
ignoreRightP();
return std::make_shared<AsType>(form, type);
}
},
{ "print",
[this]() {
auto exprs(readAndCheckExprList("print", 1));
return std::make_shared<Print>(false, exprs[0]);
}
},
{ "println",
[this]() {
auto exprs(readAndCheckExprList("println", 1));
return std::make_shared<Print>(true, exprs[0]);
}
},
{ "read",
[this]() {
ignoreRightP();
return std::make_shared<Read>();
}
},
{ "struct",
[this]() {
const auto name(readName());
const auto members(readParams());
ignoreRightP();
return std::make_shared<StructExpr>(name, members);
}
},
{ "isstructname",
[this]() {
auto snExpr(readExpr());
const auto name(readName());
ignoreRightP();
return std::make_shared<IsStructName>(snExpr, name);
}
},
{ "structname",
[this]() {
auto exprs(readAndCheckExprList("structname", 1));
return std::make_shared<StructName>(exprs[0]);
}
},
{ "makeinstance",
[this]() {
const auto name(readName());
const auto initArgs = readNameExprPairs();
return std::make_shared<MakeInstance>(name, initArgs);
}
},
{ "isinstanceof",
[this]() {
auto ioExpr(readExpr());
const auto name(readName());
ignoreRightP();
return std::make_shared<IsInstanceOf>(ioExpr, name);
}
},
{ "memget",
[this]() {
auto instExpr(readExpr());
const auto name(readName());
ignoreRightP();
return std::make_shared<GetMember>(instExpr, name);
}
},
{ "memset",
[this]() {
auto instExpr(readExpr());
const auto name(readName());
auto valueExpr(readExpr());
ignoreRightP();
return std::make_shared<SetMember>(instExpr, name, valueExpr);
}
},
{ "strlen",
[this]() {
auto exprs(readAndCheckExprList("strlen", 1));
return std::make_shared<StringLen>(exprs[0]);
}
},
{ "strget",
[this]() {
auto exprs(readAndCheckExprList("strget", 2));
return std::make_shared<StringGet>(exprs[0], exprs[1]);
}
},
{ "strset",
[this]() {
auto exprs(readAndCheckExprList("strset", 3));
return std::make_shared<StringSet>(exprs[0], exprs[1], exprs[2]);
}
},
{ "strcat",
[this]() {
auto exprs(readAndCheckExprList("strcat", 2));
return std::make_shared<StringCat>(exprs[0], exprs[1]);
}
},
{ "substr",
[this]() {
auto exprs(readExprList());
if (exprs.size() == 2) {
return std::make_shared<SubString>(exprs[0], exprs[1]);
}
else if (exprs.size() == 3) {
return std::make_shared<SubString>(exprs[0], exprs[1], exprs[2]);
}
else {
throw TooManyOrFewForms("substr");
}
}
},
{ "strfind",
[this]() {
auto exprs(readExprList());
if (exprs.size() == 2) {
return std::make_shared<StringFind>(exprs[0], exprs[1]);
}
else if (exprs.size() == 3) {
return std::make_shared<StringFind>(exprs[0], exprs[1], exprs[2]);
}
else {
throw TooManyOrFewForms("strfind");
}
}
},
{ "strcount",
[this]() {
auto exprs(readAndCheckExprList("strcount", 2));
return std::make_shared<StringCount>(exprs[0], exprs[1]);
}
},
{ "array",
[this]() {
auto valueExprs(readExprList());
if (valueExprs.size() == 0) {
return std::make_shared<MakeArray>();
}
else {
return std::make_shared<MakeArray>(valueExprs);
}
}
},
{ "arraysv",
[this]() {
auto exprs(readExprList());
if (exprs.size() == 1) {
return std::make_shared<MakeArraySV>(exprs[0]);
}
else if (exprs.size() == 2) {
return std::make_shared<MakeArraySV>(exprs[0], exprs[1]);
}
else {
throw TooManyOrFewForms("arraysv");
}
}
},
{ "arrlen",
[this]() {
auto exprs(readAndCheckExprList("arrlen", 1));
return std::make_shared<ArrayLen>(exprs[0]);
}
},
{ "arrget",
[this]() {
auto exprs(readAndCheckExprList("arrget", 2));
return std::make_shared<ArrayGet>(exprs[0], exprs[1]);
}
},
{ "arrset",
[this]() {
auto exprs(readAndCheckExprList("arrset", 3));
return std::make_shared<ArraySet>(exprs[0], exprs[1], exprs[2]);
}
},
{ "arradd",
[this]() {
auto exprs(readAndCheckExprList("arradd", 2));
return std::make_shared<ArrayAdd>(exprs[0], exprs[1]);
}
},
{ "arrfind",
[this]() {
auto exprs(readExprList());
if (exprs.size() == 2) {
return std::make_shared<ArrayFind>(exprs[0], exprs[1]);
}
else if (exprs.size() == 3) {
return std::make_shared<ArrayFind>(exprs[0], exprs[1], exprs[2]);
}
else {
throw TooManyOrFewForms("arrfind");
}
}
},
{ "arrcount",
[this]() {
auto exprs(readAndCheckExprList("arrcount", 2));
return std::make_shared<ArrayCount>(exprs[0], exprs[1]);
}
},
{ "isupper", MakeStrCharOp<StrCharCheck>("isupper", *this, StrCharCheck::Upper) },
{ "islower", MakeStrCharOp<StrCharCheck>("islower", *this, StrCharCheck::Lower) },
{ "isalpha", MakeStrCharOp<StrCharCheck>("isalpha", *this, StrCharCheck::Alpha) },
{ "isnumer", MakeStrCharOp<StrCharCheck>("isnumer", *this, StrCharCheck::Numer) },
{ "isalnum", MakeStrCharOp<StrCharCheck>("isalnum", *this, StrCharCheck::Alnum) },
{ "ispunct", MakeStrCharOp<StrCharCheck>("ispunct", *this, StrCharCheck::Punct) },
{ "isspace", MakeStrCharOp<StrCharCheck>("isspace", *this, StrCharCheck::Space) },
{ "toupper", MakeStrCharOp<StrCharTransform>("toupper", *this, StrCharTransform::ToUpper) },
{ "tolower", MakeStrCharOp<StrCharTransform>("tolower", *this, StrCharTransform::ToLower) },
{ "rand",
[this]() {
auto exprs(readExprList());
if (exprs.size() > 1) {
throw TooManyOrFewForms("rand");
}
return std::make_shared<Random>(exprs.size() == 1 ? exprs[0] : CodeNode::SharedPtr());
}
},
{ "hash",
[this]() {
auto exprs(readAndCheckExprList("hash", 1));
return std::make_shared<Hash>(exprs[0]);
}
},
{ "hashmap",
[this]() {
return std::make_shared<MakeHashMap>(readExprList());
}
},
{ "hmlen",
[this]() {
auto exprs(readAndCheckExprList("hmlen", 1));
return std::make_shared<HashMapLen>(exprs[0]);
}
},
{ "hmhas",
[this]() {
auto exprs(readAndCheckExprList("hmhas", 2));
return std::make_shared<HashMapContains>(exprs[0], exprs[1]);
}
},
{ "hmget",
[this]() {
auto exprs(readAndCheckRangeExprList("hmget", 2, 3));
return std::make_shared<HashMapGet>(exprs[0], exprs[1], exprs.size() == 3 ? exprs[2] : CodeNode::SharedPtr());
}
},
{ "hmset",
[this]() {
auto exprs(readAndCheckExprList("hmget", 3));
return std::make_shared<HashMapSet>(exprs[0], exprs[1], exprs[2]);
}
},
{ "hmrem",
[this]() {
auto exprs(readAndCheckExprList("hmrem", 2));
return std::make_shared<HashMapRemove>(exprs[0], exprs[1]);
}
},
{ "hmclr",
[this]() {
auto exprs(readAndCheckExprList("hmclr", 1));
return std::make_shared<HashMapClear>(exprs[0]);
}
},
{ "hmfind",
[this]() {
auto exprs(readAndCheckExprList("hmfind", 2));
return std::make_shared<HashMapFind>(exprs[0], exprs[1]);
}
},
{ "hmcount",
[this]() {
auto exprs(readAndCheckExprList("hmcount", 2));
return std::make_shared<HashMapCount>(exprs[0], exprs[1]);
}
},
{ "hmkeys",
[this]() {
auto exprs(readAndCheckExprList("hmkeys", 1));
return std::make_shared<HashMapKeys>(exprs[0]);
}
},
{ "hmvals",
[this]() {
auto exprs(readAndCheckExprList("hmvals", 1));
return std::make_shared<HashMapValues>(exprs[0]);
}
},
{ "hmitems",
[this]() {
auto exprs(readAndCheckExprList("hmitems", 1));
return std::make_shared<HashMapItems>(exprs[0]);
}
},
{ "pair",
[this]() {
auto exprs(readAndCheckExprList("pair", 2));
return std::make_shared<MakePair>(exprs[0], exprs[1]);
}
},
{ "first",
[this]() {
auto exprs(readAndCheckExprList("first", 1));
return std::make_shared<PairFirst>(exprs[0]);
}
},
{ "second",
[this]() {
auto exprs(readAndCheckExprList("second", 1));
return std::make_shared<PairSecond>(exprs[0]);
}
}
};
}
| 28,805 | 8,252 |
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
std::vector<int> getNumbersFromFile(const char *fileName, int fileSize)
{
std::vector<int> numbers;
std::ifstream inputFile(fileName);
int currInt;
if (inputFile.is_open())
{
for (int i = 0; i < fileSize; i++)
{
inputFile >> currInt;
numbers.push_back(currInt);
}
}
else
{
std::cerr << "Can't open file\n";
}
return numbers;
}
std::vector<std::string> getStringsFromFile(const char *fileName, int fileSize)
{
std::vector<std::string> strings;
std::ifstream inputFile(fileName);
std::string currStr;
if (inputFile.is_open())
{
for (int i = 0; i < fileSize; i++)
{
inputFile >> currStr;
strings.push_back(currStr);
}
}
else
{
std::cerr << "Can't open file\n";
}
return strings;
} | 950 | 319 |
/* author : @akashsaini */
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
string solve(ll n,ll x,ll k)
{
if(x%k==0)
{
return "YES";
}
else
{
if(((n+1)-x)%k==0)
{
return "YES";
}
else
{
return "NO";
}
}
}
int main()
{
long int t;
cin>>t;
while(t--)
{
ll n,x,k;
cin>>n>>x>>k;
cout<<solve(n,x,k)<<"\n";
}
return 0;
}
| 388 | 220 |
/**
* Copyright 2021 Torsten Mehnert
*
* 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 "../../../lib/quickjs/quickjshelper.h"
#include <complate/core/exception.h>
#include "catch2/catch.hpp"
#include "quickjs.h"
#include "resources.h"
using namespace Catch::Matchers;
using namespace std;
TEST_CASE("QuickJsHelper", "[quickjs]") {
JSRuntime *runtime = JS_NewRuntime();
JSContext *context = JS_NewContext(runtime);
JSValue v = JS_UNINITIALIZED;
SECTION("evaluate") {
SECTION("can evaluate the views.js bundle") {
const string bundle = Resources::read("views.js");
QuickJsHelper::evaluate(context, bundle);
v = QuickJsHelper::getFunction(context, "render");
REQUIRE(JS_IsFunction(context, v));
}
SECTION("throws complate::Exception when source is malformed") {
const string malformed = Resources::read("views.js.malformed");
REQUIRE_THROWS_AS(QuickJsHelper::evaluate(context, malformed),
complate::Exception);
REQUIRE_THROWS_WITH(QuickJsHelper::evaluate(context, malformed),
Contains("SyntaxError"));
}
}
SECTION("getFunction") {
SECTION("return the function") {
QuickJsHelper::evaluate(context, "function foo() {};");
v = QuickJsHelper::getFunction(context, "foo");
REQUIRE(JS_IsFunction(context, v));
}
SECTION("throws complate::Exception when error occured in eval") {
const string malformed = "foo /&=/!{D<";
QuickJsHelper::evaluate(context, "function foo() {};");
REQUIRE_THROWS_AS(QuickJsHelper::getFunction(context, malformed),
complate::Exception);
REQUIRE_THROWS_WITH(QuickJsHelper::getFunction(context, malformed),
Contains("SyntaxError"));
}
SECTION("throws complate::Exception when name is not a function") {
QuickJsHelper::evaluate(context, "const foo = 3;");
REQUIRE_THROWS_AS(QuickJsHelper::getFunction(context, "foo"),
complate::Exception);
REQUIRE_THROWS_WITH(QuickJsHelper::getFunction(context, "foo"),
Contains("Is not a function"));
}
SECTION("throws complate::Exception when name is undefined") {
REQUIRE_THROWS_AS(QuickJsHelper::getFunction(context, "foo"),
complate::Exception);
REQUIRE_THROWS_WITH(QuickJsHelper::getFunction(context, "foo"),
Contains("ReferenceError: 'foo' is not defined"));
}
}
if (!JS_IsUninitialized(v)) {
JS_FreeValue(context, v);
}
JS_FreeContext(context);
JS_FreeRuntime(runtime);
} | 3,158 | 977 |
// 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
| 4,663 | 1,443 |
class CfgFactionClasses
{
class 75th_RR
{
displayName = "75th Ranger Regiment";
priority = 5;
side = 1;
icon = "";
};
}; | 131 | 64 |
#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)
//}
| 49,418 | 21,392 |
#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
| 3,796 | 1,396 |
// 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);
}
}
| 7,035 | 2,788 |
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(BOOST_SPIRIT_NONTERMINAL_DIRECTOR_FEB_19_2007_0259PM)
#define BOOST_SPIRIT_NONTERMINAL_DIRECTOR_FEB_19_2007_0259PM
#include <boost/spirit/home/support/nonterminal/nonterminal.hpp>
#include <boost/spirit/home/support/nonterminal/detail/expand_arg.hpp>
#include <boost/spirit/home/qi/domain.hpp>
#include <boost/spirit/home/support/component.hpp>
#include <boost/spirit/home/support/detail/values.hpp>
#include <boost/fusion/include/transform.hpp>
#include <boost/fusion/include/join.hpp>
#include <boost/fusion/include/single_view.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/mpl/at.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_const.hpp>
namespace boost { namespace spirit { namespace qi
{
struct nonterminal_director
{
template <typename Component, typename Context, typename Iterator>
struct attribute
{
typedef typename result_of::subject<Component>::type nonterminal_holder;
typedef typename nonterminal_holder::nonterminal_type::attr_type type;
};
template <
typename NonterminalContext, typename Nonterminal
, typename Iterator, typename Context
, typename Skipper, typename Attribute>
static bool parse_nonterminal(
nonterminal_object<Nonterminal> const& x
, Iterator& first, Iterator const& last
, Context& /*caller_context*/, Skipper const& skipper
, Attribute& attr)
{
// the nonterminal_holder holds an actual nonterminal_object
typedef typename Nonterminal::locals_type locals_type;
fusion::single_view<Attribute&> front(attr);
NonterminalContext context(front, locals_type());
return x.obj.parse(first, last, context, skipper);
}
template <
typename NonterminalContext, typename Nonterminal
, typename Iterator, typename Context
, typename Skipper, typename Attribute>
static bool parse_nonterminal(
Nonterminal const* ptr
, Iterator& first, Iterator const& last
, Context& /*caller_context*/, Skipper const& skipper
, Attribute& attr)
{
// the nonterminal_holder holds a pointer to a nonterminal
typedef typename Nonterminal::locals_type locals_type;
fusion::single_view<Attribute&> front(attr);
NonterminalContext context(front, locals_type());
return ptr->parse(first, last, context, skipper);
}
template <
typename NonterminalContext, typename Nonterminal, typename FSequence
, typename Iterator, typename Context
, typename Skipper, typename Attribute>
static bool parse_nonterminal(
parameterized_nonterminal<Nonterminal, FSequence> const& x
, Iterator& first, Iterator const& last
, Context& caller_context, Skipper const& skipper
, Attribute& attr)
{
// the nonterminal_holder holds a parameterized_nonterminal
typedef typename Nonterminal::locals_type locals_type;
fusion::single_view<Attribute&> front(attr);
NonterminalContext context(
fusion::join(
front
, fusion::transform(
x.fseq
, spirit::detail::expand_arg<Context>(caller_context)
)
)
, locals_type()
);
return x.ptr->parse(first, last, context, skipper);
}
template <
typename Component
, typename Iterator, typename Context
, typename Skipper, typename Attribute>
static bool parse(
Component const& component
, Iterator& first, Iterator const& last
, Context& context, Skipper const& skipper
, Attribute& attr_)
{
// main entry point
typedef typename
result_of::subject<Component>::type
nonterminal_holder;
// The overall context_type consist of a tuple with:
// 1) a tuple of the return value and parameters
// 2) the locals
// if no signature is specified the first tuple contains
// an unused_type element at position zero only.
typedef typename
nonterminal_holder::nonterminal_type::context_type
context_type;
// attr_type is the return type as specified by the associated
// nonterminal signature, if no signature is specified this is
// the unused_type
typedef typename
nonterminal_holder::nonterminal_type::attr_type
attr_type;
// create an attribute if one is not supplied
typename mpl::if_<
is_same<typename remove_const<Attribute>::type, unused_type>
, attr_type
, Attribute&>::type
attr = spirit::detail::make_value<attr_type>::call(attr_);
return parse_nonterminal<context_type>(
subject(component).held
, first, last, context, skipper, attr
);
}
template <typename Nonterminal>
static std::string what_nonterminal(nonterminal_object<Nonterminal> const& x)
{
// the nonterminal_holder holds an actual nonterminal_object
return x.obj.what();
}
template <typename Nonterminal>
static std::string what_nonterminal(Nonterminal const* ptr)
{
// the nonterminal_holder holds a pointer to a nonterminal
return ptr->what();
}
template <typename Nonterminal, typename FSequence>
static std::string what_nonterminal(
parameterized_nonterminal<Nonterminal, FSequence> const& x)
{
// the nonterminal_holder holds a parameterized_nonterminal
return x.ptr->what();
}
template <typename Component, typename Context>
static std::string what(Component const& component, Context const& ctx)
{
return what_nonterminal(subject(component).held);
}
};
}}}
#endif
| 6,710 | 1,777 |
#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();
}
} | 5,179 | 2,031 |
/*
* 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();
}
}
| 18,668 | 6,909 |
#include"iostream.h"
void main()
{
int a,b;
cout<<"input values"<<endl;
cin>>a;
cin>>b;
if(a>b)
cout<<a<<endl;
else
cout<<b<<endl;
}
| 157 | 80 |
#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"
| 2,819 | 885 |
#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;
}
| 824 | 310 |
#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));
}
}
| 3,123 | 996 |
/*
1. Implement an algorithm to determine if a string has all unique characters.
*/
#include <iostream>
#include <map>
#include <string>
bool check_if_unique(std::string& string)
{
std::map<char, bool> checked;
for (char& c : string)
{
if (checked.find(c) != checked.end())
{
return false;
}
checked[c] = true;
}
return true;
}
int main()
{
std::string string;
std::cout << "Enter a string to check its uniqueness: ";
std::getline(std::cin, string);
bool is_unique = check_if_unique(string);
if (is_unique)
{
std::cout << "All chars in string are unique!" << std::endl;;
}
if (!is_unique)
{
std::cout << "String's chars are not all unique!" << std::endl;
}
}
| 788 | 263 |
#include "duckdb/parser/expression/constant_expression.hpp"
#include "duckdb/parser/transformer.hpp"
#include "duckdb/common/operator/cast_operators.hpp"
using namespace duckdb;
using namespace std;
unique_ptr<ParsedExpression> Transformer::TransformValue(PGValue val) {
switch (val.type) {
case T_PGInteger:
assert(val.val.ival <= numeric_limits<int32_t>::max());
return make_unique<ConstantExpression>(SQLType::INTEGER, Value::INTEGER((int32_t)val.val.ival));
case T_PGBitString: // FIXME: this should actually convert to BLOB
case T_PGString:
return make_unique<ConstantExpression>(SQLType::VARCHAR, Value(string(val.val.str)));
case T_PGFloat: {
bool cast_as_double = false;
for (auto ptr = val.val.str; *ptr; ptr++) {
if (*ptr == '.') {
// found decimal point, cast as double
cast_as_double = true;
break;
}
}
int64_t value;
if (!cast_as_double && TryCast::Operation<const char *, int64_t>(val.val.str, value)) {
// successfully cast to bigint: bigint value
return make_unique<ConstantExpression>(SQLType::BIGINT, Value::BIGINT(value));
} else {
// could not cast to bigint: cast to double
double dbl_value = Cast::Operation<const char *, double>(val.val.str);
return make_unique<ConstantExpression>(SQLType::DOUBLE, Value::DOUBLE(dbl_value));
}
}
case T_PGNull:
return make_unique<ConstantExpression>(SQLType::SQLNULL, Value());
default:
throw NotImplementedException("Value not implemented!");
}
}
unique_ptr<ParsedExpression> Transformer::TransformConstant(PGAConst *c) {
return TransformValue(c->val);
}
| 1,583 | 578 |
#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;
}
| 1,844 | 682 |
// 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
| 8,890 | 2,782 |
// SimDrawer.cpp: implementation of the SimDrawer class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "enmark.h"
#include "SimDrawer.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
SimDrawer& SimDrawer::Instance()
{
static SimDrawer aInst;
return aInst;
}
SimDrawer::SimDrawer()
{
mHDC = 0;
}
SimDrawer::~SimDrawer()
{
}
void SimDrawer::IBegineDraw()
{
/// do nothing
}
void SimDrawer::IEndDraw()
{
S32 i, j, wpln;
COLORREF clr;
wpln = GetFrameWidth() / 32;
for ( i = 0; i < GetFrameHeight(); i++ )
{
for ( j = 0; j < GetFrameWidth(); j++ )
{
clr = (*(mpVScreen + (i * wpln) + j/32 ) & 0x01 << (32-1-j%32)) ? RGB(255,255,255): RGB(0,0,0);
::SetPixel( mHDC, j, i, clr );
}
}
}
void SimDrawer::SetDC(HDC hDC)
{
mHDC = hDC;
}
| 1,034 | 413 |
#pragma once
//-----------------------------------------------------------------------------
// CUDA Includes
//-----------------------------------------------------------------------------
#pragma region
#include "cuda_runtime.h"
#pragma endregion
//-----------------------------------------------------------------------------
// System Includes
//-----------------------------------------------------------------------------
#pragma region
#include <cstdio>
#include <cstdlib>
#pragma endregion
//-----------------------------------------------------------------------------
// Declarations and Definitions
//-----------------------------------------------------------------------------
namespace smallpt {
inline void HandleError(cudaError_t err, const char* file, int line) {
if (cudaSuccess != err) {
std::printf("%s in %s at line %d\n",
cudaGetErrorString(err), file, line);
std::exit(EXIT_FAILURE);
}
}
}
//-----------------------------------------------------------------------------
// Defines
//-----------------------------------------------------------------------------
#pragma region
#define HANDLE_ERROR(err) (HandleError( err, __FILE__, __LINE__ ))
#define HANDLE_NULL(a) {if (a == NULL) { \
std::printf( "Host memory failed in %s at line %d\n", __FILE__, __LINE__ ); \
std::exit( EXIT_FAILURE );}}
#pragma endregion | 1,417 | 386 |
#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;
}
} | 1,039 | 327 |
/* \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;
}
}
| 8,894 | 3,278 |
#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
| 3,447 | 1,079 |
#include <kalibr_errorterms/EuclideanError.hpp>
namespace kalibr_errorterms {
EuclideanError::EuclideanError(const Eigen::Vector3d& measurement, const Eigen::Matrix3d invR,
const aslam::backend::EuclideanExpression& predicted_measurement)
: _measurement(measurement), _predictedMeasurement(predicted_measurement) {
setInvR(invR);
aslam::backend::DesignVariable::set_t dvs;
_predictedMeasurement.getDesignVariables(dvs);
setDesignVariablesIterator(dvs.begin(), dvs.end());
}
/// \brief evaluate the error term and return the weighted squared error e^T invR e
double EuclideanError::evaluateErrorImplementation() {
setError(_predictedMeasurement.toEuclidean() - _measurement);
return evaluateChiSquaredError();
}
/// \brief evaluate the jacobian
void EuclideanError::evaluateJacobiansImplementation(aslam::backend::JacobianContainer& _jacobians) const {
_predictedMeasurement.evaluateJacobians(_jacobians);
}
/// \brief return predicted measurement
Eigen::Vector3d EuclideanError::getPredictedMeasurement() { return _predictedMeasurement.evaluate(); }
/// \brief return measurement
Eigen::Vector3d EuclideanError::getMeasurement() { return _measurement; }
} // namespace kalibr_errorterms
| 1,258 | 384 |
// 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);
}
| 546,113 | 168,214 |
#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
| 529 | 216 |
/*****************************************************************************************
* *
* 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;
};
| 3,640 | 953 |